Package org.eclipse.wb.internal.core.utils.execution

Examples of org.eclipse.wb.internal.core.utils.execution.RunnableEx


   */
  private void setDefaultSizeIfEmpty(final WidgetInfo widget) {
    Rectangle bounds = widget.getBounds();
    if (bounds.width == 0 || bounds.height == 0) {
      m_shouldSetSize = true;
      ExecutionUtils.run(widget, new RunnableEx() {
        public void run() throws Exception {
          widget.getSizeSupport().setSize(100, 100);
        }
      });
    }
View Full Code Here


    return ICON;
  }

  @Override
  public boolean activate(boolean reload) {
    ExecutionUtils.run(m_rootJavaInfo, new RunnableEx() {
      public void run() throws Exception {
        activateEx();
      }
    });
    return false;
View Full Code Here

  ////////////////////////////////////////////////////////////////////////////
  @Override
  @SuppressWarnings("rawtypes")
  protected IProject[] build(int kind, Map args, final IProgressMonitor _monitor)
      throws CoreException {
    ExecutionUtils.runLog(new RunnableEx() {
      public void run() throws Exception {
        buildEx(_monitor);
      }
    });
    _monitor.done();
View Full Code Here

    TypeDeclaration implType = (TypeDeclaration) implRoot.types().get(0);
    // use standard JDT operation
    final IWorkspaceRunnable workspaceRunnable =
        OverrideMethodsAction.createRunnable(implRoot, implType.resolveBinding(), null, -1, false);
    // execute in UI because operation works with widgets during apply
    ExecutionUtils.runLogUI(new RunnableEx() {
      public void run() throws Exception {
        workspaceRunnable.run(null);
      }
    });
    implUnit.save(null, true);
View Full Code Here

      if (m_currentProject == null) {
        m_currentProject = getProject();
      }
      // check class loader
      if (m_resourcesProvider == null) {
        ExecutionUtils.runLog(new RunnableEx() {
          public void run() throws Exception {
            ModuleDescription module = getModule();
            m_resourcesProvider = module.getResourcesProvider();
          }
        });
View Full Code Here

        removeWidgetFromPanel(liveWidget);
        return;
      }
    }
    // clear RootLayoutPanel instance, so force its re-initialization
    ExecutionUtils.runIgnore(new RunnableEx() {
      public void run() throws Exception {
        Class<?> class_RootLayoutPanel = loadClass("com.google.gwt.user.client.ui.RootLayoutPanel");
        ReflectionUtils.setField(class_RootLayoutPanel, "singleton", null);
      }
    });
    // we removed "hiddenDiv", so clear it in "UiBinderUtil"
    ExecutionUtils.runIgnore(new RunnableEx() {
      public void run() throws Exception {
        Class<?> clazz = loadClass("com.google.gwt.uibinder.client.UiBinderUtil");
        ReflectionUtils.setField(clazz, "hiddenDiv", null);
      }
    });
    // we removed "hiddenDiv", so clear it in "HTMLPanel"
    ExecutionUtils.runIgnore(new RunnableEx() {
      public void run() throws Exception {
        Class<?> clazz = loadClass("com.google.gwt.user.client.ui.HTMLPanel");
        ReflectionUtils.setField(clazz, "hiddenDiv", null);
      }
    });
View Full Code Here

      String packageName = CodeUtils.getPackage(rootTypeName);
      helperClassName = packageName + ".FlexTableHelper";
    }
    // if FlexTableHelper exists, use it
    ((FlexTableStatus) getStatus()).setRowSpanFixed(false);
    ExecutionUtils.runIgnore(new RunnableEx() {
      public void run() throws Exception {
        Class<?> helperClass =
            JavaInfoUtils.getClassLoader(FlexTableInfo.this).loadClass(helperClassName);
        ReflectionUtils.invokeMethod(
            helperClass,
View Full Code Here

  /**
   * If {@link WidgetInfo} of given {@link AbstractWidgetHandle} has {@link Property} with given
   * title, installs {@link AbstractWidgetHandleDirectTextEditPolicy}.
   */
  public static void install(final AbstractWidgetHandleEditPart editPart, final String propertyPath) {
    ExecutionUtils.runLog(new RunnableEx() {
      public void run() throws Exception {
        AbstractWidgetHandle<?> handle = (AbstractWidgetHandle<?>) editPart.getModel();
        IWidgetInfo widget = handle.getWidget();
        Property property = PropertyUtils.getByPath(widget.getUnderlyingModel(), propertyPath);
        if (property != null) {
View Full Code Here

    }, StringUtils.EMPTY);
  }

  @Override
  protected void setText(final String text) {
    ExecutionUtils.runLog(new RunnableEx() {
      public void run() throws Exception {
        m_property.setValue(text);
      }
    });
  }
View Full Code Here

      value = "";
    }
    if (value instanceof String) {
      final String stringValue = (String) value;
      if (!ObjectUtils.equals(getValue(), stringValue)) {
        ExecutionUtils.run(m_object, new RunnableEx() {
          public void run() throws Exception {
            getValueObject().set(stringValue);
            m_accessor.applySemantics(m_styleName);
          }
        });
View Full Code Here

TOP

Related Classes of org.eclipse.wb.internal.core.utils.execution.RunnableEx

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.