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
|
2004-08-16 Bogdan Gheorghe
|
||||||
Fix for 70113: Search for Template member declarations causes Assertion
|
Fix for 70113: Search for Template member declarations causes Assertion
|
||||||
|
|
||||||
|
|
|
@ -374,19 +374,17 @@ public class CEditorHoverConfigurationBlock {
|
||||||
CEditorTextHoverDescriptor[] hoverDescriptors= CUIPlugin.getDefault().getCEditorTextHoverDescriptors();
|
CEditorTextHoverDescriptor[] hoverDescriptors= CUIPlugin.getDefault().getCEditorTextHoverDescriptors();
|
||||||
|
|
||||||
// Move Best Match hover to front
|
// Move Best Match hover to front
|
||||||
CEditorTextHoverDescriptor currentHover= hoverDescriptors[0];
|
|
||||||
boolean done= false;
|
boolean done= false;
|
||||||
for (int i= 0; !done && i < hoverDescriptors.length; i++) {
|
for (int i= 0; !done && i < hoverDescriptors.length; i++) {
|
||||||
if (PreferenceConstants.ID_BESTMATCH_HOVER.equals(hoverDescriptors[i].getId())) {
|
if (PreferenceConstants.ID_BESTMATCH_HOVER.equals(hoverDescriptors[i].getId())) {
|
||||||
// Swap with first one
|
// Swap with first one
|
||||||
|
CEditorTextHoverDescriptor tmpHover= hoverDescriptors[0];
|
||||||
hoverDescriptors[0]= hoverDescriptors[i];
|
hoverDescriptors[0]= hoverDescriptors[i];
|
||||||
hoverDescriptors[i]= currentHover;
|
hoverDescriptors[i]= tmpHover;
|
||||||
return hoverDescriptors;
|
return hoverDescriptors;
|
||||||
}
|
}
|
||||||
if (i > 0) {
|
|
||||||
currentHover= hoverDescriptors[i];
|
|
||||||
hoverDescriptors[i]= hoverDescriptors[i-1];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// return unchanged array if best match hover can't be found
|
// return unchanged array if best match hover can't be found
|
||||||
|
@ -451,8 +449,10 @@ public class CEditorHoverConfigurationBlock {
|
||||||
}
|
}
|
||||||
|
|
||||||
void performDefaults() {
|
void performDefaults() {
|
||||||
|
fStatus= new StatusInfo();
|
||||||
restoreFromPreferences();
|
restoreFromPreferences();
|
||||||
initializeFields();
|
initializeFields();
|
||||||
|
updateStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void restoreFromPreferences() {
|
private void restoreFromPreferences() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue