[nobug] add Indexer tracing
diff --git a/core/bundles/org.eclipse.wst.sse.core/.options b/core/bundles/org.eclipse.wst.sse.core/.options index 301e069..e336361 100644 --- a/core/bundles/org.eclipse.wst.sse.core/.options +++ b/core/bundles/org.eclipse.wst.sse.core/.options
@@ -5,6 +5,8 @@ org.eclipse.wst.sse.core/filebuffers/modelmanagement=false org.eclipse.wst.sse.core/filebuffers/leaks=true org.eclipse.wst.sse.core/filebuffers/lifecycle=false +org.eclipse.wst.sse.core/index=false +org.eclipse.wst.sse.core/index/lifecycle=false org.eclipse.wst.sse.core/structuredmodel/lifecycle=false org.eclipse.wst.sse.core/structuredmodel/state=false org.eclipse.wst.sse.core/structuredmodel/locks=true
diff --git a/core/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/indexing/AbstractIndexManager.java b/core/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/indexing/AbstractIndexManager.java index 12a48ed..42c541e 100644 --- a/core/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/indexing/AbstractIndexManager.java +++ b/core/bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/indexing/AbstractIndexManager.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2018 IBM Corporation and others. + * Copyright (c) 2010, 2021 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -44,6 +44,7 @@ import org.eclipse.core.runtime.ISafeRunnable; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Path; +import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.SafeRunner; import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.SubMonitor; @@ -143,6 +144,9 @@ /** A {@link Job} to search the workspace for all files */ private Job fWorkspaceVisitorJob; + private static final boolean DEBUG = Platform.getDebugBoolean("org.eclipse.wst.sse.core/index"); + private static final boolean DEBUG_LIFECYCLE = Platform.getDebugBoolean("org.eclipse.wst.sse.core/index/lifecycle"); + /** * <p> * Current state of the manager @@ -291,7 +295,9 @@ } } else { - Logger.log(Logger.INFO_DEBUG, "Fully reindexing for " + getClass().getName()); + if (DEBUG_LIFECYCLE && DEBUG) { + Logger.log(Logger.INFO_DEBUG, "Fully reindexing for " + getClass().getName()); + } } progress.worked(1); @@ -1196,7 +1202,9 @@ }// end is file else if (resource.getType() == IResource.PROJECT) { if ((delta.getFlags() & IResourceDelta.OPEN) != 0 && ((IProject) resource).isOpen()) { - Logger.log(Logger.INFO_DEBUG, "Indexing project " + resource.getName() + " for " + AbstractIndexManager.this.getName()); + if (DEBUG_LIFECYCLE && DEBUG) { + Logger.log(Logger.INFO_DEBUG, "Indexing project " + resource.getName() + " for " + AbstractIndexManager.this.getName()); + } new ResourceVisitorJob(delta.getResource()).schedule(); } }