changeset 5075:a28ac21a0bd2

merge local changes
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Tue, 01 Sep 2009 20:44:51 +0200
parents 4e18a63ff298 (diff) 31acc64360d0 (current diff)
children 9ceece3ef751
files
diffstat 2148 files changed, 262856 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MoinMoin/action/anywikidraw.py	Tue Sep 01 20:44:51 2009 +0200
@@ -0,0 +1,249 @@
+# -*- coding: iso-8859-2 -*-
+"""
+    MoinMoin - anywikidraw
+
+    This action is used to call anywikidraw (http://sourceforge.net/projects/anywikidraw/)
+
+    @copyright: 2001 by Ken Sugino (sugino@mediaone.net),
+                2001-2004 by Juergen Hermann <jh@web.de>,
+                2005 MoinMoin:AlexanderSchremmer,
+                2005 DiegoOngaro at ETSZONE (diego@etszone.com),
+                2007-2008 MoinMoin:ThomasWaldmann,
+                2005-2009 MoinMoin:ReimarBauer
+    @license: GNU GPL, see COPYING for details.
+"""
+import os, re
+
+from MoinMoin import log
+logging = log.getLogger(__name__)
+
+from MoinMoin import config, wikiutil
+from MoinMoin.action import AttachFile, do_show
+from MoinMoin.Page import Page
+
+action_name = __name__.split('.')[-1]
+
+def _write_stream(content, stream, bufsize=8192):
+    if hasattr(content, 'read'): # looks file-like
+        import shutil
+        shutil.copyfileobj(content, stream, bufsize)
+    elif isinstance(content, str):
+        stream.write(content)
+    else:
+        logging.error("unsupported content object: %r" % content)
+        raise
+
+def gedit_drawing(self, url, text, **kw):
+    # This is called for displaying a drawing image by gui editor.
+    _ = self.request.getText
+    # TODO: this 'text' argument is kind of superfluous, replace by using alt=... kw arg
+    # ToDo: make this clickable for the gui editor
+    if 'alt' not in kw or not kw['alt']:
+        kw['alt'] = text
+    # we force the title here, needed later for html>wiki converter
+    kw['title'] = "drawing:%s" % wikiutil.quoteWikinameURL(url)
+    pagename, drawing = AttachFile.absoluteName(url, self.page.page_name)
+    containername = wikiutil.taintfilename(drawing) + ".tdraw"
+    drawing_url = AttachFile.getAttachUrl(pagename, containername, self.request, drawing=drawing, upload=True)
+    ci = AttachFile.ContainerItem(self.request, pagename, containername)
+    if not ci.exists():
+        title = _('Create new drawing "%(filename)s (opens in new window)"') % {'filename': drawing}
+        img = self.icon('attachimg')  # TODO: we need a new "drawimg" in similar grey style and size
+        css = 'nonexistent'
+        return self.url(1, drawing_url, css=css, title=title) + img + self.url(0)
+    kw['src'] = ci.member_url(drawing + u'.png')
+    return self.image(**kw)
+
+def attachment_drawing(self, url, text, **kw):
+    # This is called for displaying a clickable drawing image by text_html formatter.
+    # XXX text arg is unused!
+    _ = self.request.getText
+    pagename, drawing = AttachFile.absoluteName(url, self.page.page_name)
+    containername = wikiutil.taintfilename(drawing) + ".tdraw"
+
+    drawing_url = AttachFile.getAttachUrl(pagename, containername, self.request, drawing=drawing, upload=True)
+    ci = AttachFile.ContainerItem(self.request, pagename, containername)
+    if not ci.exists():
+        title = _('Create new drawing "%(filename)s (opens in new window)"') % {'filename': drawing}
+        img = self.icon('attachimg')  # TODO: we need a new "drawimg" in similar grey style and size
+        css = 'nonexistent'
+        return self.url(1, drawing_url, css=css, title=title) + img + self.url(0)
+
+    title = _('Edit drawing %(filename)s (opens in new window)') % {'filename': self.text(drawing)}
+    kw['src'] = src = ci.member_url(drawing + u'.png')
+    kw['css'] = 'drawing'
+
+    try:
+        mapfile = ci.get(drawing + u'.map')
+        map = mapfile.read()
+        mapfile.close()
+    except (KeyError, IOError, OSError):
+        map = ''
+    if map:
+        # XXX check how that is done by josef
+        # we have a image map. inline it and add a map ref to the img tag
+        mapid = 'ImageMapOf' + drawing
+        map = map.replace('%MAPNAME%', mapid)
+        # add alt and title tags to areas
+        map = re.sub(r'href\s*=\s*"((?!%ANYWIKIDRAW%).+?)"', r'href="\1" alt="\1" title="\1"', map)
+        map = map.replace('%ANYWIKIDRAW%"', '%s" alt="%s" title="%s"' % (drawing_url, title, title))
+        # unxml, because 4.01 concrete will not validate />
+        map = map.replace('/>', '>')
+        title = _('Clickable drawing: %(filename)s') % {'filename': self.text(drawing)}
+        if 'title' not in kw:
+            kw['title'] = title
+        if 'alt' not in kw:
+            kw['alt'] = kw['title']
+        kw['usemap'] = '#'+mapid
+        return map + self.image(**kw)
+    else:
+        if 'title' not in kw:
+            kw['title'] = title
+        if 'alt' not in kw:
+            kw['alt'] = kw['title']
+        return self.url(1, drawing_url) + self.image(**kw) + self.url(0)
+
+class AnyWikiDraw(object):
+    """ anywikidraw action """
+    def __init__(self, request, pagename, target):
+        self._ = request.getText
+        self.request = request
+        self.pagename = pagename
+        self.target = target
+
+    def render_msg(self, msg, msgtype):
+        """ Called to display some message (can also be the action form) """
+        self.request.theme.add_msg(msg, msgtype)
+        do_show(self.pagename, self.request)
+
+    def save(self):
+        _ = self._
+        pagename = self.pagename
+        request = self.request
+        target = self.target
+        if not request.user.may.write(pagename):
+            return _('You are not allowed to save a drawing on this page.')
+        file_upload = request.files.get('filepath')
+        print "file_upload: %s" % file_upload
+        if not file_upload:
+            # This might happen when trying to upload file names
+            # with non-ascii characters on Safari.
+            return _("No file content. Delete non ASCII characters from the file name and try again.")
+
+        filename = request.form['filename']
+        basepath, basename = os.path.split(filename)
+        basename, ext = os.path.splitext(basename)
+        basename = basename.replace('.svg', '')
+
+        ci = AttachFile.ContainerItem(request, pagename, basename + '.tdraw')
+        filecontent = file_upload.stream
+        content_length = None
+        if ext == '.svg': # TWikiDraw POSTs this first
+            AttachFile._addLogEntry(request, 'ATTDRW', pagename, basename + '.tdraw')
+            ci.truncate()
+            filecontent = filecontent.read() # read file completely into memory
+            filecontent = filecontent.replace("\r", "")
+        elif ext == '.map':
+            # touch attachment directory to invalidate cache if new map is saved
+            attach_dir = AttachFile.getAttachDir(request, pagename)
+            os.utime(attach_dir, None)
+            filecontent = filecontent.read() # read file completely into memory
+            filecontent = filecontent.strip()
+        else:
+            #content_length = file_upload.content_length
+            # XXX gives -1 for wsgiref :( If this is fixed, we could use the file obj,
+            # without reading it into memory completely:
+            filecontent = filecontent.read()
+
+        if filecontent:
+            ci.put(basename + ext, filecontent, content_length)
+
+    def render(self):
+        _ = self._
+        request = self.request
+        pagename = self.pagename
+        target = self.target
+        url = request.getQualifiedURL()
+        target_url = ''
+        drawing_name = ''
+
+        htdocs = "%s%s" % (request.cfg.url_prefix_static, '/applets/anywikidraw')
+        ci = AttachFile.ContainerItem(request, pagename, target + '.tdraw')
+        if ci.exists():
+            drawing_name = "%s.svg" % target
+            target_url = ci.member_url(target + '.svg')
+
+        html = """
+    <h2> %(editdrawing)s </h2>
+<!--
+    Document   : anywikidraw_for_twiki_demo
+    Created on : May 13, 2008, 7:32:27 AM
+    Author     : werni
+    Version    : $Id: anywikidraw_for_twiki_demo.html 107 2009-06-15 19:33:05Z rawcoder $
+
+    adjusted for MoinMoin 2009-08-29 ReimarBauer
+-->
+        <applet codebase="."
+                archive="%(htdocs)s/lib/AnyWikiDrawForTWiki.jar"
+                code=org.anywikidraw.twiki.TWikiDrawingApplet.class
+                width="800" height="600">
+
+           <!-- The following parameters are used to tell AnyWikiDraw how to communicate with MoinMoin.
+           -->
+           <param name="DrawingName" value="%(target)s.svg"/>
+           <param name="DrawingWidth" value="800"/>
+           <param name="DrawingHeight" value="600"/>
+           <param name="DrawingURL" value="%(target_url)s"/>
+           <param name="PageURL" value="%(url)s/%(pagename)s/">
+           <param name="UploadURL" value="%(pagename)s?action=anywikidraw&do=save&target=%(target)s.svg"/>
+
+           <!-- The following parameters are used to configure the drawing applet -->
+           <param name="Locale" value="en"/>
+
+           <!-- The following parameters are used to configure Sun's Java Plug-In -->
+           <param name="codebase_lookup" value="false"/>
+           <param name="classloader_cache" value="false"/>
+           <param name="java_arguments" value="-Djnlp.packEnabled=true"/>
+           <param name="image" value="lib/Splash.gif"/>
+           <param name="boxborder" value="false"/>
+           <param name="centerimage" value="true"/>
+        </applet>
+""" % {'htdocs': htdocs,
+       'pagename': pagename,
+       'target': target,
+       'drawing_name': drawing_name,
+       'target_url': target_url,
+       'url': url,
+       'editdrawing': _('Edit drawing'),
+       }
+
+        title = '%s:%s' % (pagename, target)
+        request.theme.send_title(title, page=request.page, pagename=pagename)
+        request.write(request.formatter.startContent("content"))
+        request.write(request.formatter.rawHTML(html))
+        request.write(request.formatter.endContent())
+        request.theme.send_footer(pagename)
+        request.theme.send_closing_html()
+
+def execute(pagename, request):
+    _ = request.getText
+    msg = None
+    if not request.user.may.read(pagename):
+        msg = '<p>%s</p>' % _('You are not allowed to view this page.')
+        AnyWikiDraw(request, pagename, target).render_msg(msg, 'error')
+        return
+
+    target = request.values.get('target', '')
+    if not target:
+        msg = '<p>%s</p>' % _("Empty target given.")
+        AnyWikiDraw(request, pagename, target).render_msg(msg, 'error')
+        return
+
+    do = request.values.get('do', '')
+    if do == 'save' and request.user.may.write(pagename):
+        msg = AnyWikiDraw(request, pagename, target).save()
+        AnyWikiDraw(request, pagename, target).render_msg(msg, 'error')
+        return
+
+    AnyWikiDraw(request, pagename, target).render()
+
--- a/MoinMoin/action/twikidraw.py	Sun Aug 30 23:26:23 2009 +0200
+++ b/MoinMoin/action/twikidraw.py	Tue Sep 01 20:44:51 2009 +0200
@@ -34,6 +34,27 @@
         logging.error("unsupported content object: %r" % content)
         raise
 
+def gedit_drawing(self, url, text, **kw):
+    # This is called for displaying a drawing image by gui editor.
+    _ = self.request.getText
+    # TODO: this 'text' argument is kind of superfluous, replace by using alt=... kw arg
+    # ToDo: make this clickable for the gui editor
+    if 'alt' not in kw or not kw['alt']:
+        kw['alt'] = text
+    # we force the title here, needed later for html>wiki converter
+    kw['title'] = "drawing:%s" % wikiutil.quoteWikinameURL(url)
+    pagename, drawing = AttachFile.absoluteName(url, self.page.page_name)
+    containername = wikiutil.taintfilename(drawing) + ".tdraw"
+    drawing_url = AttachFile.getAttachUrl(pagename, containername, self.request, drawing=drawing, upload=True)
+    ci = AttachFile.ContainerItem(self.request, pagename, containername)
+    if not ci.exists():
+        title = _('Create new drawing "%(filename)s (opens in new window)"') % {'filename': drawing}
+        img = self.icon('attachimg')  # TODO: we need a new "drawimg" in similar grey style and size
+        css = 'nonexistent'
+        return self.url(1, drawing_url, css=css, title=title) + img + self.url(0)
+    kw['src'] = ci.member_url(drawing + u'.png')
+    return self.image(**kw)
+
 def attachment_drawing(self, url, text, **kw):
     # This is called for displaying a clickable drawing image by text_html formatter.
     # XXX text arg is unused!
--- a/MoinMoin/formatter/text_gedit.py	Sun Aug 30 23:26:23 2009 +0200
+++ b/MoinMoin/formatter/text_gedit.py	Tue Sep 01 20:44:51 2009 +0200
@@ -93,19 +93,13 @@
         return self.image(**kw)
 
     def attachment_drawing(self, url, text, **kw):
-        _ = self.request.getText
-        # TODO: this 'text' argument is kind of superfluous, replace by using alt=... kw arg
-        if 'alt' not in kw or not kw['alt']:
-            kw['alt'] = text
-        # we force the title here, needed later for html>wiki converter
-        kw['title'] = "drawing:%s" % wikiutil.quoteWikinameURL(url)
-        pagename = self.page.page_name
-        if '/' in url:
-            pagename, target = AttachFile.absoluteName(url, pagename)
-            url = url.split('/')[-1]
-        url += '.png'
-        kw['src'] = AttachFile.getAttachUrl(pagename, url, self.request, addts=1)
-        return self.image(**kw)
+        # Todo get it to start the drawing editor on a click
+        try:
+            attachment_drawing = wikiutil.importPlugin(self.request.cfg, 'action',
+                                              self.request.cfg.drawing_action, 'gedit_drawing')
+            return attachment_drawing(self, url, text, **kw)
+        except (wikiutil.PluginMissingError, wikiutil.PluginAttributeError):
+            return url
 
     def icon(self, type):
         return self.request.theme.make_icon(type, title='smiley:%s' % type)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MoinMoin/web/static/htdocs/applets/anywikidraw/README	Tue Sep 01 20:44:51 2009 +0200
@@ -0,0 +1,3 @@
+
+The sources to this applet can be found in contrib/AnyWikiDraw
+of the MoinMoin source distribution.
Binary file MoinMoin/web/static/htdocs/applets/anywikidraw/lib/AnyWikiDrawForTWiki.jar has changed
Binary file MoinMoin/web/static/htdocs/applets/anywikidraw/lib/AnyWikiDrawForTWiki.jar.pack.gz has changed
Binary file MoinMoin/web/static/htdocs/applets/anywikidraw/lib/Splash.gif has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/AnyWikiDraw/AnyWikiDraw/applet.policy	Tue Sep 01 20:44:51 2009 +0200
@@ -0,0 +1,3 @@
+grant {
+permission java.security.AllPermission;
+};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/AnyWikiDraw/AnyWikiDraw/build-all.xml	Tue Sep 01 20:44:51 2009 +0200
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Builds the "JHotDraw Draw" demo application and demo applet. -->
+<project name="build-all" default="all" basedir=".">
+    <target name="init">
+        <property name="version" value="0.13.3"/>
+        <property name="dist.all" value="dist/AnyWikiDraw ${version}"/>
+    </target>
+    <target name="clean" depends="init">
+        <delete dir="${dist.all}" />
+    </target>
+
+    <target name="dist-all" depends="clean">
+        <ant antfile="build-for-mediawiki.xml" target="dist"/>
+        <ant antfile="build-for-pmwiki.xml" target="dist"/>
+        <ant antfile="build-for-twiki.xml" target="dist"/>
+        <ant antfile="build-standalone.xml" target="dist"/>
+    </target>
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/AnyWikiDraw/AnyWikiDraw/build-before-profiler.xml	Tue Sep 01 20:44:51 2009 +0200
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- You may freely edit this file. See commented blocks below for -->
+<!-- some examples of how to customize the build. -->
+<!-- (If you delete it and reopen the project it will be recreated.) -->
+<!-- By default, only the Clean and Build commands use this build script. -->
+<!-- Commands such as Run, Debug, and Test only use this build script if -->
+<!-- the Compile on Save feature is turned off for the project. -->
+<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
+<!-- in the project's Project Properties dialog box.-->
+<project name="AnyWikiDraw" default="default" basedir=".">
+    <description>Builds, tests, and runs the project AnyWikiDraw.</description>
+    <import file="nbproject/build-impl.xml"/>
+    <!--
+
+    There exist several targets which are by default empty and which can be 
+    used for execution of your tasks. These targets are usually executed 
+    before and after some main targets. They are: 
+
+      -pre-init:                 called before initialization of project properties
+      -post-init:                called after initialization of project properties
+      -pre-compile:              called before javac compilation
+      -post-compile:             called after javac compilation
+      -pre-compile-single:       called before javac compilation of single file
+      -post-compile-single:      called after javac compilation of single file
+      -pre-compile-test:         called before javac compilation of JUnit tests
+      -post-compile-test:        called after javac compilation of JUnit tests
+      -pre-compile-test-single:  called before javac compilation of single JUnit test
+      -post-compile-test-single: called after javac compilation of single JUunit test
+      -pre-jar:                  called before JAR building
+      -post-jar:                 called after JAR building
+      -post-clean:               called after cleaning build products
+
+    (Targets beginning with '-' are not intended to be called on their own.)
+
+    Example of inserting an obfuscator after compilation could look like this:
+
+        <target name="-post-compile">
+            <obfuscate>
+                <fileset dir="${build.classes.dir}"/>
+            </obfuscate>
+        </target>
+
+    For list of available properties check the imported 
+    nbproject/build-impl.xml file. 
+
+
+    Another way to customize the build is by overriding existing main targets.
+    The targets of interest are: 
+
+      -init-macrodef-javac:     defines macro for javac compilation
+      -init-macrodef-junit:     defines macro for junit execution
+      -init-macrodef-debug:     defines macro for class debugging
+      -init-macrodef-java:      defines macro for class execution
+      -do-jar-with-manifest:    JAR building (if you are using a manifest)
+      -do-jar-without-manifest: JAR building (if you are not using a manifest)
+      run:                      execution of project 
+      -javadoc-build:           Javadoc generation
+      test-report:              JUnit report generation
+
+    An example of overriding the target for project execution could look like this:
+
+        <target name="run" depends="AnyWikiDraw-impl.jar">
+            <exec dir="bin" executable="launcher.exe">
+                <arg file="${dist.jar}"/>
+            </exec>
+        </target>
+
+    Notice that the overridden target depends on the jar target and not only on 
+    the compile target as the regular run target does. Again, for a list of available 
+    properties which you can use, check the target you are overriding in the
+    nbproject/build-impl.xml file. 
+
+    -->
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/AnyWikiDraw/AnyWikiDraw/build-for-mediawiki.xml	Tue Sep 01 20:44:51 2009 +0200
@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Builds the AnyWikiDraw extension for MediaWiki. -->
+<project name="build-mediawikidraw" default="all" basedir=".">
+    <target name="init">
+        <property name="version" value="0.13.3"/>
+        
+        <property name="lib" value="lib"/>
+        <property name="src.main" value="src/main/java"/>
+        <property name="src.jhotdraw" value="src/jhotdraw7/java"/>
+        <property name="src.mediawiki1.7" value="src/main/wiki/mediawiki 1.7 to 1.10/extensions/AnyWikiDraw"/>
+        <property name="src.mediawiki1.12" value="src/main/wiki/mediawiki 1.12 to 1.15/extensions/AnyWikiDraw"/>
+        <property name="build" value="build/classes"/>
+        <property name="dist" value="dist/AnyWikiDraw ${version}/anywikidraw"/>
+        <property name="dist.extensions1.7" value="${dist}/mediawiki 1.7 to 1.10/extensions/AnyWikiDraw"/>
+        <property name="dist.extensions1.12" value="${dist}/mediawiki 1.12 to 1.15/extensions/AnyWikiDraw"/>
+        <property name="author" value="Werner Randelshofer, AnyWikiDraw.org"/>
+        <property name="keystore.file" value="../../../../_Keystore/JavaKeystore"/>
+        <property name="keystore.alias" value="werner"/>
+        <property name="keystore.storepass" value="werner"/>
+        <property name="debug" value="false"/>
+    </target>
+    <target name="clean" depends="init">
+        <delete dir="${build}" />
+    </target>
+    <target name="dist" depends="clean,applet.signedjar">
+    </target>
+    <target name="applet.compile" depends="init,clean">
+        <mkdir dir="${build}"/>
+        <javac
+                destdir="${build}"
+                srcdir="${src.main}:${src.jhotdraw}"
+                debug="${debug}"
+                source="1.5"
+                encoding="UTF-8"
+                optimize="true"
+         >
+            <classpath path="${lib}/java_30.zip"/>
+            <classpath path="${lib}/swing-layout.jar"/>
+            <include name="org/anywikidraw/mediawiki/MediaWikiDrawingApplet.java"/> 
+            <include name="net/n3/nanoxml/StdXMLParser.java" />
+        </javac>
+        <copy todir="${build}">
+            <fileset dir="${src.main}">
+                <include name="org/anywikidraw/any/*.properties"/>
+                <include name="org/anywikidraw/any/**/*.png"/>
+            </fileset>
+        </copy>
+        <copy todir="${build}">
+            <fileset dir="${src.jhotdraw}" >
+                <include name="org/jhotdraw/app/action/images/editCut.png"/>
+                <include name="org/jhotdraw/app/action/images/editCopy.png"/>
+                <include name="org/jhotdraw/app/action/images/editPaste.png"/>
+                <include name="org/jhotdraw/app/action/images/spacerIcon.png"/>
+                <include name="org/jhotdraw/app/Label*.properties"/>
+
+                <include name="org/jhotdraw/gui/Label*.properties"/>
+
+                <include name="org/jhotdraw/draw/Label*.properties"/>
+                <include name="org/jhotdraw/draw/action/images/*.png"/>
+
+                <include name="org/jhotdraw/samples/svg/action/images/*.png"/>
+                <include name="org/jhotdraw/samples/svg/Label*.properties"/>
+
+                <include name="org/jhotdraw/undo/images/*.png"/>
+                <include name="org/jhotdraw/undo/Label*.properties"/>
+            </fileset>
+        </copy>
+        <echo file="${build}/org/anywikidraw/any/version.txt"
+            message="${version}"/>
+    </target>
+    <target name="applet.jar" depends="init,applet.compile">
+        <!--delete dir="${dist}" /-->
+        <mkdir dir="${dist}"/>
+        <copy todir="${dist}">
+            <fileset dir=".">
+                <include name="*.html"/>
+            </fileset>
+        </copy>
+        <delete dir="${dist.extensions1.7}"/>
+        <delete dir="${dist.extensions1.12}"/>
+        <mkdir dir="${dist.extensions1.7}"/>
+        <mkdir dir="${dist.extensions1.12}"/>
+        <jar destfile="${dist.extensions1.7}/AnyWikiDrawForMediaWiki.jar" basedir="${build}"
+        index="true" compress="true">
+            <manifest>
+                <attribute name="Built-By" value="${author}"/>
+                <attribute name="Main-Class" value="org.anywikidraw.mediawiki.MediaWikiDrawingApplet"/>
+            </manifest>
+        </jar>
+        <exec executable="pack200">
+            <arg value="${dist.extensions1.7}/AnyWikiDrawForMediaWiki.jar.pack.gz"/>
+            <arg value="${dist.extensions1.7}/AnyWikiDrawForMediaWiki.jar"/>
+        </exec>
+        <copy todir="${dist.extensions1.12}">
+            <fileset dir="${dist.extensions1.7}">
+                <include name="*.jar*"/>
+            </fileset>
+        </copy>
+        <copy todir="${dist.extensions1.7}">
+            <fileset dir="${src.mediawiki1.7}"/>
+        </copy>
+        <copy todir="${dist.extensions1.12}">
+            <fileset dir="${src.mediawiki1.12}"/>
+        </copy>
+    </target>
+    <target name="applet.signedjar" depends="applet.jar">
+
+        <!-- create a signed version of the .jar file -->
+        <exec executable="pack200">
+            <arg value="-r"/>
+            <arg value="${dist.extensions1.7}/AnyWikiDrawForMediaWiki.jar"/>
+        </exec>
+        <signjar alias="${keystore.alias}"
+                storepass="${keystore.storepass}"
+                keystore="${keystore.file}" 
+                jar="${dist.extensions1.7}/AnyWikiDrawForMediaWiki.jar"
+                
+                >
+        </signjar>
+
+        <!-- create a signed version of the .jar.pack.gz file -->
+        <exec executable="pack200">
+            <arg value="${dist.extensions1.7}/AnyWikiDrawForMediaWiki.jar.pack.gz"/>
+            <arg value="${dist.extensions1.7}/AnyWikiDrawForMediaWiki.jar"/>
+        </exec>
+        <copy todir="${dist.extensions1.12}">
+            <fileset dir="${dist.extensions1.7}">
+                <include name="*.jar*"/>
+            </fileset>
+        </copy>
+        <copy todir="${dist.extensions1.7}">
+            <fileset dir="${src.mediawiki1.7}"/>
+        </copy>
+        <copy todir="${dist.extensions1.12}">
+            <fileset dir="${src.mediawiki1.12}"/>
+        </copy>
+    </target>
+    <target name="applet.run-compiled" depends="init">
+        <java classname="org.anywikidraw.mediawiki.MediaWikiDrawingApplet">
+            <classpath>
+                <pathelement location="${build}"/>
+            <pathelement location="${lib}/java_30.zip"/>
+            <pathelement location="${lib}/swing-layout.jar"/>
+            </classpath>
+        </java>
+    </target>
+    <target name="applet.run-jar" depends="init">
+        <java fork="true" jar="${dist.extensions1.7}/AnyWikiDrawForMediaWiki.jar">
+        </java>
+    </target>
+    <target name="applet.appletviewer" depends="init">
+        <exec executable="appletviewer">
+        <arg value="${build}/mediawikidraw.html"/>
+        </exec>
+    </target>
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/AnyWikiDraw/AnyWikiDraw/build-for-pmwiki.xml	Tue Sep 01 20:44:51 2009 +0200
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Builds the AnyWikiDraw cookbook for PmWiki. -->
+<project name="build-pmwikidraw" default="all" basedir=".">
+    <target name="init">
+        <property name="version" value="0.13.3"/>
+        <property name="lib" value="lib"/>
+        <property name="src.main" value="src/main/java"/>
+        <property name="src.jhotdraw" value="src/jhotdraw7/java"/>
+        <property name="src.pmwiki" value="src/main/wiki/pmwiki/cookbook/AnyWikiDraw"/>
+        <property name="build" value="build/classes"/>
+        <property name="dist" value="dist/AnyWikiDraw ${version}/anywikidraw"/>
+        <property name="dist.extensions" value="${dist}/pmwiki/cookbook/AnyWikiDraw"/>
+        <property name="author" value="Werner Randelshofer, AnyWikiDraw.org"/>
+        <property name="keystore.file" value="../../../../_Keystore/JavaKeystore"/>
+        <property name="keystore.alias" value="werner"/>
+        <property name="keystore.storepass" value="werner"/>
+        <property name="debug" value="false"/>
+    </target>
+    <target name="clean" depends="init">
+        <delete dir="${build}" />
+    </target>
+    <target name="applet.compile" depends="init,clean">
+        <mkdir dir="${build}"/>
+        <javac
+                destdir="${build}"
+                srcdir="${src.main}:${src.jhotdraw}"
+                debug="${debug}"
+                source="1.5"
+                encoding="UTF-8"
+                optimize="true"
+         >
+            <classpath path="${lib}/java_30.zip"/>
+            <classpath path="${lib}/swing-layout.jar"/>
+            <include name="org/anywikidraw/pmwiki/PmWikiDrawingApplet.java"/> 
+            <include name="net/n3/nanoxml/StdXMLParser.java" />
+        </javac>
+        <copy todir="${build}/org/anywikidraw/any">
+            <fileset dir="${src.main}">
+                <include name="org/anywikidraw/any/*.properties"/>
+                <include name="org/anywikidraw/any/**/*.png"/>
+            </fileset>
+        </copy>
+        <copy todir="${build}">
+            <fileset dir="${src.jhotdraw}" >
+                <include name="org/jhotdraw/app/action/images/editCut.png"/>
+                <include name="org/jhotdraw/app/action/images/editCopy.png"/>
+                <include name="org/jhotdraw/app/action/images/editPaste.png"/>
+                <include name="org/jhotdraw/app/action/images/spacerIcon.png"/>
+                <include name="org/jhotdraw/app/Label*.properties"/>
+
+                <include name="org/jhotdraw/gui/Label*.properties"/>
+
+                <include name="org/jhotdraw/draw/Label*.properties"/>
+                <include name="org/jhotdraw/draw/action/images/*.png"/>
+
+                <include name="org/jhotdraw/samples/svg/action/images/*.png"/>
+                <include name="org/jhotdraw/samples/svg/Label*.properties"/>
+
+                <include name="org/jhotdraw/undo/images/*.png"/>
+                <include name="org/jhotdraw/undo/Label*.properties"/>
+            </fileset>
+        </copy>
+        <echo file="${build}/org/anywikidraw/any/version.txt"
+            message="${version}"/>
+    </target>
+    <target name="applet.jar" depends="init,applet.compile">
+        <!--delete dir="${dist}" /-->
+        <mkdir dir="${dist}"/>
+        <copy todir="${dist}">
+            <fileset dir=".">
+                <include name="*.html"/>
+            </fileset>
+        </copy>
+        <delete dir="${dist.extensions}"/>
+        <mkdir dir="${dist.extensions}"/>
+        <jar destfile="${dist.extensions}/AnyWikiDrawForPmWiki.jar" basedir="${build}"
+        index="true" compress="true">
+            <manifest>
+                <attribute name="Built-By" value="${author}"/>
+                <attribute name="Main-Class" value="org.anywikidraw.pmwiki.PmWikiDrawingApplet"/>
+            </manifest>
+        </jar>
+        <exec executable="pack200">
+            <arg value="${dist.extensions}/AnyWikiDrawForPmWiki.jar.pack.gz"/>
+            <arg value="${dist.extensions}/AnyWikiDrawForPmWiki.jar"/>
+        </exec>
+        <copy todir="${dist.extensions}">
+            <fileset dir="${src.pmwiki}"/>
+        </copy>
+    </target>
+    <target name="applet.signedjar" depends="applet.jar">
+        <exec executable="pack200">
+            <arg value="-r"/>
+            <arg value="${dist.extensions}/AnyWikiDrawForPmWiki.jar"/>
+        </exec>
+        <signjar alias="${keystore.alias}" storepass="${keystore.storepass}"
+                keystore="${keystore.file}" 
+                jar="${dist.extensions}/AnyWikiDrawForPmWiki.jar"
+                
+                >
+        </signjar>        
+        <exec executable="pack200">
+            <arg value="${dist.extensions}/AnyWikiDrawForPmWiki.jar.pack.gz"/>
+            <arg value="${dist.extensions}/AnyWikiDrawForPmWiki.jar"/>
+        </exec>
+        <copy todir="${dist.extensions}">
+            <fileset dir="${src.pmwiki}"/>
+        </copy>
+    </target>
+    <target name="applet.run-compiled" depends="init">
+        <java classname="org.anywikidraw.pmwiki.PmWikiDrawingApplet">
+            <classpath>
+                <pathelement location="${build}"/>
+            <pathelement location="${lib}/java_30.zip"/>
+            <pathelement location="${lib}/swing-layout.jar"/>
+            </classpath>
+        </java>
+    </target>
+    <target name="applet.run-jar" depends="init">
+        <java fork="true" jar="${dist.extensions}/AnyWikiDrawForPmWiki.jar">
+        </java>
+    </target>
+    <target name="applet.appletviewer" depends="init">
+        <exec executable="appletviewer">
+        <arg value="${build}/pmwikidraw.html"/>
+        </exec>
+    </target>
+    <target name="dist" depends="clean,applet.signedjar">
+    </target>
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/AnyWikiDraw/AnyWikiDraw/build-for-twiki.xml	Tue Sep 01 20:44:51 2009 +0200
@@ -0,0 +1,189 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Builds the AnyWikiDraw cookbook for TWiki. -->
+<project name="build-twikidraw" default="all" basedir=".">
+    <target name="init">
+        <property name="version" value="0.13.3"/>
+        <property name="src.jhotdraw" value="src/jhotdraw7/java"/>
+        <property name="lib" value="lib"/>
+        <property name="src.main" value="src/main/java"/>
+        <property name="src.twiki4.1" value="src/main/wiki/twiki 4.1"/>
+        <property name="src.twiki4.3" value="src/main/wiki/twiki 4.3"/>
+        <property name="src.demo" value="src/main/wiki/demo"/>
+        <property name="build" value="build/classes"/>
+        <property name="dist" value="dist/AnyWikiDraw ${version}/anywikidraw"/>
+        <property name="dist.twiki4.1" value="${dist}/twiki 4.1"/>
+        <property name="dist.twiki4.3" value="${dist}/twiki 4.3"/>
+        <property name="dist.demo" value="dist/AnyWikiDraw ${version}/demo"/>
+        <property name="dist.applet4.1" value="${dist.twiki4.1}/pub/TWiki/AnyWikiDrawPlugin"/>
+        <property name="dist.applet4.3" value="${dist.twiki4.3}/pub/TWiki/AnyWikiDrawPlugin"/>
+        <property name="author" value="Werner Randelshofer, AnyWikiDraw.org"/>
+        <property name="keystore.file" value="../../../../_Keystore/JavaKeystore"/>
+        <property name="keystore.alias" value="werner"/>
+        <property name="keystore.storepass" value="werner"/>
+        <property name="debug" value="false"/>
+    </target>
+    <target name="clean" depends="init">
+        <delete dir="${build}" />
+        <delete dir="${dist.twiki4.1}" />
+        <delete dir="${dist.twiki4.3}" />
+        <delete dir="${dist.demo}" />
+    </target>
+    
+    <target name="applet.compile" depends="init,clean">
+        <mkdir dir="${build}"/>
+        <javac
+                destdir="${build}"
+                srcdir="${src.main}:${src.jhotdraw}"
+                debug="${debug}"
+                source="1.5"
+                optimize="true"
+                encoding="UTF-8"
+
+         >
+            <classpath path="${lib}/java_30.zip"/>
+            <classpath path="${lib}/swing-layout.jar"/>
+            <include name="org/anywikidraw/twiki/TWikiDrawingApplet.java"/> 
+            <include name="net/n3/nanoxml/StdXMLParser.java" />
+        </javac>
+        <copy todir="${build}/org/anywikidraw/any">
+            <fileset dir="${src.main}">
+                <include name="org/anywikidraw/any/*.properties"/>
+                <include name="org/anywikidraw/any/**/*.png"/>
+            </fileset>
+        </copy>
+        <copy todir="${build}">
+            <fileset dir="${src.jhotdraw}" >
+                <include name="org/jhotdraw/app/action/images/editCut.png"/>
+                <include name="org/jhotdraw/app/action/images/editCopy.png"/>
+                <include name="org/jhotdraw/app/action/images/editPaste.png"/>
+                <include name="org/jhotdraw/app/action/images/spacerIcon.png"/>
+                <include name="org/jhotdraw/app/Label*.properties"/>
+
+                <include name="org/jhotdraw/gui/Label*.properties"/>
+
+                <include name="org/jhotdraw/draw/Label*.properties"/>
+                <include name="org/jhotdraw/draw/action/images/*.png"/>
+
+                <include name="org/jhotdraw/samples/svg/action/images/*.png"/>
+                <include name="org/jhotdraw/samples/svg/Label*.properties"/>
+
+                <include name="org/jhotdraw/undo/images/*.png"/>
+                <include name="org/jhotdraw/undo/Label*.properties"/>
+            </fileset>
+        </copy>
+        <echo file="${build}/org/anywikidraw/any/version.txt"
+            message="${version}"/>
+    </target>
+   
+    <target name="applet.jar" depends="init,applet.compile">
+        <!--delete dir="${dist}" /-->
+        <mkdir dir="${dist}"/>
+        <copy todir="${dist}">
+            <fileset dir=".">
+                <include name="*.html"/>
+            </fileset>
+        </copy>
+        <delete dir="${dist.twiki4.1}"/>
+        <mkdir dir="${dist.twiki4.1}"/>
+        <delete dir="${dist.twiki4.3}"/>
+        <mkdir dir="${dist.twiki4.3}"/>
+        <mkdir dir="${dist.applet4.1}"/>
+        <jar destfile="${dist.applet4.1}/AnyWikiDrawForTWiki.jar" basedir="${build}"
+        index="true" compress="true">
+            <manifest>
+                <attribute name="Built-By" value="${author}"/>
+                <attribute name="Main-Class" value="org.anywikidraw.twiki.TWikiDrawingApplet"/>
+                <attribute name="Implementation-Version" value="${version}"/>
+            </manifest>
+        </jar>
+        <exec executable="pack200">
+            <arg value="${dist.applet4.1}/AnyWikiDrawForTWiki.jar.pack.gz"/>
+            <arg value="${dist.applet4.1}/AnyWikiDrawForTWiki.jar"/>
+        </exec>
+        <copy todir="${dist.applet4.3}">
+            <fileset dir="${dist.applet4.1}">
+                <include name="*.jar" />
+                <include name="*.jar.pack.gz" />
+            </fileset>
+        </copy>
+        <copy todir="${dist.twiki4.1}">
+            <fileset dir="${src.twiki4.1}">
+                <exclude name="**/.*" />
+            </fileset>
+        </copy>
+        <copy todir="${dist.twiki4.3}">
+            <fileset dir="${src.twiki4.3}">
+                <exclude name="**/.*" />
+            </fileset>
+        </copy>
+    </target>
+    <target name="applet.signedjar" depends="applet.jar">
+        
+        <!-- create a signed version of the .jar file -->
+        <exec executable="pack200">
+            <arg value="-r"/>
+            <arg value="${dist.applet4.1}/AnyWikiDrawForTWiki.jar"/>
+        </exec>
+        <signjar alias="${keystore.alias}" storepass="${keystore.storepass}"
+                keystore="${keystore.file}" 
+                jar="${dist.applet4.1}/AnyWikiDrawForTWiki.jar"
+                >
+        </signjar>        
+        
+        <!-- create a signed version of the .jar.pack.gz file -->
+        <exec executable="pack200">
+            <arg value="${dist.applet4.1}/AnyWikiDrawForTWiki.jar.pack.gz"/>
+            <arg value="${dist.applet4.1}/AnyWikiDrawForTWiki.jar"/>
+        </exec>
+        <copy todir="${dist.applet4.3}">
+            <fileset dir="${dist.applet4.1}">
+                <include name="*.jar" />
+                <include name="*.jar.pack.gz" />
+            </fileset>
+        </copy>
+    </target>
+    <target name="dist" depends="clean,applet.signedjar">
+        
+        <!-- create a directory for the demo -->
+        <mkdir dir="${dist.demo}"/>
+        
+        <!-- copy files needed for the demo -->
+        <copy todir="${dist.demo}">
+            <fileset dir="${src.demo}">
+                <exclude name="**/.*"/>
+            </fileset>
+        </copy>
+        <copy todir="${dist.demo}/lib">
+            <fileset dir="${dist.applet4.3}">
+                <include name="AnyWikiDraw*jar*"/>
+            </fileset>
+        </copy>
+        
+        <zip file="${dist}/anywikidraw-${version}-for-twiki-4.1.zip">
+            <fileset dir="${dist.twiki4.1}">
+                <exclude name="**/.*"/>
+            </fileset>
+        </zip>
+        <zip file="${dist}/anywikidraw-${version}-for-twiki-4.3.zip">
+            <fileset dir="${dist.twiki4.3}">
+                <exclude name="**/.*"/>
+            </fileset>
+        </zip>
+
+        <delete dir="${dist.twiki4.1}"/>
+        <delete dir="${dist.twiki4.3}"/>
+    </target>
+    <target name="applet.run-jar" depends="init">
+        <java fork="true" jar="${dist.applet4.3}/AnyWikiDrawForTWiki.jar">
+        </java>
+    </target>
+    <target name="applet.run-compiled" depends="init">
+        <java fork="true" classpath="${build}" classname="org.anywikidraw.twiki.TWikiDrawingApplet">
+        </java>
+    </target>
+    <target name="applet.appletviewer" depends="init">
+        <exec executable="appletviewer">
+        <arg value="${build}/twikidraw.html"/>
+        </exec>
+    </target>
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/AnyWikiDraw/AnyWikiDraw/build-standalone.xml	Tue Sep 01 20:44:51 2009 +0200
@@ -0,0 +1,149 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Builds the "JHotDraw Draw" demo application and demo applet. -->
+<project name="build-anywikidraw" default="all" basedir=".">
+    <target name="init">
+        <property name="version" value="0.13.3"/>
+        <property name="project.jhotdraw.src" value="../../../../JHotDraw/current/trunk/jhotdraw7/src/main/java"/>
+        <property name="lib" value="lib"/>
+        <property name="src.main" value="src/main/java"/>
+        <property name="guide" value="guide"/>
+        <property name="src.jhotdraw" value="src/jhotdraw7/java"/>
+        <property name="build" value="build/classes"/>
+        <property name="dist.final" value="dist"/>
+        <property name="dist" value="dist/AnyWikiDraw ${version}"/>
+        <property name="dist.guide" value="dist/AnyWikiDraw ${version}/guide"/>
+        <property name="author" value="Werner Randelshofer, AnyWikiDraw.org"/>
+        <property name="keystore.file" value="../../../../_Keystore/JavaKeystore"/>
+        <property name="keystore.alias" value="werner"/>
+        <property name="keystore.storepass" value="werner"/>
+        <property name="version" value="0.11"/>
+    </target>
+    <target name="clean" depends="init">
+        <delete dir="${build}" />
+    </target>
+    <target name="copy sources from JHotDraw project" depends="init">
+        <!--delete dir="${src.jhotdraw}">
+            <exclude name="**/.*"/>
+            <exclude name="**/.*/**"/>
+        </delete-->
+        <mkdir dir="${src.jhotdraw}"/>
+        <copy todir="${src.jhotdraw}" overwrite="true">
+            <fileset dir="${project.jhotdraw.src}">
+            <exclude name="**/.*"/>
+            <exclude name="**/.*/**"/>
+            </fileset>
+        </copy>
+    </target>
+    <target name="app.compile" depends="init,clean">
+        <mkdir dir="${build}"/>
+        <javac
+                destdir="${build}"
+                srcdir="${src.main}:${src.jhotdraw}"
+                debug="true"
+                source="1.5"
+                optimize="true"
+                encoding="UTF-8"
+         >
+            <classpath path="${lib}/java_30.zip"/>
+            <classpath path="${lib}/quaqua.jar"/>
+            <classpath path="${lib}/MRJAdapter.jar"/>
+            <classpath path="${lib}/swing-layout.jar"/>
+
+            <include name="org/anywikidraw/any/Main.java"/> 
+            <include name="net/n3/nanoxml/StdXMLParser.java" />
+        </javac>
+
+        <copy todir="${build}/org/anywikidraw/any">
+            <fileset dir="${src.main}">
+                <include name="org/anywikidraw/any/*.properties"/>
+                <include name="org/anywikidraw/any/**/*.png"/>
+            </fileset>
+        </copy>
+        <copy todir="${build}">
+            <fileset dir="${src.jhotdraw}" >
+                <include name="org/jhotdraw/app/action/images/*.png"/>
+                <include name="org/jhotdraw/app/Label*.properties"/>
+
+                <include name="org/jhotdraw/gui/Label*.properties"/>
+
+                <include name="org/jhotdraw/draw/Label*.properties"/>
+                <include name="org/jhotdraw/draw/action/images/*.png"/>
+
+                <include name="org/jhotdraw/samples/svg/action/images/*.png"/>
+                <include name="org/jhotdraw/samples/svg/Label*.properties"/>
+
+                <include name="org/jhotdraw/undo/images/*.png"/>
+                <include name="org/jhotdraw/undo/Label*.properties"/>
+            </fileset>
+        </copy>
+        <echo file="${build}/org/anywikidraw/any/version.txt"
+            message="${version}"/>
+    </target>
+    <target name="app.jar" depends="init,app.compile">
+        <mkdir dir="${dist}"/>
+        <unjar src="${lib}/MRJAdapter.jar" dest="${build}"/>
+        <unjar src="${lib}/appframework-0.30.jar" dest="${build}"/>
+        <unjar src="${lib}/quaqua.jar" dest="${build}"/>
+        <unjar src="${lib}/swing-layout.jar" dest="${build}"/>
+        <unjar src="${lib}/swing-worker.jar" dest="${build}"/>
+        <jar destfile="${dist}/AnyWikiDraw.jar" basedir="${build}"
+        index="true" compress="false">
+            <manifest>
+                <attribute name="Built-By" value="${author}"/>
+                <attribute name="Main-Class" value="org.anywikidraw.any.Main"/>
+            </manifest>
+        </jar>
+        <copy todir="${dist}">
+            <fileset dir="${lib}">
+                <include name="lib*.jnilib"/>
+            </fileset>
+        </copy>
+    </target>
+    <target name="app.run-jar" depends="init">
+        <java fork="true" jar="${dist}/AnyWikiDraw.jar">
+        </java>
+    </target>
+   <target name="app.run-compiled" depends="init">
+        <java fork="true"
+        classname="org.anywikidraw.any.Main" 
+        >
+            <classpath>
+                <path path="${build}"/>
+                <fileset dir="${lib}">
+                    <include name="*.jar"/>
+                </fileset>
+            </classpath>
+            <jvmarg value="-Djava.library.path=${lib}"/>
+        </java>
+    </target>
+    <target name="dist" depends="clean">
+
+        <!-- create a directory for the demo -->
+        <mkdir dir="${dist.guide}"/>
+
+        <!-- copy files needed for the demo -->
+        <copy todir="${dist.guide}">
+            <fileset dir="${guide}">
+                <exclude name="**/.*"/>
+            </fileset>
+        </copy>
+
+        <!-- include the source code in the distro as required by the GPL license -->
+        <tar destfile="${dist}/src.tar.bz" compression="bzip2">
+            <fileset dir="..">
+                <include name="AnyWikiDraw/**"/>
+                <exclude name="**/.*"/>
+                <exclude name="AnyWikiDraw/build/**"/>
+                <exclude name="AnyWikiDraw/dist/**"/>
+            </fileset>
+        </tar>
+
+
+        <zip file="${dist.final}/anywikidraw-${version}.zip">
+            <fileset dir="${dist.final}">
+                <include name="AnyWikiDraw ${version}/**"/>
+                <exclude name="**/.*"/>
+            </fileset>
+        </zip>
+    </target>
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/AnyWikiDraw/AnyWikiDraw/build.xml	Tue Sep 01 20:44:51 2009 +0200
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- You may freely edit this file. See commented blocks below for -->
+<!-- some examples of how to customize the build. -->
+<!-- (If you delete it and reopen the project it will be recreated.) -->
+<!-- By default, only the Clean and Build commands use this build script. -->
+<!-- Commands such as Run, Debug, and Test only use this build script if -->
+<!-- the Compile on Save feature is turned off for the project. -->
+<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
+<!-- in the project's Project Properties dialog box.-->
+<project name="AnyWikiDraw" default="default" basedir=".">
+    <description>Builds, tests, and runs the project AnyWikiDraw.</description>
+    <import file="nbproject/build-impl.xml"/>
+
+    <import file="nbproject/profiler-build-impl.xml"/>    <!--
+
+    There exist several targets which are by default empty and which can be 
+    used for execution of your tasks. These targets are usually executed 
+    before and after some main targets. They are: 
+
+      -pre-init:                 called before initialization of project properties
+      -post-init:                called after initialization of project properties
+      -pre-compile:              called before javac compilation
+      -post-compile:             called after javac compilation
+      -pre-compile-single:       called before javac compilation of single file
+      -post-compile-single:      called after javac compilation of single file
+      -pre-compile-test:         called before javac compilation of JUnit tests
+      -post-compile-test:        called after javac compilation of JUnit tests
+      -pre-compile-test-single:  called before javac compilation of single JUnit test
+      -post-compile-test-single: called after javac compilation of single JUunit test
+      -pre-jar:                  called before JAR building
+      -post-jar:                 called after JAR building
+      -post-clean:               called after cleaning build products
+
+    (Targets beginning with '-' are not intended to be called on their own.)
+
+    Example of inserting an obfuscator after compilation could look like this:
+
+        <target name="-post-compile">
+            <obfuscate>
+                <fileset dir="${build.classes.dir}"/>
+            </obfuscate>
+        </target>
+
+    For list of available properties check the imported 
+    nbproject/build-impl.xml file. 
+
+
+    Another way to customize the build is by overriding existing main targets.
+    The targets of interest are: 
+
+      -init-macrodef-javac:     defines macro for javac compilation
+      -init-macrodef-junit:     defines macro for junit execution
+      -init-macrodef-debug:     defines macro for class debugging
+      -init-macrodef-java:      defines macro for class execution
+      -do-jar-with-manifest:    JAR building (if you are using a manifest)
+      -do-jar-without-manifest: JAR building (if you are not using a manifest)
+      run:                      execution of project 
+      -javadoc-build:           Javadoc generation
+      test-report:              JUnit report generation
+
+    An example of overriding the target for project execution could look like this:
+
+        <target name="run" depends="AnyWikiDraw-impl.jar">
+            <exec dir="bin" executable="launcher.exe">
+                <arg file="${dist.jar}"/>
+            </exec>
+        </target>
+
+    Notice that the overridden target depends on the jar target and not only on 
+    the compile target as the regular run target does. Again, for a list of available 
+    properties which you can use, check the target you are overriding in the
+    nbproject/build-impl.xml file. 
+
+    -->
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/AnyWikiDraw/AnyWikiDraw/guide/contents/changes.html	Tue Sep 01 20:44:51 2009 +0200
@@ -0,0 +1,119 @@
+<html>
+    <head>
+    <title>AnyWikiDraw Changes</title>
+    <link href="style.css" rel="stylesheet" type="text/css">
+    </head>
+    <body>
+        <h1>AnyWikiDraw Changes</h1>
+        <h2>0.13.3 2009-07-08</h2>
+        <h3>Fixes</h3>
+        <ul>
+          <li>MediaWiki:<br>
+            - Thumbnail image was not stored when no SVG converter was installed.<br>
+          - A PHP error occured when the width or height was not specified in the drawing tag.</li>
+        </ul>
+        <h2></h2>
+        <h2>0.13.2 2009-07-07</h2>
+    <h3>Enhancements</h3>
+        <ul>
+          <li>Added distinct plugins for TWiki version 4.1 and 4.3. </li>
+        </ul>
+        <h3>Fixes</h3>
+        <ul>
+          <li>The first time the text of a figure was edited, the text field filled the whole drawing view. </li>
+        </ul>
+        <h2>0.13.1 2009-06-30</h2>
+    <h3>Fixes</h3>
+        <ul>
+          <li>Switched off debug mode, because the applet did not work when used with the Sun J2SE 6 JVM.</li>
+          </ul>
+        <h2>0.13 2009-06-28</h2>
+    <h3>Enhancements</h3>
+        <ul>
+          <li>Added support for MediaWiki 1.8, 1.10, 1.11, 1.13, 1.14, 1.15.</li>
+          <li>Upgraded to JHotDraw 7 revision 538.</li>
+        </ul>
+        <h3>Fixes</h3>
+        <ul>
+          <li>The scribble tool does not create anymore control points which are far away.</li>
+          <li>The size of the drawing is now stored in SVG images.</li>
+        </ul>
+        <h2>0.12.11 2009-03-13</h2>
+    <h3>Enhancements</h3>
+        <ul>
+            <li>Upgraded to JHotDraw 7 revision 476.</li>
+        </ul>
+        <h2>0.11 2008-05-28</h2>
+        <h3>Enhancements</h3>
+        <ul>
+            <li>Redesigned toolbars of the drawing applet (work in progress).</li>
+            <li>MediaWiki: AnyWikiDraw works now also with MediaWiki 1.9.3 and 1.12.0.</li>
+        </ul>
+    <h3>Fixes</h3>
+        <ul>
+          <li>Loading and Saving: The applet edits now always the current image, and not old versions of an image.</li>
+        </ul>
+        <h2>0.10 2007-06-03</h2>
+    <h3>Enhancements</h3>
+        <ul>
+            <li>TWiki: Introducing support for TWiki.</li>
+        </ul>
+        <h3>Fixes</h3>
+        <ul>
+          <li>Applet: Grid Toggle button was not always selected when the grid was turned on.</li>
+        </ul>
+    <h2>0.9</h2>
+        <h3>Enhancements</h3>
+        <ul>
+            <li>PmWiki: Introducing support for PmWiki.</li>
+        </ul>
+        <h3>Fixes</h3>
+        <ul>
+            <li>Applet: Entry fields for opacity and line width did not work.</li>
+            <li>MediaWiki: Image maps did not always work.</li>
+        </ul>
+        <h2>0.8 2007-05-27</h2>
+        <h3>Enhancements</h3>
+        <ul>
+            <li>Applet: Implemented all new user interface for the drawing editor.</li>
+        </ul>
+        <h3>Fixes</h3>
+        <ul>
+            <li>Applet: Fixed bugs with SVG files containing gradients.</li>
+            <li>MediaWiki: The server side code now properly stores the rendered PNG and HTML map files for the first revision of a drawing.</li>
+            <li>MediaWiki: When a drawing is sent to the applet, HTTP caching is now disabled, to prevent that an old version of a drawing is shown in the editor.</li>
+        </ul>
+        <h2>0.7 2007-04-24</h2>
+        <h3>Enhancements</h3>
+        <ul>
+            <li>Applet: A change summary can now be entered.</li>
+            <li>Applet: Links can now be added to figures.</li>
+        </ul>
+        <h3>Fixes</h3>
+        <ul>
+            <li>Applet: Fixes bugs with reading and writing SVG text areas and SVG path attributes.</li>
+            <li>MediaWiki: The server side code uses now variables from MediaWiki to determine the location of the applet files.</li>
+        </ul>
+        <h2>0.6 2007-04-16</h2>
+        <h3>Enhancements</h3>
+        <ul>
+            <li>Applet: User preferences, such as whether the grid is on or off, are now rememberd.</li>
+        </ul>
+        <h3>Fixes</h3>
+        <ul>
+            <li>Applet: The position of SVG Text figures was lost sometimes.</li>
+        </ul>
+        <h2>0.5 2007-04-15</h2>
+        <h3>Fixes</h3>
+        <ul>
+            <li>Applet: Fixed several SVG issues.</li>
+        </ul>
+        <h2>0.4 2007-04-10</h2>
+        <h3>Enhancements</h3>
+        <ul>
+            <li>MediaWiki: Introducing support for MediaWiki.</li>
+        </ul>
+    </body>    
+</html>
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/AnyWikiDraw/AnyWikiDraw/guide/contents/copyright.html	Tue Sep 01 20:44:51 2009 +0200
@@ -0,0 +1,25 @@
+<html>
+    <head>
+    <title>AnyWikiDraw Copyright</title>
+    <link href="style.css" rel="stylesheet" type="text/css">
+    </head>
+    <body>
+        <h1>AnyWikiDraw Copyright</h1>
+        <p>AnyWikiDraw is copyright by
+        <a href="http://sourceforge.net/projects/anywikidraw">AnyWikiDraw.org</a>
+             and its contributors.</p>
+        <p>Project owners</p>
+        <ul>
+            <li>Werner Randelshofer, werner.randelshofer@bluewin.ch</li>
+            <li>Cjaran Jessup, ciaranj@gmail.com</li>
+        </ul>
+        <p>Parts of the code are copyright by </p>
+        <ul>
+            <li><a href="http://sourceforge.net/projects/jhotdraw">JHotDraw.org<a> and its contributors</li>
+            <li><a href="http://www.pmwiki.org/wiki/Cookbook/PmWikiDraw">PmWikiDraw.org<a> and its contributors</li>
+            <li><a href="http://twiki.org/cgi-bin/view/Plugins/TWikiDrawPluginDev">TWikiDraw.org<a> and its contributors</li>
+        </ul>
+    </body>    
+</html>
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/AnyWikiDraw/AnyWikiDraw/guide/contents/license.html	Tue Sep 01 20:44:51 2009 +0200
@@ -0,0 +1,22 @@
+<html>
+    <head>
+    <title>AnyWikiDraw License</title>
+    <link href="style.css" rel="stylesheet" type="text/css">
+    </head>
+    <body>
+        <h1>AnyWikiDraw License</h1>
+        <p>You can license most parts of AnyWikiDraw under the <p>
+        <p>Lesser GNU Public License (LGPL)<br/>
+            <a href="http://www.gnu.org/licenses/lgpl.html">http://www.gnu.org/licenses/lgpl.html</a>
+        </p>
+        <p>or under the</p>
+        <p>Creative Commons Attribution 3.0 License<br/>
+            <a href="http://creativecommons.org/licenses/by/3.0">http://creativecommons.org/licenses/by/3.0</a>
+        </p>
+            <p>Some server side code of AnyWikiDraw links with GNU licensed code.</p>
+        You can license this code under the</p> 
+        <p>GNU General Public License (GPL)<br/>
+        <a href="http://www.gnu.org/copyleft/gpl.html">http://www.gnu.org/copyleft/gpl.html</a>
+        <p>
+    </body>    
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/AnyWikiDraw/AnyWikiDraw/guide/contents/mediawiki.html	Tue Sep 01 20:44:51 2009 +0200
@@ -0,0 +1,88 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+    <title>AnyWikiDraw for MediaWiki</title>
+    <link href="style.css" rel="stylesheet" type="text/css" />
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+</head>
+    <body>
+        <h1>AnyWikiDraw for MediaWiki</h1>
+    <h3>Usage</h3>
+        <p>To include a drawing in a MediaWiki page, write the following tag in the
+        page:</p>
+        <p><code>{{#drawing:drawing.svg|width|height}}</code></p>
+        <ul>
+            <li>The tag needs to be put into double curly braces.</li>
+            <li>The name of the tag is <code>#drawing:</code></li>
+            <li>The parameter <code>drawing.svg</code> specifies the name of the drawing file.</li>
+            <li>The drawing file can have one of the following extensions 
+            <code>.svg</code>,<code> .png</code>, 
+            <code>.jpg</code>.</li> 
+          <li>If you specify an drawing file that does not yet exist in your Wiki, 
+            the drawing is created the first time you save a drawing.</li>
+            <li>The parameter width specifies the width of the drawing.</li>
+            <li>The parameter height specifies the height of the drawing.</li>
+         </ul>
+         <h3>Security considerations</h3>
+         <ul>
+           <li><span style="color:#990000">This is an experimental extension. Data loss may occur.<br /> 
+               <em>Install
+           it only on a Wiki system that does not contain critical data.</em><br />
+             <br />
+           </span></li>
+           <li>You need to grant access to session cookies to JavaScript and Java.<br />
+             <em>You may not want to do this if your wiki embeds JavaScript code from untrusted sources.<br />
+             F
+             or example if your wiki embeds banners and advertisements from a third party system.</em><br />
+             <br />
+           </li>
+           <li> You need to allow file upload to your users.<br />
+             <em>You may not want to do this if your wiki allows user account creation by people not known to you.             </em>           </li>
+         </ul>
+             <h3 align="left">Installation instructions</h3>
+         <ol>
+             <li >Enable Cookie access by JavaScript and Java Applets in  the <code>LocalSettings.php</code> script:<br />
+               <br />
+               <code>$wgCookieHttpOnly = false;</code><br />
+               <br />
+           </li>
+           <li>Enable file uploading in  <code>LocalSettings.php</code> script:<br />
+               <br />
+               <code>$wgEnableUploads = true;</code><br />
+                 <code></code><br /></li>
+           <li>If you want to use AnyWikiDraw as SVG editor, make sure that you have properly installed and enabled SVG support on your MediaWiki server. For example, if you have installed ImageMagick on your server, you can activate SVG support using the following lines in  the <code>LocalSettings.php</code> script:<br />
+               <code><br />
+               $wgUseImageMagick = true;<br />
+$wgImageMagickConvertCommand='/opt/local/bin/convert';<br />
+$wgSVGConverterPath='/opt/local/bin';<br />
+$wgFileExtensions[] = 'svg';<br />
+             </code><code><br />
+</code></li>
+             <li>Place the AnyWikiDraw folder into 
+             the <code>extensions</code> folder of your MediaWiki server. <br />
+             <em>Please note, that different versions of this extension exist for different versions of MediaWiki.</em><br />
+             <br />
+             </li>
+             <li>To activate this extension add the
+                 following lines to your <code>LocalSettings.php</code> script:<br/>
+                 <code><br />
+             require_once(&quot;extensions/AnyWikiDraw/AnyWikiDraw.php&quot;);</code></li>
+         </ol>
+               <h3>Summary of changes to LocalSettings.php</h3>
+               <p class="listing"><code>// Enable cookie access by JavaScript and Java Applets<br />
+               $wgCookieHttpOnly = false;<br />
+               <br />
+               </code><code>// Enable file upload<br />
+               $wgEnableUploads = true;</code><br />
+               <br />
+               <code>// Enable an SVG converter, for example ImageMagick<br />
+               $wgUseImageMagick = true;<br />
+               $wgImageMagickConvertCommand='/opt/local/bin/convert';<br />
+    $wgSVGConverterPath='/opt/local/bin';</code><br />
+    <code><code>$wgFileExtensions[] = 'svg';<br />
+    </code><br />
+      </code><code>// Enable AnyWikiDraw<br />
+    require_once(&quot;$IP/extensions/AnyWikiDraw/AnyWikiDraw.php&quot;);</code></p>
+</body>    
+</html>
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/contrib/AnyWikiDraw/AnyWikiDraw/guide/contents/pmwiki.html	Tue Sep 01 20:44:51 2009 +0200
@@ -0,0 +1,42 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+    <title>AnyWikiDraw for PmWiki</title>
+    <link href="style.css" rel="stylesheet" type="text/css" />
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head>
+    <body>
+        <h1>AnyWikiDraw for PmWiki</h1>
+    <h3>Usage</h3>
+        <p>To include a drawing in a PmWiki page, write the following tag in the
+        page:</p>
+        <p><code>(:drawing drawing.svg|width|height:)</code></p>
+        <ul>
+            <li>The tag needs to be put into smileys.</li>
+            <li>The name of the tag is <code>drawing</code></li>
+            <li>The parameter <code>drawing.svg</code> specifies the name of the drawing file.</li>
+            <li>The drawing file can have one of the following extensions 
+                    <code>.draw</code>, <code>.svg</code>, <code>.svgz</code>, <code>.png</code>, 
+                <code>.jpg</code>.</li> 
+            <li>If you specify a drawing file that does not yet exist in your Wiki, 
+            the drawing is created the first time you save a drawing.</li>
+            <li>The parameter width specifies the width of the drawing.</li>
+            <li>The parameter height specifies the height of the drawing.</li>
+    </ul>
+         <h3>Installation instructions</h3>
+         <ol>
+             <li style="color:#990000">This is an experimental cookbook. Data loss may occur. Install
+             it only on a Wiki system that does not contain critical data.</li>
+             <li>This extension adds inline drawing editing support to your Wiki.
+                 Make sure, that you have proper licenses for all drawings on your 
+             Wiki.</li> 
+             <li>Deinstall the PmWikiDraw cookbook. AnyWikiDraw includes the 
+             PmWikiDraw cookbook. Having them installed both will