Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBogdan Gheorghe2004-08-16 16:30:27 -0400
committerBogdan Gheorghe2004-08-16 16:30:27 -0400
commitae9f0a0e9a132f4dc2b2e114e4aa02da72fc557b (patch)
tree3749118cc1b98c55ebb553dc7bb0cc5f0c852c7b
parent9d31baf489e4d160904af576da881ebff4fb56a8 (diff)
downloadorg.eclipse.cdt-ae9f0a0e9a132f4dc2b2e114e4aa02da72fc557b.tar.gz
org.eclipse.cdt-ae9f0a0e9a132f4dc2b2e114e4aa02da72fc557b.tar.xz
org.eclipse.cdt-ae9f0a0e9a132f4dc2b2e114e4aa02da72fc557b.zip
Patch for Tanya Wolff: Fix for 70906: Duplicate entries in C/C++ preferences
-rw-r--r--core/org.eclipse.cdt.ui/ChangeLog5
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CEditorHoverConfigurationBlock.java12
2 files changed, 11 insertions, 6 deletions
diff --git a/core/org.eclipse.cdt.ui/ChangeLog b/core/org.eclipse.cdt.ui/ChangeLog
index 5ba00350d0e..55952c91bce 100644
--- a/core/org.eclipse.cdt.ui/ChangeLog
+++ b/core/org.eclipse.cdt.ui/ChangeLog
@@ -1,3 +1,8 @@
+2004-08-16 Tanya Wolff
+ Fix for 70906: Duplicate entries in C/C++ preferences
+
+ src/org.eclipse.cdt.internal.ui.preferences/CeditorHoverConfigurationBlock.java
+
2004-08-16 Bogdan Gheorghe
Fix for 70113: Search for Template member declarations causes Assertion
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CEditorHoverConfigurationBlock.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CEditorHoverConfigurationBlock.java
index 22f76b40fee..adddd18ab2f 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CEditorHoverConfigurationBlock.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CEditorHoverConfigurationBlock.java
@@ -374,19 +374,17 @@ public class CEditorHoverConfigurationBlock {
CEditorTextHoverDescriptor[] hoverDescriptors= CUIPlugin.getDefault().getCEditorTextHoverDescriptors();
// Move Best Match hover to front
- CEditorTextHoverDescriptor currentHover= hoverDescriptors[0];
+
boolean done= false;
for (int i= 0; !done && i < hoverDescriptors.length; i++) {
if (PreferenceConstants.ID_BESTMATCH_HOVER.equals(hoverDescriptors[i].getId())) {
// Swap with first one
+ CEditorTextHoverDescriptor tmpHover= hoverDescriptors[0];
hoverDescriptors[0]= hoverDescriptors[i];
- hoverDescriptors[i]= currentHover;
+ hoverDescriptors[i]= tmpHover;
return hoverDescriptors;
}
- if (i > 0) {
- currentHover= hoverDescriptors[i];
- hoverDescriptors[i]= hoverDescriptors[i-1];
- }
+
}
// return unchanged array if best match hover can't be found
@@ -451,8 +449,10 @@ public class CEditorHoverConfigurationBlock {
}
void performDefaults() {
+ fStatus= new StatusInfo();
restoreFromPreferences();
initializeFields();
+ updateStatus();
}
private void restoreFromPreferences() {

Back to the top