Community
Participate
Working Groups
There is a compilation warning for IndexManager when advanced features are enabled. The field containerPath is defined in an inherited type and an enclosing scope IndexManager.java org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing line 595 July 24, 2004 11:44:07 PM I'd suggest to apply the following patch to change parameter name in scheduleDocumentIndexing method or use explicit this.containerPath in line 595. Index: IndexManager.java =================================================================== RCS file: /home/eclipse/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/IndexManager.java,v retrieving revision 1.129 diff -u -r1.129 IndexManager.java --- IndexManager.java 21 Jul 2004 15:57:30 -0000 1.129 +++ IndexManager.java 25 Jul 2004 03:46:43 -0000 @@ -586,8 +586,8 @@ } this.needToSave = !allSaved; } -public void scheduleDocumentIndexing(final SearchDocument searchDocument, IPath containerPath, final String indexLocation, final SearchParticipant searchParticipant) { - request(new IndexRequest(containerPath, this) { +public void scheduleDocumentIndexing(final SearchDocument searchDocument, IPath contPath, final String indexLocation, final SearchParticipant searchParticipant) { + request(new IndexRequest(contPath, this) { public boolean execute(IProgressMonitor progressMonitor) { if (this.isCancelled || progressMonitor != null && progressMonitor.isCanceled()) return true;
I'm not seeing this warning. Which advanced feature did you enable ? Which build are you using ?
Currently I don't have this module around to verify, but it should be Java / Compiller/ Advanced / Local variable declaration hides another field. In this particular case it is even more confusing because there the same name is used in parent class as well as in inner class.
I have this warning turned on, but I'm not seeing any warning in IndexManager. What build number are you using ?
That is strange. I just checked out this module from the HEAD again and tot the same error: "The field containerPath is defined in an inherited type and an enclosing scope". I noticed that I had JRE 1.3 compliance level in global compiller settings. After changing compliance to JRE 1.4 and rebuild that error turns into "Unqualified access to the field IndexRequest.containerPath".
I see it now. Eclipse plugin are required to be compiled with 1.4 compliance level. That's why I didn't see it in the first place.
Changed parameter name to 'container'.
Verified in I200409240100.