1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-06 15:55:47 +02:00

Fix for 66273: Opening declaration causes stack overflow

This commit is contained in:
Bogdan Gheorghe 2004-06-09 14:46:20 +00:00
parent de67e84c2f
commit 7f558ffc16

View file

@ -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;
} }