[fedora-java] Patch: Automake Editor (just Makefile editor for now)

Andrew Overholt overholt at redhat.com
Fri Dec 1 18:45:46 UTC 2006


Hi Jeff,

Attached is a patch to add an automake editor extension to the autotools
plugin.  It is just a re-use of the CDT's existing Makefile editor for
now, but it at least gives us syntax highlighting :)

Okay to commit?

Thanks,

Andrew

2006-12-01  Andrew Overholt  <overholt at redhat.com>

	* src/com/redhat/eclipse/cdt/autotools/editors/automake: New directory.
	* src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeEditor.java:
	New file.  Simple extension of MakefileEditor for now.
	* plugin.xml: Add automake editor.
-------------- next part --------------
### Eclipse Workspace Patch 1.0
#P com.redhat.eclipse.cdt.autotools
Index: plugin.xml
===================================================================
RCS file: /cvs/eclipse/autotools/com.redhat.eclipse.cdt.autotools/plugin.xml,v
retrieving revision 1.20
diff -u -r1.20 plugin.xml
--- plugin.xml	29 Nov 2006 23:01:34 -0000	1.20
+++ plugin.xml	1 Dec 2006 18:42:11 -0000
@@ -658,6 +658,19 @@
             id="com.redhat.eclipse.cdt.autotools.editor.autoconf"
             name="%Autoconf.editor.name"/>
    </extension>
+      <extension
+         id="org.eclipse.cdt.make.editor"
+         name="MakefileEditor"
+         point="org.eclipse.ui.editors">
+      <editor
+            name="AutomakeEditor"
+            icon="icons/sample.gif"
+            contributorClass="org.eclipse.cdt.make.internal.ui.editor.MakefileEditorActionContributor"
+            class="com.redhat.eclipse.cdt.autotools.editors.automake.AutomakeEditor"
+            id="com.redhat.eclipse.cdt.autotools.editors.AutomakeEditor">
+            <contentTypeBinding contentTypeId="com.redhat.eclipse.cdt.autotools.automake"/>
+      </editor>
+   </extension>
    <extension
          point="org.eclipse.ui.contexts">
       <context
@@ -686,5 +699,16 @@
             id="com.redhat.eclipse.cdt.autotools.ui.editors.text.show.tooltip"
             name="%ShowTooltip.name"/>
    </extension>
-
+  <extension point="org.eclipse.core.runtime.contentTypes">
+	  <!-- declares a content type for automake files -->
+	  <content-type id="com.redhat.eclipse.cdt.autotools.automake" name="automake" 
+		  base-type="org.eclipse.core.runtime.text"
+		  priority="high"/>
+  </extension>
+   <extension point="org.eclipse.core.runtime.contentTypes"> 
+      <file-association 
+       content-type="com.redhat.eclipse.cdt.autotools.automake"
+       file-names="Makefile.am"
+       file-extensions="am"/>
+   </extension> 
 </plugin>
Index: src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeEditor.java
===================================================================
RCS file: src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeEditor.java
diff -N src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeEditor.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ src/com/redhat/eclipse/cdt/autotools/editors/automake/AutomakeEditor.java	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,7 @@
+package com.redhat.eclipse.cdt.autotools.editors.automake;
+
+import org.eclipse.cdt.make.internal.ui.editor.MakefileEditor;
+
+public class AutomakeEditor extends MakefileEditor {
+
+}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.fedoraproject.org/pipermail/java-devel/attachments/20061201/3b38b905/attachment.bin 


More information about the java-devel mailing list