Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] ASM editor enhancements

Hello folks,

some colleagues suggested to me two improvements to the assembly editor
which are easily made and which I would like to put up for discussion:

1. The assembly editor does not display any status information like
current line number / column in the workbench's status bar. 

This is easily fixed by assigning an action contributor to the assembly
editor. Experimentally I assigned the CEditorActionContributor and it
works fine. Assigning the TextEditorActionContributor would work too.
The assignment is contained in the attached patch, pse look into it and
give comments.

2. My colleagues are working with the MIPS assembler where the ';' is
also a comment character. I suggest adding an EndOfLineRule which
identifies ';' as a comment-starting character. See the attached patch.

Anything I overlooked? Can I go ahead and make it an enhancement
request?

Greetings


Norbert
Index: D:/Projekt/RTP/Work3.1/org.eclipse.cdt.ui/src-cdtui/org/eclipse/cdt/internal/ui/editor/asm/AsmCodeScanner.java
===================================================================
--- D:/Projekt/RTP/Work3.1/org.eclipse.cdt.ui/src-cdtui/org/eclipse/cdt/internal/ui/editor/asm/AsmCodeScanner.java	(revision 103)
+++ D:/Projekt/RTP/Work3.1/org.eclipse.cdt.ui/src-cdtui/org/eclipse/cdt/internal/ui/editor/asm/AsmCodeScanner.java	(working copy)
@@ -84,6 +84,7 @@
 		
 		// Add rule for single line comments.
 		rules.add(new EndOfLineRule("#", token)); //$NON-NLS-1$
+		rules.add(new EndOfLineRule(";", token)); //$NON-NLS-1$
 		
 		token= getToken(ICColorConstants.C_STRING);
 		// Add rule for strings and character constants.
Index: D:/Projekt/RTP/Work3.1/org.eclipse.cdt.ui/plugin.xml
===================================================================
--- D:/Projekt/RTP/Work3.1/org.eclipse.cdt.ui/plugin.xml	(revision 103)
+++ D:/Projekt/RTP/Work3.1/org.eclipse.cdt.ui/plugin.xml	(working copy)
@@ -534,10 +534,11 @@
             <contentTypeBinding contentTypeId="org.eclipse.cdt.core.cSource"/>
       </editor>
       <editor
-            name="%AsmEditor.name"
+            class="org.eclipse.cdt.internal.ui.editor.asm.AsmTextEditor"
+            contributorClass="org.eclipse.cdt.internal.ui.editor.CEditorActionContributor"
             icon="icons/obj16/s_file_obj.gif"
-            class="org.eclipse.cdt.internal.ui.editor.asm.AsmTextEditor"
-            id="org.eclipse.cdt.ui.editor.asm.AsmEditor">
+            id="org.eclipse.cdt.ui.editor.asm.AsmEditor"
+            name="%AsmEditor.name">
             <contentTypeBinding contentTypeId="org.eclipse.cdt.core.asmSource"/>
       </editor>
       <editor

Back to the top