Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 225343 Details for
Bug 395897
INDEX_LOCATION_ATTRIBUTE_NAME attribute value is ignored when the index is rebuilt
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
updated patch
eclipse.jdt.core.patch (text/plain), 3.50 KB, created by
Troy Bishop
on 2013-01-08 10:07:18 EST
(
hide
)
Description:
updated patch
Filename:
MIME Type:
Creator:
Troy Bishop
Created:
2013-01-08 10:07:18 EST
Size:
3.50 KB
patch
obsolete
>diff --git a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/IndexManager.java b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/IndexManager.java >index d130e0f..bfd7fb1 100644 >--- a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/IndexManager.java >+++ b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/IndexManager.java >@@ -20,6 +20,7 @@ > import org.eclipse.core.runtime.IProgressMonitor; > import org.eclipse.core.runtime.OperationCanceledException; > import org.eclipse.core.runtime.Path; >+import org.eclipse.core.runtime.Platform; > import org.eclipse.jdt.core.*; > import org.eclipse.jdt.core.compiler.CharOperation; > import org.eclipse.jdt.core.search.*; >@@ -70,6 +71,24 @@ > // Debug > public static boolean DEBUG = false; > >+ /** Product property to indicate that JDT should manage (i.e. update) indexes that are provided by a product */ >+ private final static String JDT_UPDATE_PRODUCT_INDEXES = "JDT_UPDATE_PRODUCT_INDEXES"; //$NON-NLS-1$ >+ private final boolean manageUserIndexes; >+ >+ /** >+ * Constructor for a new {@link IndexManager} >+ */ >+ public IndexManager() { >+ >+ super(); >+ String manageIndexPropertyValue = Platform.getProduct().getProperty(IndexManager.JDT_UPDATE_PRODUCT_INDEXES); >+ if (manageIndexPropertyValue != null) { >+ this.manageUserIndexes = Boolean.valueOf(manageIndexPropertyValue).booleanValue(); >+ } else { >+ this.manageUserIndexes = false; >+ } >+ } >+ > public synchronized void aboutToUpdateIndex(IPath containerPath, Integer newIndexState) { > // newIndexState is either UPDATING_STATE or REBUILDING_STATE > // must tag the index as inconsistent, in case we exit before the update job is started >@@ -273,8 +292,10 @@ > // supposed to be in reuse state but error in the index file, so reindex. > if (VERBOSE) > Util.verbose("-> cannot reuse given index: "+indexLocation+" path: "+containerPathString); //$NON-NLS-1$ //$NON-NLS-2$ >- this.indexLocations.put(containerPath, null); >- indexLocation = computeIndexLocation(containerPath); >+ if(!this.manageUserIndexes) { >+ this.indexLocations.put(containerPath, null); >+ indexLocation = computeIndexLocation(containerPath); >+ } > rebuildIndex(indexLocation, containerPath); > return null; > } >@@ -519,16 +540,21 @@ > } > > synchronized boolean addIndex(IPath containerPath, IndexLocation indexFile) { >- getIndexStates().put(indexFile, REUSE_STATE); >- this.indexLocations.put(containerPath, indexFile); >- Index index = getIndex(containerPath, indexFile, true, false); >- if (index == null) { >- indexFile.close(); >- this.indexLocations.put(containerPath, null); >- return false; >+ >+ boolean result = false; >+ if(!this.manageUserIndexes) { >+ getIndexStates().put(indexFile, REUSE_STATE); >+ this.indexLocations.put(containerPath, indexFile); >+ Index index = getIndex(containerPath, indexFile, true, false); >+ if (index == null) { >+ indexFile.close(); >+ this.indexLocations.put(containerPath, null); >+ return false; >+ } >+ writeIndexMapFile(); >+ result = true; > } >- writeIndexMapFile(); >- return true; >+ return result; > } > > /** >@@ -920,7 +946,9 @@ > for (int i = 1, l = names.length-1 ; i < l ; i+=2) { > IndexLocation indexPath = IndexLocation.createIndexLocation(new URL(new String(names[i]))); > this.indexLocations.put(new Path(new String(names[i+1])), indexPath ); >- this.indexStates.put(indexPath, REUSE_STATE); >+ if(!this.manageUserIndexes) { >+ this.indexStates.put(indexPath, REUSE_STATE); >+ } > } > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 395897
:
224383
|
225343
|
225398
|
225796
|
225915
|
225923
|
225953
|
226433
|
227564
|
227624
|
228741
|
228742
|
228901
|
228976
|
228994
|
229073
|
229088
|
229091
|
229146
|
229157