Examples of run()


Examples of org.eclipse.jdt.internal.corext.codemanipulation.AddCustomConstructorOperation.run()

        getSibling((IType)typeBinding.getJavaElement()), settings, true, true);
    op.setOmitSuper(!commandLine.hasOption(Options.SUPERTYPE_OPTION) || isDefault);
    if (!typeBinding.isEnum()){
      op.setVisibility(Modifier.PUBLIC);
    }
    op.run(null);

    TextEdit edit = op.getResultingEdit();
    if (edit != null){
      edit = edit.getChildren()[0];
      JavaUtils.format(
View Full Code Here

Examples of org.eclipse.jdt.internal.corext.codemanipulation.AddGetterSetterOperation.run()

        type,
        getter != null ? new IField[]{getter} : NO_FIELDS,
        setter != null ? new IField[]{setter} : NO_FIELDS,
        NO_FIELDS,
        ASTUtils.getCompilationUnit(src), null, sibling, settings, true, true);
    op.run(null);

    TextEdit edit = op.getResultingEdit();
    if (edit != null){
      JavaUtils.format(
          src, CodeFormatter.K_COMPILATION_UNIT,
View Full Code Here

Examples of org.eclipse.jdt.internal.corext.codemanipulation.AddImportsOperation.run()

    }else{
      ChooseImport query = new ChooseImport(project, type);
      try{
        AddImportsOperation op = new AddImportsOperation(
            src, offset, 1, query, true /* save */, true /* apply */);
        op.run(null);
        edits = op.getResultingEdit();
        if (edits == null){
          IStatus status = op.getStatus();
          return status.getSeverity() != IStatus.OK ? status.getMessage() : null;
        }
View Full Code Here

Examples of org.eclipse.jdt.internal.corext.codemanipulation.AddUnimplementedConstructorsOperation.run()

            }
            if (doConstructors) {
                AddUnimplementedConstructorsOperation operation = new AddUnimplementedConstructorsOperation(unit, binding, null, -1, false, true, false);
                operation.setOmitSuper(true);
                operation.setCreateComments(isAddComments());
                operation.run(monitor);
                createImports(imports, operation.getCreatedImports());
            }
        }
        JavaModelUtil.reconcile(cu);
        typeMethods = type.getMethods();
View Full Code Here

Examples of org.eclipse.jdt.internal.corext.codemanipulation.AddUnimplementedMethodsOperation.run()

        final ITypeBinding binding = ASTNodes.getTypeBinding(unit, type);
        if (binding != null) {
            if (doUnimplementedMethods) {
                AddUnimplementedMethodsOperation operation = new AddUnimplementedMethodsOperation(unit, binding, null, -1, false, true, false);
                operation.setCreateComments(isAddComments());
                operation.run(monitor);
                createImports(imports, operation.getCreatedImports());
            }
            if (doConstructors) {
                AddUnimplementedConstructorsOperation operation = new AddUnimplementedConstructorsOperation(unit, binding, null, -1, false, true, false);
                operation.setOmitSuper(true);
View Full Code Here

Examples of org.eclipse.jdt.launching.IVMRunner.run()

        // set the default source locator if required
        setDefaultSourceLocator(launch, configuration);
        monitor.worked(1);

        // Launch the configuration - 1 unit of work
        runner.run(runConfig, launch, monitor);

        // check for cancellation
        if (monitor.isCanceled()) { return; }

        if (configuration.getAttribute(ProseLaunchConfiguration.ATTR_LAUNCH_PROSE_SERVER, true))
View Full Code Here

Examples of org.eclipse.jdt.ui.actions.OpenAction.run()

            //note that it will only be able to find a java definition if JDT is actually available
            //so, we don't have to care about JDTNotAvailableExceptions here.
            JavaDefinition javaDefinition = (JavaDefinition) itemPointer.definition;
            OpenAction openAction = new OpenAction(pyEdit.getSite());
            StructuredSelection selection = new StructuredSelection(new Object[] { javaDefinition.javaElement });
            openAction.run(selection);
        } else {
            String message;
            if (itemPointer.definition != null && itemPointer.definition.module instanceof AbstractJavaClassModule) {
                AbstractJavaClassModule module = (AbstractJavaClassModule) itemPointer.definition.module;
                message = "The definition was found at: " + f.toString() + "\n" + "as the java module: "
View Full Code Here

Examples of org.eclipse.jdt.ui.actions.OpenNewClassWizardAction.run()

    ncwp.setSuperClass("org.apache.wicket.markup.html.WebPage", openJavaFile());

    action.setConfiguredWizardPage(ncwp);
    action.setOpenEditorOnFinish(true);
    action.run();
  }

  /** Helper to get a IFile in this workspace */
  public static IFile getFile(final String filename) {
    IFile file = null;
View Full Code Here

Examples of org.eclipse.jdt.ui.actions.OrganizeImportsAction.run()

          copy.discardWorkingCopy();
        }
        IWorkbenchPartSite site = getEditorSite();
        if (site != null) {
          OrganizeImportsAction action = new OrganizeImportsAction(site);
          action.run(unit);
        }
        type = getUnitMainType(unit);
        rename(type, root);
        if (unit.isWorkingCopy()) {
          unit.commitWorkingCopy(true, monitor);
View Full Code Here

Examples of org.eclipse.jdt.ui.actions.SelectionDispatchAction.run()

      }
      if (progressMonitor != null) {
        progressMonitor.subTask("Pasting test source");
      }
//      System.out.println("Pasting into " + selection + " (" + selection.size() + ")");
      pasteAction.run(selection);
      if (progressMonitor != null) {
        progressMonitor.worked(1);
      }
    } finally {
      getDisplay().asyncExec(new Runnable() {
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.