mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 09:25:31 +02:00
use setSelection(ICElement) in revealInEditor.
This commit is contained in:
parent
49b2c967a1
commit
7f50dfa6f3
1 changed files with 1 additions and 7 deletions
|
@ -102,13 +102,7 @@ public class EditorUtility {
|
|||
*/
|
||||
public static void revealInEditor(IEditorPart part, ICElement element) {
|
||||
if (element != null && part instanceof CEditor) {
|
||||
if (element instanceof ISourceReference) {
|
||||
try {
|
||||
ISourceRange range = ((ISourceReference) element).getSourceRange();
|
||||
((CEditor) part).setSelection(range, true);
|
||||
} catch (CModelException e) {
|
||||
}
|
||||
}
|
||||
((CEditor) part).setSelection(element);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue