Thread: [Jsxe-cvs] SF.net SVN: jsxe: [1054] trunk/jsxe (Page 2)
Status: Inactive
Brought to you by:
ian_lewis
|
From: <ian...@us...> - 2006-07-21 20:50:59
|
Revision: 1054 Author: ian_lewis Date: 2006-07-21 13:50:44 -0700 (Fri, 21 Jul 2006) ViewCVS: http://svn.sourceforge.net/jsxe/?rev=1054&view=rev Log Message: ----------- Added support for building an executable using jSmooth Modified Paths: -------------- trunk/jsxe/build.xml Added Paths: ----------- trunk/jsxe/buildlib/ trunk/jsxe/buildlib/jsmoothgen-ant.jar trunk/jsxe/buildlib/skeletons/ trunk/jsxe/buildlib/skeletons/windowed-wrapper/ trunk/jsxe/buildlib/skeletons/windowed-wrapper/description.skel trunk/jsxe/buildlib/skeletons/windowed-wrapper/jwrap.exe trunk/jsxe/jsXe.jsmooth Modified: trunk/jsxe/build.xml =================================================================== --- trunk/jsxe/build.xml 2006-07-21 19:40:51 UTC (rev 1053) +++ trunk/jsxe/build.xml 2006-07-21 20:50:44 UTC (rev 1054) @@ -9,10 +9,12 @@ You should check out jsxe to make a structure like this. This ensures that when compiling jsXe the other views will be compiled as well. - jsxe module => jsxe/ - treeview module => jsxe/jars/treeview - sourceview module => jsxe/jars/sourceview - jsxe web module => web/ + jsxe module => jsxe/ + treeview module (optional) => jsxe/jars/treeview + sourceview module (optional) => jsxe/jars/sourceview + jsxe web module (optional) => web/ + jsmooth ant task (optional) => buildlib/ + --> <project basedir="." default="usage" name="jsXe"> @@ -52,6 +54,11 @@ <property name="minor.version" value="5"/> <property name="beta.version" value="1"/> <property name="bugfix.version" value="0"/> + + <property name="buildlib.dir" value="${root.dir}/buildlib"/> + <property name="jsmooth.project" value="${root.dir}/jsXe.jsmooth"/> + <property name="jsmooth.jar" value="${buildlib.dir}/jsmoothgen-ant.jar"/> + <!-- Human Readable --> <property name="app.version" value="0.5 pre1"/> <!-- Used in filenames --> @@ -82,6 +89,7 @@ <available file="${plugin.dir}/sourceview/build.xml" property="sourceview.avail"/> <available file="${root.dir}/../web" property="web.avail"/> <available file="${plugin.dir}" property="plugin.avail"/> + <available file="${jsmooth.jar}" property="jsmooth.avail"/> <echo message="${app.name} ${app.version}"/> <echo message="----------------------------------------------------------"/> @@ -307,8 +315,20 @@ <include name="**/*"/> </fileset> </copy> + + <!-- build the windows executable --> + <antcall target="build-exe"/> + <zip basedir="${build.dir}" excludes="*.class" includes="${app.name}-${app_version}-bin/**" zipfile="${build.dir}/${app.name}-${app_version}-bin.zip"/> </target> + <target name="build-exe" if="jsmooth.avail"> + <taskdef name="jsmoothgen" + classname="net.charabia.jsmoothgen.ant.JSmoothGen" + classpath="${jsmooth.jar}"/> + + <jsmoothgen project="${jsmooth.project}" skeletonroot="${buildlib.dir}/skeletons"/> + <copy todir="${distbin.dir}" file="${build.dir}/jsXe.exe"/> + </target> <!-- }}} --> <!-- {{{ ============ Generates the source distribution ================ --> <target depends="prepare-build, prepare-src, doc" name="src" description="Build source distribution"> Added: trunk/jsxe/buildlib/jsmoothgen-ant.jar =================================================================== (Binary files differ) Property changes on: trunk/jsxe/buildlib/jsmoothgen-ant.jar ___________________________________________________________________ Name: svn:executable + * Name: svn:mime-type + application/octet-stream Added: trunk/jsxe/buildlib/skeletons/windowed-wrapper/description.skel =================================================================== --- trunk/jsxe/buildlib/skeletons/windowed-wrapper/description.skel (rev 0) +++ trunk/jsxe/buildlib/skeletons/windowed-wrapper/description.skel 2006-07-21 20:50:44 UTC (rev 1054) @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<jsmoothskeleton> +<debug>false</debug> +<description><![CDATA[ +This skeleton wraps <b>GUI applications</b>.<ul> +<li>No console I/O is displayed +<li>If no Java VM is found, it is able to display a configurable URL (typically to a java download page). +</ul> +Arguments can be passed to the application (either use the JSmooth default argument mechanism, or create a shortcut with arguments).]]> +</description> +<executableName>jwrap.exe</executableName> +<resourceCategory>JAVA</resourceCategory> +<resourceJarId>102</resourceJarId> +<resourcePropsId>103</resourcePropsId> +<shortName>Windowed Wrapper</shortName> +<skeletonProperties> +<description>When no JVM is found in the target computer, the user is prompted with the message defined below. Then, the default browser is launched with the URL defined here.</description> +<idName>Message</idName> +<label>Message</label> +<type>textarea</type> +<value>Java has not been found on your computer. Do you want to download it?</value> +</skeletonProperties> +<skeletonProperties> +<description>If the user selects YES to the message prompted above, the default web browser is launched with this URL.</description> +<idName>URL</idName> +<label>URL</label> +<type>string</type> +<value>http://www.java.com</value> +</skeletonProperties> +<skeletonProperties> +<description>The default behaviour is to launch the java application in a different (detached) process. If you want to force the wrapper to launch the Java application in the same process than the exe, than select this option.</description> +<idName>SingleProcess</idName> +<label>Launch java app in the exe process</label> +<type>boolean</type> +<value>0</value> +</skeletonProperties> +<skeletonProperties> +<description>Enable the jsmooth debug console.</description> +<idName>Debug</idName> +<label>Debug console</label> +<type>boolean</type> +<value>0</value> +</skeletonProperties> +</jsmoothskeleton> Property changes on: trunk/jsxe/buildlib/skeletons/windowed-wrapper/description.skel ___________________________________________________________________ Name: svn:executable + * Added: trunk/jsxe/buildlib/skeletons/windowed-wrapper/jwrap.exe =================================================================== (Binary files differ) Property changes on: trunk/jsxe/buildlib/skeletons/windowed-wrapper/jwrap.exe ___________________________________________________________________ Name: svn:executable + * Name: svn:mime-type + application/octet-stream Added: trunk/jsxe/jsXe.jsmooth =================================================================== --- trunk/jsxe/jsXe.jsmooth (rev 0) +++ trunk/jsxe/jsXe.jsmooth 2006-07-21 20:50:44 UTC (rev 1054) @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<jsmoothproject> +<JVMSearchPath>registry</JVMSearchPath> +<JVMSearchPath>javahome</JVMSearchPath> +<JVMSearchPath>jrepath</JVMSearchPath> +<JVMSearchPath>jdkpath</JVMSearchPath> +<JVMSearchPath>exepath</JVMSearchPath> +<JVMSearchPath>jview</JVMSearchPath> +<classPath>build\jsXe.jar</classPath> +<embeddedJar>false</embeddedJar> +<executableName>build\jsXe.exe</executableName> +<iconLocation>src\net\sourceforge\jsxe\icons\jsxe.jpg</iconLocation> +<initialMemoryHeap>16777216</initialMemoryHeap> +<mainClassName>net.sourceforge.jsxe.jsXe</mainClassName> +<maximumMemoryHeap>67108864</maximumMemoryHeap> +<maximumVersion></maximumVersion> +<minimumVersion>1.4.2</minimumVersion> +<skeletonName>Windowed Wrapper</skeletonName> +<skeletonProperties> +<key>Message</key> +<value>Java has not been found on your computer. Do you want to download it?</value> +</skeletonProperties> +<skeletonProperties> +<key>URL</key> +<value>http://www.java.com</value> +</skeletonProperties> +<skeletonProperties> +<key>SingleProcess</key> +<value>0</value> +</skeletonProperties> +<skeletonProperties> +<key>Debug</key> +<value>0</value> +</skeletonProperties> +</jsmoothproject> Property changes on: trunk/jsxe/jsXe.jsmooth ___________________________________________________________________ Name: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <ian...@us...> - 2006-07-21 21:01:27
|
Revision: 1055 Author: ian_lewis Date: 2006-07-21 14:01:15 -0700 (Fri, 21 Jul 2006) ViewCVS: http://svn.sourceforge.net/jsxe/?rev=1055&view=rev Log Message: ----------- updating SVN to allow building without having to download jars Modified Paths: -------------- trunk/jsxe/jsXe.jsmooth Added Paths: ----------- trunk/jsxe/lib/resolver.jar trunk/jsxe/lib/xercesImpl.jar trunk/jsxe/lib/xml-apis.jar Modified: trunk/jsxe/jsXe.jsmooth =================================================================== --- trunk/jsxe/jsXe.jsmooth 2006-07-21 20:50:44 UTC (rev 1054) +++ trunk/jsxe/jsXe.jsmooth 2006-07-21 21:01:15 UTC (rev 1055) @@ -11,6 +11,10 @@ <executableName>build\jsXe.exe</executableName> <iconLocation>src\net\sourceforge\jsxe\icons\jsxe.jpg</iconLocation> <initialMemoryHeap>16777216</initialMemoryHeap> +<javaProperties> +<name>java.endorsed.dirs</name> +<value>lib</value> +</javaProperties> <mainClassName>net.sourceforge.jsxe.jsXe</mainClassName> <maximumMemoryHeap>67108864</maximumMemoryHeap> <maximumVersion></maximumVersion> Added: trunk/jsxe/lib/resolver.jar =================================================================== (Binary files differ) Property changes on: trunk/jsxe/lib/resolver.jar ___________________________________________________________________ Name: svn:executable + * Name: svn:mime-type + application/octet-stream Added: trunk/jsxe/lib/xercesImpl.jar =================================================================== (Binary files differ) Property changes on: trunk/jsxe/lib/xercesImpl.jar ___________________________________________________________________ Name: svn:executable + * Name: svn:mime-type + application/octet-stream Added: trunk/jsxe/lib/xml-apis.jar =================================================================== (Binary files differ) Property changes on: trunk/jsxe/lib/xml-apis.jar ___________________________________________________________________ Name: svn:executable + * Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <ian...@us...> - 2006-07-26 20:50:51
|
Revision: 1065 Author: ian_lewis Date: 2006-07-26 08:29:40 -0700 (Wed, 26 Jul 2006) ViewCVS: http://svn.sourceforge.net/jsxe/?rev=1065&view=rev Log Message: ----------- updated the find and findnext actions to use the right messages Modified Paths: -------------- trunk/jsxe/Changelog trunk/jsxe/INSTALL trunk/jsxe/messages/messages trunk/jsxe/src/net/sourceforge/jsxe/action/FindAction.java trunk/jsxe/src/net/sourceforge/jsxe/action/FindNextAction.java trunk/jsxe/src/net/sourceforge/jsxe/gui/TabbedView.java Modified: trunk/jsxe/Changelog =================================================================== --- trunk/jsxe/Changelog 2006-07-25 20:06:34 UTC (rev 1064) +++ trunk/jsxe/Changelog 2006-07-26 15:29:40 UTC (rev 1065) @@ -1,3 +1,8 @@ +07/26/2006 Ian Lewis <Ian...@me...> + + * Updated the find and findnext actions to use proper messages + labels. + 07/24/2006 Ian Lewis <Ian...@me...> * Fixed a bug with the source view for new users that caused a Modified: trunk/jsxe/INSTALL =================================================================== --- trunk/jsxe/INSTALL 2006-07-25 20:06:34 UTC (rev 1064) +++ trunk/jsxe/INSTALL 2006-07-26 15:29:40 UTC (rev 1065) @@ -25,10 +25,12 @@ BUILDING jsXe FROM SOURCE This is pretty simple. You will need jakarta ANT and a Sun's javac compiler -(others might work, I just haven't tested them). Also, in order for jsXe to -compile properly you will need Apache Xerces installed. +(others might work, I just haven't tested them). You will need the optional +ant tasks installed as well. On some Linux distributions this may be a separate +package. Also, in order for jsXe to compile properly you will need Apache +Xerces installed. -You should have 1.4.2 or better of java and you will need version 2.8.0 of +You will need version 1.4.2 or better of java and you will need version 2.8.0 of Xerces (A Xerces 2.8.0 binary distribution is not included in the CVS source tree. You can aquire it at at http://xml.apache.org/) The jar files xercesImpl.jar, xml-apis.jar, and resolver.jar from the 2.8.0 distribution are @@ -36,7 +38,7 @@ (where you installed jsXe's source) or in the jre/lib/ext or lib/ext in your JVM. These jar files will be included with jsXe distributions for convenience. -Simply typing 'ant' or 'ant -p' in jsXe's root directory will give you the +Simply typing 'ant' in jsXe's root directory will give you the available targets to use with ant. To just simply compile jsXe and the default views to a jar file you can type 'ant compile'. To build a binary distribution you will need to run the 'bin' target in the build.xml file. I do this by simply Modified: trunk/jsxe/messages/messages =================================================================== --- trunk/jsxe/messages/messages 2006-07-25 20:06:34 UTC (rev 1064) +++ trunk/jsxe/messages/messages 2006-07-26 15:29:40 UTC (rev 1065) @@ -23,7 +23,7 @@ common.cut=Cut common.copy=Copy common.paste=Paste -common.find=Find... +common.find=Find common.findnext=Find Next common.ctrl=Ctrl @@ -140,7 +140,10 @@ Tools.Menu=Tools Help.Menu=Help -#{{{ File Menu Items + +#}}} + +#{{{ Action Labels new-file.label=New open-file.label=Open... File.Recent=Recent Files @@ -152,13 +155,16 @@ close-file.label=Close close-all.label=Close All exit.label=Exit -#}}} +find.label=Find... +findnext.label=Find Next + general-options.label=Global Options... document-options.label=Document Options... plugin-manager.label=Plugin Manager... validation-errors.label=Validation Errors... about-jsxe.label=About jsXe... + #}}} #{{{ Messages Modified: trunk/jsxe/src/net/sourceforge/jsxe/action/FindAction.java =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/action/FindAction.java 2006-07-25 20:06:34 UTC (rev 1064) +++ trunk/jsxe/src/net/sourceforge/jsxe/action/FindAction.java 2006-07-26 15:29:40 UTC (rev 1065) @@ -60,11 +60,6 @@ super("find"); }//}}} - //{{{ getLabel() - public String getLabel() { - return Messages.getMessage("common.find"); - }//}}} - //{{{ invoke() public void invoke(TabbedView view, ActionEvent evt) { /* Modified: trunk/jsxe/src/net/sourceforge/jsxe/action/FindNextAction.java =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/action/FindNextAction.java 2006-07-25 20:06:34 UTC (rev 1064) +++ trunk/jsxe/src/net/sourceforge/jsxe/action/FindNextAction.java 2006-07-26 15:29:40 UTC (rev 1065) @@ -60,11 +60,6 @@ super("findnext"); }//}}} - //{{{ getLabel() - public String getLabel() { - return Messages.getMessage("common.find"); - }//}}} - //{{{ invoke() public void invoke(TabbedView view, ActionEvent evt) { /* Modified: trunk/jsxe/src/net/sourceforge/jsxe/gui/TabbedView.java =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/gui/TabbedView.java 2006-07-25 20:06:34 UTC (rev 1064) +++ trunk/jsxe/src/net/sourceforge/jsxe/gui/TabbedView.java 2006-07-26 15:29:40 UTC (rev 1065) @@ -511,6 +511,7 @@ set.addAction(new CopyAction()); set.addAction(new PasteAction()); set.addAction(new FindAction()); + set.addAction(new FindNextAction()); ActionManager.addActionSet(set); //}}} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <ian...@us...> - 2006-07-28 21:56:06
|
Revision: 1064 Author: ian_lewis Date: 2006-07-25 13:06:34 -0700 (Tue, 25 Jul 2006) ViewCVS: http://svn.sourceforge.net/jsxe/?rev=1064&view=rev Log Message: ----------- added support for the read only attribute Modified Paths: -------------- trunk/jsxe/Changelog trunk/jsxe/INSTALL trunk/jsxe/NEWS trunk/jsxe/build.xml Modified: trunk/jsxe/Changelog =================================================================== --- trunk/jsxe/Changelog 2006-07-24 21:24:27 UTC (rev 1063) +++ trunk/jsxe/Changelog 2006-07-25 20:06:34 UTC (rev 1064) @@ -1,3 +1,9 @@ +07/24/2006 Ian Lewis <Ian...@me...> + + * Fixed a bug with the source view for new users that caused a + NullPointerException to be thrown when opening the source view. + * Added a wrapper exe for windows users using jSmooth + 07/21/2006 Ian Lewis <Ian...@me...> * Fixed bug 1509575. Files that are reloaded should always be loaded in a Modified: trunk/jsxe/INSTALL =================================================================== --- trunk/jsxe/INSTALL 2006-07-24 21:24:27 UTC (rev 1063) +++ trunk/jsxe/INSTALL 2006-07-25 20:06:34 UTC (rev 1064) @@ -51,23 +51,19 @@ RUNNING jsXe You should have 1.4.2 or better of java and you need 2.6.2 of Xerces. -To run jsXe you should just run the java interpreter on the jsXe.jar file. There -is a shell script or batch file included in the source tree for this purpose. - ./bin/jsXe.sh +*Windows* -or +Just run jsXe using the jsXe.exe in the install directory. The exe will +detect your version of Java and run jsXe using that version. - ./bin/jsXe.bat +*Unix* -The batch program should be run in with the jsXe root directory of as the -working directory. So you can create a shortcut to run jsXe by specifying the -batch file as the program to run and jsXe's root directory as the working -directory. +To run jsXe you should just run the java interpreter on the jsXe.jar file. There +is a shell script or batch file included in the source tree for this purpose. -Ex. -Target: "C:\Program Files\jsXe\bin\jsXe.bat" -Start in: "C:\Program Files\jsXe\" +./bin/jsXe.sh -You can also edit the JSXEDIR variable in the batch program to be the directory -where you installed jsXe and then the 'Start in' directory can be anywhere. +The shell script should be run in with the jsXe root directory of as the +working directory. You can also edit the JSXEDIR variable in the shell script +to be the directory where you installed jsXe. Modified: trunk/jsxe/NEWS =================================================================== --- trunk/jsxe/NEWS 2006-07-24 21:24:27 UTC (rev 1063) +++ trunk/jsxe/NEWS 2006-07-25 20:06:34 UTC (rev 1064) @@ -1,5 +1,13 @@ -07/25/2006 version 0.5 pre1 +07/24/2006 version 0.5 pre2 + * Fixed a bug with the source view for new users that caused a + NullPointerException to be thrown when opening the source view. + * Added a wrapper exe for windows users using jSmooth + * Fixed bug 1509575. Files that are reloaded should always be loaded in a + view that can accep the reloaded file. + +07/20/2006 version 0.5 pre1 + * Added support for keyboard shortcuts that can be set by the user via the Global Options Dialog. * Split the options into two dialogs. The Global Options, which are Modified: trunk/jsxe/build.xml =================================================================== --- trunk/jsxe/build.xml 2006-07-24 21:24:27 UTC (rev 1063) +++ trunk/jsxe/build.xml 2006-07-25 20:06:34 UTC (rev 1064) @@ -52,7 +52,7 @@ <property name="main.class" value="net.sourceforge.jsxe.jsXe"/> <property name="major.version" value="0"/> <property name="minor.version" value="5"/> - <property name="beta.version" value="1"/> + <property name="beta.version" value="2"/> <property name="bugfix.version" value="0"/> <property name="buildlib.dir" value="${root.dir}/buildlib"/> @@ -67,9 +67,9 @@ </condition> <!-- Human Readable --> - <property name="app.version" value="0.5 pre1"/> + <property name="app.version" value="0.5 pre2"/> <!-- Used in filenames --> - <property name="app_version" value="05_pre1"/> + <property name="app_version" value="05_pre2"/> <!--<property name="app.version" value="${major.version}.${minor.version} beta"/>--> <!--<property name="app_version" value="${major.version}_${minor.version}beta"/>--> <property name="distbin.dir" value="${build.dir}/${app.name}-${app_version}-bin"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <ian...@us...> - 2006-08-05 20:24:20
|
Revision: 1105 Author: ian_lewis Date: 2006-08-05 13:24:09 -0700 (Sat, 05 Aug 2006) ViewCVS: http://svn.sourceforge.net/jsxe/?rev=1105&view=rev Log Message: ----------- Added core support for Undo/Redo Modified Paths: -------------- trunk/jsxe/Changelog trunk/jsxe/build.xml trunk/jsxe/messages/messages trunk/jsxe/src/net/sourceforge/jsxe/ActionManager.java trunk/jsxe/src/net/sourceforge/jsxe/gui/TabbedView.java trunk/jsxe/src/net/sourceforge/jsxe/properties Added Paths: ----------- trunk/jsxe/src/net/sourceforge/jsxe/action/RedoAction.java trunk/jsxe/src/net/sourceforge/jsxe/action/UndoAction.java Modified: trunk/jsxe/Changelog =================================================================== --- trunk/jsxe/Changelog 2006-08-04 19:17:41 UTC (rev 1104) +++ trunk/jsxe/Changelog 2006-08-05 20:24:09 UTC (rev 1105) @@ -1,3 +1,9 @@ +08/05/2006 Ian Lewis <Ian...@me...> + + * Added core support for Undo/Redo. Undo/Redo will temporarily be view + specific. Eventually it will be entirely part of core after the + new data model is complete. + 08/03/2006 Ian Lewis <Ian...@me...> * Added Russian translation thanks to Segrer. Modified: trunk/jsxe/build.xml =================================================================== --- trunk/jsxe/build.xml 2006-08-04 19:17:41 UTC (rev 1104) +++ trunk/jsxe/build.xml 2006-08-05 20:24:09 UTC (rev 1105) @@ -459,4 +459,4 @@ <ant inheritAll="false" dir="${plugin.dir}/sourceview/" target="clean"/> </target>--> <!-- }}} --> -</project> +</project> \ No newline at end of file Modified: trunk/jsxe/messages/messages =================================================================== --- trunk/jsxe/messages/messages 2006-08-04 19:17:41 UTC (rev 1104) +++ trunk/jsxe/messages/messages 2006-08-05 20:24:09 UTC (rev 1105) @@ -25,6 +25,8 @@ common.paste=Paste common.find=Find common.findnext=Find Next +common.undo=Undo +common.redo=Redo common.ctrl=Ctrl common.alt=Alt Modified: trunk/jsxe/src/net/sourceforge/jsxe/ActionManager.java =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/ActionManager.java 2006-08-04 19:17:41 UTC (rev 1104) +++ trunk/jsxe/src/net/sourceforge/jsxe/ActionManager.java 2006-08-05 20:24:09 UTC (rev 1105) @@ -79,6 +79,8 @@ public static final String PASTE_SUFFIX = ".paste"; public static final String FIND_SUFFIX = ".find"; public static final String FIND_NEXT_SUFFIX = ".findnext"; + public static final String UNDO_SUFFIX = ".undo"; + public static final String REDO_SUFFIX = ".redo"; //}}} @@ -272,7 +274,9 @@ actionName.endsWith(COPY_SUFFIX) || actionName.endsWith(PASTE_SUFFIX) || actionName.endsWith(FIND_SUFFIX) || - actionName.endsWith(FIND_NEXT_SUFFIX)); + actionName.endsWith(FIND_NEXT_SUFFIX) || + actionName.endsWith(UNDO_SUFFIX) || + actionName.endsWith(REDO_SUFFIX)); }//}}} //{{{ Wrapper class Added: trunk/jsxe/src/net/sourceforge/jsxe/action/RedoAction.java =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/action/RedoAction.java (rev 0) +++ trunk/jsxe/src/net/sourceforge/jsxe/action/RedoAction.java 2006-08-05 20:24:09 UTC (rev 1105) @@ -0,0 +1,77 @@ +/* +RedoAction.java +:tabSize=4:indentSize=4:noTabs=true: +:folding=explicit:collapseFolds=1: + +Copyright (C) 2006 Ian Lewis (Ian...@me...) + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +Optionally, you may find a copy of the GNU General Public License +from http://www.fsf.org/copyleft/gpl.txt +*/ + +package net.sourceforge.jsxe.action; + +//{{{ imports + +//{{{ jsXe classes +import net.sourceforge.jsxe.jsXe; +import net.sourceforge.jsxe.JARClassLoader; +import net.sourceforge.jsxe.ActionManager; +import net.sourceforge.jsxe.LocalizedAction; +import net.sourceforge.jsxe.gui.TabbedView; +import net.sourceforge.jsxe.gui.Messages; +//}}} + +//{{{ Java classes +import java.io.IOException; +//}}} + +//{{{ AWT components +import java.awt.event.ActionEvent; +//}}} + +//}}} + +/** + * The redo action invokes a DocumentView specific action defined for redo. + * The action should be defined by the view as <i>viewname</i>.redo + * + * @author Ian Lewis (<a href="mailto:Ian...@me...">Ian...@me...</a>) + * @version $Id$ + * @since jsXe 0.5 pre3 + */ +public class RedoAction extends LocalizedAction { + + //{{{ RedoAction constructor + public RedoAction() { + super("redo"); + }//}}} + + //{{{ getLabel() + public String getLabel() { + return Messages.getMessage("common.redo"); + }//}}} + + //{{{ invoke() + public void invoke(TabbedView view, ActionEvent evt) { + /* + invoke the action registered for the current DocumentView named + viewname.redo if there is one. + */ + ActionManager.invokeAction(jsXe.getPluginLoader().getPluginProperty(view.getDocumentView().getViewPlugin(), JARClassLoader.PLUGIN_NAME)+ActionManager.REDO_SUFFIX, evt); + }//}}} + +} Added: trunk/jsxe/src/net/sourceforge/jsxe/action/UndoAction.java =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/action/UndoAction.java (rev 0) +++ trunk/jsxe/src/net/sourceforge/jsxe/action/UndoAction.java 2006-08-05 20:24:09 UTC (rev 1105) @@ -0,0 +1,77 @@ +/* +UndoAction.java +:tabSize=4:indentSize=4:noTabs=true: +:folding=explicit:collapseFolds=1: + +Copyright (C) 2006 Ian Lewis (Ian...@me...) + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +Optionally, you may find a copy of the GNU General Public License +from http://www.fsf.org/copyleft/gpl.txt +*/ + +package net.sourceforge.jsxe.action; + +//{{{ imports + +//{{{ jsXe classes +import net.sourceforge.jsxe.jsXe; +import net.sourceforge.jsxe.JARClassLoader; +import net.sourceforge.jsxe.ActionManager; +import net.sourceforge.jsxe.LocalizedAction; +import net.sourceforge.jsxe.gui.TabbedView; +import net.sourceforge.jsxe.gui.Messages; +//}}} + +//{{{ Java classes +import java.io.IOException; +//}}} + +//{{{ AWT components +import java.awt.event.ActionEvent; +//}}} + +//}}} + +/** + * The undo action invokes a DocumentView specific action defined for undo. + * The action should be defined by the view as <i>viewname</i>.undo + * + * @author Ian Lewis (<a href="mailto:Ian...@me...">Ian...@me...</a>) + * @version $Id$ + * @since jsXe 0.5 pre3 + */ +public class UndoAction extends LocalizedAction { + + //{{{ UndoAction constructor + public UndoAction() { + super("undo"); + }//}}} + + //{{{ getLabel() + public String getLabel() { + return Messages.getMessage("common.undo"); + }//}}} + + //{{{ invoke() + public void invoke(TabbedView view, ActionEvent evt) { + /* + invoke the action registered for the current DocumentView named + viewname.undo if there is one. + */ + ActionManager.invokeAction(jsXe.getPluginLoader().getPluginProperty(view.getDocumentView().getViewPlugin(), JARClassLoader.PLUGIN_NAME)+ActionManager.UNDO_SUFFIX, evt); + }//}}} + +} Modified: trunk/jsxe/src/net/sourceforge/jsxe/gui/TabbedView.java =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/gui/TabbedView.java 2006-08-04 19:17:41 UTC (rev 1104) +++ trunk/jsxe/src/net/sourceforge/jsxe/gui/TabbedView.java 2006-08-05 20:24:09 UTC (rev 1105) @@ -512,6 +512,8 @@ set.addAction(new PasteAction()); set.addAction(new FindAction()); set.addAction(new FindNextAction()); + set.addAction(new UndoAction()); + set.addAction(new RedoAction()); ActionManager.addActionSet(set); //}}} Modified: trunk/jsxe/src/net/sourceforge/jsxe/properties =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/properties 2006-08-04 19:17:41 UTC (rev 1104) +++ trunk/jsxe/src/net/sourceforge/jsxe/properties 2006-08-05 20:24:09 UTC (rev 1105) @@ -62,4 +62,6 @@ paste.shortcut=C+v find.shortcut=C+v findnext.shortcut=C+g +undo.shortcut=C+z +redo.shortcut=C+y #}}} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <ian...@us...> - 2006-08-08 00:07:54
|
Revision: 1110 Author: ian_lewis Date: 2006-08-07 17:07:37 -0700 (Mon, 07 Aug 2006) ViewCVS: http://svn.sourceforge.net/jsxe/?rev=1110&view=rev Log Message: ----------- Added some Undo support Modified Paths: -------------- trunk/jsxe/AUTHORS trunk/jsxe/Changelog trunk/jsxe/messages/messages trunk/jsxe/src/net/sourceforge/jsxe/BufferHistory.java trunk/jsxe/src/net/sourceforge/jsxe/DocumentBuffer.java trunk/jsxe/src/net/sourceforge/jsxe/action/RedoAction.java trunk/jsxe/src/net/sourceforge/jsxe/action/UndoAction.java trunk/jsxe/src/net/sourceforge/jsxe/dom/XMLDocument.java trunk/jsxe/src/net/sourceforge/jsxe/gui/TabbedView.java trunk/jsxe/src/net/sourceforge/jsxe/msg/PropertyChanged.java trunk/jsxe/src/net/sourceforge/jsxe/properties Added Paths: ----------- trunk/jsxe/src/net/sourceforge/jsxe/dom/undo/ trunk/jsxe/src/net/sourceforge/jsxe/dom/undo/InsertEdit.java trunk/jsxe/src/net/sourceforge/jsxe/dom/undo/RemoveEdit.java Modified: trunk/jsxe/AUTHORS =================================================================== --- trunk/jsxe/AUTHORS 2006-08-07 22:38:19 UTC (rev 1109) +++ trunk/jsxe/AUTHORS 2006-08-08 00:07:37 UTC (rev 1110) @@ -4,7 +4,7 @@ Translators: German (de) - Bianca Schoen Swedish (sv) - Patrik Johansson <pa...@it...> + Russian (ru) - Alexandr Gridnev <ale...@ya...> Past Contributers:\n\ Aaron Flatten <afl...@us...> - Bilel Remmache <rb...@us...> - SVM <svm...@us...> + Bilel Remmache <rb...@us...> \ No newline at end of file Modified: trunk/jsxe/Changelog =================================================================== --- trunk/jsxe/Changelog 2006-08-07 22:38:19 UTC (rev 1109) +++ trunk/jsxe/Changelog 2006-08-08 00:07:37 UTC (rev 1110) @@ -1,3 +1,7 @@ +08/07/2006 Ian Lewis <Ian...@me...> + + * Added temporary support for undo to jsXe. + 08/05/2006 Ian Lewis <Ian...@me...> * Added core support for Undo/Redo. Undo/Redo will temporarily be view @@ -6,7 +10,7 @@ 08/03/2006 Ian Lewis <Ian...@me...> - * Added Russian translation thanks to Segrer. + * Added Russian translation thanks to Alexandr Gridnev. 07/26/2006 Ian Lewis <Ian...@me...> Modified: trunk/jsxe/messages/messages =================================================================== --- trunk/jsxe/messages/messages 2006-08-07 22:38:19 UTC (rev 1109) +++ trunk/jsxe/messages/messages 2006-08-08 00:07:37 UTC (rev 1110) @@ -283,8 +283,7 @@ \ \ \ \ Swedish (sv) - Patrik Johansson <pa...@it...>\n\n\ Past Contributers:\n\ \ \ \ \ Aaron Flatten <afl...@us...>\n\ - \ \ \ \ Bilel Remmache <rb...@us...>\n\ - \ \ \ \ SVM <svm...@us...>\n\n\ + \ \ \ \ Bilel Remmache <rb...@us...>\n\n\ Homepage: http://jsxe.sourceforge.net/ #}}} Modified: trunk/jsxe/src/net/sourceforge/jsxe/BufferHistory.java =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/BufferHistory.java 2006-08-07 22:38:19 UTC (rev 1109) +++ trunk/jsxe/src/net/sourceforge/jsxe/BufferHistory.java 2006-08-08 00:07:37 UTC (rev 1110) @@ -239,7 +239,7 @@ // Enumeration propertyItr = props.keys(); // while (propertyItr.hasMoreElements()) { // String key = propertyItr.nextElement().toString(); - // if (!m_excludeKeys.contains(key)) { + // if (m_includeKeys.contains(key)) { // String value = props.getProperty(key); // out.write("<property name=\""); // out.write(key); @@ -304,7 +304,7 @@ Enumeration propertyItr = props.keys(); while (propertyItr.hasMoreElements()) { String key = propertyItr.nextElement().toString(); - if (!m_excludeKeys.contains(key)) { + if (m_includeKeys.contains(key)) { try { String value = props.getProperty(key); Element property = (Element)entryNode.appendChild(document.createElement("property")); @@ -453,7 +453,7 @@ propValue = attributes.getValue(i); } } - if (!m_excludeKeys.contains(propName) && propName != null && propValue != null) { + if (m_includeKeys.contains(propName) && propName != null && propValue != null) { m_m_properties.setProperty(propName, propValue); } } @@ -469,11 +469,16 @@ }//}}} private ArrayList m_history = new ArrayList(); - private static ArrayList m_excludeKeys; + private static ArrayList m_includeKeys; static { - m_excludeKeys = new ArrayList(); - m_excludeKeys.add(DocumentBuffer.LINE_SEPARATOR); + m_includeKeys = new ArrayList(); + m_includeKeys.add(DocumentBuffer.ENCODING); + m_includeKeys.add(DocumentBuffer.FORMAT_XML); + m_includeKeys.add(DocumentBuffer.WS_IN_ELEMENT_CONTENT); + m_includeKeys.add(DocumentBuffer.INDENT); + m_includeKeys.add(DocumentBuffer.IS_USING_SOFT_TABS); + m_includeKeys.add(DocumentBuffer.IS_VALIDATING); } //}}} Modified: trunk/jsxe/src/net/sourceforge/jsxe/DocumentBuffer.java =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/DocumentBuffer.java 2006-08-07 22:38:19 UTC (rev 1109) +++ trunk/jsxe/src/net/sourceforge/jsxe/DocumentBuffer.java 2006-08-08 00:07:37 UTC (rev 1110) @@ -803,5 +803,6 @@ private ArrayList m_listeners = new ArrayList(); private boolean m_dirty=false; private OptionPane m_optionPane; + //}}} } Modified: trunk/jsxe/src/net/sourceforge/jsxe/action/RedoAction.java =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/action/RedoAction.java 2006-08-07 22:38:19 UTC (rev 1109) +++ trunk/jsxe/src/net/sourceforge/jsxe/action/RedoAction.java 2006-08-08 00:07:37 UTC (rev 1110) @@ -67,11 +67,7 @@ //{{{ invoke() public void invoke(TabbedView view, ActionEvent evt) { - /* - invoke the action registered for the current DocumentView named - viewname.redo if there is one. - */ - ActionManager.invokeAction(jsXe.getPluginLoader().getPluginProperty(view.getDocumentView().getViewPlugin(), JARClassLoader.PLUGIN_NAME)+ActionManager.REDO_SUFFIX, evt); + view.getDocumentBuffer().redo(); }//}}} } Modified: trunk/jsxe/src/net/sourceforge/jsxe/action/UndoAction.java =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/action/UndoAction.java 2006-08-07 22:38:19 UTC (rev 1109) +++ trunk/jsxe/src/net/sourceforge/jsxe/action/UndoAction.java 2006-08-08 00:07:37 UTC (rev 1110) @@ -46,8 +46,7 @@ //}}} /** - * The undo action invokes a DocumentView specific action defined for undo. - * The action should be defined by the view as <i>viewname</i>.undo + * The undo action invokes a undo on the current XMLDocument. * * @author Ian Lewis (<a href="mailto:Ian...@me...">Ian...@me...</a>) * @version $Id$ @@ -67,11 +66,7 @@ //{{{ invoke() public void invoke(TabbedView view, ActionEvent evt) { - /* - invoke the action registered for the current DocumentView named - viewname.undo if there is one. - */ - ActionManager.invokeAction(jsXe.getPluginLoader().getPluginProperty(view.getDocumentView().getViewPlugin(), JARClassLoader.PLUGIN_NAME)+ActionManager.UNDO_SUFFIX, evt); + view.getDocumentBuffer().undo(); }//}}} } Modified: trunk/jsxe/src/net/sourceforge/jsxe/dom/XMLDocument.java =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/dom/XMLDocument.java 2006-08-07 22:38:19 UTC (rev 1109) +++ trunk/jsxe/src/net/sourceforge/jsxe/dom/XMLDocument.java 2006-08-08 00:07:37 UTC (rev 1110) @@ -25,17 +25,16 @@ package net.sourceforge.jsxe.dom; //{{{ imports -/* -All classes are listed explicitly so -it is easy to see which package it -belongs to. -*/ //{{{ jsXe classes import net.sourceforge.jsxe.jsXe; +import net.sourceforge.jsxe.EditBus; +import net.sourceforge.jsxe.msg.RedoEvent; +import net.sourceforge.jsxe.msg.UndoEvent; import net.sourceforge.jsxe.util.Log; import net.sourceforge.jsxe.util.MiscUtilities; import net.sourceforge.jsxe.dom.completion.*; +import net.sourceforge.jsxe.dom.undo.*; //}}} //{{{ DOM classes @@ -69,6 +68,8 @@ import java.net.URI; //}}} +import javax.swing.undo.*; + //}}} /** @@ -164,6 +165,7 @@ setURI(uri); setModel(reader); reader.close(); + m_undoManager.setLimit(jsXe.getIntegerProperty("undo.limit", 100)); }//}}} //{{{ XMLDocument constructor @@ -189,29 +191,135 @@ setModel(reader); reader.close(); + m_undoManager.setLimit(jsXe.getIntegerProperty("undo.limit", 100)); }//}}} - //{{{ checkWellFormedness() + //{{{ undo methods + + //{{{ addUndoableEdit() /** - * Checks the wellformedness of the document and throws appropriate - * exceptions based on the errors encountered during parsing. - * @return true if the document is well formed. - * @throws SAXParseException if there was a SAX error when parsing. - * @throws SAXException if there was a problem with the SAX parser. - * @throws ParserConfigurationException if the parser is not configured properly - * @throws IOException if there was a problem reading the document + * Allows views and editors to add additional undoable events. Generally + * the edits added by classes that are not this class, classes in this + * package, or a subclass will not be significant. + * + * @return true if the edit was added successfully */ - public boolean checkWellFormedness() throws SAXParseException, SAXException, ParserConfigurationException, IOException { - if (!m_parsedMode) { - parseDocument(); - m_adapterNode = new AdapterNode(this, m_document); - // m_adapterNode.addAdapterNodeListener(docAdapterListener); - // m_syncedWithContent = true; - m_parsedMode=true; + public boolean addUndoableEdit(UndoableEdit edit) { + if (insideCompoundEdit()) { + m_addedToCompoundEdits = true; + return ((CompoundEdit)m_compoundEdits.peek()).addEdit(edit); + } else { + return m_undoManager.addEdit(edit); } - return m_parsedMode; }//}}} + //{{{ beginCompoundEdit() + /** + * Begins a compound edit. A compound edit is an edit that will be + * undone/redone all at once. + */ + public void beginCompoundEdit() { + Log.log(Log.DEBUG, this, "begin compound edit"); + m_addedToCompoundEdits = false; + m_compoundEdits.push(new CompoundEdit()); + }//}}} + + //{{{ endCompoundEdit() + /** + * Ends a compound edit. A compound edit is an edit that will be + * undone/redone all at once. + */ + public void endCompoundEdit() { + if (!insideCompoundEdit()) { + Log.log(Log.WARNING, this, new Exception("Unbalanced begin/endCompoundEdit()")); + return; + } + Log.log(Log.DEBUG, this, "end compound edit"); + if (m_addedToCompoundEdits) { + CompoundEdit edit = (CompoundEdit)m_compoundEdits.pop(); + edit.end(); + m_undoManager.addEdit(edit); + } + }//}}} + + //{{{ insideCompoundEdit() + /** + * Gets whether the document is in a compound edit. A compound edit is an + * edit that will be undone/redone all at once. + */ + public boolean insideCompoundEdit() { + return m_compoundEdits.size() != 0; + }//}}} + + //{{{ undo() + + public void undo() { + if (insideCompoundEdit()) { + throw new InternalError("Unbalanced begin/endCompoundEdit()"); + } + try { + setFlag(UNDO_IN_PROGRESS, true); + m_undoManager.undo(); + EditBus.send(new UndoEvent(this)); + } catch (CannotUndoException e) { + Log.log(Log.WARNING, this, e); + } finally { + setFlag(UNDO_IN_PROGRESS, false); + } + }//}}} + + //{{{ redo() + + public void redo() { + if (insideCompoundEdit()) { + throw new InternalError("Unbalanced begin/endCompoundEdit()"); + } + try { + setFlag(UNDO_IN_PROGRESS, true); + m_undoManager.redo(); + EditBus.send(new RedoEvent(this)); + } catch (CannotRedoException e) { + Log.log(Log.WARNING, this, e); + } finally { + setFlag(UNDO_IN_PROGRESS, false); + } + }//}}} + + //}}} + + //{{{ Property methods + + //{{{ getProperties() + /** + * Gets all properties associated with this document. + * @return the document's properties + */ + public Properties getProperties() { + return props; + }//}}} + + //{{{ getProperty() + /** + * Gets a property for the key given. + * @param key the key to the properties list + * @return the value of the property for the given key. + */ + public String getProperty(String key) { + return props.getProperty(key); + }//}}} + + //{{{ getProperty() + /** + * Gets a property for the key given or returns the default value + * if there is no property for the given key. + * @param key the key to the properties list + * @param defaultValue the default value for the property requested + * @return the value of the property for the given key. + */ + public String getProperty(String key, String defaultValue) { + return props.getProperty(key, defaultValue); + }//}}} + //{{{ setProperty() /** * Sets a property of the XMLDocument @@ -270,6 +378,84 @@ return oldValue; }//}}} + //{{{ getBooleanProperty() method + /** + * Returns the value of a boolean property. This method is thread-safe. + * @param name The property name + */ + public boolean getBooleanProperty(String name) { + String obj = getProperty(name); + if (obj == null) { + return false; + } + + return Boolean.valueOf(obj).booleanValue(); + } //}}} + + //{{{ setBooleanProperty() method + /** + * Sets a boolean property. + * @param name The property name + * @param value The value + */ + public void setBooleanProperty(String name, boolean value) { + setProperty(name, Boolean.toString(value)); + } //}}} + + //{{{ getIntegerProperty() method + /** + * Returns the value of an integer property. This method is thread-safe. + * @param name The property name + */ + public int getIntegerProperty(String name, int defaultValue) { + + boolean defaultValueFlag; + String obj = getProperty(name); + + if (obj == null) { + return defaultValue; + } else { + try { + return Integer.parseInt(obj); + } catch (NumberFormatException e) { + return defaultValue; + } + } + } //}}} + + //{{{ setIntegerProperty() method + /** + * Sets an integer property. + * @param name The property name + * @param value The value + */ + public void setIntegerProperty(String name, int value) { + setProperty(name, Integer.toString(value)); + } //}}} + + //}}} + + //{{{ checkWellFormedness() + /** + * Checks the wellformedness of the document and throws appropriate + * exceptions based on the errors encountered during parsing. + * @return true if the document is well formed. + * @throws SAXParseException if there was a SAX error when parsing. + * @throws SAXException if there was a problem with the SAX parser. + * @throws ParserConfigurationException if the parser is not configured properly + * @throws IOException if there was a problem reading the document + */ + public boolean checkWellFormedness() throws SAXParseException, SAXException, ParserConfigurationException, IOException { + if (!m_parsedMode) { + parseDocument(); + m_adapterNode = new AdapterNode(this, m_document); + // m_adapterNode.addAdapterNodeListener(docAdapterListener); + // m_syncedWithContent = true; + m_parsedMode=true; + } + return m_parsedMode; + }//}}} + //{{{ getDocumentCopy() /** * Gets a copy of the underlying Document object. @@ -312,37 +498,6 @@ return docType; }//}}} - //{{{ getProperties() - /** - * Gets all properties associated with this document. - * @return the document's properties - */ - public Properties getProperties() { - return props; - }//}}} - - //{{{ getProperty() - /** - * Gets a property for the key given. - * @param key the key to the properties list - * @return the value of the property for the given key. - */ - public String getProperty(String key) { - return props.getProperty(key); - }//}}} - - //{{{ getProperty() - /** - * Gets a property for the key given or returns the default value - * if there is no property for the given key. - * @param key the key to the properties list - * @param defaultValue the default value for the property requested - * @return the value of the property for the given key. - */ - public String getProperty(String key, String defaultValue) { - return props.getProperty(key, defaultValue); - }//}}} - //{{{ getRootElementNode() /** * A convenience method that returns the root element node of the document. @@ -765,12 +920,14 @@ */ public void insertText(int offset, String text) throws IOException { if (text.length() > 0) { + Log.log(Log.DEBUG, this, "insertText: "+offset+": "+text); syncContentWithDOM(); m_content.insert(offset, text); m_parsedMode = false; m_adapterNode = null; - //may have some algorithm to determine the modified node(s) in the - //future + if (!getFlag(UNDO_IN_PROGRESS)) { + addUndoableEdit(new InsertEdit(this, offset, text)); + } fireStructureChanged(null); } }//}}} @@ -784,12 +941,14 @@ */ public void removeText(int offset, int length) throws IOException { if (length > 0) { - syncContentWithDOM(); + String text = getText(offset,length); + Log.log(Log.DEBUG, this, "removeText: "+offset+": "+text); m_content.remove(offset, length); m_parsedMode = false; m_adapterNode = null; - //may have some algorithm to determine the modified node(s) in the - //future + if (!getFlag(UNDO_IN_PROGRESS)) { + addUndoableEdit(new RemoveEdit(this, offset, text)); + } fireStructureChanged(null); } }//}}} @@ -1021,6 +1180,31 @@ //{{{ Private members + //{{{ Flags + + //{{{ setFlag() method + private void setFlag(int flag, boolean value) { + if(value) { + flags |= (1 << flag); + } else { + flags &= ~(1 << flag); + } + } //}}} + + //{{{ getFlag() method + private boolean getFlag(int flag) { + int mask = (1 << flag); + return (flags & mask) == mask; + } //}}} + + //{{{ Flag values + private static final int UNDO_IN_PROGRESS = 9; + //}}} + + private int flags; + + //}}} + //{{{ setDefaultProperties() private void setDefaultProperties() { @@ -2073,6 +2257,10 @@ */ private HashMap m_mappings; + private UndoManager m_undoManager = new UndoManager(); + private Stack m_compoundEdits = new Stack(); + private boolean m_addedToCompoundEdits = false; + // private XMLDocAdapterListener docAdapterListener = new XMLDocAdapterListener(); //}}} Added: trunk/jsxe/src/net/sourceforge/jsxe/dom/undo/InsertEdit.java =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/dom/undo/InsertEdit.java (rev 0) +++ trunk/jsxe/src/net/sourceforge/jsxe/dom/undo/InsertEdit.java 2006-08-08 00:07:37 UTC (rev 1110) @@ -0,0 +1,84 @@ +/* +InsertEdit.java +:tabSize=4:indentSize=4:noTabs=true: +:folding=explicit:collapseFolds=1: + +Copyright (C) 2006 Ian Lewis (Ian...@me...) + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +Optionally, you may find a copy of the GNU General Public License +from http://www.fsf.org/copyleft/gpl.txt +*/ + +package net.sourceforge.jsxe.dom.undo; + +//{{{ imports + +//{{{ jsXe classes +import net.sourceforge.jsxe.dom.XMLDocument; +//}}} + +//{{{ Swing classes +import javax.swing.undo.*; +//}}} + +import java.io.IOException; + +//}}} + +/** + * An undoable edit sigifying an insert into an XMLDocument. + * + * @author Ian Lewis (<a href="mailto:Ian...@me...">Ian...@me...</a>) + * @version $Id$ + * @see net.sourceforge.jsxe.dom.XMLDocument + */ +public class InsertEdit extends AbstractUndoableEdit { + + private XMLDocument m_document; + private String m_text; + private int m_offset; + + //{{{ InsertEdit constructor + + public InsertEdit(XMLDocument document, int offset, String text) { + m_document = document; + m_offset = offset; + m_text = text; + }//}}} + + //{{{ undo() + + public void undo() throws CannotUndoException { + super.undo(); + try { + m_document.removeText(m_offset, m_text.length()); + } catch (IOException ioe) { + throw new CannotUndoException(); + } + }//}}} + + //{{{ redo() + + public void redo() throws CannotRedoException { + super.redo(); + try { + m_document.insertText(m_offset, m_text); + } catch (IOException ioe) { + throw new CannotRedoException(); + } + }//}}} + +} \ No newline at end of file Property changes on: trunk/jsxe/src/net/sourceforge/jsxe/dom/undo/InsertEdit.java ___________________________________________________________________ Name: svn:executable + * Added: trunk/jsxe/src/net/sourceforge/jsxe/dom/undo/RemoveEdit.java =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/dom/undo/RemoveEdit.java (rev 0) +++ trunk/jsxe/src/net/sourceforge/jsxe/dom/undo/RemoveEdit.java 2006-08-08 00:07:37 UTC (rev 1110) @@ -0,0 +1,84 @@ +/* +RemoveEdit.java +:tabSize=4:indentSize=4:noTabs=true: +:folding=explicit:collapseFolds=1: + +Copyright (C) 2006 Ian Lewis (Ian...@me...) + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +Optionally, you may find a copy of the GNU General Public License +from http://www.fsf.org/copyleft/gpl.txt +*/ + +package net.sourceforge.jsxe.dom.undo; + +//{{{ imports + +//{{{ jsXe classes +import net.sourceforge.jsxe.dom.XMLDocument; +//}}} + +//{{{ Swing classes +import javax.swing.undo.*; +//}}} + +import java.io.IOException; + +//}}} + +/** + * An undoable edit sigifying a removal from an XMLDocument. + * + * @author Ian Lewis (<a href="mailto:Ian...@me...">Ian...@me...</a>) + * @version $Id$ + * @see net.sourceforge.jsxe.dom.XMLDocument + */ +public class RemoveEdit extends AbstractUndoableEdit { + + private XMLDocument m_document; + private String m_text; + private int m_offset; + + //{{{ RemoveEdit constructor + + public RemoveEdit(XMLDocument document, int offset, String text) { + m_document = document; + m_offset = offset; + m_text = text; + }//}}} + + //{{{ undo() + + public void undo() throws CannotUndoException { + super.undo(); + try { + m_document.insertText(m_offset, m_text); + } catch (IOException ioe) { + throw new CannotUndoException(); + } + }//}}} + + //{{{ redo() + + public void redo() throws CannotRedoException { + super.redo(); + try { + m_document.removeText(m_offset, m_text.length()); + } catch (IOException ioe) { + throw new CannotUndoException(); + } + }//}}} + +} \ No newline at end of file Property changes on: trunk/jsxe/src/net/sourceforge/jsxe/dom/undo/RemoveEdit.java ___________________________________________________________________ Name: svn:executable + * Modified: trunk/jsxe/src/net/sourceforge/jsxe/gui/TabbedView.java =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/gui/TabbedView.java 2006-08-07 22:38:19 UTC (rev 1109) +++ trunk/jsxe/src/net/sourceforge/jsxe/gui/TabbedView.java 2006-08-08 00:07:37 UTC (rev 1110) @@ -427,7 +427,9 @@ updateRecentFilesMenu(); menubar.add(m_fileMenu); - + + menubar.add(m_editMenu); + //Add View Specific Menus JMenu[] menus = currentDocView.getMenus(); if (menus != null) { @@ -603,6 +605,27 @@ m_fileMenu.add( menuItem ); //}}} + //{{{ Create Edit Menu + m_editMenu = new JMenu(Messages.getMessage("Edit.Menu")); + m_editMenu.setMnemonic('E'); + menuItem = new JMenuItem(ActionManager.getAction("undo")); + m_editMenu.add(menuItem); + menuItem = new JMenuItem(ActionManager.getAction("redo")); + m_editMenu.add(menuItem); + m_editMenu.addSeparator(); + menuItem = new JMenuItem(ActionManager.getAction("cut")); + m_editMenu.add(menuItem); + menuItem = new JMenuItem(ActionManager.getAction("copy")); + m_editMenu.add(menuItem); + menuItem = new JMenuItem(ActionManager.getAction("paste")); + m_editMenu.add(menuItem); + m_editMenu.addSeparator(); + menuItem = new JMenuItem(ActionManager.getAction("find")); + m_editMenu.add(menuItem); + menuItem = new JMenuItem(ActionManager.getAction("findnext")); + m_editMenu.add(menuItem); + //}}} + //{{{ Create View Menu m_viewMenu = new JMenu(Messages.getMessage("View.Menu")); m_viewMenu.setMnemonic('V'); @@ -797,6 +820,7 @@ }//}}} private JMenu m_fileMenu; + private JMenu m_editMenu; private JMenu m_viewMenu; private JMenu m_toolsMenu; private JMenu m_helpMenu; Modified: trunk/jsxe/src/net/sourceforge/jsxe/msg/PropertyChanged.java =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/msg/PropertyChanged.java 2006-08-07 22:38:19 UTC (rev 1109) +++ trunk/jsxe/src/net/sourceforge/jsxe/msg/PropertyChanged.java 2006-08-08 00:07:37 UTC (rev 1110) @@ -39,7 +39,6 @@ //{{{ PropertyChanged constructor /** * Creates a new PropertyChanged message. - * @param source the object that changed the properties * @param */ public PropertyChanged(String key, String oldValue) { Modified: trunk/jsxe/src/net/sourceforge/jsxe/properties =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/properties 2006-08-07 22:38:19 UTC (rev 1109) +++ trunk/jsxe/src/net/sourceforge/jsxe/properties 2006-08-08 00:07:37 UTC (rev 1110) @@ -13,6 +13,8 @@ # Resource Cache xml.cache=true +undo.limit=100 + #{{{ Plugin Manager Default Dimensions #pluginmgr.x=100 #pluginmgr.y=100 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <ian...@us...> - 2006-08-08 04:59:42
|
Revision: 1119 Author: ian_lewis Date: 2006-08-07 21:59:34 -0700 (Mon, 07 Aug 2006) ViewCVS: http://svn.sourceforge.net/jsxe/?rev=1119&view=rev Log Message: ----------- Fixed bugs in undo Modified Paths: -------------- trunk/jsxe/Changelog trunk/jsxe/src/net/sourceforge/jsxe/dom/AdapterNode.java trunk/jsxe/src/net/sourceforge/jsxe/dom/XMLDocument.java trunk/jsxe/src/net/sourceforge/jsxe/dom/undo/NodeNameChange.java trunk/jsxe/src/net/sourceforge/jsxe/dom/undo/NodePrefixChange.java trunk/jsxe/src/net/sourceforge/jsxe/dom/undo/NodeValueChange.java Modified: trunk/jsxe/Changelog =================================================================== --- trunk/jsxe/Changelog 2006-08-08 04:20:55 UTC (rev 1118) +++ trunk/jsxe/Changelog 2006-08-08 04:59:34 UTC (rev 1119) @@ -1,6 +1,8 @@ 08/07/2006 Ian Lewis <Ian...@me...> * Added temporary support for undo to jsXe. + * Added support for undo of text insert and delete. + * Added support for undo of changes to a node's name, value, and prefix. 08/05/2006 Ian Lewis <Ian...@me...> Modified: trunk/jsxe/src/net/sourceforge/jsxe/dom/AdapterNode.java =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/dom/AdapterNode.java 2006-08-08 04:20:55 UTC (rev 1118) +++ trunk/jsxe/src/net/sourceforge/jsxe/dom/AdapterNode.java 2006-08-08 04:59:34 UTC (rev 1119) @@ -277,9 +277,24 @@ * NAMESPACE_ERR: Raised if the specified prefix is malformed per the Namespaces in XML specification, if the namespaceURI of this node is null, if the specified prefix is "xml" and the namespaceURI of this node is different from "http://www.w3.org/XML/1998/namespace", if this node is an attribute and the specified prefix is "xmlns" and the namespaceURI of this node is different from " http://www.w3.org/2000/xmlns/", or if this node is an attribute and the qualifiedName of this node is "xmlns" . */ public void setNSPrefix(String prefix) throws DOMException { - String oldPrefix = getNSPrefix(); - m_domNode.setPrefix(prefix); - fireNamespaceChanged(this, oldPrefix, prefix); + XMLDocument doc = getOwnerDocument(); + try { + doc.beginCompoundEdit(); + String oldPrefix = getNSPrefix(); + /* + for whatever reason if I set a prefix on an node with no prefix + you get DOMException.NAMESPACE_ERRs. If we are adding a NS then + just rename the node. + */ + if (oldPrefix != null && !oldPrefix.equals("")) { + m_domNode.setPrefix(prefix); + } else { + renameElementNode(prefix, getLocalName()); + } + fireNamespaceChanged(this, oldPrefix, prefix); + } finally { + doc.endCompoundEdit(); + } }//}}} //{{{ getNodeName() @@ -312,14 +327,15 @@ throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "An attempt was made to rename a node that is not supported."); } } - + XMLDocument doc = getOwnerDocument(); + doc.beginCompoundEdit(); if (!MiscUtilities.equals(oldPrefix, prefix)) { fireNamespaceChanged(this, oldPrefix, prefix); } if (!MiscUtilities.equals(oldLocalName, localName)) { fireLocalNameChanged(this, oldLocalName, localName); } - + doc.endCompoundEdit(); }//}}} //{{{ getLocalName() Modified: trunk/jsxe/src/net/sourceforge/jsxe/dom/XMLDocument.java =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/dom/XMLDocument.java 2006-08-08 04:20:55 UTC (rev 1118) +++ trunk/jsxe/src/net/sourceforge/jsxe/dom/XMLDocument.java 2006-08-08 04:59:34 UTC (rev 1119) @@ -203,9 +203,10 @@ */ protected boolean addUndoableEdit(UndoableEdit edit) { if (!getFlag(UNDO_IN_PROGRESS)) { + Log.log(Log.DEBUG, this, edit); if (insideCompoundEdit()) { m_addedToCompoundEdits = true; - return ((CompoundEdit)m_compoundEdits.peek()).addEdit(edit); + return m_compoundEdit.addEdit(edit); } else { return m_undoManager.addEdit(edit); } @@ -219,9 +220,11 @@ * undone/redone all at once. */ public void beginCompoundEdit() { - Log.log(Log.DEBUG, this, "begin compound edit"); - m_addedToCompoundEdits = false; - m_compoundEdits.push(new CompoundEdit()); + if (m_compoundEditCount == 0) { + m_compoundEdit = new CompoundEdit(); + m_addedToCompoundEdits = false; + } + ++m_compoundEditCount; }//}}} //{{{ endCompoundEdit() @@ -234,13 +237,13 @@ Log.log(Log.WARNING, this, new Exception("Unbalanced begin/endCompoundEdit()")); return; } - Log.log(Log.DEBUG, this, "end compound edit"); - CompoundEdit edit = (CompoundEdit)m_compoundEdits.pop(); - edit.end(); - if (m_addedToCompoundEdits) { - m_undoManager.addEdit(edit); - m_addedToCompoundEdits = false; + m_compoundEdit.end(); + if (m_compoundEditCount == 1) { + if (m_addedToCompoundEdits) { + m_undoManager.addEdit(m_compoundEdit); + } } + --m_compoundEditCount; }//}}} //{{{ insideCompoundEdit() @@ -249,7 +252,7 @@ * edit that will be undone/redone all at once. */ public boolean insideCompoundEdit() { - return m_compoundEdits.size() != 0; + return (m_compoundEditCount != 0); }//}}} //{{{ undo() @@ -263,7 +266,7 @@ m_undoManager.undo(); EditBus.send(new UndoEvent(this)); } catch (CannotUndoException e) { - Log.log(Log.WARNING, this, e); + Log.log(Log.WARNING, this, "Could not undo"); } finally { setFlag(UNDO_IN_PROGRESS, false); } @@ -280,7 +283,7 @@ m_undoManager.redo(); EditBus.send(new RedoEvent(this)); } catch (CannotRedoException e) { - Log.log(Log.WARNING, this, e); + Log.log(Log.WARNING, this, "Could not redo"); } finally { setFlag(UNDO_IN_PROGRESS, false); } @@ -2267,8 +2270,9 @@ private HashMap m_mappings; private UndoManager m_undoManager = new UndoManager(); - private Stack m_compoundEdits = new Stack(); + private CompoundEdit m_compoundEdit = null; private boolean m_addedToCompoundEdits = false; + private int m_compoundEditCount = 0; // private XMLDocAdapterListener docAdapterListener = new XMLDocAdapterListener(); Modified: trunk/jsxe/src/net/sourceforge/jsxe/dom/undo/NodeNameChange.java =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/dom/undo/NodeNameChange.java 2006-08-08 04:20:55 UTC (rev 1118) +++ trunk/jsxe/src/net/sourceforge/jsxe/dom/undo/NodeNameChange.java 2006-08-08 04:59:34 UTC (rev 1119) @@ -66,8 +66,9 @@ public void undo() throws CannotUndoException { super.undo(); try { - m_node.setNodeName(m_oldValue); - } catch (DOMException ioe) { + m_node.setLocalName(m_oldValue); + } catch (DOMException e) { + Log.log(Log.ERROR, this, e); throw new CannotUndoException(); } }//}}} @@ -77,8 +78,9 @@ public void redo() throws CannotRedoException { super.redo(); try { - m_node.setNodeName(m_newValue); - } catch (DOMException ioe) { + m_node.setLocalName(m_newValue); + } catch (DOMException e) { + Log.log(Log.ERROR, this, e); throw new CannotRedoException(); } }//}}} Modified: trunk/jsxe/src/net/sourceforge/jsxe/dom/undo/NodePrefixChange.java =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/dom/undo/NodePrefixChange.java 2006-08-08 04:20:55 UTC (rev 1118) +++ trunk/jsxe/src/net/sourceforge/jsxe/dom/undo/NodePrefixChange.java 2006-08-08 04:59:34 UTC (rev 1119) @@ -67,7 +67,8 @@ super.undo(); try { m_node.setNSPrefix(m_oldValue); - } catch (DOMException ioe) { + } catch (DOMException e) { + Log.log(Log.ERROR, this, e); throw new CannotUndoException(); } }//}}} @@ -78,7 +79,8 @@ super.redo(); try { m_node.setNSPrefix(m_newValue); - } catch (DOMException ioe) { + } catch (DOMException e) { + Log.log(Log.ERROR, this, e); throw new CannotRedoException(); } }//}}} Modified: trunk/jsxe/src/net/sourceforge/jsxe/dom/undo/NodeValueChange.java =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/dom/undo/NodeValueChange.java 2006-08-08 04:20:55 UTC (rev 1118) +++ trunk/jsxe/src/net/sourceforge/jsxe/dom/undo/NodeValueChange.java 2006-08-08 04:59:34 UTC (rev 1119) @@ -67,7 +67,8 @@ super.undo(); try { m_node.setNodeValue(m_oldValue); - } catch (DOMException ioe) { + } catch (DOMException e) { + Log.log(Log.ERROR, this, e); throw new CannotUndoException(); } }//}}} @@ -78,7 +79,8 @@ super.redo(); try { m_node.setNodeValue(m_newValue); - } catch (DOMException ioe) { + } catch (DOMException e) { + Log.log(Log.ERROR, this, e); throw new CannotRedoException(); } }//}}} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <ian...@us...> - 2006-08-08 20:15:03
|
Revision: 1122 Author: ian_lewis Date: 2006-08-08 13:14:54 -0700 (Tue, 08 Aug 2006) ViewCVS: http://svn.sourceforge.net/jsxe/?rev=1122&view=rev Log Message: ----------- Added undo/redo support for attributes Modified Paths: -------------- trunk/jsxe/Changelog trunk/jsxe/src/net/sourceforge/jsxe/dom/AdapterNode.java trunk/jsxe/src/net/sourceforge/jsxe/dom/XMLDocument.java Modified: trunk/jsxe/Changelog =================================================================== --- trunk/jsxe/Changelog 2006-08-08 05:55:21 UTC (rev 1121) +++ trunk/jsxe/Changelog 2006-08-08 20:14:54 UTC (rev 1122) @@ -1,3 +1,7 @@ +08/08/2006 Ian Lewis <Ian...@me...> + + * Addded undo/redo support for attributes. + 08/07/2006 Ian Lewis <Ian...@me...> * Added temporary support for undo to jsXe. Modified: trunk/jsxe/src/net/sourceforge/jsxe/dom/AdapterNode.java =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/dom/AdapterNode.java 2006-08-08 05:55:21 UTC (rev 1121) +++ trunk/jsxe/src/net/sourceforge/jsxe/dom/AdapterNode.java 2006-08-08 20:14:54 UTC (rev 1122) @@ -411,7 +411,7 @@ */ public void setNodeValue(String str) throws DOMException { // Make sure there is a change. - if (str != null && !str.equals(m_domNode.getNodeValue())) { + if (!MiscUtilities.equals(str, m_domNode.getNodeValue())) { String oldValue = getNodeValue(); m_domNode.setNodeValue(str); fireNodeValueChanged(this, oldValue, str); @@ -540,7 +540,7 @@ } int index = index(node); m_children.remove(node); - getOwnerDocument().addUndoableEdit(new RemoveNodeChange(this, node, index)); + // getOwnerDocument().addUndoableEdit(new RemoveNodeChange(this, node, index)); } else { //Remove from previous parent AdapterNode previousParent = node.getParentNode(); @@ -617,35 +617,36 @@ Element element = (Element)m_domNode; String prefix = MiscUtilities.getNSPrefixFromQualifiedName(name); - //check if we are setting a namespace declaration - if ("xmlns".equals(prefix)) { - //if so then make sure the value is valid - if (value != null && value.equals("")) { - throw new DOMException(DOMException.NAMESPACE_ERR, "An attempt was made to create an empty namespace declaration"); + String oldValue = getAttribute(name); + + if (!MiscUtilities.equals(oldValue, value)) { + //check if we are setting a namespace declaration + if ("xmlns".equals(prefix)) { + //if so then make sure the value is valid + if (value != null && value.equals("")) { + throw new DOMException(DOMException.NAMESPACE_ERR, "An attempt was made to create an empty namespace declaration"); + } } - } - - /* - If the attribute did not have a prefix to begin with then - using setAttributeNS may add a new attribute node to the element - even though the attribute already exists. - - Also, if adding or removing a prefix we need to remove the attribute - first so that namespace errors are thrown - */ - if (prefix != null && !prefix.equals("")) { - element.setAttributeNS(lookupNamespaceURI(prefix),name,value); - } else { + /* - setAttribute doesn't throw an error if the first character is - a ":" + If the attribute did not have a prefix to begin with then + using setAttributeNS may add a new attribute node to the element + even though the attribute already exists. */ - if (name != null && !name.equals("") && name.charAt(0)==':') { - throw new DOMException(DOMException.NAMESPACE_ERR, "An attribute name cannot have a ':' as the first character"); + if (prefix != null && !prefix.equals("")) { + element.setAttributeNS(lookupNamespaceURI(prefix),name,value); + } else { + /* + setAttribute doesn't throw an error if the first character + is a ":" + */ + if (name != null && !name.equals("") && name.charAt(0)==':') { + throw new DOMException(DOMException.NAMESPACE_ERR, "An attribute name cannot have a ':' as the first character"); + } + element.setAttribute(name, value); } - element.setAttribute(name, value); + fireAttributeChanged(this, name, oldValue, value); } - fireAttributeChanged(this, name); } else { throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Only Element Nodes can have attributes"); } @@ -664,8 +665,18 @@ Element element = (Element)m_domNode; if (prefix != null && !prefix.equals("")) { + //getAttributeNS returns "" even if the attribute isn't in the + //element. + if (element.getAttributeNodeNS(lookupNamespaceURI(prefix),localName) == null) { + return null; + } return element.getAttributeNS(lookupNamespaceURI(prefix),localName); } else { + //getAttribute returns "" even if the attribute isn't in the + //element. + if (element.getAttributeNode(name) == null) { + return null; + } return element.getAttribute(name); } } else { @@ -707,43 +718,46 @@ Element element = (Element)m_domNode; String prefix = MiscUtilities.getNSPrefixFromQualifiedName(attr); String localName = MiscUtilities.getLocalNameFromQualifiedName(attr); + String oldValue = getAttribute(attr); - //Check if we are removing a namespace declaration - //This is a somewhat expensive operation, may need to - //optimize in the future - if ("xmlns".equals(prefix)) { - //check if there are nodes using the namespace - String uri = lookupNamespaceURI(localName); - //check this element's namespace - if (!uri.equals(element.getNamespaceURI())) { - //check for decendent elements with this namespace - NodeList list = element.getElementsByTagName("*"); - //check if an attribute with this NS is used - for (int i=0; i<list.getLength(); i++) { - Node ele = list.item(i); - if (uri.equals(ele.getNamespaceURI())) { - throw new DOMException(DOMException.NAMESPACE_ERR, "An attempt was made to remove a namespace declaration when nodes exist that use it"); - } - //now check the attributes - NamedNodeMap attrs = ele.getAttributes(); - for (int j=0; j<attrs.getLength(); j++) { - Node foundAttr = attrs.item(i); - if (uri.equals(foundAttr.getNamespaceURI())) { + //make sure we are actually removing an attribute. + if (oldValue != null) { + //Check if we are removing a namespace declaration + //This is a somewhat expensive operation, may need to + //optimize in the future + if ("xmlns".equals(prefix)) { + //check if there are nodes using the namespace + String uri = lookupNamespaceURI(localName); + //check this element's namespace + if (!uri.equals(element.getNamespaceURI())) { + //check for decendent elements with this namespace + NodeList list = element.getElementsByTagName("*"); + //check if an attribute with this NS is used + for (int i=0; i<list.getLength(); i++) { + Node ele = list.item(i); + if (uri.equals(ele.getNamespaceURI())) { throw new DOMException(DOMException.NAMESPACE_ERR, "An attempt was made to remove a namespace declaration when nodes exist that use it"); } + //now check the attributes + NamedNodeMap attrs = ele.getAttributes(); + for (int j=0; j<attrs.getLength(); j++) { + Node foundAttr = attrs.item(i); + if (uri.equals(foundAttr.getNamespaceURI())) { + throw new DOMException(DOMException.NAMESPACE_ERR, "An attempt was made to remove a namespace declaration when nodes exist that use it"); + } + } } + } else { + throw new DOMException(DOMException.NAMESPACE_ERR, "An attempt was made to remove a namespace declaration when nodes exist that use it"); } + } + if (prefix != null && !prefix.equals("")) { + element.removeAttributeNS(lookupNamespaceURI(prefix),localName); } else { - throw new DOMException(DOMException.NAMESPACE_ERR, "An attempt was made to remove a namespace declaration when nodes exist that use it"); + element.removeAttribute(localName); } + fireAttributeChanged(this, attr, oldValue, null); } - - if (prefix != null && !prefix.equals("")) { - element.removeAttributeNS(lookupNamespaceURI(prefix),localName); - } else { - element.removeAttribute(localName); - } - fireAttributeChanged(this, attr); } else { throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Only Element Nodes can have attributes"); } @@ -927,11 +941,9 @@ if (node != null) { int index = index(node); m_children.remove(node); - if (index != -1) { - getOwnerDocument().addUndoableEdit(new RemoveNodeChange(this, node, index)); - } else { - Log.log(Log.DEBUG, this, "node not found"); - } + // if (index != -1) { + // getOwnerDocument().addUndoableEdit(new RemoveNodeChange(this, node, index)); + // } } }//}}} @@ -981,7 +993,7 @@ //{{{ fireNodeAdded() private void fireNodeAdded(AdapterNode source, AdapterNode child, int index) { - getOwnerDocument().addUndoableEdit(new AddNodeChange(source, child, index)); + // getOwnerDocument().addUndoableEdit(new AddNodeChange(source, child, index)); ListIterator iterator = m_listeners.listIterator(); while (iterator.hasNext()) { @@ -993,7 +1005,7 @@ //{{{ fireNodeRemoved() private void fireNodeRemoved(AdapterNode source, AdapterNode child, int index) { - getOwnerDocument().addUndoableEdit(new RemoveNodeChange(source, child, index)); + // getOwnerDocument().addUndoableEdit(new RemoveNodeChange(source, child, index)); ListIterator iterator = m_listeners.listIterator(); while (iterator.hasNext()) { @@ -1041,7 +1053,9 @@ }//}}} //{{{ fireAttributeChanged() - private void fireAttributeChanged(AdapterNode source, String attr) { + private void fireAttributeChanged(AdapterNode source, String attr, String oldValue, String newValue) { + getOwnerDocument().addUndoableEdit(new AttributeChange(this, attr, oldValue, newValue)); + ListIterator iterator = m_listeners.listIterator(); while (iterator.hasNext()) { AdapterNodeListener listener = (AdapterNodeListener)iterator.next(); Modified: trunk/jsxe/src/net/sourceforge/jsxe/dom/XMLDocument.java =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/dom/XMLDocument.java 2006-08-08 05:55:21 UTC (rev 1121) +++ trunk/jsxe/src/net/sourceforge/jsxe/dom/XMLDocument.java 2006-08-08 20:14:54 UTC (rev 1122) @@ -203,7 +203,6 @@ */ protected boolean addUndoableEdit(UndoableEdit edit) { if (!getFlag(UNDO_IN_PROGRESS)) { - Log.log(Log.DEBUG, this, edit); if (insideCompoundEdit()) { m_addedToCompoundEdits = true; return m_compoundEdit.addEdit(edit); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <ian...@us...> - 2006-08-09 18:35:50
|
Revision: 1127 Author: ian_lewis Date: 2006-08-09 11:35:36 -0700 (Wed, 09 Aug 2006) ViewCVS: http://svn.sourceforge.net/jsxe/?rev=1127&view=rev Log Message: ----------- Added a new option to the global options dialog for the number of undo operations to remember Modified Paths: -------------- trunk/jsxe/Changelog trunk/jsxe/messages/messages trunk/jsxe/src/net/sourceforge/jsxe/options/GeneralOptionPane.java Modified: trunk/jsxe/Changelog =================================================================== --- trunk/jsxe/Changelog 2006-08-08 20:40:44 UTC (rev 1126) +++ trunk/jsxe/Changelog 2006-08-09 18:35:36 UTC (rev 1127) @@ -1,6 +1,11 @@ +08/09/2006 Ian Lewis <Ian...@me...> + + * Added a new option to the Global Options dialog for the number of undo + operations to remember. + 08/08/2006 Ian Lewis <Ian...@me...> - * Addded undo/redo support for attributes. + * Added undo/redo support for attributes. 08/07/2006 Ian Lewis <Ian...@me...> Modified: trunk/jsxe/messages/messages =================================================================== --- trunk/jsxe/messages/messages 2006-08-08 20:40:44 UTC (rev 1126) +++ trunk/jsxe/messages/messages 2006-08-09 18:35:36 UTC (rev 1127) @@ -67,7 +67,9 @@ Global.Options.network-cache=Ask first, then cache remote files Global.Options.network-always=Always download without asking Global.Options.network=DTD and schema downloading: -Global.Options.Menu.Spill.Over=Number of items before menus spill over +Global.Options.Menu.Spill.Over=Number of items before menus spill over: +Global.Options.Undos.To.Remember=Number of undos to remember: +Global.Options.Undos.To.Remember.ToolTip=<HTML>jsXe will remember this number of undo operations in memory.<BR> However, it cannot remember undo operations after switching views</HTML> Shortcuts.Options.Title=Shortcuts Shortcuts.Options.Select.Label=Edit Shortcuts: Modified: trunk/jsxe/src/net/sourceforge/jsxe/options/GeneralOptionPane.java =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/options/GeneralOptionPane.java 2006-08-08 20:40:44 UTC (rev 1126) +++ trunk/jsxe/src/net/sourceforge/jsxe/options/GeneralOptionPane.java 2006-08-09 18:35:36 UTC (rev 1127) @@ -29,6 +29,7 @@ import net.sourceforge.jsxe.CatalogManager; import net.sourceforge.jsxe.gui.Messages; import javax.swing.JComboBox; +import javax.swing.JTextField; import java.util.Vector; //}}} @@ -92,6 +93,18 @@ Messages.getMessage("Global.Options.Menu.Spill.Over.ToolTip")); //}}} + //{{{ undos to remember + + int undo = jsXe.getIntegerProperty("undo.limit", 100); + + m_undosToRemember = new JTextField(Integer.toString(undo)); + + addComponent(Messages.getMessage("Global.Options.Undos.To.Remember"), + m_undosToRemember, + Messages.getMessage("Global.Options.Undos.To.Remember.ToolTip")); + + //}}} + //{{{ network String[] networkValues = { @@ -124,6 +137,11 @@ } catch (NumberFormatException nfe) { //Bad input, don't save. } + try { + jsXe.setIntegerProperty("undo.limit", Integer.parseInt(m_undosToRemember.getText())); + } catch (NumberFormatException nfe) { + //Bad input, don't save. + } jsXe.setIntegerProperty("xml.cache",network.getSelectedIndex()); CatalogManager.propertiesChanged(); }//}}} @@ -136,6 +154,7 @@ //{{{ Private Members private JComboBox menuSpillOverComboBox; private JComboBox maxRecentFilesComboBox; + private JTextField m_undosToRemember; private JComboBox network; //}}} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <ian...@us...> - 2006-08-10 20:11:20
|
Revision: 1130 Author: ian_lewis Date: 2006-08-10 13:10:50 -0700 (Thu, 10 Aug 2006) ViewCVS: http://svn.sourceforge.net/jsxe/?rev=1130&view=rev Log Message: ----------- Added the jsXe installer Modified Paths: -------------- trunk/jsxe/INSTALL trunk/jsxe/README trunk/jsxe/build.xml Added Paths: ----------- trunk/jsxe/buildlib/bsf.jar trunk/jsxe/buildlib/js.jar trunk/jsxe/installer/ trunk/jsxe/installer/done-HalfAnOS.html trunk/jsxe/installer/done-MacOS.html trunk/jsxe/installer/done-Unix.html trunk/jsxe/installer/done-VMS.html trunk/jsxe/installer/done-Windows.html trunk/jsxe/installer/gpl.html trunk/jsxe/installer/readme.html trunk/jsxe/installer/src/ trunk/jsxe/installer/src/installer/ trunk/jsxe/installer/src/installer/BZip2Constants.java trunk/jsxe/installer/src/installer/CBZip2InputStream.java trunk/jsxe/installer/src/installer/CBZip2OutputStream.java trunk/jsxe/installer/src/installer/CRC.java trunk/jsxe/installer/src/installer/ConsoleInstall.java trunk/jsxe/installer/src/installer/ConsoleProgress.java trunk/jsxe/installer/src/installer/Install.java trunk/jsxe/installer/src/installer/InstallThread.java trunk/jsxe/installer/src/installer/InvalidHeaderException.java trunk/jsxe/installer/src/installer/NonInteractiveInstall.java trunk/jsxe/installer/src/installer/OperatingSystem.java trunk/jsxe/installer/src/installer/Progress.java trunk/jsxe/installer/src/installer/SwingInstall.java trunk/jsxe/installer/src/installer/TarBuffer.java trunk/jsxe/installer/src/installer/TarEntry.java trunk/jsxe/installer/src/installer/TarHeader.java trunk/jsxe/installer/src/installer/TarInputStream.java trunk/jsxe/installer/src/installer/TarOutputStream.java trunk/jsxe/installer/src/installer/VariableGridLayout.java Modified: trunk/jsxe/INSTALL =================================================================== --- trunk/jsxe/INSTALL 2006-08-09 21:53:09 UTC (rev 1129) +++ trunk/jsxe/INSTALL 2006-08-10 20:10:50 UTC (rev 1130) @@ -1,7 +1,7 @@ REQUIREMENTS Java 1.4.2 -Xerces 2.6.2 +Xerces 2.8.0 GETTING jsXe Modified: trunk/jsxe/README =================================================================== --- trunk/jsxe/README 2006-08-09 21:53:09 UTC (rev 1129) +++ trunk/jsxe/README 2006-08-10 20:10:50 UTC (rev 1130) @@ -7,3 +7,22 @@ way of creating XML documents. It is geared towards simpler XML documents but will (eventually) be able to handle any XML document. Visit http://jsxe.sourceforge.net/ to learn more about this project. + +jsXe bundles the following libraries: + +- Xerces Java 2.8.0 is a XML parsing library released by the Apache foundation. + This library is released under the Apache license, which can be found at + http://www.apache.org/licenses/LICENSE-2.0 + +The jsXe installer bundles the following libraries: + +- org.apache.excalibur.bzip2 compression library. This library is + released under the Apache license, which can be found at + http://www.apache.org/licenses/LICENSE-2.0 + + The org.apache.excalibur.bzip2 web site is + <http://jakarta.apache.org/avalon/excalibur/bzip2/>. + +- com.ice.tar, by Tim Endres. This code is in the public domain. + + The com.ice.tar web site is <http://www.trustice.com/java/tar/>. \ No newline at end of file Modified: trunk/jsxe/build.xml =================================================================== --- trunk/jsxe/build.xml 2006-08-09 21:53:09 UTC (rev 1129) +++ trunk/jsxe/build.xml 2006-08-10 20:10:50 UTC (rev 1130) @@ -7,11 +7,13 @@ Version: $Id$ You should check out jsxe to make a structure like this. This ensures that - when compiling jsXe the other views will be compiled as well. + when compiling jsXe the other views and will be compiled as well. It also + ensures that you can build jsxe's installer in binary release distributions. jsxe module => jsxe/ treeview module (optional) => jsxe/jars/treeview sourceview module (optional) => jsxe/jars/sourceview + jsxe installer (optional) => jsxe/installer jsxe web module (optional) => web/ jsmooth ant task (optional) => buildlib/ @@ -23,7 +25,20 @@ <!-- {{{ ============ Initializes properties and variables ============= --> <target name="init"> <tstamp/> + <!-- {{{ app/build properties --> <property name="app.name" value="jsXe"/> + <property name="main.class" value="net.sourceforge.jsxe.jsXe"/> + <property name="major.version" value="0"/> + <property name="minor.version" value="5"/> + <property name="beta.version" value="3"/> + <property name="bugfix.version" value="0"/> + <property name="date.format" value="MM.dd.yyyy HH:mm:ss z"/> + <!-- Human Readable --> + <property name="app.version" value="0.5 pre3"/> + <!-- Used in filenames --> + <property name="app_version" value="05_pre3"/> + <!-- }}} --> + <!-- {{{ build directories --> <property name="root.dir" value="."/> <property name="build.dir" value="${root.dir}/build"/> <property name="src.dir" value="${root.dir}/src"/> @@ -39,41 +54,85 @@ <property name="build.docs" value="${build.dir}/doc"/> <property name="build.lib" value="${build.dir}/lib"/> <property name="build.bin" value="${build.dir}/bin"/> - <property name="date.format" value="MM.dd.yyyy HH:mm:ss z"/> - <property name="build.javadocs" value="${build.docs}/api"/> + <property name="build.javadocs" value="${build.dir}/api"/> <property name="build.help" value="${build.docs}/help"/> + <property name="buildlib.dir" value="${root.dir}/buildlib"/> + <!--<property name="app.version" value="${major.version}.${minor.version} beta"/>--> + <!--<property name="app_version" value="${major.version}_${minor.version}beta"/>--> + <property name="distbin.dir" value="${build.dir}/${app.name}-${app_version}-bin"/> + <property name="distsrc.dir" value="${build.dir}/${app.name}-${app_version}-src"/> + <property name="jsmooth.project" value="${root.dir}/jsXe.jsmooth"/> + <property name="jsmooth.jar" value="${buildlib.dir}/jsmoothgen-ant.jar"/> + <!-- }}} --> + <!-- {{{ installer directories --> + <property name="installer.build.dir" value="${build.dir}/installer"/> + <property name="installer.program.dir" value="${installer.build.dir}/program"/> + <property name="installer.api.dir" value="${installer.build.dir}/api"/> + <property name="installer.treeview.dir" value="${installer.build.dir}/treeview"/> + <property name="installer.sourceview.dir" value="${installer.build.dir}/sourceview"/> + <property name="installer.build.src" value="${installer.build.dir}/src"/> + <property name="installer.build.dest" value="${installer.build.dir}/build"/> + <property name="install.props" value="${installer.build.dest}/installer/install.props"/> + <property name="installer.dir" value="${root.dir}/installer"/> + <!-- }}} --> + <!-- {{{ installer props --> + <property name="installer.main.class" value="installer.Install"/> + + <!-- files listed here are in the ${installer.dir} directory --> + <!-- TODO: labels should be put into a locale specific messages file --> + <property name="app.readme" value="readme.html"/> + <property name="app.license.title" value="GNU General Public License"/> + <property name="app.license" value="gpl.html"/> + <property name="ostask.unix-script.label" value="Install shortcut in:"/> + <property name="ostask.unix-man.label" value="Install manual page in:"/> + <!--<property name="ostask.unix-man.manpage" value="jsxe.1"/>--> + <property name="comp.count" value="4"/> + + <property name="comp.0.name" value="jsXe XML Editor"/> + <!-- size values are set by the filesize task in the + build-installer task --> + <!--<property name="comp.0.disk-size" value="7084"/> + <property name="comp.0.real-size" value="6073"/>--> + <property name="comp.0.fileset" value="jsxe-program"/> + <property name="installer.build.program.tar" value="${installer.build.dest}/installer/${comp.0.fileset}.tar.bz2"/> + + <property name="comp.1.name" value="Tree view (highly recommended)"/> + <!-- size values are set by the filesize task in the + build-installer task --> + <!--<property name="comp.1.disk-size" value="7084"/> + <property name="comp.1.real-size" value="6073"/>--> + <property name="comp.1.fileset" value="jsxe-treeview"/> + <property name="installer.build.treeview.tar" value="${installer.build.dest}/installer/${comp.1.fileset}.tar.bz2"/> + + <property name="comp.2.name" value="Source view (highly recommended)"/> + <!-- size values are set by the filesize task in the + build-installer task --> + <!--<property name="comp.2.disk-size" value="7084"/> + <property name="comp.2.real-size" value="6073"/>--> + <property name="comp.2.fileset" value="jsxe-sourceview"/> + <property name="installer.build.sourceview.tar" value="${installer.build.dest}/installer/${comp.2.fileset}.tar.bz2"/> + + <property name="comp.3.name" value="API documentation (for plugin development)"/> + <!-- size values are set by the filesize task in the + build-installer task --> + <!--<property name="comp.3.disk-size" value="7084"/> + <property name="comp.3.real-size" value="6073"/>--> + <property name="comp.3.fileset" value="jsxe-api"/> + <property name="installer.build.api.tar" value="${installer.build.dest}/installer/${comp.3.fileset}.tar.bz2"/> + <!-- }}} --> + <!-- {{{ java build properties --> <property name="javac.debug" value="on"/> <property name="javac.optimize" value="off"/> <property name="javac.deprecation" value="on"/> <property name="javac.include.runtime" value="no"/> <property name="javac.source" value="1.3"/> + <!-- }}} --> + <!-- {{{ doc properties --> <property name="java.javadoc.link" value="http://java.sun.com/j2se/1.3/docs/api/"/> <property name="xerces.javadoc.link" value="http://xerces.apache.org/xerces2-j/javadocs/api/"/> - <property name="main.class" value="net.sourceforge.jsxe.jsXe"/> - <property name="major.version" value="0"/> - <property name="minor.version" value="5"/> - <property name="beta.version" value="3"/> - <property name="bugfix.version" value="0"/> - <!-- Human Readable --> - <property name="app.version" value="0.5 pre3"/> - <!-- Used in filenames --> - <property name="app_version" value="05_pre3"/> + <!-- }}} --> - <property name="buildlib.dir" value="${root.dir}/buildlib"/> - <property name="jsmooth.project" value="${root.dir}/jsXe.jsmooth"/> - <property name="jsmooth.jar" value="${buildlib.dir}/jsmoothgen-ant.jar"/> - - <condition property="windows.build"> - <and> - <os family="windows"/> - <available file="${jsmooth.jar}" property="jsmooth.avail"/> - </and> - </condition> - - <!--<property name="app.version" value="${major.version}.${minor.version} beta"/>--> - <!--<property name="app_version" value="${major.version}_${minor.version}beta"/>--> - <property name="distbin.dir" value="${build.dir}/${app.name}-${app_version}-bin"/> - <property name="distsrc.dir" value="${build.dir}/${app.name}-${app_version}-src"/> + <!-- {{{ classpaths --> <path id="classpath"> <pathelement location="."/> <pathelement location="${build.dest}"/> @@ -90,14 +149,30 @@ <include name="**/*.jar"/> </fileset> </path> + <!-- }}} --> + <!-- {{{ conditionals --> + <available file="${jsmooth.jar}" property="jsmooth.avail"/> + <condition property="windows.build"> + <and> + <os family="windows"/> + <istrue value="${jsmooth.avail}"/> + </and> + </condition> + <!-- set whether we have the source for the default views --> + + <available file="${root.dir}/../web" property="web.avail"/> + <available file="${plugin.dir}" property="plugin.avail"/> <available file="${plugin.dir}/treeview/build.xml" property="treeview.avail"/> <available file="${plugin.dir}/sourceview/build.xml" property="sourceview.avail"/> - <available file="${root.dir}/../web" property="web.avail"/> - <available file="${plugin.dir}" property="plugin.avail"/> + <available classname="org.apache.bsf.BSFException" property="bsf.avail"/> + <available classname="org.mozilla.javascript.JavaScriptException" property="js.avail"/> + <available file="${installer.dir}" property="installer.avail"/> + <!-- }}} --> + <echo message="${app.name} ${app.version}"/> <echo message="----------------------------------------------------------"/> </target> @@ -279,12 +354,271 @@ <link href="${xerces.javadoc.link}"/> </javadoc> - <zip basedir="${build.docs}" includes="api/**" zipfile="${build.dir}/${app.name}-${app_version}-api.zip"/> + <zip basedir="${build.javadocs}" includes="**/*" zipfile="${build.dir}/${app.name}-${app_version}-api.zip"/> </target> <!-- }}} --> + <!-- {{{ ============ Builds the installer ============================= --> + <target depends="compile, prepare-build, doc" name="build-installer" description="Builds the installer"> + + <fail unless="js.avail" message="You must have the ${buildlib.dir}/js.jar in your classpath to build the installer. See http://ant.apache.org/manual/install.html#librarydependencies"/> + <fail unless="bsf.avail" message="You must have the ${buildlib.dir}/bsf.jar in your classpath to build the installer. See http://ant.apache.org/manual/install.html#librarydependencies"/> + <fail unless="treeview.avail" message="You must have the treeview source available to build the installer."/> + <fail unless="sourceview.avail" message="You must have the sourceview source available to build the installer."/> + + <!-- {{{ filesize script definition --> + <!-- taken from the ant manual + modified to get the total size of a directory structure + and set it to a property in Kb --> + <scriptdef name="filesize" language="javascript"> + <element name="fileset" type="fileset"/> + <attribute name="property"/> + <![CDATA[ + // import statements + // importPackage(java.io); + importClass(java.io.File); + + // Create a <fileset dir="" includes=""/> + filesets = elements.get("fileset"); + + for (i = 0; i < filesets.size(); i++) { + fs = filesets.get(i); + + // Get the files (array) of that fileset + ds = fs.getDirectoryScanner(project); + srcFiles = ds.getIncludedFiles(); + + size = 0; + // iterate over that array + for (i=0; i<srcFiles.length; i++) { + + // get the values via Java API + var basedir = fs.getDir(project); + var filename = srcFiles[i]; + var file = new File(basedir, filename); + + size += file.length(); + } + project.setNewProperty(attributes.get("property"), Math.round(size/1024)); + } + ]]> + </scriptdef> + <!-- }}} --> + + <!-- copy the installer source --> + <mkdir dir="${installer.build.dir}"/> + <copy todir="${installer.build.dir}"> + <fileset dir="${installer.dir}"> + <include name="**/*.java"/> + </fileset> + </copy> + + <!-- build the installer --> + <mkdir dir="${installer.build.dest}"/> + <javac debug="${javac.debug}" deprecation="${javac.deprecation}" includeJavaRuntime="${javac.include.runtime}" optimize="${javac.optimize}" source="${javac.source}" destdir="${installer.build.dest}" srcdir="${installer.build.src}"> + <include name="**/*.java"/> + </javac> + + <!-- copy html files --> + <copy todir="${installer.build.dest}/installer"> + <fileset dir="${installer.dir}"> + <include name="**/*.html"/> + </fileset> + </copy> + + <!-- {{{ create the program tar.bz2 file --> + + <mkdir dir="${installer.program.dir}"/> + + <mkdir dir="${installer.program.dir}/jars"/> + + <!-- doc --> + <mkdir dir="${installer.program.dir}/doc"/> + <copy todir="${installer.program.dir}/doc"> + <fileset dir="${build.docs}"> + <include name="**/*"/> + </fileset> + </copy> + + <!-- messages --> + <mkdir dir="${installer.program.dir}/messages"/> + <copy todir="${installer.program.dir}/messages"> + <fileset dir="${build.messages}"> + <include name="**/messages*"/> + </fileset> + </copy> + + <copy file="${build.dir}/${app.name}.jar" tofile="${installer.program.dir}/${app.name}.jar"/> + <!-- lib --> + <mkdir dir="${installer.program.dir}/lib"/> + <copy todir="${installer.program.dir}/lib"> + <fileset dir="${build.lib}"> + <include name="**/*"/> + </fileset> + </copy> + + <!-- create the windows exe --> + <antcall target="build-exe"/> + + <!-- create the tar.bz2 for the installer --> + <tar basedir="${installer.program.dir}" includes="**/*" tarfile="${installer.build.dir}/${app.name}-${app_version}-program.tar"/> + <bzip2 src="${installer.build.dir}/${app.name}-${app_version}-program.tar" destfile="${installer.build.program.tar}"/> + <delete file="${installer.build.dir}/${app.name}-${app_version}-program.tar"/> + + <!-- find the file size of the files on disk and compressed files --> + <filesize property="comp.0.disk-size"> + <fileset dir="${installer.program.dir}"> + <include name="**/*"/> + </fileset> + </filesize> + + <filesize property="comp.0.real-size"> + <fileset file="${installer.build.program.tar}"/> + </filesize> + + <!-- }}} --> + + <!-- {{{ create the treeview tar.bz2 file --> + + <mkdir dir="${installer.treeview.dir}"/> + <mkdir dir="${installer.treeview.dir}/jars"/> + <copy todir="${installer.treeview.dir}/jars" file="${build.plugin}/treeview.jar"/> + + <tar basedir="${installer.treeview.dir}" includes="**/*" tarfile="${installer.build.dir}/${app.name}-${app_version}-treeview.tar"/> + <bzip2 src="${installer.build.dir}/${app.name}-${app_version}-treeview.tar" destfile="${installer.build.treeview.tar}"/> + <delete file="${installer.build.dir}/${app.name}-${app_version}-treeview.tar"/> + + <!-- find the file size of the files on disk and compressed files --> + <filesize property="comp.1.disk-size"> + <fileset dir="${installer.treeview.dir}"> + <include name="**/*"/> + </fileset> + </filesize> + + <filesize property="comp.1.real-size"> + <fileset file="${installer.build.treeview.tar}"/> + </filesize> + + <!-- }}} --> + + <!-- {{{ create the sourceview tar.bz2 file --> + + <mkdir dir="${installer.sourceview.dir}"/> + <mkdir dir="${installer.sourceview.dir}/jars"/> + <copy todir="${installer.sourceview.dir}/jars" file="${build.plugin}/sourceview.jar"/> + + <tar basedir="${installer.sourceview.dir}" includes="**/*" tarfile="${installer.build.dir}/${app.name}-${app_version}-sourceview.tar"/> + <bzip2 src="${installer.build.dir}/${app.name}-${app_version}-sourceview.tar" destfile="${installer.build.sourceview.tar}"/> + <delete file="${installer.build.dir}/${app.name}-${app_version}-sourceview.tar"/> + + <!-- find the file size of the files on disk and compressed files --> + <filesize property="comp.2.disk-size"> + <fileset dir="${installer.sourceview.dir}"> + <include name="**/*"/> + </fileset> + </filesize> + + <filesize property="comp.2.real-size"> + <fileset file="${installer.build.sourceview.tar}"/> + </filesize> + + <!-- }}} --> + + <!-- {{{ create the api tar.bz2 file --> + + <mkdir dir="${installer.api.dir}"/> + <mkdir dir="${installer.api.dir}/api"/> + <copy todir="${installer.api.dir}/api"> + <fileset dir="${build.javadocs}"> + <include name="**/*"/> + </fileset> + </copy> + + <tar basedir="${installer.api.dir}" excludes="*.class" includes="api/**" tarfile="${installer.build.dir}/${app.name}-${app_version}-api.tar"/> + <bzip2 src="${installer.build.dir}/${app.name}-${app_version}-api.tar" destfile="${installer.build.api.tar}"/> + <delete file="${installer.build.dir}/${app.name}-${app_version}-api.tar"/> + + <!-- find the file size of the files on disk and compressed files --> + <filesize property="comp.3.disk-size"> + <fileset dir="${installer.api.dir}"> + <include name="**/*"/> + </fileset> + </filesize> + + <filesize property="comp.3.real-size"> + <fileset file="${installer.build.api.tar}"/> + </filesize> + + <!-- }}} --> + + <!-- {{{ create the install.props file --> + <propertyfile comment="${app.name}'s installer properties" file="${install.props}"> + <entry key="app.name" value="${app.name}"/> + <entry key="app.version" value="${app.version}"/> + <entry key="app.readme" value="${app.readme}"/> + <entry key="app.license.title" value="${app.license.title}"/> + <entry key="app.license" value="${app.license}"/> + <entry key="ostask.unix-script.label" value="${ostask.unix-script.label}"/> + <!--<entry key="ostask.unix-man.label" value="${ostask.unix-man.label}"/>--> + <entry key="comp.count" value="${comp.count}"/> + <entry key="comp.0.name" value="${comp.0.name}"/> + <entry key="comp.0.disk-size" value="${comp.0.disk-size}"/> + <entry key="comp.0.real-size" value="${comp.0.real-size}"/> + <entry key="comp.0.fileset" value="${comp.0.fileset}"/> + + <entry key="comp.1.name" value="${comp.1.name}"/> + <entry key="comp.1.disk-size" value="${comp.1.disk-size}"/> + <entry key="comp.1.real-size" value="${comp.1.real-size}"/> + <entry key="comp.1.fileset" value="${comp.1.fileset}"/> + + <entry key="comp.2.name" value="${comp.2.name}"/> + <entry key="comp.2.disk-size" value="${comp.2.disk-size}"/> + <entry key="comp.2.real-size" value="${comp.2.real-size}"/> + <entry key="comp.2.fileset" value="${comp.2.fileset}"/> + + <entry key="comp.3.name" value="${comp.3.name}"/> + <entry key="comp.3.disk-size" value="${comp.3.disk-size}"/> + <entry key="comp.3.real-size" value="${comp.3.real-size}"/> + <entry key="comp.3.fileset" value="${comp.3.fileset}"/> + </propertyfile> + <!-- }}} --> + + <!-- {{{ create the manifest --> + <manifest file="${installer.build.dir}/installer.manifest"> + <attribute name="Built-By" value="${user.name}"/> + <attribute name="Main-Class" value="${installer.main.class}"/> + <section name="common"> + <attribute name="Implementation-Title" value="${app.name}"/> + <attribute name="Implementation-Version" value="${app.version} ${TODAY}"/> + </section> + </manifest> + <!-- }}} --> + + <!-- {{{ create the install jar --> + <jar jarfile="${build.dir}/${app.name}-${app_version}-install.jar" manifest="${installer.build.dir}/installer.manifest"> + <fileset dir="${installer.build.dest}"> + <include name="**/*"/> + </fileset> + </jar> + <!-- }}} --> + + </target> + <target name="build-exe" if="windows.build"> + <taskdef name="jsmoothgen" + classname="net.charabia.jsmoothgen.ant.JSmoothGen" + classpath="${jsmooth.jar}"/> + + <jsmoothgen project="${jsmooth.project}" skeletonroot="${buildlib.dir}/skeletons"/> + <copy todir="${installer.program.dir}" file="${build.dir}/jsXe.exe"/> + </target> + <!-- }}} --> + <!-- {{{ ============ Generates a windows distribution ================= --> + <target depends="build-installer" name="win" if="windows.build" description="Build a windows distribution"> + + </target> + <!-- }}} --> <!-- {{{ ============ Generates the binary distribution ================ --> - <target depends="compile, prepare-build, doc" name="bin" description="Build binary distribution"> + <target depends="compile, prepare-build, doc" name="bin" description="Build binary distributions"> <!-- plugins --> <mkdir dir="${distbin.dir}/jars"/> @@ -301,6 +635,16 @@ <include name="**/*"/> </fileset> </copy> + + + <!-- api --> + <mkdir dir="${distbin.dir}/doc/api"/> + <copy todir="${distbin.dir}/doc/api"> + <fileset dir="${build.javadocs}"> + <include name="**/*"/> + </fileset> + </copy> + <!-- bin --> <mkdir dir="${distbin.dir}/bin"/> <copy todir="${distbin.dir}/bin"> @@ -326,18 +670,14 @@ </fileset> </copy> - <!-- build the windows executable --> - <antcall target="build-exe"/> - + <!-- create the zip distr --> <zip basedir="${build.dir}" excludes="*.class" includes="${app.name}-${app_version}-bin/**" zipfile="${build.dir}/${app.name}-${app_version}-bin.zip"/> - </target> - <target name="build-exe" if="windows.build"> - <taskdef name="jsmoothgen" - classname="net.charabia.jsmoothgen.ant.JSmoothGen" - classpath="${jsmooth.jar}"/> - <jsmoothgen project="${jsmooth.project}" skeletonroot="${buildlib.dir}/skeletons"/> - <copy todir="${distbin.dir}" file="${build.dir}/jsXe.exe"/> + <!-- create the tar.bz2 distr --> + <tar basedir="${build.dir}" excludes="*.class" includes="${app.name}-${app_version}-bin/**" tarfile="${build.dir}/${app.name}-${app_version}-bin.tar"/> + <bzip2 src="${build.dir}/${app.name}-${app_version}-bin.tar" destfile="${build.dir}/${app.name}-${app_version}-bin.tar.bz2"/> + <delete file="${build.dir}/${app.name}-${app_version}-bin.tar"/> + </target> <!-- }}} --> <!-- {{{ ============ Generates the source distribution ================ --> @@ -345,6 +685,7 @@ <antcall target="copy-treeview-source"/> <antcall target="copy-sourceview-source"/> + <antcall target="copy-installer-source"/> <!-- doc --> <mkdir dir="${distsrc.dir}/doc"/> @@ -354,6 +695,14 @@ </fileset> </copy> + <!-- api --> + <mkdir dir="${distsrc.dir}/doc/api"/> + <copy todir="${distsrc.dir}/doc/api"> + <fileset dir="${build.javadocs}"> + <include name="**/*"/> + </fileset> + </copy> + <!-- move these files to the root dir of the src distribution --> <move file="${distsrc.dir}/doc/COPYING" tofile="${distsrc.dir}/COPYING"/> <move file="${distsrc.dir}/doc/README" tofile="${distsrc.dir}/README"/> @@ -408,7 +757,14 @@ </fileset> </copy> + <!-- create the zip --> <zip basedir="${build.dir}" excludes="*.class" includes="${app.name}-${app_version}-src/**" zipfile="${build.dir}/${app.name}-${app_version}-src.zip"/> + + <!-- create the tar.bz2 distr --> + <tar basedir="${build.dir}" excludes="*.class" includes="${app.name}-${app_version}-src/**" tarfile="${build.dir}/${app.name}-${app_version}-src.tar"/> + <bzip2 src="${build.dir}/${app.name}-${app_version}-src.tar" destfile="${build.dir}/${app.name}-${app_version}-src.tar.bz2"/> + <delete file="${build.dir}/${app.name}-${app_version}-src.tar"/> + </target> <target name="copy-treeview-source" if="treeview.avail"> <copy todir="${distsrc.dir}/jars"> @@ -430,6 +786,13 @@ </fileset> </copy> </target> + <target name="copy-installer-source" if="installer.avail"> + <copy todir="${distsrc.dir}/installer"> + <fileset dir="${installer.dir}"> + <include name="**/*"/> + </fileset> + </copy> + </target> <!-- }}} --> <!-- {{{ ============ Deploys documentation to the web module ========== --> <target depends="doc" name="deploy-web-doc" if="web.avail" description="Deploy documentation to the web module"> Added: trunk/jsxe/buildlib/bsf.jar =================================================================== (Binary files differ) Property changes on: trunk/jsxe/buildlib/bsf.jar ___________________________________________________________________ Name: svn:executable + * Name: svn:mime-type + application/octet-stream Added: trunk/jsxe/buildlib/js.jar =================================================================== (Binary files differ) Property changes on: trunk/jsxe/buildlib/js.jar ___________________________________________________________________ Name: svn:executable + * Name: svn:mime-type + application/octet-stream Added: trunk/jsxe/installer/done-HalfAnOS.html =================================================================== --- trunk/jsxe/installer/done-HalfAnOS.html (rev 0) +++ trunk/jsxe/installer/done-HalfAnOS.html 2006-08-10 20:10:50 UTC (rev 1130) @@ -0,0 +1,8 @@ +<html><body> + +jsXe has been installed successfully.<p> + +To start jEdit, run the <tt>jsxe.cmd</tt> script located in the +installation directory. + +</body></html> Property changes on: trunk/jsxe/installer/done-HalfAnOS.html ___________________________________________________________________ Name: svn:executable + * Added: trunk/jsxe/installer/done-MacOS.html =================================================================== --- trunk/jsxe/installer/done-MacOS.html (rev 0) +++ trunk/jsxe/installer/done-MacOS.html 2006-08-10 20:10:50 UTC (rev 1130) @@ -0,0 +1,12 @@ +<html><body> + +jsXe has been installed successfully.<p> + +To start jsXe, run the <tt>jsxe</tt> command in a terminal window: + +<table><tr><td bgcolor="#e0e0e0"><tt><b>$</b> jsxe <i>filename</i> ...</td></tt></tr></table> + +To find out about supported command-line options, run: + +<table><tr><td bgcolor="#e0e0e0"><tt><b>$</b> jsxe --help</tt></td></tr></table> +</body></html> Property changes on: trunk/jsxe/installer/done-MacOS.html ___________________________________________________________________ Name: svn:executable + * Added: trunk/jsxe/installer/done-Unix.html =================================================================== --- trunk/jsxe/installer/done-Unix.html (rev 0) +++ trunk/jsxe/in... [truncated message content] |
|
From: <ian...@us...> - 2006-08-13 04:07:28
|
Revision: 1146 Author: ian_lewis Date: 2006-08-12 21:07:13 -0700 (Sat, 12 Aug 2006) ViewCVS: http://svn.sourceforge.net/jsxe/?rev=1146&view=rev Log Message: ----------- merge from the 05pre3 branch Modified Paths: -------------- trunk/jsxe/Changelog trunk/jsxe/INSTALL trunk/jsxe/build.xml trunk/jsxe/installer/src/installer/OperatingSystem.java trunk/jsxe/messages/messages.ja Added Paths: ----------- trunk/jsxe/installer/jsxe-installer.ico trunk/jsxe/installer/jsxe.desktop trunk/jsxe/installer/jsxe.png trunk/jsxe/installer/launch4j.xml trunk/jsxe/jsxe.ico trunk/jsxe/launch4j.xml Removed Paths: ------------- trunk/jsxe/buildlib/jsmoothgen-ant.jar trunk/jsxe/buildlib/skeletons/ trunk/jsxe/jsXe.jsmooth Modified: trunk/jsxe/Changelog =================================================================== --- trunk/jsxe/Changelog 2006-08-13 04:04:39 UTC (rev 1145) +++ trunk/jsxe/Changelog 2006-08-13 04:07:13 UTC (rev 1146) @@ -1,3 +1,11 @@ +08/12/2006 Ian Lewis <Ian...@me...> + + * Added support for running jsXe in a wrapped exe using launch4j. + * Added an installer for jsXe. The installer can be packaged in an exe for + easy use by windows users. + * Moved the windows integration into it's own component in the installer so + that it won't be installed on systems other than Windows. + 08/09/2006 Ian Lewis <Ian...@me...> * Added a new option to the Global Options dialog for the number of undo Modified: trunk/jsxe/INSTALL =================================================================== --- trunk/jsxe/INSTALL 2006-08-13 04:04:39 UTC (rev 1145) +++ trunk/jsxe/INSTALL 2006-08-13 04:07:13 UTC (rev 1146) @@ -2,6 +2,7 @@ Java 1.4.2 Xerces 2.8.0 +launch4j (for building the installer from source) GETTING jsXe @@ -13,17 +14,32 @@ Once you have the source trees for both of these you should put them in a directory called 'jars' in your jsXe root folder. Once they are in that folder, the ant targets (compile, bin, src, etc.) will recognise those plugins and build -them if necessary. So something like this should do it: +them if necessary. -cvs checkout jsxe +You should check out jsxe to make a structure like this. This ensures that +when compiling jsXe the other views and will be compiled as well. It also +ensures that you can build jsxe's installer in binary release distributions. + +jsxe module => jsxe/ +treeview module (optional) => jsxe/jars/treeview +sourceview module (optional) => jsxe/jars/sourceview +jsxe installer (optional) => jsxe/installer +jsxe web module (optional) => web/ +launch4j (needed for win builds) => buildlib/launch4j + +So something like this should do it: + +svn checkout https://svn.sourceforge.net/svnroot/jsxe/trunk/jsxe cd jsxe mkdir jars cd jars -cvs checkout treeview -cvs checkout sourceview +svn checkout https://svn.sourceforge.net/svnroot/jsxe/trunk/treeview +svn checkout https://svn.sourceforge.net/svnroot/jsxe/trunk/sourceview BUILDING jsXe FROM SOURCE +** Requirements ** + This is pretty simple. You will need jakarta ANT and a Sun's javac compiler (others might work, I just haven't tested them). You will need the optional ant tasks installed as well. On some Linux distributions this may be a separate @@ -38,13 +54,30 @@ (where you installed jsXe's source) or in the jre/lib/ext or lib/ext in your JVM. These jar files will be included with jsXe distributions for convenience. -Simply typing 'ant' in jsXe's root directory will give you the +In order to build jsXe's installer or a windows distribution of jsXe you will +need to install launch4j (http://launch4j.sourceforge.net/). You can install it +in the buildlib directory or change the launch4j.dir property in the build.xml +file. You will also need to put the js.jar and bsf.jar in your classpath. These +files are found in the 'buildlib' directory. They are used in scripts for +calculating file sizes. + +** Building ** + +Simply typing 'ant -p' in jsXe's root directory will give you the available targets to use with ant. To just simply compile jsXe and the default views to a jar file you can type 'ant compile'. To build a binary distribution you will need to run the 'bin' target in the build.xml file. I do this by simply typing 'ant bin'. Source distributions can be built using the 'src' target by typing 'ant src'. +You can build jsXe's installer by running 'ant build-installer' which will +build jsXe's installer. The installer will be packaged in a jar file to be run +by java. + +You can build a windows distribution of jsXe by running the 'ant win'. This will +compile jsXe's installer and wrap it in an exe wrapper. The wrapper will search +for the appropriate java runtime with which to run jsXe. + INSTALLING jsXe Unpack the distribution file wherever you like. Normally you would install it @@ -52,14 +85,14 @@ RUNNING jsXe -You should have 1.4.2 or better of java and you need 2.6.2 of Xerces. +You should have 1.4.2 or better of java and you need 2.8.0 of Xerces. *Windows* Just run jsXe using the jsXe.exe in the install directory. The exe will detect your version of Java and run jsXe using that version. -*Unix* +*Unix/Linux* To run jsXe you should just run the java interpreter on the jsXe.jar file. There is a shell script or batch file included in the source tree for this purpose. Modified: trunk/jsxe/build.xml =================================================================== --- trunk/jsxe/build.xml 2006-08-13 04:04:39 UTC (rev 1145) +++ trunk/jsxe/build.xml 2006-08-13 04:07:13 UTC (rev 1146) @@ -15,10 +15,10 @@ sourceview module (optional) => jsxe/jars/sourceview jsxe installer (optional) => jsxe/installer jsxe web module (optional) => web/ - jsmooth ant task (optional) => buildlib/ + launch4j (needed for win builds) => buildlib/launch4j --> -<project basedir="." default="usage" name="jsXe"> +<project basedir="." default="compile" name="jsXe"> <description>jsXe - Java Simple XML Editor</description> @@ -48,6 +48,12 @@ <property name="build.messages" value="${build.dir}/messages"/> <property name="docs.dir" value="${src.dir}/doc"/> <property name="plugin.dir" value="${root.dir}/jars"/> + <property name="jsxe.jar" value="${build.dir}/${app.name}.jar"/> + <!-- jar file needs to be relative to the exe --> + <property name="launch4j.jsxe.jar" value="${app.name}.jar"/> + <property name="jsxe.exe" value="${build.dir}/${app.name}.exe"/> + <!-- launch4j doesn't like the ./ in the front of the path --> + <property name="launch4j.jsxe.exe" value="build/${app.name}.exe"/> <property name="build.plugin" value="${build.dir}/jars"/> <property name="build.src" value="${build.dir}/src"/> <property name="build.dest" value="${build.dir}/classes"/> @@ -61,8 +67,9 @@ <!--<property name="app_version" value="${major.version}_${minor.version}beta"/>--> <property name="distbin.dir" value="${build.dir}/${app.name}-${app_version}-bin"/> <property name="distsrc.dir" value="${build.dir}/${app.name}-${app_version}-src"/> - <property name="jsmooth.project" value="${root.dir}/jsXe.jsmooth"/> - <property name="jsmooth.jar" value="${buildlib.dir}/jsmoothgen-ant.jar"/> + <property name="launch4j.dir" value="${buildlib.dir}/launch4j"/> + <property name="launch4j.config" value="${root.dir}/launch4j.xml"/> + <property name="launch4j.classpath" value="${launch4j.dir}/launch4j.jar:${launch4j.dir}/lib/xstream.jar"/> <!-- }}} --> <!-- {{{ installer directories --> <property name="installer.build.dir" value="${build.dir}/installer"/> @@ -70,10 +77,16 @@ <property name="installer.api.dir" value="${installer.build.dir}/api"/> <property name="installer.treeview.dir" value="${installer.build.dir}/treeview"/> <property name="installer.sourceview.dir" value="${installer.build.dir}/sourceview"/> + <property name="installer.win.dir" value="${installer.build.dir}/win"/> + <property name="installer.gnome.dir" value="${installer.build.dir}/gnome"/> <property name="installer.build.src" value="${installer.build.dir}/src"/> <property name="installer.build.dest" value="${installer.build.dir}/build"/> <property name="install.props" value="${installer.build.dest}/installer/install.props"/> <property name="installer.dir" value="${root.dir}/installer"/> + <property name="installer.launch4j.config" value="${installer.dir}/launch4j.xml"/> + <!-- launch4j doesn't like the ./ in the front of the path --> + <property name="installer.jar" value="build/${app.name}-${app_version}-install.jar"/> + <property name="installer.exe" value="build/${app.name}-${app_version}-install.exe"/> <!-- }}} --> <!-- {{{ installer props --> <property name="installer.main.class" value="installer.Install"/> @@ -85,8 +98,12 @@ <property name="app.license" value="gpl.html"/> <property name="ostask.unix-script.label" value="Install shortcut in:"/> <property name="ostask.unix-man.label" value="Install manual page in:"/> + <property name="ostask.unix-desktop.label" value="Install desktop launchers in:"/> + <property name="ostask.unix-desktop.shortcut" value="jsxe.desktop"/> + <property name="ostask.unix-desktop.pixmap" value="jsxe.png"/> + <!--<property name="ostask.unix-man.manpage" value="jsxe.1"/>--> - <property name="comp.count" value="4"/> + <property name="comp.count" value="5"/> <property name="comp.0.name" value="jsXe XML Editor"/> <!-- size values are set by the filesize task in the @@ -119,6 +136,15 @@ <property name="comp.3.real-size" value="6073"/>--> <property name="comp.3.fileset" value="jsxe-api"/> <property name="installer.build.api.tar" value="${installer.build.dest}/installer/${comp.3.fileset}.tar.bz2"/> + + <property name="comp.4.name" value="Windows Integration (highly recommended)"/> + <!-- size values are set by the filesize task in the + build-installer task --> + <!--<property name="comp.4.disk-size" value="7084"/> + <property name="comp.4.real-size" value="6073"/>--> + <property name="comp.4.fileset" value="jsxe-win"/> + <property name="comp.4.os" value="Windows"/> + <property name="installer.build.win.tar" value="${installer.build.dest}/installer/${comp.4.fileset}.tar.bz2"/> <!-- }}} --> <!-- {{{ java build properties --> <property name="javac.debug" value="on"/> @@ -144,7 +170,7 @@ </path> <path id="run-classpath"> - <pathelement location="${build.dir}/${app.name}.jar"/> + <pathelement location="${jsxe.jar}"/> <fileset dir="${lib.dir}"> <include name="**/*.jar"/> </fileset> @@ -152,13 +178,6 @@ <!-- }}} --> <!-- {{{ conditionals --> - <available file="${jsmooth.jar}" property="jsmooth.avail"/> - <condition property="windows.build"> - <and> - <os family="windows"/> - <istrue value="${jsmooth.avail}"/> - </and> - </condition> <!-- set whether we have the source for the default views --> @@ -166,6 +185,7 @@ <available file="${plugin.dir}" property="plugin.avail"/> <available file="${plugin.dir}/treeview/build.xml" property="treeview.avail"/> <available file="${plugin.dir}/sourceview/build.xml" property="sourceview.avail"/> + <available file="${launch4j.dir}" property="launch4j.avail"/> <available classname="org.apache.bsf.BSFException" property="bsf.avail"/> <available classname="org.mozilla.javascript.JavaScriptException" property="js.avail"/> @@ -177,21 +197,6 @@ <echo message="----------------------------------------------------------"/> </target> <!-- }}} --> - <!-- {{{ ============ Prints the available targets ===================== --> - <target depends="init" name="usage" description="Prints available targets"> - <echo message=" available targets are:"/> - <echo message=""/> - <echo message=" compile --> generates the ${app.name}.jar file."/> - <echo message=" also generates the jars for the tree view"/> - <echo message=" and source view plugins if available."/> - <echo message=" bin --> generates a binary distribution"/> - <echo message=" src --> generates a source distribution"/> - <echo message=" doc --> generates all documentation"/> - <echo message=" also updates the web api if the web module"/> - <echo message=" is available."/> - <echo message=" clean --> cleans everything up"/> - </target> - <!-- }}} --> <!-- {{{ ============ Prepares for any type of build =================== --> <target depends="init" name="prepare"> <mkdir dir="${build.dir}"/> @@ -247,6 +252,7 @@ <classpath refid="classpath"/> <include name="**/*.java"/> </javac> + <copy todir="${build.dest}"> <fileset dir="${build.src}"> <include name="**/*.props"/> @@ -280,7 +286,7 @@ </section> </manifest> - <jar jarfile="${build.dir}/${app.name}.jar" manifest="${build.dir}/${app.name}.manifest"> + <jar jarfile="${jsxe.jar}" manifest="${build.dir}/${app.name}.manifest"> <fileset dir="${build.dest}"> <include name="**/*.class"/> <include name="**/properties"/> @@ -361,8 +367,9 @@ <!-- {{{ ============ Builds the installer ============================= --> <target depends="compile, prepare-build, doc" name="build-installer" description="Builds the installer"> - <fail unless="js.avail" message="You must have the ${buildlib.dir}/js.jar in your classpath to build the installer. See http://ant.apache.org/manual/install.html#librarydependencies"/> - <fail unless="bsf.avail" message="You must have the ${buildlib.dir}/bsf.jar in your classpath to build the installer. See http://ant.apache.org/manual/install.html#librarydependencies"/> + <fail unless="js.avail" message="You must have the ${buildlib.dir}/js.jar in your classpath to build the installer. It is located in the ${buildlib.dir} directory. See http://ant.apache.org/manual/install.html#librarydependencies"/> + <fail unless="bsf.avail" message="You must have the ${buildlib.dir}/bsf.jar in your classpath to build the installer. It is located in the ${buildlib.dir} directory. See http://ant.apache.org/manual/install.html#librarydependencies"/> + <fail unless="launch4j.avail" message="You must install launch4j in ${launch4j.dir} or change the launch4j.dir property in build.xml"/> <fail unless="treeview.avail" message="You must have the treeview source available to build the installer."/> <fail unless="sourceview.avail" message="You must have the sourceview source available to build the installer."/> @@ -399,7 +406,13 @@ size += file.length(); } - project.setNewProperty(attributes.get("property"), Math.round(size/1024)); + + roundedSize = Math.round(size/1024); + + echo = project.createTask("echo"); + echo.setMessage("Size: "+roundedSize+"Kb"); + echo.perform(); + project.setNewProperty(attributes.get("property"), roundedSize); } ]]> </scriptdef> @@ -422,10 +435,18 @@ <!-- copy html files --> <copy todir="${installer.build.dest}/installer"> <fileset dir="${installer.dir}"> - <include name="**/*.html"/> + <include name="*.html"/> </fileset> </copy> + <!-- copy other files --> + <copy todir="${installer.build.dest}"> + <fileset dir="${installer.dir}"> + <exclude name="*.html"/> + <include name="*"/> + </fileset> + </copy> + <!-- {{{ create the program tar.bz2 file --> <mkdir dir="${installer.program.dir}"/> @@ -448,7 +469,7 @@ </fileset> </copy> - <copy file="${build.dir}/${app.name}.jar" tofile="${installer.program.dir}/${app.name}.jar"/> + <copy file="${jsxe.jar}" todir="${installer.program.dir}"/> <!-- lib --> <mkdir dir="${installer.program.dir}/lib"/> <copy todir="${installer.program.dir}/lib"> @@ -457,9 +478,6 @@ </fileset> </copy> - <!-- create the windows exe --> - <antcall target="build-exe"/> - <!-- create the tar.bz2 for the installer --> <tar basedir="${installer.program.dir}" includes="**/*" tarfile="${installer.build.dir}/${app.name}-${app_version}-program.tar"/> <bzip2 src="${installer.build.dir}/${app.name}-${app_version}-program.tar" destfile="${installer.build.program.tar}"/> @@ -551,6 +569,47 @@ <!-- }}} --> + <!-- {{{ create the win tar.bz2 file --> + + <!-- copy the lib directory so that the jsXe.exe can be run + from the build dir --> + <mkdir dir="${build.dir}/lib"/> + <copy todir="${build.dir}/lib"> + <fileset dir="${build.lib}"> + <include name="**/*"/> + </fileset> + </copy> + + <!-- create the windows exe --> + <taskdef name="launch4j" + classname="net.sf.launch4j.ant.Launch4jTask" + classpath="${launch4j.classpath}"/> + + <launch4j configFile="${launch4j.config}" + outfile="${launch4j.jsxe.exe}" + jarPath="${launch4j.jsxe.jar}" + /> + + <mkdir dir="${installer.win.dir}"/> + <copy file="${jsxe.exe}" todir="${installer.win.dir}" /> + + <tar basedir="${installer.win.dir}" includes="**/*" tarfile="${installer.build.dir}/${app.name}-${app_version}-win.tar"/> + <bzip2 src="${installer.build.dir}/${app.name}-${app_version}-win.tar" destfile="${installer.build.win.tar}"/> + <delete file="${installer.build.dir}/${app.name}-${app_version}-win.tar"/> + + <!-- find the file size of the files on disk and compressed files --> + <filesize property="comp.4.disk-size"> + <fileset dir="${installer.win.dir}"> + <include name="**/*"/> + </fileset> + </filesize> + + <filesize property="comp.4.real-size"> + <fileset file="${installer.build.win.tar}"/> + </filesize> + + <!-- }}} --> + <!-- {{{ create the install.props file --> <propertyfile comment="${app.name}'s installer properties" file="${install.props}"> <entry key="app.name" value="${app.name}"/> @@ -559,6 +618,10 @@ <entry key="app.license.title" value="${app.license.title}"/> <entry key="app.license" value="${app.license}"/> <entry key="ostask.unix-script.label" value="${ostask.unix-script.label}"/> + <entry key="ostask.unix-desktop.label" value="${ostask.unix-desktop.label}"/> + <entry key="ostask.unix-desktop.pixmap" value="${ostask.unix-desktop.pixmap}"/> + <entry key="ostask.unix-desktop.shortcut" value="${ostask.unix-desktop.shortcut}"/> + <!--<entry key="ostask.unix-man.label" value="${ostask.unix-man.label}"/>--> <entry key="comp.count" value="${comp.count}"/> <entry key="comp.0.name" value="${comp.0.name}"/> @@ -580,6 +643,13 @@ <entry key="comp.3.disk-size" value="${comp.3.disk-size}"/> <entry key="comp.3.real-size" value="${comp.3.real-size}"/> <entry key="comp.3.fileset" value="${comp.3.fileset}"/> + + <entry key="comp.4.name" value="${comp.4.name}"/> + <entry key="comp.4.disk-size" value="${comp.4.disk-size}"/> + <entry key="comp.4.real-size" value="${comp.4.real-size}"/> + <entry key="comp.4.fileset" value="${comp.4.fileset}"/> + <entry key="comp.4.os" value="${comp.4.os}"/> + </propertyfile> <!-- }}} --> @@ -595,7 +665,7 @@ <!-- }}} --> <!-- {{{ create the install jar --> - <jar jarfile="${build.dir}/${app.name}-${app_version}-install.jar" manifest="${installer.build.dir}/installer.manifest"> + <jar jarfile="${installer.jar}" manifest="${installer.build.dir}/installer.manifest"> <fileset dir="${installer.build.dest}"> <include name="**/*"/> </fileset> @@ -603,18 +673,16 @@ <!-- }}} --> </target> - <target name="build-exe" if="windows.build"> - <taskdef name="jsmoothgen" - classname="net.charabia.jsmoothgen.ant.JSmoothGen" - classpath="${jsmooth.jar}"/> - - <jsmoothgen project="${jsmooth.project}" skeletonroot="${buildlib.dir}/skeletons"/> - <copy todir="${installer.program.dir}" file="${build.dir}/jsXe.exe"/> - </target> <!-- }}} --> <!-- {{{ ============ Generates a windows distribution ================= --> - <target depends="build-installer" name="win" if="windows.build" description="Build a windows distribution"> + <target depends="build-installer" name="win" description="Build a windows distribution"> + <taskdef name="launch4j" + classname="net.sf.launch4j.ant.Launch4jTask" + classpath="${launch4j.classpath}"/> + <launch4j configFile="${installer.launch4j.config}" + jar="${installer.jar}" + outfile="${installer.exe}"/> </target> <!-- }}} --> <!-- {{{ ============ Generates the binary distribution ================ --> @@ -661,7 +729,7 @@ </fileset> </copy> - <copy file="${build.dir}/${app.name}.jar" tofile="${distbin.dir}/${app.name}.jar"/> + <copy file="${jsxe.jar}" todir="${distbin.dir}"/> <!-- lib --> <mkdir dir="${distbin.dir}/lib"/> <copy todir="${distbin.dir}/lib"> @@ -695,7 +763,7 @@ </fileset> </copy> - <!-- api --> + <!-- api --> <mkdir dir="${distsrc.dir}/doc/api"/> <copy todir="${distsrc.dir}/doc/api"> <fileset dir="${build.javadocs}"> @@ -747,7 +815,7 @@ <include name="**/*"/> </fileset> </copy> - <copy todir="${distsrc.dir}" file="${jsmooth.project}"/> + <copy todir="${distsrc.dir}" file="${launch4j.config}"/> <!-- messages --> <mkdir dir="${distsrc.dir}/messages"/> Deleted: trunk/jsxe/buildlib/jsmoothgen-ant.jar =================================================================== (Binary files differ) Copied: trunk/jsxe/installer/jsxe-installer.ico (from rev 1144, tags/05pre3/jsxe/installer/jsxe-installer.ico) =================================================================== (Binary files differ) Copied: trunk/jsxe/installer/jsxe.desktop (from rev 1144, tags/05pre3/jsxe/installer/jsxe.desktop) =================================================================== --- trunk/jsxe/installer/jsxe.desktop (rev 0) +++ trunk/jsxe/installer/jsxe.desktop 2006-08-13 04:07:13 UTC (rev 1146) @@ -0,0 +1,14 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=jsXe XML Editor +Name[ja]=jsXe XML エディタ +GenericName=XML Editor +GenericName[ja]= +Comment=Edit XML Documents +Comment[ja]= +Exec=jsxe +Icon=jsxe.png +StartupNotify=true +Terminal=false +Type=Application +Categories=GNOME;Application;Utility; \ No newline at end of file Copied: trunk/jsxe/installer/jsxe.png (from rev 1144, tags/05pre3/jsxe/installer/jsxe.png) =================================================================== (Binary files differ) Copied: trunk/jsxe/installer/launch4j.xml (from rev 1144, tags/05pre3/jsxe/installer/launch4j.xml) =================================================================== --- trunk/jsxe/installer/launch4j.xml (rev 0) +++ trunk/jsxe/installer/launch4j.xml 2006-08-13 04:07:13 UTC (rev 1146) @@ -0,0 +1,20 @@ +<launch4jConfig> + <dontWrapJar>false</dontWrapJar> + <headerType>0</headerType> + <jar>..\build\jsXe-05_pre3-install.jar</jar> + <outfile>..\build\jsxe-installer.exe</outfile> + <errTitle>jsXe Installer</errTitle> + <jarArgs></jarArgs> + <chdir></chdir> + <customProcName>true</customProcName> + <stayAlive>false</stayAlive> + <icon>jsxe-installer.ico</icon> + <jre> + <path></path> + <minVersion>1.4.2</minVersion> + <maxVersion></maxVersion> + <initialHeapSize>16</initialHeapSize> + <maxHeapSize>64</maxHeapSize> + <args></args> + </jre> +</launch4jConfig> \ No newline at end of file Modified: trunk/jsxe/installer/src/installer/OperatingSystem.java =================================================================== --- trunk/jsxe/installer/src/installer/OperatingSystem.java 2006-08-13 04:04:39 UTC (rev 1145) +++ trunk/jsxe/installer/src/installer/OperatingSystem.java 2006-08-13 04:07:13 UTC (rev 1146) @@ -22,321 +22,372 @@ */ public abstract class OperatingSystem { - public abstract String getInstallDirectory(String name, String version); + public abstract String getInstallDirectory(String name, String version); - public abstract static class OSTask - { - protected Install installer; - protected String name; - protected String label; - protected String directory; - protected boolean enabled; + public abstract static class OSTask + { + protected Install installer; + protected String name; + protected String label; + protected String directory; + protected boolean enabled; - public OSTask(Install installer, String name) - { - this.installer = installer; - this.name = name; - this.label = installer.getProperty("ostask." + name + ".label"); - this.directory = getDefaultDirectory(installer); + public OSTask(Install installer, String name) + { + this.installer = installer; + this.name = name; + this.label = installer.getProperty("ostask." + name + ".label"); + this.directory = getDefaultDirectory(installer); - // on by default - enabled = true; - } + // on by default + enabled = true; + } - public String getName() - { - return name; - } + public String getName() + { + return name; + } - public String getLabel() - { - return label; - } + public String getLabel() + { + return label; + } - public String getDefaultDirectory(Install installer) - { - return null; - } + public String getDefaultDirectory(Install installer) + { + return null; + } - public String getDirectory() - { - return directory; - } + public String getDirectory() + { + return directory; + } - public boolean isEnabled() - { - return enabled; - } + public boolean isEnabled() + { + return enabled; + } - public void setEnabled(boolean enabled) - { - this.enabled = enabled; - } + public void setEnabled(boolean enabled) + { + this.enabled = enabled; + } - public void setDirectory(String directory) - { - this.directory = directory; - } + public void setDirectory(String directory) + { + this.directory = directory; + } - public abstract void perform(String installDir, - Vector filesets) throws IOException; - } + public abstract void perform(String installDir, + Vector filesets) throws IOException; + } - public OSTask[] getOSTasks(Install installer) - { - return new OSTask[0]; - } + public OSTask[] getOSTasks(Install installer) + { + return new OSTask[0]; + } - public void mkdirs(String directory) throws IOException - { - File file = new File(directory); - if(!file.exists()) - file.mkdirs(); - } + public void mkdirs(String directory) throws IOException + { + File file = new File(directory); + if(!file.exists()) + file.mkdirs(); + } - public static OperatingSystem getOperatingSystem() - { - if(os != null) - return os; + public static OperatingSystem getOperatingSystem() + { + if(os != null) + return os; - if(System.getProperty("mrj.version") != null) - os = new MacOS(); - else - { - String osName = System.getProperty("os.name"); - if(osName.indexOf("Windows") != -1) - os = new Windows(); - else if(osName.indexOf("OS/2") != -1) - os = new HalfAnOS(); - else if(osName.indexOf("VMS") != -1) - os = new VMS(); - else - os = new Unix(); - } + if(System.getProperty("mrj.version") != null) + os = new MacOS(); + else + { + String osName = System.getProperty("os.name"); + if(osName.indexOf("Windows") != -1) + os = new Windows(); + else if(osName.indexOf("OS/2") != -1) + os = new HalfAnOS(); + else if(osName.indexOf("VMS") != -1) + os = new VMS(); + else + os = new Unix(); + } - return os; - } + return os; + } - public static class Unix extends OperatingSystem - { - public String getInstallDirectory(String name, String version) - { - String dir = "/usr/local/share/"; - if(!new File(dir).canWrite()) - dir = System.getProperty("user.home"); + public static class Unix extends OperatingSystem + { + public String getInstallDirectory(String name, String version) + { + String dir = "/usr/local/share/"; + if(!new File(dir).canWrite()) + dir = System.getProperty("user.home"); - return new File(dir,name.toLowerCase() + "/" + version).getPath(); - } + return new File(dir,name.toLowerCase() + "/" + version).getPath(); + } - public class ScriptOSTask extends OSTask - { - public ScriptOSTask(Install installer) - { - super(installer,"unix-script"); - } + public class ScriptOSTask extends OSTask + { + public ScriptOSTask(Install installer) + { + super(installer,"unix-script"); + } - public String getDefaultDirectory(Install installer) - { - String dir = "/usr/local/"; - if(!new File(dir).canWrite()) - dir = System.getProperty("user.home"); + public String getDefaultDirectory(Install installer) + { + String dir = "/usr/local/"; + if(!new File(dir).canWrite()) + dir = System.getProperty("user.home"); - return new File(dir,"bin").getPath(); - } + return new File(dir,"... [truncated message content] |
|
From: <ian...@us...> - 2006-08-18 16:07:21
|
Revision: 1156 Author: ian_lewis Date: 2006-08-18 09:07:10 -0700 (Fri, 18 Aug 2006) ViewCVS: http://svn.sourceforge.net/jsxe/?rev=1156&view=rev Log Message: ----------- merge from the 0.5pre3 branch Modified Paths: -------------- trunk/jsxe/Changelog trunk/jsxe/messages/messages trunk/jsxe/messages/messages.de trunk/jsxe/messages/messages.ja trunk/jsxe/messages/messages.ru trunk/jsxe/src/net/sourceforge/jsxe/gui/Messages.java Modified: trunk/jsxe/Changelog =================================================================== --- trunk/jsxe/Changelog 2006-08-18 15:53:11 UTC (rev 1155) +++ trunk/jsxe/Changelog 2006-08-18 16:07:10 UTC (rev 1156) @@ -1,3 +1,7 @@ +08/17/2006 Ian Lewis <Ian...@me...> + + * Updated the German translation thanks to Dieter Steiner + 08/12/2006 Ian Lewis <Ian...@me...> * Added support for running jsXe in a wrapped exe using launch4j. Modified: trunk/jsxe/messages/messages =================================================================== --- trunk/jsxe/messages/messages 2006-08-18 15:53:11 UTC (rev 1155) +++ trunk/jsxe/messages/messages 2006-08-18 16:07:10 UTC (rev 1156) @@ -280,6 +280,7 @@ \ \ \ \ Trish Hartnett <tri...@us...>\n\n\ Translators:\n\ \ \ \ \ German (de) - Bianca Shöen\n\ + \ \ \ \ German (de) - Dieter Steiner <spo...@gm...>\n\ \ \ \ \ Swedish (sv) - Patrik Johansson <pa...@it...>\n\ \ \ \ \ Russian (ru) - Alexandr Gridnev <ale...@ya...>\n\n\ Past Contributers:\n\ Modified: trunk/jsxe/messages/messages.de =================================================================== (Binary files differ) Modified: trunk/jsxe/messages/messages.ja =================================================================== --- trunk/jsxe/messages/messages.ja 2006-08-18 15:53:11 UTC (rev 1155) +++ trunk/jsxe/messages/messages.ja 2006-08-18 16:07:10 UTC (rev 1156) @@ -1,23 +1,23 @@ -# JSXE Japanese properties file -# $Id$ -# Maintained by Ian Lewis -#:mode=properties: -#:tabSize=4:indentSize=4:noTabs=true: -#:folding=explicit:collapseFolds=1: - -#{{{ common properties - -common.ok=決定 -common.cancel=キャンセル +# JSXE Japanese properties file +# $Id$ +# Maintained by Ian Lewis +#:mode=properties: +#:tabSize=4:indentSize=4:noTabs=true: +#:folding=explicit:collapseFolds=1: + +#{{{ common properties + +common.ok=決定 +common.cancel=キャンセル common.open=開く common.save=保存 common.save.as=名前を付けて保存 common.close=閉じる -common.apply=適用 +common.apply=適用 common.more=次 common.insert=インサート -common.add=追加 -common.remove=削除 +common.add=追加 +common.remove=削除 common.moveUp=上げる common.moveDown=下げる @@ -25,41 +25,41 @@ #common.alt=Alt #common.shift=Shift #common.meta=Meta - + #}}} -#{{{ XML Terminology - -#{{{ XML Node Types -xml.element=要素 -xml.processing.instruction=処理命令 -xml.cdata=CDATAセクション -xml.text=テキスト +#{{{ XML Terminology + +#{{{ XML Node Types +xml.element=要素 +xml.processing.instruction=処理命令 +xml.cdata=CDATAセクション +xml.text=テキスト xml.entity.reference=エンティティ参照 -#xml.declaration=Element Declaration -xml.notation=表記法 +#xml.declaration=Element Declaration +xml.notation=表記法 xml.entity=エンティティ -#xml.entity=Entity Declaration -xml.comment=コメント -xml.attribute=属性 -xml.doctype=文書型 -#}}} - -xml.attribute.value.short=値 -xml.attribute.value=属性値 -xml.document=XMLドキュメント -xml.namespace=ネームスペース -xml.namespace.prefix=ネームスペース前置修飾子 +#xml.entity=Entity Declaration +xml.comment=コメント +xml.attribute=属性 +xml.doctype=文書型 +#}}} + +xml.attribute.value.short=値 +xml.attribute.value=属性値 +xml.document=XMLドキュメント +xml.namespace=ネームスペース +xml.namespace.prefix=ネームスペース前置修飾子 xml.namespace.prefix.short=前置修飾子 -#xml.namespace.decl=Namespace Declaration -xml.doctypedef=文書型 -xml.doctype.name=DTDの名前 -xml.doctype.public=公開識別子 -xml.doctype.system=システム識別子 -xml.schema=XMLスキーマ - -#}}} +#xml.namespace.decl=Namespace Declaration +xml.doctypedef=文書型 +xml.doctype.name=DTDの名前 +xml.doctype.public=公開識別子 +xml.doctype.system=システム識別子 +xml.schema=XMLスキーマ +#}}} + #{{{ Global Options Global.Options.Dialog.Title=Global Options Global.Options.Title=General @@ -91,20 +91,20 @@ 新しいショットカットは選択されてなかった。\n\ 今のショットカットを削除? #}}} - -#{{{ Document Options -Document.Options.Title=ドキュメント設定 -Document.Options.Encoding=エンコーディング: -#}}} - -#{{{ Menu Items - -File.Menu=ファイル -Edit.Menu=編集 -Help.Menu=ヘルプ -Tools.Menu=ツール -View.Menu=表示 - + +#{{{ Document Options +Document.Options.Title=ドキュメント設定 +Document.Options.Encoding=エンコーディング: +#}}} + +#{{{ Menu Items + +File.Menu=ファイル +Edit.Menu=編集 +Help.Menu=ヘルプ +Tools.Menu=ツール +View.Menu=表示 + #{{{ Action Labels new-file.label=新規作成 open-file.label=開く... @@ -127,28 +127,29 @@ document-options.label=ドキュメント設定... plugin-manager.label=プラグインマネジャー... -about-jsxe.label=jsXeについて... -#}}} - -#}}} - -#{{{ Dialogs - -#{{{ About dialag -about.title=jsXeについて -about.message=Released under the terms of the GNU General Public License\n\n\ - Active Contributors:\n\ - \ \ \ \ Ian Lewis <Ian...@me...>\n\ - \ \ \ \ Trish Hartnett <tri...@us...>\n\n\ - 翻訳者:\n\ - \ \ \ \ ドイツ語 (de) - Bianca Shöen\n\ - \ \ \ \ スウェーデン語 (sv) - Patrik Johansson <pa...@it...>\n\n\ - Past Contributers:\n\ - \ \ \ \ Aaron Flatten <afl...@us...>\n\ - \ \ \ \ Bilel Remmache <rb...@us...>\n\ - \ \ \ \ SVM <svm...@us...>\n\n\ - ホームページ: http://jsxe.sourceforge.net/ -#}}} - +about-jsxe.label=jsXeについて... #}}} +#}}} + +#{{{ Dialogs + +#{{{ About dialag +about.title=jsXeについて +about.message=Released under the terms of the GNU General Public License\n\n\ + Active Contributors:\n\ + \ \ \ \ Ian Lewis <Ian...@me...>\n\ + \ \ \ \ Trish Hartnett <tri...@us...>\n\n\ + 翻訳者:\n\ + \ \ \ \ ドイツ語 (de) - Bianca Shöen\n\ + \ \ \ \ ドイツ語 (de) - Dieter Steiner <spo...@gm...>\n\ + \ \ \ \ スウェーデン語 (sv) - Patrik Johansson <pa...@it...>\n\n\ + Past Contributers:\n\ + \ \ \ \ Aaron Flatten <afl...@us...>\n\ + \ \ \ \ Bilel Remmache <rb...@us...>\n\ + \ \ \ \ SVM <svm...@us...>\n\n\ + ホームページ: http://jsxe.sourceforge.net/ +#}}} + +#}}} + Modified: trunk/jsxe/messages/messages.ru =================================================================== --- trunk/jsxe/messages/messages.ru 2006-08-18 15:53:11 UTC (rev 1155) +++ trunk/jsxe/messages/messages.ru 2006-08-18 16:07:10 UTC (rev 1156) @@ -271,6 +271,7 @@ \ \ \ \ Trish Hartnett <tri...@us...>\n\n\ Переводчики:\n\ \ \ \ \ German (de) - Bianca Sh\u00f6en\n\ + \ \ \ \ German (de) - Dieter Steiner <spo...@gm...>\n\ \ \ \ \ Swedish (sv) - Patrik Johansson <pa...@it...>\n\n\ В прошлом учавствовали в разработке:\n\ \ \ \ \ Aaron Flatten <afl...@us...>\n\ Modified: trunk/jsxe/src/net/sourceforge/jsxe/gui/Messages.java =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/gui/Messages.java 2006-08-18 15:53:11 UTC (rev 1155) +++ trunk/jsxe/src/net/sourceforge/jsxe/gui/Messages.java 2006-08-18 16:07:10 UTC (rev 1156) @@ -94,7 +94,7 @@ // // Locale.setDefault(new Locale("sv")); // // Locale.setDefault(Locale.GERMANY); // // Locale.setDefault(Locale.JAPAN); - // Locale.setDefault(new Locale("ru", "RU")); + // // Locale.setDefault(new Locale("ru", "RU")); // } private static Locale m_locale = Locale.getDefault(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <ian...@us...> - 2006-08-27 13:34:54
|
Revision: 1165 Author: ian_lewis Date: 2006-08-27 06:30:41 -0700 (Sun, 27 Aug 2006) ViewCVS: http://svn.sourceforge.net/jsxe/?rev=1165&view=rev Log Message: ----------- merge from the 0.5pre3 branch Modified Paths: -------------- trunk/jsxe/Changelog trunk/jsxe/messages/messages trunk/jsxe/messages/messages.ru trunk/jsxe/src/net/sourceforge/jsxe/ActionManager.java trunk/jsxe/src/net/sourceforge/jsxe/gui/TabbedView.java Modified: trunk/jsxe/Changelog =================================================================== --- trunk/jsxe/Changelog 2006-08-23 03:42:41 UTC (rev 1164) +++ trunk/jsxe/Changelog 2006-08-27 13:30:41 UTC (rev 1165) @@ -1,3 +1,12 @@ +08/21/2006 Ian Lewis <Ian...@me...> + + * Updated russian translation. + +08/18/2006 Ian Lewis <Ian...@me...> + + * Added a hack to disable view specific actions that aren't implemented by + the view. + 08/17/2006 Ian Lewis <Ian...@me...> * Updated the German translation thanks to Dieter Steiner Modified: trunk/jsxe/messages/messages =================================================================== --- trunk/jsxe/messages/messages 2006-08-23 03:42:41 UTC (rev 1164) +++ trunk/jsxe/messages/messages 2006-08-27 13:30:41 UTC (rev 1165) @@ -20,6 +20,7 @@ common.remove=Remove common.moveUp=Move Up common.moveDown=Move Down +common.find=Find common.ctrl=Ctrl common.alt=Alt Modified: trunk/jsxe/messages/messages.ru =================================================================== --- trunk/jsxe/messages/messages.ru 2006-08-23 03:42:41 UTC (rev 1164) +++ trunk/jsxe/messages/messages.ru 2006-08-27 13:30:41 UTC (rev 1165) @@ -1,5 +1,5 @@ # JSXE English properties file -# $Id: +# $Id: messages 1158 2006-08-18 18:42:18Z ian_lewis $ # Maintained by Alexandr Gridnev (ale...@ya...) #:mode=properties: #:tabSize=4:indentSize=4:noTabs=true: @@ -20,11 +20,7 @@ common.remove=Удалить common.moveUp=Поднять common.moveDown=Опустить -common.cut=Вырезать -common.copy=Копировать -common.paste=Вставить -common.find=Искать... -common.findnext=Искать следующий +common.find=Искать common.ctrl=Ctrl common.alt=Alt @@ -73,6 +69,8 @@ Global.Options.network-always=Скачивать всегда, без спросу Global.Options.network=Скачивание DTD и схемы: Global.Options.Menu.Spill.Over=Меню выпадают после: +Global.Options.Undos.To.Remember=Запомнить действий: +Global.Options.Undos.To.Remember.ToolTip=<HTML>jsXe запомнит столько действий и потом их можно будет отменить.<BR> Однако он не может запомнить действия, выполненные после переключения видов</HTML> Shortcuts.Options.Title=Горячие клавиши Shortcuts.Options.Select.Label=Редактировать горячие клавиши: @@ -140,7 +138,10 @@ Tools.Menu=Инструменты Help.Menu=Справка -#{{{ File Menu Items + +#}}} + +#{{{ Action Labels new-file.label=Новый open-file.label=Открыть... File.Recent=Ранее открытые файлы @@ -148,16 +149,25 @@ save-file.label=Сохранить save-as.label=Сохранить как... reload-file.label=Открыть еще раз +File.Recent=Ранее открытые файлы close-file.label=Закрыть close-all.label=Закрыть все exit.label=Выход -#}}} +undo.label=Отменить +redo.label=Повторить +cut.label=Вырезать +copy.label=Копировать +paste.label=Вставить +find.label=Искать... +findnext.label=Искать далее + general-options.label=Глобальные опции... document-options.label=Опции документа... plugin-manager.label=Менеджер плагинов... validation-errors.label=Ошибки подтверждения... about-jsxe.label=О программе jsXe... + #}}} #{{{ Messages Modified: trunk/jsxe/src/net/sourceforge/jsxe/ActionManager.java =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/ActionManager.java 2006-08-23 03:42:41 UTC (rev 1164) +++ trunk/jsxe/src/net/sourceforge/jsxe/ActionManager.java 2006-08-27 13:30:41 UTC (rev 1165) @@ -33,6 +33,7 @@ import net.sourceforge.jsxe.util.Log; import net.sourceforge.jsxe.util.MiscUtilities; import net.sourceforge.jsxe.msg.PropertyChanged; +import net.sourceforge.jsxe.action.ViewSpecificAction; //}}} //{{{ Java classes Modified: trunk/jsxe/src/net/sourceforge/jsxe/gui/TabbedView.java =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/gui/TabbedView.java 2006-08-23 03:42:41 UTC (rev 1164) +++ trunk/jsxe/src/net/sourceforge/jsxe/gui/TabbedView.java 2006-08-27 13:30:41 UTC (rev 1165) @@ -428,6 +428,7 @@ menubar.add(m_fileMenu); + createEditMenu(); menubar.add(m_editMenu); //Add View Specific Menus @@ -572,6 +573,86 @@ }//}}} + //{{{ createEditMenu() + + private void createEditMenu() { + m_editMenu = new JMenu(Messages.getMessage("Edit.Menu")); + m_editMenu.setMnemonic('E'); + + DocumentView view = getDocumentView(); + JMenuItem menuItem = new JMenuItem(ActionManager.getAction("undo")); + m_editMenu.add(menuItem); + menuItem = new JMenuItem(ActionManager.getAction("redo")); + m_editMenu.add(menuItem); + m_editMenu.addSeparator(); + Action action = ActionManager.getAction("cut"); + if (view != null) { + String name = jsXe.getPluginLoader().getPluginProperty(view.getViewPlugin(), JARClassLoader.PLUGIN_NAME)+".cut"; + if (ActionManager.getLocalizedAction(name) == null) { + action.setEnabled(false); + } else { + action.setEnabled(true); + } + } else { + action.setEnabled(false); + } + menuItem = new JMenuItem(action); + m_editMenu.add(menuItem); + action = ActionManager.getAction("copy"); + if (view != null) { + String name = jsXe.getPluginLoader().getPluginProperty(view.getViewPlugin(), JARClassLoader.PLUGIN_NAME)+".copy"; + if (ActionManager.getLocalizedAction(name) == null) { + action.setEnabled(false); + } else { + action.setEnabled(true); + } + } else { + action.setEnabled(false); + } + menuItem = new JMenuItem(action); + m_editMenu.add(menuItem); + action = ActionManager.getAction("paste"); + if (view != null) { + String name = jsXe.getPluginLoader().getPluginProperty(view.getViewPlugin(), JARClassLoader.PLUGIN_NAME)+".paste"; + if (ActionManager.getLocalizedAction(name) == null) { + action.setEnabled(false); + } else { + action.setEnabled(true); + } + } else { + action.setEnabled(false); + } + menuItem = new JMenuItem(action); + m_editMenu.add(menuItem); + m_editMenu.addSeparator(); + action = ActionManager.getAction("find"); + if (view != null) { + String name = jsXe.getPluginLoader().getPluginProperty(view.getViewPlugin(), JARClassLoader.PLUGIN_NAME)+".find"; + if (ActionManager.getLocalizedAction(name) == null) { + action.setEnabled(false); + } else { + action.setEnabled(true); + } + } else { + action.setEnabled(false); + } + menuItem = new JMenuItem(action); + m_editMenu.add(menuItem); + action = ActionManager.getAction("findnext"); + if (view != null) { + String name = jsXe.getPluginLoader().getPluginProperty(view.getViewPlugin(), JARClassLoader.PLUGIN_NAME)+".findnext"; + if (ActionManager.getLocalizedAction(name) == null) { + action.setEnabled(false); + } else { + action.setEnabled(true); + } + } else { + action.setEnabled(false); + } + menuItem = new JMenuItem(action); + m_editMenu.add(menuItem); + }//}}} + //{{{ createDefaultMenuItems() private void createDefaultMenuItems() { @@ -606,24 +687,7 @@ //}}} //{{{ Create Edit Menu - m_editMenu = new JMenu(Messages.getMessage("Edit.Menu")); - m_editMenu.setMnemonic('E'); - menuItem = new JMenuItem(ActionManager.getAction("undo")); - m_editMenu.add(menuItem); - menuItem = new JMenuItem(ActionManager.getAction("redo")); - m_editMenu.add(menuItem); - m_editMenu.addSeparator(); - menuItem = new JMenuItem(ActionManager.getAction("cut")); - m_editMenu.add(menuItem); - menuItem = new JMenuItem(ActionManager.getAction("copy")); - m_editMenu.add(menuItem); - menuItem = new JMenuItem(ActionManager.getAction("paste")); - m_editMenu.add(menuItem); - m_editMenu.addSeparator(); - menuItem = new JMenuItem(ActionManager.getAction("find")); - m_editMenu.add(menuItem); - menuItem = new JMenuItem(ActionManager.getAction("findnext")); - m_editMenu.add(menuItem); + createEditMenu(); //}}} //{{{ Create View Menu This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <ian...@us...> - 2006-08-27 14:58:56
|
Revision: 1171 Author: ian_lewis Date: 2006-08-27 07:58:47 -0700 (Sun, 27 Aug 2006) ViewCVS: http://svn.sourceforge.net/jsxe/?rev=1171&view=rev Log Message: ----------- Update from 05pre3 branch Modified Paths: -------------- trunk/jsxe/Changelog trunk/jsxe/INSTALL trunk/jsxe/installer/launch4j.xml trunk/jsxe/launch4j.xml Modified: trunk/jsxe/Changelog =================================================================== --- trunk/jsxe/Changelog 2006-08-27 14:55:31 UTC (rev 1170) +++ trunk/jsxe/Changelog 2006-08-27 14:58:47 UTC (rev 1171) @@ -1,3 +1,10 @@ +08/27/2006 Ian Lewis <Ian...@me...> + + * Updated the launch4j script to set the absolute path of the lib directory + in the jre option to set the endorsed dirs. This will allow jsXe to be + launched from anywhere and still be able to find the right version of + Xerces. + 08/21/2006 Ian Lewis <Ian...@me...> * Updated russian translation. Modified: trunk/jsxe/INSTALL =================================================================== --- trunk/jsxe/INSTALL 2006-08-27 14:55:31 UTC (rev 1170) +++ trunk/jsxe/INSTALL 2006-08-27 14:58:47 UTC (rev 1171) @@ -1,8 +1,8 @@ REQUIREMENTS -Java 1.4.2 -Xerces 2.8.0 -launch4j (for building the installer from source) +Java >= 1.4.2 +Xerces >= 2.8.0 +launch4j >= 3.0.0pre1 (for building the installer from source) GETTING jsXe @@ -83,6 +83,10 @@ Unpack the distribution file wherever you like. Normally you would install it in C:\Program Files\ or /usr/local/share/ or something like that. +Or + +Run the install program and follow the prompts to install jsXe. + RUNNING jsXe You should have 1.4.2 or better of java and you need 2.8.0 of Xerces. Modified: trunk/jsxe/installer/launch4j.xml =================================================================== --- trunk/jsxe/installer/launch4j.xml 2006-08-27 14:55:31 UTC (rev 1170) +++ trunk/jsxe/installer/launch4j.xml 2006-08-27 14:58:47 UTC (rev 1171) @@ -10,11 +10,8 @@ <stayAlive>false</stayAlive> <icon>jsxe-installer.ico</icon> <jre> - <path></path> <minVersion>1.4.2</minVersion> - <maxVersion></maxVersion> <initialHeapSize>16</initialHeapSize> <maxHeapSize>64</maxHeapSize> - <args></args> </jre> </launch4jConfig> \ No newline at end of file Modified: trunk/jsxe/launch4j.xml =================================================================== --- trunk/jsxe/launch4j.xml 2006-08-27 14:55:31 UTC (rev 1170) +++ trunk/jsxe/launch4j.xml 2006-08-27 14:58:47 UTC (rev 1171) @@ -1,23 +1,19 @@ <launch4jConfig> <dontWrapJar>true</dontWrapJar> - <headerType>0</headerType> + <headerType>gui</headerType> <jar>jsXe.jar</jar> <outfile>build\jsXe.exe</outfile> <errTitle>jsXe</errTitle> - <jarArgs></jarArgs> + <cmdLine></cmdLine> <chdir></chdir> <customProcName>true</customProcName> <stayAlive>false</stayAlive> <icon>jsxe.ico</icon> <jre> - <path></path> <minVersion>1.4.2</minVersion> - <maxVersion></maxVersion> + <dontUsePrivateJres>false</dontUsePrivateJres> <initialHeapSize>16</initialHeapSize> <maxHeapSize>64</maxHeapSize> - <args>-Djava.endorsed.dirs=lib - - -</args> + <opt>-Dlaunch4j.exedir="%EXEDIR%"</opt> </jre> </launch4jConfig> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <ian...@us...> - 2006-08-27 23:20:02
|
Revision: 1177 Author: ian_lewis Date: 2006-08-27 16:19:52 -0700 (Sun, 27 Aug 2006) ViewCVS: http://svn.sourceforge.net/jsxe/?rev=1177&view=rev Log Message: ----------- Merge from 05pre3 branch Modified Paths: -------------- trunk/jsxe/Changelog trunk/jsxe/installer/src/installer/OperatingSystem.java Modified: trunk/jsxe/Changelog =================================================================== --- trunk/jsxe/Changelog 2006-08-27 23:16:56 UTC (rev 1176) +++ trunk/jsxe/Changelog 2006-08-27 23:19:52 UTC (rev 1177) @@ -4,6 +4,9 @@ in the jre option to set the endorsed dirs. This will allow jsXe to be launched from anywhere and still be able to find the right version of Xerces. + * Updated the installer to create a script file in unix that uses the java + in the environment path and use the HotSpot server so that jsXe runs + faster at the cost of startup time and memory footprint. 08/21/2006 Ian Lewis <Ian...@me...> Modified: trunk/jsxe/installer/src/installer/OperatingSystem.java =================================================================== --- trunk/jsxe/installer/src/installer/OperatingSystem.java 2006-08-27 23:16:56 UTC (rev 1176) +++ trunk/jsxe/installer/src/installer/OperatingSystem.java 2006-08-27 23:19:52 UTC (rev 1177) @@ -170,15 +170,18 @@ out.write("#!/bin/sh\n"); out.write("# Java heap size, in megabytes\n"); out.write("JAVA_HEAP_SIZE=32\n"); - out.write("DEFAULT_JAVA_HOME=\"" + out.write("#DEFAULT_JAVA_HOME=\"" + System.getProperty("java.home") + "\"\n"); - out.write("if [ \"$JAVA_HOME\" = \"\" ]; then\n"); - out.write("JAVA_HOME=\"$DEFAULT_JAVA_HOME\"\n"); - out.write("fi\n"); + out.write("#if [ \"$JAVA_HOME\" = \"\" ]; then\n"); + out.write("#JAVA_HOME=\"$DEFAULT_JAVA_HOME\"\n"); + out.write("#fi\n"); - out.write("exec \"$JAVA_HOME" - + "/bin/java\" -mx${JAVA_HEAP_SIZE}m "+vmArgs+" ${" + // out.write("exec \"$JAVA_HOME" + // + "/bin/java\" -mx${JAVA_HEAP_SIZE}m "+vmArgs+" ${" + // + name.toUpperCase() + "} "); + // use java in the path and run using the HotSpot server + out.write("exec java -server -mx${JAVA_HEAP_SIZE}m "+vmArgs+" ${" + name.toUpperCase() + "} "); // String jar = installDir + File.separator This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <ian...@us...> - 2006-08-28 02:40:22
|
Revision: 1179 Author: ian_lewis Date: 2006-08-27 19:40:08 -0700 (Sun, 27 Aug 2006) ViewCVS: http://svn.sourceforge.net/jsxe/?rev=1179&view=rev Log Message: ----------- Added option to show the full path to a file in the recent files menu Modified Paths: -------------- trunk/jsxe/Changelog trunk/jsxe/messages/messages trunk/jsxe/src/net/sourceforge/jsxe/action/OpenRecentFileAction.java trunk/jsxe/src/net/sourceforge/jsxe/gui/TabbedView.java trunk/jsxe/src/net/sourceforge/jsxe/options/GeneralOptionPane.java trunk/jsxe/src/net/sourceforge/jsxe/properties Modified: trunk/jsxe/Changelog =================================================================== --- trunk/jsxe/Changelog 2006-08-28 02:08:14 UTC (rev 1178) +++ trunk/jsxe/Changelog 2006-08-28 02:40:08 UTC (rev 1179) @@ -7,6 +7,8 @@ * Updated the installer to create a script file in unix that uses the java in the environment path and use the HotSpot server so that jsXe runs faster at the cost of startup time and memory footprint. + * Added an option to display the full path to a file in the recent files + menu. Feature Request #1546371 08/21/2006 Ian Lewis <Ian...@me...> Modified: trunk/jsxe/messages/messages =================================================================== --- trunk/jsxe/messages/messages 2006-08-28 02:08:14 UTC (rev 1178) +++ trunk/jsxe/messages/messages 2006-08-28 02:40:08 UTC (rev 1179) @@ -64,6 +64,8 @@ Global.Options.Title=General Global.Options.Max.Recent.Files=Recent files to remember: Global.Options.Max.Recent.Files.ToolTip=The maximum number of files that jsXe remembers in the recent files menu. +Global.Options.Recent.Files.Show.Full.Path=Show full path in Recent Files menu +Global.Options.Recent.Files.Show.Full.Path.ToolTip=If this checkbox is checked then the full path will be shown for files in the recent files menu. Global.Options.network-off=Always cache without asking Global.Options.network-cache=Ask first, then cache remote files Global.Options.network-always=Always download without asking Modified: trunk/jsxe/src/net/sourceforge/jsxe/action/OpenRecentFileAction.java =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/action/OpenRecentFileAction.java 2006-08-28 02:08:14 UTC (rev 1178) +++ trunk/jsxe/src/net/sourceforge/jsxe/action/OpenRecentFileAction.java 2006-08-28 02:40:08 UTC (rev 1179) @@ -68,11 +68,13 @@ //{{{ OpenRecentFileAction constructor public OpenRecentFileAction(TabbedView parent, BufferHistory.BufferHistoryEntry entry) { String path = entry.getPath(); - String fileName = path.substring(path.lastIndexOf(System.getProperty("file.separator"))+1); + String fileName = path; + if (!jsXe.getBooleanProperty("recent.files.show.full.path", false)) { + fileName = path.substring(path.lastIndexOf(System.getProperty("file.separator"))+1); + } if (fileName.equals("")) { fileName = path; - } - putValue(Action.NAME, fileName); + }putValue(Action.NAME, fileName); m_view = parent; m_entry = entry; }//}}} Modified: trunk/jsxe/src/net/sourceforge/jsxe/gui/TabbedView.java =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/gui/TabbedView.java 2006-08-28 02:08:14 UTC (rev 1178) +++ trunk/jsxe/src/net/sourceforge/jsxe/gui/TabbedView.java 2006-08-28 02:40:08 UTC (rev 1179) @@ -556,6 +556,10 @@ createDefaultMenuItems(); updateMenuBar(); } + + if (msg.getKey().equals("recent.files.show.full.path")) { + updateRecentFilesMenu(); + } } /* Modified: trunk/jsxe/src/net/sourceforge/jsxe/options/GeneralOptionPane.java =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/options/GeneralOptionPane.java 2006-08-28 02:08:14 UTC (rev 1178) +++ trunk/jsxe/src/net/sourceforge/jsxe/options/GeneralOptionPane.java 2006-08-28 02:40:08 UTC (rev 1179) @@ -29,6 +29,7 @@ import net.sourceforge.jsxe.CatalogManager; import net.sourceforge.jsxe.gui.Messages; import javax.swing.JComboBox; +import javax.swing.JCheckBox; import javax.swing.JTextField; import java.util.Vector; //}}} @@ -123,6 +124,15 @@ //}}} + //{{{ Recent files full path + + boolean showFullPath = jsXe.getBooleanProperty("recent.files.show.full.path", false); + m_showFullPathCheckBox = new JCheckBox(Messages.getMessage("Global.Options.Recent.Files.Show.Full.Path"),showFullPath); + + addComponent(m_showFullPathCheckBox, Messages.getMessage("Global.Options.Recent.Files.Show.Full.Path")); + + //}}} + }//}}} //{{{ _save() @@ -143,6 +153,7 @@ //Bad input, don't save. } jsXe.setIntegerProperty("xml.cache",network.getSelectedIndex()); + jsXe.setBooleanProperty("recent.files.show.full.path", m_showFullPathCheckBox.isSelected()); CatalogManager.propertiesChanged(); }//}}} @@ -155,6 +166,7 @@ private JComboBox menuSpillOverComboBox; private JComboBox maxRecentFilesComboBox; private JTextField m_undosToRemember; + private JCheckBox m_showFullPathCheckBox; private JComboBox network; //}}} Modified: trunk/jsxe/src/net/sourceforge/jsxe/properties =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/properties 2006-08-28 02:08:14 UTC (rev 1178) +++ trunk/jsxe/src/net/sourceforge/jsxe/properties 2006-08-28 02:40:08 UTC (rev 1179) @@ -15,6 +15,8 @@ undo.limit=100 +recent.files.show.full.path=false + #{{{ Plugin Manager Default Dimensions #pluginmgr.x=100 #pluginmgr.y=100 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <ian...@us...> - 2006-08-28 15:48:41
|
Revision: 1182 Author: ian_lewis Date: 2006-08-28 08:48:25 -0700 (Mon, 28 Aug 2006) ViewCVS: http://svn.sourceforge.net/jsxe/?rev=1182&view=rev Log Message: ----------- Updated the messages files to me named the standard ResourceBundle way Modified Paths: -------------- trunk/jsxe/Changelog trunk/jsxe/src/net/sourceforge/jsxe/gui/Messages.java Added Paths: ----------- trunk/jsxe/messages/messages.properties trunk/jsxe/messages/messages_de.properties trunk/jsxe/messages/messages_ja.properties trunk/jsxe/messages/messages_ru.properties trunk/jsxe/messages/messages_sv.properties Removed Paths: ------------- trunk/jsxe/messages/messages trunk/jsxe/messages/messages.de trunk/jsxe/messages/messages.ja trunk/jsxe/messages/messages.ru trunk/jsxe/messages/messages.sv Modified: trunk/jsxe/Changelog =================================================================== --- trunk/jsxe/Changelog 2006-08-28 04:04:14 UTC (rev 1181) +++ trunk/jsxe/Changelog 2006-08-28 15:48:25 UTC (rev 1182) @@ -1,3 +1,7 @@ +08/28/2006 Ian Lewis <Ian...@me...> + + * Changed the messages files to be named the standard ResourceBundle way. + 08/27/2006 Ian Lewis <Ian...@me...> * Updated the launch4j script to set the absolute path of the lib directory Deleted: trunk/jsxe/messages/messages =================================================================== --- trunk/jsxe/messages/messages 2006-08-28 04:04:14 UTC (rev 1181) +++ trunk/jsxe/messages/messages 2006-08-28 15:48:25 UTC (rev 1182) @@ -1,300 +0,0 @@ -# JSXE English properties file -# $Id$ -# Maintained by Ian Lewis -#:mode=properties: -#:tabSize=4:indentSize=4:noTabs=true: -#:folding=explicit:collapseFolds=1: - -#{{{ common properties - -common.ok=OK -common.cancel=Cancel -common.open=Open -common.save=Save -common.save.as=Save As -common.close=Close -common.apply=Apply -common.more=More -common.insert=Insert -common.add=Add -common.remove=Remove -common.moveUp=Move Up -common.moveDown=Move Down -common.find=Find - -common.ctrl=Ctrl -common.alt=Alt -common.shift=Shift -common.meta=Meta - -#}}} - -#{{{ XML Terminology - -#{{{ XML Node Types -xml.element=Element -xml.processing.instruction=Processing Instruction -xml.cdata=CDATA Section -xml.text=Text -xml.entity.reference=Entity Reference -xml.declaration=Element Declaration -xml.notation=Notation -xml.entity=Entity Declaration -xml.comment=Comment -xml.attribute=Attribute -xml.doctype=Document Type -#}}} - -xml.attribute.value.short=Value -xml.attribute.value=Attribute Value -xml.document=XML Document -xml.namespace=Namespace -xml.namespace.prefix=Namespace Prefix -xml.namespace.prefix.short=Prefix -xml.namespace.decl=Namespace Declaration -xml.doctypedef=Document Type Definition -xml.doctype.name=Name -xml.doctype.public=Public Id -xml.doctype.system=System Id -xml.schema=XML Schema -#}}} - -#{{{ Global Options -Global.Options.Dialog.Title=Global Options -Global.Options.Title=General -Global.Options.Max.Recent.Files=Recent files to remember: -Global.Options.Max.Recent.Files.ToolTip=The maximum number of files that jsXe remembers in the recent files menu. -Global.Options.Recent.Files.Show.Full.Path=Show full path in Recent Files menu -Global.Options.Recent.Files.Show.Full.Path.ToolTip=If this checkbox is checked then the full path will be shown for files in the recent files menu. -Global.Options.network-off=Always cache without asking -Global.Options.network-cache=Ask first, then cache remote files -Global.Options.network-always=Always download without asking -Global.Options.network=DTD and schema downloading: -Global.Options.Menu.Spill.Over=Number of items before menus spill over: -Global.Options.Undos.To.Remember=Number of undos to remember: -Global.Options.Undos.To.Remember.ToolTip=<HTML>jsXe will remember this number of undo operations in memory.<BR> However, it cannot remember undo operations after switching views</HTML> - -Shortcuts.Options.Title=Shortcuts -Shortcuts.Options.Select.Label=Edit Shortcuts: -Shortcuts.Options.Shortcut=Shortcut -Shortcuts.Options.Command=Command - -Grab.Key.title=Specify Shortcut -Grab.Key.caption=Press the desired shortcut for "{0}", then click OK. -Grab.Key.keyboard-test=Input the key strokes that are causing problems. -Grab.Key.assigned-to=Currently assigned to: {0} -Grab.Key.assigned-to.none=<none> -Grab.Key.clear=Clear -Grab.Key.remove=Remove Current - -Grab.Key.remove-ask.title=Remove Shortcut? -Grab.Key.remove-ask.message=\ - You didn't specify a new shortcut.\n\ - Do you want to remove the current shortcut? - -Grab.Key.duplicate-alt-shortcut.title=Duplicate Shortcut -Grab.Key.duplicate-alt-shortcut.message=\ - The shortcut you selected duplicates the other\n\ - shortcut for this item. Please choose another. - -Grab.Key.duplicate-shortcut.title=Duplicate Shortcut -Grab.Key.duplicate-shortcut.message=\ - This shortcut is already assigned to\n\ - "{0}".\n\ - \n\ - Do you want to override this assignment? -#}}} - -#{{{ Document Options -Document.Options.Title=XML Document Options -Document.Options.Message=This dialog changes settings for the current\n document only. To change settings on an\n editor-wide basis, see the\n Tools->Global Options dialog box. -Document.Options.Line.Separator=Line Separator: -Document.Options.Line.Separator.ToolTip=The line separator. Usually you'll pick the line separator used by your operating system. -Document.Options.Encoding=Encoding: -Document.Options.Encoding.ToolTip=The encoding that jsXe uses to write the file. -Document.Options.Indent.Width=Indent width: -Document.Options.Indent.Width.ToolTip=The width used when formatting and displaying tab characters. -Document.Options.Format.XML=Format XML output -Document.Options.Format.XML.ToolTip=If this box is checked then XML will be formatted automatically. -Document.Options.Validate=Validate if DTD or Schema Available -Document.Options.Validate.ToolTip=If this box is checked jsXe will validate the XML document. -Document.Options.Soft.Tabs=Soft tabs (emulated with spaces) -Document.Options.Soft.Tabs.ToolTip=If this box is checked then tab characters are replaced by spaces. -#}}} - -#{{{ Plugin Manager -Plugin.Manager.Title=Plugin Manager -Plugin.Manager.Name.Column.Header=Name -Plugin.Manager.Version.Column.Header=Version -Plugin.Manager.Status.Column.Header=Status -Plugin.Manager.Loaded.Status=Loaded -Plugin.Manager.Not.Loaded.Status=Not Loaded -Plugin.Manager.Broken.Status=Error -#}}} - -#{{{ Menu Items - -File.Menu=File -Edit.Menu=Edit -View.Menu=View -Tools.Menu=Tools -Help.Menu=Help - - -#}}} - -#{{{ Action Labels -new-file.label=New -open-file.label=Open... -File.Recent=Recent Files -File.Recent.None=No Recent Files -save-file.label=Save -save-as.label=Save As... -reload-file.label=Reload -File.Recent=Recent Files -close-file.label=Close -close-all.label=Close All -exit.label=Exit - -undo.label=Undo -redo.label=Redo -cut.label=Cut -copy.label=Copy -paste.label=Paste -find.label=Find... -findnext.label=Find Next - -general-options.label=Global Options... -document-options.label=Document Options... -plugin-manager.label=Plugin Manager... -validation-errors.label=Validation Errors... -about-jsxe.label=About jsXe... - -#}}} - -#{{{ Messages - -DocumentView.Open.Message="Could not open buffer in any installed document views" - -#{0} file name -DocumentBuffer.Reload.Message={0} unsaved!\n You will lose all unsaved changes if you reload!\n\nContinue? -DocumentBuffer.Reload.Message.Title=Document Modified -DocumentBuffer.SaveAs.Message=The file {0} already exists. Are you sure you want to overwrite it? -DocumentBuffer.SaveAs.Message.Title=File Exists -DocumentBuffer.Close.Message={0} unsaved! Save it now? -DocumentBuffer.Close.Message.Title=Unsaved Changes - -#{0} file name -DocumentBuffer.Saved.Message={0} Saved -DocumentBuffer.Closed.Message={0} Closed -DocumentBuffer.Loaded.Message={0} Loaded -DocumentBuffer.Reloaded.Message={0} Reloaded - -#{0} plugin name -DocumentView.Not.Found=No plugin a with name of {0} exists. - -#{{{ Plugin Load Messages - -# {0} plugin name -Plugin.Error.title=Plugin Error -Plugin.Error.List.message=The following plugins could not be loaded: -Plugin.Load.Already.Loaded=Plugin {0} already loaded. -Plugin.Load.Wrong.Main.Class=Main class is not a plugin class. -Plugin.Load.No.Plugin.Class=No plugin class defined. -Plugin.Load.No.Plugin.Name=No plugin name defined. -Plugin.Load.No.Plugin.HR.Name=No plugin human-readable name defined. -Plugin.Load.No.Plugin.Version=No plugin version defined. - -# {0} plugin name -# {1} requirement name -# {2} required version -# {3} found version -Plugin.Dependency.Message={0} requires {1} version {2} but only version {3} was found. -# {0} plugin name -# {1} requirement name -# {2} required version -Plugin.Dependency.Not.Found={0} requires {1} version {2} but {1} was not found. -# {0} plugin name -# {1} requirement name -Plugin.Dependency.Not.Found2={0} requires {1} but {1} was not found. -# {0} plugin name -# {1} invalid dependency -Plugin.Dependency.Invalid={0} has an invalid dependency: {1} -# {0} invalid version -Plugin.Dependency.Invalid.jsXe.Version=Invalid jsXe version number: {0} -# {0} plugin name -# {1} requirement name -Plugin.Dependency.No.Version=Cannot load plugin {0}, {1} has no version. -# {0} plugin name -# {1} requirement name -Plugin.Dependency.Failed.Load={0} requires plugin {1} but {1} did not load properly. - -#}}} - -#{{{ Error Messages -No.Xerces.Error.message={0} not found. jsXe requires Apache {0}. -No.Xerces.Error.title={0} not found. -IO.Error.title=I/O Error -IO.Error.message=An I/O error has occurred -#}}} - -#}}} - -#{{{ Dialogs - -#{{{ Download resource dialog -xml.download-resource.title=Getting resource from remote server - -#{0} URL -xml.download-resource.message=This XML file depends on a resource which is stored at the following\n\ - Internet address:\n\ - \n\ - {0}\n\ - \n\ - Do you want the XML plugin to download the resource and cache it\n\ - for future use?\n\ - \n\ - If you want resources to be downloaded every time without prompting,\n\ - disable the resource cache in jsXe's global options. -#}}} - -#{{{ Dirty Files Dialog -DirtyFilesDialog.Dialog.Title=Unsaved Changes -DirtyFilesDialog.Dialog.Message=The following files have unsaved changes: -DirtyFilesDialog.Button.SelectAll.Title=Select All -#DirtyFilesDialog.Button.SelectAll.ToolTip=Select All -DirtyFilesDialog.Button.SaveSelected.Title=Save Selected -#DirtyFilesDialog.Button.SaveSelected.ToolTip=Save Selected -DirtyFilesDialog.Button.DiscardSelected.Title=Discard Selected -#DirtyFilesDialog.Button.DiscardSelected.ToolTip=Discard Selected -#}}} - -#{{{ Activity Log Dialog -activity-log.label = Activity Log -ActivityLogDialog.Dialog.Title = Activity Log -ActivityLogDialog.Dialog.Message = Activity Log contents: -#}}} - -#{{{ About dialag -about.title=About jsXe -about.message=Released under the terms of the GNU General Public License\n\n\ - Active Contributors:\n\ - \ \ \ \ Ian Lewis <Ian...@me...>\n\ - \ \ \ \ Trish Hartnett <tri...@us...>\n\n\ - Translators:\n\ - \ \ \ \ German (de) - Bianca Shöen\n\ - \ \ \ \ German (de) - Dieter Steiner <spo...@gm...>\n\ - \ \ \ \ Swedish (sv) - Patrik Johansson <pa...@it...>\n\ - \ \ \ \ Russian (ru) - Alexandr Gridnev <ale...@ya...>\n\n\ - Past Contributers:\n\ - \ \ \ \ Aaron Flatten <afl...@us...>\n\ - \ \ \ \ Bilel Remmache <rb...@us...>\n\n\ - Homepage: http://jsxe.sourceforge.net/ -#}}} - -#{{{ Validation Errors Dialog -ValidationErrors.title=Validation Errors -ValidationErrors.message=Validation Errors -#}}} - -#}}} \ No newline at end of file Deleted: trunk/jsxe/messages/messages.de =================================================================== (Binary files differ) Deleted: trunk/jsxe/messages/messages.ja =================================================================== --- trunk/jsxe/messages/messages.ja 2006-08-28 04:04:14 UTC (rev 1181) +++ trunk/jsxe/messages/messages.ja 2006-08-28 15:48:25 UTC (rev 1182) @@ -1,155 +0,0 @@ -# JSXE Japanese properties file -# $Id$ -# Maintained by Ian Lewis -#:mode=properties: -#:tabSize=4:indentSize=4:noTabs=true: -#:folding=explicit:collapseFolds=1: - -#{{{ common properties - -common.ok=決定 -common.cancel=キャンセル -common.open=開く -common.save=保存 -common.save.as=名前を付けて保存 -common.close=閉じる -common.apply=適用 -common.more=次 -common.insert=インサート -common.add=追加 -common.remove=削除 -common.moveUp=上げる -common.moveDown=下げる - -#common.ctrl=Ctrl -#common.alt=Alt -#common.shift=Shift -#common.meta=Meta - -#}}} - -#{{{ XML Terminology - -#{{{ XML Node Types -xml.element=要素 -xml.processing.instruction=処理命令 -xml.cdata=CDATAセクション -xml.text=テキスト -xml.entity.reference=エンティティ参照 -#xml.declaration=Element Declaration -xml.notation=表記法 -xml.entity=エンティティ -#xml.entity=Entity Declaration -xml.comment=コメント -xml.attribute=属性 -xml.doctype=文書型 -#}}} - -xml.attribute.value.short=値 -xml.attribute.value=属性値 -xml.document=XMLドキュメント -xml.namespace=ネームスペース -xml.namespace.prefix=ネームスペース前置修飾子 -xml.namespace.prefix.short=前置修飾子 -#xml.namespace.decl=Namespace Declaration -xml.doctypedef=文書型 -xml.doctype.name=DTDの名前 -xml.doctype.public=公開識別子 -xml.doctype.system=システム識別子 -xml.schema=XMLスキーマ - -#}}} - -#{{{ Global Options -Global.Options.Dialog.Title=Global Options -Global.Options.Title=General -Global.Options.Max.Recent.Files=最近使用したドキュメント数: -Global.Options.Max.Recent.Files.ToolTip=最近使用したドキュメントのメニューに表示するドキュメントの数 -Global.Options.network-off=Always cache without asking -Global.Options.network-cache=Ask first, then cache remote files -Global.Options.network-always=Always download without asking -Global.Options.network=DTDとXMLスキーマ ダウンロード: -Global.Options.Menu.Spill.Over=Number of items before menus spill over: -Global.Options.Undos.To.Remember=元に戻す数: -Global.Options.Undos.To.Remember.ToolTip=<HTML>jsXeは元に戻すために、この操作数を覚える.<BR> しかし, ビューを変わったら、覚えることはできません。</HTML> - -Shortcuts.Options.Title=ショットカット -Shortcuts.Options.Select.Label=ショットカットを編集: -Shortcuts.Options.Shortcut=ショットカット -Shortcuts.Options.Command=コマンド - -Grab.Key.title=ショットカットを選択 -Grab.Key.caption="{0}" のショットカットを選択して、決定を押してくただい。 -Grab.Key.keyboard-test=Input the key strokes that are causing problems. -Grab.Key.assigned-to=今登録されたコマンド: {0} -Grab.Key.assigned-to.none=<なし> -Grab.Key.clear=クリア -Grab.Key.remove=今のショットカットを削除 - -Grab.Key.remove-ask.title=ショットカットを削除? -Grab.Key.remove-ask.message=\ - 新しいショットカットは選択されてなかった。\n\ - 今のショットカットを削除? -#}}} - -#{{{ Document Options -Document.Options.Title=ドキュメント設定 -Document.Options.Encoding=エンコーディング: -#}}} - -#{{{ Menu Items - -File.Menu=ファイル -Edit.Menu=編集 -Help.Menu=ヘルプ -Tools.Menu=ツール -View.Menu=表示 - -#{{{ Action Labels -new-file.label=新規作成 -open-file.label=開く... -File.Recent=最近使用したドキュメント -File.Recent.None=最近使用したドキュメントはありません -save-file.label=保存 -save-as.label=名前を付けて保存... -reload-file.label=再ロード -close-file.label=閉じる -close-all.label=すべて閉じる -exit.label=終了 - -undo.label=元に戻す -redo.label=やり直し -cut.label=切り取り -copy.label=コピー -paste.label=貼り付け -find.label=探索... -findnext.label=次を探索 - -document-options.label=ドキュメント設定... -plugin-manager.label=プラグインマネジャー... -about-jsxe.label=jsXeについて... -#}}} - -#}}} - -#{{{ Dialogs - -#{{{ About dialag -about.title=jsXeについて -about.message=Released under the terms of the GNU General Public License\n\n\ - Active Contributors:\n\ - \ \ \ \ Ian Lewis <Ian...@me...>\n\ - \ \ \ \ Trish Hartnett <tri...@us...>\n\n\ - 翻訳者:\n\ - \ \ \ \ ドイツ語 (de) - Bianca Shöen\n\ - \ \ \ \ ドイツ語 (de) - Dieter Steiner <spo...@gm...>\n\ - \ \ \ \ スウェーデン語 (sv) - Patrik Johansson <pa...@it...>\n\n\ - Past Contributers:\n\ - \ \ \ \ Aaron Flatten <afl...@us...>\n\ - \ \ \ \ Bilel Remmache <rb...@us...>\n\ - \ \ \ \ SVM <svm...@us...>\n\n\ - ホームページ: http://jsxe.sourceforge.net/ -#}}} - -#}}} - Copied: trunk/jsxe/messages/messages.properties (from rev 1179, trunk/jsxe/messages/messages) =================================================================== --- trunk/jsxe/messages/messages.properties (rev 0) +++ trunk/jsxe/messages/messages.properties 2006-08-28 15:48:25 UTC (rev 1182) @@ -0,0 +1,300 @@ +# JSXE English properties file +# $Id$ +# Maintained by Ian Lewis +#:mode=properties: +#:tabSize=4:indentSize=4:noTabs=true: +#:folding=explicit:collapseFolds=1: + +#{{{ common properties + +common.ok=OK +common.cancel=Cancel +common.open=Open +common.save=Save +common.save.as=Save As +common.close=Close +common.apply=Apply +common.more=More +common.insert=Insert +common.add=Add +common.remove=Remove +common.moveUp=Move Up +common.moveDown=Move Down +common.find=Find + +common.ctrl=Ctrl +common.alt=Alt +common.shift=Shift +common.meta=Meta + +#}}} + +#{{{ XML Terminology + +#{{{ XML Node Types +xml.element=Element +xml.processing.instruction=Processing Instruction +xml.cdata=CDATA Section +xml.text=Text +xml.entity.reference=Entity Reference +xml.declaration=Element Declaration +xml.notation=Notation +xml.entity=Entity Declaration +xml.comment=Comment +xml.attribute=Attribute +xml.doctype=Document Type +#}}} + +xml.attribute.value.short=Value +xml.attribute.value=Attribute Value +xml.document=XML Document +xml.namespace=Namespace +xml.namespace.prefix=Namespace Prefix +xml.namespace.prefix.short=Prefix +xml.namespace.decl=Namespace Declaration +xml.doctypedef=Document Type Definition +xml.doctype.name=Name +xml.doctype.public=Public Id +xml.doctype.system=System Id +xml.schema=XML Schema +#}}} + +#{{{ Global Options +Global.Options.Dialog.Title=Global Options +Global.Options.Title=General +Global.Options.Max.Recent.Files=Recent files to remember: +Global.Options.Max.Recent.Files.ToolTip=The maximum number of files that jsXe remembers in the recent files menu. +Global.Options.Recent.Files.Show.Full.Path=Show full path in Recent Files menu +Global.Options.Recent.Files.Show.Full.Path.ToolTip=If this checkbox is checked then the full path will be shown for files in the recent files menu. +Global.Options.network-off=Always cache without asking +Global.Options.network-cache=Ask first, then cache remote files +Global.Options.network-always=Always download without asking +Global.Options.network=DTD and schema downloading: +Global.Options.Menu.Spill.Over=Number of items before menus spill over: +Global.Options.Undos.To.Remember=Number of undos to remember: +Global.Options.Undos.To.Remember.ToolTip=<HTML>jsXe will remember this number of undo operations in memory.<BR> However, it cannot remember undo operations after switching views</HTML> + +Shortcuts.Options.Title=Shortcuts +Shortcuts.Options.Select.Label=Edit Shortcuts: +Shortcuts.Options.Shortcut=Shortcut +Shortcuts.Options.Command=Command + +Grab.Key.title=Specify Shortcut +Grab.Key.caption=Press the desired shortcut for "{0}", then click OK. +Grab.Key.keyboard-test=Input the key strokes that are causing problems. +Grab.Key.assigned-to=Currently assigned to: {0} +Grab.Key.assigned-to.none=<none> +Grab.Key.clear=Clear +Grab.Key.remove=Remove Current + +Grab.Key.remove-ask.title=Remove Shortcut? +Grab.Key.remove-ask.message=\ + You didn't specify a new shortcut.\n\ + Do you want to remove the current shortcut? + +Grab.Key.duplicate-alt-shortcut.title=Duplicate Shortcut +Grab.Key.duplicate-alt-shortcut.message=\ + The shortcut you selected duplicates the other\n\ + shortcut for this item. Please choose another. + +Grab.Key.duplicate-shortcut.title=Duplicate Shortcut +Grab.Key.duplicate-shortcut.message=\ + This shortcut is already assigned to\n\ + "{0}".\n\ + \n\ + Do you want to override this assignment? +#}}} + +#{{{ Document Options +Document.Options.Title=XML Document Options +Document.Options.Message=This dialog changes settings for the current\n document only. To change settings on an\n editor-wide basis, see the\n Tools->Global Options dialog box. +Document.Options.Line.Separator=Line Separator: +Document.Options.Line.Separator.ToolTip=The line separator. Usually you'll pick the line separator used by your operating system. +Document.Options.Encoding=Encoding: +Document.Options.Encoding.ToolTip=The encoding that jsXe uses to write the file. +Document.Options.Indent.Width=Indent width: +Document.Options.Indent.Width.ToolTip=The width used when formatting and displaying tab characters. +Document.Options.Format.XML=Format XML output +Document.Options.Format.XML.ToolTip=If this box is checked then XML will be formatted automatically. +Document.Options.Validate=Validate if DTD or Schema Available +Document.Options.Validate.ToolTip=If this box is checked jsXe will validate the XML document. +Document.Options.Soft.Tabs=Soft tabs (emulated with spaces) +Document.Options.Soft.Tabs.ToolTip=If this box is checked then tab characters are replaced by spaces. +#}}} + +#{{{ Plugin Manager +Plugin.Manager.Title=Plugin Manager +Plugin.Manager.Name.Column.Header=Name +Plugin.Manager.Version.Column.Header=Version +Plugin.Manager.Status.Column.Header=Status +Plugin.Manager.Loaded.Status=Loaded +Plugin.Manager.Not.Loaded.Status=Not Loaded +Plugin.Manager.Broken.Status=Error +#}}} + +#{{{ Menu Items + +File.Menu=File +Edit.Menu=Edit +View.Menu=View +Tools.Menu=Tools +Help.Menu=Help + + +#}}} + +#{{{ Action Labels +new-file.label=New +open-file.label=Open... +File.Recent=Recent Files +File.Recent.None=No Recent Files +save-file.label=Save +save-as.label=Save As... +reload-file.label=Reload +File.Recent=Recent Files +close-file.label=Close +close-all.label=Close All +exit.label=Exit + +undo.label=Undo +redo.label=Redo +cut.label=Cut +copy.label=Copy +paste.label=Paste +find.label=Find... +findnext.label=Find Next + +general-options.label=Global Options... +document-options.label=Document Options... +plugin-manager.label=Plugin Manager... +validation-errors.label=Validation Errors... +about-jsxe.label=About jsXe... + +#}}} + +#{{{ Messages + +DocumentView.Open.Message="Could not open buffer in any installed document views" + +#{0} file name +DocumentBuffer.Reload.Message={0} unsaved!\n You will lose all unsaved changes if you reload!\n\nContinue? +DocumentBuffer.Reload.Message.Title=Document Modified +DocumentBuffer.SaveAs.Message=The file {0} already exists. Are you sure you want to overwrite it? +DocumentBuffer.SaveAs.Message.Title=File Exists +DocumentBuffer.Close.Message={0} unsaved! Save it now? +DocumentBuffer.Close.Message.Title=Unsaved Changes + +#{0} file name +DocumentBuffer.Saved.Message={0} Saved +DocumentBuffer.Closed.Message={0} Closed +DocumentBuffer.Loaded.Message={0} Loaded +DocumentBuffer.Reloaded.Message={0} Reloaded + +#{0} plugin name +DocumentView.Not.Found=No plugin a with name of {0} exists. + +#{{{ Plugin Load Messages + +# {0} plugin name +Plugin.Error.title=Plugin Error +Plugin.Error.List.message=The following plugins could not be loaded: +Plugin.Load.Already.Loaded=Plugin {0} already loaded. +Plugin.Load.Wrong.Main.Class=Main class is not a plugin class. +Plugin.Load.No.Plugin.Class=No plugin class defined. +Plugin.Load.No.Plugin.Name=No plugin name defined. +Plugin.Load.No.Plugin.HR.Name=No plugin human-readable name defined. +Plugin.Load.No.Plugin.Version=No plugin version defined. + +# {0} plugin name +# {1} requirement name +# {2} required version +# {3} found version +Plugin.Dependency.Message={0} requires {1} version {2} but only version {3} was found. +# {0} plugin name +# {1} requirement name +# {2} required version +Plugin.Dependency.Not.Found={0} requires {1} version {2} but {1} was not found. +# {0} plugin name +# {1} requirement name +Plugin.Dependency.Not.Found2={0} requires {1} but {1} was not found. +# {0} plugin name +# {1} invalid dependency +Plugin.Dependency.Invalid={0} has an invalid dependency: {1} +# {0} invalid version +Plugin.Dependency.Invalid.jsXe.Version=Invalid jsXe version number: {0} +# {0} plugin name +# {1} requirement name +Plugin.Dependency.No.Version=Cannot load plugin {0}, {1} has no version. +# {0} plugin name +# {1} requirement name +Plugin.Dependency.Failed.Load={0} requires plugin {1} but {1} did not load properly. + +#}}} + +#{{{ Error Messages +No.Xerces.Error.message={0} not found. jsXe requires Apache {0}. +No.Xerces.Error.title={0} not found. +IO.Error.title=I/O Error +IO.Error.message=An I/O error has occurred +#}}} + +#}}} + +#{{{ Dialogs + +#{{{ Download resource dialog +xml.download-resource.title=Getting resource from remote server + +#{0} URL +xml.download-resource.message=This XML file depends on a resource which is stored at the following\n\ + Internet address:\n\ + \n\ + {0}\n\ + \n\ + Do you want the XML plugin to download the resource and cache it\n\ + for future use?\n\ + \n\ + If you want resources to be downloaded every time without prompting,\n\ + disable the resource cache in jsXe's global options. +#}}} + +#{{{ Dirty Files Dialog +DirtyFilesDialog.Dialog.Title=Unsaved Changes +DirtyFilesDialog.Dialog.Message=The following files have unsaved changes: +DirtyFilesDialog.Button.SelectAll.Title=Select All +#DirtyFilesDialog.Button.SelectAll.ToolTip=Select All +DirtyFilesDialog.Button.SaveSelected.Title=Save Selected +#DirtyFilesDialog.Button.SaveSelected.ToolTip=Save Selected +DirtyFilesDialog.Button.DiscardSelected.Title=Discard Selected +#DirtyFilesDialog.Button.DiscardSelected.ToolTip=Discard Selected +#}}} + +#{{{ Activity Log Dialog +activity-log.label = Activity Log +ActivityLogDialog.Dialog.Title = Activity Log +ActivityLogDialog.Dialog.Message = Activity Log contents: +#}}} + +#{{{ About dialag +about.title=About jsXe +about.message=Released under the terms of the GNU General Public License\n\n\ + Active Contributors:\n\ + \ \ \ \ Ian Lewis <Ian...@me...>\n\ + \ \ \ \ Trish Hartnett <tri...@us...>\n\n\ + Translators:\n\ + \ \ \ \ German (de) - Bianca Shöen\n\ + \ \ \ \ German (de) - Dieter Steiner <spo...@gm...>\n\ + \ \ \ \ Swedish (sv) - Patrik Johansson <pa...@it...>\n\ + \ \ \ \ Russian (ru) - Alexandr Gridnev <ale...@ya...>\n\n\ + Past Contributers:\n\ + \ \ \ \ Aaron Flatten <afl...@us...>\n\ + \ \ \ \ Bilel Remmache <rb...@us...>\n\n\ + Homepage: http://jsxe.sourceforge.net/ +#}}} + +#{{{ Validation Errors Dialog +ValidationErrors.title=Validation Errors +ValidationErrors.message=Validation Errors +#}}} + +#}}} \ No newline at end of file Deleted: trunk/jsxe/messages/messages.ru =================================================================== --- trunk/jsxe/messages/messages.ru 2006-08-28 04:04:14 UTC (rev 1181) +++ trunk/jsxe/messages/messages.ru 2006-08-28 15:48:25 UTC (rev 1182) @@ -1,298 +0,0 @@ -# JSXE English properties file -# $Id: messages 1158 2006-08-18 18:42:18Z ian_lewis $ -# Maintained by Alexandr Gridnev (ale...@ya...) -#:mode=properties: -#:tabSize=4:indentSize=4:noTabs=true: -#:folding=explicit:collapseFolds=1: - -#{{{ common properties - -common.ok=Принять -common.cancel=Отменить -common.open=Открыть -common.save=Сохранить -common.save.as=Сохранить как -common.close=Закрыть -common.apply=Применить -common.more=Еще -common.insert=Вставить -common.add=Добавить -common.remove=Удалить -common.moveUp=Поднять -common.moveDown=Опустить -common.find=Искать - -common.ctrl=Ctrl -common.alt=Alt -common.shift=Shift -common.meta=Meta - -#}}} - -#{{{ XML Terminology - -#{{{ XML Node Types -xml.element=Элемент -xml.processing.instruction=Правило обработки -xml.cdata=Секция CDATA -xml.text=Текст -xml.entity.reference=Ссылка на сущность -xml.declaration=Объявление элемента -xml.notation=Замечание -xml.entity=Объявление сущности -xml.comment=Комментарий -xml.attribute=Свойство -xml.doctype=Тип документа -#}}} - -xml.attribute.value.short=Значение -xml.attribute.value=Значение свойства -xml.document=документ XML -xml.namespace=Пространство имен -xml.namespace.prefix=Префикс пространства имен -xml.namespace.prefix.short=Префикс -xml.namespace.decl=Объявление пространства имен -xml.doctypedef=Определение типа документа (DTD) -xml.doctype.name=Имя -xml.doctype.public=Публичный Id -xml.doctype.system=Системный Id -xml.schema=Схема XML -#}}} - -#{{{ Global Options -Global.Options.Dialog.Title=Глобальные опции -Global.Options.Title=Главное -Global.Options.Max.Recent.Files=Помнить ранее открытых файлов: -Global.Options.Max.Recent.Files.ToolTip=Максимальное количество ранее открытых файлов, про которые jsXe помнит и отображает в меню Файл->Ранее открытые файлы -Global.Options.network-off=Кешировать всегда, без спросу -Global.Options.network-cache=Кешировать удаленные файлы только спросив разрешения -Global.Options.network-always=Скачивать всегда, без спросу -Global.Options.network=Скачивание DTD и схемы: -Global.Options.Menu.Spill.Over=Меню выпадают после: -Global.Options.Undos.To.Remember=Запомнить действий: -Global.Options.Undos.To.Remember.ToolTip=<HTML>jsXe запомнит столько действий и потом их можно будет отменить.<BR> Однако он не может запомнить действия, выполненные после переключения видов</HTML> - -Shortcuts.Options.Title=Горячие клавиши -Shortcuts.Options.Select.Label=Редактировать горячие клавиши: -Shortcuts.Options.Shortcut=Горячая клавиша -Shortcuts.Options.Command=Команда - -Grab.Key.title=Нажмите клавишу -Grab.Key.caption=Нажмите клавишу для команды "{0}", а котом нажмите Принять. -Grab.Key.keyboard-test=Input the key strokes that are causing problems. -Grab.Key.assigned-to=Уже назначено для: {0} -Grab.Key.assigned-to.none=<ничего> -Grab.Key.clear=Очистить -Grab.Key.remove=Удалить текущее - -Grab.Key.remove-ask.title=Удалить клавишу? -Grab.Key.remove-ask.message=\ - Вы не назначили новую клавишу.\n\ - Вы что, всеръез решили лишить команду клавиши, правда? - -Grab.Key.duplicate-alt-shortcut.title=Две команды на клавишу -Grab.Key.duplicate-alt-shortcut.message=\ - Клавиша которую вы назначили уже занята за другой командой\n\ - Просьба выбрать другую, ато они подерутся. - -Grab.Key.duplicate-shortcut.title=Две команды на клавишу -Grab.Key.duplicate-shortcut.message=\ - Эта клавиша уже занята за\n\ - "{0}".\n\ - \n\ - Вы хотите отвергнуть это назначение? -#}}} - -#{{{ Document Options -Document.Options.Title=Опции документа XML -Documen... [truncated message content] |
|
From: <ian...@us...> - 2006-08-28 21:56:27
|
Revision: 1190 Author: ian_lewis Date: 2006-08-28 14:56:21 -0700 (Mon, 28 Aug 2006) ViewCVS: http://svn.sourceforge.net/jsxe/?rev=1190&view=rev Log Message: ----------- merge from 05pre3 branch rev. 1189 Modified Paths: -------------- trunk/jsxe/Changelog trunk/jsxe/src/net/sourceforge/jsxe/properties Modified: trunk/jsxe/Changelog =================================================================== --- trunk/jsxe/Changelog 2006-08-28 21:53:57 UTC (rev 1189) +++ trunk/jsxe/Changelog 2006-08-28 21:56:21 UTC (rev 1190) @@ -1,6 +1,7 @@ 08/28/2006 Ian Lewis <Ian...@me...> * Changed the messages files to be named the standard ResourceBundle way. + * Fixed default key binding for exit. 08/27/2006 Ian Lewis <Ian...@me...> Modified: trunk/jsxe/src/net/sourceforge/jsxe/properties =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/properties 2006-08-28 21:53:57 UTC (rev 1189) +++ trunk/jsxe/src/net/sourceforge/jsxe/properties 2006-08-28 21:56:21 UTC (rev 1190) @@ -57,7 +57,7 @@ #{{{ Default key bindings open-file.shortcut=C+o -exit.shortcut=C+x +exit.shortcut=C+q close-file.shortcut=C+w new-file.shortcut=C+n save-file.shortcut=C+s This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <ian...@us...> - 2006-08-28 18:23:34
|
Revision: 1185 Author: ian_lewis Date: 2006-08-28 11:23:14 -0700 (Mon, 28 Aug 2006) ViewCVS: http://svn.sourceforge.net/jsxe/?rev=1185&view=rev Log Message: ----------- Added initial files for the help viewer Modified Paths: -------------- trunk/jsxe/build.xml trunk/jsxe/messages/messages.properties trunk/jsxe/src/net/sourceforge/jsxe/gui/GUIUtilities.java trunk/jsxe/src/net/sourceforge/jsxe/jsXe.java trunk/jsxe/src/net/sourceforge/jsxe/properties trunk/jsxe/src/net/sourceforge/jsxe/util/MiscUtilities.java Added Paths: ----------- trunk/jsxe/src/net/sourceforge/jsxe/gui/RolloverButton.java trunk/jsxe/src/net/sourceforge/jsxe/help/ trunk/jsxe/src/net/sourceforge/jsxe/help/HelpIndex.java trunk/jsxe/src/net/sourceforge/jsxe/help/HelpSearchPanel.java trunk/jsxe/src/net/sourceforge/jsxe/help/HelpTOCPanel.java trunk/jsxe/src/net/sourceforge/jsxe/help/HelpViewer.java trunk/jsxe/src/net/sourceforge/jsxe/icons/ArrowD.png trunk/jsxe/src/net/sourceforge/jsxe/icons/ArrowL.png trunk/jsxe/src/net/sourceforge/jsxe/icons/ArrowR.png trunk/jsxe/src/net/sourceforge/jsxe/icons/ArrowU.png Modified: trunk/jsxe/build.xml =================================================================== --- trunk/jsxe/build.xml 2006-08-28 15:50:38 UTC (rev 1184) +++ trunk/jsxe/build.xml 2006-08-28 18:23:14 UTC (rev 1185) @@ -221,6 +221,9 @@ <!--<include name="**/*.dtd"/>--> <include name="**/*.jpg"/> <include name="**/*.png"/> + + <!-- files in the source directory to ignore --> + <exclude name="net/sourceforge/jsxe/help/**/*"/> </fileset> </copy> <mkdir dir="${build.plugin}"/> Modified: trunk/jsxe/messages/messages.properties =================================================================== --- trunk/jsxe/messages/messages.properties 2006-08-28 15:50:38 UTC (rev 1184) +++ trunk/jsxe/messages/messages.properties 2006-08-28 18:23:14 UTC (rev 1185) @@ -297,4 +297,28 @@ ValidationErrors.message=Validation Errors #}}} +#}}} + +#{{{ Help viewer +helpviewer.title=jsXe Help +helpviewer.loading=Loading... +helpviewer.back.label=Back +helpviewer.forward.label=Forward + +helpviewer.toc.loading=Loading... +helpviewer.toc.label=Contents +helpviewer.toc.welcome=Welcome to jsXe +helpviewer.toc.readme=General Information +helpviewer.toc.changes=Detailed Change Log +helpviewer.toc.todo=To Do List and Known Bugs +helpviewer.toc.copying=GNU General Public License +helpviewer.toc.copying-doc=GNU Free Documentation License +helpviewer.toc.copying-apache=Apache License +helpviewer.toc.copying-plugins=Plugin Licensing Amendment +helpviewer.toc.plugins=Plugins + +helpviewer.search.label=Search +helpviewer.search.caption=Search for: +helpviewer.searching=Searching... +helpviewer.no-results=No results #}}} \ No newline at end of file Modified: trunk/jsxe/src/net/sourceforge/jsxe/gui/GUIUtilities.java =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/gui/GUIUtilities.java 2006-08-28 15:50:38 UTC (rev 1184) +++ trunk/jsxe/src/net/sourceforge/jsxe/gui/GUIUtilities.java 2006-08-28 18:23:14 UTC (rev 1185) @@ -90,7 +90,7 @@ * Loads an icon. * @param iconName The icon name */ - public static Icon loadIcon(String iconName) { + public static ImageIcon loadIcon(String iconName) { if (icons == null) { icons = new Hashtable(); } Added: trunk/jsxe/src/net/sourceforge/jsxe/gui/RolloverButton.java =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/gui/RolloverButton.java (rev 0) +++ trunk/jsxe/src/net/sourceforge/jsxe/gui/RolloverButton.java 2006-08-28 18:23:14 UTC (rev 1185) @@ -0,0 +1,207 @@ +/* + * RolloverButton.java - Class for buttons that implement rollovers + * :tabSize=8:indentSize=8:noTabs=false: + * :folding=explicit:collapseFolds=1: + * + * Copyright (C) 2002 Kris Kopicki + * Portions copyright (C) 2003 Slava Pestov + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +package net.sourceforge.jsxe.gui; + +//{{{ Imports +import java.awt.*; +import java.awt.event.*; +import java.lang.reflect.Method; +import javax.swing.*; +import javax.swing.border.*; +import javax.swing.plaf.basic.BasicButtonUI; +import net.sourceforge.jsxe.OperatingSystem; +import net.sourceforge.jsxe.util.Log; +//}}} + +/** + * If you wish to have rollovers on your buttons, use this class. + * + * Unlike the Swing rollover support, this class works outside of + * <code>JToolBar</code>s, and does not require undocumented client + * property hacks or JDK1.4-specific API calls.<p> + * + * Note: You should not call <code>setBorder()</code> on your buttons, + * as they probably won't work properly. + * @author Kris Kopicki + * @author Slava Pestov + * @since jsXe 0.5 pre4 + * @version $Id$ + */ +public class RolloverButton extends JButton +{ + //{{{ RolloverButton constructor + /** + * Setup the border (invisible initially) + */ + public RolloverButton() + { + if(OperatingSystem.hasJava15()) + setContentAreaFilled(false); + + if(method != null) + { + try + { + method.invoke(this,new Boolean[] { Boolean.TRUE }); + } + catch(Exception e) + { + Log.log(Log.ERROR,this,e); + } + } + else + { + addMouseListener(new MouseOverHandler()); + } + } //}}} + + //{{{ RolloverButton constructor + /** + * Setup the border (invisible initially) + */ + public RolloverButton(Icon icon) + { + this(); + + setIcon(icon); + } //}}} + + //{{{ updateUI() method + public void updateUI() + { + if(OperatingSystem.isWindows()) + { + /* Workaround for uncooperative Windows L&F */ + setUI(new BasicButtonUI()); + } + else + super.updateUI(); + + setBorder(new EtchedBorder()); + setBorderPainted(false); + setMargin(new Insets(1,1,1,1)); + + setRequestFocusEnabled(false); + } //}}} + + //{{{ isOpaque() method + public boolean isOpaque() + { + return false; + } //}}} + + //{{{ setEnabled() method + public void setEnabled(boolean b) + { + super.setEnabled(b); + if(method == null) + { + setBorderPainted(false); + repaint(); + } + } //}}} + + //{{{ setBorderPainted() method + public void setBorderPainted(boolean b) + { + try + { + revalidateBlocked = true; + super.setBorderPainted(b); + } + finally + { + revalidateBlocked = false; + } + } //}}} + + //{{{ revalidate() method + /** + * We block calls to revalidate() from a setBorderPainted(), for + * performance reasons. + */ + public void revalidate() + { + if(!revalidateBlocked) + super.revalidate(); + } //}}} + + //{{{ paint() method + public void paint(Graphics g) + { + if(method != null || isEnabled()) + super.paint(g); + else + { + Graphics2D g2 = (Graphics2D)g; + g2.setComposite(c); + super.paint(g2); + } + } //}}} + + //{{{ Private members + private static AlphaComposite c = AlphaComposite.getInstance( + AlphaComposite.SRC_OVER, 0.5f); + + private static Method method; + + private boolean revalidateBlocked; + + static + { + /* if(OperatingSystem.hasJava14()) + { + try + { + method = RolloverButton.class + .getMethod("setRolloverEnabled",new Class[] + { boolean.class }); + Log.log(Log.DEBUG,RolloverButton.class, + "Java 1.4 setRolloverEnabled() method enabled"); + } + catch(Exception e) + { + Log.log(Log.ERROR,RolloverButton.class,e); + } + } */ + } //}}} + + //{{{ MouseHandler class + /** + * Make the border visible/invisible on rollovers + */ + class MouseOverHandler extends MouseAdapter + { + public void mouseEntered(MouseEvent e) + { + if (isEnabled()) + setBorderPainted(true); + } + + public void mouseExited(MouseEvent e) + { + setBorderPainted(false); + } + } //}}} +} Added: trunk/jsxe/src/net/sourceforge/jsxe/help/HelpIndex.java =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/help/HelpIndex.java (rev 0) +++ trunk/jsxe/src/net/sourceforge/jsxe/help/HelpIndex.java 2006-08-28 18:23:14 UTC (rev 1185) @@ -0,0 +1,398 @@ +/* +HelpIndex.java +:tabSize=4:indentSize=4:noTabs=true: +:folding=explicit:collapseFolds=1: + +Copyright (C) 2002 Slava Pestov +Portions Copyright (C) 2006 Ian Lewis (Ian...@me...) + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +Optionally, you may find a copy of the GNU General Public License +from http://www.fsf.org/copyleft/gpl.txt +*/ + +package org.gjt.sp.jedit.help; + +//{{{ Imports +import java.io.*; +import java.net.*; +import java.util.zip.*; +import java.util.*; +import org.gjt.sp.jedit.io.*; +import org.gjt.sp.jedit.*; +import org.gjt.sp.util.Log; +//}}} + +class HelpIndex +{ + //{{{ HelpIndex constructor + public HelpIndex() + { + words = new HashMap(); + files = new ArrayList(); + + ignoreWord("a"); + ignoreWord("an"); + ignoreWord("and"); + ignoreWord("are"); + ignoreWord("as"); + ignoreWord("be"); + ignoreWord("by"); + ignoreWord("can"); + ignoreWord("do"); + ignoreWord("for"); + ignoreWord("from"); + ignoreWord("how"); + ignoreWord("i"); + ignoreWord("if"); + ignoreWord("in"); + ignoreWord("is"); + ignoreWord("it"); + ignoreWord("not"); + ignoreWord("of"); + ignoreWord("on"); + ignoreWord("or"); + ignoreWord("s"); + ignoreWord("that"); + ignoreWord("the"); + ignoreWord("this"); + ignoreWord("to"); + ignoreWord("will"); + ignoreWord("with"); + ignoreWord("you"); + } //}}} + + /* //{{{ HelpIndex constructor + public HelpIndex(String fileListPath, String wordIndexPath) + { + this(); + } //}}} */ + + //{{{ indexEditorHelp() method + /** + * Indexes all available help, including the jEdit user's guide, FAQ,] + * and plugin documentation. + */ + public void indexEditorHelp() + { + try + { + String jEditHome = jEdit.getJEditHome(); + if(jEditHome != null) + { + indexDirectory(MiscUtilities.constructPath(jEditHome,"doc","users-guide")); + indexDirectory(MiscUtilities.constructPath(jEditHome,"doc","FAQ")); + indexDirectory(MiscUtilities.constructPath(jEditHome,"doc","news42")); + } + } + catch(Throwable e) + { + Log.log(Log.ERROR,this,"Error indexing editor help"); + Log.log(Log.ERROR,this,e); + } + + PluginJAR[] jars = jEdit.getPluginJARs(); + for(int i = 0; i < jars.length; i++) + { + try + { + indexJAR(jars[i].getZipFile()); + } + catch(Throwable e) + { + Log.log(Log.ERROR,this,"Error indexing JAR: " + + jars[i].getPath()); + Log.log(Log.ERROR,this,e); + } + } + + Log.log(Log.DEBUG,this,"Indexed " + words.size() + " words"); + } //}}} + + //{{{ indexDirectory() method + /** + * Indexes all HTML and text files in the specified directory. + * @param dir The directory + */ + public void indexDirectory(String dir) throws Exception + { + String[] files = VFSManager.getFileVFS() + ._listDirectory(null,dir,"*.{html,txt}",true,null); + + for(int i = 0; i < files.length; i++) + { + indexURL(files[i]); + } + } //}}} + + //{{{ indexJAR() method + /** + * Indexes all HTML and text files in the specified JAR file. + * @param jar The JAR file + */ + public void indexJAR(ZipFile jar) throws Exception + { + Enumeration e = jar.entries(); + while(e.hasMoreElements()) + { + ZipEntry entry = (ZipEntry)e.nextElement(); + String name = entry.getName(); + String lname = name.toLowerCase(); + if(lname.endsWith(".html")/* || lname.endsWith(".txt") */) + { + // only works for jEdit plugins + String url = "jeditresource:/" + + MiscUtilities.getFileName(jar.getName()) + + "!/" + name; + Log.log(Log.DEBUG,this,url); + indexStream(jar.getInputStream(entry),url); + } + } + } //}}} + + //{{{ indexURL() method + /** + * Reads the specified HTML file and adds all words defined therein to the + * index. + * @param url The HTML file's URL + */ + public void indexURL(String url) throws Exception + { + InputStream _in; + + if(MiscUtilities.isURL(url)) + _in = new URL(url).openStream(); + else + { + _in = new FileInputStream(url); + // hack since HelpViewer needs a URL... + url = "file:" + url; + } + + indexStream(_in,url); + } //}}} + + //{{{ lookupWord() method + public Word lookupWord(String word) + { + Object o = words.get(word); + if(o == IGNORE) + return null; + else + return (Word)o; + } //}}} + + //{{{ getFile() method + public HelpFile getFile(int index) + { + return (HelpFile)files.get(index); + } //}}} + + //{{{ Private members + // used to mark words to ignore (see constructor for the list) + private static Object IGNORE = new Object(); + private HashMap words; + private ArrayList files; + + //{{{ ignoreWord() method + private void ignoreWord(String word) + { + words.put(word,IGNORE); + } //}}} + + //{{{ indexStream() method + /** + * Reads the specified HTML file and adds all words defined therein to the + * index. + * @param _in The input stream + * @param file The file + */ + private void indexStream(InputStream _in, String fileName) + throws Exception + { + HelpFile file = new HelpFile(fileName); + files.add(file); + int index = files.size() - 1; + + StringBuffer titleText = new StringBuffer(); + + BufferedReader in = new BufferedReader( + new InputStreamReader(_in)); + + try + { + StringBuffer word = new StringBuffer(); + boolean insideTag = false; + boolean insideEntity = false; + + boolean title = false; + + int c; + while((c = in.read()) != -1) + { + char ch = (char)c; + if(insideTag) + { + if(ch == '>') + { + if(word.toString().equals("title")) + title = true; + insideTag = false; + word.setLength(0); + } + else + word.append(ch); + } + else if(insideEntity) + { + if(ch == ';') + insideEntity = false; + } + else if(ch == '<') + { + if(title) + title = false; + + if(word.length() != 0) + { + addWord(word.toString(),index,title); + word.setLength(0); + } + + insideTag = true; + } + else if(ch == '&') + insideEntity = true; + else if(title) + titleText.append(ch); + else if(!Character.isLetterOrDigit(ch)) + { + if(word.length() != 0) + { + addWord(word.toString(),index,title); + word.setLength(0); + } + } + else + word.append(ch); + } + } + finally + { + in.close(); + } + + if(titleText.length() == 0) + file.title = fileName; + else + file.title = titleText.toString(); + } //}}} + + //{{{ addWord() method + private void addWord(String word, int file, boolean title) + { + word = word.toLowerCase(); + + Object o = words.get(word); + if(o == IGNORE) + return; + + if(o == null) + words.put(word,new Word(word,file,title)); + else + ((Word)o).addOccurrence(file,title); + } //}}} + + //}}} + + //{{{ Word class + static class Word + { + // how much an occurrence in the title is worth + static final int TITLE_OCCUR = 10; + + // the word + String word; + + // files it occurs in + int occurCount = 0; + Occurrence[] occurrences; + + Word(String word, int file, boolean title) + { + this.word = word; + occurrences = new Occurrence[5]; + addOccurrence(file,title); + } + + void addOccurrence(int file, boolean title) + { + for(int i = 0; i < occurCount; i++) + { + if(occurrences[i].file == file) + { + occurrences[i].count += (title ? TITLE_OCCUR : 1); + return; + } + } + + if(occurCount >= occurrences.length) + { + Occurrence[] newOccur = new Occurrence[occurrences.length * 2]; + System.arraycopy(occurrences,0,newOccur,0,occurCount); + occurrences = newOccur; + } + + occurrences[occurCount++] = new Occurrence(file,title); + } + + static class Occurrence + { + int file; + int count; + + Occurrence(int file, boolean title) + { + this.file = file; + this.count = (title ? TITLE_OCCUR : 1); + } + } + } //}}} + + //{{{ HelpFile class + static class HelpFile + { + String file; + String title; + + HelpFile(String file) + { + this.file = file; + } + + public String toString() + { + return title; + } + + public boolean equals(Object o) + { + if(o instanceof HelpFile) + return ((HelpFile)o).file.equals(file); + else + return false; + } + } //}}} +} Added: trunk/jsxe/src/net/sourceforge/jsxe/help/HelpSearchPanel.java =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/help/HelpSearchPanel.java (rev 0) +++ trunk/jsxe/src/net/sourceforge/jsxe/help/HelpSearchPanel.java 2006-08-28 18:23:14 UTC (rev 1185) @@ -0,0 +1,298 @@ +/* +HelpSearchPanel.java +:tabSize=4:indentSize=4:noTabs=true: +:folding=explicit:collapseFolds=1: + +Copyright (C) 2002 Slava Pestov +Portions Copyright (C) 2006 Ian Lewis (Ian...@me...) + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +Optionally, you may find a copy of the GNU General Public License +from http://www.fsf.org/copyleft/gpl.txt +*/ + +package net.sourceforge.jsxe.help; + +//{{{ Imports +import javax.swing.*; +import java.awt.event.*; +import java.awt.*; +import java.util.*; + +import net.sourceforge.jsxe.gui.*; +import net.sourceforge.jsxe.jsXe; +import net.sourceforge.jsxe.Log; +//}}} + +/** + * The Search panel in the Help Viewer. + * + * @author Slava Pestov + * @author Ian Lewis (<a href="mailto:Ian...@me...">Ian...@me...</a>) + * @version $Id$ + * @since jsXe 0.5 pre4 + */ +class HelpSearchPanel extends JPanel { + + //{{{ HelpSearchPanel constructor + public HelpSearchPanel(HelpViewer helpViewer) { + super(new BorderLayout(6,6)); + + this.helpViewer = helpViewer; + + Box box = new Box(BoxLayout.X_AXIS); + box.add(new JLabel(Messages.getMessage("helpviewer.search.caption"))); + box.add(Box.createHorizontalStrut(6)); + box.add(searchField = new HistoryTextField("helpviewer.search")); + searchField.addActionListener(new ActionHandler()); + + add(BorderLayout.NORTH,box); + + results = new JList(); + results.addMouseListener(new MouseHandler()); + results.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); + results.setCellRenderer(new ResultRenderer()); + add(BorderLayout.CENTER,new JScrollPane(results)); + } //}}} + + //{{{ Private members + private HelpViewer helpViewer; + private HistoryTextField searchField; + private JList results; + private HelpIndex index; + + private HelpIndex getHelpIndex() + { + if(index == null) + { + index = new HelpIndex(); + try + { + index.indexEditorHelp(); + } + catch(Exception e) + { + index = null; + Log.log(Log.ERROR,this,e); + GUIUtilities.error(helpViewer,"helpviewer.search.error", + new String[] { e.toString() }); + } + } + + return index; + } //}}} + + //{{{ ResultIcon class + static class ResultIcon implements Icon + { + private static RenderingHints renderingHints; + + static + { + HashMap hints = new HashMap(); + + hints.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY); + hints.put(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); + + renderingHints = new RenderingHints(hints); + } + + private int rank; + + ResultIcon(int rank) + { + this.rank = rank; + } + + public int getIconWidth() + { + return 40; + } + + public int getIconHeight() + { + return 9; + } + + public void paintIcon(Component c, Graphics g, int x, int y) + { + Graphics2D g2d = (Graphics2D)g.create(); + g2d.setRenderingHints(renderingHints); + + for(int i = 0; i < 4; i++) + { + if(rank > i) + g2d.setColor(UIManager.getColor("Label.foreground")); + else + g2d.setColor(UIManager.getColor("Label.disabledForeground")); + g2d.fillOval(x+i*10,y,9,9); + } + } + } //}}} + + //{{{ ResultRenderer class + class ResultRenderer extends DefaultListCellRenderer + { + public Component getListCellRendererComponent( + JList list, + Object value, + int index, + boolean isSelected, + boolean cellHasFocus) + { + super.getListCellRendererComponent(list,null,index, + isSelected,cellHasFocus); + + if(value instanceof String) + { + setIcon(null); + setText((String)value); + } + else + { + Result result = (Result)value; + setIcon(new ResultIcon(result.rank)); + setText(result.title); + } + + return this; + } + } //}}} + + //{{{ Result class + static class Result + { + String file; + String title; + int rank; + + Result(HelpIndex.HelpFile file, int count) + { + this.file = file.file; + this.title = file.title; + rank = count; + } + } //}}} + + //{{{ ResultCompare class + static class ResultCompare implements Comparator + { + public int compare(Object o1, Object o2) + { + Result r1 = (Result)o1; + Result r2 = (Result)o2; + if(r1.rank == r2.rank) + return r1.title.compareTo(r2.title); + else + return r2.rank - r1.rank; + } + } //}}} + + //{{{ ActionHandler class + class ActionHandler implements ActionListener { + + public void actionPerformed(ActionEvent evt) { + + final HelpIndex index = getHelpIndex(); + if (index == null) { + return; + } + + results.setListData(new String[] { Messages.getMessage("helpviewer.searching") }); + + final String text = searchField.getText(); + final Vector resultModel = new Vector(); + + VFSManager.runInWorkThread(new Runnable() { + + public void run() { + StringTokenizer st = new StringTokenizer(text,",.;:-? "); + + // we later use this to compute a relative ranking + int maxRank = 0; + + while (st.hasMoreTokens()) { + String word = st.nextToken().toLowerCase(); + HelpIndex.Word lookup = index.lookupWord(word); + if (lookup == null) { + continue; + } + + for (int i = 0; i < lookup.occurCount; i++) { + HelpIndex.Word.Occurrence occur = lookup.occurrences[i]; + + boolean ok = false; + + HelpIndex.HelpFile file = index.getFile(occur.file); + for (int j = 0; j < resultModel.size(); j++) { + Result result = (Result)resultModel.elementAt(j); + if (result.file.equals(file.file)) { + result.rank += occur.count; + result.rank += 20; // multiple files w/ word bonus + maxRank = Math.max(result.rank,maxRank); + ok = true; + break; + } + } + + if (!ok) { + maxRank = Math.max(occur.count,maxRank); + resultModel.addElement(new Result(file,occur.count)); + } + } + } + + if (maxRank != 0) { + // turn the rankings into relative rankings, from 1 to 4 + for (int i = 0; i < resultModel.size(); i++) { + Result result = (Result)resultModel.elementAt(i); + result.rank = (int)Math.ceil((double)result.rank * 4 / maxRank); + } + + Collections.sort(resultModel,new ResultCompare()); + } + } + }); + + VFSManager.runInAWTThread(new Runnable() { + public void run() { + if (resultModel.size() == 0) { + results.setListData(new String[] { Messages.getMessage("helpviewer.no-results") }); + + getToolkit().beep(); + } else { + results.setListData(resultModel); + } + } + }); + + } + } //}}} + + //{{{ MouseHandler class + public class MouseHandler extends MouseAdapter + { + public void mouseReleased(MouseEvent evt) + { + int row = results.locationToIndex(evt.getPoint()); + if(row != -1) + { + Result result = (Result)results.getModel() + .getElementAt(row); + helpViewer.gotoURL(result.file,true); + } + } + } //}}} +} Added: trunk/jsxe/src/net/sourceforge/jsxe/help/HelpTOCPanel.java =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/help/HelpTOCPanel.java (rev 0) +++ trunk/jsxe/src/net/sourceforge/jsxe/help/HelpTOCPanel.java 2006-08-28 18:23:14 UTC (rev 1185) @@ -0,0 +1,445 @@ +/... [truncated message content] |
|
From: <ian...@us...> - 2006-08-29 02:16:49
|
Revision: 1191 Author: ian_lewis Date: 2006-08-28 19:13:58 -0700 (Mon, 28 Aug 2006) ViewCVS: http://svn.sourceforge.net/jsxe/?rev=1191&view=rev Log Message: ----------- Added base support for building documentation for jsXe Modified Paths: -------------- trunk/jsxe/Changelog trunk/jsxe/INSTALL trunk/jsxe/build.xml Added Paths: ----------- trunk/jsxe/buildlib/avalon.jar trunk/jsxe/buildlib/batik.jar trunk/jsxe/buildlib/docbook/ trunk/jsxe/buildlib/docbook/VERSION trunk/jsxe/buildlib/docbook/catalog.xml trunk/jsxe/buildlib/docbook/common/ trunk/jsxe/buildlib/docbook/common/ChangeLog trunk/jsxe/buildlib/docbook/common/af.xml trunk/jsxe/buildlib/docbook/common/ar.xml trunk/jsxe/buildlib/docbook/common/autoidx-ng.xsl trunk/jsxe/buildlib/docbook/common/bg.xml trunk/jsxe/buildlib/docbook/common/bn.xml trunk/jsxe/buildlib/docbook/common/bs.xml trunk/jsxe/buildlib/docbook/common/ca.xml trunk/jsxe/buildlib/docbook/common/common.xsl trunk/jsxe/buildlib/docbook/common/cs.xml trunk/jsxe/buildlib/docbook/common/da.xml trunk/jsxe/buildlib/docbook/common/de.xml trunk/jsxe/buildlib/docbook/common/el.xml trunk/jsxe/buildlib/docbook/common/en.xml trunk/jsxe/buildlib/docbook/common/es.xml trunk/jsxe/buildlib/docbook/common/et.xml trunk/jsxe/buildlib/docbook/common/eu.xml trunk/jsxe/buildlib/docbook/common/fa.xml trunk/jsxe/buildlib/docbook/common/fi.xml trunk/jsxe/buildlib/docbook/common/fr.xml trunk/jsxe/buildlib/docbook/common/gentext.xsl trunk/jsxe/buildlib/docbook/common/he.xml trunk/jsxe/buildlib/docbook/common/hr.xml trunk/jsxe/buildlib/docbook/common/hu.xml trunk/jsxe/buildlib/docbook/common/id.xml trunk/jsxe/buildlib/docbook/common/it.xml trunk/jsxe/buildlib/docbook/common/ja.xml trunk/jsxe/buildlib/docbook/common/ko.xml trunk/jsxe/buildlib/docbook/common/l10n.dtd trunk/jsxe/buildlib/docbook/common/l10n.xml trunk/jsxe/buildlib/docbook/common/l10n.xsl trunk/jsxe/buildlib/docbook/common/la.xml trunk/jsxe/buildlib/docbook/common/labels.xsl trunk/jsxe/buildlib/docbook/common/lt.xml trunk/jsxe/buildlib/docbook/common/nl.xml trunk/jsxe/buildlib/docbook/common/nn.xml trunk/jsxe/buildlib/docbook/common/no.xml trunk/jsxe/buildlib/docbook/common/olink.xsl trunk/jsxe/buildlib/docbook/common/pi.xsl trunk/jsxe/buildlib/docbook/common/pl.xml trunk/jsxe/buildlib/docbook/common/pt.xml trunk/jsxe/buildlib/docbook/common/pt_br.xml trunk/jsxe/buildlib/docbook/common/ro.xml trunk/jsxe/buildlib/docbook/common/ru.xml trunk/jsxe/buildlib/docbook/common/sk.xml trunk/jsxe/buildlib/docbook/common/sl.xml trunk/jsxe/buildlib/docbook/common/sr.xml trunk/jsxe/buildlib/docbook/common/sr_Latn.xml trunk/jsxe/buildlib/docbook/common/subtitles.xsl trunk/jsxe/buildlib/docbook/common/sv.xml trunk/jsxe/buildlib/docbook/common/table.xsl trunk/jsxe/buildlib/docbook/common/targetdatabase.dtd trunk/jsxe/buildlib/docbook/common/targets.xsl trunk/jsxe/buildlib/docbook/common/th.xml trunk/jsxe/buildlib/docbook/common/titles.xsl trunk/jsxe/buildlib/docbook/common/tr.xml trunk/jsxe/buildlib/docbook/common/uk.xml trunk/jsxe/buildlib/docbook/common/vi.xml trunk/jsxe/buildlib/docbook/common/xh.xml trunk/jsxe/buildlib/docbook/common/zh_cn.xml trunk/jsxe/buildlib/docbook/common/zh_tw.xml trunk/jsxe/buildlib/docbook/dtd/ trunk/jsxe/buildlib/docbook/dtd/calstblx.dtd trunk/jsxe/buildlib/docbook/dtd/catalog trunk/jsxe/buildlib/docbook/dtd/catalog.xml trunk/jsxe/buildlib/docbook/dtd/dbcentx.mod trunk/jsxe/buildlib/docbook/dtd/dbgenent.mod trunk/jsxe/buildlib/docbook/dtd/dbhierx.mod trunk/jsxe/buildlib/docbook/dtd/dbnotnx.mod trunk/jsxe/buildlib/docbook/dtd/dbpoolx.mod trunk/jsxe/buildlib/docbook/dtd/docbookx.dtd trunk/jsxe/buildlib/docbook/dtd/ent/ trunk/jsxe/buildlib/docbook/dtd/ent/ISOamsa.ent trunk/jsxe/buildlib/docbook/dtd/ent/ISOamsb.ent trunk/jsxe/buildlib/docbook/dtd/ent/ISOamsc.ent trunk/jsxe/buildlib/docbook/dtd/ent/ISOamsn.ent trunk/jsxe/buildlib/docbook/dtd/ent/ISOamso.ent trunk/jsxe/buildlib/docbook/dtd/ent/ISOamsr.ent trunk/jsxe/buildlib/docbook/dtd/ent/ISObox.ent trunk/jsxe/buildlib/docbook/dtd/ent/ISOcyr1.ent trunk/jsxe/buildlib/docbook/dtd/ent/ISOcyr2.ent trunk/jsxe/buildlib/docbook/dtd/ent/ISOdia.ent trunk/jsxe/buildlib/docbook/dtd/ent/ISOgrk1.ent trunk/jsxe/buildlib/docbook/dtd/ent/ISOgrk2.ent trunk/jsxe/buildlib/docbook/dtd/ent/ISOgrk3.ent trunk/jsxe/buildlib/docbook/dtd/ent/ISOgrk4.ent trunk/jsxe/buildlib/docbook/dtd/ent/ISOlat1.ent trunk/jsxe/buildlib/docbook/dtd/ent/ISOlat2.ent trunk/jsxe/buildlib/docbook/dtd/ent/ISOnum.ent trunk/jsxe/buildlib/docbook/dtd/ent/ISOpub.ent trunk/jsxe/buildlib/docbook/dtd/ent/ISOtech.ent trunk/jsxe/buildlib/docbook/dtd/ent/catalog trunk/jsxe/buildlib/docbook/dtd/ent/catalog.xml trunk/jsxe/buildlib/docbook/dtd/htmltblx.mod trunk/jsxe/buildlib/docbook/dtd/soextblx.dtd trunk/jsxe/buildlib/docbook/fo/ trunk/jsxe/buildlib/docbook/fo/ChangeLog trunk/jsxe/buildlib/docbook/fo/admon.xsl trunk/jsxe/buildlib/docbook/fo/autoidx-ng.xsl trunk/jsxe/buildlib/docbook/fo/autoidx.xsl trunk/jsxe/buildlib/docbook/fo/autotoc.xsl trunk/jsxe/buildlib/docbook/fo/axf.xsl trunk/jsxe/buildlib/docbook/fo/biblio.xsl trunk/jsxe/buildlib/docbook/fo/block.xsl trunk/jsxe/buildlib/docbook/fo/callout.xsl trunk/jsxe/buildlib/docbook/fo/component.xsl trunk/jsxe/buildlib/docbook/fo/division.xsl trunk/jsxe/buildlib/docbook/fo/docbook.xsl trunk/jsxe/buildlib/docbook/fo/docbookng.xsl trunk/jsxe/buildlib/docbook/fo/ebnf.xsl trunk/jsxe/buildlib/docbook/fo/fo-patch-for-fop.xsl trunk/jsxe/buildlib/docbook/fo/fo-rtf.xsl trunk/jsxe/buildlib/docbook/fo/fo.xsl trunk/jsxe/buildlib/docbook/fo/footnote.xsl trunk/jsxe/buildlib/docbook/fo/fop.xsl trunk/jsxe/buildlib/docbook/fo/formal.xsl trunk/jsxe/buildlib/docbook/fo/glossary.xsl trunk/jsxe/buildlib/docbook/fo/graphics.xsl trunk/jsxe/buildlib/docbook/fo/htmltbl.xsl trunk/jsxe/buildlib/docbook/fo/index.xsl trunk/jsxe/buildlib/docbook/fo/info.xsl trunk/jsxe/buildlib/docbook/fo/inline.xsl trunk/jsxe/buildlib/docbook/fo/keywords.xsl trunk/jsxe/buildlib/docbook/fo/lists.xsl trunk/jsxe/buildlib/docbook/fo/math.xsl trunk/jsxe/buildlib/docbook/fo/pagesetup.xsl trunk/jsxe/buildlib/docbook/fo/param.ent trunk/jsxe/buildlib/docbook/fo/param.xml trunk/jsxe/buildlib/docbook/fo/param.xsl trunk/jsxe/buildlib/docbook/fo/param.xweb trunk/jsxe/buildlib/docbook/fo/passivetex.xsl trunk/jsxe/buildlib/docbook/fo/pdf2index trunk/jsxe/buildlib/docbook/fo/pi.xsl trunk/jsxe/buildlib/docbook/fo/profile-docbook.xsl trunk/jsxe/buildlib/docbook/fo/qandaset.xsl trunk/jsxe/buildlib/docbook/fo/refentry.xsl trunk/jsxe/buildlib/docbook/fo/sections.xsl trunk/jsxe/buildlib/docbook/fo/synop.xsl trunk/jsxe/buildlib/docbook/fo/table.xsl trunk/jsxe/buildlib/docbook/fo/task.xsl trunk/jsxe/buildlib/docbook/fo/titlepage.templates.xml trunk/jsxe/buildlib/docbook/fo/titlepage.templates.xsl trunk/jsxe/buildlib/docbook/fo/titlepage.xsl trunk/jsxe/buildlib/docbook/fo/toc.xsl trunk/jsxe/buildlib/docbook/fo/verbatim.xsl trunk/jsxe/buildlib/docbook/fo/xep.xsl trunk/jsxe/buildlib/docbook/fo/xref.xsl trunk/jsxe/buildlib/docbook/html/ trunk/jsxe/buildlib/docbook/html/ChangeLog trunk/jsxe/buildlib/docbook/html/admon.xsl trunk/jsxe/buildlib/docbook/html/autoidx-ng.xsl trunk/jsxe/buildlib/docbook/html/autoidx.xsl trunk/jsxe/buildlib/docbook/html/autotoc.xsl trunk/jsxe/buildlib/docbook/html/biblio.xsl trunk/jsxe/buildlib/docbook/html/block.xsl trunk/jsxe/buildlib/docbook/html/callout.xsl trunk/jsxe/buildlib/docbook/html/changebars.xsl trunk/jsxe/buildlib/docbook/html/chunk-code.xsl trunk/jsxe/buildlib/docbook/html/chunk-common.xsl trunk/jsxe/buildlib/docbook/html/chunk.xsl trunk/jsxe/buildlib/docbook/html/chunker.xsl trunk/jsxe/buildlib/docbook/html/chunkfast.xsl trunk/jsxe/buildlib/docbook/html/chunktoc.xsl trunk/jsxe/buildlib/docbook/html/component.xsl trunk/jsxe/buildlib/docbook/html/division.xsl trunk/jsxe/buildlib/docbook/html/docbook.xsl trunk/jsxe/buildlib/docbook/html/docbookng.xsl trunk/jsxe/buildlib/docbook/html/ebnf.xsl trunk/jsxe/buildlib/docbook/html/footnote.xsl trunk/jsxe/buildlib/docbook/html/formal.xsl trunk/jsxe/buildlib/docbook/html/glossary.xsl trunk/jsxe/buildlib/docbook/html/graphics.xsl trunk/jsxe/buildlib/docbook/html/html-rtf.xsl trunk/jsxe/buildlib/docbook/html/html.xsl trunk/jsxe/buildlib/docbook/html/htmltbl.xsl trunk/jsxe/buildlib/docbook/html/index.xsl trunk/jsxe/buildlib/docbook/html/info.xsl trunk/jsxe/buildlib/docbook/html/inline.xsl trunk/jsxe/buildlib/docbook/html/keywords.xsl trunk/jsxe/buildlib/docbook/html/lists.xsl trunk/jsxe/buildlib/docbook/html/maketoc.xsl trunk/jsxe/buildlib/docbook/html/manifest.xsl trunk/jsxe/buildlib/docbook/html/math.xsl trunk/jsxe/buildlib/docbook/html/oldchunker.xsl trunk/jsxe/buildlib/docbook/html/onechunk.xsl trunk/jsxe/buildlib/docbook/html/param.ent trunk/jsxe/buildlib/docbook/html/param.xml trunk/jsxe/buildlib/docbook/html/param.xsl trunk/jsxe/buildlib/docbook/html/param.xweb trunk/jsxe/buildlib/docbook/html/pi.xsl trunk/jsxe/buildlib/docbook/html/profile-chunk-code.xsl trunk/jsxe/buildlib/docbook/html/profile-chunk.xsl trunk/jsxe/buildlib/docbook/html/profile-docbook.xsl trunk/jsxe/buildlib/docbook/html/profile-onechunk.xsl trunk/jsxe/buildlib/docbook/html/qandaset.xsl trunk/jsxe/buildlib/docbook/html/refentry.xsl trunk/jsxe/buildlib/docbook/html/sections.xsl trunk/jsxe/buildlib/docbook/html/synop.xsl trunk/jsxe/buildlib/docbook/html/table.xsl trunk/jsxe/buildlib/docbook/html/task.xsl trunk/jsxe/buildlib/docbook/html/titlepage.templates.xml trunk/jsxe/buildlib/docbook/html/titlepage.templates.xsl trunk/jsxe/buildlib/docbook/html/titlepage.xsl trunk/jsxe/buildlib/docbook/html/toc.xsl trunk/jsxe/buildlib/docbook/html/verbatim.xsl trunk/jsxe/buildlib/docbook/html/xref.xsl trunk/jsxe/buildlib/docbook/lib/ trunk/jsxe/buildlib/docbook/lib/ChangeLog trunk/jsxe/buildlib/docbook/lib/lib.xml trunk/jsxe/buildlib/docbook/lib/lib.xsl trunk/jsxe/buildlib/docbook/lib/lib.xweb trunk/jsxe/buildlib/fop.jar trunk/jsxe/doc/ trunk/jsxe/doc/manual/ trunk/jsxe/doc/manual/manual.xml Modified: trunk/jsxe/Changelog =================================================================== --- trunk/jsxe/Changelog 2006-08-28 21:56:21 UTC (rev 1190) +++ trunk/jsxe/Changelog 2006-08-29 02:13:58 UTC (rev 1191) @@ -2,6 +2,7 @@ * Changed the messages files to be named the standard ResourceBundle way. * Fixed default key binding for exit. + * Added some new processing for generating jsXe's manual. 08/27/2006 Ian Lewis <Ian...@me...> Modified: trunk/jsxe/INSTALL =================================================================== --- trunk/jsxe/INSTALL 2006-08-28 21:56:21 UTC (rev 1190) +++ trunk/jsxe/INSTALL 2006-08-29 02:13:58 UTC (rev 1191) @@ -2,6 +2,7 @@ Java >= 1.4.2 Xerces >= 2.8.0 +Xalan >= 2.7.0 (for building jsXe's documentation) launch4j >= 3.0.0pre1 (for building the installer from source) GETTING jsXe @@ -50,9 +51,12 @@ Xerces (A Xerces 2.8.0 binary distribution is not included in the CVS source tree. You can aquire it at at http://xml.apache.org/) The jar files xercesImpl.jar, xml-apis.jar, and resolver.jar from the 2.8.0 distribution are -required. These should be placed in a directory called lib in jsXe's root folder -(where you installed jsXe's source) or in the jre/lib/ext or lib/ext in your -JVM. These jar files will be included with jsXe distributions for convenience. +required. These should already be in a directory called lib in jsXe's root folder +(where you installed jsXe's source) but you will need to copy them in +the jre/lib/endorsed directory in your JVM. You will also need to put the +xalan.jar in the jre/lib/endorsed directory in order to build jsXe's +documentation. xalan.jar is not currently included with jsXe so you need to +download it from http://xml.apache.org/ In order to build jsXe's installer or a windows distribution of jsXe you will need to install launch4j (http://launch4j.sourceforge.net/). You can install it Modified: trunk/jsxe/build.xml =================================================================== --- trunk/jsxe/build.xml 2006-08-28 21:56:21 UTC (rev 1190) +++ trunk/jsxe/build.xml 2006-08-29 02:13:58 UTC (rev 1191) @@ -46,7 +46,7 @@ <property name="bin.dir" value="${root.dir}/bin"/> <property name="messages.dir" value="${root.dir}/messages"/> <property name="build.messages" value="${build.dir}/messages"/> - <property name="docs.dir" value="${src.dir}/doc"/> + <property name="docs.dir" value="${root.dir}/doc"/> <property name="plugin.dir" value="${root.dir}/jars"/> <property name="jsxe.jar" value="${build.dir}/${app.name}.jar"/> <!-- jar file needs to be relative to the exe --> @@ -63,6 +63,7 @@ <property name="build.javadocs" value="${build.dir}/api"/> <property name="build.help" value="${build.docs}/help"/> <property name="buildlib.dir" value="${root.dir}/buildlib"/> + <property name="docbook.dir" value="${buildlib.dir}/docbook"/> <!--<property name="app.version" value="${major.version}.${minor.version} beta"/>--> <!--<property name="app_version" value="${major.version}_${minor.version}beta"/>--> <property name="distbin.dir" value="${build.dir}/${app.name}-${app_version}-bin"/> @@ -193,6 +194,14 @@ <!-- }}} --> + <!-- {{{ catalog used for building docs --> + <xmlcatalog id="docbook-catalog"> + <catalogpath> + <pathelement location="${docbook.dir}/catalog.xml"/> + </catalogpath> + </xmlcatalog> + <!-- }}} --> + <echo message="${app.name} ${app.version}"/> <echo message="----------------------------------------------------------"/> </target> @@ -349,6 +358,14 @@ <!-- }}} --> <!-- {{{ ============ Generates the documentation ====================== --> <target depends="prepare-doc, prepare-src" name="doc" description="Build documentation"> + <taskdef name="fop" classname="org.apache.fop.tools.anttasks.Fop"> + <classpath> + <pathelement location="${buildlib.dir}\fop.jar"/> + <pathelement location="${buildlib.dir}\avalon.jar"/> + <pathelement location="${buildlib.dir}\batik.jar"/> + </classpath> + </taskdef> + <copy file="${root.dir}/COPYING" tofile="${build.docs}/COPYING"/> <copy file="${root.dir}/README" tofile="${build.docs}/README"/> <copy file="${root.dir}/AUTHORS" tofile="${build.docs}/AUTHORS"/> @@ -358,6 +375,36 @@ <copy file="${root.dir}/THANKS" tofile="${build.docs}/THANKS"/> <copy file="${root.dir}/NEWS" tofile="${build.docs}/NEWS"/> + <!-- generate the html manual --> + <mkdir dir="${build.docs}/manual"/> + <xslt basedir="${docs.dir}/manual" + destdir="${build.docs}/manual" + includes="**/manual.xml" + style="${docbook.dir}/html/docbook.xsl"> + <outputproperty name="encoding" value="UTF-8"/> + <mapper type="glob" from="*.xml" to="*.html"/> + <xmlcatalog refid="docbook-catalog"/> + </xslt> + + <!-- generate the pdf manual --> + <mkdir dir="${build.dir}/manual"/> + <xslt basedir="${docs.dir}/manual" + destdir="${build.dir}/manual" + includes="**/manual.xml" + style="${docbook.dir}/fo/docbook.xsl"> + <outputproperty name="encoding" value="UTF-8"/> + <mapper type="glob" from="*.xml" to="*.fo"/> + <xmlcatalog refid="catalog"/> + </xslt> + + <fop format="application/pdf" + outdir="${build.dir}" + messagelevel="warn"> + <fileset dir="${build.dir}/manual"> + <include name="*.fo"/> + </fileset> + </fop> + <javadoc author="true" destdir="${build.javadocs}" doctitle="${app.name} ${app.version} API" locale="en_US" packagenames="*" sourcepath="${build.src}" version="true" windowtitle="${app.name} ${app.version} API"> <link href="${java.javadoc.link}"/> <link href="${xerces.javadoc.link}"/> Added: trunk/jsxe/buildlib/avalon.jar =================================================================== (Binary files differ) Property changes on: trunk/jsxe/buildlib/avalon.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/jsxe/buildlib/batik.jar =================================================================== (Binary files differ) Property changes on: trunk/jsxe/buildlib/batik.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/jsxe/buildlib/docbook/VERSION =================================================================== --- trunk/jsxe/buildlib/docbook/VERSION (rev 0) +++ trunk/jsxe/buildlib/docbook/VERSION 2006-08-29 02:13:58 UTC (rev 1191) @@ -0,0 +1,85 @@ +<?xml version='1.0'?> <!-- -*- nxml -*- --> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fm="http://freshmeat.net/projects/freshmeat-submit/" + xmlns:sf="http://sourceforge.net/" + exclude-result-prefixes="fm sf" + version='1.0'> + +<xsl:param name="VERSION" select="string(document('')//fm:Version[1])"/> +<xsl:param name="sf-relid" select="0"/> +<xsl:strip-space elements="fm:*"/> + +<fm:project> + <fm:Project>DocBook</fm:Project> + <fm:Branch>XSL Stylesheets</fm:Branch> + <fm:Version>1.68.1</fm:Version> +<!-- + <fm:License>MIT/X Consortium License</fm:License> +--> + <fm:Release-Focus> + <!-- Initial freshmeat announcement --> + <!-- Documentation --> + <!-- Code cleanup --> + <!-- Minor feature enhancements --> + <!-- Major feature enhancements --> + Minor bugfixes + <!-- Major bugfixes --> + <!-- Minor security fixes --> + <!-- Major security fixes --> + </fm:Release-Focus> + <fm:Home-Page-URL>http://sourceforge.net/projects/docbook/</fm:Home-Page-URL> + <fm:Gzipped-Tar-URL>http://prdownloads.sourceforge.net/docbook/docbook-xsl-{VERSION}.tar.gz?download</fm:Gzipped-Tar-URL> + <fm:Zipped-Tar-URL>http://prdownloads.sourceforge.net/docbook/docbook-xsl-{VERSION}.zip?download</fm:Zipped-Tar-URL> + <fm:Bzipped-Tar-URL>http://prdownloads.sourceforge.net/docbook/docbook-xsl-{VERSION}.bz2?download</fm:Bzipped-Tar-URL> + <fm:Changelog-URL>http://sourceforge.net/project/shownotes.php?release_id={SFRELID}</fm:Changelog-URL> + <fm:CVS-URL>http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/xsl/</fm:CVS-URL> + <fm:Mailing-List-URL>http://lists.oasis-open.org/archives/docbook-apps/</fm:Mailing-List-URL> + <fm:Changes>This is a minor bug-fix update to the 1.68.0 release. +</fm:Changes> +</fm:project> + +<xsl:template match="/" priority="-100"> + <xsl:if test="$sf-relid = 0"> + <xsl:message terminate="yes"> + <xsl:text>You must specify the sf-relid as a parameter.</xsl:text> + </xsl:message> + </xsl:if> + + <xsl:apply-templates select="//fm:project"/> +</xsl:template> + +<xsl:template match="fm:project"> + <xsl:text> </xsl:text> + <xsl:apply-templates/> + <xsl:text> </xsl:text> + <xsl:apply-templates select="fm:Changes" mode="text"/> +</xsl:template> + +<xsl:template match="fm:Changes"/> + +<xsl:template match="fm:Gzipped-Tar-URL|fm:Zipped-Tar-URL|fm:Bzipped-Tar-URL"> + <xsl:value-of select="local-name(.)"/> + <xsl:text>: </xsl:text> + <xsl:value-of select="substring-before(., '{VERSION}')"/> + <xsl:value-of select="$VERSION"/> + <xsl:value-of select="substring-after(., '{VERSION}')"/> + <xsl:text> </xsl:text> +</xsl:template> + +<xsl:template match="fm:Changelog-URL"> + <xsl:value-of select="local-name(.)"/> + <xsl:text>: </xsl:text> + <xsl:value-of select="substring-before(., '{SFRELID}')"/> + <xsl:value-of select="$sf-relid"/> + <xsl:value-of select="substring-after(., '{SFRELID}')"/> + <xsl:text> </xsl:text> +</xsl:template> + +<xsl:template match="fm:*"> + <xsl:value-of select="local-name(.)"/> + <xsl:text>: </xsl:text> + <xsl:value-of select="normalize-space(.)"/> + <xsl:text> </xsl:text> +</xsl:template> + +</xsl:stylesheet> Added: trunk/jsxe/buildlib/docbook/catalog.xml =================================================================== --- trunk/jsxe/buildlib/docbook/catalog.xml (rev 0) +++ trunk/jsxe/buildlib/docbook/catalog.xml 2006-08-29 02:13:58 UTC (rev 1191) @@ -0,0 +1,30 @@ +<?xml version="1.0"?> +<!DOCTYPE catalog PUBLIC "-//OASIS//DTD XML Catalogs V1.0//EN" + "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"> + +<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> + +<!-- ==== Local Catalog for docbook-xsl ==== --> + + <rewriteURI + uriStartString="http://docbook.sourceforge.net/release/xsl/1.68.1/" + rewritePrefix="file://./docbook/"/> + + <rewriteURI + uriStartString="http://docbook.sourceforge.net/release/xsl/current/" + rewritePrefix="file://./docbook/"/> + + <rewriteSystem + systemIdStartString="http://docbook.sourceforge.net/release/xsl/1.68.1/" + rewritePrefix="file://./docbook/"/> + + <rewriteSystem + systemIdStartString="http://docbook.sourceforge.net/release/xsl/current/" + rewritePrefix="file://./docbook/"/> + + <group id="DocbookDTD" prefer="public"> + <system + systemId="http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" + uri="file://./docbook/dtd/docbookx.dtd"/> + </group> +</catalog> Added: trunk/jsxe/buildlib/docbook/common/ChangeLog =================================================================== --- trunk/jsxe/buildlib/docbook/common/ChangeLog (rev 0) +++ trunk/jsxe/buildlib/docbook/common/ChangeLog 2006-08-29 02:13:58 UTC (rev 1191) @@ -0,0 +1,819 @@ +2005-02-12 Michael Smith <xm...@us...> + + * .cvsignore: fa.xml, ignore + +2005-02-11 Michael Smith <xm...@us...> + + * Makefile: fa.xml added; ported from trunk + +2005-02-11 Robert Stayton <bob...@us...> + + * Makefile, l10n.xml: Added new fa.xml for Farsi language. + +2005-01-25 Robert Stayton <bob...@us...> + + * labels.xsl: Fixed bug in sect1 label.markup mode that could output the + component label without the section label. + +2005-01-19 Norman Walsh <nw...@us...> + + * titles.xsl: Support refdescriptor + + * titles.xsl: Support title in info for figure, example, and equation. This only occurs in DocBook V5 which is still pretty sporadically supported, but... + +2004-12-11 Robert Stayton <bob...@us...> + + * common.xsl: Minor fixes for itemizedlist symbols. + +2004-12-07 Robert Stayton <bob...@us...> + + * titles.xsl: Fixed bug #1079453, title attribute being added to non-existant element. + +2004-12-02 Michael Smith <xm...@us...> + + * Makefile: New file. + +2004-11-18 Robert Stayton <bob...@us...> + + * l10n.xsl: Fixed bug in lang selection from ancestor-or-self predicate. + +2004-11-17 Robert Stayton <bob...@us...> + + * common.xsl: Fixed bug in strippath template that stripped leading double dots. + +2004-11-16 Michael Smith <xm...@us...> + + * labels.xsl: issue #924251 Wrong numbering of Qandaset entries + applied patch from Harald Joerg. + +2004-10-28 Norman Walsh <nw...@us...> + + * titles.xsl: Fix bug #663552: handle xref correctly when it appears in titles. + +2004-10-24 Jirka Kosek <ko...@us...> + + * table.xsl: Fixed bug #1005990. Column spans are now working also in entrytbl element, not only in table elements. However due to complexity of table code I am not completely sure whether I fixed it on all places. + +2004-10-22 Norman Walsh <nw...@us...> + + * labels.xsl: Bug #1035656: the label for a listitem in an orderedlist must account for the possibility of continuations or alternate starting numbers + +2004-09-22 Robert Stayton <bob...@us...> + + * olink.xsl: Fixed bug where olink.base.uri parameter was being used in the wrong place. + +2004-09-20 Michael Smith <xm...@us...> + + * .cvsignore: Added bs.xml to ignore list. Also, re-sorted list. + (Committed while riding on a train between Yokohama and Tokyo.) + +2004-09-18 Robert Stayton <bob...@us...> + + * targetdatabase.dtd: Changed the page element to an attribute. + +2004-09-17 Peter Eisentraut <pet...@us...> + + * Makefile: branches: 1.22.2; + Bosnian translation by Kemal Skripic + + * l10n.xml: Bosnian translation by Kemal Skripic + +2004-09-17 Robert Stayton <bob...@us...> + + * l10n.xml: Added &bs; entity reference. + + * pi.xsl: Fix Xalan date-time bug. + +2004-09-13 Robert Stayton <bob...@us...> + + * olink.xsl: Fixed bug in olink resolution. + +2004-09-09 Robert Stayton <bob...@us...> + + * common.xsl: Fixed bug in xml:base resolution not recursing through the ancestors. + +2004-09-06 Robert Stayton <bob...@us...> + + * olink.xsl: remove duplicate make.gentext.template and substitute.markup templates. + +2004-08-26 Robert Stayton <bob...@us...> + + * labels.xsl: Added component.label.includes.part.label parameter to appendices and + other component elements. + + * labels.xsl: Add component.label.includes.part.label parameter to add + part number to chapter labels when $label.from.part is nonzero. + +2004-08-19 Jirka Kosek <ko...@us...> + + * l10n.xsl: Fixed variable name + +2004-08-15 Robert Stayton <bob...@us...> + + * l10n.xsl: Another select optimization. + + * l10n.xsl: lang attribute select statement optimized. + +2004-08-11 Robert Stayton <bob...@us...> + + * titles.xsl: In no.anchor.mode, test for any link descendants and switch to + normal formatting if there are none. This preserves formatting + in titleabbrev for TOC and headers. + +2004-08-09 Robert Stayton <bob...@us...> + + * Makefile: Make each locale file dependent on en.xml to pick up any new items + so that all locale files at least have all items, even if not yet + translated. + + * gentext.xsl: Added olink docname placeholder to substitute.markup and make.gentext.template. + +2004-08-08 Robert Stayton <bob...@us...> + + * olink.xsl: New file. + +2004-07-20 Robert Stayton <bob...@us...> + + * titles.xsl: titleabbrev.markup mode was not getting a book's titleabbrev in bookinfo. + +2004-06-26 Robert Stayton <bob...@us...> + + * common.xsl: Added helper templates to resolve xml:base attributes. + + * common.xsl: Changed @fileref processing to support xml:base. + +2004-06-20 Robert Stayton <bob...@us...> + + * gentext.xsl, labels.xsl: Added support for new section.autolabel.max.depth to turn off + section numbering below a certain depth. + +2004-06-16 Robert Stayton <bob...@us...> + + * common.xsl: Removed 'entry' from xsl:strip-space element list because it + can contain #PCDATA. + +2004-06-14 Robert Stayton <bob...@us...> + + * gentext.xsl: Add support for xrefstyle attrib in olinks. + +2004-06-11 Robert Stayton <bob...@us...> + + * l10n.xml: Added missing ar.xml and hr.xml. + +2004-05-28 Robert Stayton <bob...@us...> + + * gentext.xsl, targets.xsl, titles.xsl: Eliminated spurious error messages when collecting olink targets. + +2004-05-19 Jirka Kosek <ko...@us...> + + * gentext.xsl: Fixed misplaced " + +2004-04-26 Robert Stayton <bob...@us...> + + * gentext.xsl: For procedure object.title.template, use formal only if title + actually present. + +2004-04-21 Jirka Kosek <ko...@us...> + + * labels.xsl: Template label.this.section controls whole section label, not only sub-label which corresponds to particular label. Former behaviour was IMHO bug as it was not usable. + +2004-04-12 Robert Stayton <bob...@us...> + + * table.xsl: Fixed bug #880044 in which rowsep or colsep attributes on the + table or informaltable element had no effect. + +2004-04-11 Robert Stayton <bob...@us...> + + * targets.xsl: Another bad parameter name fixed. + + * targets.xsl: Bug # 907582: incorrect parameter name fixed. + +2004-03-10 Robert Stayton <bob...@us...> + + * targets.xsl: Fixed bug whereby bibliography entries were not getting into + the olink database. + +2004-02-18 Robert Stayton <bob...@us...> + + * labels.xsl: Turn off procedure number when formal.procedures = 0. + +2004-01-29 Norman Walsh <nw...@us...> + + * subtitles.xsl, titles.xsl: Support 'info' + +2004-01-26 Robert Stayton <bob...@us...> + + * targets.xsl: Pass empty doctype parameters to write.chunk so the + output can be used as an entity without DOCTYPE. + +2003-12-31 Jirka Kosek <ko...@us...> + + * autoidx-ng.xsl, l10n.dtd: Added support for new i18n friendly indexing method + +2003-12-15 Norman Walsh <nw...@us...> + + * .cvsignore, Makefile: Support sr_Latn locale + +2003-12-13 Robert Stayton <bob...@us...> + + * l10n.xml: Added sr_Latn.xml for Serbian in Latin script. + +2003-12-06 Robert Stayton <bob...@us...> + + * common.xsl: Fixed bug #851603 infinite recursion in copyright.year when + no <year> elements at all. + ... [truncated message content] |
|
From: <ian...@us...> - 2006-08-29 16:06:25
|
Revision: 1197 Author: ian_lewis Date: 2006-08-29 09:06:10 -0700 (Tue, 29 Aug 2006) ViewCVS: http://svn.sourceforge.net/jsxe/?rev=1197&view=rev Log Message: ----------- Merge from 05pre3 branch rev. 1195 Modified Paths: -------------- trunk/jsxe/Changelog trunk/jsxe/build.xml trunk/jsxe/src/net/sourceforge/jsxe/ActionManager.java trunk/jsxe/src/net/sourceforge/jsxe/gui/TabbedView.java trunk/jsxe/src/net/sourceforge/jsxe/gui/menu/WrappingMenu.java Modified: trunk/jsxe/Changelog =================================================================== --- trunk/jsxe/Changelog 2006-08-29 16:05:55 UTC (rev 1196) +++ trunk/jsxe/Changelog 2006-08-29 16:06:10 UTC (rev 1197) @@ -1,3 +1,9 @@ +08/29/2006 Ian Lewis <Ian...@me...> + + * Fixed a memory leak with JMenuItems. ActionManager kept a cache of + Wrapper Action objects. JMenu items register listeners with those Actions + so the JMenuItems would never be Garbage collected. + 08/28/2006 Ian Lewis <Ian...@me...> * Changed the messages files to be named the standard ResourceBundle way. Modified: trunk/jsxe/build.xml =================================================================== --- trunk/jsxe/build.xml 2006-08-29 16:05:55 UTC (rev 1196) +++ trunk/jsxe/build.xml 2006-08-29 16:06:10 UTC (rev 1197) @@ -278,6 +278,15 @@ </fileset> </copy> + <!-- copy the lib directory so that the jsXe.exe can be run + from the build dir --> + <mkdir dir="${build.lib}"/> + <copy todir="${build.lib}"> + <fileset dir="${lib.dir}"> + <include name="**/*"/> + </fileset> + </copy> + <!-- set the build properties --> <propertyfile comment="${app.name}'s build properties" file="${build.dest}/net/sourceforge/jsxe/build.properties"> <entry key="application.name" value="${app.name}"/> @@ -340,13 +349,6 @@ <!-- }}} --> <!-- {{{ ============ Prepares for a build ============================= --> <target depends="init" name="prepare-build"> - <!-- lib --> - <mkdir dir="${build.dir}/lib"/> - <copy todir="${build.dir}/lib"> - <fileset dir="${lib.dir}"> - <include name="**/*"/> - </fileset> - </copy> <!-- bin --> <mkdir dir="${build.dir}/bin"/> <copy todir="${build.dir}/bin"> @@ -621,15 +623,6 @@ <!-- {{{ create the win tar.bz2 file --> - <!-- copy the lib directory so that the jsXe.exe can be run - from the build dir --> - <mkdir dir="${build.dir}/lib"/> - <copy todir="${build.dir}/lib"> - <fileset dir="${build.lib}"> - <include name="**/*"/> - </fileset> - </copy> - <!-- create the windows exe --> <taskdef name="launch4j" classname="net.sf.launch4j.ant.Launch4jTask" Modified: trunk/jsxe/src/net/sourceforge/jsxe/ActionManager.java =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/ActionManager.java 2006-08-29 16:05:55 UTC (rev 1196) +++ trunk/jsxe/src/net/sourceforge/jsxe/ActionManager.java 2006-08-29 16:06:10 UTC (rev 1197) @@ -118,8 +118,11 @@ * @param name the name of the action. */ public static Action getAction(String name) { - Action action = (Action)m_actionMap.get(name); - if (action == null) { + // We can't keep a cache of Wrappers because JMenuItems register + //listeners with them and would never be GCed. + Action action = null; + // Action action = (Action)m_actionMap.get(name); + // if (action == null) { LocalizedAction editAction = getLocalizedAction(name); if (editAction != null) { action = new Wrapper(name); @@ -135,11 +138,11 @@ action.putValue(Action.ACCELERATOR_KEY, KeyEventTranslator.getKeyStroke(keyBinding)); } - m_actionMap.put(name, action); + // m_actionMap.put(name, action); } else { Log.log(Log.WARNING,ActionManager.class,"Unknown action: "+ name); } - } + // } return action; }//}}} @@ -326,7 +329,7 @@ /** * This is an name to Wrapper mapping. */ - private static HashMap m_actionMap = new HashMap(); + // private static HashMap m_actionMap = new HashMap(); private static ArrayList m_actionSets = new ArrayList(); private static boolean initialized = false; Modified: trunk/jsxe/src/net/sourceforge/jsxe/gui/TabbedView.java =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/gui/TabbedView.java 2006-08-29 16:05:55 UTC (rev 1196) +++ trunk/jsxe/src/net/sourceforge/jsxe/gui/TabbedView.java 2006-08-29 16:06:10 UTC (rev 1197) @@ -462,17 +462,16 @@ m_recentFilesMenu.removeAll(); ArrayList historyEntries = jsXe.getBufferHistory().getEntries(); int index = 0; - JMenu addMenu = m_recentFilesMenu; Iterator historyItr = historyEntries.iterator(); while (historyItr.hasNext()) { BufferHistory.BufferHistoryEntry entry = (BufferHistory.BufferHistoryEntry)historyItr.next(); - addMenu.add(new JMenuItem(new OpenRecentFileAction(this, entry))); + m_recentFilesMenu.add(new JMenuItem(new OpenRecentFileAction(this, entry))); index++; } - if (addMenu.getItemCount() == 0) { + if (m_recentFilesMenu.getMenuComponentCount() == 0) { JMenuItem nullItem = new JMenuItem(Messages.getMessage("File.Recent.None")); nullItem.setEnabled(false); - addMenu.add(nullItem); + m_recentFilesMenu.add(nullItem); } }//}}} @@ -671,7 +670,7 @@ //Add recent files menu m_recentFilesMenu = new WrappingMenu(Messages.getMessage("File.Recent"), jsXe.getIntegerProperty("menu.spill.over", 20)); - m_fileMenu.add(m_recentFilesMenu); + m_fileMenu.add(m_recentFilesMenu.getJMenu()); m_fileMenu.addSeparator(); menuItem = new JMenuItem(ActionManager.getAction("save-file")); Modified: trunk/jsxe/src/net/sourceforge/jsxe/gui/menu/WrappingMenu.java =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/gui/menu/WrappingMenu.java 2006-08-29 16:05:55 UTC (rev 1196) +++ trunk/jsxe/src/net/sourceforge/jsxe/gui/menu/WrappingMenu.java 2006-08-29 16:06:10 UTC (rev 1197) @@ -28,7 +28,6 @@ //{{{ jsXe classes import net.sourceforge.jsxe.gui.Messages; -import net.sourceforge.jsxe.EBListener; //}}} //{{{ Java classes @@ -47,15 +46,14 @@ * @author Ian Lewis (<a href="mailto:Ian...@me...">Ian...@me...</a>) * @version $Id$ */ -public class WrappingMenu extends JMenu { +public class WrappingMenu { //{{{ WrappingMenu constructor /** * Constructs a WrappingMenu without an "invoker" and the default wrap count of 20. */ public WrappingMenu() { - super(); - m_addToMenus.push(this); + m_addToMenus.push(new JMenu()); }//}}} //{{{ WrappingMenu constructor @@ -66,9 +64,8 @@ * it wraps. */ public WrappingMenu(int wrapCount) { - super(); m_wrapCount = wrapCount; - m_addToMenus.push(this); + m_addToMenus.push(new JMenu()); }//}}} //{{{ WrappingMenu constructor @@ -80,9 +77,8 @@ * it wraps. */ public WrappingMenu(String label, int wrapCount) { - super(label); m_wrapCount = wrapCount; - m_addToMenus.push(this); + m_addToMenus.push(new JMenu(label)); }//}}} //{{{ add() @@ -91,11 +87,7 @@ maybeAddMenu(); JMenuItem r; JMenu menu = getCurrentMenu(); - if (menu == this) { - r = super.add(a); - } else { - r = menu.add(a); - } + r = menu.add(a); m_menuHash.put(r, getCurrentMenu()); return r; }//}}} @@ -106,11 +98,7 @@ maybeAddMenu(); Component r; JMenu menu = getCurrentMenu(); - if (menu == this) { - r = super.add(c); - } else { - r = menu.add(c); - } + r = menu.add(c); m_menuHash.put(r, getCurrentMenu()); return r; }//}}} @@ -126,11 +114,7 @@ int addIndex = (int)(index / m_wrapCount); int addSubIndex = (index % m_wrapCount); JMenu menu = (JMenu)m_addToMenus.get(addIndex); - if (menu == this) { - r = super.add(c, addSubIndex); - } else { - r = menu.add(c, addSubIndex); - } + r = menu.add(c, addSubIndex); updateSubMenus(); } return r; @@ -145,11 +129,7 @@ } JMenuItem r; JMenu menu = getCurrentMenu(); - if (menu == this) { - r = super.add(menuItem); - } else { - r = menu.add(menuItem); - } + r = menu.add(menuItem); return r; }//}}} @@ -159,11 +139,7 @@ maybeAddMenu(); JMenuItem r; JMenu menu = getCurrentMenu(); - if (menu == this) { - r = super.add(s); - } else { - r = menu.add(s); - } + r = menu.add(s); m_menuHash.put(r, getCurrentMenu()); return r; }//}}} @@ -179,11 +155,7 @@ int addIndex = (int)(pos / m_wrapCount); int addSubIndex = (pos % m_wrapCount); JMenu menu = (JMenu)m_addToMenus.get(addIndex); - if (menu == this) { - r = super.insert(a, addSubIndex); - } else { - r = menu.insert(a, addSubIndex); - } + r = menu.insert(a, addSubIndex); updateSubMenus(); } return r; @@ -200,17 +172,13 @@ int addIndex = (int)(pos / m_wrapCount); int addSubIndex = (pos % m_wrapCount); JMenu menu = (JMenu)m_addToMenus.get(addIndex); - if (menu == this) { - r = super.insert(mi, addSubIndex); - } else { - r = menu.insert(mi, addSubIndex); - } + r = menu.insert(mi, addSubIndex); updateSubMenus(); } return r; }//}}} - //{{{ insert + //{{{ insert() public void insert(String s, int pos) { if (pos == -1) { @@ -220,11 +188,7 @@ int addIndex = (int)(pos / m_wrapCount); int addSubIndex = (pos % m_wrapCount); JMenu menu = (JMenu)m_addToMenus.get(addIndex); - if (menu == this) { - super.insert(s, addSubIndex); - } else { - menu.insert(s, addSubIndex); - } + menu.insert(s, addSubIndex); updateSubMenus(); } }//}}} @@ -233,12 +197,7 @@ public void remove(Component c) { JMenu menu = (JMenu)m_menuHash.get(c); - if (menu == this) { - super.remove(c); - } else { - menu.remove(c); - } - + menu.remove(c); m_menuHash.remove(c); updateSubMenus(); }//}}} @@ -253,11 +212,7 @@ public void remove(JMenuItem item) { JMenu menu = (JMenu)m_menuHash.get(item); - if (menu == this) { - super.remove(item); - } else { - menu.remove(item); - } + menu.remove(item); m_menuHash.remove(item); updateSubMenus(); }//}}} @@ -265,10 +220,11 @@ //{{{ removeAll() public void removeAll() { + JMenu menu = getJMenu(); + menu.removeAll(); m_menuHash = new HashMap(); m_addToMenus = new Stack(); - m_addToMenus.push(this); - super.removeAll(); + m_addToMenus.push(menu); }//}}} //{{{ getMenuComponent() @@ -280,14 +236,10 @@ int addIndex = (int)(n / m_wrapCount); int addSubIndex = (n % m_wrapCount); JMenu menu = (JMenu)m_addToMenus.get(addIndex); - if (menu == this) { - return super.getMenuComponent(addSubIndex); - } else { - return menu.getMenuComponent(addSubIndex); - } + return menu.getMenuComponent(addSubIndex); }//}}} - //{{{ getMenuComponentCount + //{{{ getMenuComponentCount() /** * Gets the total number of components in this menu * and submenus. @@ -297,6 +249,14 @@ return m_menuHash.keySet().size(); }//}}} + //{{{ getJMenu() + /** + * Gets the JMenu that is used by Swing for this WrappingMenu. + */ + public JMenu getJMenu() { + return (JMenu)m_addToMenus.get(0); + }//}}} + //{{{ MoreMenu class /** * A submenu used by the <code>WrappingMenu</code>. Classes that extend @@ -328,18 +288,6 @@ //{{{ Private members - //{{{ getTrueMenuItemCount() - /** - * Gets the true item count for a sub-menu - */ - private int getTrueMenuItemCount(JMenu menu) { - if (menu == this) { - return super.getMenuComponentCount(); - } else { - return menu.getMenuComponentCount(); - } - }//}}} - //{{{ getCurrentMenu() /** * Gets the current menu that we are adding to. @@ -358,7 +306,7 @@ JMenu menu = (JMenu)m_addToMenus.get(i); //greater than wrap count + 1 because of the "More" menu item. - while (getTrueMenuItemCount(menu) > m_wrapCount + 1) { + while (menu.getMenuComponentCount() > m_wrapCount + 1) { //If we need another menu then make one. JMenu nextMenu; @@ -371,25 +319,21 @@ nextMenu = moreMenu; } - int index = getTrueMenuItemCount(menu)-2; + int index = menu.getMenuComponentCount()-2; Component menuComponent = menu.getComponent(index); menu.remove(index); nextMenu.add(menuComponent, 0); } //while there are less than we want in the menu and it's not the last menu - while (getTrueMenuItemCount(menu) < m_wrapCount + 1 && i+1 < m_addToMenus.size()) { + while (menu.getMenuComponentCount() < m_wrapCount + 1 && i+1 < m_addToMenus.size()) { JMenu nextMenu = (JMenu)m_addToMenus.get(i+1); Component menuComponent = nextMenu.getMenuComponent(0); nextMenu.remove(0); - if (menu == this) { - super.add(menuComponent, getTrueMenuItemCount(this)-1); - } else { - menu.add(menuComponent, getTrueMenuItemCount(menu)-1); - } + menu.add(menuComponent, menu.getMenuComponentCount()-1); - if (getTrueMenuItemCount(nextMenu) == 0) { + if (nextMenu.getMenuComponentCount() == 0) { menu.remove(nextMenu); m_addToMenus.pop(); //if it's empty it must be the last menu. } @@ -402,7 +346,7 @@ * Updates the menu that we are truly adding to. */ private void maybeAddMenu() { - int componentCount = getTrueMenuItemCount(getCurrentMenu()); + int componentCount = getCurrentMenu().getMenuComponentCount(); if (componentCount >= m_wrapCount) { MoreMenu menu = createMoreMenu(); ((JMenu)m_addToMenus.peek()).add(menu); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <ian...@us...> - 2006-08-29 17:56:42
|
Revision: 1198 Author: ian_lewis Date: 2006-08-29 10:56:30 -0700 (Tue, 29 Aug 2006) ViewCVS: http://svn.sourceforge.net/jsxe/?rev=1198&view=rev Log Message: ----------- still can't get catalogs to work Modified Paths: -------------- trunk/jsxe/build.xml trunk/jsxe/buildlib/docbook/catalog.xml Modified: trunk/jsxe/build.xml =================================================================== --- trunk/jsxe/build.xml 2006-08-29 16:06:10 UTC (rev 1197) +++ trunk/jsxe/build.xml 2006-08-29 17:56:30 UTC (rev 1198) @@ -197,11 +197,13 @@ <!-- {{{ catalog used for building docs --> <xmlcatalog id="docbook-catalog"> <catalogpath> - <pathelement location="${docbook.dir}/catalog.xml"/> + <fileset dir="${docbook.dir}" includes="**/catalog.xml"/> </catalogpath> </xmlcatalog> <!-- }}} --> + <echo message="${docbook.dir}"/> + <echo message="${app.name} ${app.version}"/> <echo message="----------------------------------------------------------"/> </target> @@ -396,7 +398,7 @@ style="${docbook.dir}/fo/docbook.xsl"> <outputproperty name="encoding" value="UTF-8"/> <mapper type="glob" from="*.xml" to="*.fo"/> - <xmlcatalog refid="catalog"/> + <xmlcatalog refid="docbook-catalog"/> </xslt> <fop format="application/pdf" @@ -407,10 +409,11 @@ </fileset> </fop> + <javadoc author="true" destdir="${build.javadocs}" doctitle="${app.name} ${app.version} API" locale="en_US" packagenames="*" sourcepath="${build.src}" version="true" windowtitle="${app.name} ${app.version} API"> <link href="${java.javadoc.link}"/> <link href="${xerces.javadoc.link}"/> - </javadoc> + </javadoc> <zip basedir="${build.javadocs}" includes="**/*" zipfile="${build.dir}/${app.name}-${app_version}-api.zip"/> Modified: trunk/jsxe/buildlib/docbook/catalog.xml =================================================================== --- trunk/jsxe/buildlib/docbook/catalog.xml 2006-08-29 16:06:10 UTC (rev 1197) +++ trunk/jsxe/buildlib/docbook/catalog.xml 2006-08-29 17:56:30 UTC (rev 1198) @@ -8,23 +8,27 @@ <rewriteURI uriStartString="http://docbook.sourceforge.net/release/xsl/1.68.1/" - rewritePrefix="file://./docbook/"/> + rewritePrefix="file:///home/ian/src/jsxe/jsxe/buildlib/docbook/"/> <rewriteURI uriStartString="http://docbook.sourceforge.net/release/xsl/current/" - rewritePrefix="file://./docbook/"/> + rewritePrefix="file:///home/ian/src/jsxe/jsxe/buildlib/docbook/"/> <rewriteSystem systemIdStartString="http://docbook.sourceforge.net/release/xsl/1.68.1/" - rewritePrefix="file://./docbook/"/> + rewritePrefix="file:///home/ian/src/jsxe/jsxe/buildlib/docbook/"/> <rewriteSystem systemIdStartString="http://docbook.sourceforge.net/release/xsl/current/" - rewritePrefix="file://./docbook/"/> - + rewritePrefix="file:///home/ian/src/jsxe/jsxe/buildlib/docbook/"/> + + <rewriteSystem + systemIdStartString="http://www.oasis-open.org/docbook/xml/4.4/" + rewritePrefix="file:///home/ian/src/jsxe/jsxe/buildlib/docbook/dtd/"/> + <group id="DocbookDTD" prefer="public"> <system systemId="http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" - uri="file://./docbook/dtd/docbookx.dtd"/> + uri="file:///home/ian/src/jsxe/jsxe/buildlib/docbook/dtd/docbookx.dtd"/> </group> </catalog> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <ian...@us...> - 2006-08-30 04:58:30
|
Revision: 1206 Author: ian_lewis Date: 2006-08-29 21:58:24 -0700 (Tue, 29 Aug 2006) ViewCVS: http://svn.sourceforge.net/jsxe/?rev=1206&view=rev Log Message: ----------- Merge from 05pre3 branch rev. 1205 Modified Paths: -------------- trunk/jsxe/Changelog trunk/jsxe/src/net/sourceforge/jsxe/properties Modified: trunk/jsxe/Changelog =================================================================== --- trunk/jsxe/Changelog 2006-08-30 04:56:43 UTC (rev 1205) +++ trunk/jsxe/Changelog 2006-08-30 04:58:24 UTC (rev 1206) @@ -3,6 +3,8 @@ * Fixed a memory leak with JMenuItems. ActionManager kept a cache of Wrapper Action objects. JMenu items register listeners with those Actions so the JMenuItems would never be Garbage collected. + * Fixed that the Find action had Ctrl-v as the default shortcut. Changed it + to Ctrl-f 08/28/2006 Ian Lewis <Ian...@me...> Modified: trunk/jsxe/src/net/sourceforge/jsxe/properties =================================================================== --- trunk/jsxe/src/net/sourceforge/jsxe/properties 2006-08-30 04:56:43 UTC (rev 1205) +++ trunk/jsxe/src/net/sourceforge/jsxe/properties 2006-08-30 04:58:24 UTC (rev 1206) @@ -64,7 +64,7 @@ cut.shortcut=C+x copy.shortcut=C+c paste.shortcut=C+v -find.shortcut=C+v +find.shortcut=C+f findnext.shortcut=C+g undo.shortcut=C+z redo.shortcut=C+y This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |