org.eclipse.jface.action.SubContributionItem Java Examples

The following examples show how to use org.eclipse.jface.action.SubContributionItem. 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: ChartActionBarContributor.java    From neoscada with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * This removes from the specified <code>manager</code> all {@link org.eclipse.jface.action.ActionContributionItem}s
 * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void depopulateManager(IContributionManager manager,
		Collection<? extends IAction> actions) {
	if (actions != null) {
		IContributionItem[] items = manager.getItems();
		for (int i = 0; i < items.length; i++) {
			// Look into SubContributionItems
			//
			IContributionItem contributionItem = items[i];
			while (contributionItem instanceof SubContributionItem) {
				contributionItem = ((SubContributionItem) contributionItem)
						.getInnerItem();
			}

			// Delete the ActionContributionItems with matching action.
			//
			if (contributionItem instanceof ActionContributionItem) {
				IAction action = ((ActionContributionItem) contributionItem)
						.getAction();
				if (actions.contains(action)) {
					manager.remove(contributionItem);
				}
			}
		}
	}
}
 
Example #2
Source File: ExtensionsActionBarContributor.java    From ifml-editor with MIT License 6 votes vote down vote up
/**
 * This removes from the specified <code>manager</code> all {@link org.eclipse.jface.action.ActionContributionItem}s
 * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void depopulateManager(IContributionManager manager, Collection<? extends IAction> actions) {
	if (actions != null) {
		IContributionItem[] items = manager.getItems();
		for (int i = 0; i < items.length; i++) {
			// Look into SubContributionItems
			//
			IContributionItem contributionItem = items[i];
			while (contributionItem instanceof SubContributionItem) {
				contributionItem = ((SubContributionItem)contributionItem).getInnerItem();
			}

			// Delete the ActionContributionItems with matching action.
			//
			if (contributionItem instanceof ActionContributionItem) {
				IAction action = ((ActionContributionItem)contributionItem).getAction();
				if (actions.contains(action)) {
					manager.remove(contributionItem);
				}
			}
		}
	}
}
 
Example #3
Source File: CoreActionBarContributor.java    From ifml-editor with MIT License 6 votes vote down vote up
/**
 * This removes from the specified <code>manager</code> all {@link org.eclipse.jface.action.ActionContributionItem}s
 * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void depopulateManager(IContributionManager manager, Collection<? extends IAction> actions) {
	if (actions != null) {
		IContributionItem[] items = manager.getItems();
		for (int i = 0; i < items.length; i++) {
			// Look into SubContributionItems
			//
			IContributionItem contributionItem = items[i];
			while (contributionItem instanceof SubContributionItem) {
				contributionItem = ((SubContributionItem)contributionItem).getInnerItem();
			}

			// Delete the ActionContributionItems with matching action.
			//
			if (contributionItem instanceof ActionContributionItem) {
				IAction action = ((ActionContributionItem)contributionItem).getAction();
				if (actions.contains(action)) {
					manager.remove(contributionItem);
				}
			}
		}
	}
}
 
Example #4
Source File: EipActionBarContributor.java    From eip-designer with Apache License 2.0 6 votes vote down vote up
/**
   * This removes from the specified <code>manager</code> all {@link org.eclipse.jface.action.ActionContributionItem}s
   * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection.
   * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
   * @generated
   */
protected void depopulateManager(IContributionManager manager, Collection<? extends IAction> actions) {
     if (actions != null) {
        IContributionItem[] items = manager.getItems();
        for (int i = 0; i < items.length; i++) {
           // Look into SubContributionItems
           //
           IContributionItem contributionItem = items[i];
           while (contributionItem instanceof SubContributionItem) {
              contributionItem = ((SubContributionItem)contributionItem).getInnerItem();
           }

           // Delete the ActionContributionItems with matching action.
           //
           if (contributionItem instanceof ActionContributionItem) {
              IAction action = ((ActionContributionItem)contributionItem).getAction();
              if (actions.contains(action)) {
                 manager.remove(contributionItem);
              }
           }
        }
     }
  }
 
Example #5
Source File: BeansActionBarContributor.java    From hybris-commerce-eclipse-plugin with Apache License 2.0 6 votes vote down vote up
/**
 * This removes from the specified <code>manager</code> all {@link org.eclipse.jface.action.ActionContributionItem}s
 * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void depopulateManager(IContributionManager manager, Collection<? extends IAction> actions) {
	if (actions != null) {
		IContributionItem[] items = manager.getItems();
		for (int i = 0; i < items.length; i++) {
			// Look into SubContributionItems
			//
			IContributionItem contributionItem = items[i];
			while (contributionItem instanceof SubContributionItem) {
				contributionItem = ((SubContributionItem)contributionItem).getInnerItem();
			}

			// Delete the ActionContributionItems with matching action.
			//
			if (contributionItem instanceof ActionContributionItem) {
				IAction action = ((ActionContributionItem)contributionItem).getAction();
				if (actions.contains(action)) {
					manager.remove(contributionItem);
				}
			}
		}
	}
}
 
Example #6
Source File: GenconfActionBarContributor.java    From M2Doc with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * This removes from the specified <code>manager</code> all {@link org.eclipse.jface.action.ActionContributionItem}s
 * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * 
 * @generated
 */
protected void depopulateManager(IContributionManager manager, Collection<? extends IAction> actions) {
    if (actions != null) {
        IContributionItem[] items = manager.getItems();
        for (int i = 0; i < items.length; i++) {
            // Look into SubContributionItems
            //
            IContributionItem contributionItem = items[i];
            while (contributionItem instanceof SubContributionItem) {
                contributionItem = ((SubContributionItem) contributionItem).getInnerItem();
            }

            // Delete the ActionContributionItems with matching action.
            //
            if (contributionItem instanceof ActionContributionItem) {
                IAction action = ((ActionContributionItem) contributionItem).getAction();
                if (actions.contains(action)) {
                    manager.remove(contributionItem);
                }
            }
        }
    }
}
 
Example #7
Source File: CrossflowActionBarContributor.java    From scava with Eclipse Public License 2.0 6 votes vote down vote up
/**
 * This removes from the specified <code>manager</code> all {@link org.eclipse.jface.action.ActionContributionItem}s
 * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void depopulateManager(IContributionManager manager, Collection<? extends IAction> actions) {
	if (actions != null) {
		IContributionItem[] items = manager.getItems();
		for (int i = 0; i < items.length; i++) {
			// Look into SubContributionItems
			//
			IContributionItem contributionItem = items[i];
			while (contributionItem instanceof SubContributionItem) {
				contributionItem = ((SubContributionItem)contributionItem).getInnerItem();
			}

			// Delete the ActionContributionItems with matching action.
			//
			if (contributionItem instanceof ActionContributionItem) {
				IAction action = ((ActionContributionItem)contributionItem).getAction();
				if (actions.contains(action)) {
					manager.remove(contributionItem);
				}
			}
		}
	}
}
 
Example #8
Source File: ComponentActionBarContributor.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * This removes from the specified <code>manager</code> all {@link org.eclipse.jface.action.ActionContributionItem}s
 * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void depopulateManager ( IContributionManager manager, Collection<? extends IAction> actions )
{
    if ( actions != null )
    {
        IContributionItem[] items = manager.getItems ();
        for ( int i = 0; i < items.length; i++ )
        {
            // Look into SubContributionItems
            //
            IContributionItem contributionItem = items[i];
            while ( contributionItem instanceof SubContributionItem )
            {
                contributionItem = ( (SubContributionItem)contributionItem ).getInnerItem ();
            }

            // Delete the ActionContributionItems with matching action.
            //
            if ( contributionItem instanceof ActionContributionItem )
            {
                IAction action = ( (ActionContributionItem)contributionItem ).getAction ();
                if ( actions.contains ( action ) )
                {
                    manager.remove ( contributionItem );
                }
            }
        }
    }
}
 
Example #9
Source File: ProtocolActionBarContributor.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * This removes from the specified <code>manager</code> all {@link org.eclipse.jface.action.ActionContributionItem}s
 * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void depopulateManager ( IContributionManager manager, Collection<? extends IAction> actions )
{
    if ( actions != null )
    {
        IContributionItem[] items = manager.getItems ();
        for ( int i = 0; i < items.length; i++ )
        {
            // Look into SubContributionItems
            //
            IContributionItem contributionItem = items[i];
            while ( contributionItem instanceof SubContributionItem )
            {
                contributionItem = ( (SubContributionItem)contributionItem ).getInnerItem ();
            }

            // Delete the ActionContributionItems with matching action.
            //
            if ( contributionItem instanceof ActionContributionItem )
            {
                IAction action = ( (ActionContributionItem)contributionItem ).getAction ();
                if ( actions.contains ( action ) )
                {
                    manager.remove ( contributionItem );
                }
            }
        }
    }
}
 
Example #10
Source File: ChartActionBarContributor.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * This removes from the specified <code>manager</code> all {@link org.eclipse.jface.action.ActionContributionItem}s based on the {@link org.eclipse.jface.action.IAction}s contained in the
 * <code>actions</code> collection. <!-- begin-user-doc --> <!-- end-user-doc -->
 * 
 * @generated
 */
protected void depopulateManager ( final IContributionManager manager, final Collection<? extends IAction> actions )
{
    if ( actions != null )
    {
        final IContributionItem[] items = manager.getItems ();
        for ( int i = 0; i < items.length; i++ )
        {
            // Look into SubContributionItems
            //
            IContributionItem contributionItem = items[i];
            while ( contributionItem instanceof SubContributionItem )
            {
                contributionItem = ( (SubContributionItem)contributionItem ).getInnerItem ();
            }

            // Delete the ActionContributionItems with matching action.
            //
            if ( contributionItem instanceof ActionContributionItem )
            {
                final IAction action = ( (ActionContributionItem)contributionItem ).getAction ();
                if ( actions.contains ( action ) )
                {
                    manager.remove ( contributionItem );
                }
            }
        }
    }
}
 
Example #11
Source File: DetailViewActionBarContributor.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * This removes from the specified <code>manager</code> all {@link org.eclipse.jface.action.ActionContributionItem}s
 * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void depopulateManager ( IContributionManager manager, Collection<? extends IAction> actions )
{
    if ( actions != null )
    {
        IContributionItem[] items = manager.getItems ();
        for ( int i = 0; i < items.length; i++ )
        {
            // Look into SubContributionItems
            //
            IContributionItem contributionItem = items[i];
            while ( contributionItem instanceof SubContributionItem )
            {
                contributionItem = ( (SubContributionItem)contributionItem ).getInnerItem ();
            }

            // Delete the ActionContributionItems with matching action.
            //
            if ( contributionItem instanceof ActionContributionItem )
            {
                IAction action = ( (ActionContributionItem)contributionItem ).getAction ();
                if ( actions.contains ( action ) )
                {
                    manager.remove ( contributionItem );
                }
            }
        }
    }
}
 
Example #12
Source File: VisualInterfaceActionBarContributor.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * This removes from the specified <code>manager</code> all {@link org.eclipse.jface.action.ActionContributionItem}s
 * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void depopulateManager ( IContributionManager manager, Collection<? extends IAction> actions )
{
    if ( actions != null )
    {
        IContributionItem[] items = manager.getItems ();
        for ( int i = 0; i < items.length; i++ )
        {
            // Look into SubContributionItems
            //
            IContributionItem contributionItem = items[i];
            while ( contributionItem instanceof SubContributionItem )
            {
                contributionItem = ( (SubContributionItem)contributionItem ).getInnerItem ();
            }

            // Delete the ActionContributionItems with matching action.
            //
            if ( contributionItem instanceof ActionContributionItem )
            {
                IAction action = ( (ActionContributionItem)contributionItem ).getAction ();
                if ( actions.contains ( action ) )
                {
                    manager.remove ( contributionItem );
                }
            }
        }
    }
}
 
Example #13
Source File: DeploymentActionBarContributor.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * This removes from the specified <code>manager</code> all {@link org.eclipse.jface.action.ActionContributionItem}s
 * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void depopulateManager ( IContributionManager manager, Collection<? extends IAction> actions )
{
    if ( actions != null )
    {
        IContributionItem[] items = manager.getItems ();
        for ( int i = 0; i < items.length; i++ )
        {
            // Look into SubContributionItems
            //
            IContributionItem contributionItem = items[i];
            while ( contributionItem instanceof SubContributionItem )
            {
                contributionItem = ( (SubContributionItem)contributionItem ).getInnerItem ();
            }

            // Delete the ActionContributionItems with matching action.
            //
            if ( contributionItem instanceof ActionContributionItem )
            {
                IAction action = ( (ActionContributionItem)contributionItem ).getAction ();
                if ( actions.contains ( action ) )
                {
                    manager.remove ( contributionItem );
                }
            }
        }
    }
}
 
Example #14
Source File: SetupActionBarContributor.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * This removes from the specified <code>manager</code> all {@link org.eclipse.jface.action.ActionContributionItem}s
 * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void depopulateManager ( IContributionManager manager, Collection<? extends IAction> actions )
{
    if ( actions != null )
    {
        IContributionItem[] items = manager.getItems ();
        for ( int i = 0; i < items.length; i++ )
        {
            // Look into SubContributionItems
            //
            IContributionItem contributionItem = items[i];
            while ( contributionItem instanceof SubContributionItem )
            {
                contributionItem = ( (SubContributionItem)contributionItem ).getInnerItem ();
            }

            // Delete the ActionContributionItems with matching action.
            //
            if ( contributionItem instanceof ActionContributionItem )
            {
                IAction action = ( (ActionContributionItem)contributionItem ).getAction ();
                if ( actions.contains ( action ) )
                {
                    manager.remove ( contributionItem );
                }
            }
        }
    }
}
 
Example #15
Source File: ConfigurationActionBarContributor.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * This removes from the specified <code>manager</code> all {@link org.eclipse.jface.action.ActionContributionItem}s
 * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void depopulateManager ( IContributionManager manager, Collection<? extends IAction> actions )
{
    if ( actions != null )
    {
        IContributionItem[] items = manager.getItems ();
        for ( int i = 0; i < items.length; i++ )
        {
            // Look into SubContributionItems
            //
            IContributionItem contributionItem = items[i];
            while ( contributionItem instanceof SubContributionItem )
            {
                contributionItem = ( (SubContributionItem)contributionItem ).getInnerItem ();
            }

            // Delete the ActionContributionItems with matching action.
            //
            if ( contributionItem instanceof ActionContributionItem )
            {
                IAction action = ( (ActionContributionItem)contributionItem ).getAction ();
                if ( actions.contains ( action ) )
                {
                    manager.remove ( contributionItem );
                }
            }
        }
    }
}
 
Example #16
Source File: ItemActionBarContributor.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * This removes from the specified <code>manager</code> all {@link org.eclipse.jface.action.ActionContributionItem}s
 * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void depopulateManager ( IContributionManager manager, Collection<? extends IAction> actions )
{
    if ( actions != null )
    {
        IContributionItem[] items = manager.getItems ();
        for ( int i = 0; i < items.length; i++ )
        {
            // Look into SubContributionItems
            //
            IContributionItem contributionItem = items[i];
            while ( contributionItem instanceof SubContributionItem )
            {
                contributionItem = ( (SubContributionItem)contributionItem ).getInnerItem ();
            }

            // Delete the ActionContributionItems with matching action.
            //
            if ( contributionItem instanceof ActionContributionItem )
            {
                IAction action = ( (ActionContributionItem)contributionItem ).getAction ();
                if ( actions.contains ( action ) )
                {
                    manager.remove ( contributionItem );
                }
            }
        }
    }
}
 
Example #17
Source File: ProfileActionBarContributor.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * This removes from the specified <code>manager</code> all {@link org.eclipse.jface.action.ActionContributionItem}s
 * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void depopulateManager ( IContributionManager manager, Collection<? extends IAction> actions )
{
    if ( actions != null )
    {
        IContributionItem[] items = manager.getItems ();
        for ( int i = 0; i < items.length; i++ )
        {
            // Look into SubContributionItems
            //
            IContributionItem contributionItem = items[i];
            while ( contributionItem instanceof SubContributionItem )
            {
                contributionItem = ( (SubContributionItem)contributionItem ).getInnerItem ();
            }

            // Delete the ActionContributionItems with matching action.
            //
            if ( contributionItem instanceof ActionContributionItem )
            {
                IAction action = ( (ActionContributionItem)contributionItem ).getAction ();
                if ( actions.contains ( action ) )
                {
                    manager.remove ( contributionItem );
                }
            }
        }
    }
}
 
Example #18
Source File: GlobalizeActionBarContributor.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * This removes from the specified <code>manager</code> all {@link org.eclipse.jface.action.ActionContributionItem}s
 * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void depopulateManager ( IContributionManager manager, Collection<? extends IAction> actions )
{
    if ( actions != null )
    {
        IContributionItem[] items = manager.getItems ();
        for ( int i = 0; i < items.length; i++ )
        {
            // Look into SubContributionItems
            //
            IContributionItem contributionItem = items[i];
            while ( contributionItem instanceof SubContributionItem )
            {
                contributionItem = ( (SubContributionItem)contributionItem ).getInnerItem ();
            }

            // Delete the ActionContributionItems with matching action.
            //
            if ( contributionItem instanceof ActionContributionItem )
            {
                IAction action = ( (ActionContributionItem)contributionItem ).getAction ();
                if ( actions.contains ( action ) )
                {
                    manager.remove ( contributionItem );
                }
            }
        }
    }
}
 
Example #19
Source File: SecurityActionBarContributor.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * This removes from the specified <code>manager</code> all {@link org.eclipse.jface.action.ActionContributionItem}s
 * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void depopulateManager ( IContributionManager manager, Collection<? extends IAction> actions )
{
    if ( actions != null )
    {
        IContributionItem[] items = manager.getItems ();
        for ( int i = 0; i < items.length; i++ )
        {
            // Look into SubContributionItems
            //
            IContributionItem contributionItem = items[i];
            while ( contributionItem instanceof SubContributionItem )
            {
                contributionItem = ( (SubContributionItem)contributionItem ).getInnerItem ();
            }

            // Delete the ActionContributionItems with matching action.
            //
            if ( contributionItem instanceof ActionContributionItem )
            {
                IAction action = ( (ActionContributionItem)contributionItem ).getAction ();
                if ( actions.contains ( action ) )
                {
                    manager.remove ( contributionItem );
                }
            }
        }
    }
}
 
Example #20
Source File: InfrastructureActionBarContributor.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * This removes from the specified <code>manager</code> all {@link org.eclipse.jface.action.ActionContributionItem}s
 * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void depopulateManager ( IContributionManager manager, Collection<? extends IAction> actions )
{
    if ( actions != null )
    {
        IContributionItem[] items = manager.getItems ();
        for ( int i = 0; i < items.length; i++ )
        {
            // Look into SubContributionItems
            //
            IContributionItem contributionItem = items[i];
            while ( contributionItem instanceof SubContributionItem )
            {
                contributionItem = ( (SubContributionItem)contributionItem ).getInnerItem ();
            }

            // Delete the ActionContributionItems with matching action.
            //
            if ( contributionItem instanceof ActionContributionItem )
            {
                IAction action = ( (ActionContributionItem)contributionItem ).getAction ();
                if ( actions.contains ( action ) )
                {
                    manager.remove ( contributionItem );
                }
            }
        }
    }
}
 
Example #21
Source File: RecipeActionBarContributor.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * This removes from the specified <code>manager</code> all {@link org.eclipse.jface.action.ActionContributionItem}s
 * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void depopulateManager ( IContributionManager manager, Collection<? extends IAction> actions )
{
    if ( actions != null )
    {
        IContributionItem[] items = manager.getItems ();
        for ( int i = 0; i < items.length; i++ )
        {
            // Look into SubContributionItems
            //
            IContributionItem contributionItem = items[i];
            while ( contributionItem instanceof SubContributionItem )
            {
                contributionItem = ( (SubContributionItem)contributionItem ).getInnerItem ();
            }

            // Delete the ActionContributionItems with matching action.
            //
            if ( contributionItem instanceof ActionContributionItem )
            {
                IAction action = ( (ActionContributionItem)contributionItem ).getAction ();
                if ( actions.contains ( action ) )
                {
                    manager.remove ( contributionItem );
                }
            }
        }
    }
}
 
Example #22
Source File: MemoryActionBarContributor.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * This removes from the specified <code>manager</code> all {@link org.eclipse.jface.action.ActionContributionItem}s
 * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void depopulateManager ( IContributionManager manager, Collection<? extends IAction> actions )
{
    if ( actions != null )
    {
        IContributionItem[] items = manager.getItems ();
        for ( int i = 0; i < items.length; i++ )
        {
            // Look into SubContributionItems
            //
            IContributionItem contributionItem = items[i];
            while ( contributionItem instanceof SubContributionItem )
            {
                contributionItem = ( (SubContributionItem)contributionItem ).getInnerItem ();
            }

            // Delete the ActionContributionItems with matching action.
            //
            if ( contributionItem instanceof ActionContributionItem )
            {
                IAction action = ( (ActionContributionItem)contributionItem ).getAction ();
                if ( actions.contains ( action ) )
                {
                    manager.remove ( contributionItem );
                }
            }
        }
    }
}
 
Example #23
Source File: WorldActionBarContributor.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * This removes from the specified <code>manager</code> all {@link org.eclipse.jface.action.ActionContributionItem}s
 * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void depopulateManager ( IContributionManager manager, Collection<? extends IAction> actions )
{
    if ( actions != null )
    {
        IContributionItem[] items = manager.getItems ();
        for ( int i = 0; i < items.length; i++ )
        {
            // Look into SubContributionItems
            //
            IContributionItem contributionItem = items[i];
            while ( contributionItem instanceof SubContributionItem )
            {
                contributionItem = ( (SubContributionItem)contributionItem ).getInnerItem ();
            }

            // Delete the ActionContributionItems with matching action.
            //
            if ( contributionItem instanceof ActionContributionItem )
            {
                IAction action = ( (ActionContributionItem)contributionItem ).getAction ();
                if ( actions.contains ( action ) )
                {
                    manager.remove ( contributionItem );
                }
            }
        }
    }
}
 
Example #24
Source File: OsgiActionBarContributor.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * This removes from the specified <code>manager</code> all {@link org.eclipse.jface.action.ActionContributionItem}s
 * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void depopulateManager ( IContributionManager manager, Collection<? extends IAction> actions )
{
    if ( actions != null )
    {
        IContributionItem[] items = manager.getItems ();
        for ( int i = 0; i < items.length; i++ )
        {
            // Look into SubContributionItems
            //
            IContributionItem contributionItem = items[i];
            while ( contributionItem instanceof SubContributionItem )
            {
                contributionItem = ( (SubContributionItem)contributionItem ).getInnerItem ();
            }

            // Delete the ActionContributionItems with matching action.
            //
            if ( contributionItem instanceof ActionContributionItem )
            {
                IAction action = ( (ActionContributionItem)contributionItem ).getAction ();
                if ( actions.contains ( action ) )
                {
                    manager.remove ( contributionItem );
                }
            }
        }
    }
}