List of usage examples for org.eclipse.jface.action IContributionManager insertBefore
void insertBefore(String id, IContributionItem item);
From source file:ac.soton.fmusim.components.presentation.ComponentsActionBarContributor.java
License:Open Source License
/** * This populates the specified <code>manager</code> with {@link org.eclipse.jface.action.ActionContributionItem}s * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection, * by inserting them before the specified contribution item <code>contributionID</code>. * If <code>contributionID</code> is <code>null</code>, they are simply added. * <!-- begin-user-doc -->//from ww w .j ava 2s. c om * <!-- end-user-doc --> * @generated */ protected void populateManager(IContributionManager manager, Collection<? extends IAction> actions, String contributionID) { if (actions != null) { for (IAction action : actions) { if (contributionID != null) { manager.insertBefore(contributionID, action); } else { manager.add(action); } } } }
From source file:at.spardat.xma.guidesign.presentation.action.GuidesignActionBarContributor.java
License:Open Source License
/** * This populates the specified <code>manager</code> with {@link ActionContributionItem}s * based on the {@link IAction}s contained in the <code>actions</code> collection, * by inserting them before the specified contribution item <code>contributionID</code>. * If <code>ID</code> is <code>null</code>, they are simply added. * <!-- begin-user-doc -->/*w w w .ja v a 2s . co m*/ * <!-- end-user-doc --> * @generated */ protected void populateManager(IContributionManager manager, Collection actions, String contributionID) { if (actions != null) { for (Iterator i = actions.iterator(); i.hasNext();) { IAction action = (IAction) i.next(); if (contributionID != null) { manager.insertBefore(contributionID, action); } else { manager.add(action); } } } }
From source file:carisma.modeltype.bpmn2.extension.presentation.ExtensionActionBarContributor.java
License:Open Source License
/** * This populates the specified <code>manager</code> with {@link org.eclipse.jface.action.ActionContributionItem}s * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection, * by inserting them before the specified contribution item <code>contributionID</code>. * If <code>contributionID</code> is <code>null</code>, they are simply added. * <!-- begin-user-doc -->/*from ww w . j a v a2 s . co m*/ * <!-- end-user-doc --> * @generated */ protected static void populateManager(IContributionManager manager, Collection<? extends IAction> actions, String contributionID) { if (actions != null) { for (IAction action : actions) { if (contributionID != null) { manager.insertBefore(contributionID, action); } else { manager.add(action); } } } }
From source file:com.misc.common.moplaf.emf.editor.Util.java
License:Open Source License
/** * This populates the specified <code>manager</code> with {@link org.eclipse.jface.action.ActionContributionItem}s * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection, * by inserting them before the specified contribution item <code>contributionID</code>. * If <code>contributionID</code> is <code>null</code>, they are simply added. * <!-- begin-user-doc -->/* www . ja v a 2s . c o m*/ * <!-- end-user-doc --> * @generated */ public static void populateManager(IContributionManager manager, Collection<? extends IAction> actions, String contributionID) { if (actions != null) { for (IAction action : actions) { if (action.isEnabled() || action.getText() != null) { if (contributionID != null) { manager.insertBefore(contributionID, action); } else { manager.add(action); } } } } }
From source file:de.walware.statet.rtm.ftable.internal.ui.editors.FTableActionBarContributor.java
License:Open Source License
/** * This populates the specified <code>manager</code> with {@link org.eclipse.jface.action.ActionContributionItem}s * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection, * by inserting them before the specified contribution item <code>contributionID</code>. * If <code>contributionID</code> is <code>null</code>, they are simply added. * <!-- begin-user-doc -->/*from ww w .ja v a 2s. c o m*/ * <!-- end-user-doc --> * @generated */ protected void populateManager(final IContributionManager manager, final Collection<? extends IAction> actions, final String contributionID) { if (actions != null) { for (final IAction action : actions) { if (contributionID != null) { manager.insertBefore(contributionID, action); } else { manager.add(action); } } } }
From source file:es.cv.gvcase.ide.navigator.provider.MOSKittSubmenuActionProvider.java
License:Open Source License
/** * Fills a {@link IContributionManager} with two levels of menus, as * specified by the {@link Map} of {@link String}s to {@link Collection}s of * {@link IAction}s.//from ww w .j a v a 2 s. com * * @param manager * the manager * @param submenuActions * the submenu actions * @param contributionID * the contribution id */ protected void populateManager(IContributionManager manager, Map<String, Collection<IAction>> submenuActions, String contributionID) { if (submenuActions != null) { for (Map.Entry<String, Collection<IAction>> entry : submenuActions.entrySet()) { MenuManager submenuManager = new MenuManager(entry.getKey()); if (contributionID != null) { manager.insertBefore(contributionID, submenuManager); } else { manager.add(submenuManager); } populateManager(submenuManager, entry.getValue(), null); } } }
From source file:org.eclipse.eatop.examples.explorer.ModelExampleActionProvider.java
License:Open Source License
@Override protected void populateManager(IContributionManager manager, Map<String, Collection<IAction>> submenuActions, String contributionId) {// w ww . j a va 2 s . com if (submenuActions != null) { for (Map.Entry<String, Collection<IAction>> entry : submenuActions.entrySet()) { StringTokenizer st = new StringTokenizer(entry.getKey(), "|"); //$NON-NLS-1$ int count = st.countTokens(); IContributionManager lastManager = manager; for (int i = 0; i < count; i++) { MenuManager submenuManager = new MenuManager(st.nextToken()); if (contributionId != null) { lastManager.insertBefore(contributionId, submenuManager); } else { lastManager.add(submenuManager); } lastManager = submenuManager; if (i == count - 1) { populateManager(submenuManager, entry.getValue(), null); } } } } }
From source file:org.eclipse.emf.compare.examples.addressbook.addressbook.presentation.AddressbookActionBarContributor.java
License:Open Source License
/** * This populates the specified <code>manager</code> with * {@link org.eclipse.jface.action.ActionContributionItem}s based on the * {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection, by * inserting them before the specified contribution item <code>contributionID</code>. If * <code>contributionID</code> is <code>null</code>, they are simply added. <!-- begin-user-doc --> <!-- * end-user-doc -->/*from w ww . j a v a 2 s . c o m*/ * * @generated */ protected void populateManager(IContributionManager manager, Collection<? extends IAction> actions, String contributionID) { if (actions != null) { for (final IAction action : actions) { if (contributionID != null) { manager.insertBefore(contributionID, action); } else { manager.add(action); } } } }
From source file:org.eclipse.epf.authoring.ui.actions.LibraryActionBarContributor.java
License:Open Source License
/** * This populates the specified <code>manager</code> with * {@link org.eclipse.jface.action.ActionContributionItem}s based on the * {@link org.eclipse.jface.action.IAction}s contained in the * <code>actions</code> collection, by inserting them before the specified * contribution item <code>contributionID</code>. If <code>ID</code> is * <code>null</code>, they are simply added. *///from www . j a v a2 s. com protected void populateManager(IContributionManager manager, Collection actions, String contributionID) { if (actions != null) { for (Iterator i = actions.iterator(); i.hasNext();) { Object obj = i.next(); if (obj instanceof IAction) { IAction action = (IAction) obj; if (contributionID != null) { manager.insertBefore(contributionID, action); } else { manager.add(action); } } else if (obj instanceof Separator) { manager.add((Separator) obj); } } } }
From source file:org.eclipse.oomph.setup.presentation.SetupActionBarContributor.java
License:Open Source License
/** * This populates the specified <code>manager</code> with {@link org.eclipse.jface.action.ActionContributionItem}s * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection, * by inserting them before the specified contribution item <code>contributionID</code>. * If <code>contributionID</code> is <code>null</code>, they are simply added. * <!-- begin-user-doc -->/*from w ww . ja v a 2 s.c o m*/ * <!-- end-user-doc --> * @generated */ protected void populateManagerGen(IContributionManager manager, Collection<? extends IAction> actions, String contributionID) { if (actions != null) { for (IAction action : actions) { if (contributionID != null) { manager.insertBefore(contributionID, action); } else { manager.add(action); } } } }