[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.gef] Re: What request should be used for copy action?

Oops, I am wrong.  StackAction is for redo/undo only.  the paste action
needs the SelectionAction#calculatedEnabled to enable/disable the menu.


"Kevin" <kevinlouisnospam@xxxxxxxxxxx> wrote in message
news:d1q3n1$rq9$1@xxxxxxxxxxxxxxxxxxx
> Taking about the PasteTemplateAction in the logic example, why is it
> extended from the SelectionAction?  I don't think it needs anything to be
> selected to paste.  Should it extend the StackAction, just like the
> RedoAction and UndoAction?
>
> Thanks,
>
> Kevin
>
>
> "Randy Hudson" <none@xxxxxxxxxx> wrote in message
> news:d1pggs$u8q$1@xxxxxxxxxxxxxxxxxxx
> > Copy is not an undoable action, so there is no command for it, and no
> > request types.  Copy is a model operation which is not undoable, so GEF
> does
> > not get involved.
> >
> > Pasting depends on what the data is you are pasting.  For example, the
> Logic
> > editor, we allow a palette template to be pasted, which is the same as
> > creation, so we reuse the Create request.  In fact, the receiving
editpart
> > doesn't know the difference between paste and dragging to create.
> >
> > "Kevin" <kevinlouisnospam@xxxxxxxxxxx> wrote in message
> > news:d1o3v8$678$1@xxxxxxxxxxxxxxxxxxx
> > > Hi,
> > >
> > > I read that the REQ_CLONE is for Ctrl+dragging only.  For copy/paste
> > > action,
> > > should I use the REQ_CREATE request?
> > >
> > > Is there any example for copy/paste edit part?
> > >
> > > Thanks,
> > >
> > > Kevin
> > >
> > >
> >
> >
>
>