Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] IOp in custom menu

On Wed, Aug 4, 2010 at 5:35 AM, Balint Persics <persicsb@xxxxxxxxx> wrote:
> Hi all,
>
> I want to develop a GIS application based on uDIG, but it seem, it
> will be a VERY hard task, since your documentation lacks a lot of
> things.

The documentation on the website is a community driven wiki (so please
contribute as you learn things).  Personally I add to it as needed to
reply to developer questions. The commercial docs are more complete
(indeed only recently were operations on the wiki).

> First of all, I wanted to create an operation, which is available form a menu.
> I created an IOp and an extension point with a custom category and I
> wanted to put whis IOp in my "Custom Operations" menu that I defined
> as an Eclipse extension point as prescribed in the Eclipse RCP spec.

That is fine; there is a menu contribution you can add to your menu
that will display the operations for that category:
1) if the category only has one operation it is displayed as is
2) if there are more operations in the category they will be displayed
as a submenu

To meet the eclipse ui guidelines we should cap the submenu at 10
items and have an "Other..." dialog allowing the user to choose
between other operations in that category.

> But this IOp won't show up in my custom menu, only in
> Edit->Operations, but that is:
> 1. Not user-friendly (kills a good UX, you need a lot more clicks)
> 2. Not customizable enough
> 3. Lacks documentation, that IOps are placed *only* in Edit->Operations

The Edit > Operations dialog is there to met the eclipse ui guideline
"other" requirement; allowing users in the current perspective to
access all operations irregardless if the perspective author has
included the operations in a menu or not.

> What am I missing to achieve my goal, to put an IOp under a custom menu?

Nothing much, need to look at the source code.  I took a couple
minuets and hunted down the shapefile operation menu contribution and
added it to the following page:

http://udig.refractions.net/confluence/display/DEV/5+Operations


Back to the top