basic setup for auxiliary project "jEdit", with full sources, debugging, profiling;
authorwenzelm
Sat, 22 Nov 2008 00:51:27 +0100
changeset 34381 a94d2fb96fd5
parent 34380 b74b5e0ff66a
child 34382 89a7f3906869
basic setup for auxiliary project "jEdit", with full sources, debugging, profiling;
src/Tools/jEdit/README_BUILD
src/Tools/jEdit/contrib/jEdit/build-nb.xml
src/Tools/jEdit/contrib/jEdit/nbproject/project.xml
src/Tools/jEdit/nbproject/build-impl.xml
src/Tools/jEdit/nbproject/genfiles.properties
src/Tools/jEdit/nbproject/project.properties
src/Tools/jEdit/nbproject/project.xml
--- a/src/Tools/jEdit/README_BUILD	Wed Nov 19 20:51:27 2008 +0100
+++ b/src/Tools/jEdit/README_BUILD	Sat Nov 22 00:51:27 2008 +0100
@@ -13,10 +13,15 @@
   http://wiki.netbeans.org/Scala
   http://plugins.netbeans.org/PluginPortal/faces/PluginDetailPage.jsp?pluginid=11854
 
-* jEdit 4.3pre14 or similar
+* jEdit 4.3pre16 or similar
   http://www.jedit.org/
+
   Netbeans Library "jEdit" = .../jedit.jar
 
+  or
+
+  Netbeans Project "jEdit" (see below)
+
 * Flying Saucer XHTML renderer
   https://xhtmlrenderer.dev.java.net/
   Netbeans Library "Flying-Saucer" = .../core-renderer.jar
@@ -25,6 +30,14 @@
   Netbeans Library "Isabelle-Pure" = ~~/lib/classes/Pure.jar
 
 
+Auxiliary projects
+==================
+
+* project "jEdit"
+  . unpack official sources .../jEdit
+  . add content of ./contrib/jEdit
+
+
 Running the application within Netbeans
 =======================================
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/Tools/jEdit/contrib/jEdit/build-nb.xml	Sat Nov 22 00:51:27 2008 +0100
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="jEdit">
+    <import file="./build.xml"/>
+    <property environment="env"/>
+    
+    <target name="run" depends="compile">
+        <java classname="org.gjt.sp.jedit.jEdit" classpath="./build/jEdit.jar" dir="./" fork="true">
+          <arg value="-noserver"/>
+          <arg value="-nobackground"/>
+          <arg value="-settings=${env.ISABELLE_HOME_USER}/jedit"/>
+        </java>
+    </target>
+    
+    <target name="debug-nb" depends="compile">
+        <path id="cp" location="./build/jEdit.jar" />
+        
+        <nbjpdastart addressproperty="jpda.address" name="jEdit" transport="dt_socket">
+            <classpath refid="cp"/>
+        </nbjpdastart>
+        
+        <java classname="org.gjt.sp.jedit.jEdit" classpathref="cp" fork="true" dir="./">
+            <jvmarg value="-Xdebug"/>
+            <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
+        </java>
+    </target>
+    
+    <target name="profile-nb" depends="compile">
+        <fail unless="netbeans.home">This target can only run inside the NetBeans IDE.</fail>
+        
+        <path id="cp" location="./build/jEdit.jar" />
+        
+        <nbprofiledirect>
+            <classpath refid="cp"/>
+        </nbprofiledirect>
+        
+        <java classname="org.gjt.sp.jedit.jEdit" fork="true" logError="yes" dir="." classpathref="cp">
+            <classpath refid="cp"/>
+            <jvmarg value="${profiler.info.jvmargs.agent}"/>
+        </java>
+    </target>
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/Tools/jEdit/contrib/jEdit/nbproject/project.xml	Sat Nov 22 00:51:27 2008 +0100
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://www.netbeans.org/ns/project/1">
+    <type>org.netbeans.modules.ant.freeform</type>
+    <configuration>
+        <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1">
+            <name>jEdit</name>
+        </general-data>
+        <general-data xmlns="http://www.netbeans.org/ns/freeform-project/2">
+            <!-- Do not use Project Properties customizer when editing this file manually. -->
+            <name>jEdit</name>
+            <properties>
+                <property name="ant.script">build-nb.xml</property>
+            </properties>
+            <folders>
+                <source-folder>
+                    <label>jEdit</label>
+                    <location>.</location>
+                    <encoding>UTF-8</encoding>
+                </source-folder>
+                <source-folder>
+                    <label>Source Packages</label>
+                    <type>java</type>
+                    <location>.</location>
+                    <excludes>build/** doc/** icons/** macros/** modes/** package-files/**</excludes>
+                    <encoding>UTF-8</encoding>
+                </source-folder>
+            </folders>
+            <ide-actions>
+                <action name="build">
+                    <script>${ant.script}</script>
+                    <target>build</target>
+                </action>
+                <action name="clean">
+                    <script>${ant.script}</script>
+                    <target>clean</target>
+                </action>
+                <action name="javadoc">
+                    <script>${ant.script}</script>
+                    <target>docs-javadoc</target>
+                </action>
+                <action name="run">
+                    <script>${ant.script}</script>
+                    <target>run</target>
+                </action>
+                <action name="rebuild">
+                    <script>${ant.script}</script>
+                    <target>clean</target>
+                    <target>build</target>
+                </action>
+                <action name="debug">
+                    <script>nbproject/ide-targets.xml</script>
+                    <target>debug-nb</target>
+                </action>
+            </ide-actions>
+            <export>
+                <type>jar</type>
+                <location>build/jEdit.jar</location>
+                <script>${ant.script}</script>
+                <build-target>build</build-target>
+            </export>
+            <view>
+                <items>
+                    <source-folder style="packages">
+                        <label>Source Packages</label>
+                        <location>.</location>
+                        <excludes>build/** doc/** icons/** macros/** modes/** package-files/**</excludes>
+                    </source-folder>
+                    <source-file>
+                        <location>${ant.script}</location>
+                    </source-file>
+                </items>
+                <context-menu>
+                    <ide-action name="build"/>
+                    <ide-action name="rebuild"/>
+                    <ide-action name="clean"/>
+                    <ide-action name="javadoc"/>
+                    <ide-action name="run"/>
+                    <ide-action name="debug"/>
+                </context-menu>
+            </view>
+            <subprojects/>
+        </general-data>
+        <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/1">
+            <compilation-unit>
+                <package-root>.</package-root>
+                <classpath mode="compile">.</classpath>
+                <built-to>build/jEdit.jar</built-to>
+                <source-level>1.5</source-level>
+            </compilation-unit>
+        </java-data>
+        <preferences xmlns="http://www.netbeans.org/ns/auxiliary-configuration-preferences/1">
+            <module name="org-netbeans-modules-editor-indent">
+                <node name="CodeStyle">
+                    <property name="usedProfile" value="default"/>
+                    <node name="project">
+                        <property name="spaces-per-tab" value="2"/>
+                        <property name="tab-size" value="2"/>
+                        <property name="indent-shift-width" value="2"/>
+                        <property name="text-limit-width" value="100"/>
+                        <property name="expand-tabs" value="true"/>
+                    </node>
+                </node>
+                <node name="text">
+                    <node name="x-java">
+                        <node name="CodeStyle">
+                            <node name="project">
+                                <property name="tab-size" value="4"/>
+                                <property name="text-limit-width" value="100"/>
+                                <property name="spaces-per-tab" value="2"/>
+                                <property name="indent-shift-width" value="2"/>
+                            </node>
+                        </node>
+                    </node>
+                </node>
+            </module>
+        </preferences>
+    </configuration>
+</project>
--- a/src/Tools/jEdit/nbproject/build-impl.xml	Wed Nov 19 20:51:27 2008 +0100
+++ b/src/Tools/jEdit/nbproject/build-impl.xml	Sat Nov 22 00:51:27 2008 +0100
@@ -383,7 +383,9 @@
                 COMPILATION SECTION
                 ===================
             -->
-    <target depends="init" name="deps-jar" unless="no.deps"/>
+    <target depends="init" name="deps-jar" unless="no.deps">
+        <ant antfile="${project.jEdit}/build-nb.xml" inheritall="false" target="build"/>
+    </target>
     <target depends="init,deps-jar" name="-pre-pre-compile">
         <mkdir dir="${build.classes.dir}"/>
     </target>
@@ -685,7 +687,9 @@
                 CLEANUP SECTION
                 ===============
             -->
-    <target depends="init" name="deps-clean" unless="no.deps"/>
+    <target depends="init" name="deps-clean" unless="no.deps">
+        <ant antfile="${project.jEdit}/build-nb.xml" inheritall="false" target="clean"/>
+    </target>
     <target depends="init" name="-do-clean">
         <delete dir="${build.dir}"/>
         <delete dir="${dist.dir}"/>
--- a/src/Tools/jEdit/nbproject/genfiles.properties	Wed Nov 19 20:51:27 2008 +0100
+++ b/src/Tools/jEdit/nbproject/genfiles.properties	Sat Nov 22 00:51:27 2008 +0100
@@ -3,6 +3,6 @@
 build.xml.stylesheet.CRC32=ca9d572e
 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
-nbproject/build-impl.xml.data.CRC32=d2379ac2
-nbproject/build-impl.xml.script.CRC32=2f754fcd
+nbproject/build-impl.xml.data.CRC32=8f41dcce
+nbproject/build-impl.xml.script.CRC32=828f71d1
 nbproject/build-impl.xml.stylesheet.CRC32=2aa5193a
--- a/src/Tools/jEdit/nbproject/project.properties	Wed Nov 19 20:51:27 2008 +0100
+++ b/src/Tools/jEdit/nbproject/project.properties	Sat Nov 22 00:51:27 2008 +0100
@@ -30,8 +30,8 @@
 jar.compress=false
 java.platform.active=java_default_platform
 javac.classpath=\
-    ${libs.jEdit.classpath}:\
     ${libs.Flying-Saucer.classpath}:\
+    ${reference.jEdit.build}:\
     ${libs.Isabelle-Pure.classpath}
 # Space-separated list of extra javac options
 javac.compilerargs=
@@ -58,6 +58,8 @@
 manifest.file=manifest.mf
 meta.inf.dir=${src.dir}/META-INF
 platform.active=default_platform
+project.jEdit=contrib/jEdit
+reference.jEdit.build=${project.jEdit}/build/jEdit.jar
 run.classpath=\
     ${javac.classpath}:\
     ${build.classes.dir}
--- a/src/Tools/jEdit/nbproject/project.xml	Wed Nov 19 20:51:27 2008 +0100
+++ b/src/Tools/jEdit/nbproject/project.xml	Sat Nov 22 00:51:27 2008 +0100
@@ -10,5 +10,15 @@
             </source-roots>
             <test-roots/>
         </data>
+        <references xmlns="http://www.netbeans.org/ns/ant-project-references/1">
+            <reference>
+                <foreign-project>jEdit</foreign-project>
+                <artifact-type>jar</artifact-type>
+                <script>build-nb.xml</script>
+                <target>build</target>
+                <clean-target>clean</clean-target>
+                <id>build</id>
+            </reference>
+        </references>
     </configuration>
 </project>