Package org.eclipse.jdt.core

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


   
    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

     
      if (input instanceof ICompilationUnit) {
        ICompilationUnit unit = (ICompilationUnit) input;
        synchronized (unit) {
          try {
            unit.reconcile(ICompilationUnit.NO_AST, false, null, null);
          }
          catch (JavaModelException x) {
            x.printStackTrace();
          }
View Full Code Here

     
      if (input instanceof ICompilationUnit) {
        ICompilationUnit unit = (ICompilationUnit) input;
        synchronized (unit) {
          try {
            unit.reconcile(ICompilationUnit.NO_AST, false, null, null);
          }
          catch (JavaModelException x) {
            x.printStackTrace();
          }
View Full Code Here

    if (unit != null) {
      try {
        if (reconcile) {
          synchronized (unit) {
            unit.reconcile(ICompilationUnit.NO_AST, false, null,
                null);
          }
          IJavaElement elementAt = unit.getElementAt(offset);
          if (elementAt != null) {
            return elementAt;
View Full Code Here

    if (unit != null) {
      try {
        if (reconcile) {
          synchronized (unit) {
            unit.reconcile(ICompilationUnit.NO_AST, false, null, null);
          }
          IJavaElement elementAt = unit.getElementAt(offset);
          if (elementAt != null) {
            return elementAt;
          }
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.