maven-doxia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vsive...@apache.org
Subject svn commit: r645508 - in /maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui: ./ icons/ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/maven/ src/main...
Date Mon, 07 Apr 2008 13:24:26 GMT
Author: vsiveton
Date: Mon Apr  7 06:24:23 2008
New Revision: 645508

URL: http://svn.apache.org/viewvc?rev=645508&view=rev
Log:
DOXIA-233: Create an Eclipse plugin to edit Doxia files

o added twiki plugin

Added:
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/.classpath   (with props)
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/.project   (with props)
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/build.properties   (with props)
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/icons/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/icons/doxia.gif   (with props)
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/plugin.properties   (with props)
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/plugin.xml   (with props)
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/org/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/org/apache/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/org/apache/maven/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/org/apache/maven/doxia/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/org/apache/maven/doxia/ide/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/twiki/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/twiki/ui/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/twiki/ui/TWikiPlugin.java   (with props)
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/twiki/ui/editor/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/twiki/ui/editor/TWikiDocumentProvider.java   (with props)
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/twiki/ui/editor/TWikiEditor.java   (with props)
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/twiki/ui/editor/TWikiEditorContributor.java   (with props)
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/twiki/ui/wizard/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/twiki/ui/wizard/TWikiWizard.java   (with props)
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/resources/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/resources/org/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/resources/org/apache/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/resources/org/apache/maven/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/resources/org/apache/maven/doxia/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/resources/org/apache/maven/doxia/ide/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/resources/org/apache/maven/doxia/ide/eclipse/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/resources/org/apache/maven/doxia/ide/eclipse/twiki/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/resources/org/apache/maven/doxia/ide/eclipse/twiki/ui/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/resources/org/apache/maven/doxia/ide/eclipse/twiki/ui/wizard/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/resources/org/apache/maven/doxia/ide/eclipse/twiki/ui/wizard/new.twiki

Added: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/.classpath
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/.classpath?rev=645508&view=auto
==============================================================================
--- maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/.classpath (added)
+++ maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/.classpath Mon Apr  7 06:24:23 2008
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src/main/java"/>
+	<classpathentry kind="src" path="src/main/resources"/>
+	<classpathentry exported="true" kind="lib" path="target/classes/"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>

Propchange: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/.classpath
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/.classpath
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/.project
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/.project?rev=645508&view=auto
==============================================================================
--- maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/.project (added)
+++ maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/.project Mon Apr  7 06:24:23 2008
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.apache.maven.doxia.ide.eclipse.twiki.ui</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Propchange: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/.project
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/.project
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/build.properties
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/build.properties?rev=645508&view=auto
==============================================================================
--- maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/build.properties (added)
+++ maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/build.properties Mon Apr  7 06:24:23 2008
@@ -0,0 +1,8 @@
+source.. = src/main/java/,\
+               src/main/resources
+output.. = target/classes/
+bin.includes = .,\
+               plugin.properties,\
+               plugin.xml,\
+               target/classes/
+jars.compile.order = .

Propchange: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/build.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/build.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/icons/doxia.gif
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/icons/doxia.gif?rev=645508&view=auto
==============================================================================
Binary file - no diff available.

Propchange: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/icons/doxia.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/plugin.properties
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/plugin.properties?rev=645508&view=auto
==============================================================================
--- maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/plugin.properties (added)
+++ maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/plugin.properties Mon Apr  7 06:24:23 2008
@@ -0,0 +1,38 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+#
+# Plugin
+#
+plugin.name=Apache Doxia TWiki Plug-in
+plugin.provider.name=Apache Maven
+
+#
+# Doxia Editor
+#
+editor.name=Doxia TWiki Editor
+
+#
+# Doxia Wizard
+#
+wizard.category.name=Apache Doxia
+wizard.name=TWiki file
+
+#
+# Doxia popupMenus
+#
+menu.styles=&Styles
\ No newline at end of file

Propchange: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/plugin.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/plugin.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/plugin.xml
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/plugin.xml?rev=645508&view=auto
==============================================================================
--- maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/plugin.xml (added)
+++ maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/plugin.xml Mon Apr  7 06:24:23 2008
@@ -0,0 +1,196 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<?eclipse version="3.2"?>
+<plugin
+   id="org.apache.maven.doxia.ide.eclipse.twiki.ui"
+   name="%plugin.name"
+   version="1.0"
+   provider-name="%plugin.provider.name"
+   class="org.apache.maven.doxia.ide.eclipse.twiki.ui.TWikiPlugin">
+
+   <runtime>
+      <library name="target/classes/">
+         <export
+               name="org.apache.maven.doxia.ide.eclipse.twiki.ui.*">
+         </export>
+         <export
+               name="org.apache.maven.doxia.ide.eclipse.twiki.ui.editor.*">
+         </export>
+         <export
+               name="org.apache.maven.doxia.ide.eclipse.twiki.ui.wizard.*">
+         </export>
+      </library>
+      <library name="."/>
+   </runtime>
+
+   <requires>
+      <import plugin="org.eclipse.ui"/>
+      <import plugin="org.eclipse.wst.sse.ui"/>
+      <import plugin="org.eclipse.jface.text"/>
+      <import plugin="org.eclipse.core.runtime"/>
+      <import plugin="org.eclipse.core.resources"/>
+      <import plugin="org.apache.maven.doxia.ide.eclipse.common.ui"/>
+   </requires>
+
+   <!-- Doxia Plugin Text Editors -->
+   <extension
+         point="org.eclipse.ui.editors">
+      <editor
+            name="%editor.name"
+            extensions="twiki"
+            icon="icons/doxia.gif"
+            contributorClass="org.apache.maven.doxia.ide.eclipse.twiki.ui.editor.TWikiEditorContributor"
+            class="org.apache.maven.doxia.ide.eclipse.twiki.ui.editor.TWikiEditor"
+            id="org.apache.maven.doxia.ide.eclipse.twiki.ui.editor.TWikiEditor">
+      </editor>
+   </extension>
+   <extension
+         point="org.eclipse.ui.editors.documentProviders">
+      <provider
+            class="org.apache.maven.doxia.ide.eclipse.twiki.ui.editor.TWikiDocumentProvider"
+            id="org.apache.maven.doxia.ide.eclipse.twiki.ui.editor.TWikiDocumentProvider">
+      </provider>
+   </extension>
+
+   <!-- Doxia Wizards -->
+   <extension
+         point="org.eclipse.ui.newWizards">
+      <category
+            name="%wizard.category.name"
+            id="org.apache.maven.doxia.ide.eclipse.ui.wizard.DoxiaWizard">
+      </category>
+      <wizard
+            name="%wizard.name"
+            icon="icons/doxia.gif"
+            category="org.apache.maven.doxia.ide.eclipse.ui.wizard.DoxiaWizard"
+            class="org.apache.maven.doxia.ide.eclipse.twiki.ui.wizard.TWikiWizard"
+            id="org.apache.maven.doxia.ide.eclipse.twiki.ui.wizard.TWikiWizard">
+      </wizard>
+   </extension>
+
+   <!-- http://www.eclipse.org/articles/article.php?file=Article-action-contribution/index.html -->
+   <extension point="org.eclipse.ui.popupMenus">
+      <viewerContribution
+            id="org.apache.maven.doxia.ide.eclipse.twiki.ui.editor.TWikiEditor"
+            targetID="org.apache.maven.doxia.ide.eclipse.twiki.ui.editor.TWikiEditor.EditorContext">
+         <menu
+             id="subMenu"
+             label="%menu.styles"
+             path="additions">
+           <separator name="styles"/>
+         </menu>
+         <!-- Actions should be ordered -->
+         <action
+            id="org.apache.maven.doxia.ide.eclipse.common.ui.popup.actions.MonospacedAction"
+            label="%action.monospaced.label"
+            tooltip="%action.monospaced.tooltip"
+            menubarPath="subMenu/styles"
+            class="org.apache.maven.doxia.ide.eclipse.common.ui.actions.MonospacedActionDelegate">
+        </action>
+         <action
+            id="org.apache.maven.doxia.ide.eclipse.common.ui.popup.actions.ItalicAction"
+            label="%action.italic.label"
+            tooltip="%action.italic.tooltip"
+            menubarPath="subMenu/styles"
+            class="org.apache.maven.doxia.ide.eclipse.common.ui.actions.ItalicActionDelegate">
+        </action>
+         <action
+            id="org.apache.maven.doxia.ide.eclipse.common.ui.popup.actions.BoldAction"
+            label="%action.bold.label"
+            tooltip="%action.bold.tooltip"
+            menubarPath="subMenu/styles"
+            class="org.apache.maven.doxia.ide.eclipse.common.ui.actions.BoldActionDelegate">
+        </action>
+     </viewerContribution>
+   </extension>
+   <extension point="org.eclipse.ui.editorActions">
+      <editorContribution
+            id="org.apache.maven.doxia.ide.eclipse.twiki.ui.editor.TWikiEditor"
+            targetID="org.apache.maven.doxia.ide.eclipse.twiki.ui.editor.TWikiEditor">
+         <!-- Contributing ordered actions to toolbar -->
+         <action
+            id="org.apache.maven.doxia.ide.eclipse.common.ui.contribution.actions.toolbar.TableAction"
+            label="%action.table.label"
+            tooltip="%action.table.tooltip"
+            toolbarPath="Normal/additions"
+            class="org.apache.maven.doxia.ide.eclipse.common.ui.actions.TableActionDelegate">
+         </action>
+         <action
+            id="org.apache.maven.doxia.ide.eclipse.common.ui.contribution.actions.toolbar.LinkAction"
+            label="%action.link.label"
+            tooltip="%action.link.tooltip"
+            toolbarPath="Normal/additions"
+            class="org.apache.maven.doxia.ide.eclipse.common.ui.actions.LinkActionDelegate">
+         </action>
+         <action
+            id="org.apache.maven.doxia.ide.eclipse.common.ui.contribution.actions.toolbar.MonospacedAction"
+            label="%action.monospaced.label"
+            tooltip="%action.monospaced.tooltip"
+            toolbarPath="Normal/additions"
+            class="org.apache.maven.doxia.ide.eclipse.common.ui.actions.MonospacedActionDelegate">
+         </action>
+         <action
+            id="org.apache.maven.doxia.ide.eclipse.common.ui.contribution.actions.toolbar.ItalicAction"
+            label="%action.italic.label"
+            tooltip="%action.bold.tooltip"
+            toolbarPath="Normal/additions"
+            class="org.apache.maven.doxia.ide.eclipse.common.ui.actions.ItalicActionDelegate">
+         </action>
+         <action
+            id="org.apache.maven.doxia.ide.eclipse.common.ui.contribution.actions.toolbar.BoldAction"
+            label="%action.bold.label"
+            tooltip="%action.bold.tooltip"
+            toolbarPath="Normal/additions"
+            class="org.apache.maven.doxia.ide.eclipse.common.ui.actions.BoldActionDelegate">
+         </action>
+
+         <!-- Contributing ordererd actions to menu -->
+         <menu
+             id="editStyles"
+             label="%menu.styles"
+             path="edit/additions">
+           <separator name="styles"/>
+         </menu>
+         <action
+            id="org.apache.maven.doxia.ide.eclipse.common.ui.contribution.editor.menu.MonospacedAction"
+            label="%action.monospaced.label"
+            tooltip="%action.monospaced.tooltip"
+            menubarPath="edit/editStyles/styles"
+            class="org.apache.maven.doxia.ide.eclipse.common.ui.actions.MonospacedActionDelegate">
+         </action>
+         <action
+            id="org.apache.maven.doxia.ide.eclipse.common.ui.contribution.editor.menu.ItalicAction"
+            label="%action.italic.label"
+            tooltip="%action.bold.tooltip"
+            menubarPath="edit/editStyles/styles"
+            class="org.apache.maven.doxia.ide.eclipse.common.ui.actions.ItalicActionDelegate">
+         </action>
+         <action
+            id="org.apache.maven.doxia.ide.eclipse.common.ui.contribution.actions.menu.BoldAction"
+            label="%action.bold.label"
+            tooltip="%action.bold.tooltip"
+            menubarPath="edit/editStyles/styles"
+            class="org.apache.maven.doxia.ide.eclipse.common.ui.actions.BoldActionDelegate">
+         </action>
+     </editorContribution>
+   </extension>
+</plugin>

Propchange: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/plugin.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/plugin.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/twiki/ui/TWikiPlugin.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/twiki/ui/TWikiPlugin.java?rev=645508&view=auto
==============================================================================
--- maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/twiki/ui/TWikiPlugin.java (added)
+++ maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/twiki/ui/TWikiPlugin.java Mon Apr  7 06:24:23 2008
@@ -0,0 +1,96 @@
+package org.apache.maven.doxia.ide.eclipse.twiki.ui;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.doxia.ide.eclipse.common.ui.AbstractDoxiaPlugin;
+import org.codehaus.plexus.util.StringUtils;
+import org.osgi.framework.BundleContext;
+
+/**
+ * TWiki plug-in.
+ *
+ * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
+ * @version $Id$
+ * @since 1.0
+ */
+public class TWikiPlugin
+    extends AbstractDoxiaPlugin
+{
+    /** The plug-in ID */
+    public static final String PLUGIN_ID = "org.apache.maven.doxia.ide.eclipse.twiki.ui";
+
+    /** The shared instance */
+    private static TWikiPlugin plugin;
+
+    /**
+     * The constructor
+     */
+    public TWikiPlugin()
+    {
+        plugin = this;
+    }
+
+    @Override
+    public void start( BundleContext context )
+        throws Exception
+    {
+        super.start( context );
+        plugin = this;
+    }
+
+    @Override
+    public void stop( BundleContext context )
+        throws Exception
+    {
+        plugin = null;
+        super.stop( context );
+    }
+
+    /**
+     * Returns the shared instance
+     *
+     * @return the shared instance
+     */
+    public static TWikiPlugin getDefault()
+    {
+        return plugin;
+    }
+
+    /**
+     * @return the plugin ID
+     */
+    public static String getPluginId()
+    {
+        if ( StringUtils.isEmpty( getDefault().getBundle().getSymbolicName() ) )
+        {
+            return PLUGIN_ID;
+        }
+
+        return getDefault().getBundle().getSymbolicName();
+    }
+
+    /**
+     * @return the Doxia format
+     */
+    public static String getDoxiaFormat()
+    {
+        return "twiki";
+    }
+}

Propchange: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/twiki/ui/TWikiPlugin.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/twiki/ui/TWikiPlugin.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/twiki/ui/editor/TWikiDocumentProvider.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/twiki/ui/editor/TWikiDocumentProvider.java?rev=645508&view=auto
==============================================================================
--- maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/twiki/ui/editor/TWikiDocumentProvider.java (added)
+++ maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/twiki/ui/editor/TWikiDocumentProvider.java Mon Apr  7 06:24:23 2008
@@ -0,0 +1,62 @@
+package org.apache.maven.doxia.ide.eclipse.twiki.ui.editor;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.util.LinkedList;
+import java.util.List;
+
+import org.apache.maven.doxia.ide.eclipse.common.ui.editors.text.AbstractTextDocumentProvider;
+import org.apache.maven.doxia.ide.eclipse.common.ui.rules.AbstractTextPartitionScanner;
+import org.eclipse.jface.text.rules.IPartitionTokenScanner;
+import org.eclipse.jface.text.rules.IRule;
+
+/**
+ * TWiki document provider.
+ *
+ * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
+ * @version $Id$
+ * @since 1.0
+ */
+public class TWikiDocumentProvider
+    extends AbstractTextDocumentProvider
+{
+    @Override
+    public IPartitionTokenScanner getScanner()
+    {
+        return new TWikiPartitionScanner();
+    }
+
+    class TWikiPartitionScanner
+        extends AbstractTextPartitionScanner
+    {
+        public TWikiPartitionScanner()
+        {
+            super();
+        }
+
+        @Override
+        public List<IRule> getRules()
+        {
+            List<IRule> rules = new LinkedList<IRule>();
+
+            return rules;
+        }
+    }
+}

Propchange: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/twiki/ui/editor/TWikiDocumentProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/twiki/ui/editor/TWikiDocumentProvider.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/twiki/ui/editor/TWikiEditor.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/twiki/ui/editor/TWikiEditor.java?rev=645508&view=auto
==============================================================================
--- maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/twiki/ui/editor/TWikiEditor.java (added)
+++ maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/twiki/ui/editor/TWikiEditor.java Mon Apr  7 06:24:23 2008
@@ -0,0 +1,424 @@
+package org.apache.maven.doxia.ide.eclipse.twiki.ui.editor;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import org.apache.maven.doxia.ide.eclipse.common.ui.ColorManager;
+import org.apache.maven.doxia.ide.eclipse.common.ui.CommonPlugin;
+import org.apache.maven.doxia.ide.eclipse.common.ui.actions.AbstractBoldAction;
+import org.apache.maven.doxia.ide.eclipse.common.ui.actions.AbstractItalicAction;
+import org.apache.maven.doxia.ide.eclipse.common.ui.actions.AbstractLinkAction;
+import org.apache.maven.doxia.ide.eclipse.common.ui.actions.AbstractMonospacedAction;
+import org.apache.maven.doxia.ide.eclipse.common.ui.actions.AbstractTableAction;
+import org.apache.maven.doxia.ide.eclipse.common.ui.actions.IActionConstants;
+import org.apache.maven.doxia.ide.eclipse.common.ui.contentassist.AbstractContentAssistProcessor;
+import org.apache.maven.doxia.ide.eclipse.common.ui.dialogs.AddLinkDialog.Link;
+import org.apache.maven.doxia.ide.eclipse.common.ui.dialogs.AddTableDialog.Table;
+import org.apache.maven.doxia.ide.eclipse.common.ui.editors.AbstractTextMultiPageEditorPart;
+import org.apache.maven.doxia.ide.eclipse.common.ui.editors.text.AbstractTextEditor;
+import org.apache.maven.doxia.ide.eclipse.common.ui.editors.text.AbstractTextSourceViewerConfiguration;
+import org.apache.maven.doxia.ide.eclipse.common.ui.rules.AbstractTextScanner;
+import org.apache.maven.doxia.ide.eclipse.twiki.ui.TWikiPlugin;
+import org.apache.maven.doxia.ide.eclipse.twiki.ui.editor.TWikiDocumentProvider.TWikiPartitionScanner;
+import org.apache.maven.doxia.markup.Markup;
+import org.codehaus.plexus.util.StringUtils;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.TextAttribute;
+import org.eclipse.jface.text.contentassist.ContentAssistant;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.text.contentassist.IContentAssistant;
+import org.eclipse.jface.text.hyperlink.IHyperlink;
+import org.eclipse.jface.text.hyperlink.IHyperlinkDetector;
+import org.eclipse.jface.text.hyperlink.URLHyperlink;
+import org.eclipse.jface.text.hyperlink.URLHyperlinkDetector;
+import org.eclipse.jface.text.rules.EndOfLineRule;
+import org.eclipse.jface.text.rules.IRule;
+import org.eclipse.jface.text.rules.MultiLineRule;
+import org.eclipse.jface.text.rules.RuleBasedScanner;
+import org.eclipse.jface.text.rules.SingleLineRule;
+import org.eclipse.jface.text.rules.Token;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.editors.text.TextEditor;
+import org.eclipse.ui.editors.text.TextSourceViewerConfiguration;
+import org.eclipse.ui.texteditor.IDocumentProvider;
+
+/**
+ * TWiki editor.
+ *
+ * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
+ * @version $Id$
+ * @since 1.0
+ * @see <a href="http://twiki.org/cgi-bin/view/TWiki04x01/TextFormattingRules">
+ *      http://twiki.org/cgi-bin/view/TWiki04x01/TextFormattingRules</a>
+ */
+public class TWikiEditor
+    extends AbstractTextMultiPageEditorPart
+{
+    private TextEditor editor;
+
+    @Override
+    public TextEditor getTextEditor()
+    {
+        if ( editor != null )
+        {
+            return editor;
+        }
+
+        editor = new TWikiTextEditor();
+        editor.setAction( IActionConstants.BOLD_ACTION, new AbstractBoldAction( editor )
+        {
+            @Override
+            public String getStartMarkup()
+            {
+                return "*";
+            }
+
+            @Override
+            public String getEndMarkup()
+            {
+                return "*";
+            }
+        } );
+        editor.setAction( IActionConstants.ITALIC_ACTION, new AbstractItalicAction( editor )
+        {
+            @Override
+            public String getStartMarkup()
+            {
+                return "_";
+            }
+
+            @Override
+            public String getEndMarkup()
+            {
+                return "_";
+            }
+        } );
+        editor.setAction( IActionConstants.MONOSPACED_ACTION, new AbstractMonospacedAction( editor )
+        {
+            @Override
+            public String getStartMarkup()
+            {
+                return "=";
+            }
+
+            @Override
+            public String getEndMarkup()
+            {
+                return "=";
+            }
+        } );
+        editor.setAction( IActionConstants.LINK_ACTION, new AbstractLinkAction( editor )
+        {
+            @Override
+            protected String generateLink( Link link )
+            {
+                if ( StringUtils.isEmpty( link.getName() ) )
+                {
+                    return "[[" + link.getURL() + "]]";
+                }
+
+                return "[[" + link.getURL() + "][" + link.getName() + "]]";
+            }
+        } );
+        editor.setAction( IActionConstants.TABLE_ACTION, new AbstractTableAction( editor )
+        {
+            @Override
+            protected String generateTable( Table table )
+            {
+                StringBuffer sb = new StringBuffer();
+
+                for ( int i = 0; i < table.getRows(); i++ )
+                {
+                    sb.append( "|" );
+
+                    for ( int j = 0; j < table.getColumns(); j++ )
+                    {
+                        sb.append( DEFAULT_CELL_TEXT );
+                        sb.append( "|" );
+                    }
+                    sb.append( Markup.EOL );
+                }
+
+                return sb.toString();
+            }
+        } );
+
+        return editor;
+    }
+
+    @Override
+    public String getFormat()
+    {
+        return TWikiPlugin.getDoxiaFormat();
+    }
+
+    class TWikiTextEditor
+        extends AbstractTextEditor
+    {
+        @Override
+        public String getEditorId()
+        {
+            return "org.apache.maven.doxia.ide.eclipse.twiki.ui.editor.TWikiEditor";
+        }
+
+        @Override
+        public IDocumentProvider getFileDocumentProvider()
+        {
+            return new TWikiDocumentProvider();
+        }
+
+        @Override
+        public TextSourceViewerConfiguration getTextSourceViewerConfiguration()
+        {
+            return new TWikiSourceViewerConfiguration();
+        }
+    }
+
+    class TWikiSourceViewerConfiguration
+        extends AbstractTextSourceViewerConfiguration
+    {
+        public TWikiSourceViewerConfiguration()
+        {
+            super();
+        }
+
+        @Override
+        protected RuleBasedScanner getScanner()
+        {
+            return new TWikiScanner();
+        }
+
+        @Override
+        public IHyperlinkDetector[] getHyperlinkDetectors( ISourceViewer sourceViewer )
+        {
+            return new IHyperlinkDetector[] { new AptURLHyperlinkDetector() };
+        }
+
+        @Override
+        public IContentAssistant getContentAssistant( ISourceViewer sourceViewer )
+        {
+            ContentAssistant assistant = new ContentAssistant();
+            assistant.setDocumentPartitioning( getConfiguredDocumentPartitioning( sourceViewer ) );
+
+            IContentAssistProcessor processor = new TWikiContentAssistProcessor();
+            assistant.setContentAssistProcessor( processor, IDocument.DEFAULT_CONTENT_TYPE );
+            assistant.setContentAssistProcessor( processor, TWikiPartitionScanner.DOXIA_PARTITION_CONTENT );
+
+            assistant.setContextInformationPopupOrientation( IContentAssistant.CONTEXT_INFO_ABOVE );
+            assistant.setInformationControlCreator( getInformationControlCreator( sourceViewer ) );
+
+            return assistant;
+        }
+
+        /**
+         * Based on <code>URLHyperlinkDetector</code> with a small fix in the <code>tokenizer</code> implementation
+         * to handle as well <code>[</code> and <code>]</code>.
+         *
+         * @see org.eclipse.jface.text.hyperlink.URLHyperlinkDetector
+         */
+        class AptURLHyperlinkDetector
+            extends URLHyperlinkDetector
+        {
+
+            public AptURLHyperlinkDetector()
+            {
+            }
+
+            @Override
+            public IHyperlink[] detectHyperlinks( ITextViewer textViewer, IRegion region,
+                                                  boolean canShowMultipleHyperlinks )
+            {
+                if ( region == null || textViewer == null )
+                    return null;
+
+                IDocument document = textViewer.getDocument();
+
+                int offset = region.getOffset();
+
+                String urlString = null;
+                if ( document == null )
+                    return null;
+
+                IRegion lineInfo;
+                String line;
+                try
+                {
+                    lineInfo = document.getLineInformationOfOffset( offset );
+                    line = document.get( lineInfo.getOffset(), lineInfo.getLength() );
+                }
+                catch ( BadLocationException ex )
+                {
+                    return null;
+                }
+
+                int offsetInLine = offset - lineInfo.getOffset();
+
+                boolean startDoubleQuote = false;
+                int urlOffsetInLine = 0;
+                int urlLength = 0;
+
+                int urlSeparatorOffset = line.indexOf( "://" ); //$NON-NLS-1$
+                while ( urlSeparatorOffset >= 0 )
+                {
+
+                    // URL protocol (left to "://")
+                    urlOffsetInLine = urlSeparatorOffset;
+                    char ch;
+                    do
+                    {
+                        urlOffsetInLine--;
+                        ch = ' ';
+                        if ( urlOffsetInLine > -1 )
+                            ch = line.charAt( urlOffsetInLine );
+                        startDoubleQuote = ch == '"';
+                    }
+                    while ( Character.isUnicodeIdentifierStart( ch ) );
+                    urlOffsetInLine++;
+
+                    // Right to "://"
+                    // APT FIX
+                    StringTokenizer tokenizer = new StringTokenizer( line.substring( urlSeparatorOffset + 3 ),
+                                                                     " \t\n\r\f<>[]", false ); //$NON-NLS-1$
+                    if ( !tokenizer.hasMoreTokens() )
+                        return null;
+
+                    urlLength = tokenizer.nextToken().length() + 3 + urlSeparatorOffset - urlOffsetInLine;
+                    if ( offsetInLine >= urlOffsetInLine && offsetInLine <= urlOffsetInLine + urlLength )
+                        break;
+
+                    urlSeparatorOffset = line.indexOf( "://", urlSeparatorOffset + 1 ); //$NON-NLS-1$
+                }
+
+                if ( urlSeparatorOffset < 0 )
+                    return null;
+
+                if ( startDoubleQuote )
+                {
+                    int endOffset = -1;
+                    int nextDoubleQuote = line.indexOf( '"', urlOffsetInLine );
+                    int nextWhitespace = line.indexOf( ' ', urlOffsetInLine );
+                    if ( nextDoubleQuote != -1 && nextWhitespace != -1 )
+                        endOffset = Math.min( nextDoubleQuote, nextWhitespace );
+                    else if ( nextDoubleQuote != -1 )
+                        endOffset = nextDoubleQuote;
+                    else if ( nextWhitespace != -1 )
+                        endOffset = nextWhitespace;
+                    if ( endOffset != -1 )
+                        urlLength = endOffset - urlOffsetInLine;
+                }
+
+                // Set and validate URL string
+                try
+                {
+                    urlString = line.substring( urlOffsetInLine, urlOffsetInLine + urlLength );
+                    new URL( urlString );
+                }
+                catch ( MalformedURLException ex )
+                {
+                    urlString = null;
+                    return null;
+                }
+
+                IRegion urlRegion = new Region( lineInfo.getOffset() + urlOffsetInLine, urlLength );
+                return new IHyperlink[] { new URLHyperlink( urlRegion, urlString ) };
+            }
+        }
+    }
+
+    class TWikiScanner
+        extends AbstractTextScanner
+    {
+        public TWikiScanner()
+        {
+            super();
+        }
+
+        @Override
+        public List<IRule> getRules()
+        {
+            List<IRule> rules = new ArrayList<IRule>();
+
+            // TODO add more rules and review color!
+
+            // horizontal rule
+            rules.add( new EndOfLineRule( "-------", new Token( new TextAttribute( ColorManager.getInstance()
+                .getColor( ColorManager.LINK ) ) ) ) );
+
+            // verbatim rules
+            rules.add( new MultiLineRule( "<verbatim>", "</verbatim>", new Token( new TextAttribute( ColorManager
+                .getInstance().getColor( ColorManager.STRING ) ) ) ) );
+
+            // monospaced rule
+            rules.add( new SingleLineRule( "=", "=", monospacedToken ) );
+
+            // bold rule
+            rules.add( new SingleLineRule( "*", "*", boldToken ) );
+
+            // italic rule
+            rules.add( new SingleLineRule( "_", "_", italicToken ) );
+
+            // link rule
+            rules.add( new SingleLineRule( "[[", "]]", linkToken ) );
+
+            return rules;
+        }
+    }
+
+    class TWikiContentAssistProcessor
+        extends AbstractContentAssistProcessor
+    {
+        public TWikiContentAssistProcessor()
+        {
+            super();
+        }
+
+        @Override
+        public Image[] getImageMarkups()
+        {
+            return new Image[] {
+                CommonPlugin.getImage( CommonPlugin.IMG_ITALIC ),
+                CommonPlugin.getImage( CommonPlugin.IMG_BOLD ),
+                CommonPlugin.getImage( CommonPlugin.IMG_MONOSPACED ),
+                CommonPlugin.getImage( CommonPlugin.IMG_LINK ) };
+        }
+
+        @Override
+        public String[] getStartMarkups()
+        {
+            return new String[] { "_", "*", "=", "[[" };
+        }
+
+        @Override
+        public String[] getEndMarkups()
+        {
+            return new String[] { "_", "*", "=", "]]" };
+        }
+    }
+}

Propchange: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/twiki/ui/editor/TWikiEditor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/twiki/ui/editor/TWikiEditor.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/twiki/ui/editor/TWikiEditorContributor.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/twiki/ui/editor/TWikiEditorContributor.java?rev=645508&view=auto
==============================================================================
--- maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/twiki/ui/editor/TWikiEditorContributor.java (added)
+++ maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/twiki/ui/editor/TWikiEditorContributor.java Mon Apr  7 06:24:23 2008
@@ -0,0 +1,38 @@
+package org.apache.maven.doxia.ide.eclipse.twiki.ui.editor;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.doxia.ide.eclipse.common.ui.editors.AbstractEditorContributor;
+
+/**
+ * TWiki contributor.
+ *
+ * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
+ * @version $Id$
+ * @since 1.0
+ */
+public class TWikiEditorContributor
+    extends AbstractEditorContributor
+{
+    public TWikiEditorContributor()
+    {
+        super();
+    }
+}

Propchange: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/twiki/ui/editor/TWikiEditorContributor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/twiki/ui/editor/TWikiEditorContributor.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/twiki/ui/wizard/TWikiWizard.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/twiki/ui/wizard/TWikiWizard.java?rev=645508&view=auto
==============================================================================
--- maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/twiki/ui/wizard/TWikiWizard.java (added)
+++ maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/twiki/ui/wizard/TWikiWizard.java Mon Apr  7 06:24:23 2008
@@ -0,0 +1,63 @@
+package org.apache.maven.doxia.ide.eclipse.twiki.ui.wizard;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.doxia.ide.eclipse.common.ui.wizards.AbstractWizard;
+import org.apache.maven.doxia.ide.eclipse.common.ui.wizards.AbstractWizardPage;
+import org.apache.maven.doxia.ide.eclipse.twiki.ui.TWikiPlugin;
+import org.eclipse.jface.viewers.ISelection;
+
+/**
+ * TWiki wizard.
+ *
+ * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
+ * @version $Id$
+ * @since 1.0
+ */
+public class TWikiWizard
+    extends AbstractWizard
+{
+    @Override
+    public AbstractWizardPage getWizardPage( ISelection selection )
+    {
+        return new TWikiWizardPage( selection );
+    }
+
+    @Override
+    public String getWizardTemplate()
+    {
+        return "new.twiki";
+    }
+
+    class TWikiWizardPage
+        extends AbstractWizardPage
+    {
+        public TWikiWizardPage( ISelection selection )
+        {
+            super( selection );
+        }
+
+        @Override
+        public String getExtension()
+        {
+            return TWikiPlugin.getDoxiaFormat();
+        }
+    }
+}

Propchange: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/twiki/ui/wizard/TWikiWizard.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/twiki/ui/wizard/TWikiWizard.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/resources/org/apache/maven/doxia/ide/eclipse/twiki/ui/wizard/new.twiki
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/resources/org/apache/maven/doxia/ide/eclipse/twiki/ui/wizard/new.twiki?rev=645508&view=auto
==============================================================================
--- maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/resources/org/apache/maven/doxia/ide/eclipse/twiki/ui/wizard/new.twiki (added)
+++ maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.twiki.ui/src/main/resources/org/apache/maven/doxia/ide/eclipse/twiki/ui/wizard/new.twiki Mon Apr  7 06:24:23 2008
@@ -0,0 +1,5 @@
+---+ Section title
+
+---++ Sub\-section title
+
+ Paragraph 1.
\ No newline at end of file



Mime
View raw message