From a59a690bb97a069344b1594ab6ee5702715a5e67 Mon Sep 17 00:00:00 2001 From: Bogdan Gheorghe Date: Thu, 9 Sep 2004 20:21:45 +0000 Subject: [PATCH] Fix for 73406: Double Indexing On Specific Project --- core/org.eclipse.cdt.ui/ChangeLog | 5 +++++ .../eclipse/cdt/ui/dialogs/IndexerOptionPropertyPage.java | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/core/org.eclipse.cdt.ui/ChangeLog b/core/org.eclipse.cdt.ui/ChangeLog index e0b290801c2..0f152291aca 100644 --- a/core/org.eclipse.cdt.ui/ChangeLog +++ b/core/org.eclipse.cdt.ui/ChangeLog @@ -1,3 +1,8 @@ +2004-09-09 Bogdan Gheorghe + Fix for 73406: Double Indexing On Specific Project + * src/org/eclipse/cdt/ui/dialogs/IndexerOptionPropertyPage.java + + 2004-09-08 Alain Magloire Fix for PR 73459 diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/IndexerOptionPropertyPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/IndexerOptionPropertyPage.java index fa2187666dd..728dec1c74b 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/IndexerOptionPropertyPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/IndexerOptionPropertyPage.java @@ -32,10 +32,12 @@ public class IndexerOptionPropertyPage extends PropertyPage { private IndexerOptionDialogPage optionPage; private boolean oldIndexerValue; private int oldIndexerProblemsValue; + private boolean requestedIndexAll; public IndexerOptionPropertyPage(){ super(); optionPage = new IndexerOptionDialogPage(); + requestedIndexAll = false; } /* (non-Javadoc) * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite) @@ -91,10 +93,12 @@ public class IndexerOptionPropertyPage extends PropertyPage { CCorePlugin.getDefault().getCoreModel().getIndexManager().removeIndexerProblems(tempProject); //if indexer is now on send a index all request - if( indexChanged && newIndexerValue ) + if( indexChanged && newIndexerValue && !requestedIndexAll ) { CCorePlugin.getDefault().getCoreModel().getIndexManager().indexAll(tempProject); - else if( indexChanged && !newIndexerValue ) + requestedIndexAll = true; + } else if( indexChanged && !newIndexerValue ){ CCorePlugin.getDefault().getCoreModel().getIndexManager().discardJobs( tempProject.getName() ); + } } return true; }