Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] How are actions in CDT contributed?

There are hundreds of them and they are contributes differently - some
are old actions, using old extensions for actions,
and some are commands. Commands are preferred way to go.  There are
good tutorials about how to add them.

2011/6/24 Tomasz Wesołowski <kosashi@xxxxxxxxx>:
> Hello,
> I'm a bit confused with all the terminology there is in the Eclipse
> framework w/r/t the UI features... well, all the things the user is able to
> click, shortly speaking. So: there are Actions, Contributions, Contributors,
> Handlers, Commands, Retargetable Actions and probably more which I can't
> think of right now. I understand that the confusion may come from the fact
> that Eclipse used to have only Actions, then later a Command framework was
> invented on top of that and the exact relation between two APIs (whether and
> how they depend on each other) is the thing most unclear to me at the
> moment.
> Before, I was able to add a couple new features to the CDT editor, mostly by
> finding another feature in similar place, and then finding all references to
> it and just duplicating them with modifications. I recognise from last year
> that for one menu option I had to create an Action entry, a Command entry
> (and a Binding entry for the key shortcut IIRC), plus some code in
> CEditorActionContributor (and probably another places I can't really
> remember now).
> Long story short:
> Before I've started working on CDT, I did a few experiments with Eclipse RCP
> and adding a new command to the menu only required a single entry in
> plugin.xml, plus the class itself, nothing more (so only declaratively).
> Yet, I understand that the approach used in CDT (declaratively in plugin.xml
> + procedurally in an action contributor class), despite being more
> complicated than that, has its own reasons.
> Could someone give me a brief description how exactly the UI features
> (menu/popup actions, main toolbar and per-view toolbar actions) are
> currently contributed into CDT, and why?
> Best regards,
> -- Tomasz
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>
>


Back to the top