List of usage examples for org.eclipse.jdt.internal.core JavaModelManager RECONCILE_PERF
String RECONCILE_PERF
To view the source code for org.eclipse.jdt.internal.core JavaModelManager RECONCILE_PERF.
Click Source Link
From source file:org.codehaus.jdt.groovy.model.GroovyCompilationUnit.java
License:Open Source License
@Override public org.eclipse.jdt.core.dom.CompilationUnit reconcile(int astLevel, int reconcileFlags, WorkingCopyOwner workingCopyOwner, IProgressMonitor monitor) throws JavaModelException { if (!isWorkingCopy()) return null; // Reconciling is not supported on non working copies if (workingCopyOwner == null) workingCopyOwner = DefaultWorkingCopyOwner.PRIMARY; PerformanceStats stats = null;// w ww . j a va2 s.co m if (ReconcileWorkingCopyOperation.PERF) { stats = PerformanceStats.getStats(JavaModelManager.RECONCILE_PERF, this); stats.startRun(new String(this.getFileName())); } ReconcileWorkingCopyOperation op = new GroovyReconcileWorkingCopyOperation(this, astLevel, reconcileFlags, workingCopyOwner); JavaModelManager manager = JavaModelManager.getJavaModelManager(); try { manager.cacheZipFiles(this); // cache zip files for performance (see // https://bugs.eclipse.org/bugs/show_bug.cgi?id=134172) op.runOperation(monitor); } finally { manager.flushZipFiles(this); } if (ReconcileWorkingCopyOperation.PERF) { stats.endRun(); } return op.ast; }
From source file:org.eclipse.ajdt.core.javaelements.AJCompilationUnit.java
License:Open Source License
public org.eclipse.jdt.core.dom.CompilationUnit reconcile(int astLevel, int reconcileFlags, WorkingCopyOwner workingCopyOwner, IProgressMonitor monitor) throws JavaModelException { if (!isWorkingCopy()) return null; // Reconciling is not supported on non working copies if (workingCopyOwner == null) workingCopyOwner = AJWorkingCopyOwner.INSTANCE; PerformanceStats stats = null;// ww w .j av a2s .c om if (ReconcileWorkingCopyOperation.PERF) { stats = PerformanceStats.getStats(JavaModelManager.RECONCILE_PERF, this); stats.startRun(new String(this.getFileName())); } AJReconcileWorkingCopyOperation op = new AJReconcileWorkingCopyOperation(this, astLevel, reconcileFlags, workingCopyOwner); try { // Eclipse 3.5.1 and 3.5.2 have different signatures for this method cacheZipFiles(); // cache zip files for performance (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=134172) op.runOperation(monitor); } finally { flushZipFiles(); } if (ReconcileWorkingCopyOperation.PERF) { stats.endRun(); } return op.ast; }
From source file:org.eclipse.jdt.internal.core.CompilationUnit.java
License:Open Source License
public org.eclipse.jdt.core.dom.CompilationUnit reconcile(int astLevel, int reconcileFlags, WorkingCopyOwner workingCopyOwner, IProgressMonitor monitor) throws JavaModelException { if (!isWorkingCopy()) return null; // Reconciling is not supported on non working copies if (workingCopyOwner == null) workingCopyOwner = DefaultWorkingCopyOwner.PRIMARY; PerformanceStats stats = null;//from w w w . j a va 2s . c om if (ReconcileWorkingCopyOperation.PERF) { stats = PerformanceStats.getStats(JavaModelManager.RECONCILE_PERF, this); stats.startRun(new String(getFileName())); } ReconcileWorkingCopyOperation op = new ReconcileWorkingCopyOperation(this, astLevel, reconcileFlags, workingCopyOwner); JavaModelManager manager = JavaModelManager.getJavaModelManager(); try { manager.cacheZipFiles(this); // cache zip files for performance (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=134172) op.runOperation(monitor); } finally { manager.flushZipFiles(this); } if (ReconcileWorkingCopyOperation.PERF) { stats.endRun(); } return op.ast; }