merge
authorimmler@in.tum.de
Wed, 26 Nov 2008 18:10:53 +0100
changeset 34385 5ff833cfd3c8
parent 34384 00276ab4f1d5 (current diff)
parent 34382 89a7f3906869 (diff)
child 34386 b295fe78294a
merge
src/Tools/jEdit/NOTES
--- a/src/Tools/jEdit/NOTES	Wed Nov 19 11:49:30 2008 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-
-Misc development notes
-======================
-
-- Netbeans config/Editors/Preferences/...-CustomPreferences.xml
-
-    <entry javaType="java.lang.Integer" name="caret-blink-rate" xml:space="preserve">
-        <value><![CDATA[0]]></value>
-    </entry>
-
------------------------------------------------------------------------
-To run jedit with remote debugging enabled, I use the following
-command: "java
--agentlib:jdwp=transport=dt_socket,suspend=y,server=y,address=XXXX
--jar jedit.jar"
-
-where XXXX is any open port number you wish. The above invocation
-works for Sun's JDK 5.0.  There's an alternate incantation for earlier
-releases. (See
-http://java.sun.com/j2se/1.5.0/docs/guide/jpda/conninv.html)
-
------------------------------------------------------------------------
-Submitted by Daria Titova on Tuesday, 17 July, 2007 - 22:22
-Other Developer Topics
-Dear jEdit developers,
-
-I would like to let you now that we have recently ported jEdit 4.2
-environment into the NetBeans IDE.  You may wish to check it out:
-http://wiki.netbeans.org/wiki/view/NetbeansedJEdit
-
-Now you can completely run, debug, and profile jEdit inside the
-NetBeans IDE, and have access to all nifty features NetBeans IDE
-provides to make developer's more productive and happy.
-
-I would greatly appreciate any feedback you may have about my project
-and any ideas on how to make it more useful for jEdit community.
-
-If you are new to NetBeans please go to http://www.netbeans.org for
-all information, tutorials and fun stuff.
-
-Daria Titova
-NetBeans Engineer. 
------------------------------------------------------------------------
--- a/src/Tools/jEdit/README_BUILD	Wed Nov 19 11:49:30 2008 +0100
+++ b/src/Tools/jEdit/README_BUILD	Wed Nov 26 18:10:53 2008 +0100
@@ -2,20 +2,26 @@
 Requirements to build from sources
 ==================================
 
-* Proper Java JRE/JDK from Sun
+* Proper Java JRE/JDK from Sun, e.g. 1.6.0_07
   http://java.sun.com/javase/downloads/index.jsp
 
-* Netbeans 6.5beta
-  http://download.netbeans.org/netbeans/6.5/beta/
+* Netbeans 6.5
+  http://www.netbeans.org/downloads/index.html
 
 * Scala for Netbeans
+  http://blogtrader.net/page/dcaoyuan/entry/new_scala_plugin_for_netbeans
   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
@@ -24,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	Wed Nov 26 18:10:53 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	Wed Nov 26 18:10:53 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>build-nb.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/makedist	Wed Nov 19 11:49:30 2008 +0100
+++ b/src/Tools/jEdit/makedist	Wed Nov 26 18:10:53 2008 +0100
@@ -90,9 +90,9 @@
 
 cp -R "$THIS/dist-template/." "$JEDIT/."
 
-cp Isabelle-jEdit.jar "$JEDIT/jars/isabelle.jar"
-cp lib/Pure.jar "$JEDIT/jars/isabelle-Pure.jar"
-cp lib/core-renderer.jar "$JEDIT/jars/"
+cp jars/Isabelle-jEdit.jar "$JEDIT/jars/isabelle.jar"
+cp jars/lib/Pure.jar "$JEDIT/jars/isabelle-Pure.jar"
+cp jars/lib/core-renderer.jar "$JEDIT/jars/"
 
 
 # build archive
--- a/src/Tools/jEdit/nbproject/build-impl.xml	Wed Nov 19 11:49:30 2008 +0100
+++ b/src/Tools/jEdit/nbproject/build-impl.xml	Wed Nov 26 18:10:53 2008 +0100
@@ -45,6 +45,7 @@
 </fail>
         <property name="scala.compiler" value="${scala.home}/lib/scala-compiler.jar"/>
         <property name="scala.library" value="${scala.home}/lib/scala-library.jar"/>
+        <property name="scala.lib" value="${scala.home}/lib"/>
         <taskdef resource="scala/tools/ant/antlib.xml">
             <classpath>
                 <pathelement location="${scala.compiler}"/>
@@ -214,13 +215,16 @@
             <attribute default="${includes}" name="includes"/>
             <attribute default="${excludes}" name="excludes"/>
             <attribute default="jvm-${javac.debug}" name="debug"/>
+            <attribute default="${javac.compilerargs}" name="addparams"/>
             <attribute default="" name="sourcepath"/>
             <element name="customize" optional="true"/>
             <sequential>
-                <scalac destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includes="@{includes}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="jvm-${javac.target}">
+                <scalac addparams="@{addparams}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includes="@{includes}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="jvm-${javac.target}">
                     <classpath>
                         <path path="@{classpath}"/>
-                        <pathelement location="${scala.library}"/>
+                        <fileset dir="${scala.lib}">
+                            <include name="**/*.jar"/>
+                        </fileset>
                     </classpath>
                     <customize/>
                 </scalac>
@@ -268,7 +272,9 @@
                     </batchtest>
                     <classpath>
                         <path path="${run.test.classpath}"/>
-                        <pathelement location="${scala.library}"/>
+                        <fileset dir="${scala.lib}">
+                            <include name="**/*.jar"/>
+                        </fileset>
                     </classpath>
                     <syspropertyset>
                         <propertyref prefix="test-sys-prop."/>
@@ -329,7 +335,9 @@
                     <jvmarg line="${run.jvmargs}"/>
                     <classpath>
                         <path path="@{classpath}"/>
-                        <pathelement location="${scala.library}"/>
+                        <fileset dir="${scala.lib}">
+                            <include name="**/*.jar"/>
+                        </fileset>
                     </classpath>
                     <syspropertyset>
                         <propertyref prefix="run-sys-prop."/>
@@ -349,7 +357,9 @@
                     <jvmarg line="${run.jvmargs}"/>
                     <classpath>
                         <path path="${run.classpath}"/>
-                        <pathelement location="${scala.library}"/>
+                        <fileset dir="${scala.lib}">
+                            <include name="**/*.jar"/>
+                        </fileset>
                     </classpath>
                     <syspropertyset>
                         <propertyref prefix="run-sys-prop."/>
@@ -373,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>
@@ -675,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 11:49:30 2008 +0100
+++ b/src/Tools/jEdit/nbproject/genfiles.properties	Wed Nov 26 18:10:53 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=234fa40f
-nbproject/build-impl.xml.stylesheet.CRC32=411eee22
+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 11:49:30 2008 +0100
+++ b/src/Tools/jEdit/nbproject/project.properties	Wed Nov 26 18:10:53 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 11:49:30 2008 +0100
+++ b/src/Tools/jEdit/nbproject/project.xml	Wed Nov 26 18:10:53 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>