List of usage examples for org.eclipse.jdt.internal.core ReconcileWorkingCopyOperation PERF
boolean PERF
To view the source code for org.eclipse.jdt.internal.core ReconcileWorkingCopyOperation 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 w w. j a v a 2s . com*/ 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;//from w w w.ja va 2 s.c o m 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 ww . j a v a 2 s . 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; }
From source file:org.eclipse.jdt.internal.core.JavaModelManager.java
License:Open Source License
/** * Configure the plugin with respect to option settings defined in ".options" file *///from w w w. ja va 2 s .c o m public void configurePluginDebugOptions() { if (JavaCore.getPlugin().isDebugging()) { String option = Platform.getDebugOption(BUFFER_MANAGER_DEBUG); if (option != null) BufferManager.VERBOSE = option.equalsIgnoreCase(TRUE); option = Platform.getDebugOption(BUILDER_DEBUG); if (option != null) JavaBuilder.DEBUG = option.equalsIgnoreCase(TRUE); option = Platform.getDebugOption(COMPILER_DEBUG); if (option != null) Compiler.DEBUG = option.equalsIgnoreCase(TRUE); option = Platform.getDebugOption(BUILDER_STATS_DEBUG); if (option != null) JavaBuilder.SHOW_STATS = option.equalsIgnoreCase(TRUE); option = Platform.getDebugOption(COMPLETION_DEBUG); if (option != null) CompletionEngine.DEBUG = option.equalsIgnoreCase(TRUE); option = Platform.getDebugOption(CP_RESOLVE_DEBUG); if (option != null) JavaModelManager.CP_RESOLVE_VERBOSE = option.equalsIgnoreCase(TRUE); option = Platform.getDebugOption(CP_RESOLVE_ADVANCED_DEBUG); if (option != null) JavaModelManager.CP_RESOLVE_VERBOSE_ADVANCED = option.equalsIgnoreCase(TRUE); option = Platform.getDebugOption(CP_RESOLVE_FAILURE_DEBUG); if (option != null) JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE = option.equalsIgnoreCase(TRUE); option = Platform.getDebugOption(DELTA_DEBUG); if (option != null) DeltaProcessor.DEBUG = option.equalsIgnoreCase(TRUE); option = Platform.getDebugOption(DELTA_DEBUG_VERBOSE); if (option != null) DeltaProcessor.VERBOSE = option.equalsIgnoreCase(TRUE); option = Platform.getDebugOption(HIERARCHY_DEBUG); if (option != null) TypeHierarchy.DEBUG = option.equalsIgnoreCase(TRUE); option = Platform.getDebugOption(INDEX_MANAGER_DEBUG); if (option != null) JobManager.VERBOSE = option.equalsIgnoreCase(TRUE); option = Platform.getDebugOption(INDEX_MANAGER_ADVANCED_DEBUG); if (option != null) IndexManager.DEBUG = option.equalsIgnoreCase(TRUE); option = Platform.getDebugOption(JAVAMODEL_DEBUG); if (option != null) JavaModelManager.VERBOSE = option.equalsIgnoreCase(TRUE); option = Platform.getDebugOption(JAVAMODELCACHE_DEBUG); if (option != null) JavaModelCache.VERBOSE = option.equalsIgnoreCase(TRUE); option = Platform.getDebugOption(POST_ACTION_DEBUG); if (option != null) JavaModelOperation.POST_ACTION_VERBOSE = option.equalsIgnoreCase(TRUE); option = Platform.getDebugOption(RESOLUTION_DEBUG); if (option != null) NameLookup.VERBOSE = option.equalsIgnoreCase(TRUE); option = Platform.getDebugOption(SEARCH_DEBUG); if (option != null) BasicSearchEngine.VERBOSE = option.equalsIgnoreCase(TRUE); option = Platform.getDebugOption(SELECTION_DEBUG); if (option != null) SelectionEngine.DEBUG = option.equalsIgnoreCase(TRUE); option = Platform.getDebugOption(ZIP_ACCESS_DEBUG); if (option != null) JavaModelManager.ZIP_ACCESS_VERBOSE = option.equalsIgnoreCase(TRUE); option = Platform.getDebugOption(SOURCE_MAPPER_DEBUG_VERBOSE); if (option != null) SourceMapper.VERBOSE = option.equalsIgnoreCase(TRUE); option = Platform.getDebugOption(FORMATTER_DEBUG); if (option != null) DefaultCodeFormatter.DEBUG = option.equalsIgnoreCase(TRUE); } // configure performance options if (PerformanceStats.ENABLED) { CompletionEngine.PERF = PerformanceStats.isEnabled(COMPLETION_PERF); SelectionEngine.PERF = PerformanceStats.isEnabled(SELECTION_PERF); DeltaProcessor.PERF = PerformanceStats.isEnabled(DELTA_LISTENER_PERF); JavaModelManager.PERF_VARIABLE_INITIALIZER = PerformanceStats.isEnabled(VARIABLE_INITIALIZER_PERF); JavaModelManager.PERF_CONTAINER_INITIALIZER = PerformanceStats.isEnabled(CONTAINER_INITIALIZER_PERF); ReconcileWorkingCopyOperation.PERF = PerformanceStats.isEnabled(RECONCILE_PERF); } }