Lines 374-392
Link Here
|
374 |
CEditorTextHoverDescriptor[] hoverDescriptors= CUIPlugin.getDefault().getCEditorTextHoverDescriptors(); |
374 |
CEditorTextHoverDescriptor[] hoverDescriptors= CUIPlugin.getDefault().getCEditorTextHoverDescriptors(); |
375 |
|
375 |
|
376 |
// Move Best Match hover to front |
376 |
// Move Best Match hover to front |
377 |
CEditorTextHoverDescriptor currentHover= hoverDescriptors[0]; |
377 |
|
378 |
boolean done= false; |
378 |
boolean done= false; |
379 |
for (int i= 0; !done && i < hoverDescriptors.length; i++) { |
379 |
for (int i= 0; !done && i < hoverDescriptors.length; i++) { |
380 |
if (PreferenceConstants.ID_BESTMATCH_HOVER.equals(hoverDescriptors[i].getId())) { |
380 |
if (PreferenceConstants.ID_BESTMATCH_HOVER.equals(hoverDescriptors[i].getId())) { |
381 |
// Swap with first one |
381 |
// Swap with first one |
|
|
382 |
CEditorTextHoverDescriptor tmpHover= hoverDescriptors[0]; |
382 |
hoverDescriptors[0]= hoverDescriptors[i]; |
383 |
hoverDescriptors[0]= hoverDescriptors[i]; |
383 |
hoverDescriptors[i]= currentHover; |
384 |
hoverDescriptors[i]= tmpHover; |
384 |
return hoverDescriptors; |
385 |
return hoverDescriptors; |
385 |
} |
386 |
} |
386 |
if (i > 0) { |
387 |
|
387 |
currentHover= hoverDescriptors[i]; |
|
|
388 |
hoverDescriptors[i]= hoverDescriptors[i-1]; |
389 |
} |
390 |
} |
388 |
} |
391 |
|
389 |
|
392 |
// return unchanged array if best match hover can't be found |
390 |
// return unchanged array if best match hover can't be found |
Lines 451-458
Link Here
|
451 |
} |
449 |
} |
452 |
|
450 |
|
453 |
void performDefaults() { |
451 |
void performDefaults() { |
|
|
452 |
fStatus= new StatusInfo(); |
454 |
restoreFromPreferences(); |
453 |
restoreFromPreferences(); |
455 |
initializeFields(); |
454 |
initializeFields(); |
|
|
455 |
updateStatus(); |
456 |
} |
456 |
} |
457 |
|
457 |
|
458 |
private void restoreFromPreferences() { |
458 |
private void restoreFromPreferences() { |