Examples of MContribution


Examples of org.eclipse.e4.ui.model.application.MContribution

          // now remove the selected element
          removeGui(selectedElement);
        }
       
        if (element instanceof MContribution) {
          MContribution contribution = (MContribution) element;
          Object client = contribution.getObject();
          IEclipseContext parentContext = renderer.getModelContext(element);
          if (parentContext != null && client != null) {
            try {
              ContextInjectionFactory.invoke(client,
                  PersistState.class, parentContext, null);
            } catch (Exception e) {
              e.printStackTrace();
            }
          }
        }
       
        renderer.destroyWidget(element);
       
        if (element instanceof MContribution) {
          MContribution contribution = (MContribution) element;
          Object client = contribution.getObject();
          IEclipseContext parentContext = renderer.getModelContext(element);
          if (parentContext != null && client != null) {
            try {
              ContextInjectionFactory.uninject(client, parentContext);
            } catch (Exception e) {
              e.printStackTrace();
            }
          }
          contribution.setObject(null);
        }

        // dispose the context
        if (element instanceof MContext) {
          clearContext((MContext) element);
View Full Code Here

Examples of org.eclipse.e4.ui.model.application.MContribution

    return cmd;
  }
 
  protected boolean canExecute(M item, IEclipseContext context) {
    if( item instanceof MContribution ) {
      MContribution contribution = (MContribution) item;
      Object object = getContributionObject(context, contribution);
      if( object == null ) {
        return false;
      }
     
View Full Code Here

Examples of org.eclipse.e4.ui.model.application.MContribution

    return false;
  }
 
  protected void executeAction(M item, IEclipseContext context) {
    if( item instanceof MContribution ) {
      MContribution contribution = (MContribution) item;
      Object object = getContributionObject(context, contribution);
      if( object == null ) {
        return;
      }
     
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.