This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "QuickNotepad jEdit plugin".
The branch, master has been created
at 2961baf57c8ab3daf7d6e053f2f41e5ff3722eb1 (commit)
- Log -----------------------------------------------------------------
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=2961baf57c8ab3daf7d6e053f2f41e5ff3722eb1
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=2961baf57c8ab3daf7d6e053f2f41e5ff3722eb1
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=2961baf57c8ab3daf7d6e053f2f41e5ff3722eb1;hb=2961baf57c8ab3daf7d6e053f2f41e5ff3722eb1
commit 2961baf57c8ab3daf7d6e053f2f41e5ff3722eb1
Author: Björn "Vampire" Kautler <Vampire@...>
Date: Mon Sep 19 04:07:53 2011 +0200
Raise version to 4.4
diff --git a/QuickNotepad.props b/QuickNotepad.props
index 574280c..3d2ed28 100644
--- a/QuickNotepad.props
+++ b/QuickNotepad.props
@@ -10,7 +10,7 @@ plugin.QuickNotepadPlugin.name=QuickNotepad
plugin.QuickNotepadPlugin.author=John Gellene
# version number == jEdit version number
-plugin.QuickNotepadPlugin.version=4.3
+plugin.QuickNotepadPlugin.version=4.4
# online help
plugin.QuickNotepadPlugin.docs=index.html
diff --git a/build.xml b/build.xml
index 85418cf..e5906f9 100644
--- a/build.xml
+++ b/build.xml
@@ -9,7 +9,7 @@
<property file="../build.properties"/>
<property name="user-doc.xml"
- value="users-guide.xml" />
+ value="users-guide.xml" />
<import file="${build.support}/plugin-build.xml" />
diff --git a/users-guide.xml b/users-guide.xml
index 73e7011..92c76af 100644
--- a/users-guide.xml
+++ b/users-guide.xml
@@ -32,7 +32,7 @@
the file <filename>COPYING.DOC.txt</filename> included with the
jEdit distribution.</para>
</legalnotice>
- <title>QuickNotepad 4.2</title>
+ <title>QuickNotepad 4.4</title>
</articleinfo>
<section>
<title>Introduction</title>
@@ -266,4 +266,4 @@
url="mailto:jgellene@...> or the jEdit-users
mailing list.</para>
</section>
-</article>
\ No newline at end of file
+</article>
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=a6817a4c30e7af4dd22e1ded9831eaa4af621a33
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=a6817a4c30e7af4dd22e1ded9831eaa4af621a33
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=a6817a4c30e7af4dd22e1ded9831eaa4af621a33;hb=a6817a4c30e7af4dd22e1ded9831eaa4af621a33
commit a6817a4c30e7af4dd22e1ded9831eaa4af621a33
Author: Björn "Vampire" Kautler <Vampire@...>
Date: Mon Sep 19 03:50:12 2011 +0200
Move QuickNotepad plugin out from core tree
diff --git a/build.xml b/build.xml
index 3451e56..85418cf 100644
--- a/build.xml
+++ b/build.xml
@@ -8,13 +8,9 @@
<property file="build.properties"/>
<property file="../build.properties"/>
- <property name="jedit.install.dir"
- location="../../build" />
<property name="user-doc.xml"
value="users-guide.xml" />
- <property name="build.support"
- value="../../../build-support" />
<import file="${build.support}/plugin-build.xml" />
<selector id="docSrcFiles">
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=7c43d33f1847f80c32f79df7c9d7c848edd286a1
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=7c43d33f1847f80c32f79df7c9d7c848edd286a1
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=7c43d33f1847f80c32f79df7c9d7c848edd286a1;hb=7c43d33f1847f80c32f79df7c9d7c848edd286a1
commit 7c43d33f1847f80c32f79df7c9d7c848edd286a1
Author: Alan Ezust <ezust@...>
Date: Thu Jul 28 20:44:22 2011 +0000
Parse error.
diff --git a/users-guide.xml b/users-guide.xml
index 242c9c6..73e7011 100644
--- a/users-guide.xml
+++ b/users-guide.xml
@@ -3,7 +3,7 @@
<!-- Copyright (C) 2001 John Gellene -->
<article id="QuickNotepad"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xi="http://www.w3.org/2001/XInclude" xsi:noNamespaceSchemaLocation='http://www.docbook.org/xsd/4.4/docbook.xsd'>
-><articleinfo>
+<articleinfo>
<author>
<firstname>John</firstname>
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=ec9e8a9cdcdbc9c5cde94b3e2bd3a019ac9c295a
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=ec9e8a9cdcdbc9c5cde94b3e2bd3a019ac9c295a
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=ec9e8a9cdcdbc9c5cde94b3e2bd3a019ac9c295a;hb=ec9e8a9cdcdbc9c5cde94b3e2bd3a019ac9c295a
commit ec9e8a9cdcdbc9c5cde94b3e2bd3a019ac9c295a
Author: Alan Ezust <ezust@...>
Date: Thu Jul 28 17:17:37 2011 +0000
Rolling back change# 19686.
diff --git a/users-guide.xml b/users-guide.xml
index bddabb2..242c9c6 100644
--- a/users-guide.xml
+++ b/users-guide.xml
@@ -3,8 +3,7 @@
<!-- Copyright (C) 2001 John Gellene -->
<article id="QuickNotepad"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xi="http://www.w3.org/2001/XInclude" xsi:noNamespaceSchemaLocation='http://www.docbook.org/xsd/4.4/docbook.xsd'>
->
-<articleinfo>
+><articleinfo>
<author>
<firstname>John</firstname>
@@ -33,7 +32,6 @@
the file <filename>COPYING.DOC.txt</filename> included with the
jEdit distribution.</para>
</legalnotice>
-
<title>QuickNotepad 4.2</title>
</articleinfo>
<section>
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=d17a414f40fb804bdf7ab9c6b7e6bcdb05ea5354
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=d17a414f40fb804bdf7ab9c6b7e6bcdb05ea5354
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=d17a414f40fb804bdf7ab9c6b7e6bcdb05ea5354;hb=d17a414f40fb804bdf7ab9c6b7e6bcdb05ea5354
commit d17a414f40fb804bdf7ab9c6b7e6bcdb05ea5354
Author: Alan Ezust <ezust@...>
Date: Wed Jun 15 05:32:52 2011 +0000
Updated to use docbook 4.4 xsl.
diff --git a/users-guide.xml b/users-guide.xml
index ebf15ec..bddabb2 100644
--- a/users-guide.xml
+++ b/users-guide.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- QuickNotepad 2.0 help documentation -->
<!-- Copyright (C) 2001 John Gellene -->
-<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
-<article id="QuickNotepad">
- <articleinfo>
+<article id="QuickNotepad"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xi="http://www.w3.org/2001/XInclude" xsi:noNamespaceSchemaLocation='http://www.docbook.org/xsd/4.4/docbook.xsd'>
+>
+<articleinfo>
<author>
<firstname>John</firstname>
@@ -35,9 +35,8 @@
</legalnotice>
<title>QuickNotepad 4.2</title>
- </articleinfo>
-
- <simplesect>
+</articleinfo>
+<section>
<title>Introduction</title>
<indexterm>
@@ -65,9 +64,8 @@
<para>The file <filename>changes40.txt</filename> in the plugin's source
code details the changes that were made to the plugin to conform to the
new plugin API for jEdit version 4.0.</para>
- </simplesect>
-
- <simplesect>
+</section>
+<section>
<title>Operation</title>
<para><indexterm>
@@ -159,9 +157,8 @@
<para>QuickNotepad ignores function keys and other combination key
presses.</para>
- </simplesect>
-
- <simplesect>
+</section>
+<section>
<title>Toolbar buttons</title>
<para>Three buttons above the text area provide file management
@@ -204,9 +201,8 @@
<para>One other operation is available as a keyboard shortcut.
<guilabel>Bring QuickNotepad to front</guilabel> activates the plugin
and makes visible if it is currently hidden in a docking window.</para>
- </simplesect>
-
- <simplesect id="options">
+</section>
+<section id="options">
<title>Options</title>
<indexterm>
@@ -244,9 +240,8 @@
committed.</para>
</listitem>
</itemizedlist>
- </simplesect>
-
- <simplesect>
+</section>
+<section>
<title>Legal notices</title>
<para>The QuickNotepad plugin is released under the GNU General Public
@@ -265,13 +260,12 @@
copy of the license is included in the file
<filename>COPYING.DOC.txt</filename> included with the jEdit
distribution.</para>
- </simplesect>
-
- <simplesect>
+</section>
+<section>
<title>Feedback</title>
<para>Comments, bug reports and other feedback may be sent to the <ulink
url="mailto:jgellene@...> or the jEdit-users
mailing list.</para>
- </simplesect>
+</section>
</article>
\ No newline at end of file
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=8c6ae9a44bbf4f598afa08325348b366211a5305
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=8c6ae9a44bbf4f598afa08325348b366211a5305
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=8c6ae9a44bbf4f598afa08325348b366211a5305;hb=8c6ae9a44bbf4f598afa08325348b366211a5305
commit 8c6ae9a44bbf4f598afa08325348b366211a5305
Author: Björn "Vampire" Kautler <Vampire@...>
Date: Tue Jun 30 21:44:20 2009 +0000
cleaning up the MacOSX build file and making the MacOSX plugin buildable on any platform
diff --git a/build.xml b/build.xml
index 5e20164..3451e56 100644
--- a/build.xml
+++ b/build.xml
@@ -5,10 +5,14 @@
This is an ant build.xml file for building the QuickNotepad plugin for jEdit.
</description>
+ <property file="build.properties"/>
+ <property file="../build.properties"/>
+
<property name="jedit.install.dir"
location="../../build" />
<property name="user-doc.xml"
value="users-guide.xml" />
+
<property name="build.support"
value="../../../build-support" />
<import file="${build.support}/plugin-build.xml" />
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=d0263e168909bf2bc0622fdd3c6098f39e767623
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=d0263e168909bf2bc0622fdd3c6098f39e767623
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=d0263e168909bf2bc0622fdd3c6098f39e767623;hb=d0263e168909bf2bc0622fdd3c6098f39e767623
commit d0263e168909bf2bc0622fdd3c6098f39e767623
Author: Björn "Vampire" Kautler <Vampire@...>
Date: Mon Oct 1 22:34:18 2007 +0000
Updated the Deb Ant Task to work with Ant 1.7 as there were incompatible API changes between 1.6.5 and 1.7.0
diff --git a/build.xml b/build.xml
index 1eb433a..5e20164 100644
--- a/build.xml
+++ b/build.xml
@@ -9,7 +9,9 @@
location="../../build" />
<property name="user-doc.xml"
value="users-guide.xml" />
- <import file="../../../build-support/plugin-build.xml" />
+ <property name="build.support"
+ value="../../../build-support" />
+ <import file="${build.support}/plugin-build.xml" />
<selector id="docSrcFiles">
<filename name="users-guide.xml" />
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=3c2295440a2db52c06621fdfbc22077bbee1b79f
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=3c2295440a2db52c06621fdfbc22077bbee1b79f
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=3c2295440a2db52c06621fdfbc22077bbee1b79f;hb=3c2295440a2db52c06621fdfbc22077bbee1b79f
commit 3c2295440a2db52c06621fdfbc22077bbee1b79f
Author: Björn "Vampire" Kautler <Vampire@...>
Date: Tue Jul 10 23:22:40 2007 +0000
Fixing lots of small things
diff --git a/build.xml b/build.xml
index 341f7ef..1eb433a 100644
--- a/build.xml
+++ b/build.xml
@@ -9,7 +9,7 @@
location="../../build" />
<property name="user-doc.xml"
value="users-guide.xml" />
- <import file="../../build-support/plugin-build.xml" />
+ <import file="../../../build-support/plugin-build.xml" />
<selector id="docSrcFiles">
<filename name="users-guide.xml" />
diff --git a/users-guide.xml b/users-guide.xml
index 21ab3f2..ebf15ec 100644
--- a/users-guide.xml
+++ b/users-guide.xml
@@ -1,247 +1,277 @@
-<?xml version="1.0" standalone="no" ?>
+<?xml version="1.0" encoding="UTF-8"?>
<!-- QuickNotepad 2.0 help documentation -->
<!-- Copyright (C) 2001 John Gellene -->
-
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<article id="QuickNotepad">
-
- <articleinfo>
- <author>
- <firstname>John</firstname><surname>Gellene</surname>
- <affiliation><address><email>jgellene@...>
- </author>
- <copyright><year>2001</year><holder>John Gellene</holder></copyright>
- <legalnotice><title>Legal Notice</title>
- <para>
- Permission is granted to copy, distribute and/or modify this document
- under the terms of the GNU Free Documentation License, Version 1.1 or
- any later version published by the Free Software Foundation; with no
- <quote>Invariant Sections</quote>, <quote>Front-Cover Texts</quote> or
- <quote>Back-Cover Texts</quote>, each as defined in the license. A copy of
- the license is included in the file <filename>COPYING.DOC.txt</filename>
- included with the jEdit distribution.
- </para>
- </legalnotice>
- <title>QuickNotepad 4.2</title>
- </articleinfo>
-
-<simplesect><title>Introduction</title>
-<indexterm><primary>QuickNotepad</primary></indexterm>
-<para>
- This plugin provides a dockable <quote>scratch pad</quote> for writing
- and displaying notes, to do lists or similar items as unformatted text.
- The text is automatically saved upon closing the plugin or exiting
- jEdit. It can also be saved manually. The user can change the file to be
- displayed during the current editing session. The path of the default
- notepad file can be changed as a user option. Finally, the text file can
- be copied to a new, untitled jEdit buffer so that it can be edited by the
- main program.
-</para>
-
-<para>
- The <citetitle>jEdit Plugin Guide</citetitle> details the development
- and design of QuickNotepad. It is a simple but functional dockable plugin
- that incorporates the basic elements of the jEdit plugin architecture.
-</para>
-
-<para>
- The file <filename>changes42.txt</filename> in the plugin's source
- code details the changes that were made to the plugin to conform to
- the new plugin API for jEdit version 4.2.
-</para>
-
-<para>
- The file <filename>changes40.txt</filename> in the plugin's source
- code details the changes that were made to the plugin to conform to
- the new plugin API for jEdit version 4.0.
-</para>
-</simplesect>
-
-<simplesect><title>Operation</title>
-
-<para>
-<indexterm>
- <primary>QuickNotepad</primary>
- <secondary>shortcut keys</secondary>
-</indexterm>
- When QuickNotepad is activated, it loads and displays the file stored in
- its properties as unformatted text. The text can be edited using the
- keyboard and mouse. The text area component recognizes the following
- basic editing shortcuts:
-</para>
-<!-- Limitations on xsltproc's capabilities require a blank column between -->
-<!-- the two columns of data to provide spacing for the table. -->
-<informaltable frame="none">
- <tgroup cols="4" align="left">
- <colspec colnum="1"/> <!-- blank column -->
- <colspec colnum="2"/>
- <colspec colnum="3"/> <!-- blank column -->
- <colspec colnum="4"/>
- <tbody>
- <row>
- <entry> </entry>
- <entry>Cut</entry>
- <entry> </entry>
- <entry><keycombo action="simul"><keysym>Ctrl</keysym><keysym>x</keysym></keycombo></entry>
- </row>
- <row>
- <entry> </entry>
- <entry>Copy</entry>
- <entry> </entry>
- <entry><keycombo action="simul"><keysym>Ctrl</keysym><keysym>c</keysym></keycombo></entry>
- </row>
- <row>
- <entry> </entry>
- <entry>Paste</entry>
- <entry> </entry>
- <entry><keycombo action="simul"><keysym>Ctrl</keysym><keysym>v</keysym></keycombo></entry>
- </row>
- <row>
- <entry> </entry>
- <entry>Select All</entry>
- <entry> </entry>
- <entry><keycombo action="simul"><keysym>Ctrl</keysym><keysym>a</keysym></keycombo></entry>
- </row>
- </tbody>
- </tgroup>
-</informaltable>
-
-<para>
- QuickNotepad ignores function keys and other combination key presses.
-</para>
-
-</simplesect>
-
-<simplesect><title>Toolbar buttons</title>
-
-<para>
- Three buttons above the text area provide file management operations:
-</para>
-
-<itemizedlist>
- <listitem>
- <para>
- <guilabel>Choose notepad file</guilabel> - this button opens a file selection
- dialog permitting the user to select a different file to view in the
- text area. If a new file is selected, the old file is
- auomatically saved. The selection is valid only for the current
- editing session; to change the default QuickNotepad file for future
- sessions, use the <link linkend="options">options dialog</link>.
- </para>
- </listitem>
- <listitem>
- <para>
- <guilabel>Save notepad file</guilabel> - this button causes QuickNotepad to
- write the contents of the text area to the designated notepad file. To
- save the text to another file name, use the <guilabel>Copy notepad to
- buffer</guilabel> operation.
- </para>
- </listitem>
- <listitem>
- <para>
- <guilabel>Copy notepad to buffer</guilabel> - this button causes the
- contents of the text to be written to a newly created,
- untitled buffer in the main text editing area. This operation
- does not alter the QuickNotepad text area or write its text to
- storage. Further changes to either the QuickNotepad text area or
- the new buffer will not affect the other.
- </para>
- </listitem>
-</itemizedlist>
-
-<para>
- These operations are listed in the menu which appears for
- QuickNotepad under the <guimenu>Plugins</guimenu> heading. They can
- also be made the subject of keyboard shortcuts in the
- <guilabel>Plugin Shortcuts</guilabel> pane of jEdit's options dialog.
-</para>
-
-<para>
- One other operation is available as a keyboard shortcut. <guilabel>Bring
- QuickNotepad to front</guilabel> activates the plugin and makes visible
- if it is currently hidden in a docking window.
-</para>
-
-</simplesect>
-
-<simplesect id="options"><title>Options</title>
-<indexterm>
- <primary>QuickNotepad</primary>
- <secondary>options</secondary>
-</indexterm>
-
-<para>
- There are three options which can be set
- using the pane for QuickNotepad in the <guilabel>Plugin
- Shortcuts</guilabel> section of the general options dialog:
-</para>
-<itemizedlist>
- <listitem>
- <para>
- A checkbox governs whether the name of the notepad file will be
- displayed in the toolbar panel above the text area. Even if the file
- name display is enabled, if the plugin is displayed to the left or right
- of the main editing area, the notepad file name will likely be partially
- or completely hidden.
- </para>
- </listitem>
- <listitem>
- <para>
- A text field and adjacent button allow the user to choose the path of
- the default notepad file by typing its name or opening a file chooser
- dialog. This file will be loaded (and the old file saved) once the
- plugin's options settings are committed.
- </para>
- </listitem>
- <listitem>
- <para>
- A third button shows the name, size and style of the font used by the
- QuickNotepad text area. Pressing the button summons a font chooser
- dialog for making a new selection. The text area will be
- redrawn with the new font once the change is committed.
- </para>
- </listitem>
-</itemizedlist>
-
-</simplesect>
-
-<simplesect><title>Legal notices</title>
-
-<para>
- The QuickNotepad plugin is released under the GNU General Public License
- (either version 2 or any later version, at the user's option). A copy
- of the GPL is available in the <filename>COPYING.txt</filename> file
- in the jEdit distribution.
-</para>
-
-<para>
- The QuickNotepad plugin comes with ABSOLUTELY NO WARRANTY OF ANY KIND;
- see section 11 and 12 of the GPL for details.
-</para>
-
-<para>
- Permission is granted to copy, distribute and/or modify this document
- under the terms of the GNU Free Documentation License, Version 1.1 or
- any later version published by the Free Software Foundation; with no
- <quote>Invariant Sections</quote>, <quote>Front-Cover Texts</quote> or
- <quote>Back-Cover Texts</quote>, each as defined in the license. A copy
- of the license is included in the file
- <filename>COPYING.DOC.txt</filename> included with the jEdit distribution.
-</para>
-
-</simplesect>
-
-<simplesect><title>Feedback</title>
-
-<para>
- Comments, bug reports and other feedback may be sent to the
- <ulink url="mailto:jgellene@...> or the
- jEdit-users mailing list.
-</para>
-
-</simplesect>
-
-
-</article>
+ <articleinfo>
+ <author>
+ <firstname>John</firstname>
+
+ <surname>Gellene</surname>
+
+ <affiliation>
+ <address><email>jgellene@...>
+ </affiliation>
+ </author>
+
+ <copyright>
+ <year>2001</year>
+
+ <holder>John Gellene</holder>
+ </copyright>
+
+ <legalnotice>
+ <title>Legal Notice</title>
+
+ <para>Permission is granted to copy, distribute and/or modify this
+ document under the terms of the GNU Free Documentation License,
+ Version 1.1 or any later version published by the Free Software
+ Foundation; with no <quote>Invariant Sections</quote>,
+ <quote>Front-Cover Texts</quote> or <quote>Back-Cover Texts</quote>,
+ each as defined in the license. A copy of the license is included in
+ the file <filename>COPYING.DOC.txt</filename> included with the
+ jEdit distribution.</para>
+ </legalnotice>
+
+ <title>QuickNotepad 4.2</title>
+ </articleinfo>
+
+ <simplesect>
+ <title>Introduction</title>
+
+ <indexterm>
+ <primary>QuickNotepad</primary>
+ </indexterm>
+
+ <para>This plugin provides a dockable <quote>scratch pad</quote> for
+ writing and displaying notes, to do lists or similar items as
+ unformatted text. The text is automatically saved upon closing the
+ plugin or exiting jEdit. It can also be saved manually. The user can
+ change the file to be displayed during the current editing session. The
+ path of the default notepad file can be changed as a user option.
+ Finally, the text file can be copied to a new, untitled jEdit buffer so
+ that it can be edited by the main program.</para>
+
+ <para>The <citetitle>jEdit Plugin Guide</citetitle> details the
+ development and design of QuickNotepad. It is a simple but functional
+ dockable plugin that incorporates the basic elements of the jEdit plugin
+ architecture.</para>
+
+ <para>The file <filename>changes42.txt</filename> in the plugin's source
+ code details the changes that were made to the plugin to conform to the
+ new plugin API for jEdit version 4.2.</para>
+
+ <para>The file <filename>changes40.txt</filename> in the plugin's source
+ code details the changes that were made to the plugin to conform to the
+ new plugin API for jEdit version 4.0.</para>
+ </simplesect>
+
+ <simplesect>
+ <title>Operation</title>
+
+ <para><indexterm>
+ <primary>QuickNotepad</primary>
+
+ <secondary>shortcut keys</secondary>
+ </indexterm> When QuickNotepad is activated, it loads and displays
+ the file stored in its properties as unformatted text. The text can be
+ edited using the keyboard and mouse. The text area component recognizes
+ the following basic editing shortcuts:</para>
+
+ <!-- Limitations on xsltproc's capabilities require a blank column between -->
+
+ <!-- the two columns of data to provide spacing for the table. -->
+
+ <informaltable frame="none">
+ <tgroup align="left" cols="4">
+ <colspec colnum="1" />
+
+ <!-- blank column -->
+
+ <colspec colnum="2" />
+
+ <colspec colnum="3" />
+
+ <!-- blank column -->
+
+ <colspec colnum="4" />
+
+ <tbody>
+ <row>
+ <entry></entry>
+
+ <entry>Cut</entry>
+
+ <entry></entry>
+
+ <entry><keycombo action="simul">
+ <keysym>Ctrl</keysym>
+
+ <keysym>x</keysym>
+ </keycombo></entry>
+ </row>
+
+ <row>
+ <entry></entry>
+
+ <entry>Copy</entry>
+
+ <entry></entry>
+
+ <entry><keycombo action="simul">
+ <keysym>Ctrl</keysym>
+
+ <keysym>c</keysym>
+ </keycombo></entry>
+ </row>
+
+ <row>
+ <entry></entry>
+
+ <entry>Paste</entry>
+
+ <entry></entry>
+
+ <entry><keycombo action="simul">
+ <keysym>Ctrl</keysym>
+
+ <keysym>v</keysym>
+ </keycombo></entry>
+ </row>
+
+ <row>
+ <entry></entry>
+
+ <entry>Select All</entry>
+
+ <entry></entry>
+
+ <entry><keycombo action="simul">
+ <keysym>Ctrl</keysym>
+
+ <keysym>a</keysym>
+ </keycombo></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+
+ <para>QuickNotepad ignores function keys and other combination key
+ presses.</para>
+ </simplesect>
+
+ <simplesect>
+ <title>Toolbar buttons</title>
+
+ <para>Three buttons above the text area provide file management
+ operations:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para><guilabel>Choose notepad file</guilabel> - this button
+ opens a file selection dialog permitting the user to select a
+ different file to view in the text area. If a new file is
+ selected, the old file is auomatically saved. The selection is
+ valid only for the current editing session; to change the
+ default QuickNotepad file for future sessions, use the <link
+ linkend="options">options dialog</link>.</para>
+ </listitem>
+
+ <listitem>
+ <para><guilabel>Save notepad file</guilabel> - this button
+ causes QuickNotepad to write the contents of the text area to
+ the designated notepad file. To save the text to another file
+ name, use the <guilabel>Copy notepad to buffer</guilabel>
+ operation.</para>
+ </listitem>
+
+ <listitem>
+ <para><guilabel>Copy notepad to buffer</guilabel> - this button
+ causes the contents of the text to be written to a newly
+ created, untitled buffer in the main text editing area. This
+ operation does not alter the QuickNotepad text area or write its
+ text to storage. Further changes to either the QuickNotepad text
+ area or the new buffer will not affect the other.</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>These operations are listed in the menu which appears for
+ QuickNotepad under the <guimenu>Plugins</guimenu> heading. They can also
+ be made the subject of keyboard shortcuts in the <guilabel>Plugin
+ Shortcuts</guilabel> pane of jEdit's options dialog.</para>
+
+ <para>One other operation is available as a keyboard shortcut.
+ <guilabel>Bring QuickNotepad to front</guilabel> activates the plugin
+ and makes visible if it is currently hidden in a docking window.</para>
+ </simplesect>
+
+ <simplesect id="options">
+ <title>Options</title>
+
+ <indexterm>
+ <primary>QuickNotepad</primary>
+
+ <secondary>options</secondary>
+ </indexterm>
+
+ <para>There are three options which can be set using the pane for
+ QuickNotepad in the <guilabel>Plugin Shortcuts</guilabel> section of the
+ general options dialog:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>A checkbox governs whether the name of the notepad file
+ will be displayed in the toolbar panel above the text area. Even
+ if the file name display is enabled, if the plugin is displayed
+ to the left or right of the main editing area, the notepad file
+ name will likely be partially or completely hidden.</para>
+ </listitem>
+
+ <listitem>
+ <para>A text field and adjacent button allow the user to choose
+ the path of the default notepad file by typing its name or
+ opening a file chooser dialog. This file will be loaded (and the
+ old file saved) once the plugin's options settings are
+ committed.</para>
+ </listitem>
+
+ <listitem>
+ <para>A third button shows the name, size and style of the font
+ used by the QuickNotepad text area. Pressing the button summons
+ a font chooser dialog for making a new selection. The text area
+ will be redrawn with the new font once the change is
+ committed.</para>
+ </listitem>
+ </itemizedlist>
+ </simplesect>
+
+ <simplesect>
+ <title>Legal notices</title>
+
+ <para>The QuickNotepad plugin is released under the GNU General Public
+ License (either version 2 or any later version, at the user's option). A
+ copy of the GPL is available in the <filename>COPYING.txt</filename>
+ file in the jEdit distribution.</para>
+
+ <para>The QuickNotepad plugin comes with ABSOLUTELY NO WARRANTY OF ANY
+ KIND; see section 11 and 12 of the GPL for details.</para>
+
+ <para>Permission is granted to copy, distribute and/or modify this
+ document under the terms of the GNU Free Documentation License, Version
+ 1.1 or any later version published by the Free Software Foundation; with
+ no <quote>Invariant Sections</quote>, <quote>Front-Cover Texts</quote>
+ or <quote>Back-Cover Texts</quote>, each as defined in the license. A
+ copy of the license is included in the file
+ <filename>COPYING.DOC.txt</filename> included with the jEdit
+ distribution.</para>
+ </simplesect>
+
+ <simplesect>
+ <title>Feedback</title>
+ <para>Comments, bug reports and other feedback may be sent to the <ulink
+ url="mailto:jgellene@...> or the jEdit-users
+ mailing list.</para>
+ </simplesect>
+</article>
\ No newline at end of file
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=28a0ac1f0d8bc243ddff9d9891efc739417172f7
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=28a0ac1f0d8bc243ddff9d9891efc739417172f7
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=28a0ac1f0d8bc243ddff9d9891efc739417172f7;hb=28a0ac1f0d8bc243ddff9d9891efc739417172f7
commit 28a0ac1f0d8bc243ddff9d9891efc739417172f7
Author: Kazutoshi Satoda <k_satoda@...>
Date: Wed May 2 00:34:44 2007 +0000
Fixed some unbalanced or incorrect explicit folding in source comments.
diff --git a/QuickNotepad.java b/QuickNotepad.java
index 4d2e2f7..1e13a42 100644
--- a/QuickNotepad.java
+++ b/QuickNotepad.java
@@ -1,4 +1,3 @@
-// {{{ QuickNotepad
/*
* QuickNotepad.java
* part of the QuickNotepad plugin for the jEdit text editor
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=11419edc1c29b4198fc08ef5c087efee2bd0eb7b
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=11419edc1c29b4198fc08ef5c087efee2bd0eb7b
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=11419edc1c29b4198fc08ef5c087efee2bd0eb7b;hb=11419edc1c29b4198fc08ef5c087efee2bd0eb7b
commit 11419edc1c29b4198fc08ef5c087efee2bd0eb7b
Author: Björn "Vampire" Kautler <Vampire@...>
Date: Sun Feb 4 00:49:03 2007 +0000
*** empty log message ***
diff --git a/build.xml b/build.xml
index d1e98b7..341f7ef 100644
--- a/build.xml
+++ b/build.xml
@@ -1,21 +1,17 @@
<?xml version="1.0"?>
<project name="QuickNotepad"
- default="build">
- <description>
- This is an ant build.xml file for building the QuickNotepad plugin for jEdit.
- </description>
- <property file="build.properties" />
- <property file="../build.properties" />
- <property file="../../build.properties" />
+ default="build">
+ <description>
+ This is an ant build.xml file for building the QuickNotepad plugin for jEdit.
+ </description>
<property name="jedit.install.dir"
location="../../build" />
<property name="user-doc.xml"
value="users-guide.xml" />
- <property name="build.support" value="../../build-support" />
- <import file="${build.support}/plugin-build.xml" />
+ <import file="../../build-support/plugin-build.xml" />
- <selector id="docSrcFiles">
- <filename name="users-guide.xml" />
- </selector>
+ <selector id="docSrcFiles">
+ <filename name="users-guide.xml" />
+ </selector>
</project>
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=a069d8ea73a57b885879255e9bacdbc856fd832e
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=a069d8ea73a57b885879255e9bacdbc856fd832e
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=a069d8ea73a57b885879255e9bacdbc856fd832e;hb=a069d8ea73a57b885879255e9bacdbc856fd832e
commit a069d8ea73a57b885879255e9bacdbc856fd832e
Author: Alan Ezust <ezust@...>
Date: Tue Jan 23 19:58:46 2007 +0000
Small API doc fixes and build.xml fixes.
diff --git a/build.xml b/build.xml
index f28d365..d1e98b7 100644
--- a/build.xml
+++ b/build.xml
@@ -4,8 +4,9 @@
<description>
This is an ant build.xml file for building the QuickNotepad plugin for jEdit.
</description>
+ <property file="build.properties" />
<property file="../build.properties" />
- <property file="build.properties" />
+ <property file="../../build.properties" />
<property name="jedit.install.dir"
location="../../build" />
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=1e6ec8a9f950b5767fdf5242dd3ce287ce19f524
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=1e6ec8a9f950b5767fdf5242dd3ce287ce19f524
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=1e6ec8a9f950b5767fdf5242dd3ce287ce19f524;hb=1e6ec8a9f950b5767fdf5242dd3ce287ce19f524
commit 1e6ec8a9f950b5767fdf5242dd3ce287ce19f524
Author: Jeffrey Hoyt <jchoyt@...>
Date: Sat Sep 2 20:39:49 2006 +0000
changed to have the long description default file be description.html
diff --git a/QuickNotepad.props b/QuickNotepad.props
index 87ca439..574280c 100644
--- a/QuickNotepad.props
+++ b/QuickNotepad.props
@@ -20,7 +20,6 @@ plugin.QuickNotepadPlugin.depend.0=jedit 04.02.01.00
plugin.QuickNotepadPlugin.depend.1=jdk 1.4
plugin.QuickNotepadPlugin.description=This plugin provides a dockable "scratch pad" for writing and displaying notes, to do lists or similar items as unformatted text.
-plugin.QuickNotepadPlugin.longdescription=QuickNotepad.txt
# plugin menu
plugin.QuickNotepadPlugin.menu=quicknotepad \
- \
diff --git a/QuickNotepad.txt b/description.html
similarity index 100%
rename from QuickNotepad.txt
rename to description.html
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=5adb3d5c5ec14857032b1a201d0fb2c1885901ee
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=5adb3d5c5ec14857032b1a201d0fb2c1885901ee
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=5adb3d5c5ec14857032b1a201d0fb2c1885901ee;hb=5adb3d5c5ec14857032b1a201d0fb2c1885901ee
commit 5adb3d5c5ec14857032b1a201d0fb2c1885901ee
Author: Jeffrey Hoyt <jchoyt@...>
Date: Sat Sep 2 03:24:17 2006 +0000
Added description properties to enable easier releases via the wiz.
diff --git a/QuickNotepad.props b/QuickNotepad.props
index aa46f93..87ca439 100644
--- a/QuickNotepad.props
+++ b/QuickNotepad.props
@@ -17,7 +17,10 @@ plugin.QuickNotepadPlugin.docs=index.html
# we only have one dependency, jEdit 4.2, since we use the new plugin API
plugin.QuickNotepadPlugin.depend.0=jedit 04.02.01.00
+plugin.QuickNotepadPlugin.depend.1=jdk 1.4
+plugin.QuickNotepadPlugin.description=This plugin provides a dockable "scratch pad" for writing and displaying notes, to do lists or similar items as unformatted text.
+plugin.QuickNotepadPlugin.longdescription=QuickNotepad.txt
# plugin menu
plugin.QuickNotepadPlugin.menu=quicknotepad \
- \
diff --git a/QuickNotepad.txt b/QuickNotepad.txt
new file mode 100644
index 0000000..042b442
--- /dev/null
+++ b/QuickNotepad.txt
@@ -0,0 +1,8 @@
+This plugin provides a dockable "scratch pad" for writing
+and displaying notes, to do lists or similar items as unformatted text.
+The text is automatically saved upon closing the plugin or exiting
+jEdit. It can also be saved manually. The user can change the file to be
+displayed during the current editing session. The path of the default
+notepad file can be changed as a user option. Finally, the text file can
+be copied to a new, untitled jEdit buffer so that it can be edited by the
+main program.
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=cdae35b55a0a6c37441f11d3f3018df6f4b9f0b0
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=cdae35b55a0a6c37441f11d3f3018df6f4b9f0b0
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=cdae35b55a0a6c37441f11d3f3018df6f4b9f0b0;hb=cdae35b55a0a6c37441f11d3f3018df6f4b9f0b0
commit cdae35b55a0a6c37441f11d3f3018df6f4b9f0b0
Author: Alan Ezust <ezust@...>
Date: Fri Aug 25 17:44:49 2006 +0000
Bug # 1292706: Size of dialogs on incorrect display with dual head systems.
diff --git a/build.xml b/build.xml
index e597c31..f28d365 100644
--- a/build.xml
+++ b/build.xml
@@ -4,12 +4,16 @@
<description>
This is an ant build.xml file for building the QuickNotepad plugin for jEdit.
</description>
-
+ <property file="../build.properties" />
+ <property file="build.properties" />
+
<property name="jedit.install.dir"
location="../../build" />
<property name="user-doc.xml"
value="users-guide.xml" />
- <import file="../../build-support/plugin-build.xml" />
+ <property name="build.support" value="../../build-support" />
+ <import file="${build.support}/plugin-build.xml" />
+
<selector id="docSrcFiles">
<filename name="users-guide.xml" />
</selector>
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=525d80a17bee402c46427a64f875bf87e5b9a2e3
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=525d80a17bee402c46427a64f875bf87e5b9a2e3
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=525d80a17bee402c46427a64f875bf87e5b9a2e3;hb=525d80a17bee402c46427a64f875bf87e5b9a2e3
commit 525d80a17bee402c46427a64f875bf87e5b9a2e3
Author: Björn "Vampire" Kautler <Vampire@...>
Date: Tue Aug 1 15:06:09 2006 +0000
removed obsolete parameter overwrite
diff --git a/build.xml b/build.xml
index 6ff6d0e..e597c31 100644
--- a/build.xml
+++ b/build.xml
@@ -7,8 +7,6 @@
<property name="jedit.install.dir"
location="../../build" />
- <property name="install.dir"
- location="${jedit.install.dir}/jars" />
<property name="user-doc.xml"
value="users-guide.xml" />
<import file="../../build-support/plugin-build.xml" />
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=fb067889a439878eab59ecc4b9c83664c965f65c
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=fb067889a439878eab59ecc4b9c83664c965f65c
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=fb067889a439878eab59ecc4b9c83664c965f65c;hb=fb067889a439878eab59ecc4b9c83664c965f65c
commit fb067889a439878eab59ecc4b9c83664c965f65c
Author: Björn "Vampire" Kautler <Vampire@...>
Date: Tue Jul 18 12:13:43 2006 +0000
Changed the way the docs are xslt-processed because of bugs in xsltproc for windows and spaces in filenames
diff --git a/build.xml b/build.xml
index c36861c..6ff6d0e 100644
--- a/build.xml
+++ b/build.xml
@@ -9,11 +9,10 @@
location="../../build" />
<property name="install.dir"
location="${jedit.install.dir}/jars" />
- <property name="compiler.deprecation"
- value="on" />
- <property name="docs-proc.target"
- value="xalan" />
<property name="user-doc.xml"
- value="${basedir}/users-guide.xml" />
+ value="users-guide.xml" />
<import file="../../build-support/plugin-build.xml" />
+ <selector id="docSrcFiles">
+ <filename name="users-guide.xml" />
+ </selector>
</project>
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=aad12d704fba779fc5d7035e2e6ef228d1c331a3
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=aad12d704fba779fc5d7035e2e6ef228d1c331a3
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=aad12d704fba779fc5d7035e2e6ef228d1c331a3;hb=aad12d704fba779fc5d7035e2e6ef228d1c331a3
commit aad12d704fba779fc5d7035e2e6ef228d1c331a3
Author: Matthieu Casanova <kpouer@...>
Date: Thu Jul 13 06:49:00 2006 +0000
moved objectsEqual from MiscUtilities
diff --git a/QuickNotepad.java b/QuickNotepad.java
index 67a1f8f..4d2e2f7 100644
--- a/QuickNotepad.java
+++ b/QuickNotepad.java
@@ -26,8 +26,6 @@
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Font;
-import java.awt.event.KeyAdapter;
-import java.awt.event.KeyEvent;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
@@ -43,13 +41,13 @@ import org.gjt.sp.jedit.EBComponent;
import org.gjt.sp.jedit.EBMessage;
import org.gjt.sp.jedit.EditBus;
import org.gjt.sp.jedit.GUIUtilities;
-import org.gjt.sp.jedit.MiscUtilities;
import org.gjt.sp.jedit.View;
import org.gjt.sp.jedit.jEdit;
import org.gjt.sp.jedit.gui.DefaultFocusComponent;
import org.gjt.sp.jedit.gui.DockableWindowManager;
import org.gjt.sp.jedit.msg.PropertiesChanged;
import org.gjt.sp.util.Log;
+import org.gjt.sp.util.StandardUtilities;
// }}}
// {{{ QuickNotePad class
@@ -147,7 +145,7 @@ public class QuickNotepad extends JPanel
private void propertiesChanged() {
String propertyFilename = jEdit
.getProperty(QuickNotepadPlugin.OPTION_PREFIX + "filepath");
- if (!MiscUtilities.objectsEqual(defaultFilename, propertyFilename)) {
+ if (!StandardUtilities.objectsEqual(defaultFilename, propertyFilename)) {
saveFile();
toolPanel.propertiesChanged();
defaultFilename = propertyFilename;
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=ee54bd3a8fa39e9cc61390f2354dd74debcdd602
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=ee54bd3a8fa39e9cc61390f2354dd74debcdd602
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=ee54bd3a8fa39e9cc61390f2354dd74debcdd602;hb=ee54bd3a8fa39e9cc61390f2354dd74debcdd602
commit ee54bd3a8fa39e9cc61390f2354dd74debcdd602
Author: Björn "Vampire" Kautler <Vampire@...>
Date: Fri Jul 7 09:55:38 2006 +0000
Moved some properties from build.properties to build.xml for default plugins
diff --git a/build.xml b/build.xml
index e9c7200..c36861c 100644
--- a/build.xml
+++ b/build.xml
@@ -5,5 +5,15 @@
This is an ant build.xml file for building the QuickNotepad plugin for jEdit.
</description>
+ <property name="jedit.install.dir"
+ location="../../build" />
+ <property name="install.dir"
+ location="${jedit.install.dir}/jars" />
+ <property name="compiler.deprecation"
+ value="on" />
+ <property name="docs-proc.target"
+ value="xalan" />
+ <property name="user-doc.xml"
+ value="${basedir}/users-guide.xml" />
<import file="../../build-support/plugin-build.xml" />
</project>
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=942dbf3620d4e6b364288853695ccfcf24603c22
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=942dbf3620d4e6b364288853695ccfcf24603c22
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=942dbf3620d4e6b364288853695ccfcf24603c22;hb=942dbf3620d4e6b364288853695ccfcf24603c22
commit 942dbf3620d4e6b364288853695ccfcf24603c22
Author: Björn "Vampire" Kautler <Vampire@...>
Date: Thu Jul 6 13:30:42 2006 +0000
Removed unnecessary KeyHandler
diff --git a/QuickNotepad.java b/QuickNotepad.java
index 982a671..67a1f8f 100644
--- a/QuickNotepad.java
+++ b/QuickNotepad.java
@@ -76,6 +76,7 @@ public class QuickNotepad extends JPanel
private QuickNotepadToolPanel toolPanel;
// }}}
+
// {{{ Constructor
/**
*
@@ -110,7 +111,6 @@ public class QuickNotepad extends JPanel
textArea = new QuickNotepadTextArea();
textArea.setFont(QuickNotepadOptionPane.makeFont());
- textArea.addKeyListener(new KeyHandler());
JScrollPane pane = new JScrollPane(textArea);
add(BorderLayout.CENTER, pane);
@@ -243,26 +243,5 @@ public class QuickNotepad extends JPanel
}
// }}}
// }}}
-
- // {{{ Listener objects
-
- // {{{ KeyHandler
- /**
- * <Esc> closes a floating window
- */
- private class KeyHandler extends KeyAdapter {
- public void keyPressed(KeyEvent evt) {
- if (QuickNotepad.this.floating
- && evt.getKeyCode() == KeyEvent.VK_ESCAPE) {
- evt.consume();
- DockableWindowManager wm = QuickNotepad.this.view
- .getDockableWindowManager();
- wm.removeDockableWindow(QuickNotepadPlugin.NAME);
- }
- }
- }
- // }}}
-
- // }}}
}
// }}}
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=198a68d84e24b4a6ed1934100bf3d0db3f8bb9e2
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=198a68d84e24b4a6ed1934100bf3d0db3f8bb9e2
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=198a68d84e24b4a6ed1934100bf3d0db3f8bb9e2;hb=198a68d84e24b4a6ed1934100bf3d0db3f8bb9e2
commit 198a68d84e24b4a6ed1934100bf3d0db3f8bb9e2
Author: Björn "Vampire" Kautler <Vampire@...>
Date: Thu Jul 6 12:16:42 2006 +0000
Readded lost KeyHandler class
diff --git a/QuickNotepad.java b/QuickNotepad.java
index 8c6d1de..982a671 100644
--- a/QuickNotepad.java
+++ b/QuickNotepad.java
@@ -1,4 +1,4 @@
-// {{{ QuickNotePad
+// {{{ QuickNotepad
/*
* QuickNotepad.java
* part of the QuickNotepad plugin for the jEdit text editor
@@ -125,7 +125,7 @@ public class QuickNotepad extends JPanel
public void focusOnDefaultComponent() {
textArea.requestFocus();
}
- //}}}
+ // }}}
// {{{ getFileName
public String getFilename() {
@@ -133,7 +133,7 @@ public class QuickNotepad extends JPanel
}
// }}}
- /* EBComponent implementation */
+ // EBComponent implementation
// {{{ handleMessage
public void handleMessage(EBMessage message) {
@@ -160,11 +160,11 @@ public class QuickNotepad extends JPanel
}
}
// }}}
- /* These JComponent methods provide the appropriate points
- to subscribe and unsubscribe this object to the EditBus.
- */
- // {{{ addNotify
+ // These JComponent methods provide the appropriate points
+ // to subscribe and unsubscribe this object to the EditBus.
+
+ // {{{ addNotify
public void addNotify() {
super.addNotify();
EditBus.addToBus(this);
@@ -179,9 +179,7 @@ public class QuickNotepad extends JPanel
}
// }}}
- /*
- QuickNotepadActions implementation
- */
+ // QuickNotepadActions implementation
// {{{
public void saveFile() {
@@ -220,7 +218,6 @@ public class QuickNotepad extends JPanel
// {{{ readFile()
/**
* Helper method
- *
*/
private void readFile() {
if (filename == null || filename.length() == 0)
@@ -246,5 +243,26 @@ public class QuickNotepad extends JPanel
}
// }}}
// }}}
+
+ // {{{ Listener objects
+
+ // {{{ KeyHandler
+ /**
+ * <Esc> closes a floating window
+ */
+ private class KeyHandler extends KeyAdapter {
+ public void keyPressed(KeyEvent evt) {
+ if (QuickNotepad.this.floating
+ && evt.getKeyCode() == KeyEvent.VK_ESCAPE) {
+ evt.consume();
+ DockableWindowManager wm = QuickNotepad.this.view
+ .getDockableWindowManager();
+ wm.removeDockableWindow(QuickNotepadPlugin.NAME);
+ }
+ }
+ }
+ // }}}
+
+ // }}}
}
// }}}
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=80748a83333083345efb34feb227f3d11219ab41
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=80748a83333083345efb34feb227f3d11219ab41
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=80748a83333083345efb34feb227f3d11219ab41;hb=80748a83333083345efb34feb227f3d11219ab41
commit 80748a83333083345efb34feb227f3d11219ab41
Author: Alan Ezust <ezust@...>
Date: Thu Jul 6 06:34:13 2006 +0000
Made docs compliant with docbook 4.2
added folds to the source of quicknotepad.java
diff --git a/QuickNotepad.java b/QuickNotepad.java
index 74bfdd2..8c6d1de 100644
--- a/QuickNotepad.java
+++ b/QuickNotepad.java
@@ -1,3 +1,4 @@
+// {{{ QuickNotePad
/*
* QuickNotepad.java
* part of the QuickNotepad plugin for the jEdit text editor
@@ -21,7 +22,7 @@
* $Id$
*/
-// from Java:
+// {{{ imports
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Font;
@@ -49,10 +50,18 @@ import org.gjt.sp.jedit.gui.DefaultFocusComponent;
import org.gjt.sp.jedit.gui.DockableWindowManager;
import org.gjt.sp.jedit.msg.PropertiesChanged;
import org.gjt.sp.util.Log;
+// }}}
-public class QuickNotepad extends JPanel implements EBComponent,
- QuickNotepadActions, DefaultFocusComponent {
-
+// {{{ QuickNotePad class
+/**
+ *
+ * QuickNotePad - a dockable JPanel, a demonstration of a jEdit plugin.
+ *
+ */
+public class QuickNotepad extends JPanel
+ implements EBComponent, QuickNotepadActions, DefaultFocusComponent {
+
+ // {{{ Instance Variables
private static final long serialVersionUID = 6412255692894321789L;
private String filename;
@@ -66,14 +75,17 @@ public class QuickNotepad extends JPanel implements EBComponent,
private QuickNotepadTextArea textArea;
private QuickNotepadToolPanel toolPanel;
-
- //
- // Constructor
- //
-
+ // }}}
+ // {{{ Constructor
+ /**
+ *
+ * @param view the current jedit window
+ * @param position a variable passed in from the script in actions.xml,
+ * which can be DockableWindowManager.FLOATING, TOP, BOTTOM, LEFT, RIGHT, etc.
+ * see @ref DockableWindowManager for possible values.
+ */
public QuickNotepad(View view, String position) {
super(new BorderLayout());
-
this.view = view;
this.floating = position.equals(DockableWindowManager.FLOATING);
@@ -105,30 +117,33 @@ public class QuickNotepad extends JPanel implements EBComponent,
readFile();
}
+ // }}}
+ // {{{ Member Functions
+
+ // {{{ focusOnDefaultComponent
public void focusOnDefaultComponent() {
textArea.requestFocus();
}
+ //}}}
- //
- // Attribute methods
- //
-
- // for toolbar display
+ // {{{ getFileName
public String getFilename() {
return filename;
}
+ // }}}
- //
- // EBComponent implementation
- //
-
+ /* EBComponent implementation */
+
+ // {{{ handleMessage
public void handleMessage(EBMessage message) {
if (message instanceof PropertiesChanged) {
propertiesChanged();
}
}
-
+ // }}}
+
+ // {{{ propertiesChanged
private void propertiesChanged() {
String propertyFilename = jEdit
.getProperty(QuickNotepadPlugin.OPTION_PREFIX + "filepath");
@@ -144,25 +159,31 @@ public class QuickNotepad extends JPanel implements EBComponent,
textArea.setFont(newFont);
}
}
+ // }}}
+ /* These JComponent methods provide the appropriate points
+ to subscribe and unsubscribe this object to the EditBus.
+ */
- // These JComponent methods provide the appropriate points
- // to subscribe and unsubscribe this object to the EditBus
-
+ // {{{ addNotify
public void addNotify() {
super.addNotify();
EditBus.addToBus(this);
}
-
+ // }}}
+
+ // {{{ removeNotify
public void removeNotify() {
saveFile();
super.removeNotify();
EditBus.removeFromBus(this);
}
+ // }}}
+
+ /*
+ QuickNotepadActions implementation
+ */
- //
- // QuickNotepadActions implementation
- //
-
+ // {{{
public void saveFile() {
if (filename == null || filename.length() == 0)
return;
@@ -175,7 +196,9 @@ public class QuickNotepad extends JPanel implements EBComponent,
"Could not write notepad text to " + filename);
}
}
-
+ // }}}
+
+ // {{{ chooseFile
public void chooseFile() {
String[] paths = GUIUtilities.showVFSFileDialog(view, null,
JFileChooser.OPEN_DIALOG, false);
@@ -186,16 +209,19 @@ public class QuickNotepad extends JPanel implements EBComponent,
readFile();
}
}
+ // }}}
+ // {{{ copyToBuffer
public void copyToBuffer() {
jEdit.newFile(view);
view.getEditPane().getTextArea().setText(textArea.getText());
}
-
- //
- // helper methods
- //
-
+ // }}}
+ // {{{ readFile()
+ /**
+ * Helper method
+ *
+ */
private void readFile() {
if (filename == null || filename.length() == 0)
return;
@@ -218,22 +244,7 @@ public class QuickNotepad extends JPanel implements EBComponent,
"could not read notepad file " + filename);
}
}
-
- //
- // Listener objects
- //
-
- // <Esc> closes a floating window
- private class KeyHandler extends KeyAdapter {
- public void keyPressed(KeyEvent evt) {
- if (QuickNotepad.this.floating
- && evt.getKeyCode() == KeyEvent.VK_ESCAPE) {
- evt.consume();
- DockableWindowManager wm = QuickNotepad.this.view
- .getDockableWindowManager();
- wm.removeDockableWindow(QuickNotepadPlugin.NAME);
- }
- }
- }
-
+ // }}}
+ // }}}
}
+// }}}
diff --git a/users-guide.xml b/users-guide.xml
index c50bd0c..21ab3f2 100644
--- a/users-guide.xml
+++ b/users-guide.xml
@@ -5,6 +5,7 @@
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<article id="QuickNotepad">
+
<articleinfo>
<author>
<firstname>John</firstname><surname>Gellene</surname>
@@ -79,27 +80,27 @@
<colspec colnum="4"/>
<tbody>
<row>
- <entry> </entry>
+ <entry> </entry>
<entry>Cut</entry>
- <entry> </entry>
+ <entry> </entry>
<entry><keycombo action="simul"><keysym>Ctrl</keysym><keysym>x</keysym></keycombo></entry>
</row>
<row>
- <entry> </entry>
+ <entry> </entry>
<entry>Copy</entry>
- <entry> </entry>
+ <entry> </entry>
<entry><keycombo action="simul"><keysym>Ctrl</keysym><keysym>c</keysym></keycombo></entry>
</row>
<row>
- <entry> </entry>
+ <entry> </entry>
<entry>Paste</entry>
- <entry> </entry>
+ <entry> </entry>
<entry><keycombo action="simul"><keysym>Ctrl</keysym><keysym>v</keysym></keycombo></entry>
</row>
<row>
- <entry> </entry>
+ <entry> </entry>
<entry>Select All</entry>
- <entry> </entry>
+ <entry> </entry>
<entry><keycombo action="simul"><keysym>Ctrl</keysym><keysym>a</keysym></keycombo></entry>
</row>
</tbody>
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=067239318f25527f1e100cbc8aa5a2627310b9ab
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=067239318f25527f1e100cbc8aa5a2627310b9ab
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=067239318f25527f1e100cbc8aa5a2627310b9ab;hb=067239318f25527f1e100cbc8aa5a2627310b9ab
commit 067239318f25527f1e100cbc8aa5a2627310b9ab
Author: Björn "Vampire" Kautler <Vampire@...>
Date: Mon Jul 3 17:44:45 2006 +0000
- Great rewrite of build.xml with many additions like automated building of various distribution files
- moved build-support to core
- made the standard plugins use build-support
diff --git a/QuickNotepad.java b/QuickNotepad.java
index 06eb273..74bfdd2 100644
--- a/QuickNotepad.java
+++ b/QuickNotepad.java
@@ -50,9 +50,10 @@ import org.gjt.sp.jedit.gui.DockableWindowManager;
import org.gjt.sp.jedit.msg.PropertiesChanged;
import org.gjt.sp.util.Log;
-public class QuickNotepad extends JPanel
- implements EBComponent, QuickNotepadActions, DefaultFocusComponent {
+public class QuickNotepad extends JPanel implements EBComponent,
+ QuickNotepadActions, DefaultFocusComponent {
+ private static final long serialVersionUID = 6412255692894321789L;
private String filename;
diff --git a/QuickNotepad.props b/QuickNotepad.props
index 4cfc8e0..aa46f93 100644
--- a/QuickNotepad.props
+++ b/QuickNotepad.props
@@ -15,8 +15,8 @@ plugin.QuickNotepadPlugin.version=4.3
# online help
plugin.QuickNotepadPlugin.docs=index.html
-# we only have one dependency, jEdit 4.3
-plugin.QuickNotepadPlugin.depend.0=jedit 04.03.04.00
+# we only have one dependency, jEdit 4.2, since we use the new plugin API
+plugin.QuickNotepadPlugin.depend.0=jedit 04.02.01.00
# plugin menu
plugin.QuickNotepadPlugin.menu=quicknotepad \
diff --git a/README.txt b/README.txt
index e6e0c82..f4fc99b 100644
--- a/README.txt
+++ b/README.txt
@@ -6,6 +6,7 @@ named 'QuickNotepad', written by John Gellene.
The plugin source is discussed in detail in the 'Writing Plugins' part
of the user's guide.
-The source code has been updated to conform the the Plugin API for version 4.3
-of jEdit.
+The source code has been updated to conform the the Plugin API for version 4.0
+of jEdit. The file changes40.txt outlines the changes that were made from the
+version distributed with jEdit 3.2.2.
diff --git a/build.xml b/build.xml
index cf09cec..e9c7200 100644
--- a/build.xml
+++ b/build.xml
@@ -1,40 +1,9 @@
<?xml version="1.0"?>
-<!--
- This is a build.xml file for building the QuickNotePad plugin.
-
- ant -p shows a list of all targets
- and what they do.
-
- This file depends on "build-support", a
- collection of ant build steps designed for use with jedit plugins.
-
- http://jedit.cvs.sourceforge.net/jedit/plugins/build-support/
-
- - If necessary, add any dependencies to the 'project.class.path'
- definition
--->
-
-<project name="QuickNotepad" default="build" basedir=".">
- <property file="../build.properties"/>
- <property file="build.properties"/>
+<project name="QuickNotepad"
+ default="build">
+ <description>
+ This is an ant build.xml file for building the QuickNotepad plugin for jEdit.
+ </description>
- <!--
- It is important that the value of ${build.support} as well as ${jedit.install.dir} are set before the property file is imported. -->
-
- <property name="jedit.install.dir" value="../../"/>
-
- <property name="compiler.source" value="1.4" />
- <property name="compiler.target" value="1.4" />
-
- <property name="build.dir" value="build"/>
- <property name="install.dir" value="../"/>
-
- <property name="build.support"
- location="/home/ezust/workspace/plugins/build-support"/>
-
- <!-- Importing the modular build file -->
- <import file="${build.support}/plugin-build.xml" />
-
- <!-- Look ma, no targets! ant -p shows a list though. -->
-
+ <import file="../../build-support/plugin-build.xml" />
</project>
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=49376407fa321e76307812d2d78e875bb8700af0
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=49376407fa321e76307812d2d78e875bb8700af0
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=49376407fa321e76307812d2d78e875bb8700af0;hb=49376407fa321e76307812d2d78e875bb8700af0
commit 49376407fa321e76307812d2d78e875bb8700af0
Author: Alan Ezust <ezust@...>
Date: Sat Jul 1 01:27:14 2006 +0000
*** empty log message ***
diff --git a/QuickNotepad.java b/QuickNotepad.java
index 74bfdd2..06eb273 100644
--- a/QuickNotepad.java
+++ b/QuickNotepad.java
@@ -50,10 +50,9 @@ import org.gjt.sp.jedit.gui.DockableWindowManager;
import org.gjt.sp.jedit.msg.PropertiesChanged;
import org.gjt.sp.util.Log;
-public class QuickNotepad extends JPanel implements EBComponent,
- QuickNotepadActions, DefaultFocusComponent {
+public class QuickNotepad extends JPanel
+ implements EBComponent, QuickNotepadActions, DefaultFocusComponent {
- private static final long serialVersionUID = 6412255692894321789L;
private String filename;
diff --git a/README.txt b/README.txt
index f4fc99b..e6e0c82 100644
--- a/README.txt
+++ b/README.txt
@@ -6,7 +6,6 @@ named 'QuickNotepad', written by John Gellene.
The plugin source is discussed in detail in the 'Writing Plugins' part
of the user's guide.
-The source code has been updated to conform the the Plugin API for version 4.0
-of jEdit. The file changes40.txt outlines the changes that were made from the
-version distributed with jEdit 3.2.2.
+The source code has been updated to conform the the Plugin API for version 4.3
+of jEdit.
diff --git a/users-guide.xsl b/users-guide.xsl
deleted file mode 100644
index edfb203..0000000
--- a/users-guide.xsl
+++ /dev/null
@@ -1,106 +0,0 @@
-<?xml version='1.0'?>
-
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- version='1.0'
- xmlns="http://www.w3.org/TR/xhtml1/transitional"
- exclude-result-prefixes="#default">
-
-<!-- NOTE: the following element must point to the location of onechunk.xsl -->
-<!-- (for a single html page) or chunk.xsl (for multiple pages) in your -->
-<!-- installation of the DocBook XSL stylesheets. -->
-<xsl:import href="docbook-wrapper.xsl"/>
-
-<xsl:param name="use.id.as.filename" select="'1'"/>
-
-<!-- Change these variables to '1' when using xalan -->
-<xsl:param name="use.extensions" select="'0'"/>
-<xsl:param name="tablecolumns.extension" select="'0'"/>
-
-<xsl:template match="guibutton">
- <xsl:call-template name="inline.sansserifseq"/>
-</xsl:template>
-
-<xsl:template match="guiicon">
- <xsl:call-template name="inline.sansserifseq"/>
-</xsl:template>
-
-<xsl:template match="guilabel">
- <xsl:call-template name="inline.sansserifseq"/>
-</xsl:template>
-
-<xsl:template match="guimenu">
- <xsl:call-template name="inline.sansserifseq"/>
-</xsl:template>
-
-<xsl:template match="guimenuitem">
- <xsl:call-template name="inline.sansserifseq"/>
-</xsl:template>
-
-<xsl:template match="guisubmenu">
- <xsl:call-template name="inline.sansserifseq"/>
-</xsl:template>
-
-<xsl:template match="keycap">
- <xsl:call-template name="inline.sansserifseq"/>
-</xsl:template>
-
-<xsl:template match="keypress">
- <xsl:call-template name="inline.sansserifseq"/>
-</xsl:template>
-
-<xsl:template name="inline.sansserifseq">
- <xsl:param name="content">
- <xsl:call-template name="anchor"/>
- <xsl:apply-templates/>
- </xsl:param>
- <font face="Arial,Helvetica" size="-1">
- <strong><xsl:copy-of select="$content"/></strong>
- </font>
-</xsl:template>
-
-<xsl:template match="keycombo">
- <xsl:variable name="action" select="@action"/>
- <xsl:variable name="joinchar">
- <xsl:choose>
- <xsl:when test="$action='seq'"><xsl:text> </xsl:text></xsl:when>
- <xsl:when test="$action='simul'">+</xsl:when>
- <xsl:when test="$action='press'">-</xsl:when>
- <xsl:when test="$action='click'">-</xsl:when>
- <xsl:when test="$action='double-click'">-</xsl:when>
- <xsl:when test="$action='other'"></xsl:when>
- <xsl:otherwise>-</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:for-each select="./*">
- <xsl:if test="position()>1"><xsl:value-of select="$joinchar"/></xsl:if>
- <xsl:call-template name="inline.sansserifseq"/>
- </xsl:for-each>
-</xsl:template>
-
-<xsl:variable name="shade.verbatim">1</xsl:variable>
-
-<xsl:variable name="funcsynopsis.style">ansi</xsl:variable>
-<xsl:template match="void"><xsl:apply-templates/></xsl:template>
-
-<xsl:variable name="toc.list.type">ul</xsl:variable>
-
-<xsl:param name="local.l10n.xml" select="document('')"/>
-
-<!-- Swing HTML control doesn't support “ and ” -->
-
-<i18n xmlns="http://docbook.sourceforge.net/xmlns/l10n/1.0">
-<l10n language="en">
-<dingbat key="startquote" text="""/>
-<dingbat key="endquote" text="""/>
-<dingbat key="nestedstartquote" text="'"/>
-<dingbat key="nestedendquote" text="'"/>
-</l10n>
-</i18n>
-
-<xsl:template name="header.navigation">
-</xsl:template>
-
-<xsl:template name="footer.navigation">
-</xsl:template>
-
-</xsl:stylesheet>
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=152012bd51d6b322deaca5c603324f032748d656
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=152012bd51d6b322deaca5c603324f032748d656
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=152012bd51d6b322deaca5c603324f032748d656;hb=152012bd51d6b322deaca5c603324f032748d656
commit 152012bd51d6b322deaca5c603324f032748d656
Author: Alan Ezust <ezust@...>
Date: Sat Jul 1 01:09:48 2006 +0000
Updated build file to use build-support.
diff --git a/QuickNotepad.props b/QuickNotepad.props
index 46e0db0..4cfc8e0 100644
--- a/QuickNotepad.props
+++ b/QuickNotepad.props
@@ -10,13 +10,13 @@ plugin.QuickNotepadPlugin.name=QuickNotepad
plugin.QuickNotepadPlugin.author=John Gellene
# version number == jEdit version number
-plugin.QuickNotepadPlugin.version=4.2
+plugin.QuickNotepadPlugin.version=4.3
# online help
plugin.QuickNotepadPlugin.docs=index.html
-# we only have one dependency, jEdit 4.2, since we use the new plugin API
-plugin.QuickNotepadPlugin.depend.0=jedit 04.02.01.00
+# we only have one dependency, jEdit 4.3
+plugin.QuickNotepadPlugin.depend.0=jedit 04.03.04.00
# plugin menu
plugin.QuickNotepadPlugin.menu=quicknotepad \
diff --git a/build.xml b/build.xml
index d0ceadf..cf09cec 100644
--- a/build.xml
+++ b/build.xml
@@ -1,67 +1,40 @@
<?xml version="1.0"?>
-
-<project name="QuickNotepad" default="dist" basedir=".">
+<!--
+ This is a build.xml file for building the QuickNotePad plugin.
+
+ ant -p shows a list of all targets
+ and what they do.
+
+ This file depends on "build-support", a
+ collection of ant build steps designed for use with jedit plugins.
+
+ http://jedit.cvs.sourceforge.net/jedit/plugins/build-support/
+
+ - If necessary, add any dependencies to the 'project.class.path'
+ definition
+-->
+
+<project name="QuickNotepad" default="build" basedir=".">
<property file="../build.properties"/>
<property file="build.properties"/>
+
+ <!--
+ It is important that the value of ${build.support} as well as ${jedit.install.dir} are set before the property file is imported. -->
+
+ <property name="jedit.install.dir" value="../../"/>
+
+ <property name="compiler.source" value="1.4" />
+ <property name="compiler.target" value="1.4" />
+
+ <property name="build.dir" value="build"/>
+ <property name="install.dir" value="../"/>
+
+ <property name="build.support"
+ location="/home/ezust/workspace/plugins/build-support"/>
+
+ <!-- Importing the modular build file -->
+ <import file="${build.support}/plugin-build.xml" />
+
+ <!-- Look ma, no targets! ant -p shows a list though. -->
- <property name="jedit.install.dir" value="../.."/>
- <property name="jar.name" value="QuickNotepad.jar"/>
-
- <property name="install.dir" value=".."/>
-
-
- <path id="project.class.path">
- <pathelement location="${jedit.install.dir}/jedit.jar"/>
- <pathelement location="."/>
- </path>
-
-
- <target name="init">
- <delete file="docbook-wrapper.xsl" />
- <echo file="docbook-wrapper.xsl"
- message="<xsl:stylesheet"/>
- <echo file="docbook-wrapper.xsl" append="true"
- message=" xmlns:xsl='http://www.w3.org/1999/XSL/Transform'"/>
- <echo file="docbook-wrapper.xsl" append="true"
- message=" xsl:version='1.0'>"/>
- <echo file="docbook-wrapper.xsl" append="true"
- message="<xsl:import href='${docbook.xsl}/html/chunk.xsl'/>"/>
- <echo file="docbook-wrapper.xsl" append="true"
- message="</xsl:stylesheet>"/>
- </target>
-
-
- <target name="compile">
- <javac
- srcdir="."
- deprecation="on"
- includeJavaRuntime="yes"
- >
- <classpath refid="project.class.path"/>
- </javac>
- </target>
-
-
- <target name="dist" depends="compile">
- <mkdir dir="${install.dir}"/>
- <jar jarfile="${install.dir}/${jar.name}">
- <fileset dir=".">
- <include name="**/*.class"/>
- <include name="**/*.props"/>
- <include name="**/*.html"/>
- <include name="**/*.gif"/>
- <include name="actions.xml"/>
- <include name="dockables.xml"/>
- </fileset>
- </jar>
- </target>
-
- <!-- Generate docs with xsltproc tool from http://www.xmlsoft.org -->
- <target name="docs-xsltproc" depends="init">
- <exec executable="xsltproc">
- <arg value="--catalogs"/>
- <arg value="users-guide.xsl"/>
- <arg value="users-guide.xml"/>
- </exec>
- </target>
</project>
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=baaf983bd2af3d0b63f40350b04a4b154de0cd4e
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=baaf983bd2af3d0b63f40350b04a4b154de0cd4e
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=baaf983bd2af3d0b63f40350b04a4b154de0cd4e;hb=baaf983bd2af3d0b63f40350b04a4b154de0cd4e
commit baaf983bd2af3d0b63f40350b04a4b154de0cd4e
Author: Alan Ezust <ezust@...>
Date: Fri Jun 30 15:18:04 2006 +0000
Updated to docbook 4.2 (same as users guide)
diff --git a/users-guide.xml b/users-guide.xml
index 7bf48f1..c50bd0c 100644
--- a/users-guide.xml
+++ b/users-guide.xml
@@ -1,12 +1,9 @@
<?xml version="1.0" standalone="no" ?>
-
-
<!-- QuickNotepad 2.0 help documentation -->
<!-- Copyright (C) 2001 John Gellene -->
-<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
-
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<article id="QuickNotepad">
<articleinfo>
<author>
@@ -74,7 +71,7 @@
</para>
<!-- Limitations on xsltproc's capabilities require a blank column between -->
<!-- the two columns of data to provide spacing for the table. -->
-<informaltable align="center" frame="none">
+<informaltable frame="none">
<tgroup cols="4" align="left">
<colspec colnum="1"/> <!-- blank column -->
<colspec colnum="2"/>
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=9de138c85fa2839300ff3d94a06146d78af180b4
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=9de138c85fa2839300ff3d94a06146d78af180b4
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=9de138c85fa2839300ff3d94a06146d78af180b4;hb=9de138c85fa2839300ff3d94a06146d78af180b4
commit 9de138c85fa2839300ff3d94a06146d78af180b4
Author: Alan Ezust <ezust@...>
Date: Sat Sep 10 19:40:17 2005 +0000
Reformatted sourcecode, organized imports. Mostly cosmetic changes to
make it look nicer.
added an extra <property file="../build.properties" /> to the build.xml
diff --git a/QuickNotepad.java b/QuickNotepad.java
index 37ad606..74bfdd2 100644
--- a/QuickNotepad.java
+++ b/QuickNotepad.java
@@ -22,56 +22,70 @@
*/
// from Java:
-import java.awt.*;
-import java.awt.event.*;
-import java.io.*;
-import java.util.Vector;
-
-// from Swing:
-import javax.swing.*;
-import javax.swing.event.*;
-
-// from jEdit:
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.jedit.gui.*;
-import org.gjt.sp.jedit.io.*;
+import java.awt.BorderLayout;
+import java.awt.Dimension;
+import java.awt.Font;
+import java.awt.event.KeyAdapter;
+import java.awt.event.KeyEvent;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+
+import javax.swing.JFileChooser;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+
+import org.gjt.sp.jedit.EBComponent;
+import org.gjt.sp.jedit.EBMessage;
+import org.gjt.sp.jedit.EditBus;
+import org.gjt.sp.jedit.GUIUtilities;
+import org.gjt.sp.jedit.MiscUtilities;
+import org.gjt.sp.jedit.View;
+import org.gjt.sp.jedit.jEdit;
+import org.gjt.sp.jedit.gui.DefaultFocusComponent;
+import org.gjt.sp.jedit.gui.DockableWindowManager;
import org.gjt.sp.jedit.msg.PropertiesChanged;
-import org.gjt.sp.jedit.msg.ViewUpdate;
import org.gjt.sp.util.Log;
+public class QuickNotepad extends JPanel implements EBComponent,
+ QuickNotepadActions, DefaultFocusComponent {
+
+ private static final long serialVersionUID = 6412255692894321789L;
-public class QuickNotepad extends JPanel implements EBComponent, QuickNotepadActions, DefaultFocusComponent
-{
private String filename;
+
private String defaultFilename;
+
private View view;
+
private boolean floating;
private QuickNotepadTextArea textArea;
+
private QuickNotepadToolPanel toolPanel;
//
// Constructor
//
- public QuickNotepad(View view, String position)
- {
+ public QuickNotepad(View view, String position) {
super(new BorderLayout());
this.view = view;
- this.floating = position.equals(DockableWindowManager.FLOATING);
-
- if(jEdit.getSettingsDirectory() != null)
- {
- this.filename = jEdit.getProperty(
- QuickNotepadPlugin.OPTION_PREFIX + "filepath");
- if(this.filename == null || this.filename.length() == 0)
- {
+ this.floating = position.equals(DockableWindowManager.FLOATING);
+
+ if (jEdit.getSettingsDirectory() != null) {
+ this.filename = jEdit.getProperty(QuickNotepadPlugin.OPTION_PREFIX
+ + "filepath");
+ if (this.filename == null || this.filename.length() == 0) {
this.filename = new String(jEdit.getSettingsDirectory()
- + File.separator + "qn.txt");
+ + File.separator + "qn.txt");
jEdit.setProperty(
- QuickNotepadPlugin.OPTION_PREFIX + "filepath",
- this.filename);
+ QuickNotepadPlugin.OPTION_PREFIX + "filepath",
+ this.filename);
}
this.defaultFilename = this.filename;
}
@@ -79,7 +93,7 @@ public class QuickNotepad extends JPanel implements EBComponent, QuickNotepadAct
this.toolPanel = new QuickNotepadToolPanel(this);
add(BorderLayout.NORTH, this.toolPanel);
- if(floating)
+ if (floating)
this.setPreferredSize(new Dimension(500, 250));
textArea = new QuickNotepadTextArea();
@@ -92,8 +106,7 @@ public class QuickNotepad extends JPanel implements EBComponent, QuickNotepadAct
readFile();
}
- public void focusOnDefaultComponent()
- {
+ public void focusOnDefaultComponent() {
textArea.requestFocus();
}
@@ -102,8 +115,7 @@ public class QuickNotepad extends JPanel implements EBComponent, QuickNotepadAct
//
// for toolbar display
- public String getFilename()
- {
+ public String getFilename() {
return filename;
}
@@ -111,21 +123,16 @@ public class QuickNotepad extends JPanel implements EBComponent, QuickNotepadAct
// EBComponent implementation
//
- public void handleMessage(EBMessage message)
- {
- if (message instanceof PropertiesChanged)
- {
+ public void handleMessage(EBMessage message) {
+ if (message instanceof PropertiesChanged) {
propertiesChanged();
}
}
-
- private void propertiesChanged()
- {
- String propertyFilename = jEdit.getProperty(
- QuickNotepadPlugin.OPTION_PREFIX + "filepath");
- if(!MiscUtilities.objectsEqual(defaultFilename,propertyFilename))
- {
+ private void propertiesChanged() {
+ String propertyFilename = jEdit
+ .getProperty(QuickNotepadPlugin.OPTION_PREFIX + "filepath");
+ if (!MiscUtilities.objectsEqual(defaultFilename, propertyFilename)) {
saveFile();
toolPanel.propertiesChanged();
defaultFilename = propertyFilename;
@@ -133,8 +140,7 @@ public class QuickNotepad extends JPanel implements EBComponent, QuickNotepadAct
readFile();
}
Font newFont = QuickNotepadOptionPane.makeFont();
- if(!newFont.equals(textArea.getFont()))
- {
+ if (!newFont.equals(textArea.getFont())) {
textArea.setFont(newFont);
}
}
@@ -142,47 +148,38 @@ public class QuickNotepad extends JPanel implements EBComponent, QuickNotepadAct
// These JComponent methods provide the appropriate points
// to subscribe and unsubscribe this object to the EditBus
- public void addNotify()
- {
+ public void addNotify() {
super.addNotify();
EditBus.addToBus(this);
}
-
- public void removeNotify()
- {
+ public void removeNotify() {
saveFile();
super.removeNotify();
EditBus.removeFromBus(this);
}
-
//
// QuickNotepadActions implementation
//
- public void saveFile()
- {
- if(filename == null || filename.length() == 0) return;
- try
- {
+ public void saveFile() {
+ if (filename == null || filename.length() == 0)
+ return;
+ try {
FileWriter out = new FileWriter(filename);
out.write(textArea.getText());
out.close();
- }
- catch (IOException ioe)
- {
+ } catch (IOException ioe) {
Log.log(Log.ERROR, QuickNotepad.class,
- "Could not write notepad text to " + filename);
+ "Could not write notepad text to " + filename);
}
}
- public void chooseFile()
- {
- String[] paths = GUIUtilities.showVFSFileDialog(view,
- null,JFileChooser.OPEN_DIALOG,false);
- if(paths != null && !paths[0].equals(filename))
- {
+ public void chooseFile() {
+ String[] paths = GUIUtilities.showVFSFileDialog(view, null,
+ JFileChooser.OPEN_DIALOG, false);
+ if (paths != null && !paths[0].equals(filename)) {
saveFile();
filename = paths[0];
toolPanel.propertiesChanged();
@@ -190,9 +187,7 @@ public class QuickNotepad extends JPanel implements EBComponent, QuickNotepadAct
}
}
-
- public void copyToBuffer()
- {
+ public void copyToBuffer() {
jEdit.newFile(view);
view.getEditPane().getTextArea().setText(textArea.getText());
}
@@ -201,32 +196,26 @@ public class QuickNotepad extends JPanel implements EBComponent, QuickNotepadAct
// helper methods
//
- private void readFile()
- {
- if(filename == null || filename.length() == 0) return;
+ private void readFile() {
+ if (filename == null || filename.length() == 0)
+ return;
BufferedReader bf = null;
- try
- {
+ try {
bf = new BufferedReader(new FileReader(filename));
StringBuffer sb = new StringBuffer(2048);
String str;
- while((str = bf.readLine()) != null)
- {
+ while ((str = bf.readLine()) != null) {
sb.append(str).append('\n');
}
bf.close();
textArea.setText(sb.toString());
- }
- catch (FileNotFoundException fnf)
- {
+ } catch (FileNotFoundException fnf) {
+ Log.log(Log.ERROR, QuickNotepad.class, "notepad file " + filename
+ + " does not exist");
+ } catch (IOException ioe) {
Log.log(Log.ERROR, QuickNotepad.class,
- "notepad file " + filename + " does not exist");
- }
- catch (IOException ioe)
- {
- Log.log(Log.ERROR, QuickNotepad.class,
- "could not read notepad file " + filename);
+ "could not read notepad file " + filename);
}
}
@@ -237,15 +226,14 @@ public class QuickNotepad extends JPanel implements EBComponent, QuickNotepadAct
// <Esc> closes a floating window
private class KeyHandler extends KeyAdapter {
public void keyPressed(KeyEvent evt) {
- if(QuickNotepad.this.floating &&
- evt.getKeyCode() == KeyEvent.VK_ESCAPE) {
+ if (QuickNotepad.this.floating
+ && evt.getKeyCode() == KeyEvent.VK_ESCAPE) {
evt.consume();
- DockableWindowManager wm =
- QuickNotepad.this.view.getDockableWindowManager();
+ DockableWindowManager wm = QuickNotepad.this.view
+ .getDockableWindowManager();
wm.removeDockableWindow(QuickNotepadPlugin.NAME);
}
}
}
}
-
diff --git a/QuickNotepadActions.java b/QuickNotepadActions.java
index 241d933..8cd42cc 100644
--- a/QuickNotepadActions.java
+++ b/QuickNotepadActions.java
@@ -21,12 +21,10 @@
* $Id$
*/
-interface QuickNotepadActions
-{
+interface QuickNotepadActions {
void chooseFile();
+
void saveFile();
+
void copyToBuffer();
}
-
-
-
diff --git a/QuickNotepadOptionPane.java b/QuickNotepadOptionPane.java
index 21ea8e4..48f6441 100644
--- a/QuickNotepadOptionPane.java
+++ b/QuickNotepadOptionPane.java
@@ -21,118 +21,107 @@
* $Id$
*/
-import java.io.File;
-import java.io.IOException;
-import java.awt.Font;
import java.awt.BorderLayout;
+import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JCheckBox;
+import javax.swing.JFileChooser;
import javax.swing.JPanel;
import javax.swing.JTextField;
-import javax.swing.JFileChooser;
-import org.gjt.sp.jedit.jEdit;
-import org.gjt.sp.jedit.GUIUtilities;
import org.gjt.sp.jedit.AbstractOptionPane;
+import org.gjt.sp.jedit.GUIUtilities;
+import org.gjt.sp.jedit.jEdit;
import org.gjt.sp.jedit.gui.FontSelector;
-
-public class QuickNotepadOptionPane extends AbstractOptionPane
- implements ActionListener
-{
+public class QuickNotepadOptionPane extends AbstractOptionPane implements
+ ActionListener {
private JCheckBox showPath;
+
private JTextField pathName;
+
private FontSelector font;
- public QuickNotepadOptionPane()
- {
+ public QuickNotepadOptionPane() {
super(QuickNotepadPlugin.NAME);
}
- public void _init()
- {
- showPath = new JCheckBox(jEdit.getProperty(
- QuickNotepadPlugin.OPTION_PREFIX + "show-filepath.title"),
- jEdit.getProperty(QuickNotepadPlugin.OPTION_PREFIX +
- "show-filepath").equals("true"));
+ public void _init() {
+ showPath = new JCheckBox(jEdit
+ .getProperty(QuickNotepadPlugin.OPTION_PREFIX
+ + "show-filepath.title"), jEdit.getProperty(
+ QuickNotepadPlugin.OPTION_PREFIX + "show-filepath").equals(
+ "true"));
addComponent(showPath);
- pathName = new JTextField(jEdit.getProperty(
- QuickNotepadPlugin.OPTION_PREFIX + "filepath"));
- JButton pickPath = new JButton(jEdit.getProperty(
- QuickNotepadPlugin.OPTION_PREFIX + "choose-file"));
+ pathName = new JTextField(jEdit
+ .getProperty(QuickNotepadPlugin.OPTION_PREFIX + "filepath"));
+ JButton pickPath = new JButton(jEdit
+ .getProperty(QuickNotepadPlugin.OPTION_PREFIX + "choose-file"));
pickPath.addActionListener(this);
JPanel pathPanel = new JPanel(new BorderLayout(0, 0));
pathPanel.add(pathName, BorderLayout.CENTER);
pathPanel.add(pickPath, BorderLayout.EAST);
- addComponent(jEdit.getProperty(
- QuickNotepadPlugin.OPTION_PREFIX + "file"),
- pathPanel);
+ addComponent(jEdit.getProperty(QuickNotepadPlugin.OPTION_PREFIX
+ + "file"), pathPanel);
font = new FontSelector(makeFont());
- addComponent(jEdit.getProperty(
- QuickNotepadPlugin.OPTION_PREFIX + "choose-font"),
- font);
+ addComponent(jEdit.getProperty(QuickNotepadPlugin.OPTION_PREFIX
+ + "choose-font"), font);
}
- public void _save()
- {
+ public void _save() {
jEdit.setProperty(QuickNotepadPlugin.OPTION_PREFIX + "filepath",
- pathName.getText());
+ pathName.getText());
Font _font = font.getFont();
- jEdit.setProperty(QuickNotepadPlugin.OPTION_PREFIX + "font",
- _font.getFamily());
- jEdit.setProperty(QuickNotepadPlugin.OPTION_PREFIX + "fontsize",
- String.valueOf(_font.getSize()));
+ jEdit.setProperty(QuickNotepadPlugin.OPTION_PREFIX + "font", _font
+ .getFamily());
+ jEdit.setProperty(QuickNotepadPlugin.OPTION_PREFIX + "fontsize", String
+ .valueOf(_font.getSize()));
jEdit.setProperty(QuickNotepadPlugin.OPTION_PREFIX + "fontstyle",
- String.valueOf(_font.getStyle()));
+ String.valueOf(_font.getStyle()));
jEdit.setProperty(QuickNotepadPlugin.OPTION_PREFIX + "show-filepath",
- String.valueOf(showPath.isSelected()));
+ String.valueOf(showPath.isSelected()));
}
+
// end AbstractOptionPane implementation
// begin ActionListener implementation
- public void actionPerformed(ActionEvent evt)
- {
- String[] paths = GUIUtilities.showVFSFileDialog(null,
- null,JFileChooser.OPEN_DIALOG,false);
- if(paths != null)
- {
+ public void actionPerformed(ActionEvent evt) {
+ String[] paths = GUIUtilities.showVFSFileDialog(null, null,
+ JFileChooser.OPEN_DIALOG, false);
+ if (paths != null) {
pathName.setText(paths[0]);
}
}
// helper method to get Font from plugin properties
- static public Font makeFont()
- {
+ static public Font makeFont() {
int style, size;
- String family = jEdit.getProperty(
- QuickNotepadPlugin.OPTION_PREFIX + "font");
- try
- {
- size = Integer.parseInt(jEdit.getProperty(
- QuickNotepadPlugin.OPTION_PREFIX + "fontsize"));
- }
- catch(NumberFormatException nf)
- {
+ String family = jEdit.getProperty(QuickNotepadPlugin.OPTION_PREFIX
+ + "font");
+ try {
+ size = Integer
+ .parseInt(jEdit
+ .getProperty(QuickNotepadPlugin.OPTION_PREFIX
+ + "fontsize"));
+ } catch (NumberFormatException nf) {
size = 14;
}
- try
- {
- style = Integer.parseInt(jEdit.getProperty(
- QuickNotepadPlugin.OPTION_PREFIX + "fontstyle"));
- }
- catch(NumberFormatException nf)
- {
+ try {
+ style = Integer
+ .parseInt(jEdit
+ .getProperty(QuickNotepadPlugin.OPTION_PREFIX
+ + "fontstyle"));
+ } catch (NumberFormatException nf) {
style = Font.PLAIN;
}
return new Font(family, style, size);
}
}
-
diff --git a/QuickNotepadPlugin.java b/QuickNotepadPlugin.java
index 088330a..27fb2ce 100644
--- a/QuickNotepadPlugin.java
+++ b/QuickNotepadPlugin.java
@@ -25,11 +25,10 @@ import org.gjt.sp.jedit.EditPlugin;
/**
* The QuickNotepad plugin
- *
+ *
* @author John Gellene
*/
-public class QuickNotepadPlugin extends EditPlugin
-{
+public class QuickNotepadPlugin extends EditPlugin {
public static final String NAME = "quicknotepad";
public static final String OPTION_PREFIX = "options.quicknotepad.";
}
diff --git a/QuickNotepadTextArea.java b/QuickNotepadTextArea.java
index 5146b73..6e8eec4 100644
--- a/QuickNotepadTextArea.java
+++ b/QuickNotepadTextArea.java
@@ -23,14 +23,11 @@
import javax.swing.JTextArea;
-public class QuickNotepadTextArea extends JTextArea
-{
- public QuickNotepadTextArea()
- {
+public class QuickNotepadTextArea extends JTextArea {
+ public QuickNotepadTextArea() {
super();
- setLineWrap(true);
- setWrapStyleWord(true);
- setTabSize(4);
- }
+ setLineWrap(true);
+ setWrapStyleWord(true);
+ setTabSize(4);
+ }
}
-
diff --git a/QuickNotepadToolPanel.java b/QuickNotepadToolPanel.java
index aefd625..6d588aa 100644
--- a/QuickNotepadToolPanel.java
+++ b/QuickNotepadToolPanel.java
@@ -21,26 +21,26 @@
* $Id$
*/
-import java.awt.*;
-import java.awt.event.*;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
-import javax.swing.*;
+import javax.swing.AbstractButton;
+import javax.swing.Box;
+import javax.swing.BoxLayout;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.jedit.gui.*;
-import org.gjt.sp.jedit.io.*;
-import org.gjt.sp.jedit.textarea.*;
-import org.gjt.sp.jedit.msg.PropertiesChanged;
-import org.gjt.sp.util.Log;
+import org.gjt.sp.jedit.GUIUtilities;
+import org.gjt.sp.jedit.jEdit;
+import org.gjt.sp.jedit.gui.RolloverButton;
-public class QuickNotepadToolPanel extends JPanel
-{
+public class QuickNotepadToolPanel extends JPanel {
private QuickNotepad pad;
+
private JLabel label;
- public QuickNotepadToolPanel(QuickNotepad qnpad)
- {
- setLayout(new BoxLayout(this,BoxLayout.X_AXIS));
+ public QuickNotepadToolPanel(QuickNotepad qnpad) {
+ setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
pad = qnpad;
Box labelBox = new Box(BoxLayout.Y_AXIS);
@@ -48,7 +48,8 @@ public class QuickNotepadToolPanel extends JPanel
label = new JLabel(pad.getFilename());
label.setVisible(jEdit.getProperty(
- QuickNotepadPlugin.OPTION_PREFIX + "show-filepath").equals("true"));
+ QuickNotepadPlugin.OPTION_PREFIX + "show-filepath").equals(
+ "true"));
labelBox.add(label);
labelBox.add(Box.createGlue());
@@ -57,46 +58,39 @@ public class QuickNotepadToolPanel extends JPanel
add(Box.createGlue());
- add(makeCustomButton("quicknotepad.choose-file",
- new ActionListener() {
- public void actionPerformed(ActionEvent evt) {
- QuickNotepadToolPanel.this.pad.chooseFile();
- }
- }));
- add(makeCustomButton("quicknotepad.save-file",
- new ActionListener() {
- public void actionPerformed(ActionEvent evt) {
- QuickNotepadToolPanel.this.pad.saveFile();
- }
- }));
+ add(makeCustomButton("quicknotepad.choose-file", new ActionListener() {
+ public void actionPerformed(ActionEvent evt) {
+ QuickNotepadToolPanel.this.pad.chooseFile();
+ }
+ }));
+ add(makeCustomButton("quicknotepad.save-file", new ActionListener() {
+ public void actionPerformed(ActionEvent evt) {
+ QuickNotepadToolPanel.this.pad.saveFile();
+ }
+ }));
add(makeCustomButton("quicknotepad.copy-to-buffer",
- new ActionListener() {
- public void actionPerformed(ActionEvent evt) {
- QuickNotepadToolPanel.this.pad.copyToBuffer();
- }
- }));
+ new ActionListener() {
+ public void actionPerformed(ActionEvent evt) {
+ QuickNotepadToolPanel.this.pad.copyToBuffer();
+ }
+ }));
}
-
- void propertiesChanged()
- {
+ void propertiesChanged() {
label.setText(pad.getFilename());
label.setVisible(jEdit.getProperty(
- QuickNotepadPlugin.OPTION_PREFIX + "show-filepath").equals("true"));
+ QuickNotepadPlugin.OPTION_PREFIX + "show-filepath").equals(
+ "true"));
}
- private AbstractButton makeCustomButton(String name, ActionListener listener)
- {
+ private AbstractButton makeCustomButton(String name, ActionListener listener) {
String toolTip = jEdit.getProperty(name.concat(".label"));
- AbstractButton b = new RolloverButton(GUIUtilities.loadIcon(
- jEdit.getProperty(name + ".icon")));
- if(listener != null)
- {
+ AbstractButton b = new RolloverButton(GUIUtilities.loadIcon(jEdit
+ .getProperty(name + ".icon")));
+ if (listener != null) {
b.addActionListener(listener);
b.setEnabled(true);
- }
- else
- {
+ } else {
b.setEnabled(false);
}
b.setToolTipText(toolTip);
@@ -104,4 +98,3 @@ public class QuickNotepadToolPanel extends JPanel
}
}
-
diff --git a/build.xml b/build.xml
index c23686c..d0ceadf 100644
--- a/build.xml
+++ b/build.xml
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<project name="QuickNotepad" default="dist" basedir=".">
-
+ <property file="../build.properties"/>
<property file="build.properties"/>
<property name="jedit.install.dir" value="../.."/>
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=33e132040c0501d0407a379fba3377b68893b50b
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=33e132040c0501d0407a379fba3377b68893b50b
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=33e132040c0501d0407a379fba3377b68893b50b;hb=33e132040c0501d0407a379fba3377b68893b50b
commit 33e132040c0501d0407a379fba3377b68893b50b
Author: Slava Pestov <slava@...>
Date: Sun Dec 5 04:37:06 2004 +0000
tall caret works with tab, fix plugin manager booboo, fix quicknotepad NPE
diff --git a/actions.xml b/actions.xml
index bee453a..242f4a3 100644
--- a/actions.xml
+++ b/actions.xml
@@ -7,22 +7,22 @@
<ACTIONS>
<ACTION NAME="quicknotepad.choose-file">
<CODE>
- view.getDockableWindowManager()
- .getDockable(QuickNotepadPlugin.NAME).chooseFile();
+ wm.addDockableWindow(QuickNotepadPlugin.NAME);
+ wm.getDockableWindow(QuickNotepadPlugin.NAME).chooseFile();
</CODE>
</ACTION>
<ACTION NAME="quicknotepad.save-file">
<CODE>
- view.getDockableWindowManager()
- .getDockable(QuickNotepadPlugin.NAME).saveFile();
+ wm.addDockableWindow(QuickNotepadPlugin.NAME);
+ wm.getDockableWindow(QuickNotepadPlugin.NAME).saveFile();
</CODE>
</ACTION>
<ACTION NAME="quicknotepad.copy-to-buffer">
<CODE>
- view.getDockableWindowManager()
- .getDockable(QuickNotepadPlugin.NAME).copyToBuffer();
+ wm.addDockableWindow(QuickNotepadPlugin.NAME);
+ wm.getDockableWindow(QuickNotepadPlugin.NAME).copyToBuffer();
</CODE>
</ACTION>
</ACTIONS>
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=c4dee43ad0bce8a4127063f68f44e33fac9d1b44
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=c4dee43ad0bce8a4127063f68f44e33fac9d1b44
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=c4dee43ad0bce8a4127063f68f44e33fac9d1b44;hb=c4dee43ad0bce8a4127063f68f44e33fac9d1b44
commit c4dee43ad0bce8a4127063f68f44e33fac9d1b44
Author: Slava Pestov <slava@...>
Date: Sat Aug 28 08:12:47 2004 +0000
fix obscure display manager bug
diff --git a/QuickNotepad.props b/QuickNotepad.props
index db6c1a0..46e0db0 100644
--- a/QuickNotepad.props
+++ b/QuickNotepad.props
@@ -13,7 +13,7 @@ plugin.QuickNotepadPlugin.author=John Gellene
plugin.QuickNotepadPlugin.version=4.2
# online help
-plugin.QuickNotepadPlugin.docs=QuickNotepad.html
+plugin.QuickNotepadPlugin.docs=index.html
# we only have one dependency, jEdit 4.2, since we use the new plugin API
plugin.QuickNotepadPlugin.depend.0=jedit 04.02.01.00
diff --git a/build.xml b/build.xml
index 944e437..c23686c 100644
--- a/build.xml
+++ b/build.xml
@@ -2,6 +2,8 @@
<project name="QuickNotepad" default="dist" basedir=".">
+ <property file="build.properties"/>
+
<property name="jedit.install.dir" value="../.."/>
<property name="jar.name" value="QuickNotepad.jar"/>
@@ -14,6 +16,21 @@
</path>
+ <target name="init">
+ <delete file="docbook-wrapper.xsl" />
+ <echo file="docbook-wrapper.xsl"
+ message="<xsl:stylesheet"/>
+ <echo file="docbook-wrapper.xsl" append="true"
+ message=" xmlns:xsl='http://www.w3.org/1999/XSL/Transform'"/>
+ <echo file="docbook-wrapper.xsl" append="true"
+ message=" xsl:version='1.0'>"/>
+ <echo file="docbook-wrapper.xsl" append="true"
+ message="<xsl:import href='${docbook.xsl}/html/chunk.xsl'/>"/>
+ <echo file="docbook-wrapper.xsl" append="true"
+ message="</xsl:stylesheet>"/>
+ </target>
+
+
<target name="compile">
<javac
srcdir="."
@@ -38,4 +55,13 @@
</fileset>
</jar>
</target>
+
+ <!-- Generate docs with xsltproc tool from http://www.xmlsoft.org -->
+ <target name="docs-xsltproc" depends="init">
+ <exec executable="xsltproc">
+ <arg value="--catalogs"/>
+ <arg value="users-guide.xsl"/>
+ <arg value="users-guide.xml"/>
+ </exec>
+ </target>
</project>
diff --git a/users-guide.xsl b/users-guide.xsl
index 2c95367..edfb203 100644
--- a/users-guide.xsl
+++ b/users-guide.xsl
@@ -8,13 +8,13 @@
<!-- NOTE: the following element must point to the location of onechunk.xsl -->
<!-- (for a single html page) or chunk.xsl (for multiple pages) in your -->
<!-- installation of the DocBook XSL stylesheets. -->
-<xsl:import href="I:/sgml/docbook-xsl-1.45/html/onechunk.xsl"/>
+<xsl:import href="docbook-wrapper.xsl"/>
-<xsl:param name="use.id.as.filename" select="'1'" doc:type="boolean"/>
+<xsl:param name="use.id.as.filename" select="'1'"/>
<!-- Change these variables to '1' when using xalan -->
-<xsl:param name="use.extensions" select="'0'" doc:type="boolean"/>
-<xsl:param name="tablecolumns.extension" select="'0'" doc:type="boolean"/>
+<xsl:param name="use.extensions" select="'0'"/>
+<xsl:param name="tablecolumns.extension" select="'0'"/>
<xsl:template match="guibutton">
<xsl:call-template name="inline.sansserifseq"/>
@@ -97,187 +97,10 @@
</l10n>
</i18n>
-<xsl:template match="/">
- <xsl:call-template name="toc"/>
- <xsl:call-template name="index"/>
-</xsl:template>
-
<xsl:template name="header.navigation">
</xsl:template>
<xsl:template name="footer.navigation">
</xsl:template>
-<xsl:template name="toc">
- <xsl:apply-templates/>
- <xsl:call-template name="write.chunk">
- <xsl:with-param name="filename" select="'toc.xml'"/>
- <xsl:with-param name="method" select="'xml'"/>
- <xsl:with-param name="indent" select="'yes'"/>
- <xsl:with-param name="content">
- <xsl:call-template name="toc.content"/>
- </xsl:with-param>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template name="toc.content">
- <TOC>
- <xsl:apply-templates select="." mode="my.toc"/>
- </TOC>
-</xsl:template>
-
-<xsl:template match="set" mode="my.toc">
- <ENTRY>
- <xsl:attribute name="href">
- <xsl:apply-templates mode="chunk-filename" select="."/>
- </xsl:attribute>
- <TITLE>
- <xsl:apply-templates mode="title.markup" select="."/>
- </TITLE>
- <xsl:apply-templates select="book" mode="my.toc"/>
- </ENTRY>
-</xsl:template>
-
-<xsl:template match="book" mode="my.toc">
- <ENTRY>
- <xsl:attribute name="href">
- <xsl:apply-templates mode="chunk-filename" select="."/>
- </xsl:attribute>
- <TITLE>
- <xsl:apply-templates mode="title.markup" select="."/>
- </TITLE>
- <xsl:apply-templates select="part|reference|preface|chapter|appendix|article|colophon"
- mode="my.toc"/>
- </ENTRY>
-</xsl:template>
-
-<xsl:template match="part|reference|preface|chapter|appendix|article"
- mode="my.toc">
- <ENTRY>
- <xsl:attribute name="HREF">
- <xsl:apply-templates mode="chunk-filename" select="."/>
- </xsl:attribute>
- <TITLE>
- <xsl:apply-templates mode="title.markup" select="."/>
- </TITLE>
- <xsl:apply-templates
- select="preface|chapter|appendix|refentry|section|sect1"
- mode="my.toc"/>
- </ENTRY>
-</xsl:template>
-
-<xsl:template match="section" mode="my.toc">
- <ENTRY>
- <xsl:attribute name="href">
- <xsl:apply-templates mode="chunk-filename" select="."/>
- </xsl:attribute>
- <TITLE>
- <xsl:apply-templates mode="title.markup" select="."/>
- </TITLE>
- <xsl:apply-templates select="section" mode="my.toc"/>
- </ENTRY>
-</xsl:template>
-
-<xsl:template match="sect1" mode="my.toc">
- <ENTRY>
- <xsl:attribute name="HREF">
- <xsl:apply-templates mode="chunk-filename" select="."/>
- </xsl:attribute>
- <TITLE>
- <xsl:apply-templates mode="title.markup" select="."/>
- </TITLE>
- <xsl:apply-templates select="sect2" mode="my.toc"/>
- </ENTRY>
-</xsl:template>
-
-<xsl:template match="sect2" mode="my.toc">
- <ENTRY>
- <xsl:attribute name="HREF">
- <xsl:apply-templates mode="chunk-filename" select="."/>
- </xsl:attribute>
- <TITLE>
- <xsl:apply-templates mode="title.markup" select="."/>
- </TITLE>
- <xsl:apply-templates select="sect3" mode="my.toc"/>
- </ENTRY>
-</xsl:template>
-
-<xsl:template match="sect3" mode="my.toc">
- <ENTRY>
- <xsl:attribute name="HREF">
- <xsl:apply-templates mode="chunk-filename" select="."/>
- </xsl:attribute>
- <TITLE>
- <xsl:apply-templates mode="title.markup" select="."/>
- </TITLE>
- <xsl:apply-templates select="sect4" mode="my.toc"/>
- </ENTRY>
-</xsl:template>
-
-<xsl:template match="sect4" mode="my.toc">
- <ENTRY>
- <xsl:attribute name="HREF">
- <xsl:apply-templates mode="chunk-filename" select="."/>
- </xsl:attribute>
- <TITLE>
- <xsl:apply-templates mode="title.markup" select="."/>
- </TITLE>
- <xsl:apply-templates select="sect5" mode="my.toc"/>
- </ENTRY>
-</xsl:template>
-
-<xsl:template match="sect5|colophon" mode="my.toc">
- <ENTRY>
- <xsl:attribute name="HREF">
- <xsl:apply-templates mode="chunk-filename" select="."/>
- </xsl:attribute>
- <TITLE>
- <xsl:apply-templates mode="title.markup" select="."/>
- </TITLE>
- </ENTRY>
-</xsl:template>
-
-<xsl:template name="index">
- <xsl:call-template name="write.chunk">
- <xsl:with-param name="filename" select="'word-index.xml'"/>
- <xsl:with-param name="method" select="'xml'"/>
- <xsl:with-param name="indent" select="'yes'"/>
- <xsl:with-param name="content">
- <xsl:call-template name="index.content"/>
- </xsl:with-param>
- </xsl:call-template>
-</xsl:template>
-
-<xsl:template name="index.content">
- <INDEX>
- <xsl:apply-templates select="//indexterm" mode="index"/>
- </INDEX>
-</xsl:template>
-
-<xsl:template match="indexterm" mode="index">
- <xsl:variable name="text">
- <xsl:value-of select="primary"/>
- <xsl:if test="secondary">
- <xsl:text>, </xsl:text>
- <xsl:value-of select="secondary"/>
- </xsl:if>
- <xsl:if test="tertiary">
- <xsl:text>, </xsl:text>
- <xsl:value-of select="tertiary"/>
- </xsl:if>
- </xsl:variable>
-
- <xsl:choose>
- <xsl:when test="see">
- <xsl:variable name="see"><xsl:value-of select="see"/></xsl:variable>
- <INDEXTERM TEXT="{$text} see '{$see}'"/>
- </xsl:when>
- <xsl:otherwise>
- <INDEXTERM TEXT="{$text}">
- <xsl:apply-templates mode="chunk-filename" select="."/>
- </INDEXTERM>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
</xsl:stylesheet>
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=cf6d295df7f086bcb2fea0eddbc267faa35bad85
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=cf6d295df7f086bcb2fea0eddbc267faa35bad85
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=cf6d295df7f086bcb2fea0eddbc267faa35bad85;hb=cf6d295df7f086bcb2fea0eddbc267faa35bad85
commit cf6d295df7f086bcb2fea0eddbc267faa35bad85
Author: Slava Pestov <slava@...>
Date: Fri Apr 30 20:23:08 2004 +0000
fix quicknotepad compile error
diff --git a/QuickNotepad.java b/QuickNotepad.java
index aa6093b..37ad606 100644
--- a/QuickNotepad.java
+++ b/QuickNotepad.java
@@ -167,8 +167,8 @@ public class QuickNotepad extends JPanel implements EBComponent, QuickNotepadAct
try
{
FileWriter out = new FileWriter(filename);
- dos.write(textArea.getText());
- dos.close();
+ out.write(textArea.getText());
+ out.close();
}
catch (IOException ioe)
{
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=87220e9e54ab7d391b26a9a4011a73ea00bffa73
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=87220e9e54ab7d391b26a9a4011a73ea00bffa73
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=87220e9e54ab7d391b26a9a4011a73ea00bffa73;hb=87220e9e54ab7d391b26a9a4011a73ea00bffa73
commit 87220e9e54ab7d391b26a9a4011a73ea00bffa73
Author: Slava Pestov <slava@...>
Date: Mon Apr 19 04:24:49 2004 +0000
problem with QuickNotepad file saving fixed
diff --git a/QuickNotepad.java b/QuickNotepad.java
index f4640df..aa6093b 100644
--- a/QuickNotepad.java
+++ b/QuickNotepad.java
@@ -166,9 +166,8 @@ public class QuickNotepad extends JPanel implements EBComponent, QuickNotepadAct
if(filename == null || filename.length() == 0) return;
try
{
- DataOutputStream dos = new DataOutputStream(
- new FileOutputStream(filename));
- dos.writeBytes(textArea.getText());
+ FileWriter out = new FileWriter(filename);
+ dos.write(textArea.getText());
dos.close();
}
catch (IOException ioe)
@@ -206,12 +205,10 @@ public class QuickNotepad extends JPanel implements EBComponent, QuickNotepadAct
{
if(filename == null || filename.length() == 0) return;
- FileInputStream fis = null;
BufferedReader bf = null;
try
{
- fis = new FileInputStream(filename);
- bf = new BufferedReader(new InputStreamReader(fis));
+ bf = new BufferedReader(new FileReader(filename));
StringBuffer sb = new StringBuffer(2048);
String str;
while((str = bf.readLine()) != null)
@@ -219,7 +216,6 @@ public class QuickNotepad extends JPanel implements EBComponent, QuickNotepadAct
sb.append(str).append('\n');
}
bf.close();
- fis.close();
textArea.setText(sb.toString());
}
catch (FileNotFoundException fnf)
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=fb656535b3d77b1dfe9d3a89764b6c0556ed5aaa
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=fb656535b3d77b1dfe9d3a89764b6c0556ed5aaa
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=fb656535b3d77b1dfe9d3a89764b6c0556ed5aaa;hb=fb656535b3d77b1dfe9d3a89764b6c0556ed5aaa
commit fb656535b3d77b1dfe9d3a89764b6c0556ed5aaa
Author: Slava Pestov <slava@...>
Date: Thu Jul 17 20:14:42 2003 +0000
updated
diff --git a/qpadhelp.xml b/qpadhelp.xml
deleted file mode 100644
index 6389e66..0000000
--- a/qpadhelp.xml
+++ /dev/null
@@ -1,229 +0,0 @@
-<!-- QuickNotepad 2.0 help documentation -->
-<!-- Contains text of documentation; -->
-<!-- DocBook header contained in QuickNotepad.xml -->
-<!-- Copyright (C) 2001 John Gellene -->
-<!-- $Id$
--->
-
-<simplesect><title>Introduction</title>
-<indexterm><primary>QuickNotepad</primary></indexterm>
-<para>
- This plugin provides a dockable <quote>scratch pad</quote> for writing
- and displaying notes, to do lists or similar items as unformatted text.
- The text is automatically saved upon closing the plugin or exiting
- jEdit. It can also be saved manually. The user can change the file to be
- displayed during the current editing session. The path of the default
- notepad file can be changed as a user option. Finally, the text file can
- be copied to a new, untitled jEdit buffer so that it can be edited by the
- main program.
-</para>
-
-<para>
- The <citetitle>jEdit Plugin Guide</citetitle> details the development
- and design of QuickNotepad. It is a simple but functional dockable plugin
- that incorporates the basic elements of the jEdit plugin architecture.
-</para>
-
-<para>
- QuickNotepad 2.0 is designed to operate with JDK 1.2 or greater and
- jEdit 4.0 or greater. The EditBus plugin is also required.
-</para>
-
-<para>
- The file <filename>changes40.txt</filename> in the plugin's source
- code details the changes that were made to the plugin to conform to
- the new plugin API for jEdit version 4.0.
-</para>
-</simplesect>
-
-<simplesect><title>Operation</title>
-
-<para>
-<indexterm>
- <primary>QuickNotepad</primary>
- <secondary>shortcut keys</secondary>
-</indexterm>
- When QuickNotepad is activated, it loads and displays the file stored in
- its properties as unformatted text. The text can be edited using the
- keyboard and mouse. The text area component recognizes the following
- basic editing shortcuts:
-</para>
-<!-- Limitations on xsltproc's capabilities require a blank column between -->
-<!-- the two columns of data to provide spacing for the table. -->
-<informaltable align="center" frame="none">
- <tgroup cols="4" align="left">
- <colspec colnum="1"/> <!-- blank column -->
- <colspec colnum="2"/>
- <colspec colnum="3"/> <!-- blank column -->
- <colspec colnum="4"/>
- <tbody>
- <row>
- <entry> </entry>
- <entry>Cut</entry>
- <entry> </entry>
- <entry><keycombo action="simul"><keysym>Ctrl</keysym><keysym>x</keysym></keycombo></entry>
- </row>
- <row>
- <entry> </entry>
- <entry>Copy</entry>
- <entry> </entry>
- <entry><keycombo action="simul"><keysym>Ctrl</keysym><keysym>c</keysym></keycombo></entry>
- </row>
- <row>
- <entry> </entry>
- <entry>Paste</entry>
- <entry> </entry>
- <entry><keycombo action="simul"><keysym>Ctrl</keysym><keysym>v</keysym></keycombo></entry>
- </row>
- <row>
- <entry> </entry>
- <entry>Select All</entry>
- <entry> </entry>
- <entry><keycombo action="simul"><keysym>Ctrl</keysym><keysym>a</keysym></keycombo></entry>
- </row>
- </tbody>
- </tgroup>
-</informaltable>
-
-<para>
- QuickNotepad ignores function keys and other combination key presses.
-</para>
-
-</simplesect>
-
-<simplesect><title>Toolbar buttons</title>
-
-<para>
- Three buttons above the text area provide file management operations:
-</para>
-
-<itemizedlist>
- <listitem>
- <para>
- <guilabel>Choose notepad file</guilabel> - this button opens a file selection
- dialog permitting the user to select a different file to view in the
- text area. If a new file is selected, the old file is
- auomatically saved. The selection is valid only for the current
- editing session; to change the default QuickNotepad file for future
- sessions, use the <link linkend="options">options dialog</link>.
- </para>
- </listitem>
- <listitem>
- <para>
- <guilabel>Save notepad file</guilabel> - this button causes QuickNotepad to
- write the contents of the text area to the designated notepad file. To
- save the text to another file name, use the <guilabel>Copy notepad to
- buffer</guilabel> operation.
- </para>
- </listitem>
- <listitem>
- <para>
- <guilabel>Copy notepad to buffer</guilabel> - this button causes the
- contents of the text to be written to a newly created,
- untitled buffer in the main text editing area. This operation
- does not alter the QuickNotepad text area or write its text to
- storage. Further changes to either the QuickNotepad text area or
- the new buffer will not affect the other.
- </para>
- </listitem>
-</itemizedlist>
-
-<para>
- These operations are listed in the menu which appears for
- QuickNotepad under the <guimenu>Plugins</guimenu> heading. They can
- also be made the subject of keyboard shortcuts in the
- <guilabel>Plugin Shortcuts</guilabel> pane of jEdit's options dialog.
-</para>
-
-<para>
- One other operation is available as a keyboard shortcut. <guilabel>Bring
- QuickNotepad to front</guilabel> activates the plugin and makes visible
- if it is currently hidden in a docking window.
-</para>
-
-</simplesect>
-
-<simplesect id="options"><title>Options</title>
-<indexterm>
- <primary>QuickNotepad</primary>
- <secondary>options</secondary>
-</indexterm>
-
-<para>
- There are three options which can be set
- using the pane for QuickNotepad in the <guilabel>Plugin
- Shortcuts</guilabel> section of the general options dialog:
-</para>
-<itemizedlist>
- <listitem>
- <para>
- A checkbox governs whether the name of the notepad file will be
- displayed in the toolbar panel above the text area. Even if the file
- name display is enabled, if the plugin is displayed to the left or right
- of the main editing area, the notepad file name will likely be partially
- or completely hidden.
- </para>
- </listitem>
- <listitem>
- <para>
- A text field and adjacent button allow the user to choose the path of
- the default notepad file by typing its name or opening a file chooser
- dialog. This file will be loaded (and the old file saved) once the
- plugin's options settings are committed.
- </para>
- </listitem>
- <listitem>
- <para>
- A third button shows the name, size and style of the font used by the
- QuickNotepad text area. Pressing the button summons a font chooser
- dialog for making a new selection. The text area will be
- redrawn with the new font once the change is committed.
- </para>
- </listitem>
-</itemizedlist>
-
-</simplesect>
-
-<simplesect><title>Legal notices</title>
-
-<para>
- The toolbar button icons are taken from the Sun Java Look and Feel
- icon collection. The license for these items may be found
- in the <filename>ICONS.LICENSE.txt</filename> file in the jEdit
- distribution.
-</para>
-
-<para>
- The QuickNotepad plugin is released under the GNU General Public License
- (either version 2 or any later version, at the user's option). A copy
- of the GPL is available in the <filename>COPYING.txt</filename> file
- in the jEdit distribution.
-</para>
-
-<para>
- The QuickNotepad plugin comes with ABSOLUTELY NO WARRANTY OF ANY KIND;
- see section 11 and 12 of the GPL for details.
-</para>
-
-<para>
- Permission is granted to copy, distribute and/or modify this document
- under the terms of the GNU Free Documentation License, Version 1.1 or
- any later version published by the Free Software Foundation; with no
- <quote>Invariant Sections</quote>, <quote>Front-Cover Texts</quote> or
- <quote>Back-Cover Texts</quote>, each as defined in the license. A copy
- of the license is included in the file
- <filename>COPYING.DOC.txt</filename> included with the jEdit distribution.
-</para>
-
-</simplesect>
-
-<simplesect><title>Feedback</title>
-
-<para>
- Comments, bug reports and other feedback may be sent to the
- <ulink url="mailto:jgellene@...> or the
- jEdit-users mailing list.
-</para>
-
-</simplesect>
-
diff --git a/users-guide.xml b/users-guide.xml
index 245e78e..7bf48f1 100644
--- a/users-guide.xml
+++ b/users-guide.xml
@@ -5,11 +5,7 @@
<!-- Copyright (C) 2001 John Gellene -->
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
-
-<!ENTITY qpadhelp SYSTEM "qpadhelp.xml">
-
-]>
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<article id="QuickNotepad">
<articleinfo>
@@ -32,7 +28,222 @@
<title>QuickNotepad 4.2</title>
</articleinfo>
-&qpadhelp;
+<simplesect><title>Introduction</title>
+<indexterm><primary>QuickNotepad</primary></indexterm>
+<para>
+ This plugin provides a dockable <quote>scratch pad</quote> for writing
+ and displaying notes, to do lists or similar items as unformatted text.
+ The text is automatically saved upon closing the plugin or exiting
+ jEdit. It can also be saved manually. The user can change the file to be
+ displayed during the current editing session. The path of the default
+ notepad file can be changed as a user option. Finally, the text file can
+ be copied to a new, untitled jEdit buffer so that it can be edited by the
+ main program.
+</para>
+
+<para>
+ The <citetitle>jEdit Plugin Guide</citetitle> details the development
+ and design of QuickNotepad. It is a simple but functional dockable plugin
+ that incorporates the basic elements of the jEdit plugin architecture.
+</para>
+
+<para>
+ The file <filename>changes42.txt</filename> in the plugin's source
+ code details the changes that were made to the plugin to conform to
+ the new plugin API for jEdit version 4.2.
+</para>
+
+<para>
+ The file <filename>changes40.txt</filename> in the plugin's source
+ code details the changes that were made to the plugin to conform to
+ the new plugin API for jEdit version 4.0.
+</para>
+</simplesect>
+
+<simplesect><title>Operation</title>
+
+<para>
+<indexterm>
+ <primary>QuickNotepad</primary>
+ <secondary>shortcut keys</secondary>
+</indexterm>
+ When QuickNotepad is activated, it loads and displays the file stored in
+ its properties as unformatted text. The text can be edited using the
+ keyboard and mouse. The text area component recognizes the following
+ basic editing shortcuts:
+</para>
+<!-- Limitations on xsltproc's capabilities require a blank column between -->
+<!-- the two columns of data to provide spacing for the table. -->
+<informaltable align="center" frame="none">
+ <tgroup cols="4" align="left">
+ <colspec colnum="1"/> <!-- blank column -->
+ <colspec colnum="2"/>
+ <colspec colnum="3"/> <!-- blank column -->
+ <colspec colnum="4"/>
+ <tbody>
+ <row>
+ <entry> </entry>
+ <entry>Cut</entry>
+ <entry> </entry>
+ <entry><keycombo action="simul"><keysym>Ctrl</keysym><keysym>x</keysym></keycombo></entry>
+ </row>
+ <row>
+ <entry> </entry>
+ <entry>Copy</entry>
+ <entry> </entry>
+ <entry><keycombo action="simul"><keysym>Ctrl</keysym><keysym>c</keysym></keycombo></entry>
+ </row>
+ <row>
+ <entry> </entry>
+ <entry>Paste</entry>
+ <entry> </entry>
+ <entry><keycombo action="simul"><keysym>Ctrl</keysym><keysym>v</keysym></keycombo></entry>
+ </row>
+ <row>
+ <entry> </entry>
+ <entry>Select All</entry>
+ <entry> </entry>
+ <entry><keycombo action="simul"><keysym>Ctrl</keysym><keysym>a</keysym></keycombo></entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+ QuickNotepad ignores function keys and other combination key presses.
+</para>
+
+</simplesect>
+
+<simplesect><title>Toolbar buttons</title>
+
+<para>
+ Three buttons above the text area provide file management operations:
+</para>
+
+<itemizedlist>
+ <listitem>
+ <para>
+ <guilabel>Choose notepad file</guilabel> - this button opens a file selection
+ dialog permitting the user to select a different file to view in the
+ text area. If a new file is selected, the old file is
+ auomatically saved. The selection is valid only for the current
+ editing session; to change the default QuickNotepad file for future
+ sessions, use the <link linkend="options">options dialog</link>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <guilabel>Save notepad file</guilabel> - this button causes QuickNotepad to
+ write the contents of the text area to the designated notepad file. To
+ save the text to another file name, use the <guilabel>Copy notepad to
+ buffer</guilabel> operation.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <guilabel>Copy notepad to buffer</guilabel> - this button causes the
+ contents of the text to be written to a newly created,
+ untitled buffer in the main text editing area. This operation
+ does not alter the QuickNotepad text area or write its text to
+ storage. Further changes to either the QuickNotepad text area or
+ the new buffer will not affect the other.
+ </para>
+ </listitem>
+</itemizedlist>
+
+<para>
+ These operations are listed in the menu which appears for
+ QuickNotepad under the <guimenu>Plugins</guimenu> heading. They can
+ also be made the subject of keyboard shortcuts in the
+ <guilabel>Plugin Shortcuts</guilabel> pane of jEdit's options dialog.
+</para>
+
+<para>
+ One other operation is available as a keyboard shortcut. <guilabel>Bring
+ QuickNotepad to front</guilabel> activates the plugin and makes visible
+ if it is currently hidden in a docking window.
+</para>
+
+</simplesect>
+
+<simplesect id="options"><title>Options</title>
+<indexterm>
+ <primary>QuickNotepad</primary>
+ <secondary>options</secondary>
+</indexterm>
+
+<para>
+ There are three options which can be set
+ using the pane for QuickNotepad in the <guilabel>Plugin
+ Shortcuts</guilabel> section of the general options dialog:
+</para>
+<itemizedlist>
+ <listitem>
+ <para>
+ A checkbox governs whether the name of the notepad file will be
+ displayed in the toolbar panel above the text area. Even if the file
+ name display is enabled, if the plugin is displayed to the left or right
+ of the main editing area, the notepad file name will likely be partially
+ or completely hidden.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ A text field and adjacent button allow the user to choose the path of
+ the default notepad file by typing its name or opening a file chooser
+ dialog. This file will be loaded (and the old file saved) once the
+ plugin's options settings are committed.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ A third button shows the name, size and style of the font used by the
+ QuickNotepad text area. Pressing the button summons a font chooser
+ dialog for making a new selection. The text area will be
+ redrawn with the new font once the change is committed.
+ </para>
+ </listitem>
+</itemizedlist>
+
+</simplesect>
+
+<simplesect><title>Legal notices</title>
+
+<para>
+ The QuickNotepad plugin is released under the GNU General Public License
+ (either version 2 or any later version, at the user's option). A copy
+ of the GPL is available in the <filename>COPYING.txt</filename> file
+ in the jEdit distribution.
+</para>
+
+<para>
+ The QuickNotepad plugin comes with ABSOLUTELY NO WARRANTY OF ANY KIND;
+ see section 11 and 12 of the GPL for details.
+</para>
+
+<para>
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.1 or
+ any later version published by the Free Software Foundation; with no
+ <quote>Invariant Sections</quote>, <quote>Front-Cover Texts</quote> or
+ <quote>Back-Cover Texts</quote>, each as defined in the license. A copy
+ of the license is included in the file
+ <filename>COPYING.DOC.txt</filename> included with the jEdit distribution.
+</para>
+
+</simplesect>
+
+<simplesect><title>Feedback</title>
+
+<para>
+ Comments, bug reports and other feedback may be sent to the
+ <ulink url="mailto:jgellene@...> or the
+ jEdit-users mailing list.
+</para>
+
+</simplesect>
+
</article>
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=d1879b800b52d19fae4ede9b6abc467d3760804c
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=d1879b800b52d19fae4ede9b6abc467d3760804c
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=d1879b800b52d19fae4ede9b6abc467d3760804c;hb=d1879b800b52d19fae4ede9b6abc467d3760804c
commit d1879b800b52d19fae4ede9b6abc467d3760804c
Author: Slava Pestov <slava@...>
Date: Thu May 29 19:02:57 2003 +0000
fix plugin manager
diff --git a/QuickNotepad.java b/QuickNotepad.java
index 2d46d05..f4640df 100644
--- a/QuickNotepad.java
+++ b/QuickNotepad.java
@@ -61,17 +61,20 @@ public class QuickNotepad extends JPanel implements EBComponent, QuickNotepadAct
this.view = view;
this.floating = position.equals(DockableWindowManager.FLOATING);
- this.filename = jEdit.getProperty(
- QuickNotepadPlugin.OPTION_PREFIX + "filepath");
- if(this.filename == null || this.filename.length() == 0)
+ if(jEdit.getSettingsDirectory() != null)
{
- this.filename = new String(jEdit.getSettingsDirectory()
- + File.separator + "qn.txt");
- jEdit.setProperty(
- QuickNotepadPlugin.OPTION_PREFIX + "filepath",
- this.filename);
+ this.filename = jEdit.getProperty(
+ QuickNotepadPlugin.OPTION_PREFIX + "filepath");
+ if(this.filename == null || this.filename.length() == 0)
+ {
+ this.filename = new String(jEdit.getSettingsDirectory()
+ + File.separator + "qn.txt");
+ jEdit.setProperty(
+ QuickNotepadPlugin.OPTION_PREFIX + "filepath",
+ this.filename);
+ }
+ this.defaultFilename = this.filename;
}
- this.defaultFilename = new String(this.filename);
this.toolPanel = new QuickNotepadToolPanel(this);
add(BorderLayout.NORTH, this.toolPanel);
@@ -82,7 +85,6 @@ public class QuickNotepad extends JPanel implements EBComponent, QuickNotepadAct
textArea = new QuickNotepadTextArea();
textArea.setFont(QuickNotepadOptionPane.makeFont());
textArea.addKeyListener(new KeyHandler());
- textArea.addAncestorListener(new AncestorHandler());
JScrollPane pane = new JScrollPane(textArea);
add(BorderLayout.CENTER, pane);
@@ -122,19 +124,18 @@ public class QuickNotepad extends JPanel implements EBComponent, QuickNotepadAct
{
String propertyFilename = jEdit.getProperty(
QuickNotepadPlugin.OPTION_PREFIX + "filepath");
- if(!defaultFilename.equals(propertyFilename))
+ if(!MiscUtilities.objectsEqual(defaultFilename,propertyFilename))
{
saveFile();
toolPanel.propertiesChanged();
- defaultFilename = new String(propertyFilename);
- filename = new String(defaultFilename);
+ defaultFilename = propertyFilename;
+ filename = defaultFilename;
readFile();
}
Font newFont = QuickNotepadOptionPane.makeFont();
if(!newFont.equals(textArea.getFont()))
{
textArea.setFont(newFont);
- textArea.invalidate();
}
}
@@ -162,7 +163,7 @@ public class QuickNotepad extends JPanel implements EBComponent, QuickNotepadAct
public void saveFile()
{
- if(filename.length() == 0) return;
+ if(filename == null || filename.length() == 0) return;
try
{
DataOutputStream dos = new DataOutputStream(
@@ -203,6 +204,8 @@ public class QuickNotepad extends JPanel implements EBComponent, QuickNotepadAct
private void readFile()
{
+ if(filename == null || filename.length() == 0) return;
+
FileInputStream fis = null;
BufferedReader bf = null;
try
@@ -248,19 +251,5 @@ public class QuickNotepad extends JPanel implements EBComponent, QuickNotepadAct
}
}
- private class AncestorHandler implements AncestorListener
- {
- public void ancestorAdded(AncestorEvent e)
- {
- if(e.getSource() == QuickNotepad.this.textArea)
- {
- if(QuickNotepad.this.floating)
- QuickNotepad.this.textArea.requestFocus();
- }
- }
- public void ancestorMoved(AncestorEvent e) {}
- public void ancestorRemoved(AncestorEvent e) {}
- }
-
}
diff --git a/QuickNotepadToolPanel.java b/QuickNotepadToolPanel.java
index 426c89b..aefd625 100644
--- a/QuickNotepadToolPanel.java
+++ b/QuickNotepadToolPanel.java
@@ -40,38 +40,41 @@ public class QuickNotepadToolPanel extends JPanel
public QuickNotepadToolPanel(QuickNotepad qnpad)
{
+ setLayout(new BoxLayout(this,BoxLayout.X_AXIS));
pad = qnpad;
- JToolBar toolBar = new JToolBar();
- toolBar.setFloatable(false);
- toolBar.putClientProperty("JToolBar.isRollover",Boolean.TRUE);
+ Box labelBox = new Box(BoxLayout.Y_AXIS);
+ labelBox.add(Box.createGlue());
- toolBar.add(makeCustomButton("quicknotepad.choose-file",
+ label = new JLabel(pad.getFilename());
+ label.setVisible(jEdit.getProperty(
+ QuickNotepadPlugin.OPTION_PREFIX + "show-filepath").equals("true"));
+
+ labelBox.add(label);
+ labelBox.add(Box.createGlue());
+
+ add(labelBox);
+
+ add(Box.createGlue());
+
+ add(makeCustomButton("quicknotepad.choose-file",
new ActionListener() {
public void actionPerformed(ActionEvent evt) {
QuickNotepadToolPanel.this.pad.chooseFile();
}
}));
- toolBar.add(makeCustomButton("quicknotepad.save-file",
+ add(makeCustomButton("quicknotepad.save-file",
new ActionListener() {
public void actionPerformed(ActionEvent evt) {
QuickNotepadToolPanel.this.pad.saveFile();
}
}));
- toolBar.add(makeCustomButton("quicknotepad.copy-to-buffer",
+ add(makeCustomButton("quicknotepad.copy-to-buffer",
new ActionListener() {
public void actionPerformed(ActionEvent evt) {
QuickNotepadToolPanel.this.pad.copyToBuffer();
}
}));
- label = new JLabel(pad.getFilename(), SwingConstants.RIGHT);
- label.setForeground(Color.black);
- label.setVisible(jEdit.getProperty(
- QuickNotepadPlugin.OPTION_PREFIX + "show-filepath").equals("true"));
- this.setLayout(new BorderLayout(10, 0));
- this.add(BorderLayout.WEST, toolBar);
- this.add(BorderLayout.CENTER, label);
- this.setBorder(BorderFactory.createEmptyBorder(0, 0, 3, 10));
}
@@ -85,7 +88,7 @@ public class QuickNotepadToolPanel extends JPanel
private AbstractButton makeCustomButton(String name, ActionListener listener)
{
String toolTip = jEdit.getProperty(name.concat(".label"));
- AbstractButton b = new JButton(GUIUtilities.loadIcon(
+ AbstractButton b = new RolloverButton(GUIUtilities.loadIcon(
jEdit.getProperty(name + ".icon")));
if(listener != null)
{
@@ -97,9 +100,6 @@ public class QuickNotepadToolPanel extends JPanel
b.setEnabled(false);
}
b.setToolTipText(toolTip);
- b.setMargin(new Insets(0,0,0,0));
- b.setAlignmentY(0.0f);
- b.setRequestFocusEnabled(false);
return b;
}
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=2e1aab8157619478f28f35e8f48a82eca5b8d080
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=2e1aab8157619478f28f35e8f48a82eca5b8d080
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=2e1aab8157619478f28f35e8f48a82eca5b8d080;hb=2e1aab8157619478f28f35e8f48a82eca5b8d080
commit 2e1aab8157619478f28f35e8f48a82eca5b8d080
Author: Slava Pestov <slava@...>
Date: Wed Apr 30 21:22:41 2003 +0000
plugin summary cache
diff --git a/users-guide.xml b/users-guide.xml
index 708b476..245e78e 100644
--- a/users-guide.xml
+++ b/users-guide.xml
@@ -4,7 +4,7 @@
<!-- QuickNotepad 2.0 help documentation -->
<!-- Copyright (C) 2001 John Gellene -->
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY qpadhelp SYSTEM "qpadhelp.xml">
@@ -29,17 +29,7 @@
included with the jEdit distribution.
</para>
</legalnotice>
- <title>QuickNotepad 2.0</title>
- <revhistory>
- <revision>
- <revnumber>1.0</revnumber>
- <date>June 28, 2001</date>
- </revision>
- <revision>
- <revnumber>2.0</revnumber>
- <date>November 9, 2001</date>
- </revision>
- </revhistory>
+ <title>QuickNotepad 4.2</title>
</articleinfo>
&qpadhelp;
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=2002e85948bb2932b24e2bfb192e5b1767d100e6
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=2002e85948bb2932b24e2bfb192e5b1767d100e6
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=2002e85948bb2932b24e2bfb192e5b1767d100e6;hb=2002e85948bb2932b24e2bfb192e5b1767d100e6
commit 2002e85948bb2932b24e2bfb192e5b1767d100e6
Author: Slava Pestov <slava@...>
Date: Wed Apr 30 05:28:55 2003 +0000
new option pane api for deferred plugins; updated quicknotepad for 4.2 api; various fixes
diff --git a/QuickNotepad.java b/QuickNotepad.java
index 7b8f07f..2d46d05 100644
--- a/QuickNotepad.java
+++ b/QuickNotepad.java
@@ -35,7 +35,6 @@ import javax.swing.event.*;
import org.gjt.sp.jedit.*;
import org.gjt.sp.jedit.gui.*;
import org.gjt.sp.jedit.io.*;
-//import org.gjt.sp.jedit.msg.CreateDockableWindow;
import org.gjt.sp.jedit.msg.PropertiesChanged;
import org.gjt.sp.jedit.msg.ViewUpdate;
import org.gjt.sp.util.Log;
diff --git a/QuickNotepad.props b/QuickNotepad.props
index 5813542..db6c1a0 100644
--- a/QuickNotepad.props
+++ b/QuickNotepad.props
@@ -1,13 +1,29 @@
# Properties file for QuickNotepad plugin
# $Id$
-# general plugin information
+# jEdit only needs to load the plugin the first time the user accesses it
+# the presence of this property also tells jEdit the plugin is using the new API
+plugin.QuickNotepadPlugin.activate=defer
+
+# These two properties are required for all plugins
plugin.QuickNotepadPlugin.name=QuickNotepad
plugin.QuickNotepadPlugin.author=John Gellene
+
# version number == jEdit version number
-plugin.QuickNotepadPlugin.version=4.1
+plugin.QuickNotepadPlugin.version=4.2
+
+# online help
plugin.QuickNotepadPlugin.docs=QuickNotepad.html
-plugin.QuickNotepadPlugin.depend.0=jedit 04.01.01.00
+
+# we only have one dependency, jEdit 4.2, since we use the new plugin API
+plugin.QuickNotepadPlugin.depend.0=jedit 04.02.01.00
+
+# plugin menu
+plugin.QuickNotepadPlugin.menu=quicknotepad \
+ - \
+ quicknotepad.choose-file \
+ quicknotepad.save-file \
+ quicknotepad.copy-to-buffer
# action labels for actions supplied by dockables.xml
quicknotepad.label=QuickNotepad
@@ -17,18 +33,11 @@ quicknotepad.choose-file.label=Choose notepad file
quicknotepad.save-file.label=Save notepad file
quicknotepad.copy-to-buffer.label=Copy notepad to buffer
-# application menu items
-quicknotepad.menu.label=QuickNotepad
-quicknotepad.menu=quicknotepad - quicknotepad.choose-file \
- quicknotepad.save-file quicknotepad.copy-to-buffer
+# plugin option pane
+plugin.QuickNotepadPlugin.option-pane=quicknotepad
-# window title
-quicknotepad.title=QuickNotepad
-
-# plugin toolbar buttons
-quicknotepad.choose-file.icon=Open.png
-quicknotepad.save-file.icon=Save.png
-quicknotepad.copy-to-buffer.icon=CopyToBuffer.png
+# Option pane activation BeanShell snippet
+options.quicknotepad.code=new QuickNotepadOptionPane();
# Option pane labels
options.quicknotepad.label=QuickNotepad
@@ -38,7 +47,15 @@ options.quicknotepad.choose-file.title=Choose a notepad file
options.quicknotepad.choose-font=Font:
options.quicknotepad.show-filepath.title=Display notepad file path
-# Initial default settings
+# window title
+quicknotepad.title=QuickNotepad
+
+# window toolbar buttons
+quicknotepad.choose-file.icon=Open.png
+quicknotepad.save-file.icon=Save.png
+quicknotepad.copy-to-buffer.icon=CopyToBuffer.png
+
+# default settings
options.quicknotepad.show-filepath=true
options.quicknotepad.font=Monospaced
options.quicknotepad.fontstyle=0
diff --git a/QuickNotepadPlugin.java b/QuickNotepadPlugin.java
index 68667fc..088330a 100644
--- a/QuickNotepadPlugin.java
+++ b/QuickNotepadPlugin.java
@@ -21,13 +21,7 @@
* $Id$
*/
-import java.util.Vector;
-import java.awt.*;
-import java.awt.event.*;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.util.Log;
-import org.gjt.sp.jedit.gui.*;
-
+import org.gjt.sp.jedit.EditPlugin;
/**
* The QuickNotepad plugin
@@ -37,21 +31,5 @@ import org.gjt.sp.jedit.gui.*;
public class QuickNotepadPlugin extends EditPlugin
{
public static final String NAME = "quicknotepad";
- public static final String MENU = "quicknotepad.menu";
- public static final String PROPERTY_PREFIX = "plugin.QuickNotepadPlugin.";
public static final String OPTION_PREFIX = "options.quicknotepad.";
-
-
- public void createMenuItems(Vector menuItems)
- {
- menuItems.addElement(GUIUtilities.loadMenu(MENU));
- }
-
-
- public void createOptionPanes(OptionsDialog od)
- {
- od.addOptionPane(new QuickNotepadOptionPane());
- }
-
}
-
diff --git a/changes42.txt b/changes42.txt
new file mode 100644
index 0000000..9c0175e
--- /dev/null
+++ b/changes42.txt
@@ -0,0 +1,26 @@
+$Id$
+
+Changes made to QuickNotepad plugin for jEdit 4.2:
+
+(1) The following property was added:
+
+ plugin.QuickNotepadPlugin.activate=defer
+
+This informs jEdit the plugin is using the new API, and that it should only be
+loaded the first time it is accessed by the user.
+
+(2) The createMenuItems() method of the plugin core class has been removed. The
+plugin menu is now specified with the following property:
+
+ plugin.QuickNotepadPlugin.menu=... list of menu items ...
+
+(3) The createOptionPanes() method of the plugin core class has been removed. The plugin option pane is now specified with the following property:
+
+ plugin.QuickNotepadPlugin.option-pane=quicknotepad
+
+(4) The QuickNotepad class (the dockable window) implements the new DefaultFocusComponent interface, and the following method was added to this class:
+
+ public void focusOnDefaultComponent()
+ {
+ textArea.requestFocus();
+ }
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=5ab22d4e70bbfcb8146c3a7e45946616268a3db5
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=5ab22d4e70bbfcb8146c3a7e45946616268a3db5
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=5ab22d4e70bbfcb8146c3a7e45946616268a3db5;hb=5ab22d4e70bbfcb8146c3a7e45946616268a3db5
commit 5ab22d4e70bbfcb8146c3a7e45946616268a3db5
Author: Slava Pestov <slava@...>
Date: Mon Apr 14 05:21:58 2003 +0000
markers menu fixed
diff --git a/QuickNotepad.java b/QuickNotepad.java
index 8af9289..7b8f07f 100644
--- a/QuickNotepad.java
+++ b/QuickNotepad.java
@@ -41,7 +41,7 @@ import org.gjt.sp.jedit.msg.ViewUpdate;
import org.gjt.sp.util.Log;
-public class QuickNotepad extends JPanel implements EBComponent, QuickNotepadActions
+public class QuickNotepad extends JPanel implements EBComponent, QuickNotepadActions, DefaultFocusComponent
{
private String filename;
private String defaultFilename;
@@ -91,6 +91,11 @@ public class QuickNotepad extends JPanel implements EBComponent, QuickNotepadAct
readFile();
}
+ public void focusOnDefaultComponent()
+ {
+ textArea.requestFocus();
+ }
+
//
// Attribute methods
//
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=50e2786c67bc395aa23ce8f29efb4b4487b942a6
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=50e2786c67bc395aa23ce8f29efb4b4487b942a6
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=50e2786c67bc395aa23ce8f29efb4b4487b942a6;hb=50e2786c67bc395aa23ce8f29efb4b4487b942a6
commit 50e2786c67bc395aa23ce8f29efb4b4487b942a6
Author: Slava Pestov <slava@...>
Date: Sun Feb 9 20:37:14 2003 +0000
updating plugin guide
diff --git a/QuickNotepad.props b/QuickNotepad.props
index 2485edf..5813542 100644
--- a/QuickNotepad.props
+++ b/QuickNotepad.props
@@ -11,7 +11,6 @@ plugin.QuickNotepadPlugin.depend.0=jedit 04.01.01.00
# action labels for actions supplied by dockables.xml
quicknotepad.label=QuickNotepad
-quicknotepad-toggle.label=QuickNotepad
# action labels for actions supplied by actions.xml
quicknotepad.choose-file.label=Choose notepad file
diff --git a/dockables.xml b/dockables.xml
index a905d99..911927e 100644
--- a/dockables.xml
+++ b/dockables.xml
@@ -1,9 +1,9 @@
+<?xml version="1.0"?>
+
<!-- Dockable component definition file for QuickNotepad plugin -->
<!-- $Id$
-->
-<?xml version="1.0"?>
-
<!DOCTYPE DOCKABLES SYSTEM "dockables.dtd">
<!-- QuickNotepad dockable windows -->
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=0c79a9c8e32a556104476333153674e3d3972b8d
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=0c79a9c8e32a556104476333153674e3d3972b8d
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=0c79a9c8e32a556104476333153674e3d3972b8d;hb=0c79a9c8e32a556104476333153674e3d3972b8d
commit 0c79a9c8e32a556104476333153674e3d3972b8d
Author: Slava Pestov <slava@...>
Date: Fri Feb 7 20:29:26 2003 +0000
some javadoc improvements
diff --git a/QuickNotepad.props b/QuickNotepad.props
index 3d6f21c..2485edf 100644
--- a/QuickNotepad.props
+++ b/QuickNotepad.props
@@ -4,7 +4,8 @@
# general plugin information
plugin.QuickNotepadPlugin.name=QuickNotepad
plugin.QuickNotepadPlugin.author=John Gellene
-plugin.QuickNotepadPlugin.version=2.0
+# version number == jEdit version number
+plugin.QuickNotepadPlugin.version=4.1
plugin.QuickNotepadPlugin.docs=QuickNotepad.html
plugin.QuickNotepadPlugin.depend.0=jedit 04.01.01.00
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=c0d3f01ad153f789a8884c39fb043e3b2e29bb70
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=c0d3f01ad153f789a8884c39fb043e3b2e29bb70
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=c0d3f01ad153f789a8884c39fb043e3b2e29bb70;hb=c0d3f01ad153f789a8884c39fb043e3b2e29bb70
commit c0d3f01ad153f789a8884c39fb043e3b2e29bb70
Author: Slava Pestov <slava@...>
Date: Sat Jun 1 02:46:39 2002 +0000
new help viewer and quicknotepad icons from krisk
diff --git a/Edit.gif b/Edit.gif
deleted file mode 100644
index a5af7d7..0000000
Binary files a/Edit.gif and /dev/null differ
diff --git a/Open.gif b/Open.gif
deleted file mode 100644
index 2086bc2..0000000
Binary files a/Open.gif and /dev/null differ
diff --git a/QuickNotepad.props b/QuickNotepad.props
index cada910..3d6f21c 100644
--- a/QuickNotepad.props
+++ b/QuickNotepad.props
@@ -6,7 +6,7 @@ plugin.QuickNotepadPlugin.name=QuickNotepad
plugin.QuickNotepadPlugin.author=John Gellene
plugin.QuickNotepadPlugin.version=2.0
plugin.QuickNotepadPlugin.docs=QuickNotepad.html
-plugin.QuickNotepadPlugin.depend.0=jedit 04.00.01.00
+plugin.QuickNotepadPlugin.depend.0=jedit 04.01.01.00
# action labels for actions supplied by dockables.xml
quicknotepad.label=QuickNotepad
@@ -26,9 +26,9 @@ quicknotepad.menu=quicknotepad - quicknotepad.choose-file \
quicknotepad.title=QuickNotepad
# plugin toolbar buttons
-quicknotepad.choose-file.icon=Open.gif
-quicknotepad.save-file.icon=Save.gif
-quicknotepad.copy-to-buffer.icon=Edit.gif
+quicknotepad.choose-file.icon=Open.png
+quicknotepad.save-file.icon=Save.png
+quicknotepad.copy-to-buffer.icon=CopyToBuffer.png
# Option pane labels
options.quicknotepad.label=QuickNotepad
diff --git a/QuickNotepadToolPanel.java b/QuickNotepadToolPanel.java
index 685f51b..426c89b 100644
--- a/QuickNotepadToolPanel.java
+++ b/QuickNotepadToolPanel.java
@@ -38,25 +38,27 @@ public class QuickNotepadToolPanel extends JPanel
private QuickNotepad pad;
private JLabel label;
- public QuickNotepadToolPanel(QuickNotepad qnpad)
+ public QuickNotepadToolPanel(QuickNotepad qnpad)
{
pad = qnpad;
- JToolBar toolBar = new JToolBar();
- toolBar.setFloatable(false);
+ JToolBar toolBar = new JToolBar();
+ toolBar.setFloatable(false);
- toolBar.add(makeCustomButton("quicknotepad.choose-file",
+ toolBar.putClientProperty("JToolBar.isRollover",Boolean.TRUE);
+
+ toolBar.add(makeCustomButton("quicknotepad.choose-file",
new ActionListener() {
public void actionPerformed(ActionEvent evt) {
QuickNotepadToolPanel.this.pad.chooseFile();
}
}));
- toolBar.add(makeCustomButton("quicknotepad.save-file",
+ toolBar.add(makeCustomButton("quicknotepad.save-file",
new ActionListener() {
public void actionPerformed(ActionEvent evt) {
QuickNotepadToolPanel.this.pad.saveFile();
}
}));
- toolBar.add(makeCustomButton("quicknotepad.copy-to-buffer",
+ toolBar.add(makeCustomButton("quicknotepad.copy-to-buffer",
new ActionListener() {
public void actionPerformed(ActionEvent evt) {
QuickNotepadToolPanel.this.pad.copyToBuffer();
@@ -66,11 +68,11 @@ public class QuickNotepadToolPanel extends JPanel
label.setForeground(Color.black);
label.setVisible(jEdit.getProperty(
QuickNotepadPlugin.OPTION_PREFIX + "show-filepath").equals("true"));
- this.setLayout(new BorderLayout(10, 0));
- this.add(BorderLayout.WEST, toolBar);
+ this.setLayout(new BorderLayout(10, 0));
+ this.add(BorderLayout.WEST, toolBar);
this.add(BorderLayout.CENTER, label);
- this.setBorder(BorderFactory.createEmptyBorder(0, 0, 3, 10));
- }
+ this.setBorder(BorderFactory.createEmptyBorder(0, 0, 3, 10));
+ }
void propertiesChanged()
@@ -80,12 +82,11 @@ public class QuickNotepadToolPanel extends JPanel
QuickNotepadPlugin.OPTION_PREFIX + "show-filepath").equals("true"));
}
- private AbstractButton makeCustomButton(String name, ActionListener listener)
+ private AbstractButton makeCustomButton(String name, ActionListener listener)
{
- String icon = jEdit.getProperty(name + ".icon");
- java.net.URL u = getClass().getResource(icon);
- String toolTip = jEdit.getProperty(name.concat(".label"));
- AbstractButton b = new JButton(new ImageIcon(u));
+ String toolTip = jEdit.getProperty(name.concat(".label"));
+ AbstractButton b = new JButton(GUIUtilities.loadIcon(
+ jEdit.getProperty(name + ".icon")));
if(listener != null)
{
b.addActionListener(listener);
@@ -95,12 +96,12 @@ public class QuickNotepadToolPanel extends JPanel
{
b.setEnabled(false);
}
- b.setToolTipText(toolTip);
- b.setMargin(new Insets(0,0,0,0));
+ b.setToolTipText(toolTip);
+ b.setMargin(new Insets(0,0,0,0));
b.setAlignmentY(0.0f);
- b.setRequestFocusEnabled(false);
- return b;
- }
+ b.setRequestFocusEnabled(false);
+ return b;
+ }
}
diff --git a/Save.gif b/Save.gif
deleted file mode 100644
index bfa98a8..0000000
Binary files a/Save.gif and /dev/null differ
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=20320ab82745545937b1b4c05f6a6b999dbfa731
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=20320ab82745545937b1b4c05f6a6b999dbfa731
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=20320ab82745545937b1b4c05f6a6b999dbfa731;hb=20320ab82745545937b1b4c05f6a6b999dbfa731
commit 20320ab82745545937b1b4c05f6a6b999dbfa731
Author: Slava Pestov <slava@...>
Date: Thu Apr 11 09:42:14 2002 +0000
Almost finished
diff --git a/QuickNotepadPlugin.java b/QuickNotepadPlugin.java
index 0b25330..68667fc 100644
--- a/QuickNotepadPlugin.java
+++ b/QuickNotepadPlugin.java
@@ -41,15 +41,6 @@ public class QuickNotepadPlugin extends EditPlugin
public static final String PROPERTY_PREFIX = "plugin.QuickNotepadPlugin.";
public static final String OPTION_PREFIX = "options.quicknotepad.";
- public void start()
- {
- }
-
-
- public void stop()
- {
- }
-
public void createMenuItems(Vector menuItems)
{
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=0ef51267cf71eedf3dd10422c0983f12a6b141a0
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=0ef51267cf71eedf3dd10422c0983f12a6b141a0
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=0ef51267cf71eedf3dd10422c0983f12a6b141a0;hb=0ef51267cf71eedf3dd10422c0983f12a6b141a0
commit 0ef51267cf71eedf3dd10422c0983f12a6b141a0
Author: Slava Pestov <slava@...>
Date: Thu Apr 11 08:45:52 2002 +0000
working on plugin guide
diff --git a/actions.xml b/actions.xml
index f9501e2..bee453a 100644
--- a/actions.xml
+++ b/actions.xml
@@ -10,20 +10,20 @@
view.getDockableWindowManager()
.getDockable(QuickNotepadPlugin.NAME).chooseFile();
</CODE>
- </ACTION>
+ </ACTION>
- <ACTION NAME="quicknotepad.save-file">
+ <ACTION NAME="quicknotepad.save-file">
<CODE>
view.getDockableWindowManager()
.getDockable(QuickNotepadPlugin.NAME).saveFile();
</CODE>
- </ACTION>
+ </ACTION>
- <ACTION NAME="quicknotepad.copy-to-buffer">
+ <ACTION NAME="quicknotepad.copy-to-buffer">
<CODE>
view.getDockableWindowManager()
.getDockable(QuickNotepadPlugin.NAME).copyToBuffer();
</CODE>
- </ACTION>
+ </ACTION>
</ACTIONS>
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=125e71e82823d6966a07ab69888ca20af528a665
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=125e71e82823d6966a07ab69888ca20af528a665
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=125e71e82823d6966a07ab69888ca20af528a665;hb=125e71e82823d6966a07ab69888ca20af528a665
commit 125e71e82823d6966a07ab69888ca20af528a665
Author: Slava Pestov <slava@...>
Date: Wed Mar 27 00:37:52 2002 +0000
fixed QuickNotepad's build.xml; plugin list is now gzipped
diff --git a/build.xml b/build.xml
index 383f474..944e437 100644
--- a/build.xml
+++ b/build.xml
@@ -34,6 +34,7 @@
<include name="**/*.html"/>
<include name="**/*.gif"/>
<include name="actions.xml"/>
+ <include name="dockables.xml"/>
</fileset>
</jar>
</target>
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=3b161f8e9e7dbfa0a2477da74bd752b9ea4699ab
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=3b161f8e9e7dbfa0a2477da74bd752b9ea4699ab
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=3b161f8e9e7dbfa0a2477da74bd752b9ea4699ab;hb=3b161f8e9e7dbfa0a2477da74bd752b9ea4699ab
commit 3b161f8e9e7dbfa0a2477da74bd752b9ea4699ab
Author: Slava Pestov <slava@...>
Date: Mon Mar 25 10:07:48 2002 +0000
4.0pre8 ready
diff --git a/build.xml b/build.xml
index 8f1f847..383f474 100644
--- a/build.xml
+++ b/build.xml
@@ -1,35 +1,10 @@
<?xml version="1.0"?>
-<!--
- This is a build.xml file for building the QuickNotepad plugin.
-
- The 'dist' target compiles the plugin and creates the JAR file.
- Before running the 'dist' target, you will need to generate the
- documentation using one of these two targets:
-
- - 'docs-xalan': Creates documentation using the Xalan XSLT processor
- - 'docs-xsltproc': Creates documentation using the xsltproc tool
-
- To use it for building your own plugin, make these changes:
-
- - Change definition of 'jedit.install.dir' to point to the directory
- containing jedit.jar
- - Change definition of 'jar.name' to the name of your plugin's JAR file
- - If necessary, add any dependencies to the 'project.class.path'
- definition
- - If necessary, change the list of files in the 'dist' targtet
- - If your plugin has documentation generated using the DocBook XSL
- stylesheets, change the 'docs-xalan' and 'docs-xsltproc' targets
- accordingly.
--->
-
<project name="QuickNotepad" default="dist" basedir=".">
- <property name="jedit.install.dir" value="G:\\Program Files\\jEdit 4.0pre1"/>
+ <property name="jedit.install.dir" value="../.."/>
<property name="jar.name" value="QuickNotepad.jar"/>
- <property name="src.dir" value="."/>
- <property name="build.dir" value="build"/>
<property name="install.dir" value=".."/>
@@ -39,15 +14,9 @@
</path>
- <target name="init">
- <mkdir dir="${build.dir}"/>
- </target>
-
-
- <target name="compile" depends="init">
+ <target name="compile">
<javac
- srcdir="${src.dir}"
- destdir="${build.dir}"
+ srcdir="."
deprecation="on"
includeJavaRuntime="yes"
>
@@ -59,52 +28,13 @@
<target name="dist" depends="compile">
<mkdir dir="${install.dir}"/>
<jar jarfile="${install.dir}/${jar.name}">
- <fileset dir="${build.dir}"/>
- <fileset dir="${src.dir}">
- <include name="actions.xml"/>
- <include name="dockables.xml"/>
+ <fileset dir=".">
+ <include name="**/*.class"/>
<include name="**/*.props"/>
<include name="**/*.html"/>
<include name="**/*.gif"/>
+ <include name="actions.xml"/>
</fileset>
</jar>
</target>
-
- <!-- Generate docs with xsltproc tool from http://www.xmlsoft.org -->
- <!-- NOTE: the "o" or "output" options do not appear to be working. -->
- <!-- To customize the title of an HTML output file, set the -->
- <!-- 'use.id.as.filename' variable in your XSL customization file -->
- <!-- and provide the file name (without extension) as the 'id' -->
- <!-- attribute of the element that constitutes a 'chunk' of output. For -->
- <!-- a plugin help file, there should usually be only one chunk, so the -->
- <!-- top-level element (<article> or <book>) should have the 'id' -->
- <!-- attribute. -->
- <target name="docs-xsltproc">
- <exec executable="xsltproc">
- <arg value="--catalogs"/>
- <arg value="--nonet"/>
- <arg value="--output"/>
- <arg value="QuickNotepad.html"/>
- <arg value="users-guide.xsl"/>
- <arg value="users-guide.xml"/>
- </exec>
- </target>
-
- <!-- Generate docs with Xalan tool from xml.apache.org -->
- <target name="docs-xalan">
- <style
- style="users-guide.xsl"
- in="users-guide.xml"
- out="QuickNotepad.html"
- destdir="."/>
- </target>
-
- <target name="clean">
- <delete dir="${build.dir}"/>
- <delete>
- <fileset dir="." includes="**/*~" defaultexcludes="no"/>
- <fileset dir="." includes="**/*.html" defaultexcludes="no"/>
- </delete>
- </target>
-
</project>
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=67bd97ece175338e3506b2b8d7d3ea7affe9ebd4
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=67bd97ece175338e3506b2b8d7d3ea7affe9ebd4
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=67bd97ece175338e3506b2b8d7d3ea7affe9ebd4;hb=67bd97ece175338e3506b2b8d7d3ea7affe9ebd4
commit 67bd97ece175338e3506b2b8d7d3ea7affe9ebd4
Author: Slava Pestov <slava@...>
Date: Sun Dec 23 05:37:00 2001 +0000
Various JDK 1.4 bug fixes
diff --git a/QuickNotepad.props b/QuickNotepad.props
index 3f8a7b2..cada910 100644
--- a/QuickNotepad.props
+++ b/QuickNotepad.props
@@ -19,7 +19,7 @@ quicknotepad.copy-to-buffer.label=Copy notepad to buffer
# application menu items
quicknotepad.menu.label=QuickNotepad
-quicknotepad.menu=quicknotepad-toggle - quicknotepad.choose-file \
+quicknotepad.menu=quicknotepad - quicknotepad.choose-file \
quicknotepad.save-file quicknotepad.copy-to-buffer
# window title
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=43f20436adc4ffc7e045c8cbd3615dc81829fed9
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=43f20436adc4ffc7e045c8cbd3615dc81829fed9
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=43f20436adc4ffc7e045c8cbd3615dc81829fed9;hb=43f20436adc4ffc7e045c8cbd3615dc81829fed9
commit 43f20436adc4ffc7e045c8cbd3615dc81829fed9
Author: Slava Pestov <slava@...>
Date: Wed Nov 14 09:35:20 2001 +0000
Recent Directories menu, ~ can now be used in paths
diff --git a/QuickNotepad.props b/QuickNotepad.props
index 8f91ec4..3f8a7b2 100644
--- a/QuickNotepad.props
+++ b/QuickNotepad.props
@@ -22,6 +22,9 @@ quicknotepad.menu.label=QuickNotepad
quicknotepad.menu=quicknotepad-toggle - quicknotepad.choose-file \
quicknotepad.save-file quicknotepad.copy-to-buffer
+# window title
+quicknotepad.title=QuickNotepad
+
# plugin toolbar buttons
quicknotepad.choose-file.icon=Open.gif
quicknotepad.save-file.icon=Save.gif
@@ -43,7 +46,3 @@ options.quicknotepad.fontsize=14
# Setting not defined but supplied for completeness
options.quicknotepad.filepath=
-
-
-
-
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=b075b41788950e0dc01dfcc0a3fb713c013199b1
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=b075b41788950e0dc01dfcc0a3fb713c013199b1
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=b075b41788950e0dc01dfcc0a3fb713c013199b1;hb=b075b41788950e0dc01dfcc0a3fb713c013199b1
commit b075b41788950e0dc01dfcc0a3fb713c013199b1
Author: Slava Pestov <slava@...>
Date: Wed Nov 14 06:51:03 2001 +0000
Property file fix
diff --git a/QuickNotepad.props b/QuickNotepad.props
index b27ce85..8f91ec4 100644
--- a/QuickNotepad.props
+++ b/QuickNotepad.props
@@ -6,9 +6,7 @@ plugin.QuickNotepadPlugin.name=QuickNotepad
plugin.QuickNotepadPlugin.author=John Gellene
plugin.QuickNotepadPlugin.version=2.0
plugin.QuickNotepadPlugin.docs=QuickNotepad.html
-plugin.QuickNotepadPlugin.depend.0=jdk 1.2
-plugin.QuickNotepadPlugin.depend.1=jedit 04.00.00.00
-plugin.QuickNotepadPlugin.depend.2=plugin EditBusPlugin 1.0
+plugin.QuickNotepadPlugin.depend.0=jedit 04.00.01.00
# action labels for actions supplied by dockables.xml
quicknotepad.label=QuickNotepad
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=fe24c54e42b0eb75e3f574ecd9212a14ae58d250
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=fe24c54e42b0eb75e3f574ecd9212a14ae58d250
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=fe24c54e42b0eb75e3f574ecd9212a14ae58d250;hb=fe24c54e42b0eb75e3f574ecd9212a14ae58d250
commit fe24c54e42b0eb75e3f574ecd9212a14ae58d250
Author: John Gellene <jgellene@...>
Date: Sun Nov 11 12:26:20 2001 +0000
Change to Hard tab/8 spaces at Slava's request
diff --git a/QuickNotepad.java b/QuickNotepad.java
index 409dcff..8af9289 100644
--- a/QuickNotepad.java
+++ b/QuickNotepad.java
@@ -45,7 +45,7 @@ public class QuickNotepad extends JPanel implements EBComponent, QuickNotepadAct
{
private String filename;
private String defaultFilename;
- private View view;
+ private View view;
private boolean floating;
private QuickNotepadTextArea textArea;
@@ -55,11 +55,11 @@ public class QuickNotepad extends JPanel implements EBComponent, QuickNotepadAct
// Constructor
//
- public QuickNotepad(View view, String position)
+ public QuickNotepad(View view, String position)
{
super(new BorderLayout());
- this.view = view;
+ this.view = view;
this.floating = position.equals(DockableWindowManager.FLOATING);
this.filename = jEdit.getProperty(
@@ -85,11 +85,11 @@ public class QuickNotepad extends JPanel implements EBComponent, QuickNotepadAct
textArea.addKeyListener(new KeyHandler());
textArea.addAncestorListener(new AncestorHandler());
- JScrollPane pane = new JScrollPane(textArea);
- add(BorderLayout.CENTER, pane);
+ JScrollPane pane = new JScrollPane(textArea);
+ add(BorderLayout.CENTER, pane);
readFile();
- }
+ }
//
// Attribute methods
@@ -105,16 +105,16 @@ public class QuickNotepad extends JPanel implements EBComponent, QuickNotepadAct
// EBComponent implementation
//
- public void handleMessage(EBMessage message)
+ public void handleMessage(EBMessage message)
{
- if (message instanceof PropertiesChanged)
+ if (message instanceof PropertiesChanged)
{
- propertiesChanged();
- }
- }
+ propertiesChanged();
+ }
+ }
- private void propertiesChanged()
+ private void propertiesChanged()
{
String propertyFilename = jEdit.getProperty(
QuickNotepadPlugin.OPTION_PREFIX + "filepath");
@@ -171,7 +171,7 @@ public class QuickNotepad extends JPanel implements EBComponent, QuickNotepadAct
Log.log(Log.ERROR, QuickNotepad.class,
"Could not write notepad text to " + filename);
}
- }
+ }
public void chooseFile()
{
@@ -211,10 +211,10 @@ public class QuickNotepad extends JPanel implements EBComponent, QuickNotepadAct
{
sb.append(str).append('\n');
}
- bf.close();
+ bf.close();
fis.close();
textArea.setText(sb.toString());
- }
+ }
catch (FileNotFoundException fnf)
{
Log.log(Log.ERROR, QuickNotepad.class,
@@ -222,7 +222,7 @@ public class QuickNotepad extends JPanel implements EBComponent, QuickNotepadAct
}
catch (IOException ioe)
{
- Log.log(Log.ERROR, QuickNotepad.class,
+ Log.log(Log.ERROR, QuickNotepad.class,
"could not read notepad file " + filename);
}
}
@@ -232,17 +232,17 @@ public class QuickNotepad extends JPanel implements EBComponent, QuickNotepadAct
//
// <Esc> closes a floating window
- private class KeyHandler extends KeyAdapter {
- public void keyPressed(KeyEvent evt) {
+ private class KeyHandler extends KeyAdapter {
+ public void keyPressed(KeyEvent evt) {
if(QuickNotepad.this.floating &&
- evt.getKeyCode() == KeyEvent.VK_ESCAPE) {
- evt.consume();
+ evt.getKeyCode() == KeyEvent.VK_ESCAPE) {
+ evt.consume();
DockableWindowManager wm =
QuickNotepad.this.view.getDockableWindowManager();
- wm.removeDockableWindow(QuickNotepadPlugin.NAME);
- }
- }
- }
+ wm.removeDockableWindow(QuickNotepadPlugin.NAME);
+ }
+ }
+ }
private class AncestorHandler implements AncestorListener
{
diff --git a/QuickNotepadOptionPane.java b/QuickNotepadOptionPane.java
index 3cf703d..21ea8e4 100644
--- a/QuickNotepadOptionPane.java
+++ b/QuickNotepadOptionPane.java
@@ -47,38 +47,38 @@ public class QuickNotepadOptionPane extends AbstractOptionPane
private JTextField pathName;
private FontSelector font;
- public QuickNotepadOptionPane()
+ public QuickNotepadOptionPane()
{
super(QuickNotepadPlugin.NAME);
- }
+ }
- public void _init()
- {
+ public void _init()
+ {
showPath = new JCheckBox(jEdit.getProperty(
- QuickNotepadPlugin.OPTION_PREFIX + "show-filepath.title"),
+ QuickNotepadPlugin.OPTION_PREFIX + "show-filepath.title"),
jEdit.getProperty(QuickNotepadPlugin.OPTION_PREFIX +
"show-filepath").equals("true"));
addComponent(showPath);
- pathName = new JTextField(jEdit.getProperty(
- QuickNotepadPlugin.OPTION_PREFIX + "filepath"));
- JButton pickPath = new JButton(jEdit.getProperty(
- QuickNotepadPlugin.OPTION_PREFIX + "choose-file"));
- pickPath.addActionListener(this);
+ pathName = new JTextField(jEdit.getProperty(
+ QuickNotepadPlugin.OPTION_PREFIX + "filepath"));
+ JButton pickPath = new JButton(jEdit.getProperty(
+ QuickNotepadPlugin.OPTION_PREFIX + "choose-file"));
+ pickPath.addActionListener(this);
- JPanel pathPanel = new JPanel(new BorderLayout(0, 0));
- pathPanel.add(pathName, BorderLayout.CENTER);
- pathPanel.add(pickPath, BorderLayout.EAST);
+ JPanel pathPanel = new JPanel(new BorderLayout(0, 0));
+ pathPanel.add(pathName, BorderLayout.CENTER);
+ pathPanel.add(pickPath, BorderLayout.EAST);
- addComponent(jEdit.getProperty(
- QuickNotepadPlugin.OPTION_PREFIX + "file"),
- pathPanel);
+ addComponent(jEdit.getProperty(
+ QuickNotepadPlugin.OPTION_PREFIX + "file"),
+ pathPanel);
- font = new FontSelector(makeFont());
- addComponent(jEdit.getProperty(
- QuickNotepadPlugin.OPTION_PREFIX + "choose-font"),
- font);
- }
+ font = new FontSelector(makeFont());
+ addComponent(jEdit.getProperty(
+ QuickNotepadPlugin.OPTION_PREFIX + "choose-font"),
+ font);
+ }
public void _save()
{
@@ -111,7 +111,7 @@ public class QuickNotepadOptionPane extends AbstractOptionPane
static public Font makeFont()
{
int style, size;
- String family = jEdit.getProperty(
+ String family = jEdit.getProperty(
QuickNotepadPlugin.OPTION_PREFIX + "font");
try
{
diff --git a/QuickNotepadPlugin.java b/QuickNotepadPlugin.java
index 79023af..0b25330 100644
--- a/QuickNotepadPlugin.java
+++ b/QuickNotepadPlugin.java
@@ -36,14 +36,14 @@ import org.gjt.sp.jedit.gui.*;
*/
public class QuickNotepadPlugin extends EditPlugin
{
- public static final String NAME = "quicknotepad";
+ public static final String NAME = "quicknotepad";
public static final String MENU = "quicknotepad.menu";
- public static final String PROPERTY_PREFIX = "plugin.QuickNotepadPlugin.";
- public static final String OPTION_PREFIX = "options.quicknotepad.";
+ public static final String PROPERTY_PREFIX = "plugin.QuickNotepadPlugin.";
+ public static final String OPTION_PREFIX = "options.quicknotepad.";
- public void start()
+ public void start()
{
- }
+ }
public void stop()
@@ -51,16 +51,16 @@ public class QuickNotepadPlugin extends EditPlugin
}
- public void createMenuItems(Vector menuItems)
+ public void createMenuItems(Vector menuItems)
{
- menuItems.addElement(GUIUtilities.loadMenu(MENU));
- }
+ menuItems.addElement(GUIUtilities.loadMenu(MENU));
+ }
- public void createOptionPanes(OptionsDialog od)
+ public void createOptionPanes(OptionsDialog od)
{
- od.addOptionPane(new QuickNotepadOptionPane());
- }
+ od.addOptionPane(new QuickNotepadOptionPane());
+ }
}
diff --git a/actions.xml b/actions.xml
index dcda801..f9501e2 100644
--- a/actions.xml
+++ b/actions.xml
@@ -5,25 +5,25 @@
<!DOCTYPE ACTIONS SYSTEM "actions.dtd">
<ACTIONS>
- <ACTION NAME="quicknotepad.choose-file">
- <CODE>
- view.getDockableWindowManager()
- .getDockable(QuickNotepadPlugin.NAME).chooseFile();
- </CODE>
+ <ACTION NAME="quicknotepad.choose-file">
+ <CODE>
+ view.getDockableWindowManager()
+ .getDockable(QuickNotepadPlugin.NAME).chooseFile();
+ </CODE>
</ACTION>
- <ACTION NAME="quicknotepad.save-file">
- <CODE>
- view.getDockableWindowManager()
- .getDockable(QuickNotepadPlugin.NAME).saveFile();
- </CODE>
- </ACTION>
+ <ACTION NAME="quicknotepad.save-file">
+ <CODE>
+ view.getDockableWindowManager()
+ .getDockable(QuickNotepadPlugin.NAME).saveFile();
+ </CODE>
+ </ACTION>
<ACTION NAME="quicknotepad.copy-to-buffer">
- <CODE>
- view.getDockableWindowManager()
- .getDockable(QuickNotepadPlugin.NAME).copyToBuffer();
- </CODE>
+ <CODE>
+ view.getDockableWindowManager()
+ .getDockable(QuickNotepadPlugin.NAME).copyToBuffer();
+ </CODE>
</ACTION>
</ACTIONS>
diff --git a/build.xml b/build.xml
index faa81c0..8f1f847 100644
--- a/build.xml
+++ b/build.xml
@@ -72,13 +72,13 @@
<!-- Generate docs with xsltproc tool from http://www.xmlsoft.org -->
<!-- NOTE: the "o" or "output" options do not appear to be working. -->
- <!-- To customize the title of an HTML output file, set the -->
+ <!-- To customize the title of an HTML output file, set the -->
<!-- 'use.id.as.filename' variable in your XSL customization file -->
- <!-- and provide the file name (without extension) as the 'id' -->
+ <!-- and provide the file name (without extension) as the 'id' -->
<!-- attribute of the element that constitutes a 'chunk' of output. For -->
<!-- a plugin help file, there should usually be only one chunk, so the -->
<!-- top-level element (<article> or <book>) should have the 'id' -->
- <!-- attribute. -->
+ <!-- attribute. -->
<target name="docs-xsltproc">
<exec executable="xsltproc">
<arg value="--catalogs"/>
diff --git a/qpadhelp.xml b/qpadhelp.xml
index ebb743a..6389e66 100644
--- a/qpadhelp.xml
+++ b/qpadhelp.xml
@@ -1,10 +1,7 @@
-<!-- jEdit buffer-local properties: -->
-<!-- :indentSize=1:noTabs=true:maxLineLen=72:tabSize=2: -->
-
-<!-- QuickNotepad 2.0 help documentation -->
-<!-- Contains text of documentation; -->
+<!-- QuickNotepad 2.0 help documentation -->
+<!-- Contains text of documentation; -->
<!-- DocBook header contained in QuickNotepad.xml -->
-<!-- Copyright (C) 2001 John Gellene -->
+<!-- Copyright (C) 2001 John Gellene -->
<!-- $Id$
-->
@@ -12,30 +9,30 @@
<indexterm><primary>QuickNotepad</primary></indexterm>
<para>
This plugin provides a dockable <quote>scratch pad</quote> for writing
- and displaying notes, to do lists or similar items as unformatted text.
- The text is automatically saved upon closing the plugin or exiting
- jEdit. It can also be saved manually. The user can change the file
- to be displayed during the current editing session. The path of the default
- notepad file can be changed as a user option. Finally, the
- text file can be copied to a new, untitled jEdit buffer so that it can
- be edited by the main program.
+ and displaying notes, to do lists or similar items as unformatted text.
+ The text is automatically saved upon closing the plugin or exiting
+ jEdit. It can also be saved manually. The user can change the file to be
+ displayed during the current editing session. The path of the default
+ notepad file can be changed as a user option. Finally, the text file can
+ be copied to a new, untitled jEdit buffer so that it can be edited by the
+ main program.
</para>
<para>
- The <citetitle>jEdit Plugin Guide</citetitle> details the development
- and design of QuickNotepad. It is a simple but functional dockable plugin
- that incorporates the basic elements of the jEdit plugin architecture.
+ The <citetitle>jEdit Plugin Guide</citetitle> details the development
+ and design of QuickNotepad. It is a simple but functional dockable plugin
+ that incorporates the basic elements of the jEdit plugin architecture.
</para>
<para>
- QuickNotepad 2.0 is designed to operate with JDK 1.2 or greater and
- jEdit 4.0 or greater. The EditBus plugin is also required.
+ QuickNotepad 2.0 is designed to operate with JDK 1.2 or greater and
+ jEdit 4.0 or greater. The EditBus plugin is also required.
</para>
<para>
- The file <filename>changes40.txt</filename> in the plugin's source
- code details the changes that were made to the plugin to conform to
- the new plugin API for jEdit version 4.0.
+ The file <filename>changes40.txt</filename> in the plugin's source
+ code details the changes that were made to the plugin to conform to
+ the new plugin API for jEdit version 4.0.
</para>
</simplesect>
@@ -43,53 +40,53 @@
<para>
<indexterm>
- <primary>QuickNotepad</primary>
- <secondary>shortcut keys</secondary>
+ <primary>QuickNotepad</primary>
+ <secondary>shortcut keys</secondary>
</indexterm>
- When QuickNotepad is activated, it loads and displays the file stored in
- its properties as unformatted text. The text can be edited using the
- keyboard and mouse. The text area component recognizes the following
- basic editing shortcuts:
+ When QuickNotepad is activated, it loads and displays the file stored in
+ its properties as unformatted text. The text can be edited using the
+ keyboard and mouse. The text area component recognizes the following
+ basic editing shortcuts:
</para>
<!-- Limitations on xsltproc's capabilities require a blank column between -->
-<!-- the two columns of data to provide spacing for the table. -->
+<!-- the two columns of data to provide spacing for the table. -->
<informaltable align="center" frame="none">
- <tgroup cols="4" align="left">
- <colspec colnum="1"/> <!-- blank column -->
- <colspec colnum="2"/>
- <colspec colnum="3"/> <!-- blank column -->
- <colspec colnum="4"/>
- <tbody>
- <row>
- <entry> </entry>
- <entry>Cut</entry>
- <entry> </entry>
- <entry><keycombo action="simul"><keysym>Ctrl</keysym><keysym>x</keysym></keycombo></entry>
- </row>
- <row>
- <entry> </entry>
- <entry>Copy</entry>
- <entry> </entry>
- <entry><keycombo action="simul"><keysym>Ctrl</keysym><keysym>c</keysym></keycombo></entry>
- </row>
- <row>
- <entry> </entry>
- <entry>Paste</entry>
- <entry> </entry>
- <entry><keycombo action="simul"><keysym>Ctrl</keysym><keysym>v</keysym></keycombo></entry>
- </row>
- <row>
- <entry> </entry>
- <entry>Select All</entry>
- <entry> </entry>
- <entry><keycombo action="simul"><keysym>Ctrl</keysym><keysym>a</keysym></keycombo></entry>
- </row>
- </tbody>
- </tgroup>
+ <tgroup cols="4" align="left">
+ <colspec colnum="1"/> <!-- blank column -->
+ <colspec colnum="2"/>
+ <colspec colnum="3"/> <!-- blank column -->
+ <colspec colnum="4"/>
+ <tbody>
+ <row>
+ <entry> </entry>
+ <entry>Cut</entry>
+ <entry> </entry>
+ <entry><keycombo action="simul"><keysym>Ctrl</keysym><keysym>x</keysym></keycombo></entry>
+ </row>
+ <row>
+ <entry> </entry>
+ <entry>Copy</entry>
+ <entry> </entry>
+ <entry><keycombo action="simul"><keysym>Ctrl</keysym><keysym>c</keysym></keycombo></entry>
+ </row>
+ <row>
+ <entry> </entry>
+ <entry>Paste</entry>
+ <entry> </entry>
+ <entry><keycombo action="simul"><keysym>Ctrl</keysym><keysym>v</keysym></keycombo></entry>
+ </row>
+ <row>
+ <entry> </entry>
+ <entry>Select All</entry>
+ <entry> </entry>
+ <entry><keycombo action="simul"><keysym>Ctrl</keysym><keysym>a</keysym></keycombo></entry>
+ </row>
+ </tbody>
+ </tgroup>
</informaltable>
<para>
- QuickNotepad ignores function keys and other combination key presses.
+ QuickNotepad ignores function keys and other combination key presses.
</para>
</simplesect>
@@ -97,51 +94,51 @@
<simplesect><title>Toolbar buttons</title>
<para>
- Three buttons above the text area provide file management operations:
+ Three buttons above the text area provide file management operations:
</para>
<itemizedlist>
- <listitem>
- <para>
- <guilabel>Choose notepad file</guilabel> - this button opens a file selection
- dialog permitting the user to select a different file to view in the
- text area. If a new file is selected, the old file is
- auomatically saved. The selection is valid only for the current
- editing session; to change the default QuickNotepad file for future
- sessions, use the <link linkend="options">options dialog</link>.
- </para>
- </listitem>
- <listitem>
- <para>
- <guilabel>Save notepad file</guilabel> - this button causes QuickNotepad to
- write the contents of the text area to the designated notepad file. To
- save the text to another file name, use the <guilabel>Copy notepad to
- buffer</guilabel> operation.
- </para>
- </listitem>
- <listitem>
- <para>
- <guilabel>Copy notepad to buffer</guilabel> - this button causes the
- contents of the text to be written to a newly created,
- untitled buffer in the main text editing area. This operation
- does not alter the QuickNotepad text area or write its text to
- storage. Further changes to either the QuickNotepad text area or
- the new buffer will not affect the other.
- </para>
- </listitem>
+ <listitem>
+ <para>
+ <guilabel>Choose notepad file</guilabel> - this button opens a file selection
+ dialog permitting the user to select a different file to view in the
+ text area. If a new file is selected, the old file is
+ auomatically saved. The selection is valid only for the current
+ editing session; to change the default QuickNotepad file for future
+ sessions, use the <link linkend="options">options dialog</link>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <guilabel>Save notepad file</guilabel> - this button causes QuickNotepad to
+ write the contents of the text area to the designated notepad file. To
+ save the text to another file name, use the <guilabel>Copy notepad to
+ buffer</guilabel> operation.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <guilabel>Copy notepad to buffer</guilabel> - this button causes the
+ contents of the text to be written to a newly created,
+ untitled buffer in the main text editing area. This operation
+ does not alter the QuickNotepad text area or write its text to
+ storage. Further changes to either the QuickNotepad text area or
+ the new buffer will not affect the other.
+ </para>
+ </listitem>
</itemizedlist>
<para>
- These operations are listed in the menu which appears for
- QuickNotepad under the <guimenu>Plugins</guimenu> heading. They can
- also be made the subject of keyboard shortcuts in the
- <guilabel>Plugin Shortcuts</guilabel> pane of jEdit's options dialog.
+ These operations are listed in the menu which appears for
+ QuickNotepad under the <guimenu>Plugins</guimenu> heading. They can
+ also be made the subject of keyboard shortcuts in the
+ <guilabel>Plugin Shortcuts</guilabel> pane of jEdit's options dialog.
</para>
<para>
- One other operation is available as a keyboard shortcut. <guilabel>Bring
- QuickNotepad to front</guilabel> activates the plugin and makes visible
- if it is currently hidden in a docking window.
+ One other operation is available as a keyboard shortcut. <guilabel>Bring
+ QuickNotepad to front</guilabel> activates the plugin and makes visible
+ if it is currently hidden in a docking window.
</para>
</simplesect>
@@ -153,69 +150,69 @@
</indexterm>
<para>
- There are three options which can be set
- using the pane for QuickNotepad in the <guilabel>Plugin
- Shortcuts</guilabel> section of the general options dialog:
+ There are three options which can be set
+ using the pane for QuickNotepad in the <guilabel>Plugin
+ Shortcuts</guilabel> section of the general options dialog:
</para>
- <itemizedlist>
- <listitem>
- <para>
- A checkbox governs whether the name of the notepad file will be
- displayed in the toolbar panel above the text area. Even if the file
- name display is enabled, if the plugin is displayed to the left or right
- of the main editing area, the notepad file name will likely be partially
- or completely hidden.
- </para>
- </listitem>
- <listitem>
- <para>
- A text field and adjacent button allow the user to choose the path of
- the default notepad file by typing its name or opening a file chooser
- dialog. This file will be loaded (and the old file saved) once the
- plugin's options settings are committed.
- </para>
- </listitem>
- <listitem>
- <para>
- A third button shows the name, size and style of the font used by the
- QuickNotepad text area. Pressing the button summons a font chooser
- dialog for making a new selection. The text area will be
- redrawn with the new font once the change is committed.
- </para>
- </listitem>
- </itemizedlist>
+<itemizedlist>
+ <listitem>
+ <para>
+ A checkbox governs whether the name of the notepad file will be
+ displayed in the toolbar panel above the text area. Even if the file
+ name display is enabled, if the plugin is displayed to the left or right
+ of the main editing area, the notepad file name will likely be partially
+ or completely hidden.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ A text field and adjacent button allow the user to choose the path of
+ the default notepad file by typing its name or opening a file chooser
+ dialog. This file will be loaded (and the old file saved) once the
+ plugin's options settings are committed.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ A third button shows the name, size and style of the font used by the
+ QuickNotepad text area. Pressing the button summons a font chooser
+ dialog for making a new selection. The text area will be
+ redrawn with the new font once the change is committed.
+ </para>
+ </listitem>
+</itemizedlist>
</simplesect>
<simplesect><title>Legal notices</title>
<para>
- The toolbar button icons are taken from the Sun Java Look and Feel
- icon collection. The license for these items may be found
- in the <filename>ICONS.LICENSE.txt</filename> file in the jEdit
- distribution.
+ The toolbar button icons are taken from the Sun Java Look and Feel
+ icon collection. The license for these items may be found
+ in the <filename>ICONS.LICENSE.txt</filename> file in the jEdit
+ distribution.
</para>
<para>
- The QuickNotepad plugin is released under the GNU General Public License
- (either version 2 or any later version, at the user's option). A copy
- of the GPL is available in the <filename>COPYING.txt</filename> file
- in the jEdit distribution.
+ The QuickNotepad plugin is released under the GNU General Public License
+ (either version 2 or any later version, at the user's option). A copy
+ of the GPL is available in the <filename>COPYING.txt</filename> file
+ in the jEdit distribution.
</para>
<para>
- The QuickNotepad plugin comes with ABSOLUTELY NO WARRANTY OF ANY KIND;
- see section 11 and 12 of the GPL for details.
+ The QuickNotepad plugin comes with ABSOLUTELY NO WARRANTY OF ANY KIND;
+ see section 11 and 12 of the GPL for details.
</para>
<para>
- Permission is granted to copy, distribute and/or modify this document
- under the terms of the GNU Free Documentation License, Version 1.1 or
- any later version published by the Free Software Foundation; with no
- <quote>Invariant Sections</quote>, <quote>Front-Cover Texts</quote> or
- <quote>Back-Cover Texts</quote>, each as defined in the license. A copy
- of the license is included in the file
- <filename>COPYING.DOC.txt</filename> included with the jEdit distribution.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.1 or
+ any later version published by the Free Software Foundation; with no
+ <quote>Invariant Sections</quote>, <quote>Front-Cover Texts</quote> or
+ <quote>Back-Cover Texts</quote>, each as defined in the license. A copy
+ of the license is included in the file
+ <filename>COPYING.DOC.txt</filename> included with the jEdit distribution.
</para>
</simplesect>
@@ -223,9 +220,9 @@
<simplesect><title>Feedback</title>
<para>
- Comments, bug reports and other feedback may be sent to the
- <ulink url="mailto:jgellene@...> or the
- jEdit-users mailing list.
+ Comments, bug reports and other feedback may be sent to the
+ <ulink url="mailto:jgellene@...> or the
+ jEdit-users mailing list.
</para>
</simplesect>
diff --git a/users-guide.xml b/users-guide.xml
index e635dde..708b476 100644
--- a/users-guide.xml
+++ b/users-guide.xml
@@ -1,48 +1,46 @@
<?xml version="1.0" standalone="no" ?>
-<!-- jEdit buffer-local properties: -->
-<!-- :indentSize=1:noTabs=true:maxLineLen=72:tabSize=2: -->
-<!-- QuickNotepad 1.0 help documentation -->
-<!-- Copyright (C) 2001 John Gellene -->
+<!-- QuickNotepad 2.0 help documentation -->
+<!-- Copyright (C) 2001 John Gellene -->
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY qpadhelp SYSTEM "qpadhelp.xml">
]>
<article id="QuickNotepad">
- <articleinfo>
- <author>
- <firstname>John</firstname><surname>Gellene</surname>
- <affiliation><address><email>jgellene@...>
- </author>
- <copyright><year>2001</year><holder>John Gellene</holder></copyright>
- <legalnotice><title>Legal Notice</title>
- <para>
- Permission is granted to copy, distribute and/or modify this document
- under the terms of the GNU Free Documentation License, Version 1.1 or
- any later version published by the Free Software Foundation; with no
- <quote>Invariant Sections</quote>, <quote>Front-Cover Texts</quote> or
- <quote>Back-Cover Texts</quote>, each as defined in the license. A copy of
- the license is included in the file <filename>COPYING.DOC.txt</filename>
- included with the jEdit distribution.
- </para>
- </legalnotice>
- <title>QuickNotepad 2.0</title>
- <revhistory>
- <revision>
- <revnumber>1.0</revnumber>
- <date>June 28, 2001</date>
- </revision>
- <revision>
- <revnumber>2.0</revnumber>
- <date>November 9, 2001</date>
- </revision>
- </revhistory>
- </articleinfo>
+ <articleinfo>
+ <author>
+ <firstname>John</firstname><surname>Gellene</surname>
+ <affiliation><address><email>jgellene@...>
+ </author>
+ <copyright><year>2001</year><holder>John Gellene</holder></copyright>
+ <legalnotice><title>Legal Notice</title>
+ <para>
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.1 or
+ any later version published by the Free Software Foundation; with no
+ <quote>Invariant Sections</quote>, <quote>Front-Cover Texts</quote> or
+ <quote>Back-Cover Texts</quote>, each as defined in the license. A copy of
+ the license is included in the file <filename>COPYING.DOC.txt</filename>
+ included with the jEdit distribution.
+ </para>
+ </legalnotice>
+ <title>QuickNotepad 2.0</title>
+ <revhistory>
+ <revision>
+ <revnumber>1.0</revnumber>
+ <date>June 28, 2001</date>
+ </revision>
+ <revision>
+ <revnumber>2.0</revnumber>
+ <date>November 9, 2001</date>
+ </revision>
+ </revhistory>
+ </articleinfo>
&qpadhelp;
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=eb35c848d87243503c80819d3d545d94e29b20c7
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=eb35c848d87243503c80819d3d545d94e29b20c7
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=eb35c848d87243503c80819d3d545d94e29b20c7;hb=eb35c848d87243503c80819d3d545d94e29b20c7
commit eb35c848d87243503c80819d3d545d94e29b20c7
Author: John Gellene <jgellene@...>
Date: Sun Nov 11 03:02:31 2001 +0000
Further changes to conform to jEdit 4.0 plugin API.
diff --git a/QuickNotepad.props b/QuickNotepad.props
index 5a6d641..b27ce85 100644
--- a/QuickNotepad.props
+++ b/QuickNotepad.props
@@ -10,19 +10,18 @@ plugin.QuickNotepadPlugin.depend.0=jdk 1.2
plugin.QuickNotepadPlugin.depend.1=jedit 04.00.00.00
plugin.QuickNotepadPlugin.depend.2=plugin EditBusPlugin 1.0
-# dockable window name
-quicknotepad.title=QuickNotepad
+# action labels for actions supplied by dockables.xml
+quicknotepad.label=QuickNotepad
+quicknotepad-toggle.label=QuickNotepad
-# action labels
-quicknotepad.toggle.label=QuickNotepad
-quicknotepad-to-front.label=Bring QuickNotepad to front
+# action labels for actions supplied by actions.xml
quicknotepad.choose-file.label=Choose notepad file
quicknotepad.save-file.label=Save notepad file
quicknotepad.copy-to-buffer.label=Copy notepad to buffer
# application menu items
quicknotepad.menu.label=QuickNotepad
-quicknotepad.menu=quicknotepad.toggle - quicknotepad.choose-file \
+quicknotepad.menu=quicknotepad-toggle - quicknotepad.choose-file \
quicknotepad.save-file quicknotepad.copy-to-buffer
# plugin toolbar buttons
diff --git a/actions.xml b/actions.xml
index b021a31..dcda801 100644
--- a/actions.xml
+++ b/actions.xml
@@ -5,41 +5,23 @@
<!DOCTYPE ACTIONS SYSTEM "actions.dtd">
<ACTIONS>
- <ACTION NAME="quicknotepad.toggle">
- <CODE>
- view.getDockableWindowManager()
- .toggleDockableWindow(QuickNotepadPlugin.NAME);
- </CODE>
- <IS_SELECTED>
- return view.getDockableWindowManager()
- .isDockableWindowVisible(QuickNotepadPlugin.NAME);
- </IS_SELECTED>
- </ACTION>
-
- <ACTION NAME="quicknotepad-to-front">
- <CODE>
- view.getDockableWindowManager()
- .getDockable(QuickNotepadPlugin.NAME);
- </CODE>
- </ACTION>
-
<ACTION NAME="quicknotepad.choose-file">
<CODE>
- wm = view.getDockableWindowManager()
+ view.getDockableWindowManager()
.getDockable(QuickNotepadPlugin.NAME).chooseFile();
</CODE>
</ACTION>
<ACTION NAME="quicknotepad.save-file">
<CODE>
- wm = view.getDockableWindowManager()
+ view.getDockableWindowManager()
.getDockable(QuickNotepadPlugin.NAME).saveFile();
</CODE>
</ACTION>
<ACTION NAME="quicknotepad.copy-to-buffer">
<CODE>
- wm = view.getDockableWindowManager()
+ view.getDockableWindowManager()
.getDockable(QuickNotepadPlugin.NAME).copyToBuffer();
</CODE>
</ACTION>
diff --git a/changes40.txt b/changes40.txt
index 580e636..5e82518 100644
--- a/changes40.txt
+++ b/changes40.txt
@@ -13,7 +13,7 @@ the getName() and getComponent() methods of that interface in the plugin class.
(2) A new file, dockables.xml, was created containing XML markup for the
constructor of a plugin component. Under the new plugin API, this file is read
-to determine the method call or calls for construcuting a new instance of a
+to determine the method call or calls for constructing a new instance of a
dockable plugin component. The file is quite short:
<?xml version="1.0"?>
@@ -33,38 +33,59 @@ constructor. Both "view" and "position" are defined by the new plugin API in the
namespace in which the constructor is called. The value of position is taken
from optional properties set by the user. In the absence of a user setting, the
position parameter is set to place the plugin component in a floating window.
+
The NAME attribute is taken to conform to the value of the static variable
QuickNotepadPlugin.NAME, which is also used to identify the plugin in the user
action code contained in actions.xml.
-There is one other, optional attribute of the <DOCKABLE> element: a NO_ACTIONS
-attribute that can take a value of either "true" or "false". It is "false" by
-default: this signifies that the plugin does in fact define user actions in an
-actions.xml file. Most plugins will therefore use the default value.
+By default, the plugin API adds two actions for a plugin. The first is entitled
+[name of plugin] (in this case, "quicknotepad"), and simply activates the plugin
+by executing the code contained in the DOCKABLE element. The second action
+toggles the plugin's visible component, the title of the action is [name of
+plugin]-toggle (in this case, "quicknotepad-toggle"). The plugin API handles
+this action internally.
+
+To prevent these actions from being created, you can add a NO_ACTIONS="true"
+attribute to the DOCKABLE element. The NAME and NO_ACTIONS attributes are the
+only attributes defined for a DOCKABLE entry. A NAME is required; NO_ACTIONS is
+set to "false" by default.
-(3) The user action definitions contained in actions.xml were revised to call
+(3) In the actions.xml file, the user action definitions were revised to call
DockableWindowManager.getDockable() instead of
-DockableManager.getDockableWindow().
+DockableManager.getDockableWindow(). In addition, the actions for toggling the
+plugin docking window and bringing the QuickNotepad window to the foreground
+were eliminated. The toggle action was duplicative of the built-in action
+supplied through dockables.xml, and the "bring to front" action had become
+redundant.
(4) There were two deletions made in QuickNotepadPlugin, the main plugin class.
+
The handleMessage() method was eliminated because it was only necessary for the
plugin to listen for the CreateDockableWindow message. As a result, it is no
longer necessary for this plugin to connect to the EditBus, so its derivation
was changed from EBPlugin to EditPlugin. Individual instances of the
QuickNotepad class still need to listen for a PropertiesChanged message, so that
-class continues to implement EBComponent. In addition, since the EditBus no
-longer maintains an active list of windows, the call to EditBus.addToNamedList()
-is no longer needed in the class's start() method and so was eliminated, leaving
-an empty start() method.
+class continues to implement EBComponent.
+
+In addition, since the EditBus no longer maintains an active list of windows,
+the call to EditBus.addToNamedList() is no longer needed in the class's start()
+method and so was eliminated, leaving an empty start() method.
(5) No changes were required in the option pane class, QuickNotepadOptionsPane,
or the other other classes defining components of the plugin.
-(6) Finally, the plugin's dependency properties were changed to make the plugin
-dependent upon version 4.0 or greater of jEdit:
+(6) Finally, several changes were made to the propoerties file of the plugin,
+QuickNotepad.props. First, the plugin's dependency properties were changed to
+make the plugin dependent upon version 4.0 or greater of jEdit:
plugin.QuickNotepadPlugin.depend.1=jedit 04.00.00.00
+Next, the quicknotepad.title property was eliminated, and the "label" properties
+for the docking window and plugin menu were reorganized into two categories:
+labels for action created by dockable.xml (quicknotepad.label and
+quicknotepad-toggle.label), and labels for actions created by actions.xml (the
+remaining user actions: "choose-file", "save-file" and "copy-to-buffer").
+
The plugin was built using the standard build.xml supplied for plugins,
after checking to make sure that the name of the plugin and the location of
jedit.jar were correct. It was also necessary to add dockables.xml to the list
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=7e5e4d2f862c0f02228b4046e9c46f84ea1b97e8
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=7e5e4d2f862c0f02228b4046e9c46f84ea1b97e8
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=7e5e4d2f862c0f02228b4046e9c46f84ea1b97e8;hb=7e5e4d2f862c0f02228b4046e9c46f84ea1b97e8
commit 7e5e4d2f862c0f02228b4046e9c46f84ea1b97e8
Author: John Gellene <jgellene@...>
Date: Sat Nov 10 21:09:03 2001 +0000
Updated for jEdit 4.0 API; annotated build.xml and user-guide.xsl with usage comments.
diff --git a/changes40.txt b/changes40.txt
index 6322e56..580e636 100644
--- a/changes40.txt
+++ b/changes40.txt
@@ -39,7 +39,7 @@ action code contained in actions.xml.
There is one other, optional attribute of the <DOCKABLE> element: a NO_ACTIONS
attribute that can take a value of either "true" or "false". It is "false" by
-default: this signifies that the plugin does in fact define user actions in a
+default: this signifies that the plugin does in fact define user actions in an
actions.xml file. Most plugins will therefore use the default value.
(3) The user action definitions contained in actions.xml were revised to call
@@ -50,12 +50,12 @@ DockableManager.getDockableWindow().
The handleMessage() method was eliminated because it was only necessary for the
plugin to listen for the CreateDockableWindow message. As a result, it is no
longer necessary for this plugin to connect to the EditBus, so its derivation
-was changed from EBPlugin to EditPlugin. Individual instance of the QuickNotepad
-class still need to listen for a PropertiesChanged message, so that class
-continues to implement EBComponent. In addition, since the EditBus no longer
-maintained an active list of Windows, the call to EditBus.addToNamedList() is no
-longer needed in the class's start() method and so was eliminated, leaving an
-empty start() method.
+was changed from EBPlugin to EditPlugin. Individual instances of the
+QuickNotepad class still need to listen for a PropertiesChanged message, so that
+class continues to implement EBComponent. In addition, since the EditBus no
+longer maintains an active list of windows, the call to EditBus.addToNamedList()
+is no longer needed in the class's start() method and so was eliminated, leaving
+an empty start() method.
(5) No changes were required in the option pane class, QuickNotepadOptionsPane,
or the other other classes defining components of the plugin.
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=bf20f546ad941bc8fa4a397cb4ec7a40cfec3ef5
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=bf20f546ad941bc8fa4a397cb4ec7a40cfec3ef5
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=bf20f546ad941bc8fa4a397cb4ec7a40cfec3ef5;hb=bf20f546ad941bc8fa4a397cb4ec7a40cfec3ef5
commit bf20f546ad941bc8fa4a397cb4ec7a40cfec3ef5
Author: John Gellene <jgellene@...>
Date: Sat Nov 10 20:15:32 2001 +0000
Updated for jEdit 4.0 API; annotated build.xml and user-guide.xsl with usage comments.
diff --git a/changes40.txt b/changes40.txt
index 856d6c0..6322e56 100644
--- a/changes40.txt
+++ b/changes40.txt
@@ -1,7 +1,9 @@
+$Id$
+
Changes made to QuickNotepad plugin for jEdit 4.0:
-(1) Under jEdit 3.2.2 and prior versions, the plugin had a separate class
-implementing the DockableWindow interface, QuickNotepadDockable. The class's
+(1) Under jEdit 3.2.2 and prior versions, the plugin had a separate class,
+QuickNotepadDockable, implementing the DockableWindow interface. The class's
methods delegated actions to the plugin's top-level visible component, a class
derived from JPanel called QuickNotepad. The DockableWindow interface is
deprecated in jEdit 4.0, so this class was eliminated. If the top-level
@@ -18,10 +20,13 @@ dockable plugin component. The file is quite short:
<!DOCTYPE DOCKABLES SYSTEM "dockables.dtd">
-<!-- QuickNotepad dockable windows -->
+<!-- QuickNotepad dockable window -->
-<DOCKABLES> <DOCKABLE NAME="quicknotepad"> new QuickNotepad(view, position);
- </DOCKABLE> </DOCKABLES>
+<DOCKABLES>
+ <DOCKABLE NAME="quicknotepad">
+ new QuickNotepad(view, position);
+ </DOCKABLE>
+</DOCKABLES>
The parameters are those found in the existing version of the QuickNotepad
constructor. Both "view" and "position" are defined by the new plugin API in the
@@ -29,25 +34,27 @@ namespace in which the constructor is called. The value of position is taken
from optional properties set by the user. In the absence of a user setting, the
position parameter is set to place the plugin component in a floating window.
The NAME attribute is taken to conform to the value of the static variable
-QuickNotepadPlugin.NAME, which is also used to identify the plugin in user
-action code.
+QuickNotepadPlugin.NAME, which is also used to identify the plugin in the user
+action code contained in actions.xml.
-There is one other attribute of the <DOCKABLE> element: a NO_ACTIONS attribute
-that can take a value of either "true" or "false". It is "false" by default:
-this signifies that the plugin does in fact define user actions in a actions.xml
-file. Most plugins will therefore use the default value.
+There is one other, optional attribute of the <DOCKABLE> element: a NO_ACTIONS
+attribute that can take a value of either "true" or "false". It is "false" by
+default: this signifies that the plugin does in fact define user actions in a
+actions.xml file. Most plugins will therefore use the default value.
-(3) The action definitions contained in actions.xml were revised to call
+(3) The user action definitions contained in actions.xml were revised to call
DockableWindowManager.getDockable() instead of
DockableManager.getDockableWindow().
-(4) There were two deletions made in the main plugin class, QuickNotepadPlugin.
+(4) There were two deletions made in QuickNotepadPlugin, the main plugin class.
The handleMessage() method was eliminated because it was only necessary for the
-plugin to listen for the CreateDockableWindow message, as a result, it is no
-longer necessary for this plugin to connect to the EditBus, so it derivation was
-changed from EBPlugin to EditPlugin. In addition, since the EditBus no longer
+plugin to listen for the CreateDockableWindow message. As a result, it is no
+longer necessary for this plugin to connect to the EditBus, so its derivation
+was changed from EBPlugin to EditPlugin. Individual instance of the QuickNotepad
+class still need to listen for a PropertiesChanged message, so that class
+continues to implement EBComponent. In addition, since the EditBus no longer
maintained an active list of Windows, the call to EditBus.addToNamedList() is no
-longer needed in the class's start() method and so was elimiated, leaving an
+longer needed in the class's start() method and so was eliminated, leaving an
empty start() method.
(5) No changes were required in the option pane class, QuickNotepadOptionsPane,
@@ -63,3 +70,9 @@ after checking to make sure that the name of the plugin and the location of
jedit.jar were correct. It was also necessary to add dockables.xml to the list
of files to be archived by the jar utility. Iterations of the build process
helped to uncover deprecated API elements.
+
+The help file was built from DocBook XML source using xsltproc. The build.xml
+Ant build file and the users-guide.xsl customization file contain annotations
+which may be helpful in building plugin documentation. In particular, a few
+<indexterm> tags were added to the documentation source to provide references
+for the index to be generated for all plugin files.
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=2932bdbf820d88b30485d6acf104274d62eda2fd
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=2932bdbf820d88b30485d6acf104274d62eda2fd
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=2932bdbf820d88b30485d6acf104274d62eda2fd;hb=2932bdbf820d88b30485d6acf104274d62eda2fd
commit 2932bdbf820d88b30485d6acf104274d62eda2fd
Author: John Gellene <jgellene@...>
Date: Sat Nov 10 18:57:08 2001 +0000
Updated for jEdit 4.0 API; annotated build.xml and user-guide.xsl with usage comments.
diff --git a/QuickNotepad.props b/QuickNotepad.props
index 95280e2..5a6d641 100644
--- a/QuickNotepad.props
+++ b/QuickNotepad.props
@@ -1,3 +1,6 @@
+# Properties file for QuickNotepad plugin
+# $Id$
+
# general plugin information
plugin.QuickNotepadPlugin.name=QuickNotepad
plugin.QuickNotepadPlugin.author=John Gellene
diff --git a/QuickNotepadOptionPane.java b/QuickNotepadOptionPane.java
index 6f4f1fe..3cf703d 100644
--- a/QuickNotepadOptionPane.java
+++ b/QuickNotepadOptionPane.java
@@ -17,6 +17,8 @@
* 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.
+ *
+ * $Id$
*/
import java.io.File;
diff --git a/QuickNotepadPlugin.java b/QuickNotepadPlugin.java
index fcbd9be..79023af 100644
--- a/QuickNotepadPlugin.java
+++ b/QuickNotepadPlugin.java
@@ -27,7 +27,6 @@ import java.awt.event.*;
import org.gjt.sp.jedit.*;
import org.gjt.sp.util.Log;
import org.gjt.sp.jedit.gui.*;
-//import org.gjt.sp.jedit.msg.CreateDockableWindow;
/**
@@ -44,7 +43,6 @@ public class QuickNotepadPlugin extends EditPlugin
public void start()
{
-// EditBus.addToNamedList(DockableWindow.DOCKABLE_WINDOW_LIST, NAME);
}
@@ -64,23 +62,5 @@ public class QuickNotepadPlugin extends EditPlugin
od.addOptionPane(new QuickNotepadOptionPane());
}
-/*
- public void handleMessage(EBMessage message)
- {
- if(message instanceof CreateDockableWindow)
- {
- CreateDockableWindow cmsg = (CreateDockableWindow)message;
- if (cmsg.getDockableWindowName().equals(NAME))
- {
-// try {
-// Runtime.getRuntime().exec("start cmd /C");
-// } catch (java.io.IOException e) {}
- DockableWindow win = new QuickNotepadDockable(
- cmsg.getView(), cmsg.getPosition());
- cmsg.setDockableWindow(win);
- }
- }
- }
-*/
}
diff --git a/README.txt b/README.txt
index daa1ab2..f4fc99b 100644
--- a/README.txt
+++ b/README.txt
@@ -6,7 +6,7 @@ named 'QuickNotepad', written by John Gellene.
The plugin source is discussed in detail in the 'Writing Plugins' part
of the user's guide.
-The source code has been updated to conform the the PLugin API for version 4.0
-of jEdit. The file changes.txt outlines the changes that were made from the
+The source code has been updated to conform the the Plugin API for version 4.0
+of jEdit. The file changes40.txt outlines the changes that were made from the
version distributed with jEdit 3.2.2.
diff --git a/actions.xml b/actions.xml
index 7a9c4d5..b021a31 100644
--- a/actions.xml
+++ b/actions.xml
@@ -1,3 +1,7 @@
+<!-- Action definition file for QuickNotepad plugin -->
+<!-- $Id$
+-->
+
<!DOCTYPE ACTIONS SYSTEM "actions.dtd">
<ACTIONS>
diff --git a/build.xml b/build.xml
index 3ebfdd0..faa81c0 100644
--- a/build.xml
+++ b/build.xml
@@ -71,9 +71,20 @@
</target>
<!-- Generate docs with xsltproc tool from http://www.xmlsoft.org -->
+ <!-- NOTE: the "o" or "output" options do not appear to be working. -->
+ <!-- To customize the title of an HTML output file, set the -->
+ <!-- 'use.id.as.filename' variable in your XSL customization file -->
+ <!-- and provide the file name (without extension) as the 'id' -->
+ <!-- attribute of the element that constitutes a 'chunk' of output. For -->
+ <!-- a plugin help file, there should usually be only one chunk, so the -->
+ <!-- top-level element (<article> or <book>) should have the 'id' -->
+ <!-- attribute. -->
<target name="docs-xsltproc">
<exec executable="xsltproc">
<arg value="--catalogs"/>
+ <arg value="--nonet"/>
+ <arg value="--output"/>
+ <arg value="QuickNotepad.html"/>
<arg value="users-guide.xsl"/>
<arg value="users-guide.xml"/>
</exec>
@@ -83,7 +94,9 @@
<target name="docs-xalan">
<style
style="users-guide.xsl"
- in="users-guide.xml"/>
+ in="users-guide.xml"
+ out="QuickNotepad.html"
+ destdir="."/>
</target>
<target name="clean">
diff --git a/changes40.txt b/changes40.txt
new file mode 100644
index 0000000..856d6c0
--- /dev/null
+++ b/changes40.txt
@@ -0,0 +1,65 @@
+Changes made to QuickNotepad plugin for jEdit 4.0:
+
+(1) Under jEdit 3.2.2 and prior versions, the plugin had a separate class
+implementing the DockableWindow interface, QuickNotepadDockable. The class's
+methods delegated actions to the plugin's top-level visible component, a class
+derived from JPanel called QuickNotepad. The DockableWindow interface is
+deprecated in jEdit 4.0, so this class was eliminated. If the top-level
+component had implemented the DockableWindow interface, it would have been
+necessary to remove DockableWindow as an implemented interface and the eliminate
+the getName() and getComponent() methods of that interface in the plugin class.
+
+(2) A new file, dockables.xml, was created containing XML markup for the
+constructor of a plugin component. Under the new plugin API, this file is read
+to determine the method call or calls for construcuting a new instance of a
+dockable plugin component. The file is quite short:
+
+<?xml version="1.0"?>
+
+<!DOCTYPE DOCKABLES SYSTEM "dockables.dtd">
+
+<!-- QuickNotepad dockable windows -->
+
+<DOCKABLES> <DOCKABLE NAME="quicknotepad"> new QuickNotepad(view, position);
+ </DOCKABLE> </DOCKABLES>
+
+The parameters are those found in the existing version of the QuickNotepad
+constructor. Both "view" and "position" are defined by the new plugin API in the
+namespace in which the constructor is called. The value of position is taken
+from optional properties set by the user. In the absence of a user setting, the
+position parameter is set to place the plugin component in a floating window.
+The NAME attribute is taken to conform to the value of the static variable
+QuickNotepadPlugin.NAME, which is also used to identify the plugin in user
+action code.
+
+There is one other attribute of the <DOCKABLE> element: a NO_ACTIONS attribute
+that can take a value of either "true" or "false". It is "false" by default:
+this signifies that the plugin does in fact define user actions in a actions.xml
+file. Most plugins will therefore use the default value.
+
+(3) The action definitions contained in actions.xml were revised to call
+DockableWindowManager.getDockable() instead of
+DockableManager.getDockableWindow().
+
+(4) There were two deletions made in the main plugin class, QuickNotepadPlugin.
+The handleMessage() method was eliminated because it was only necessary for the
+plugin to listen for the CreateDockableWindow message, as a result, it is no
+longer necessary for this plugin to connect to the EditBus, so it derivation was
+changed from EBPlugin to EditPlugin. In addition, since the EditBus no longer
+maintained an active list of Windows, the call to EditBus.addToNamedList() is no
+longer needed in the class's start() method and so was elimiated, leaving an
+empty start() method.
+
+(5) No changes were required in the option pane class, QuickNotepadOptionsPane,
+or the other other classes defining components of the plugin.
+
+(6) Finally, the plugin's dependency properties were changed to make the plugin
+dependent upon version 4.0 or greater of jEdit:
+
+plugin.QuickNotepadPlugin.depend.1=jedit 04.00.00.00
+
+The plugin was built using the standard build.xml supplied for plugins,
+after checking to make sure that the name of the plugin and the location of
+jedit.jar were correct. It was also necessary to add dockables.xml to the list
+of files to be archived by the jar utility. Iterations of the build process
+helped to uncover deprecated API elements.
diff --git a/dockables.xml b/dockables.xml
new file mode 100644
index 0000000..a905d99
--- /dev/null
+++ b/dockables.xml
@@ -0,0 +1,15 @@
+<!-- Dockable component definition file for QuickNotepad plugin -->
+<!-- $Id$
+-->
+
+<?xml version="1.0"?>
+
+<!DOCTYPE DOCKABLES SYSTEM "dockables.dtd">
+
+<!-- QuickNotepad dockable windows -->
+
+<DOCKABLES>
+ <DOCKABLE NAME="quicknotepad">
+ new QuickNotepad(view, position);
+ </DOCKABLE>
+</DOCKABLES>
diff --git a/qpadhelp.xml b/qpadhelp.xml
new file mode 100644
index 0000000..ebb743a
--- /dev/null
+++ b/qpadhelp.xml
@@ -0,0 +1,232 @@
+<!-- jEdit buffer-local properties: -->
+<!-- :indentSize=1:noTabs=true:maxLineLen=72:tabSize=2: -->
+
+<!-- QuickNotepad 2.0 help documentation -->
+<!-- Contains text of documentation; -->
+<!-- DocBook header contained in QuickNotepad.xml -->
+<!-- Copyright (C) 2001 John Gellene -->
+<!-- $Id$
+-->
+
+<simplesect><title>Introduction</title>
+<indexterm><primary>QuickNotepad</primary></indexterm>
+<para>
+ This plugin provides a dockable <quote>scratch pad</quote> for writing
+ and displaying notes, to do lists or similar items as unformatted text.
+ The text is automatically saved upon closing the plugin or exiting
+ jEdit. It can also be saved manually. The user can change the file
+ to be displayed during the current editing session. The path of the default
+ notepad file can be changed as a user option. Finally, the
+ text file can be copied to a new, untitled jEdit buffer so that it can
+ be edited by the main program.
+</para>
+
+<para>
+ The <citetitle>jEdit Plugin Guide</citetitle> details the development
+ and design of QuickNotepad. It is a simple but functional dockable plugin
+ that incorporates the basic elements of the jEdit plugin architecture.
+</para>
+
+<para>
+ QuickNotepad 2.0 is designed to operate with JDK 1.2 or greater and
+ jEdit 4.0 or greater. The EditBus plugin is also required.
+</para>
+
+<para>
+ The file <filename>changes40.txt</filename> in the plugin's source
+ code details the changes that were made to the plugin to conform to
+ the new plugin API for jEdit version 4.0.
+</para>
+</simplesect>
+
+<simplesect><title>Operation</title>
+
+<para>
+<indexterm>
+ <primary>QuickNotepad</primary>
+ <secondary>shortcut keys</secondary>
+</indexterm>
+ When QuickNotepad is activated, it loads and displays the file stored in
+ its properties as unformatted text. The text can be edited using the
+ keyboard and mouse. The text area component recognizes the following
+ basic editing shortcuts:
+</para>
+<!-- Limitations on xsltproc's capabilities require a blank column between -->
+<!-- the two columns of data to provide spacing for the table. -->
+<informaltable align="center" frame="none">
+ <tgroup cols="4" align="left">
+ <colspec colnum="1"/> <!-- blank column -->
+ <colspec colnum="2"/>
+ <colspec colnum="3"/> <!-- blank column -->
+ <colspec colnum="4"/>
+ <tbody>
+ <row>
+ <entry> </entry>
+ <entry>Cut</entry>
+ <entry> </entry>
+ <entry><keycombo action="simul"><keysym>Ctrl</keysym><keysym>x</keysym></keycombo></entry>
+ </row>
+ <row>
+ <entry> </entry>
+ <entry>Copy</entry>
+ <entry> </entry>
+ <entry><keycombo action="simul"><keysym>Ctrl</keysym><keysym>c</keysym></keycombo></entry>
+ </row>
+ <row>
+ <entry> </entry>
+ <entry>Paste</entry>
+ <entry> </entry>
+ <entry><keycombo action="simul"><keysym>Ctrl</keysym><keysym>v</keysym></keycombo></entry>
+ </row>
+ <row>
+ <entry> </entry>
+ <entry>Select All</entry>
+ <entry> </entry>
+ <entry><keycombo action="simul"><keysym>Ctrl</keysym><keysym>a</keysym></keycombo></entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+ QuickNotepad ignores function keys and other combination key presses.
+</para>
+
+</simplesect>
+
+<simplesect><title>Toolbar buttons</title>
+
+<para>
+ Three buttons above the text area provide file management operations:
+</para>
+
+<itemizedlist>
+ <listitem>
+ <para>
+ <guilabel>Choose notepad file</guilabel> - this button opens a file selection
+ dialog permitting the user to select a different file to view in the
+ text area. If a new file is selected, the old file is
+ auomatically saved. The selection is valid only for the current
+ editing session; to change the default QuickNotepad file for future
+ sessions, use the <link linkend="options">options dialog</link>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <guilabel>Save notepad file</guilabel> - this button causes QuickNotepad to
+ write the contents of the text area to the designated notepad file. To
+ save the text to another file name, use the <guilabel>Copy notepad to
+ buffer</guilabel> operation.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <guilabel>Copy notepad to buffer</guilabel> - this button causes the
+ contents of the text to be written to a newly created,
+ untitled buffer in the main text editing area. This operation
+ does not alter the QuickNotepad text area or write its text to
+ storage. Further changes to either the QuickNotepad text area or
+ the new buffer will not affect the other.
+ </para>
+ </listitem>
+</itemizedlist>
+
+<para>
+ These operations are listed in the menu which appears for
+ QuickNotepad under the <guimenu>Plugins</guimenu> heading. They can
+ also be made the subject of keyboard shortcuts in the
+ <guilabel>Plugin Shortcuts</guilabel> pane of jEdit's options dialog.
+</para>
+
+<para>
+ One other operation is available as a keyboard shortcut. <guilabel>Bring
+ QuickNotepad to front</guilabel> activates the plugin and makes visible
+ if it is currently hidden in a docking window.
+</para>
+
+</simplesect>
+
+<simplesect id="options"><title>Options</title>
+<indexterm>
+ <primary>QuickNotepad</primary>
+ <secondary>options</secondary>
+</indexterm>
+
+<para>
+ There are three options which can be set
+ using the pane for QuickNotepad in the <guilabel>Plugin
+ Shortcuts</guilabel> section of the general options dialog:
+</para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ A checkbox governs whether the name of the notepad file will be
+ displayed in the toolbar panel above the text area. Even if the file
+ name display is enabled, if the plugin is displayed to the left or right
+ of the main editing area, the notepad file name will likely be partially
+ or completely hidden.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ A text field and adjacent button allow the user to choose the path of
+ the default notepad file by typing its name or opening a file chooser
+ dialog. This file will be loaded (and the old file saved) once the
+ plugin's options settings are committed.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ A third button shows the name, size and style of the font used by the
+ QuickNotepad text area. Pressing the button summons a font chooser
+ dialog for making a new selection. The text area will be
+ redrawn with the new font once the change is committed.
+ </para>
+ </listitem>
+ </itemizedlist>
+
+</simplesect>
+
+<simplesect><title>Legal notices</title>
+
+<para>
+ The toolbar button icons are taken from the Sun Java Look and Feel
+ icon collection. The license for these items may be found
+ in the <filename>ICONS.LICENSE.txt</filename> file in the jEdit
+ distribution.
+</para>
+
+<para>
+ The QuickNotepad plugin is released under the GNU General Public License
+ (either version 2 or any later version, at the user's option). A copy
+ of the GPL is available in the <filename>COPYING.txt</filename> file
+ in the jEdit distribution.
+</para>
+
+<para>
+ The QuickNotepad plugin comes with ABSOLUTELY NO WARRANTY OF ANY KIND;
+ see section 11 and 12 of the GPL for details.
+</para>
+
+<para>
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.1 or
+ any later version published by the Free Software Foundation; with no
+ <quote>Invariant Sections</quote>, <quote>Front-Cover Texts</quote> or
+ <quote>Back-Cover Texts</quote>, each as defined in the license. A copy
+ of the license is included in the file
+ <filename>COPYING.DOC.txt</filename> included with the jEdit distribution.
+</para>
+
+</simplesect>
+
+<simplesect><title>Feedback</title>
+
+<para>
+ Comments, bug reports and other feedback may be sent to the
+ <ulink url="mailto:jgellene@...> or the
+ jEdit-users mailing list.
+</para>
+
+</simplesect>
+
diff --git a/users-guide.xml b/users-guide.xml
new file mode 100644
index 0000000..e635dde
--- /dev/null
+++ b/users-guide.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" standalone="no" ?>
+
+<!-- jEdit buffer-local properties: -->
+<!-- :indentSize=1:noTabs=true:maxLineLen=72:tabSize=2: -->
+
+<!-- QuickNotepad 1.0 help documentation -->
+<!-- Copyright (C) 2001 John Gellene -->
+
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
+
+<!ENTITY qpadhelp SYSTEM "qpadhelp.xml">
+
+]>
+
+<article id="QuickNotepad">
+ <articleinfo>
+ <author>
+ <firstname>John</firstname><surname>Gellene</surname>
+ <affiliation><address><email>jgellene@...>
+ </author>
+ <copyright><year>2001</year><holder>John Gellene</holder></copyright>
+ <legalnotice><title>Legal Notice</title>
+ <para>
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.1 or
+ any later version published by the Free Software Foundation; with no
+ <quote>Invariant Sections</quote>, <quote>Front-Cover Texts</quote> or
+ <quote>Back-Cover Texts</quote>, each as defined in the license. A copy of
+ the license is included in the file <filename>COPYING.DOC.txt</filename>
+ included with the jEdit distribution.
+ </para>
+ </legalnotice>
+ <title>QuickNotepad 2.0</title>
+ <revhistory>
+ <revision>
+ <revnumber>1.0</revnumber>
+ <date>June 28, 2001</date>
+ </revision>
+ <revision>
+ <revnumber>2.0</revnumber>
+ <date>November 9, 2001</date>
+ </revision>
+ </revhistory>
+ </articleinfo>
+
+&qpadhelp;
+
+</article>
+
diff --git a/users-guide.xsl b/users-guide.xsl
new file mode 100644
index 0000000..2c95367
--- /dev/null
+++ b/users-guide.xsl
@@ -0,0 +1,283 @@
+<?xml version='1.0'?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version='1.0'
+ xmlns="http://www.w3.org/TR/xhtml1/transitional"
+ exclude-result-prefixes="#default">
+
+<!-- NOTE: the following element must point to the location of onechunk.xsl -->
+<!-- (for a single html page) or chunk.xsl (for multiple pages) in your -->
+<!-- installation of the DocBook XSL stylesheets. -->
+<xsl:import href="I:/sgml/docbook-xsl-1.45/html/onechunk.xsl"/>
+
+<xsl:param name="use.id.as.filename" select="'1'" doc:type="boolean"/>
+
+<!-- Change these variables to '1' when using xalan -->
+<xsl:param name="use.extensions" select="'0'" doc:type="boolean"/>
+<xsl:param name="tablecolumns.extension" select="'0'" doc:type="boolean"/>
+
+<xsl:template match="guibutton">
+ <xsl:call-template name="inline.sansserifseq"/>
+</xsl:template>
+
+<xsl:template match="guiicon">
+ <xsl:call-template name="inline.sansserifseq"/>
+</xsl:template>
+
+<xsl:template match="guilabel">
+ <xsl:call-template name="inline.sansserifseq"/>
+</xsl:template>
+
+<xsl:template match="guimenu">
+ <xsl:call-template name="inline.sansserifseq"/>
+</xsl:template>
+
+<xsl:template match="guimenuitem">
+ <xsl:call-template name="inline.sansserifseq"/>
+</xsl:template>
+
+<xsl:template match="guisubmenu">
+ <xsl:call-template name="inline.sansserifseq"/>
+</xsl:template>
+
+<xsl:template match="keycap">
+ <xsl:call-template name="inline.sansserifseq"/>
+</xsl:template>
+
+<xsl:template match="keypress">
+ <xsl:call-template name="inline.sansserifseq"/>
+</xsl:template>
+
+<xsl:template name="inline.sansserifseq">
+ <xsl:param name="content">
+ <xsl:call-template name="anchor"/>
+ <xsl:apply-templates/>
+ </xsl:param>
+ <font face="Arial,Helvetica" size="-1">
+ <strong><xsl:copy-of select="$content"/></strong>
+ </font>
+</xsl:template>
+
+<xsl:template match="keycombo">
+ <xsl:variable name="action" select="@action"/>
+ <xsl:variable name="joinchar">
+ <xsl:choose>
+ <xsl:when test="$action='seq'"><xsl:text> </xsl:text></xsl:when>
+ <xsl:when test="$action='simul'">+</xsl:when>
+ <xsl:when test="$action='press'">-</xsl:when>
+ <xsl:when test="$action='click'">-</xsl:when>
+ <xsl:when test="$action='double-click'">-</xsl:when>
+ <xsl:when test="$action='other'"></xsl:when>
+ <xsl:otherwise>-</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:for-each select="./*">
+ <xsl:if test="position()>1"><xsl:value-of select="$joinchar"/></xsl:if>
+ <xsl:call-template name="inline.sansserifseq"/>
+ </xsl:for-each>
+</xsl:template>
+
+<xsl:variable name="shade.verbatim">1</xsl:variable>
+
+<xsl:variable name="funcsynopsis.style">ansi</xsl:variable>
+<xsl:template match="void"><xsl:apply-templates/></xsl:template>
+
+<xsl:variable name="toc.list.type">ul</xsl:variable>
+
+<xsl:param name="local.l10n.xml" select="document('')"/>
+
+<!-- Swing HTML control doesn't support “ and ” -->
+
+<i18n xmlns="http://docbook.sourceforge.net/xmlns/l10n/1.0">
+<l10n language="en">
+<dingbat key="startquote" text="""/>
+<dingbat key="endquote" text="""/>
+<dingbat key="nestedstartquote" text="'"/>
+<dingbat key="nestedendquote" text="'"/>
+</l10n>
+</i18n>
+
+<xsl:template match="/">
+ <xsl:call-template name="toc"/>
+ <xsl:call-template name="index"/>
+</xsl:template>
+
+<xsl:template name="header.navigation">
+</xsl:template>
+
+<xsl:template name="footer.navigation">
+</xsl:template>
+
+<xsl:template name="toc">
+ <xsl:apply-templates/>
+ <xsl:call-template name="write.chunk">
+ <xsl:with-param name="filename" select="'toc.xml'"/>
+ <xsl:with-param name="method" select="'xml'"/>
+ <xsl:with-param name="indent" select="'yes'"/>
+ <xsl:with-param name="content">
+ <xsl:call-template name="toc.content"/>
+ </xsl:with-param>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="toc.content">
+ <TOC>
+ <xsl:apply-templates select="." mode="my.toc"/>
+ </TOC>
+</xsl:template>
+
+<xsl:template match="set" mode="my.toc">
+ <ENTRY>
+ <xsl:attribute name="href">
+ <xsl:apply-templates mode="chunk-filename" select="."/>
+ </xsl:attribute>
+ <TITLE>
+ <xsl:apply-templates mode="title.markup" select="."/>
+ </TITLE>
+ <xsl:apply-templates select="book" mode="my.toc"/>
+ </ENTRY>
+</xsl:template>
+
+<xsl:template match="book" mode="my.toc">
+ <ENTRY>
+ <xsl:attribute name="href">
+ <xsl:apply-templates mode="chunk-filename" select="."/>
+ </xsl:attribute>
+ <TITLE>
+ <xsl:apply-templates mode="title.markup" select="."/>
+ </TITLE>
+ <xsl:apply-templates select="part|reference|preface|chapter|appendix|article|colophon"
+ mode="my.toc"/>
+ </ENTRY>
+</xsl:template>
+
+<xsl:template match="part|reference|preface|chapter|appendix|article"
+ mode="my.toc">
+ <ENTRY>
+ <xsl:attribute name="HREF">
+ <xsl:apply-templates mode="chunk-filename" select="."/>
+ </xsl:attribute>
+ <TITLE>
+ <xsl:apply-templates mode="title.markup" select="."/>
+ </TITLE>
+ <xsl:apply-templates
+ select="preface|chapter|appendix|refentry|section|sect1"
+ mode="my.toc"/>
+ </ENTRY>
+</xsl:template>
+
+<xsl:template match="section" mode="my.toc">
+ <ENTRY>
+ <xsl:attribute name="href">
+ <xsl:apply-templates mode="chunk-filename" select="."/>
+ </xsl:attribute>
+ <TITLE>
+ <xsl:apply-templates mode="title.markup" select="."/>
+ </TITLE>
+ <xsl:apply-templates select="section" mode="my.toc"/>
+ </ENTRY>
+</xsl:template>
+
+<xsl:template match="sect1" mode="my.toc">
+ <ENTRY>
+ <xsl:attribute name="HREF">
+ <xsl:apply-templates mode="chunk-filename" select="."/>
+ </xsl:attribute>
+ <TITLE>
+ <xsl:apply-templates mode="title.markup" select="."/>
+ </TITLE>
+ <xsl:apply-templates select="sect2" mode="my.toc"/>
+ </ENTRY>
+</xsl:template>
+
+<xsl:template match="sect2" mode="my.toc">
+ <ENTRY>
+ <xsl:attribute name="HREF">
+ <xsl:apply-templates mode="chunk-filename" select="."/>
+ </xsl:attribute>
+ <TITLE>
+ <xsl:apply-templates mode="title.markup" select="."/>
+ </TITLE>
+ <xsl:apply-templates select="sect3" mode="my.toc"/>
+ </ENTRY>
+</xsl:template>
+
+<xsl:template match="sect3" mode="my.toc">
+ <ENTRY>
+ <xsl:attribute name="HREF">
+ <xsl:apply-templates mode="chunk-filename" select="."/>
+ </xsl:attribute>
+ <TITLE>
+ <xsl:apply-templates mode="title.markup" select="."/>
+ </TITLE>
+ <xsl:apply-templates select="sect4" mode="my.toc"/>
+ </ENTRY>
+</xsl:template>
+
+<xsl:template match="sect4" mode="my.toc">
+ <ENTRY>
+ <xsl:attribute name="HREF">
+ <xsl:apply-templates mode="chunk-filename" select="."/>
+ </xsl:attribute>
+ <TITLE>
+ <xsl:apply-templates mode="title.markup" select="."/>
+ </TITLE>
+ <xsl:apply-templates select="sect5" mode="my.toc"/>
+ </ENTRY>
+</xsl:template>
+
+<xsl:template match="sect5|colophon" mode="my.toc">
+ <ENTRY>
+ <xsl:attribute name="HREF">
+ <xsl:apply-templates mode="chunk-filename" select="."/>
+ </xsl:attribute>
+ <TITLE>
+ <xsl:apply-templates mode="title.markup" select="."/>
+ </TITLE>
+ </ENTRY>
+</xsl:template>
+
+<xsl:template name="index">
+ <xsl:call-template name="write.chunk">
+ <xsl:with-param name="filename" select="'word-index.xml'"/>
+ <xsl:with-param name="method" select="'xml'"/>
+ <xsl:with-param name="indent" select="'yes'"/>
+ <xsl:with-param name="content">
+ <xsl:call-template name="index.content"/>
+ </xsl:with-param>
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="index.content">
+ <INDEX>
+ <xsl:apply-templates select="//indexterm" mode="index"/>
+ </INDEX>
+</xsl:template>
+
+<xsl:template match="indexterm" mode="index">
+ <xsl:variable name="text">
+ <xsl:value-of select="primary"/>
+ <xsl:if test="secondary">
+ <xsl:text>, </xsl:text>
+ <xsl:value-of select="secondary"/>
+ </xsl:if>
+ <xsl:if test="tertiary">
+ <xsl:text>, </xsl:text>
+ <xsl:value-of select="tertiary"/>
+ </xsl:if>
+ </xsl:variable>
+
+ <xsl:choose>
+ <xsl:when test="see">
+ <xsl:variable name="see"><xsl:value-of select="see"/></xsl:variable>
+ <INDEXTERM TEXT="{$text} see '{$see}'"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <INDEXTERM TEXT="{$text}">
+ <xsl:apply-templates mode="chunk-filename" select="."/>
+ </INDEXTERM>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=8e6fee43c48ee194010f54fccbdca5cb47d3e80b
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=8e6fee43c48ee194010f54fccbdca5cb47d3e80b
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=8e6fee43c48ee194010f54fccbdca5cb47d3e80b;hb=8e6fee43c48ee194010f54fccbdca5cb47d3e80b
commit 8e6fee43c48ee194010f54fccbdca5cb47d3e80b
Author: John Gellene <jgellene@...>
Date: Sat Nov 10 11:25:47 2001 +0000
Updated for jEdit 4.0 API
diff --git a/QuickNotepad.html b/QuickNotepad.html
deleted file mode 100644
index d90a400..0000000
--- a/QuickNotepad.html
+++ /dev/null
@@ -1,531 +0,0 @@
-<HTML
-><HEAD
-><TITLE
->QuickNotepad</TITLE
-><META
-NAME="GENERATOR"
-CONTENT="Modular DocBook HTML Stylesheet Version 1.64
-"></HEAD
-><BODY
-CLASS="article"
-BGCOLOR="#FFFFFF"
-><DIV
-CLASS="ARTICLE"
-><DIV
-CLASS="TITLEPAGE"
-><H1
-CLASS="title"
-><A
-NAME="AEN2"
->QuickNotepad</A
-></H1
-><H3
-CLASS="author"
-><A
-NAME="AEN3"
->John Gellene</A
-></H3
-><DIV
-CLASS="affiliation"
-><DIV
-CLASS="address"
-><P
-CLASS="address"
->jgellene@...
-></DIV
-></DIV
-><P
-CLASS="copyright"
->Copyright © 2001 by John Gellene</P
-><DIV
-CLASS="revhistory"
-><TABLE
-WIDTH="100%"
-BORDER="0"
-><TR
-><TH
-ALIGN="LEFT"
-VALIGN="TOP"
-COLSPAN="3"
-><B
->Revision History</B
-></TH
-></TR
-><TR
-><TD
-ALIGN="LEFT"
->Revision 1.0</TD
-><TD
-ALIGN="LEFT"
->June 28, 2001</TD
-><TD
-ALIGN="LEFT"
-></TD
-></TR
-><TR
-><TD
-ALIGN="LEFT"
-COLSPAN="3"
-></TD
-></TR
-></TABLE
-></DIV
-><HR></DIV
-><DIV
-CLASS="TOC"
-><DL
-><DT
-><B
->Table of Contents</B
-></DT
-><DT
-><A
-HREF="QuickNotepad.html#AEN24"
->Introduction</A
-></DT
-><DT
-><A
-HREF="QuickNotepad.html#AEN31"
->Operation</A
-></DT
-><DT
-><A
-HREF="QuickNotepad.html#AEN69"
->Toolbar buttons</A
-></DT
-><DT
-><A
-HREF="QuickNotepad.html#options"
->Options</A
-></DT
-><DT
-><A
-HREF="QuickNotepad.html#AEN101"
->Legal notices</A
-></DT
-><DT
-><A
-HREF="QuickNotepad.html#AEN113"
->Feedback</A
-></DT
-></DL
-></DIV
-><DIV
-CLASS="simplesect"
-><HR><H2
-CLASS="simplesect"
-><A
-NAME="AEN24"
->Introduction</A
-></H2
-><P
-> This plugin provides a dockable <SPAN
-CLASS="QUOTE"
->"scratch pad"</SPAN
-> for writing
- and displaying notes, to do lists or similar items as unformatted text.
- The text is automatically saved upon closing the plugin or exiting
- jEdit. It can also be saved manually. The user can change the file
- to be displayed during the current editing session. The path of the default
- notepad file can be changed as a user option. Finally, the
- text file can be copied to a new, untitled jEdit buffer so that it can
- be edited by the main program.
-</P
-><P
-> The <I
-CLASS="citetitle"
->jEdit Plugin Guide</I
-> details the development
- and design of QuickNotepad. It is a simple but functional dockable plugin
- that incorporates the basic elements of the jEdit plugin architecture.
-</P
-><P
-> QuickNotepad is designed to operate with JDK 1.2 or greater and
- jEdit3.1 or greater. The EditBus plugin is also required.
-</P
-></DIV
-><DIV
-CLASS="simplesect"
-><HR><H2
-CLASS="simplesect"
-><A
-NAME="AEN31"
->Operation</A
-></H2
-><P
-> When QuickNotepad is activated, it loads and displays the file stored in
- its properties as unformatted text. The text can be edited using the
- keyboard and mouse. The text area component recognizes the following
- basic editing shortcuts:
-</P
-><DIV
-CLASS="informaltable"
-><A
-NAME="AEN34"
-></A
-><TABLE
-BORDER="0"
-CLASS="CALSTABLE"
-><TBODY
-><TR
-><TD
-WIDTH="80"
-ALIGN="LEFT"
-VALIGN="MIDDLE"
-> </TD
-><TD
-WIDTH="120"
-ALIGN="LEFT"
-VALIGN="MIDDLE"
->Cut</TD
-><TD
-WIDTH="120"
-ALIGN="LEFT"
-VALIGN="MIDDLE"
-><FONT
-CLASS="keysym"
-FACE="ARIAL"
-SIZE="-1"
-><B
->Ctrl</B
-></FONT
->-<FONT
-CLASS="keysym"
-FACE="ARIAL"
-SIZE="-1"
-><B
->x</B
-></FONT
-></TD
-></TR
-><TR
-><TD
-WIDTH="80"
-ALIGN="LEFT"
-VALIGN="MIDDLE"
-> </TD
-><TD
-WIDTH="120"
-ALIGN="LEFT"
-VALIGN="MIDDLE"
->Copy</TD
-><TD
-WIDTH="120"
-ALIGN="LEFT"
-VALIGN="MIDDLE"
-><FONT
-CLASS="keysym"
-FACE="ARIAL"
-SIZE="-1"
-><B
->Ctrl</B
-></FONT
->-<FONT
-CLASS="keysym"
-FACE="ARIAL"
-SIZE="-1"
-><B
->c</B
-></FONT
-></TD
-></TR
-><TR
-><TD
-WIDTH="80"
-ALIGN="LEFT"
-VALIGN="MIDDLE"
-> </TD
-><TD
-WIDTH="120"
-ALIGN="LEFT"
-VALIGN="MIDDLE"
->Paste</TD
-><TD
-WIDTH="120"
-ALIGN="LEFT"
-VALIGN="MIDDLE"
-><FONT
-CLASS="keysym"
-FACE="ARIAL"
-SIZE="-1"
-><B
->Ctrl</B
-></FONT
->-<FONT
-CLASS="keysym"
-FACE="ARIAL"
-SIZE="-1"
-><B
->v</B
-></FONT
-></TD
-></TR
-><TR
-><TD
-WIDTH="80"
-ALIGN="LEFT"
-VALIGN="MIDDLE"
-> </TD
-><TD
-WIDTH="120"
-ALIGN="LEFT"
-VALIGN="MIDDLE"
->Select All</TD
-><TD
-WIDTH="120"
-ALIGN="LEFT"
-VALIGN="MIDDLE"
-><FONT
-CLASS="keysym"
-FACE="ARIAL"
-SIZE="-1"
-><B
->Ctrl</B
-></FONT
->-<FONT
-CLASS="keysym"
-FACE="ARIAL"
-SIZE="-1"
-><B
->a</B
-></FONT
-></TD
-></TR
-></TBODY
-></TABLE
-></DIV
-><P
-> QuickNotepad ignores function keys and other combination key presses.
- They are hamdled by the main application.and are handled by jEdit.
-</P
-></DIV
-><DIV
-CLASS="simplesect"
-><HR><H2
-CLASS="simplesect"
-><A
-NAME="AEN69"
->Toolbar buttons</A
-></H2
-><P
-> Three buttons above the text area provide file management operations:
-</P
-><UL
-><LI
-><P
-> <FONT
-CLASS="guilabel"
-FACE="ARIAL"
-SIZE="-1"
-><B
->Choose notepad file</B
-></FONT
-> - this button opens a file selection
- dialog permitting the user to select a different file to view in the
- text area. If a new file is selected, the old file is
- auomatically saved. The selection is valid only for the current
- editing session; to change the default QuickNotepad file for future
- sessions, use the <A
-HREF="QuickNotepad.html#option-dialog"
->options dialog</A
->.
- </P
-></LI
-><LI
-><P
-> <FONT
-CLASS="guilabel"
-FACE="ARIAL"
-SIZE="-1"
-><B
->Save notepad file</B
-></FONT
-> - this button causes QuickNotepad to
- write the contents of the text area to the designated notepad file. To
- save the text to another file name, use the <FONT
-CLASS="guilabel"
-FACE="ARIAL"
-SIZE="-1"
-><B
->Copy notepad to
- buffer</B
-></FONT
-> operation.
- </P
-></LI
-><LI
-><P
-> <FONT
-CLASS="guilabel"
-FACE="ARIAL"
-SIZE="-1"
-><B
->Copy notepad to buffer</B
-></FONT
-> - this button causes the
- contents of the text to be written to a newly created,
- untitled buffer in the main text editing area. This operation
- does not alter the QuickNotepad text area or write its text to
- storage. Further changes to either the QuickNotepad text area or
- the new buffer will not affect the other.
- </P
-></LI
-></UL
-><P
-> These operations are listed in the menu which appears for
- QuickNotepad under the <FONT
-CLASS="guimenu"
-FACE="ARIAL"
-SIZE="-1"
-><B
->Plugins</B
-></FONT
-> heading. They can
- also be made the subject of keyboard shortcuts in the
- <FONT
-CLASS="guilabel"
-FACE="ARIAL"
-SIZE="-1"
-><B
->Plugin Shortcuts</B
-></FONT
-> pane of jEdit's options dialog.
-</P
-><P
-> One other operation is available as a keyboard shortcut. <FONT
-CLASS="guilabel"
-FACE="ARIAL"
-SIZE="-1"
-><B
->Bring
- QuickNotepad to front</B
-></FONT
-> activates the plugin and makes visible
- if it is currently hidden in a docking window.
-</P
-></DIV
-><DIV
-CLASS="simplesect"
-><HR><H2
-CLASS="simplesect"
-><A
-NAME="options"
->Options</A
-></H2
-><P
-> <A
-NAME="option-dialog"
-></A
->There are three options which can be set
- using the pane for QuickNotepad in the <FONT
-CLASS="guilabel"
-FACE="ARIAL"
-SIZE="-1"
-><B
->Plugin
- Shortcuts</B
-></FONT
-> section of the general options dialog:
-</P
-><UL
-><LI
-><P
-> A checkbox governs whether the name of the notepad file will be
- displayed in the toolbar panel above the text area. Even if the file
- name display is enabled, if the plugin is displayed to the left or right
- of the main editing area, the notepad file name will likely be partially
- or completely hidden.
- </P
-></LI
-><LI
-><P
-> A text field and adjacent button allow the user to choose the path of
- the default notepad file by typing its name or opening a file chooser
- dialog. This file will be loaded (and the old file saved) once the
- plugin's options settings are committed.
- </P
-></LI
-><LI
-><P
-> A third button shows the name, size and style of the font used by the
- QuickNotepad text area. Pressing the button summons a font chooser
- dialog for making a new selection. The text area will be
- redrawn with the new font once the change is committed.
- </P
-></LI
-></UL
-></DIV
-><DIV
-CLASS="simplesect"
-><HR><H2
-CLASS="simplesect"
-><A
-NAME="AEN101"
->Legal notices</A
-></H2
-><P
-> The toolbar button icons are taken from the Sun Java Look and Feel
- icon collection. The license for these items may be found
- in the <TT
-CLASS="filename"
->ICONS.LICENSE.txt</TT
-> file in the jEdit
- distribution.
-</P
-><P
-> The QuickNotepad plugin is released under the GNU General Public License
- (either version 2 or any later version, at the user's option). A copy
- of the GPL is available in the <TT
-CLASS="filename"
->COPYING.txt</TT
-> file
- in the jEdit distribution.
-</P
-><P
-> The QuickNotepad plugin comes with ABSOLUTELY NO WARRANTY OF ANY KIND;
- see section 11 and 12 of the GPL for details.
-</P
-><P
-> Permission is granted to copy, distribute and/or modify this document
- under the terms of the GNU Free Documentation License, Version 1.1 or
- any later version published by the Free Software Foundation; with no
- <SPAN
-CLASS="QUOTE"
->"Invariant Sections"</SPAN
->, <SPAN
-CLASS="QUOTE"
->"Front-Cover Texts"</SPAN
-> or
- <SPAN
-CLASS="QUOTE"
->"Back-Cover Texts"</SPAN
->, each as defined in the license. A copy
- of the license is included in the file
- <TT
-CLASS="filename"
->COPYING.DOC.txt</TT
-> included with the jEdit distribution.
-</P
-></DIV
-><DIV
-CLASS="simplesect"
-><HR><H2
-CLASS="simplesect"
-><A
-NAME="AEN113"
->Feedback</A
-></H2
-><P
-> Comments, bug reports and other feedback may be sent to the
- <A
-HREF="mailto:jgellene@..."
-TARGET="_top"
->author</A
-> or the
- jEdit-users mailing list.
-</P
-></DIV
-></DIV
-></BODY
-></HTML
->
\ No newline at end of file
diff --git a/QuickNotepad.props b/QuickNotepad.props
index 6232f82..95280e2 100644
--- a/QuickNotepad.props
+++ b/QuickNotepad.props
@@ -1,10 +1,10 @@
# general plugin information
plugin.QuickNotepadPlugin.name=QuickNotepad
plugin.QuickNotepadPlugin.author=John Gellene
-plugin.QuickNotepadPlugin.version=1.0
+plugin.QuickNotepadPlugin.version=2.0
plugin.QuickNotepadPlugin.docs=QuickNotepad.html
-plugin.QuickNotepadPlugin.depend.0=jdk 1.1
-plugin.QuickNotepadPlugin.depend.1=jedit 03.01.99.00
+plugin.QuickNotepadPlugin.depend.0=jdk 1.2
+plugin.QuickNotepadPlugin.depend.1=jedit 04.00.00.00
plugin.QuickNotepadPlugin.depend.2=plugin EditBusPlugin 1.0
# dockable window name
diff --git a/QuickNotepadPlugin.java b/QuickNotepadPlugin.java
index 600af23..fcbd9be 100644
--- a/QuickNotepadPlugin.java
+++ b/QuickNotepadPlugin.java
@@ -35,7 +35,7 @@ import org.gjt.sp.jedit.gui.*;
*
* @author John Gellene
*/
-public class QuickNotepadPlugin extends EBPlugin
+public class QuickNotepadPlugin extends EditPlugin
{
public static final String NAME = "quicknotepad";
public static final String MENU = "quicknotepad.menu";
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=d6405cea3be3f08e4da38557da89fdb4f14fce5e
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=d6405cea3be3f08e4da38557da89fdb4f14fce5e
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=d6405cea3be3f08e4da38557da89fdb4f14fce5e;hb=d6405cea3be3f08e4da38557da89fdb4f14fce5e
commit d6405cea3be3f08e4da38557da89fdb4f14fce5e
Author: John Gellene <jgellene@...>
Date: Fri Nov 9 20:27:55 2001 +0000
Updated for jEdit 4.0 API
diff --git a/QuickNotepad.java b/QuickNotepad.java
index fa0ef5f..409dcff 100644
--- a/QuickNotepad.java
+++ b/QuickNotepad.java
@@ -35,7 +35,7 @@ import javax.swing.event.*;
import org.gjt.sp.jedit.*;
import org.gjt.sp.jedit.gui.*;
import org.gjt.sp.jedit.io.*;
-import org.gjt.sp.jedit.msg.CreateDockableWindow;
+//import org.gjt.sp.jedit.msg.CreateDockableWindow;
import org.gjt.sp.jedit.msg.PropertiesChanged;
import org.gjt.sp.jedit.msg.ViewUpdate;
import org.gjt.sp.util.Log;
diff --git a/QuickNotepad.props b/QuickNotepad.props
index 4642056..6232f82 100644
--- a/QuickNotepad.props
+++ b/QuickNotepad.props
@@ -1,47 +1,49 @@
-# general plugin information
-plugin.QuickNotepadPlugin.name=QuickNotepad
-plugin.QuickNotepadPlugin.author=John Gellene
-plugin.QuickNotepadPlugin.version=1.0
-plugin.QuickNotepadPlugin.docs=QuickNotepad.html
-plugin.QuickNotepadPlugin.depend.0=jdk 1.1
-plugin.QuickNotepadPlugin.depend.1=jedit 03.01.99.00
-plugin.QuickNotepadPlugin.depend.2=plugin EditBusPlugin 1.0
-
-# dockable window name
-quicknotepad.title=QuickNotepad
-
-# action labels
-quicknotepad.toggle.label=QuickNotepad
-quicknotepad-to-front.label=Bring QuickNotepad to front
-quicknotepad.choose-file.label=Choose notepad file
-quicknotepad.save-file.label=Save notepad file
-quicknotepad.copy-to-buffer.label=Copy notepad to buffer
-
-# application menu items
-quicknotepad.menu.label=QuickNotepad
-quicknotepad.menu=quicknotepad.toggle - quicknotepad.choose-file \
- quicknotepad.save-file quicknotepad.copy-to-buffer
-
-# plugin toolbar buttons
-quicknotepad.choose-file.icon=Open.gif
-quicknotepad.save-file.icon=Save.gif
-quicknotepad.copy-to-buffer.icon=Edit.gif
-
-# Option pane labels
-options.quicknotepad.label=QuickNotepad
-options.quicknotepad.file=File:
-options.quicknotepad.choose-file=Choose
-options.quicknotepad.choose-file.title=Choose a notepad file
-options.quicknotepad.choose-font=Font:
-options.quicknotepad.show-filepath.title=Display notepad file path
-
-# Initial default settings
-options.quicknotepad.show-filepath=true
-options.quicknotepad.font=Monospaced
-options.quicknotepad.fontstyle=0
-options.quicknotepad.fontsize=14
-
-# Setting not defined but supplied for completeness
-options.quicknotepad.filepath=
-
-
+# general plugin information
+plugin.QuickNotepadPlugin.name=QuickNotepad
+plugin.QuickNotepadPlugin.author=John Gellene
+plugin.QuickNotepadPlugin.version=1.0
+plugin.QuickNotepadPlugin.docs=QuickNotepad.html
+plugin.QuickNotepadPlugin.depend.0=jdk 1.1
+plugin.QuickNotepadPlugin.depend.1=jedit 03.01.99.00
+plugin.QuickNotepadPlugin.depend.2=plugin EditBusPlugin 1.0
+
+# dockable window name
+quicknotepad.title=QuickNotepad
+
+# action labels
+quicknotepad.toggle.label=QuickNotepad
+quicknotepad-to-front.label=Bring QuickNotepad to front
+quicknotepad.choose-file.label=Choose notepad file
+quicknotepad.save-file.label=Save notepad file
+quicknotepad.copy-to-buffer.label=Copy notepad to buffer
+
+# application menu items
+quicknotepad.menu.label=QuickNotepad
+quicknotepad.menu=quicknotepad.toggle - quicknotepad.choose-file \
+ quicknotepad.save-file quicknotepad.copy-to-buffer
+
+# plugin toolbar buttons
+quicknotepad.choose-file.icon=Open.gif
+quicknotepad.save-file.icon=Save.gif
+quicknotepad.copy-to-buffer.icon=Edit.gif
+
+# Option pane labels
+options.quicknotepad.label=QuickNotepad
+options.quicknotepad.file=File:
+options.quicknotepad.choose-file=Choose
+options.quicknotepad.choose-file.title=Choose a notepad file
+options.quicknotepad.choose-font=Font:
+options.quicknotepad.show-filepath.title=Display notepad file path
+
+# Initial default settings
+options.quicknotepad.show-filepath=true
+options.quicknotepad.font=Monospaced
+options.quicknotepad.fontstyle=0
+options.quicknotepad.fontsize=14
+
+# Setting not defined but supplied for completeness
+options.quicknotepad.filepath=
+
+
+
+
diff --git a/QuickNotepadActions.java b/QuickNotepadActions.java
index bdfac4d..241d933 100644
--- a/QuickNotepadActions.java
+++ b/QuickNotepadActions.java
@@ -1,30 +1,32 @@
-/*
- * QuickNotepadActions.java
- * part of the QuickNotepad plugin for the jEdit text editor
- * Copyright (C) 2001 John Gellene
- * jgellene@...
- *
- * 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.
- *
- * $Id$
- */
-
-interface QuickNotepadActions
-{
- void chooseFile();
- void saveFile();
- void copyToBuffer();
-}
-
+/*
+ * QuickNotepadActions.java
+ * part of the QuickNotepad plugin for the jEdit text editor
+ * Copyright (C) 2001 John Gellene
+ * jgellene@...
+ *
+ * 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.
+ *
+ * $Id$
+ */
+
+interface QuickNotepadActions
+{
+ void chooseFile();
+ void saveFile();
+ void copyToBuffer();
+}
+
+
+
diff --git a/QuickNotepadDockable.java b/QuickNotepadDockable.java
deleted file mode 100644
index 22676b3..0000000
--- a/QuickNotepadDockable.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * QuickNotepadDockable.java
- * part of the QuickNotepad plugin for the jEdit text editor
- * Copyright (C) 2001 John Gellene
- * jgellene@...
- *
- * 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.
- *
- * $Id$
- */
-
-import java.awt.Component;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.jedit.gui.*;
-
-public class QuickNotepadDockable implements DockableWindow, QuickNotepadActions
-{
- private QuickNotepad notepad;
-
- public QuickNotepadDockable(View view, String position) {
- notepad = new QuickNotepad(view, position);
- }
-
- public String getName() {
- return QuickNotepadPlugin.NAME;
- }
-
- public Component getComponent() {
- return notepad;
- }
-
- public void chooseFile() {
- notepad.chooseFile();
- }
-
- public void saveFile() {
- notepad.saveFile();
- }
-
- public void copyToBuffer() {
- notepad.copyToBuffer();
- }
-
-}
-
-
diff --git a/QuickNotepadPlugin.java b/QuickNotepadPlugin.java
index 6d36c02..600af23 100644
--- a/QuickNotepadPlugin.java
+++ b/QuickNotepadPlugin.java
@@ -27,7 +27,7 @@ import java.awt.event.*;
import org.gjt.sp.jedit.*;
import org.gjt.sp.util.Log;
import org.gjt.sp.jedit.gui.*;
-import org.gjt.sp.jedit.msg.CreateDockableWindow;
+//import org.gjt.sp.jedit.msg.CreateDockableWindow;
/**
@@ -44,7 +44,7 @@ public class QuickNotepadPlugin extends EBPlugin
public void start()
{
- EditBus.addToNamedList(DockableWindow.DOCKABLE_WINDOW_LIST, NAME);
+// EditBus.addToNamedList(DockableWindow.DOCKABLE_WINDOW_LIST, NAME);
}
@@ -64,7 +64,7 @@ public class QuickNotepadPlugin extends EBPlugin
od.addOptionPane(new QuickNotepadOptionPane());
}
-
+/*
public void handleMessage(EBMessage message)
{
if(message instanceof CreateDockableWindow)
@@ -81,6 +81,6 @@ public class QuickNotepadPlugin extends EBPlugin
}
}
}
-
+*/
}
diff --git a/QuickNotepadTextArea.java b/QuickNotepadTextArea.java
index b5ff3e8..5146b73 100644
--- a/QuickNotepadTextArea.java
+++ b/QuickNotepadTextArea.java
@@ -1,36 +1,36 @@
-/*
- * QuickNotepadTextArea.java
- * part of the QuickNotepad plugin for the jEditTextArea
- * Copyright (C) 2001 John Gellene
- * jgellene@...
- *
- * 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.
- *
- * $Id$
- */
-
-import javax.swing.JTextArea;
-
-public class QuickNotepadTextArea extends JTextArea
-{
- public QuickNotepadTextArea()
- {
- super();
- setLineWrap(true);
- setWrapStyleWord(true);
- setTabSize(4);
- }
-}
-
+/*
+ * QuickNotepadTextArea.java
+ * part of the QuickNotepad plugin for the jEditTextArea
+ * Copyright (C) 2001 John Gellene
+ * jgellene@...
+ *
+ * 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.
+ *
+ * $Id$
+ */
+
+import javax.swing.JTextArea;
+
+public class QuickNotepadTextArea extends JTextArea
+{
+ public QuickNotepadTextArea()
+ {
+ super();
+ setLineWrap(true);
+ setWrapStyleWord(true);
+ setTabSize(4);
+ }
+}
+
diff --git a/QuickNotepadToolPanel.java b/QuickNotepadToolPanel.java
index 4690840..685f51b 100644
--- a/QuickNotepadToolPanel.java
+++ b/QuickNotepadToolPanel.java
@@ -1,105 +1,106 @@
-/*
- * QuickNotepadToolPanel.java
- * part of the QuickNotepad plugin for the jEdit text editor
- * Copyright (C) 2001 John Gellene
- * jgellene@...
- *
- * 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.
- *
- * $Id$
- */
-
-import java.awt.*;
-import java.awt.event.*;
-
-import javax.swing.*;
-
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.jedit.gui.*;
-import org.gjt.sp.jedit.io.*;
-import org.gjt.sp.jedit.textarea.*;
-import org.gjt.sp.jedit.msg.PropertiesChanged;
-import org.gjt.sp.util.Log;
-
-public class QuickNotepadToolPanel extends JPanel
-{
- private QuickNotepad pad;
- private JLabel label;
-
- public QuickNotepadToolPanel(QuickNotepad qnpad)
- {
- pad = qnpad;
- JToolBar toolBar = new JToolBar();
- toolBar.setFloatable(false);
-
- toolBar.add(makeCustomButton("quicknotepad.choose-file",
- new ActionListener() {
- public void actionPerformed(ActionEvent evt) {
- QuickNotepadToolPanel.this.pad.chooseFile();
- }
- }));
- toolBar.add(makeCustomButton("quicknotepad.save-file",
- new ActionListener() {
- public void actionPerformed(ActionEvent evt) {
- QuickNotepadToolPanel.this.pad.saveFile();
- }
- }));
- toolBar.add(makeCustomButton("quicknotepad.copy-to-buffer",
- new ActionListener() {
- public void actionPerformed(ActionEvent evt) {
- QuickNotepadToolPanel.this.pad.copyToBuffer();
- }
- }));
- label = new JLabel(pad.getFilename(), SwingConstants.RIGHT);
- label.setForeground(Color.black);
- label.setVisible(jEdit.getProperty(
- QuickNotepadPlugin.OPTION_PREFIX + "show-filepath").equals("true"));
- this.setLayout(new BorderLayout(10, 0));
- this.add(BorderLayout.WEST, toolBar);
- this.add(BorderLayout.CENTER, label);
- this.setBorder(BorderFactory.createEmptyBorder(0, 0, 3, 10));
- }
-
-
- void propertiesChanged()
- {
- label.setText(pad.getFilename());
- label.setVisible(jEdit.getProperty(
- QuickNotepadPlugin.OPTION_PREFIX + "show-filepath").equals("true"));
- }
-
- private AbstractButton makeCustomButton(String name, ActionListener listener)
- {
- String icon = jEdit.getProperty(name + ".icon");
- java.net.URL u = getClass().getResource(icon);
- String toolTip = jEdit.getProperty(name.concat(".label"));
- AbstractButton b = new JButton(new ImageIcon(u));
- if(listener != null)
- {
- b.addActionListener(listener);
- b.setEnabled(true);
- }
- else
- {
- b.setEnabled(false);
- }
- b.setToolTipText(toolTip);
- b.setMargin(new Insets(0,0,0,0));
- b.setAlignmentY(0.0f);
- b.setRequestFocusEnabled(false);
- return b;
- }
-
-}
+/*
+ * QuickNotepadToolPanel.java
+ * part of the QuickNotepad plugin for the jEdit text editor
+ * Copyright (C) 2001 John Gellene
+ * jgellene@...
+ *
+ * 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.
+ *
+ * $Id$
+ */
+
+import java.awt.*;
+import java.awt.event.*;
+
+import javax.swing.*;
+
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.jedit.gui.*;
+import org.gjt.sp.jedit.io.*;
+import org.gjt.sp.jedit.textarea.*;
+import org.gjt.sp.jedit.msg.PropertiesChanged;
+import org.gjt.sp.util.Log;
+
+public class QuickNotepadToolPanel extends JPanel
+{
+ private QuickNotepad pad;
+ private JLabel label;
+
+ public QuickNotepadToolPanel(QuickNotepad qnpad)
+ {
+ pad = qnpad;
+ JToolBar toolBar = new JToolBar();
+ toolBar.setFloatable(false);
+
+ toolBar.add(makeCustomButton("quicknotepad.choose-file",
+ new ActionListener() {
+ public void actionPerformed(ActionEvent evt) {
+ QuickNotepadToolPanel.this.pad.chooseFile();
+ }
+ }));
+ toolBar.add(makeCustomButton("quicknotepad.save-file",
+ new ActionListener() {
+ public void actionPerformed(ActionEvent evt) {
+ QuickNotepadToolPanel.this.pad.saveFile();
+ }
+ }));
+ toolBar.add(makeCustomButton("quicknotepad.copy-to-buffer",
+ new ActionListener() {
+ public void actionPerformed(ActionEvent evt) {
+ QuickNotepadToolPanel.this.pad.copyToBuffer();
+ }
+ }));
+ label = new JLabel(pad.getFilename(), SwingConstants.RIGHT);
+ label.setForeground(Color.black);
+ label.setVisible(jEdit.getProperty(
+ QuickNotepadPlugin.OPTION_PREFIX + "show-filepath").equals("true"));
+ this.setLayout(new BorderLayout(10, 0));
+ this.add(BorderLayout.WEST, toolBar);
+ this.add(BorderLayout.CENTER, label);
+ this.setBorder(BorderFactory.createEmptyBorder(0, 0, 3, 10));
+ }
+
+
+ void propertiesChanged()
+ {
+ label.setText(pad.getFilename());
+ label.setVisible(jEdit.getProperty(
+ QuickNotepadPlugin.OPTION_PREFIX + "show-filepath").equals("true"));
+ }
+
+ private AbstractButton makeCustomButton(String name, ActionListener listener)
+ {
+ String icon = jEdit.getProperty(name + ".icon");
+ java.net.URL u = getClass().getResource(icon);
+ String toolTip = jEdit.getProperty(name.concat(".label"));
+ AbstractButton b = new JButton(new ImageIcon(u));
+ if(listener != null)
+ {
+ b.addActionListener(listener);
+ b.setEnabled(true);
+ }
+ else
+ {
+ b.setEnabled(false);
+ }
+ b.setToolTipText(toolTip);
+ b.setMargin(new Insets(0,0,0,0));
+ b.setAlignmentY(0.0f);
+ b.setRequestFocusEnabled(false);
+ return b;
+ }
+
+}
+
diff --git a/README.txt b/README.txt
index bec18ef..daa1ab2 100644
--- a/README.txt
+++ b/README.txt
@@ -5,3 +5,8 @@ named 'QuickNotepad', written by John Gellene.
The plugin source is discussed in detail in the 'Writing Plugins' part
of the user's guide.
+
+The source code has been updated to conform the the PLugin API for version 4.0
+of jEdit. The file changes.txt outlines the changes that were made from the
+version distributed with jEdit 3.2.2.
+
diff --git a/actions.xml b/actions.xml
index de3ba3d..7a9c4d5 100644
--- a/actions.xml
+++ b/actions.xml
@@ -15,31 +15,28 @@
<ACTION NAME="quicknotepad-to-front">
<CODE>
view.getDockableWindowManager()
- .addDockableWindow(QuickNotepadPlugin.NAME);
+ .getDockable(QuickNotepadPlugin.NAME);
</CODE>
</ACTION>
<ACTION NAME="quicknotepad.choose-file">
<CODE>
- wm = view.getDockableWindowManager();
- wm.addDockableWindow(QuickNotepadPlugin.NAME);
- wm.getDockableWindow(QuickNotepadPlugin.NAME).chooseFile();
+ wm = view.getDockableWindowManager()
+ .getDockable(QuickNotepadPlugin.NAME).chooseFile();
</CODE>
</ACTION>
<ACTION NAME="quicknotepad.save-file">
<CODE>
- wm = view.getDockableWindowManager();
- wm.addDockableWindow(QuickNotepadPlugin.NAME);
- wm.getDockableWindow(QuickNotepadPlugin.NAME).saveFile();
+ wm = view.getDockableWindowManager()
+ .getDockable(QuickNotepadPlugin.NAME).saveFile();
</CODE>
</ACTION>
<ACTION NAME="quicknotepad.copy-to-buffer">
<CODE>
- wm = view.getDockableWindowManager();
- wm.addDockableWindow(QuickNotepadPlugin.NAME);
- wm.getDockableWindow(QuickNotepadPlugin.NAME).copyToBuffer();
+ wm = view.getDockableWindowManager()
+ .getDockable(QuickNotepadPlugin.NAME).copyToBuffer();
</CODE>
</ACTION>
</ACTIONS>
diff --git a/build.xml b/build.xml
index c2d1acc..3ebfdd0 100644
--- a/build.xml
+++ b/build.xml
@@ -25,7 +25,7 @@
<project name="QuickNotepad" default="dist" basedir=".">
- <property name="jedit.install.dir" value="/home/slava/jEdit"/>
+ <property name="jedit.install.dir" value="G:\\Program Files\\jEdit 4.0pre1"/>
<property name="jar.name" value="QuickNotepad.jar"/>
<property name="src.dir" value="."/>
@@ -62,6 +62,7 @@
<fileset dir="${build.dir}"/>
<fileset dir="${src.dir}">
<include name="actions.xml"/>
+ <include name="dockables.xml"/>
<include name="**/*.props"/>
<include name="**/*.html"/>
<include name="**/*.gif"/>
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=fb789f6df069a87413fea57a507b3022e330fef8
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=fb789f6df069a87413fea57a507b3022e330fef8
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=fb789f6df069a87413fea57a507b3022e330fef8;hb=fb789f6df069a87413fea57a507b3022e330fef8
commit fb789f6df069a87413fea57a507b3022e330fef8
Author: Slava Pestov <slava@...>
Date: Tue Sep 25 07:04:05 2001 +0000
started new docking stuff, fixed build.xml
diff --git a/Edit.gif b/Edit.gif
index 48da254..a5af7d7 100644
Binary files a/Edit.gif and b/Edit.gif differ
diff --git a/Open.gif b/Open.gif
index a10665f..2086bc2 100644
Binary files a/Open.gif and b/Open.gif differ
diff --git a/Save.gif b/Save.gif
index fba286d..bfa98a8 100644
Binary files a/Save.gif and b/Save.gif differ
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=69c1a85e20a0ef5bc4bcde4f0bb2629a2a8e9a8e
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=69c1a85e20a0ef5bc4bcde4f0bb2629a2a8e9a8e
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=69c1a85e20a0ef5bc4bcde4f0bb2629a2a8e9a8e;hb=69c1a85e20a0ef5bc4bcde4f0bb2629a2a8e9a8e
commit 69c1a85e20a0ef5bc4bcde4f0bb2629a2a8e9a8e
Author: Slava Pestov <slava@...>
Date: Sun Sep 23 10:50:15 2001 +0000
added missing build.xml
diff --git a/build.xml b/build.xml
new file mode 100644
index 0000000..c2d1acc
--- /dev/null
+++ b/build.xml
@@ -0,0 +1,96 @@
+<?xml version="1.0"?>
+
+<!--
+ This is a build.xml file for building the QuickNotepad plugin.
+
+ The 'dist' target compiles the plugin and creates the JAR file.
+ Before running the 'dist' target, you will need to generate the
+ documentation using one of these two targets:
+
+ - 'docs-xalan': Creates documentation using the Xalan XSLT processor
+ - 'docs-xsltproc': Creates documentation using the xsltproc tool
+
+ To use it for building your own plugin, make these changes:
+
+ - Change definition of 'jedit.install.dir' to point to the directory
+ containing jedit.jar
+ - Change definition of 'jar.name' to the name of your plugin's JAR file
+ - If necessary, add any dependencies to the 'project.class.path'
+ definition
+ - If necessary, change the list of files in the 'dist' targtet
+ - If your plugin has documentation generated using the DocBook XSL
+ stylesheets, change the 'docs-xalan' and 'docs-xsltproc' targets
+ accordingly.
+-->
+
+<project name="QuickNotepad" default="dist" basedir=".">
+
+ <property name="jedit.install.dir" value="/home/slava/jEdit"/>
+ <property name="jar.name" value="QuickNotepad.jar"/>
+
+ <property name="src.dir" value="."/>
+ <property name="build.dir" value="build"/>
+ <property name="install.dir" value=".."/>
+
+
+ <path id="project.class.path">
+ <pathelement location="${jedit.install.dir}/jedit.jar"/>
+ <pathelement location="."/>
+ </path>
+
+
+ <target name="init">
+ <mkdir dir="${build.dir}"/>
+ </target>
+
+
+ <target name="compile" depends="init">
+ <javac
+ srcdir="${src.dir}"
+ destdir="${build.dir}"
+ deprecation="on"
+ includeJavaRuntime="yes"
+ >
+ <classpath refid="project.class.path"/>
+ </javac>
+ </target>
+
+
+ <target name="dist" depends="compile">
+ <mkdir dir="${install.dir}"/>
+ <jar jarfile="${install.dir}/${jar.name}">
+ <fileset dir="${build.dir}"/>
+ <fileset dir="${src.dir}">
+ <include name="actions.xml"/>
+ <include name="**/*.props"/>
+ <include name="**/*.html"/>
+ <include name="**/*.gif"/>
+ </fileset>
+ </jar>
+ </target>
+
+ <!-- Generate docs with xsltproc tool from http://www.xmlsoft.org -->
+ <target name="docs-xsltproc">
+ <exec executable="xsltproc">
+ <arg value="--catalogs"/>
+ <arg value="users-guide.xsl"/>
+ <arg value="users-guide.xml"/>
+ </exec>
+ </target>
+
+ <!-- Generate docs with Xalan tool from xml.apache.org -->
+ <target name="docs-xalan">
+ <style
+ style="users-guide.xsl"
+ in="users-guide.xml"/>
+ </target>
+
+ <target name="clean">
+ <delete dir="${build.dir}"/>
+ <delete>
+ <fileset dir="." includes="**/*~" defaultexcludes="no"/>
+ <fileset dir="." includes="**/*.html" defaultexcludes="no"/>
+ </delete>
+ </target>
+
+</project>
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=2b199fc432dd6581e23782b08a649164c95f9a5c
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=2b199fc432dd6581e23782b08a649164c95f9a5c
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=2b199fc432dd6581e23782b08a649164c95f9a5c;hb=2b199fc432dd6581e23782b08a649164c95f9a5c
commit 2b199fc432dd6581e23782b08a649164c95f9a5c
Author: Slava Pestov <slava@...>
Date: Sun Sep 23 10:49:39 2001 +0000
Adding missing icons
diff --git a/Edit.gif b/Edit.gif
new file mode 100644
index 0000000..48da254
Binary files /dev/null and b/Edit.gif differ
diff --git a/Open.gif b/Open.gif
new file mode 100644
index 0000000..a10665f
Binary files /dev/null and b/Open.gif differ
diff --git a/Save.gif b/Save.gif
new file mode 100644
index 0000000..fba286d
Binary files /dev/null and b/Save.gif differ
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=2f1ad57a10f1ca01f88d2a3981cc9657a102e517
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=2f1ad57a10f1ca01f88d2a3981cc9657a102e517
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=2f1ad57a10f1ca01f88d2a3981cc9657a102e517;hb=2f1ad57a10f1ca01f88d2a3981cc9657a102e517
commit 2f1ad57a10f1ca01f88d2a3981cc9657a102e517
Author: Slava Pestov <slava@...>
Date: Sun Sep 9 03:17:10 2001 +0000
Ant, JavaHelp
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..9ef9604
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+build
+
diff --git a/makefile.jmk b/makefile.jmk
deleted file mode 100644
index 6e25466..0000000
--- a/makefile.jmk
+++ /dev/null
@@ -1,68 +0,0 @@
-# A plugin makefile
-#
-# To recompile this plugin, start jmk in the plugin's source directory.
-#
-
-jar_name = "QuickNotepad";
-
-##
-# javac executable and args
-##
-#javac_bin = "javac";
-#javac_opts = "-deprecation";
-
-javac_bin = "jikes";
-javac_opts = "-g" "-deprecation" "+E";
-
-# set up the class path
-new_class_path = "../../jedit.jar;../EditBus.jar;.";
-old_class_path = (getprop "java.class.path");
-
-# concatenate the old and new class paths
-if (equal "", old_class_path) then class_path = new_class_path;
-else class_path = (cat old_class_path ";" new_class_path); end
-
-cmd_javac = javac_bin "-classpath" class_path javac_opts;
-
-#javac_bin "-classpath" class_path javac_opts;
-
-##
-# jar executable and args
-##
-jar_bin = "jar";
-jar_opts = "cf0";
-cmd_jar = jar_bin jar_opts;
-
-srcs = (subst ".java", ".class",
- (glob (join (join (dirs "."), "/"), "*Plugin.java" "*.java"))
-);
-jar = (cat "../" jar_name ".jar");
-
-get_files = function (dummy)
-{
- extensions = "class" "gif" "html" "props";
- file_globs = (join "/*.", extensions);
- other_files = "actions.xml";
-
- (glob (join (dirs "."), file_globs)) other_files
-}
-end;
-
-"all": jar;
-
-"%.class" : "%.java";
-{
- exec cmd_javac <;
-}
-
-jar: srcs;
-{
- exec cmd_jar @ (get_files "1");
-}
-
-"clean":;
-{
- delete (glob (join (dirs "."), "/*.class"));
-}
-
-".PHONY": "all";
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=ee3f6ec9bc54dd5687b906315d5e385a52dec28d
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=ee3f6ec9bc54dd5687b906315d5e385a52dec28d
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=ee3f6ec9bc54dd5687b906315d5e385a52dec28d;hb=ee3f6ec9bc54dd5687b906315d5e385a52dec28d
commit ee3f6ec9bc54dd5687b906315d5e385a52dec28d
Author: Slava Pestov <slava@...>
Date: Sun Sep 2 05:40:58 2001 +0000
Importing jEdit 4.0
diff --git a/Edit.gif b/Edit.gif
deleted file mode 100644
index 48da254..0000000
Binary files a/Edit.gif and /dev/null differ
diff --git a/Open.gif b/Open.gif
deleted file mode 100644
index a10665f..0000000
Binary files a/Open.gif and /dev/null differ
diff --git a/Save.gif b/Save.gif
deleted file mode 100644
index fba286d..0000000
Binary files a/Save.gif and /dev/null differ
commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commit;h=cc23ccf4dbcb1990d7a4644129bf251c9417f5ff
commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=commitdiff;h=cc23ccf4dbcb1990d7a4644129bf251c9417f5ff
tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/QuickNotepad;a=tree;h=cc23ccf4dbcb1990d7a4644129bf251c9417f5ff;hb=cc23ccf4dbcb1990d7a4644129bf251c9417f5ff
commit cc23ccf4dbcb1990d7a4644129bf251c9417f5ff
Author: Slava Pestov <slava@...>
Date: Wed Jul 11 08:59:22 2001 +0200
import of auxiliary files for jEdit-3.2pre5
diff --git a/Edit.gif b/Edit.gif
new file mode 100644
index 0000000..48da254
Binary files /dev/null and b/Edit.gif differ
diff --git a/Open.gif b/Open.gif
new file mode 100644
index 0000000..a10665f
Binary files /dev/null and b/Open.gif differ
diff --git a/QuickNotepad.html b/QuickNotepad.html
new file mode 100644
index 0000000..d90a400
--- /dev/null
+++ b/QuickNotepad.html
@@ -0,0 +1,531 @@
+<HTML
+><HEAD
+><TITLE
+>QuickNotepad</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.64
+"></HEAD
+><BODY
+CLASS="article"
+BGCOLOR="#FFFFFF"
+><DIV
+CLASS="ARTICLE"
+><DIV
+CLASS="TITLEPAGE"
+><H1
+CLASS="title"
+><A
+NAME="AEN2"
+>QuickNotepad</A
+></H1
+><H3
+CLASS="author"
+><A
+NAME="AEN3"
+>John Gellene</A
+></H3
+><DIV
+CLASS="affiliation"
+><DIV
+CLASS="address"
+><P
+CLASS="address"
+>jgellene@...
+></DIV
+></DIV
+><P
+CLASS="copyright"
+>Copyright © 2001 by John Gellene</P
+><DIV
+CLASS="revhistory"
+><TABLE
+WIDTH="100%"
+BORDER="0"
+><TR
+><TH
+ALIGN="LEFT"
+VALIGN="TOP"
+COLSPAN="3"
+><B
+>Revision History</B
+></TH
+></TR
+><TR
+><TD
+ALIGN="LEFT"
+>Revision 1.0</TD
+><TD
+ALIGN="LEFT"
+>June 28, 2001</TD
+><TD
+ALIGN="LEFT"
+></TD
+></TR
+><TR
+><TD
+ALIGN="LEFT"
+COLSPAN="3"
+></TD
+></TR
+></TABLE
+></DIV
+><HR></DIV
+><DIV
+CLASS="TOC"
+><DL
+><DT
+><B
+>Table of Contents</B
+></DT
+><DT
+><A
+HREF="QuickNotepad.html#AEN24"
+>Introduction</A
+></DT
+><DT
+><A
+HREF="QuickNotepad.html#AEN31"
+>Operation</A
+></DT
+><DT
+><A
+HREF="QuickNotepad.html#AEN69"
+>Toolbar buttons</A
+></DT
+><DT
+><A
+HREF="QuickNotepad.html#options"
+>Options</A
+></DT
+><DT
+><A
+HREF="QuickNotepad.html#AEN101"
+>Legal notices</A
+></DT
+><DT
+><A
+HREF="QuickNotepad.html#AEN113"
+>Feedback</A
+></DT
+></DL
+></DIV
+><DIV
+CLASS="simplesect"
+><HR><H2
+CLASS="simplesect"
+><A
+NAME="AEN24"
+>Introduction</A
+></H2
+><P
+> This plugin provides a dockable <SPAN
+CLASS="QUOTE"
+>"scratch pad"</SPAN
+> for writing
+ and displaying notes, to do lists or similar items as unformatted text.
+ The text is automatically saved upon closing the plugin or exiting
+ jEdit. It can also be saved manually. The user can change the file
+ to be displayed during the current editing session. The path of the default
+ notepad file can be changed as a user option. Finally, the
+ text file can be copied to a new, untitled jEdit buffer so that it can
+ be edited by the main program.
+</P
+><P
+> The <I
+CLASS="citetitle"
+>jEdit Plugin Guide</I
+> details the development
+ and design of QuickNotepad. It is a simple but functional dockable plugin
+ that incorporates the basic elements of the jEdit plugin architecture.
+</P
+><P
+> QuickNotepad is designed to operate with JDK 1.2 or greater and
+ jEdit3.1 or greater. The EditBus plugin is also required.
+</P
+></DIV
+><DIV
+CLASS="simplesect"
+><HR><H2
+CLASS="simplesect"
+><A
+NAME="AEN31"
+>Operation</A
+></H2
+><P
+> When QuickNotepad is activated, it loads and displays the file stored in
+ its properties as unformatted text. The text can be edited using the
+ keyboard and mouse. The text area component recognizes the following
+ basic editing shortcuts:
+</P
+><DIV
+CLASS="informaltable"
+><A
+NAME="AEN34"
+></A
+><TABLE
+BORDER="0"
+CLASS="CALSTABLE"
+><TBODY
+><TR
+><TD
+WIDTH="80"
+ALIGN="LEFT"
+VALIGN="MIDDLE"
+> </TD
+><TD
+WIDTH="120"
+ALIGN="LEFT"
+VALIGN="MIDDLE"
+>Cut</TD
+><TD
+WIDTH="120"
+ALIGN="LEFT"
+VALIGN="MIDDLE"
+><FONT
+CLASS="keysym"
+FACE="ARIAL"
+SIZE="-1"
+><B
+>Ctrl</B
+></FONT
+>-<FONT
+CLASS="keysym"
+FACE="ARIAL"
+SIZE="-1"
+><B
+>x</B
+></FONT
+></TD
+></TR
+><TR
+><TD
+WIDTH="80"
+ALIGN="LEFT"
+VALIGN="MIDDLE"
+> </TD
+><TD
+WIDTH="120"
+ALIGN="LEFT"
+VALIGN="MIDDLE"
+>Copy</TD
+><TD
+WIDTH="120"
+ALIGN="LEFT"
+VALIGN="MIDDLE"
+><FONT
+CLASS="keysym"
+FACE="ARIAL"
+SIZE="-1"
+><B
+>Ctrl</B
+></FONT
+>-<FONT
+CLASS="keysym"
+FACE="ARIAL"
+SIZE="-1"
+><B
+>c</B
+></FONT
+></TD
+></TR
+><TR
+><TD
+WIDTH="80"
+ALIGN="LEFT"
+VALIGN="MIDDLE"
+> </TD
+><TD
+WIDTH="120"
+ALIGN="LEFT"
+VALIGN="MIDDLE"
+>Paste</TD
+><TD
+WIDTH="120"
+ALIGN="LEFT"
+VALIGN="MIDDLE"
+><FONT
+CLASS="keysym"
+FACE="ARIAL"
+SIZE="-1"
+><B
+>Ctrl</B
+></FONT
+>-<FONT
+CLASS="keysym"
+FACE="ARIAL"
+SIZE="-1"
+><B
+>v</B
+></FONT
+></TD
+></TR
+><TR
+><TD
+WIDTH="80"
+ALIGN="LEFT"
+VALIGN="MIDDLE"
+> </TD
+><TD
+WIDTH="120"
+ALIGN="LEFT"
+VALIGN="MIDDLE"
+>Select All</TD
+><TD
+WIDTH="120"
+ALIGN="LEFT"
+VALIGN="MIDDLE"
+><FONT
+CLASS="keysym"
+FACE="ARIAL"
+SIZE="-1"
+><B
+>Ctrl</B
+></FONT
+>-<FONT
+CLASS="keysym"
+FACE="ARIAL"
+SIZE="-1"
+><B
+>a</B
+></FONT
+></TD
+></TR
+></TBODY
+></TABLE
+></DIV
+><P
+> QuickNotepad ignores function keys and other combination key presses.
+ They are hamdled by the main application.and are handled by jEdit.
+</P
+></DIV
+><DIV
+CLASS="simplesect"
+><HR><H2
+CLASS="simplesect"
+><A
+NAME="AEN69"
+>Toolbar buttons</A
+></H2
+><P
+> Three buttons above the text area provide file management operations:
+</P
+><UL
+><LI
+><P
+> <FONT
+CLASS="guilabel"
+FACE="ARIAL"
+SIZE="-1"
+><B
+>Choose notepad file</B
+></FONT
+> - this button opens a file selection
+ dialog permitting the user to select a different file to view in the
+ text area. If a new file is selected, the old file is
+ auomatically saved. The selection is valid only for the current
+ editing session; to change the default QuickNotepad file for future
+ sessions, use the <A
+HREF="QuickNotepad.html#option-dialog"
+>options dialog</A
+>.
+ </P
+></LI
+><LI
+><P
+> <FONT
+CLASS="guilabel"
+FACE="ARIAL"
+SIZE="-1"
+><B
+>Save notepad file</B
+></FONT
+> - this button causes QuickNotepad to
+ write the contents of the text area to the designated notepad file. To
+ save the text to another file name, use the <FONT
+CLASS="guilabel"
+FACE="ARIAL"
+SIZE="-1"
+><B
+>Copy notepad to
+ buffer</B
+></FONT
+> operation.
+ </P
+></LI
+><LI
+><P
+> <FONT
+CLASS="guilabel"
+FACE="ARIAL"
+SIZE="-1"
+><B
+>Copy notepad to buffer</B
+></FONT
+> - this button causes the
+ contents of the text to be written to a newly created,
+ untitled buffer in the main text editing area. This operation
+ does not alter the QuickNotepad text area or write its text to
+ storage. Further changes to either the QuickNotepad text area or
+ the new buffer will not affect the other.
+ </P
+></LI
+></UL
+><P
+> These operations are listed in the menu which appears for
+ QuickNotepad under the <FONT
+CLASS="guimenu"
+FACE="ARIAL"
+SIZE="-1"
+><B
+>Plugins</B
+></FONT
+> heading. They can
+ also be made the subject of keyboard shortcuts in the
+ <FONT
+CLASS="guilabel"
+FACE="ARIAL"
+SIZE="-1"
+><B
+>Plugin Shortcuts</B
+></FONT
+> pane of jEdit's options dialog.
+</P
+><P
+> One other operation is available as a keyboard shortcut. <FONT
+CLASS="guilabel"
+FACE="ARIAL"
+SIZE="-1"
+><B
+>Bring
+ QuickNotepad to front</B
+></FONT
+> activates the plugin and makes visible
+ if it is currently hidden in a docking window.
+</P
+></DIV
+><DIV
+CLASS="simplesect"
+><HR><H2
+CLASS="simplesect"
+><A
+NAME="options"
+>Options</A
+></H2
+><P
+> <A
+NAME="option-dialog"
+></A
+>There are three options which can be set
+ using the pane for QuickNotepad in the <FONT
+CLASS="guilabel"
+FACE="ARIAL"
+SIZE="-1"
+><B
+>Plugin
+ Shortcuts</B
+></FONT
+> section of the general options dialog:
+</P
+><UL
+><LI
+><P
+> A checkbox governs whether the name of the notepad file will be
+ displayed in the toolbar panel above the text area. Even if the file
+ name display is enabled, if the plugin is displayed to the left or right
+ of the main editing area, the notepad file name will likely be partially
+ or completely hidden.
+ </P
+></LI
+><LI
+><P
+> A text field and adjacent button allow the user to choose the path of
+ the default notepad file by typing its name or opening a file chooser
+ dialog. This file will be loaded (and the old file saved) once the
+ plugin's options settings are committed.
+ </P
+></LI
+><LI
+><P
+> A third button shows the name, size and style of the font used by the
+ QuickNotepad text area. Pressing the button summons a font chooser
+ dialog for making a new selection. The text area will be
+ redrawn with the new font once the change is committed.
+ </P
+></LI
+></UL
+></DIV
+><DIV
+CLASS="simplesect"
+><HR><H2
+CLASS="simplesect"
+><A
+NAME="AEN101"
+>Legal notices</A
+></H2
+><P
+> The toolbar button icons are taken from the Sun Java Look and Feel
+ icon collection. The license for these items may be found
+ in the <TT
+CLASS="filename"
+>ICONS.LICENSE.txt</TT
+> file in the jEdit
+ distribution.
+</P
+><P
+> The QuickNotepad plugin is released under the GNU General Public License
+ (either version 2 or any later version, at the user's option). A copy
+ of the GPL is available in the <TT
+CLASS="filename"
+>COPYING.txt</TT
+> file
+ in the jEdit distribution.
+</P
+><P
+> The QuickNotepad plugin comes with ABSOLUTELY NO WARRANTY OF ANY KIND;
+ see section 11 and 12 of the GPL for details.
+</P
+><P
+> Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.1 or
+ any later version published by the Free Software Foundation; with no
+ <SPAN
+CLASS="QUOTE"
+>"Invariant Sections"</SPAN
+>, <SPAN
+CLASS="QUOTE"
+>"Front-Cover Texts"</SPAN
+> or
+ <SPAN
+CLASS="QUOTE"
+>"Back-Cover Texts"</SPAN
+>, each as defined in the license. A copy
+ of the license is included in the file
+ <TT
+CLASS="filename"
+>COPYING.DOC.txt</TT
+> included with the jEdit distribution.
+</P
+></DIV
+><DIV
+CLASS="simplesect"
+><HR><H2
+CLASS="simplesect"
+><A
+NAME="AEN113"
+>Feedback</A
+></H2
+><P
+> Comments, bug reports and other feedback may be sent to the
+ <A
+HREF="mailto:jgellene@..."
+TARGET="_top"
+>author</A
+> or the
+ jEdit-users mailing list.
+</P
+></DIV
+></DIV
+></BODY
+></HTML
+>
\ No newline at end of file
diff --git a/QuickNotepad.java b/QuickNotepad.java
new file mode 100644
index 0000000..fa0ef5f
--- /dev/null
+++ b/QuickNotepad.java
@@ -0,0 +1,262 @@
+/*
+ * QuickNotepad.java
+ * part of the QuickNotepad plugin for the jEdit text editor
+ * Copyright (C) 2001 John Gellene
+ * jgellene@...
+ *
+ * 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.
+ *
+ * $Id$
+ */
+
+// from Java:
+import java.awt.*;
+import java.awt.event.*;
+import java.io.*;
+import java.util.Vector;
+
+// from Swing:
+import javax.swing.*;
+import javax.swing.event.*;
+
+// from jEdit:
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.jedit.gui.*;
+import org.gjt.sp.jedit.io.*;
+import org.gjt.sp.jedit.msg.CreateDockableWindow;
+import org.gjt.sp.jedit.msg.PropertiesChanged;
+import org.gjt.sp.jedit.msg.ViewUpdate;
+import org.gjt.sp.util.Log;
+
+
+public class QuickNotepad extends JPanel implements EBComponent, QuickNotepadActions
+{
+ private String filename;
+ private String defaultFilename;
+ private View view;
+ private boolean floating;
+
+ private QuickNotepadTextArea textArea;
+ private QuickNotepadToolPanel toolPanel;
+
+ //
+ // Constructor
+ //
+
+ public QuickNotepad(View view, String position)
+ {
+ super(new BorderLayout());
+
+ this.view = view;
+ this.floating = position.equals(DockableWindowManager.FLOATING);
+
+ this.filename = jEdit.getProperty(
+ QuickNotepadPlugin.OPTION_PREFIX + "filepath");
+ if(this.filename == null || this.filename.length() == 0)
+ {
+ this.filename = new String(jEdit.getSettingsDirectory()
+ + File.separator + "qn.txt");
+ jEdit.setProperty(
+ QuickNotepadPlugin.OPTION_PREFIX + "filepath",
+ this.filename);
+ }
+ this.defaultFilename = new String(this.filename);
+
+ this.toolPanel = new QuickNotepadToolPanel(this);
+ add(BorderLayout.NORTH, this.toolPanel);
+
+ if(floating)
+ this.setPreferredSize(new Dimension(500, 250));
+
+ textArea = new QuickNotepadTextArea();
+ textArea.setFont(QuickNotepadOptionPane.makeFont());
+ textArea.addKeyListener(new KeyHandler());
+ textArea.addAncestorListener(new AncestorHandler());
+
+ JScrollPane pane = new JScrollPane(textArea);
+ add(BorderLayout.CENTER, pane);
+
+ readFile();
+ }
+
+ //
+ // Attribute methods
+ //
+
+ // for toolbar display
+ public String getFilename()
+ {
+ return filename;
+ }
+
+ //
+ // EBComponent implementation
+ //
+
+ public void handleMessage(EBMessage message)
+ {
+ if (message instanceof PropertiesChanged)
+ {
+ propertiesChanged();
+ }
+ }
+
+
+ private void propertiesChanged()
+ {
+ String propertyFilename = jEdit.getProperty(
+ QuickNotepadPlugin.OPTION_PREFIX + "filepath");
+ if(!defaultFilename.equals(propertyFilename))
+ {
+ saveFile();
+ toolPanel.propertiesChanged();
+ defaultFilename = new String(propertyFilename);
+ filename = new String(defaultFilename);
+ readFile();
+ }
+ Font newFont = QuickNotepadOptionPane.makeFont();
+ if(!newFont.equals(textArea.getFont()))
+ {
+ textArea.setFont(newFont);
+ textArea.invalidate();
+ }
+ }
+
+ // These JComponent methods provide the appropriate points
+ // to subscribe and unsubscribe this object to the EditBus
+
+ public void addNotify()
+ {
+ super.addNotify();
+ EditBus.addToBus(this);
+ }
+
+
+ public void removeNotify()
+ {
+ saveFile();
+ super.removeNotify();
+ EditBus.removeFromBus(this);
+ }
+
+
+ //
+ // QuickNotepadActions implementation
+ //
+
+ public void saveFile()
+ {
+ if(filename.length() == 0) return;
+ try
+ {
+ DataOutputStream dos = new DataOutputStream(
+ new FileOutputStream(filename));
+ dos.writeBytes(textArea.getText());
+ dos.close();
+ }
+ catch (IOException ioe)
+ {
+ Log.log(Log.ERROR, QuickNotepad.class,
+ "Could not write notepad text to " + filename);
+ }
+ }
+
+ public void chooseFile()
+ {
+ String[] paths = GUIUtilities.showVFSFileDialog(view,
+ null,JFileChooser.OPEN_DIALOG,false);
+ if(paths != null && !paths[0].equals(filename))
+ {
+ saveFile();
+ filename = paths[0];
+ toolPanel.propertiesChanged();
+ readFile();
+ }
+ }
+
+
+ public void copyToBuffer()
+ {
+ jEdit.newFile(view);
+ view.getEditPane().getTextArea().setText(textArea.getText());
+ }
+
+ //
+ // helper methods
+ //
+
+ private void readFile()
+ {
+ FileInputStream fis = null;
+ BufferedReader bf = null;
+ try
+ {
+ fis = new FileInputStream(filename);
+ bf = new BufferedReader(new InputStreamReader(fis));
+ StringBuffer sb = new StringBuffer(2048);
+ String str;
+ while((str = bf.readLine()) != null)
+ {
+ sb.append(str).append('\n');
+ }
+ bf.close();
+ fis.close();
+ textArea.setText(sb.toString());
+ }
+ catch (FileNotFoundException fnf)
+ {
+ Log.log(Log.ERROR, QuickNotepad.class,
+ "notepad file " + filename + " does not exist");
+ }
+ catch (IOException ioe)
+ {
+ Log.log(Log.ERROR, QuickNotepad.class,
+ "could not read notepad file " + filename);
+ }
+ }
+
+ //
+ // Listener objects
+ //
+
+ // <Esc> closes a floating window
+ private class KeyHandler extends KeyAdapter {
+ public void keyPressed(KeyEvent evt) {
+ if(QuickNotepad.this.floating &&
+ evt.getKeyCode() == KeyEvent.VK_ESCAPE) {
+ evt.consume();
+ DockableWindowManager wm =
+ QuickNotepad.this.view.getDockableWindowManager();
+ wm.removeDockableWindow(QuickNotepadPlugin.NAME);
+ }
+ }
+ }
+
+ private class AncestorHandler implements AncestorListener
+ {
+ public void ancestorAdded(AncestorEvent e)
+ {
+ if(e.getSource() == QuickNotepad.this.textArea)
+ {
+ if(QuickNotepad.this.floating)
+ QuickNotepad.this.textArea.requestFocus();
+ }
+ }
+ public void ancestorMoved(AncestorEvent e) {}
+ public void ancestorRemoved(AncestorEvent e) {}
+ }
+
+}
+
diff --git a/QuickNotepad.props b/QuickNotepad.props
new file mode 100644
index 0000000..4642056
--- /dev/null
+++ b/QuickNotepad.props
@@ -0,0 +1,47 @@
+# general plugin information
+plugin.QuickNotepadPlugin.name=QuickNotepad
+plugin.QuickNotepadPlugin.author=John Gellene
+plugin.QuickNotepadPlugin.version=1.0
+plugin.QuickNotepadPlugin.docs=QuickNotepad.html
+plugin.QuickNotepadPlugin.depend.0=jdk 1.1
+plugin.QuickNotepadPlugin.depend.1=jedit 03.01.99.00
+plugin.QuickNotepadPlugin.depend.2=plugin EditBusPlugin 1.0
+
+# dockable window name
+quicknotepad.title=QuickNotepad
+
+# action labels
+quicknotepad.toggle.label=QuickNotepad
+quicknotepad-to-front.label=Bring QuickNotepad to front
+quicknotepad.choose-file.label=Choose notepad file
+quicknotepad.save-file.label=Save notepad file
+quicknotepad.copy-to-buffer.label=Copy notepad to buffer
+
+# application menu items
+quicknotepad.menu.label=QuickNotepad
+quicknotepad.menu=quicknotepad.toggle - quicknotepad.choose-file \
+ quicknotepad.save-file quicknotepad.copy-to-buffer
+
+# plugin toolbar buttons
+quicknotepad.choose-file.icon=Open.gif
+quicknotepad.save-file.icon=Save.gif
+quicknotepad.copy-to-buffer.icon=Edit.gif
+
+# Option pane labels
+options.quicknotepad.label=QuickNotepad
+options.quicknotepad.file=File:
+options.quicknotepad.choose-file=Choose
+options.quicknotepad.choose-file.title=Choose a notepad file
+options.quicknotepad.choose-font=Font:
+options.quicknotepad.show-filepath.title=Display notepad file path
+
+# Initial default settings
+options.quicknotepad.show-filepath=true
+options.quicknotepad.font=Monospaced
+options.quicknotepad.fontstyle=0
+options.quicknotepad.fontsize=14
+
+# Setting not defined but supplied for completeness
+options.quicknotepad.filepath=
+
+
diff --git a/QuickNotepadActions.java b/QuickNotepadActions.java
new file mode 100644
index 0000000..bdfac4d
--- /dev/null
+++ b/QuickNotepadActions.java
@@ -0,0 +1,30 @@
+/*
+ * QuickNotepadActions.java
+ * part of the QuickNotepad plugin for the jEdit text editor
+ * Copyright (C) 2001 John Gellene
+ * jgellene@...
+ *
+ * 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.
+ *
+ * $Id$
+ */
+
+interface QuickNotepadActions
+{
+ void chooseFile();
+ void saveFile();
+ void copyToBuffer();
+}
+
diff --git a/QuickNotepadDockable.java b/QuickNotepadDockable.java
new file mode 100644
index 0000000..22676b3
--- /dev/null
+++ b/QuickNotepadDockable.java
@@ -0,0 +1,58 @@
+/*
+ * QuickNotepadDockable.java
+ * part of the QuickNotepad plugin for the jEdit text editor
+ * Copyright (C) 2001 John Gellene
+ * jgellene@...
+ *
+ * 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.
+ *
+ * $Id$
+ */
+
+import java.awt.Component;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.jedit.gui.*;
+
+public class QuickNotepadDockable implements DockableWindow, QuickNotepadActions
+{
+ private QuickNotepad notepad;
+
+ public QuickNotepadDockable(View view, String position) {
+ notepad = new QuickNotepad(view, position);
+ }
+
+ public String getName() {
+ return QuickNotepadPlugin.NAME;
+ }
+
+ public Component getComponent() {
+ return notepad;
+ }
+
+ public void chooseFile() {
+ notepad.chooseFile();
+ }
+
+ public void saveFile() {
+ notepad.saveFile();
+ }
+
+ public void copyToBuffer() {
+ notepad.copyToBuffer();
+ }
+
+}
+
+
diff --git a/QuickNotepadOptionPane.java b/QuickNotepadOptionPane.java
new file mode 100644
index 0000000..6f4f1fe
--- /dev/null
+++ b/QuickNotepadOptionPane.java
@@ -0,0 +1,136 @@
+/*
+ * QuickNotepadOptionPane.java
+ * part of the QuickNotepad plugin for the jEdit text editor
+ * Copyright (C) 2001 John Gellene
+ * jgellene@...
+ *
+ * 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.
+ */
+
+import java.io.File;
+import java.io.IOException;
+import java.awt.Font;
+import java.awt.BorderLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JPanel;
+import javax.swing.JTextField;
+import javax.swing.JFileChooser;
+
+import org.gjt.sp.jedit.jEdit;
+import org.gjt.sp.jedit.GUIUtilities;
+import org.gjt.sp.jedit.AbstractOptionPane;
+import org.gjt.sp.jedit.gui.FontSelector;
+
+
+public class QuickNotepadOptionPane extends AbstractOptionPane
+ implements ActionListener
+{
+ private JCheckBox showPath;
+ private JTextField pathName;
+ private FontSelector font;
+
+ public QuickNotepadOptionPane()
+ {
+ super(QuickNotepadPlugin.NAME);
+ }
+
+ public void _init()
+ {
+ showPath = new JCheckBox(jEdit.getProperty(
+ QuickNotepadPlugin.OPTION_PREFIX + "show-filepath.title"),
+ jEdit.getProperty(QuickNotepadPlugin.OPTION_PREFIX +
+ "show-filepath").equals("true"));
+ addComponent(showPath);
+
+ pathName = new JTextField(jEdit.getProperty(
+ QuickNotepadPlugin.OPTION_PREFIX + "filepath"));
+ JButton pickPath = new JButton(jEdit.getProperty(
+ QuickNotepadPlugin.OPTION_PREFIX + "choose-file"));
+ pickPath.addActionListener(this);
+
+ JPanel pathPanel = new JPanel(new BorderLayout(0, 0));
+ pathPanel.add(pathName, BorderLayout.CENTER);
+ pathPanel.add(pickPath, BorderLayout.EAST);
+
+ addComponent(jEdit.getProperty(
+ QuickNotepadPlugin.OPTION_PREFIX + "file"),
+ pathPanel);
+
+ font = new FontSelector(makeFont());
+ addComponent(jEdit.getProperty(
+ QuickNotepadPlugin.OPTION_PREFIX + "choose-font"),
+ font);
+ }
+
+ public void _save()
+ {
+ jEdit.setProperty(QuickNotepadPlugin.OPTION_PREFIX + "filepath",
+ pathName.getText());
+ Font _font = font.getFont();
+ jEdit.setProperty(QuickNotepadPlugin.OPTION_PREFIX + "font",
+ _font.getFamily());
+ jEdit.setProperty(QuickNotepadPlugin.OPTION_PREFIX + "fontsize",
+ String.valueOf(_font.getSize()));
+ jEdit.setProperty(QuickNotepadPlugin.OPTION_PREFIX + "fontstyle",
+ String.valueOf(_font.getStyle()));
+ jEdit.setProperty(QuickNotepadPlugin.OPTION_PREFIX + "show-filepath",
+ String.valueOf(showPath.isSelected()));
+ }
+ // end AbstractOptionPane implementation
+
+ // begin ActionListener implementation
+ public void actionPerformed(ActionEvent evt)
+ {
+ String[] paths = GUIUtilities.showVFSFileDialog(null,
+ null,JFileChooser.OPEN_DIALOG,false);
+ if(paths != null)
+ {
+ pathName.setText(paths[0]);
+ }
+ }
+
+ // helper method to get Font from plugin properties
+ static public Font makeFont()
+ {
+ int style, size;
+ String family = jEdit.getProperty(
+ QuickNotepadPlugin.OPTION_PREFIX + "font");
+ try
+ {
+ size = Integer.parseInt(jEdit.getProperty(
+ QuickNotepadPlugin.OPTION_PREFIX + "fontsize"));
+ }
+ catch(NumberFormatException nf)
+ {
+ size = 14;
+ }
+ try
+ {
+ style = Integer.parseInt(jEdit.getProperty(
+ QuickNotepadPlugin.OPTION_PREFIX + "fontstyle"));
+ }
+ catch(NumberFormatException nf)
+ {
+ style = Font.PLAIN;
+ }
+ return new Font(family, style, size);
+ }
+
+}
+
diff --git a/QuickNotepadPlugin.java b/QuickNotepadPlugin.java
new file mode 100644
index 0000000..6d36c02
--- /dev/null
+++ b/QuickNotepadPlugin.java
@@ -0,0 +1,86 @@
+/*
+ * QuickNotepadPlugin.java
+ * part of the QuickNotepad plugin for the jEdit text editor
+ * Copyright (C) 2001 John Gellene
+ * jgellene@...
+ *
+ * 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.
+ *
+ * $Id$
+ */
+
+import java.util.Vector;
+import java.awt.*;
+import java.awt.event.*;
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.util.Log;
+import org.gjt.sp.jedit.gui.*;
+import org.gjt.sp.jedit.msg.CreateDockableWindow;
+
+
+/**
+ * The QuickNotepad plugin
+ *
+ * @author John Gellene
+ */
+public class QuickNotepadPlugin extends EBPlugin
+{
+ public static final String NAME = "quicknotepad";
+ public static final String MENU = "quicknotepad.menu";
+ public static final String PROPERTY_PREFIX = "plugin.QuickNotepadPlugin.";
+ public static final String OPTION_PREFIX = "options.quicknotepad.";
+
+ public void start()
+ {
+ EditBus.addToNamedList(DockableWindow.DOCKABLE_WINDOW_LIST, NAME);
+ }
+
+
+ public void stop()
+ {
+ }
+
+
+ public void createMenuItems(Vector menuItems)
+ {
+ menuItems.addElement(GUIUtilities.loadMenu(MENU));
+ }
+
+
+ public void createOptionPanes(OptionsDialog od)
+ {
+ od.addOptionPane(new QuickNotepadOptionPane());
+ }
+
+
+ public void handleMessage(EBMessage message)
+ {
+ if(message instanceof CreateDockableWindow)
+ {
+ CreateDockableWindow cmsg = (CreateDockableWindow)message;
+ if (cmsg.getDockableWindowName().equals(NAME))
+ {
+// try {
+// Runtime.getRuntime().exec("start cmd /C");
+// } catch (java.io.IOException e) {}
+ DockableWindow win = new QuickNotepadDockable(
+ cmsg.getView(), cmsg.getPosition());
+ cmsg.setDockableWindow(win);
+ }
+ }
+ }
+
+}
+
diff --git a/QuickNotepadTextArea.java b/QuickNotepadTextArea.java
new file mode 100644
index 0000000..b5ff3e8
--- /dev/null
+++ b/QuickNotepadTextArea.java
@@ -0,0 +1,36 @@
+/*
+ * QuickNotepadTextArea.java
+ * part of the QuickNotepad plugin for the jEditTextArea
+ * Copyright (C) 2001 John Gellene
+ * jgellene@...
+ *
+ * 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.
+ *
+ * $Id$
+ */
+
+import javax.swing.JTextArea;
+
+public class QuickNotepadTextArea extends JTextArea
+{
+ public QuickNotepadTextArea()
+ {
+ super();
+ setLineWrap(true);
+ setWrapStyleWord(true);
+ setTabSize(4);
+ }
+}
+
diff --git a/QuickNotepadToolPanel.java b/QuickNotepadToolPanel.java
new file mode 100644
index 0000000..4690840
--- /dev/null
+++ b/QuickNotepadToolPanel.java
@@ -0,0 +1,105 @@
+/*
+ * QuickNotepadToolPanel.java
+ * part of the QuickNotepad plugin for the jEdit text editor
+ * Copyright (C) 2001 John Gellene
+ * jgellene@...
+ *
+ * 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.
+ *
+ * $Id$
+ */
+
+import java.awt.*;
+import java.awt.event.*;
+
+import javax.swing.*;
+
+import org.gjt.sp.jedit.*;
+import org.gjt.sp.jedit.gui.*;
+import org.gjt.sp.jedit.io.*;
+import org.gjt.sp.jedit.textarea.*;
+import org.gjt.sp.jedit.msg.PropertiesChanged;
+import org.gjt.sp.util.Log;
+
+public class QuickNotepadToolPanel extends JPanel
+{
+ private QuickNotepad pad;
+ private JLabel label;
+
+ public QuickNotepadToolPanel(QuickNotepad qnpad)
+ {
+ pad = qnpad;
+ JToolBar toolBar = new JToolBar();
+ toolBar.setFloatable(false);
+
+ toolBar.add(makeCustomButton("quicknotepad.choose-file",
+ new ActionListener() {
+ public void actionPerformed(ActionEvent evt) {
+ QuickNotepadToolPanel.this.pad.chooseFile();
+ }
+ }));
+ toolBar.add(makeCustomButton("quicknotepad.save-file",
+ new ActionListener() {
+ public void actionPerformed(ActionEvent evt) {
+ QuickNotepadToolPanel.this.pad.saveFile();
+ }
+ }));
+ toolBar.add(makeCustomButton("quicknotepad.copy-to-buffer",
+ new ActionListener() {
+ public void actionPerformed(ActionEvent evt) {
+ QuickNotepadToolPanel.this.pad.copyToBuffer();
+ }
+ }));
+ label = new JLabel(pad.getFilename(), SwingConstants.RIGHT);
+ label.setForeground(Color.black);
+ label.setVisible(jEdit.getProperty(
+ QuickNotepadPlugin.OPTION_PREFIX + "show-filepath").equals("true"));
+ this.setLayout(new BorderLayout(10, 0));
+ this.add(BorderLayout.WEST, toolBar);
+ this.add(BorderLayout.CENTER, label);
+ this.setBorder(BorderFactory.createEmptyBorder(0, 0, 3, 10));
+ }
+
+
+ void propertiesChanged()
+ {
+ label.setText(pad.getFilename());
+ label.setVisible(jEdit.getProperty(
+ QuickNotepadPlugin.OPTION_PREFIX + "show-filepath").equals("true"));
+ }
+
+ private AbstractButton makeCustomButton(String name, ActionListener listener)
+ {
+ String icon = jEdit.getProperty(name + ".icon");
+ java.net.URL u = getClass().getResource(icon);
+ String toolTip = jEdit.getProperty(name.concat(".label"));
+ AbstractButton b = new JButton(new ImageIcon(u));
+ if(listener != null)
+ {
+ b.addActionListener(listener);
+ b.setEnabled(true);
+ }
+ else
+ {
+ b.setEnabled(false);
+ }
+ b.setToolTipText(toolTip);
+ b.setMargin(new Insets(0,0,0,0));
+ b.setAlignmentY(0.0f);
+ b.setRequestFocusEnabled(false);
+ return b;
+ }
+
+}
diff --git a/README.txt b/README.txt
new file mode 100644
index 0000000..bec18ef
--- /dev/null
+++ b/README.txt
@@ -0,0 +1,7 @@
+QUICK NOTEPAD PLUGIN
+
+The jEdit source distribution includes source code for an example plugin
+named 'QuickNotepad', written by John Gellene.
+
+The plugin source is discussed in detail in the 'Writing Plugins' part
+of the user's guide.
diff --git a/Save.gif b/Save.gif
new file mode 100644
index 0000000..fba286d
Binary files /dev/null and b/Save.gif differ
diff --git a/actions.xml b/actions.xml
new file mode 100644
index 0000000..de3ba3d
--- /dev/null
+++ b/actions.xml
@@ -0,0 +1,46 @@
+<!DOCTYPE ACTIONS SYSTEM "actions.dtd">
+
+<ACTIONS>
+ <ACTION NAME="quicknotepad.toggle">
+ <CODE>
+ view.getDockableWindowManager()
+ .toggleDockableWindow(QuickNotepadPlugin.NAME);
+ </CODE>
+ <IS_SELECTED>
+ return view.getDockableWindowManager()
+ .isDockableWindowVisible(QuickNotepadPlugin.NAME);
+ </IS_SELECTED>
+ </ACTION>
+
+ <ACTION NAME="quicknotepad-to-front">
+ <CODE>
+ view.getDockableWindowManager()
+ .addDockableWindow(QuickNotepadPlugin.NAME);
+ </CODE>
+ </ACTION>
+
+ <ACTION NAME="quicknotepad.choose-file">
+ <CODE>
+ wm = view.getDockableWindowManager();
+ wm.addDockableWindow(QuickNotepadPlugin.NAME);
+ wm.getDockableWindow(QuickNotepadPlugin.NAME).chooseFile();
+ </CODE>
+ </ACTION>
+
+ <ACTION NAME="quicknotepad.save-file">
+ <CODE>
+ wm = view.getDockableWindowManager();
+ wm.addDockableWindow(QuickNotepadPlugin.NAME);
+ wm.getDockableWindow(QuickNotepadPlugin.NAME).saveFile();
+ </CODE>
+ </ACTION>
+
+ <ACTION NAME="quicknotepad.copy-to-buffer">
+ <CODE>
+ wm = view.getDockableWindowManager();
+ wm.addDockableWindow(QuickNotepadPlugin.NAME);
+ wm.getDockableWindow(QuickNotepadPlugin.NAME).copyToBuffer();
+ </CODE>
+ </ACTION>
+</ACTIONS>
+
diff --git a/makefile.jmk b/makefile.jmk
new file mode 100644
index 0000000..6e25466
--- /dev/null
+++ b/makefile.jmk
@@ -0,0 +1,68 @@
+# A plugin makefile
+#
+# To recompile this plugin, start jmk in the plugin's source directory.
+#
+
+jar_name = "QuickNotepad";
+
+##
+# javac executable and args
+##
+#javac_bin = "javac";
+#javac_opts = "-deprecation";
+
+javac_bin = "jikes";
+javac_opts = "-g" "-deprecation" "+E";
+
+# set up the class path
+new_class_path = "../../jedit.jar;../EditBus.jar;.";
+old_class_path = (getprop "java.class.path");
+
+# concatenate the old and new class paths
+if (equal "", old_class_path) then class_path = new_class_path;
+else class_path = (cat old_class_path ";" new_class_path); end
+
+cmd_javac = javac_bin "-classpath" class_path javac_opts;
+
+#javac_bin "-classpath" class_path javac_opts;
+
+##
+# jar executable and args
+##
+jar_bin = "jar";
+jar_opts = "cf0";
+cmd_jar = jar_bin jar_opts;
+
+srcs = (subst ".java", ".class",
+ (glob (join (join (dirs "."), "/"), "*Plugin.java" "*.java"))
+);
+jar = (cat "../" jar_name ".jar");
+
+get_files = function (dummy)
+{
+ extensions = "class" "gif" "html" "props";
+ file_globs = (join "/*.", extensions);
+ other_files = "actions.xml";
+
+ (glob (join (dirs "."), file_globs)) other_files
+}
+end;
+
+"all": jar;
+
+"%.class" : "%.java";
+{
+ exec cmd_javac <;
+}
+
+jar: srcs;
+{
+ exec cmd_jar @ (get_files "1");
+}
+
+"clean":;
+{
+ delete (glob (join (dirs "."), "/*.class"));
+}
+
+".PHONY": "all";
-----------------------------------------------------------------------
hooks/post-receive
--
QuickNotepad jEdit plugin
|