mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Patch for Tanya Wolff: Fix for 70906: Duplicate entries in C/C++ preferences
This commit is contained in:
parent
9d31baf489
commit
ae9f0a0e9a
2 changed files with 11 additions and 6 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Add table
Reference in a new issue