mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-07 08:15:48 +02:00
Fix for 66273: Opening declaration causes stack overflow
This commit is contained in:
parent
de67e84c2f
commit
7f558ffc16
1 changed files with 12 additions and 12 deletions
|
@ -110,17 +110,17 @@ public class EditorUtility {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// private static IEditorPart openInEditor(IFile file, boolean activate) throws PartInitException {
|
private static IEditorPart openInEditor(IFile file, boolean activate) throws PartInitException {
|
||||||
// if (file != null) {
|
if (file != null) {
|
||||||
// IWorkbenchPage p= CUIPlugin.getActivePage();
|
try {
|
||||||
// if (p != null) {
|
IEditorInput input = getEditorInput(file);
|
||||||
// IEditorPart editorPart = IDE.openEditor(p, file, activate);
|
if (input != null) {
|
||||||
// initializeHighlightRange(editorPart);
|
return openInEditor(input, getEditorID(input, file), activate);
|
||||||
// return editorPart;
|
}
|
||||||
// }
|
} catch (CModelException e) {}
|
||||||
// }
|
}
|
||||||
// return null;
|
return null;
|
||||||
// }
|
}
|
||||||
|
|
||||||
private static IEditorPart openInEditor(IEditorInput input, String editorID, boolean activate) throws PartInitException {
|
private static IEditorPart openInEditor(IEditorInput input, String editorID, boolean activate) throws PartInitException {
|
||||||
if (input != null) {
|
if (input != null) {
|
||||||
|
@ -265,7 +265,7 @@ public class EditorUtility {
|
||||||
public static String getEditorID(IEditorInput input, Object inputObject) {
|
public static String getEditorID(IEditorInput input, Object inputObject) {
|
||||||
String ID = getEditorID(input.getName());
|
String ID = getEditorID(input.getName());
|
||||||
|
|
||||||
if (!"org.eclipse.ui.DefaultTextEditor".equals(ID)) { // $NON-NLS-1$
|
if (!"org.eclipse.ui.DefaultTextEditor".equals(ID)) { //$NON-NLS-1$
|
||||||
return ID;
|
return ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue