From bca745ef201b43f82db90c0ec6645538b21e1b26 Mon Sep 17 00:00:00 2001 From: Alain Magloire Date: Mon, 23 Aug 2004 00:20:58 +0000 Subject: [PATCH] 2004-08-21 Alain Magloire Hardcode The CEditor id and the ASM id for the CView openEditor. * src/org/eclipse/cdt/internal/ui/util/EditorUtility.java * plugin.xml --- core/org.eclipse.cdt.ui/ChangeLog | 8 ++++++++ core/org.eclipse.cdt.ui/plugin.xml | 4 ++-- .../eclipse/cdt/internal/ui/util/EditorUtility.java | 10 +++++++--- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/core/org.eclipse.cdt.ui/ChangeLog b/core/org.eclipse.cdt.ui/ChangeLog index 5e5d254482c..adb8f1ca0e5 100644 --- a/core/org.eclipse.cdt.ui/ChangeLog +++ b/core/org.eclipse.cdt.ui/ChangeLog @@ -1,3 +1,11 @@ +2004-08-21 Alain Magloire + + Hardcode The CEditor id and the ASM id for the + CView openEditor. + + * src/org/eclipse/cdt/internal/ui/util/EditorUtility.java + * plugin.xml + 2004-08-21 Alain Magloire Fix for 69756 diff --git a/core/org.eclipse.cdt.ui/plugin.xml b/core/org.eclipse.cdt.ui/plugin.xml index f5538b57efc..bfd88dc0a49 100644 --- a/core/org.eclipse.cdt.ui/plugin.xml +++ b/core/org.eclipse.cdt.ui/plugin.xml @@ -363,7 +363,7 @@ diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/EditorUtility.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/EditorUtility.java index b35b2edf706..d0eba9d1b1c 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/EditorUtility.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/EditorUtility.java @@ -161,7 +161,7 @@ public class EditorUtility { private static void closedProject(IProject project) { MessageBox errorMsg = new MessageBox(CUIPlugin.getActiveWorkbenchShell(), SWT.ICON_ERROR | SWT.OK); errorMsg.setText(CUIPlugin.getResourceString("EditorUtility.closedproject")); //$NON-NLS-1$ - String desc= CUIPlugin.getResourceString("Editorutility.closedproject.description"); + String desc= CUIPlugin.getResourceString("Editorutility.closedproject.description"); //$NON-NLS-1$ errorMsg.setMessage (MessageFormat.format(desc, new Object[]{project.getName()})); //$NON-NLS-1$ errorMsg.open(); @@ -337,9 +337,13 @@ public class EditorUtility { // Choose an a file base on the extension. if (tunit != null) { if (tunit.isCLanguage()) { - return getEditorID("No_ExIsTeNt_FiLe.c");//$NON-NLS-1$ + return "org.eclipse.cdt.ui.editor.CEditor"; //$NON-NLS-1$ + //return getEditorID("No_ExIsTeNt_FiLe.c");//$NON-NLS-1$ } else if (tunit.isCXXLanguage()) { - return getEditorID("No_ExIsTeNt_FiLe.cpp");//$NON-NLS-1$ + return "org.eclipse.cdt.ui.editor.CEditor"; //$NON-NLS-1$ + //return getEditorID("No_ExIsTeNt_FiLe.cpp");//$NON-NLS-1$ + } else if (tunit.isASMLanguage()) { + return "org.eclipse.cdt.ui.editor.asm.AsmEditor"; //$NON-NLS-1$ } }