Examples of reconcile()


Examples of org.eclipse.jdt.core.ICompilationUnit.reconcile()

      CreateDialog dialog = new CreateDialog(new Shell(), new BuilderGenerator());
      dialog.show(workingCopy);

      synchronized (workingCopy) {
        workingCopy.reconcile(ICompilationUnit.NO_AST, false, null, null);
      }

    } catch (JavaModelException e) {
      e.printStackTrace();
    } catch (CoreException e) {
View Full Code Here

Examples of org.eclipse.jdt.core.ICompilationUnit.reconcile()

      }

      try {
        icu.becomeWorkingCopy(null);
        icu.getBuffer().setContents(document.get());
        icu.reconcile(ICompilationUnit.NO_AST, false, null, null);
        icu.commitWorkingCopy(true, null);
        icu.discardWorkingCopy();
      } catch (JavaModelException e) {
        CrashReporter.reportException(e);
        logger.debug("Reconcile operation on ICompilationUnit failed.\r\n"
View Full Code Here

Examples of org.eclipse.jdt.core.ICompilationUnit.reconcile()

      }

      try {
        icu.becomeWorkingCopy(null);
        icu.getBuffer().setContents(document.get());
        icu.reconcile(ICompilationUnit.NO_AST, false, null, null);
        icu.commitWorkingCopy(true, null);
        icu.discardWorkingCopy();
      } catch (JavaModelException e) {
        logger.debug("Reconcile operation on ICompilationUnit failed.\r\n"
            + e.getLocalizedMessage());
View Full Code Here

Examples of org.eclipse.jdt.core.ICompilationUnit.reconcile()

      }

      try {
        icu.becomeWorkingCopy(null);
        icu.getBuffer().setContents(document.get());
        icu.reconcile(ICompilationUnit.NO_AST, false, null, null);
        icu.commitWorkingCopy(true, null);
        icu.discardWorkingCopy();
      } catch (JavaModelException e) {
        logger.debug("Reconcile operation on ICompilationUnit failed.\r\n"
            + e.getLocalizedMessage());
View Full Code Here

Examples of org.eclipse.jdt.core.ICompilationUnit.reconcile()

    // update of the compilation unit
    cpu.getBuffer().setContents(
        astRoot.getTypeRoot().findPrimaryType().getCompilationUnit()
            .getSource());
    cpu.reconcile(ICompilationUnit.NO_AST, false, null, null);
    cpu.commitWorkingCopy(false, null);
  }

  /**
   * Inserts a TypeDeclaration into the target ICompilationUnit
View Full Code Here

Examples of org.eclipse.jdt.core.ICompilationUnit.reconcile()

      String newSource = document.get();

      // update of the compilation unit
      icu.getBuffer().setContents(newSource);
      icu.reconcile(ICompilationUnit.NO_AST, false, null, null);
      icu.commitWorkingCopy(false, null);
      icu.discardWorkingCopy();
    } catch (Exception e) {
      CrashReporter.reportException(e);
      logger.debug("Could not insert result: " + e.toString());
View Full Code Here

Examples of org.eclipse.jdt.core.ICompilationUnit.reconcile()

        // update of the compilation unit
        cpu.getBuffer().setContents(
            astRoot.getTypeRoot().findPrimaryType()
                .getCompilationUnit().getSource());
        cpu.reconcile(ICompilationUnit.NO_AST, false, null, null);
        cpu.commitWorkingCopy(false, null);
        return Status.OK_STATUS;
      }

      // Insert class
View Full Code Here

Examples of org.eclipse.jdt.core.ICompilationUnit.reconcile()

    ICompilationUnit cu = getCompilationUnit();
    if (cu != null) {
      try {
        synchronized(cu) {
          cu.makeConsistent(getProgressMonitor());
          cu.reconcile(ICompilationUnit.NO_AST, false, getWorkingCopyOwner(), getProgressMonitor());
        }
      }
      catch (JavaModelException e) {
        Logger.logException(e);
      }
View Full Code Here

Examples of org.eclipse.jdt.core.ICompilationUnit.reconcile()

    ICompilationUnit cu = getCompilationUnit();
    if (cu != null) {
      try {
        synchronized(cu) {
          cu.makeConsistent(getProgressMonitor());
          cu.reconcile(ICompilationUnit.NO_AST, false, getWorkingCopyOwner(), getProgressMonitor());
        }
      }
      catch (JavaModelException e) {
        Logger.logException(e);
      }
View Full Code Here

Examples of org.eclipse.jdt.core.ICompilationUnit.reconcile()

   
    IPackageFragmentRoot packageFragmentRoot = javaProject.findPackageFragmentRoot(folder.getFullPath());
    IPackageFragment packageFragment = packageFragmentRoot.createPackageFragment(packageName, true, null);

    ICompilationUnit cu = packageFragment.createCompilationUnit(className + ".java", content, true, null); //$NON-NLS-1$
    cu.reconcile(AST.JLS3, true, null, null);
  }

  private String getPackageName(String fullClassName) {
    int lastDotPosition = fullClassName.lastIndexOf("."); //$NON-NLS-1$
    return fullClassName.substring(0, lastDotPosition);
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.