Package org.eclipse.ui

Examples of org.eclipse.ui.IPluginContribution


    }
    if (triggerPoint == null) {
      return true;
    }
    if (object instanceof IPluginContribution) {
      IPluginContribution contribution = (IPluginContribution) object;
      IIdentifier identifier = getIdentifier(contribution);
      return allow(triggerPoint, identifier);
    }
    return true;
  }
View Full Code Here


   * @return whether the object should be filtered
   * @see #createUnifiedId(IPluginContribution)
   */
  public static final boolean filterItem(Object object) {
    if (object instanceof IPluginContribution) {
      IPluginContribution contribution = (IPluginContribution) object;
      IWorkbenchActivitySupport workbenchActivitySupport = PlatformUI
          .getWorkbench().getActivitySupport();
      IIdentifier identifier = workbenchActivitySupport
          .getActivityManager().getIdentifier(
              createUnifiedId(contribution));
View Full Code Here

    }
       
        if (identifier == null) {
            IWorkbenchActivitySupport workbenchActivitySupport = PlatformUI
                    .getWorkbench().getActivitySupport();
            IPluginContribution contribution = (IPluginContribution) getAction();
            // no need to check if contribution.getPluginId() == null - plugin
            // actions are always from plugins.
            identifier = workbenchActivitySupport.getActivityManager()
                    .getIdentifier(
                            WorkbenchActivityHelper
View Full Code Here

    /* (non-Javadoc)
     * @see org.eclipse.ui.IPluginContribution#getLocalId()
     */
    public String getLocalId() {
      IPluginContribution contribution = getPluginContribution();
      if (contribution != null) {
      return contribution.getLocalId();
    }
      return wizardElement.getId();
    }
View Full Code Here

    /* (non-Javadoc)
     * @see org.eclipse.ui.IPluginContribution#getPluginId()
     */
    public String getPluginId() {
      IPluginContribution contribution = getPluginContribution();
      if (contribution != null) {
      return contribution.getPluginId();
    }
      return null;
    }
View Full Code Here

    /* (non-Javadoc)
     * @see org.eclipse.ui.IPluginContribution#getLocalId()
     */
    public String getLocalId() {
      IPluginContribution contribution = (IPluginContribution) Util.getAdapter(wizardElement,
        IPluginContribution.class);
    if (contribution != null) {
      return contribution.getLocalId();
    }
    return wizardElement.getId();
    }
View Full Code Here

    /* (non-Javadoc)
     * @see org.eclipse.ui.IPluginContribution#getPluginId()
     */
    public String getPluginId() {
         IPluginContribution contribution = (IPluginContribution) Util.getAdapter(wizardElement,
        IPluginContribution.class);
    if (contribution != null) {
      return contribution.getPluginId();
    }
    return null;
    }
View Full Code Here

                        SafeRunner.run(new SafeRunnable() {
                            /**
                             * Add the exception details to status is one happens.
                             */
                            public void handleException(Throwable e) {
                                 IPluginContribution contribution = (IPluginContribution) Util.getAdapter(wizardElement, IPluginContribution.class);
                                statuses[0] = new Status(
                                        IStatus.ERROR,
                                        contribution != null ? contribution.getPluginId() : WorkbenchPlugin.PI_WORKBENCH,
                                        IStatus.OK,
                                        WorkbenchMessages.WorkbenchWizard_errorMessage,
                                        e);
                            }

                            public void run() {
                                try {
                                    workbenchWizard[0] = createWizard();
                                    // create instance of target wizard
                                } catch (CoreException e) {
                                  IPluginContribution contribution = (IPluginContribution) Util.getAdapter(wizardElement, IPluginContribution.class);
                                  statuses[0] = new Status(
                                            IStatus.ERROR,
                                            contribution != null ? contribution.getPluginId() : WorkbenchPlugin.PI_WORKBENCH,
                                            IStatus.OK,
                                            WorkbenchMessages.WorkbenchWizard_errorMessage,
                                            e);
                                }
                            }
View Full Code Here

    // leave this code in - the perspective of a given project may map to
    // activities other than those that the wizard itself maps to.
    IPerspectiveDescriptor finalPersp = reg.findPerspectiveWithId(finalPerspId);
    if (finalPersp != null && finalPersp instanceof IPluginContribution) {
      IPluginContribution contribution = (IPluginContribution) finalPersp;
      if (contribution.getPluginId() != null) {
        IWorkbenchActivitySupport workbenchActivitySupport = PlatformUI.getWorkbench().getActivitySupport();
        IActivityManager activityManager = workbenchActivitySupport.getActivityManager();
        IIdentifier identifier = activityManager.getIdentifier(WorkbenchActivityHelper.createUnifiedId(contribution));
        Set<Object> idActivities = identifier.getActivityIds();
View Full Code Here

    // leave this code in - the perspective of a given project may map to
    // activities other than those that the wizard itself maps to.
    IPerspectiveDescriptor finalPersp = reg
        .findPerspectiveWithId(finalPerspId);
    if (finalPersp != null && finalPersp instanceof IPluginContribution) {
      IPluginContribution contribution = (IPluginContribution) finalPersp;
      if (contribution.getPluginId() != null) {
        IWorkbenchActivitySupport workbenchActivitySupport = PlatformUI
            .getWorkbench().getActivitySupport();
        IActivityManager activityManager = workbenchActivitySupport
            .getActivityManager();
        IIdentifier identifier = activityManager
View Full Code Here

TOP

Related Classes of org.eclipse.ui.IPluginContribution

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.