Examples of becomeWorkingCopy()


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

                String cuName = getCompilationUnitName(typeName);
                ICompilationUnit parentCU = pack.createCompilationUnit(cuName, "", false, new SubProgressMonitor(monitor, 2)); //$NON-NLS-1$
                // create a working copy with a new owner

                needsSave = true;
                parentCU.becomeWorkingCopy(new SubProgressMonitor(monitor, 1)); // cu is now a (primary) working copy
                connectedCU = parentCU;

                IBuffer buffer = parentCU.getBuffer();

                String simpleTypeStub = constructSimpleTypeStub();
View Full Code Here

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

                IType enclosingType = getEnclosingType();

                ICompilationUnit parentCU = enclosingType.getCompilationUnit();

                needsSave = !parentCU.isWorkingCopy();
                parentCU.becomeWorkingCopy(new SubProgressMonitor(monitor, 1)); // cu is now for sure (primary) a working copy
                connectedCU = parentCU;

                CompilationUnit astRoot = createASTForImports(parentCU);
                imports = new ImportsManager(astRoot);
                existingImports = getExistingImports(astRoot);
View Full Code Here

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

                String cuName = getCompilationUnitName(typeName);
                ICompilationUnit parentCU = pack.createCompilationUnit(cuName, "", false, new SubProgressMonitor(monitorInternal, 2)); //$NON-NLS-1$
                // create a working copy with a new owner

                needsSave = true;
                parentCU.becomeWorkingCopy(new SubProgressMonitor(monitorInternal, 1)); // cu is now a (primary) working copy
                connectedCU = parentCU;

                IBuffer buffer = parentCU.getBuffer();

                String simpleTypeStub = constructSimpleTypeStub();
View Full Code Here

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

                IType enclosingType = getEnclosingType();

                ICompilationUnit parentCU = enclosingType.getCompilationUnit();

                needsSave = !parentCU.isWorkingCopy();
                parentCU.becomeWorkingCopy(new SubProgressMonitor(monitorInternal, 1)); // cu is now for sure (primary) a working copy
                connectedCU = parentCU;

                CompilationUnit astRoot = createASTForImports(parentCU);
                imports = new ImportsManager(astRoot);
                existingImports = getExistingImports(astRoot);
View Full Code Here

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

      } catch (BadLocationException e) {
        CrashReporter.reportException(e);
      }

      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) {
View Full Code Here

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

      } catch (BadLocationException e) {
        e.printStackTrace();
      }

      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) {
View Full Code Here

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

      } catch (BadLocationException e) {
        e.printStackTrace();
      }

      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) {
View Full Code Here

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

    ICompilationUnit workingCopy = src.getWorkingCopy(null);

    ProblemRequestor requestor = new ProblemRequestor(ids);
    try{
      workingCopy.discardWorkingCopy();
      workingCopy.becomeWorkingCopy(requestor, null);
    }finally{
      workingCopy.discardWorkingCopy();
    }
    List<IProblem> problems = requestor.getProblems();
    return (IProblem[])problems.toArray(new IProblem[problems.size()]);
View Full Code Here

Examples of org.eclipse.jdt.internal.core.CompilationUnit.becomeWorkingCopy()

   */
  public final ICompilationUnit newWorkingCopy(String name, IClasspathEntry[] classpath, IProblemRequestor problemRequestor, IProgressMonitor monitor) throws JavaModelException {
    ExternalJavaProject project = new ExternalJavaProject(classpath);
    IPackageFragment parent = ((PackageFragmentRoot) project.getPackageFragmentRoot(project.getProject())).getPackageFragment(CharOperation.NO_STRINGS);
    CompilationUnit result = new CompilationUnit((PackageFragment) parent, name, this);
    result.becomeWorkingCopy(problemRequestor, monitor);
    return result;
  }

  /**
   * Returns a new working copy with the given name using this working copy owner to
View Full Code Here

Examples of org.eclipse.jdt.internal.core.CompilationUnit.becomeWorkingCopy()

   */
  public final ICompilationUnit newWorkingCopy(String name, IClasspathEntry[] classpath, IProgressMonitor monitor) throws JavaModelException {
    ExternalJavaProject project = new ExternalJavaProject(classpath);
    IPackageFragment parent = ((PackageFragmentRoot) project.getPackageFragmentRoot(project.getProject())).getPackageFragment(CharOperation.NO_STRINGS);
    CompilationUnit result = new CompilationUnit((PackageFragment) parent, name, this);
    result.becomeWorkingCopy(getProblemRequestor(result), monitor);
    return result;
  }

}
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.