public interface ContributionContext
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.
Modifier and Type | Field and Description |
---|---|
static String |
TYPE_CONTEXT_MENU
The predefined menu-type for a context popup-menu
|
static String |
TYPE_CONTEXT_TOOLBAR
The predefined menu-type for a context toolbar (like jadice's hover toolbars)
|
static String |
TYPE_MAIN_MENU
The predefined menu-type for an application's main (drop-down) menu
|
static String |
TYPE_TOOLBAR
The predefined menu-type for an application's main toolbar
|
Modifier and Type | Method and Description |
---|---|
Context |
getContext()
Returns a
Context object. |
EventObject |
getEvent()
Returns the originating event which causes the contribution.
|
String |
getMenuType()
Return the type of menu currently under construction.
|
static final String TYPE_MAIN_MENU
static final String TYPE_TOOLBAR
static final String TYPE_CONTEXT_MENU
static final String TYPE_CONTEXT_TOOLBAR
EventObject getEvent()
Context getContext()
Context
object. It can be used to create CommandAction
as
contributions.String getMenuType()
TYPE_MAIN_MENU
etc.) or an application-dependent type (that's why the type
isn't an enum).TYPE_MAIN_MENU
,
TYPE_TOOLBAR
,
TYPE_CONTEXT_MENU
,
TYPE_CONTEXT_TOOLBAR
Copyright © 2024 levigo holding gmbh. All rights reserved.