org.eclipse.jface.action.IMenuCreator Java Examples
The following examples show how to use
org.eclipse.jface.action.IMenuCreator.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: LaunchModeActionTest.java From eclipse-extras with Eclipse Public License 1.0 | 5 votes |
@Test public void testGetMenuCreator() { LaunchModeAction action = createLaunchModeAction(); IMenuCreator menuCreator = action.getMenuCreator(); assertThat( menuCreator ).isNull(); }
Example #2
Source File: LaunchModeDropDownActionTest.java From eclipse-extras with Eclipse Public License 1.0 | 5 votes |
@Test public void testMenuCreator() { LaunchModeDropDownAction action = new LaunchModeDropDownAction( launchModeSetting ); IMenuCreator menuCreator = action.getMenuCreator(); assertThat( menuCreator ).isSameAs( action ); }
Example #3
Source File: OpenAndExpand.java From xds-ide with Eclipse Public License 1.0 | 4 votes |
@Override public IMenuCreator getMenuCreator() { return fOpenAction.getMenuCreator(); }
Example #4
Source File: OpenAndExpand.java From xds-ide with Eclipse Public License 1.0 | 4 votes |
@Override public void setMenuCreator(IMenuCreator creator) { fOpenAction.setMenuCreator(creator); }
Example #5
Source File: Action.java From EasyShell with Eclipse Public License 2.0 | 4 votes |
@Override public IMenuCreator getMenuCreator() { // TODO Auto-generated method stub return null; }
Example #6
Source File: Action.java From EasyShell with Eclipse Public License 2.0 | 4 votes |
@Override public void setMenuCreator(IMenuCreator creator) { // TODO Auto-generated method stub }
Example #7
Source File: ClasspathModifierDropDownAction.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 4 votes |
@Override public IMenuCreator getMenuCreator() { return this; }
Example #8
Source File: OpenAndExpand.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 4 votes |
@Override public IMenuCreator getMenuCreator() { return fOpenAction.getMenuCreator(); }
Example #9
Source File: OpenAndExpand.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 4 votes |
@Override public void setMenuCreator(IMenuCreator creator) { fOpenAction.setMenuCreator(creator); }
Example #10
Source File: TabbedPropertyTitle.java From birt with Eclipse Public License 1.0 | 4 votes |
private void handleWidgetSelection( Event e, ToolItem item ) { boolean selection = item.getSelection( ); int style = item.getStyle( ); IAction action = (IAction) actionMap.get( item ); if ( ( style & ( SWT.TOGGLE | SWT.CHECK ) ) != 0 ) { if ( action.getStyle( ) == IAction.AS_CHECK_BOX ) { action.setChecked( selection ); } } else if ( ( style & SWT.RADIO ) != 0 ) { if ( action.getStyle( ) == IAction.AS_RADIO_BUTTON ) { action.setChecked( selection ); } } else if ( ( style & SWT.DROP_DOWN ) != 0 ) { if ( e.detail == 4 ) { // on drop-down button if ( action.getStyle( ) == IAction.AS_DROP_DOWN_MENU ) { IMenuCreator mc = action.getMenuCreator( ); ToolItem ti = (ToolItem) item; if ( mc != null ) { Menu m = mc.getMenu( ti.getParent( ) ); if ( m != null ) { Point point = ti.getParent( ) .toDisplay( new Point( e.x, e.y ) ); m.setLocation( point.x, point.y ); // waiting m.setVisible( true ); return; // we don't fire the action } } } } } action.runWithEvent( e ); }
Example #11
Source File: KillRingListeners.java From e4macs with Eclipse Public License 1.0 | 4 votes |
public IMenuCreator getMenuCreator() { return action.getMenuCreator(); }
Example #12
Source File: KillRingListeners.java From e4macs with Eclipse Public License 1.0 | 4 votes |
public void setMenuCreator(IMenuCreator creator) { action.setMenuCreator(creator); }