Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 326570 - Hide remote indexer for local projects
Summary: Hide remote indexer for local projects
Status: RESOLVED FIXED
Alias: None
Product: PTP
Classification: Tools
Component: RDT (show other bugs)
Version: 4.0.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 4.0.4   Edit
Assignee: Vivian Kong CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-29 14:17 EDT by Vivian Kong CLA
Modified: 2010-09-29 14:28 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vivian Kong CLA 2010-09-29 14:17:50 EDT
The remote indexer is available in the indexer properties page for local projects. There is no service model configuration for local projects so the remote indexer won't work.

When switching to the remote indexer and clicking OK on the properties page an error dialog immediately pops up. The following shows up in the error log:

An internal error occurred during: "C/C++ Indexer".
org.eclipse.ptp.rdt.services.core.ProjectNotConfiguredException
	at org.eclipse.ptp.rdt.services.core.ServiceModelManager.getConf(Unknown Source)
	at org.eclipse.ptp.rdt.services.core.ServiceModelManager.getActiveConfiguration(Unknown Source)
	at org.eclipse.ptp.internal.rdt.core.index.RemoteFastIndexer.createTask(Unknown Source)
	at org.eclipse.cdt.internal.core.pdom.indexer.PDOMRebuildTask.createDelegate(Unknown Source)
	at org.eclipse.cdt.internal.core.pdom.indexer.PDOMRebuildTask.run(Unknown Source)
	at org.eclipse.cdt.internal.core.pdom.PDOMIndexerJob.run(Unknown Source)
	at org.eclipse.core.internal.jobs.Worker.run(Unknown Source)


The remote indexer should not be available as an option for local projects.
Comment 1 Vivian Kong CLA 2010-09-29 14:19:32 EDT
Here's the proposed patch:

### Eclipse Workspace Patch 1.0
#P org.eclipse.ptp.rdt.ui
Index: src/org/eclipse/ptp/internal/rdt/ui/preferences/IndexerBlock.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.ptp/rdt/org.eclipse.ptp.rdt.ui/src/org/eclipse/ptp/internal/rdt/ui/preferences/IndexerBlock.java,v
retrieving revision 1.2.2.1
diff -u -r1.2.2.1 IndexerBlock.java
--- src/org/eclipse/ptp/internal/rdt/ui/preferences/IndexerBlock.java	9 Aug 2010 17:47:35 -0000	1.2.2.1
+++ src/org/eclipse/ptp/internal/rdt/ui/preferences/IndexerBlock.java	29 Sep 2010 18:19:08 -0000
@@ -455,7 +455,9 @@
                 				fIndexerConfigMap.put(id, config);
                 			}
                 		} else {
-                			fIndexerConfigMap.put(id, config);
+                			if (!(id.startsWith("org.eclipse.ptp.rdt.core.RemoteFastIndexer"))) { //$NON-NLS-1$ 
+                				fIndexerConfigMap.put(id, config);
+                			}
                 		}
                 	}
                 }
Comment 2 Vivian Kong CLA 2010-09-29 14:28:22 EDT
Fixed in ptp_4_0 and HEAD