Package org.eclipse.jdt.core

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


        // 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
      if (selectedElement.getNodeType() == BodyDeclaration.TYPE_DECLARATION) {
View Full Code Here


    if (groupingEdit != null){
      JavaModelUtil.applyEdit(src, groupingEdit, true, null);
    }

    if (src.isWorkingCopy()) {
      src.commitWorkingCopy(false, null);
    }

    if (edits.getOffset() < offset){
      offset += src.getBuffer().getLength() - oldLength;
    }
View Full Code Here

    }

    if (edit != null){
      JavaModelUtil.applyEdit(src, edit, true, null);
      if (src.isWorkingCopy()) {
        src.commitWorkingCopy(false, null);
      }
    }

    // our own support for grouping imports based on package levels.
    TextEdit groupingEdit = ImportUtils.importGroupingEdit(src, getPreferences());
View Full Code Here

      if (edit == null){
        edit = groupingEdit;
      }
      JavaModelUtil.applyEdit(src, groupingEdit, true, null);
      if (src.isWorkingCopy()) {
        src.commitWorkingCopy(false, null);
      }
    }

    if (edit != null){
      if (edit.getOffset() < offset){
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.