Interface ContributionContext
public interface ContributionContext
A
ContributionContext
accompanies a
MenuContributor.contribute(ContributionContext, MenuBuilder)
call. It provides context
information for the current contribute call.
Caveat: levigo reserves the right to amend this interface in future releases. Therefore we strongly discourage independent implementations of it.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The predefined menu-type for a annotation menustatic final String
The predefined menu-type for a context popup-menustatic final String
The predefined menu-type for a context toolbar (like jadice's hover toolbars)static final String
The predefined menu-type for an application's main (drop-down) menustatic final String
The predefined menu-type for an application's main toolbar -
Method Summary
-
Field Details
-
TYPE_MAIN_MENU
The predefined menu-type for an application's main (drop-down) menu- See Also:
-
TYPE_TOOLBAR
The predefined menu-type for an application's main toolbar- See Also:
-
TYPE_CONTEXT_MENU
The predefined menu-type for a context popup-menu- See Also:
-
TYPE_CONTEXT_TOOLBAR
The predefined menu-type for a context toolbar (like jadice's hover toolbars)- See Also:
-
TYPE_ANNOTATION_MENU
The predefined menu-type for a annotation menu- See Also:
-
-
Method Details
-
getEvent
Object getEvent()Returns the originating event which causes the contribution.- Returns:
- the event
-
getContext
Context getContext()Returns aContext
object.- Returns:
- the context
-
getMenuType
String getMenuType()Return the type of menu currently under construction. This enables MenuContributors to supply different contributions for different situations. The menu type can be one of the predefined types (TYPE_MAIN_MENU
etc.) or an application-dependent type (that's why the type isn't an enum).- Returns:
- the type of menu
- See Also:
-