Package org.eclipse.e4.xwt.databinding

Examples of org.eclipse.e4.xwt.databinding.IBindingContext.dispose()


      // failed to create the widget, dispose its context if necessary
      if (element instanceof MContext) {
        MContext ctxt = (MContext) element;
        IEclipseContext lclContext = ctxt.getContext();
        if (lclContext != null) {
          lclContext.dispose();
          ctxt.setContext(null);
        }
      }
    }
   
View Full Code Here


       */
//      if (keyAssistDialog != null) {
//        keyAssistDialog.clearRememberedState();
//      }
    } finally {
      staticContext.dispose();
    }
    return (commandDefined && commandHandled);
  }
 
  private EHandlerService getHandlerService() {
View Full Code Here

        ((WWidget<?>)element.getWidget()).setWidgetState(WidgetState.DISPOSED);
      }
      unbindWidget(element, (W) element.getWidget());
     
      IEclipseContext ctx = (IEclipseContext) element.getTransientData().get(RENDERING_CONTEXT_KEY);
      ctx.dispose();
      element.getTransientData().remove(RENDERING_CONTEXT_KEY);
     
    }
  }
 
View Full Code Here

      try {
        ContributionsAnalyzer.populateModelInterfaces(item, runContext, item.getClass().getInterfaces());
        runContext.set(MItem.class.getName(), item);
        return Boolean.TRUE.equals(ContextInjectionFactory.invoke(object, CanExecute.class, context.getActiveLeaf(), runContext, Boolean.TRUE));
      } finally {
        runContext.dispose();
      }
    } else if( item instanceof MHandledItem ) {
      MHandledItem handledItem = (MHandledItem) item;
      EHandlerService service = (EHandlerService) context.get(EHandlerService.class.getName());
      if( service == null ) {
View Full Code Here

      final IEclipseContext runContext = context.createChild("HI-ToolItem");
      try {
        ContributionsAnalyzer.populateModelInterfaces(item,runContext, item.getClass().getInterfaces());
        return service.canExecute(cmd, runContext);
      } finally {
        runContext.dispose();       
      }
    }
   
    return false;
  }
View Full Code Here

      try {
        ContributionsAnalyzer.populateModelInterfaces(item, runContext, item.getClass().getInterfaces());
        runContext.set(MItem.class.getName(), item);
        ContextInjectionFactory.invoke(object,Execute.class, context.getActiveLeaf(), runContext);
      } finally {
        runContext.dispose()
      }
    } else if( item instanceof MHandledItem ) {
      MHandledItem handledItem = (MHandledItem) item;
      EHandlerService service = (EHandlerService) context.get(EHandlerService.class.getName());
      ParameterizedCommand cmd = handledItem.getWbCommand();
View Full Code Here

      final IEclipseContext runContext = context.createChild("HI-ToolItem");
      try {
        ContributionsAnalyzer.populateModelInterfaces(item,runContext, item.getClass().getInterfaces());
        service.executeHandler(cmd, runContext);
      } finally {
        runContext.dispose();       
      }
    }
  }
 
  private Object getContributionObject(IEclipseContext context, MContribution contribution) {
View Full Code Here

        widget);
    dataBindingContext.setRealm(XWT.getRealm());
    widget.addDisposeListener(new DisposeListener() {

      public void widgetDisposed(DisposeEvent e) {
        dataBindingContext.dispose();
      }
    });

    UserData.setLocalData(host,
        IUserDataConstants.XWT_BINDING_CONTEXT_KEY,
View Full Code Here

        widget);
    dataBindingContext.setRealm(XWT.getRealm());
    widget.addDisposeListener(new DisposeListener() {

      public void widgetDisposed(DisposeEvent e) {
        dataBindingContext.dispose();
      }
    });

    UserData.setLocalData(host,
        IUserDataConstants.XWT_BINDING_CONTEXT_KEY,
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.