You are viewing a plain text version of this content. The canonical link for it is here.
Posted to doxia-commits@maven.apache.org by vs...@apache.org on 2008/04/07 15:21:06 UTC

svn commit: r645504 - in /maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.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/j...

Author: vsiveton
Date: Mon Apr  7 06:21:00 2008
New Revision: 645504

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

o added apt plugin

Added:
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/.classpath   (with props)
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/.project   (with props)
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/build.properties   (with props)
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/icons/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/icons/doxia.gif   (with props)
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/plugin.properties   (with props)
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/plugin.xml   (with props)
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/java/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/java/org/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/java/org/apache/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/java/org/apache/maven/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/java/org/apache/maven/doxia/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/java/org/apache/maven/doxia/ide/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.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.apt.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/apt/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/apt/ui/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/apt/ui/AptPlugin.java   (with props)
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/apt/ui/editor/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/apt/ui/editor/AptDocumentProvider.java   (with props)
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/apt/ui/editor/AptEditor.java   (with props)
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/apt/ui/editor/AptEditorContributor.java   (with props)
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/apt/ui/wizard/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/apt/ui/wizard/AptWizard.java   (with props)
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/resources/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/resources/org/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/resources/org/apache/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/resources/org/apache/maven/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/resources/org/apache/maven/doxia/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/resources/org/apache/maven/doxia/ide/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.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.apt.ui/src/main/resources/org/apache/maven/doxia/ide/eclipse/apt/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/resources/org/apache/maven/doxia/ide/eclipse/apt/ui/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/resources/org/apache/maven/doxia/ide/eclipse/apt/ui/wizard/
    maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/resources/org/apache/maven/doxia/ide/eclipse/apt/ui/wizard/new.apt   (with props)

Added: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/.classpath
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/.classpath?rev=645504&view=auto
==============================================================================
--- maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/.classpath (added)
+++ maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/.classpath Mon Apr  7 06:21:00 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.apt.ui/.classpath
------------------------------------------------------------------------------
    svn:eol-style = native

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

Added: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/.project
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/.project?rev=645504&view=auto
==============================================================================
--- maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/.project (added)
+++ maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/.project Mon Apr  7 06:21:00 2008
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.apache.maven.doxia.ide.eclipse.apt.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.apt.ui/.project
------------------------------------------------------------------------------
    svn:eol-style = native

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

Added: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/build.properties
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/build.properties?rev=645504&view=auto
==============================================================================
--- maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/build.properties (added)
+++ maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/build.properties Mon Apr  7 06:21:00 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.apt.ui/build.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.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.apt.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.apt.ui/icons/doxia.gif?rev=645504&view=auto
==============================================================================
Binary file - no diff available.

Propchange: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.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.apt.ui/plugin.properties
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/plugin.properties?rev=645504&view=auto
==============================================================================
--- maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/plugin.properties (added)
+++ maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/plugin.properties Mon Apr  7 06:21:00 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 Apt Plug-in
+plugin.provider.name=Apache Maven
+
+#
+# Doxia Editor
+#
+editor.name=Doxia APT Editor
+
+#
+# Doxia Wizard
+#
+wizard.category.name=Apache Doxia
+wizard.name=Apt 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.apt.ui/plugin.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.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.apt.ui/plugin.xml
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/plugin.xml?rev=645504&view=auto
==============================================================================
--- maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/plugin.xml (added)
+++ maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/plugin.xml Mon Apr  7 06:21:00 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.apt.ui"
+   name="%plugin.name"
+   version="1.0"
+   provider-name="%plugin.provider.name"
+   class="org.apache.maven.doxia.ide.eclipse.apt.ui.AptPlugin">
+
+   <runtime>
+      <library name="target/classes/">
+         <export
+               name="org.apache.maven.doxia.ide.eclipse.apt.ui.*">
+         </export>
+         <export
+               name="org.apache.maven.doxia.ide.eclipse.apt.ui.editor.*">
+         </export>
+         <export
+               name="org.apache.maven.doxia.ide.eclipse.apt.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="apt"
+            icon="icons/doxia.gif"
+            contributorClass="org.apache.maven.doxia.ide.eclipse.apt.ui.editor.AptEditorContributor"
+            class="org.apache.maven.doxia.ide.eclipse.apt.ui.editor.AptEditor"
+            id="org.apache.maven.doxia.ide.eclipse.apt.ui.editor.AptEditor">
+      </editor>
+   </extension>
+   <extension
+         point="org.eclipse.ui.editors.documentProviders">
+      <provider
+            class="org.apache.maven.doxia.ide.eclipse.apt.ui.editor.AptDocumentProvider"
+            id="org.apache.maven.doxia.ide.eclipse.apt.ui.editor.AptDocumentProvider">
+      </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.apt.ui.wizard.AptWizard"
+            id="org.apache.maven.doxia.ide.eclipse.apt.ui.wizard.AptWizard">
+      </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.apt.ui.editor.AptEditor.EditorContext"
+            targetID="org.apache.maven.doxia.ide.eclipse.apt.ui.editor.AptEditor.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.apt.ui.editor.AptEditor"
+            targetID="org.apache.maven.doxia.ide.eclipse.apt.ui.editor.AptEditor">
+         <!-- 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.apt.ui/plugin.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.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.apt.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/apt/ui/AptPlugin.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/apt/ui/AptPlugin.java?rev=645504&view=auto
==============================================================================
--- maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/apt/ui/AptPlugin.java (added)
+++ maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/apt/ui/AptPlugin.java Mon Apr  7 06:21:00 2008
@@ -0,0 +1,96 @@
+package org.apache.maven.doxia.ide.eclipse.apt.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;
+
+/**
+ * Doxia APT plug-in.
+ *
+ * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
+ * @version $Id$
+ * @since 1.0
+ */
+public class AptPlugin
+    extends AbstractDoxiaPlugin
+{
+    /** The APT plug-in ID */
+    public static final String PLUGIN_ID = "org.apache.maven.doxia.ide.eclipse.apt.ui";
+
+    /** The shared instance */
+    private static AptPlugin plugin;
+
+    /**
+     * The constructor
+     */
+    public AptPlugin()
+    {
+        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 AptPlugin 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 "apt";
+    }
+}

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

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

Added: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/apt/ui/editor/AptDocumentProvider.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/apt/ui/editor/AptDocumentProvider.java?rev=645504&view=auto
==============================================================================
--- maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/apt/ui/editor/AptDocumentProvider.java (added)
+++ maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/apt/ui/editor/AptDocumentProvider.java Mon Apr  7 06:21:00 2008
@@ -0,0 +1,70 @@
+package org.apache.maven.doxia.ide.eclipse.apt.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.EndOfLineRule;
+import org.eclipse.jface.text.rules.IPartitionTokenScanner;
+import org.eclipse.jface.text.rules.IRule;
+import org.eclipse.jface.text.rules.Token;
+
+/**
+ * APT document provider.
+ *
+ * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
+ * @version $Id$
+ * @since 1.0
+ */
+public class AptDocumentProvider
+    extends AbstractTextDocumentProvider
+{
+    @Override
+    public IPartitionTokenScanner getScanner()
+    {
+        return new AptPartitionScanner();
+    }
+
+    /**
+     * APT partition scanner
+     */
+    class AptPartitionScanner
+        extends AbstractTextPartitionScanner
+    {
+        public AptPartitionScanner()
+        {
+            super();
+        }
+
+        @Override
+        public List<IRule> getRules()
+        {
+            List<IRule> rules = new LinkedList<IRule>();
+
+            // Add comment rule
+            rules.add( new EndOfLineRule( "~~", new Token( PARTITION_COMMENT_TOKEN ) ) );
+
+            return rules;
+        }
+    }
+}

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

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

Added: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/apt/ui/editor/AptEditor.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/apt/ui/editor/AptEditor.java?rev=645504&view=auto
==============================================================================
--- maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/apt/ui/editor/AptEditor.java (added)
+++ maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/apt/ui/editor/AptEditor.java Mon Apr  7 06:21:00 2008
@@ -0,0 +1,587 @@
+package org.apache.maven.doxia.ide.eclipse.apt.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.apt.ui.AptPlugin;
+import org.apache.maven.doxia.ide.eclipse.apt.ui.editor.AptDocumentProvider.AptPartitionScanner;
+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.markup.Markup;
+import org.apache.maven.doxia.module.apt.AptMarkup;
+import org.apache.maven.doxia.module.apt.AptSink;
+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.ICharacterScanner;
+import org.eclipse.jface.text.rules.IRule;
+import org.eclipse.jface.text.rules.IToken;
+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;
+
+/**
+ * APT editor.
+ *
+ * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
+ * @version $Id$
+ * @since 1.0
+ * @see <a href="http://maven.apache.org/doxia/references/apt-format.html">http://maven.apache.org/doxia/references/apt-format.html</a>
+ */
+public class AptEditor
+    extends AbstractTextMultiPageEditorPart
+{
+    private TextEditor editor;
+
+    @Override
+    public TextEditor getTextEditor()
+    {
+        if ( editor != null )
+        {
+            return editor;
+        }
+
+        editor = new AptTextEditor();
+        editor.setAction( IActionConstants.BOLD_ACTION, new AbstractBoldAction( editor )
+        {
+            @Override
+            public String getStartMarkup()
+            {
+                return AptSink.BOLD_START_MARKUP;
+            }
+
+            @Override
+            public String getEndMarkup()
+            {
+                return AptSink.BOLD_END_MARKUP;
+            }
+        } );
+        editor.setAction( IActionConstants.ITALIC_ACTION, new AbstractItalicAction( editor )
+        {
+            @Override
+            public String getStartMarkup()
+            {
+                return AptSink.ITALIC_START_MARKUP;
+            }
+
+            @Override
+            public String getEndMarkup()
+            {
+                return AptSink.ITALIC_END_MARKUP;
+            }
+        } );
+        editor.setAction( IActionConstants.MONOSPACED_ACTION, new AbstractMonospacedAction( editor )
+        {
+            @Override
+            public String getStartMarkup()
+            {
+                return AptSink.MONOSPACED_START_MARKUP;
+            }
+
+            @Override
+            public String getEndMarkup()
+            {
+                return AptSink.MONOSPACED_END_MARKUP;
+            }
+        } );
+        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( AptMarkup.TABLE_ROW_START_MARKUP );
+
+                    for ( int j = 0; j < table.getColumns(); j++ )
+                    {
+                        String text;
+                        switch ( table.getTableStyle() )
+                        {
+                            case Table.TABLE_STYLE_CENTERED:
+                                text = AptMarkup.TABLE_COL_CENTERED_ALIGNED_MARKUP;
+                                break;
+
+                            case Table.TABLE_STYLE_LEFTALIGNED:
+                                text = AptMarkup.TABLE_COL_LEFT_ALIGNED_MARKUP;
+                                break;
+
+                            case Table.TABLE_STYLE_RIGHTALIGNED:
+                                text = AptMarkup.TABLE_COL_RIGHT_ALIGNED_MARKUP;
+                                break;
+
+                            default:
+                                text = AptMarkup.TABLE_COL_LEFT_ALIGNED_MARKUP;
+                                break;
+                        }
+                        sb.append( text );
+                        if ( j != table.getColumns() - 1 )
+                        {
+                            sb.append( "----" );
+                        }
+                    }
+
+                    sb.append( "" );
+                    sb.append( Markup.EOL );
+
+                    for ( int j = 0; j < table.getColumns(); j++ )
+                    {
+                        sb.append( AptMarkup.TABLE_ROW_SEPARATOR_MARKUP );
+                        sb.append( " " + DEFAULT_CELL_TEXT + " " );
+                        if ( j == table.getColumns() - 1 )
+                        {
+                            sb.append( AptMarkup.TABLE_ROW_SEPARATOR_MARKUP );
+                        }
+                    }
+
+                    sb.append( Markup.EOL );
+                }
+
+                sb.append( AptMarkup.TABLE_ROW_START_MARKUP );
+                for ( int j = 0; j < table.getColumns(); j++ )
+                {
+                    String text;
+                    switch ( table.getTableStyle() )
+                    {
+                        case Table.TABLE_STYLE_CENTERED:
+                            text = AptMarkup.TABLE_COL_CENTERED_ALIGNED_MARKUP;
+                            break;
+
+                        case Table.TABLE_STYLE_LEFTALIGNED:
+                            text = AptMarkup.TABLE_COL_LEFT_ALIGNED_MARKUP;
+                            break;
+
+                        case Table.TABLE_STYLE_RIGHTALIGNED:
+                            text = AptMarkup.TABLE_COL_RIGHT_ALIGNED_MARKUP;
+                            break;
+
+                        default:
+                            text = AptMarkup.TABLE_COL_LEFT_ALIGNED_MARKUP;
+                            break;
+                    }
+                    sb.append( text );
+                    if ( j != table.getColumns() - 1 )
+                    {
+                        sb.append( "----" );
+                    }
+                }
+                sb.append( Markup.EOL );
+
+                if ( StringUtils.isNotEmpty( table.getCaption() ) )
+                {
+                    sb.append( table.getCaption() );
+                    sb.append( Markup.EOL );
+                }
+
+                return sb.toString();
+            }
+        } );
+
+        return editor;
+    }
+
+    @Override
+    public String getFormat()
+    {
+        return AptPlugin.getDoxiaFormat();
+    }
+
+    class AptTextEditor
+        extends AbstractTextEditor
+    {
+        @Override
+        public String getEditorId()
+        {
+            return "org.apache.maven.doxia.ide.eclipse.apt.ui.editor.AptEditor";
+        }
+
+        @Override
+        public IDocumentProvider getFileDocumentProvider()
+        {
+            return new AptDocumentProvider();
+        }
+
+        @Override
+        public TextSourceViewerConfiguration getTextSourceViewerConfiguration()
+        {
+            return new AptSourceViewerConfiguration();
+        }
+    }
+
+    class AptSourceViewerConfiguration
+        extends AbstractTextSourceViewerConfiguration
+    {
+        public AptSourceViewerConfiguration()
+        {
+            super();
+        }
+
+        @Override
+        protected RuleBasedScanner getScanner()
+        {
+            return new AptScanner();
+        }
+
+        @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 AptContentAssistProcessor();
+            assistant.setContentAssistProcessor( processor, IDocument.DEFAULT_CONTENT_TYPE );
+            assistant.setContentAssistProcessor( processor, AptPartitionScanner.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 AptScanner
+        extends AbstractTextScanner
+    {
+        public AptScanner()
+        {
+            super();
+        }
+
+        @Override
+        public List<IRule> getRules()
+        {
+            List<IRule> rules = new ArrayList<IRule>();
+
+            // TODO add more rules and review color!
+
+            // comment rule
+            rules.add( new EndOfLineRule( AptMarkup.COMMENT + "" + AptMarkup.COMMENT, commentToken ) );
+
+            // horizontal rule
+            rules.add( new EndOfLineRule( AptMarkup.HORIZONTAL_RULE_MARKUP, new Token( new TextAttribute( ColorManager
+                .getInstance().getColor( ColorManager.LINK ) ) ) ) );
+
+            // verbatim rules
+            rules.add( new MultiLineRule( AptMarkup.BOXED_VERBATIM_START_MARKUP, AptMarkup.BOXED_VERBATIM_END_MARKUP,
+                                          new Token( new TextAttribute( ColorManager.getInstance()
+                                              .getColor( ColorManager.STRING ) ) ) ) );
+            rules.add( new MultiLineRule( AptMarkup.NON_BOXED_VERBATIM_START_MARKUP,
+                                          AptMarkup.NON_BOXED_VERBATIM_END_MARKUP,
+                                          new Token( new TextAttribute( ColorManager.getInstance()
+                                              .getColor( ColorManager.STRING ) ) ) ) );
+
+            // monospaced rule
+            rules.add( new SingleLineRule( AptMarkup.MONOSPACED_START_MARKUP, AptMarkup.MONOSPACED_END_MARKUP,
+                                           monospacedToken ) );
+
+            // bold rule
+            rules.add( new SingleLineRule( AptMarkup.BOLD_START_MARKUP, AptMarkup.BOLD_END_MARKUP, boldToken ) );
+
+            // italic rule
+            rules.add( new SingleLineRule( AptMarkup.ITALIC_START_MARKUP, AptMarkup.ITALIC_END_MARKUP, italicToken ) );
+
+            // link rule
+            rules.add( new SingleLineRule( "{{{", "}}", linkToken ) );
+            rules.add( new SingleLineRule( "{{", "}}", linkToken ) );
+            rules.add( new SingleLineRule( "{", "}", linkToken ) );
+
+            // escaped character rule
+            rules.add( new EscapedCharacterRule( new Token( new TextAttribute( ColorManager.getInstance()
+                .getColor( ColorManager.STRING ) ) ) ) );
+
+            return rules;
+        }
+
+        class EscapedCharacterRule
+            implements IRule
+        {
+            /**
+             * The associated token.
+             */
+            private IToken token;
+
+            /**
+             * Constructor.
+             *
+             * @param token the associated token
+             */
+            public EscapedCharacterRule( IToken token )
+            {
+                this.token = token;
+            }
+
+            /**
+             * @param character Character to determine whether it is an escaped character
+             * @return <code>true</code> if the character is a escaped char, <code>false</code> otherwise.
+             */
+            boolean isEscapedCharacter( char character )
+            {
+                /** APT separators */
+                char[] APT_ESCAPED_CHARACTER = { '~', '=', '-', '+', '*', '[', ']', '<', '>', '{', '}', '\\' };
+
+                for ( int index = 0; index < APT_ESCAPED_CHARACTER.length; index++ )
+                {
+                    if ( APT_ESCAPED_CHARACTER[index] == character )
+                    {
+                        return true;
+                    }
+                }
+
+                return false;
+            }
+
+            /** {@inheritDoc} */
+            public synchronized IToken evaluate( ICharacterScanner scanner )
+            {
+                char character = (char) scanner.read();
+                if ( character == '\\' )
+                {
+                    character = (char) scanner.read();
+                    if ( isEscapedCharacter( character ) )
+                    {
+                        do
+                        {
+                            character = (char) scanner.read();
+                        }
+                        while ( isEscapedCharacter( character ) );
+
+                        scanner.unread();
+
+                        return token;
+                    }
+                    else
+                    {
+                        scanner.unread();
+
+                        return Token.UNDEFINED;
+                    }
+                }
+
+                scanner.unread();
+
+                return Token.UNDEFINED;
+            }
+        }
+    }
+
+    class AptContentAssistProcessor
+        extends AbstractContentAssistProcessor
+    {
+        public AptContentAssistProcessor()
+        {
+            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 ),
+                CommonPlugin.getImage( CommonPlugin.IMG_LINK ),
+                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.apt.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/apt/ui/editor/AptEditor.java
------------------------------------------------------------------------------
    svn:eol-style = native

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

Added: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/apt/ui/editor/AptEditorContributor.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/apt/ui/editor/AptEditorContributor.java?rev=645504&view=auto
==============================================================================
--- maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/apt/ui/editor/AptEditorContributor.java (added)
+++ maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/apt/ui/editor/AptEditorContributor.java Mon Apr  7 06:21:00 2008
@@ -0,0 +1,38 @@
+package org.apache.maven.doxia.ide.eclipse.apt.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;
+
+/**
+ * APT contributor.
+ *
+ * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
+ * @version $Id$
+ * @since 1.0
+ */
+public class AptEditorContributor
+    extends AbstractEditorContributor
+{
+    public AptEditorContributor()
+    {
+        super();
+    }
+}

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

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

Added: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/apt/ui/wizard/AptWizard.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/apt/ui/wizard/AptWizard.java?rev=645504&view=auto
==============================================================================
--- maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/apt/ui/wizard/AptWizard.java (added)
+++ maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/java/org/apache/maven/doxia/ide/eclipse/apt/ui/wizard/AptWizard.java Mon Apr  7 06:21:00 2008
@@ -0,0 +1,62 @@
+package org.apache.maven.doxia.ide.eclipse.apt.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.apt.ui.AptPlugin;
+import org.apache.maven.doxia.ide.eclipse.common.ui.wizards.AbstractWizard;
+import org.apache.maven.doxia.ide.eclipse.common.ui.wizards.AbstractWizardPage;
+import org.eclipse.jface.viewers.ISelection;
+
+/**
+ * APT wizard.
+ *
+ * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
+ * @version $Id$
+ */
+public class AptWizard
+    extends AbstractWizard
+{
+    @Override
+    public AbstractWizardPage getWizardPage( ISelection selection )
+    {
+        return new AptWizardPage( selection );
+    }
+
+    @Override
+    public String getWizardTemplate()
+    {
+        return "new.apt";
+    }
+
+    class AptWizardPage
+        extends AbstractWizardPage
+    {
+        public AptWizardPage( ISelection selection )
+        {
+            super( selection );
+        }
+
+        @Override
+        public String getExtension()
+        {
+            return AptPlugin.getDoxiaFormat();
+        }
+    }
+}

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

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

Added: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/resources/org/apache/maven/doxia/ide/eclipse/apt/ui/wizard/new.apt
URL: http://svn.apache.org/viewvc/maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/resources/org/apache/maven/doxia/ide/eclipse/apt/ui/wizard/new.apt?rev=645504&view=auto
==============================================================================
--- maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/resources/org/apache/maven/doxia/ide/eclipse/apt/ui/wizard/new.apt (added)
+++ maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/resources/org/apache/maven/doxia/ide/eclipse/apt/ui/wizard/new.apt Mon Apr  7 06:21:00 2008
@@ -0,0 +1,15 @@
+ -----
+ Title
+ -----
+ Author
+ -----
+ Date
+ -----
+
+~~ http://maven.apache.org/doxia/references/apt-format.html
+
+Section title
+
+*Sub\-section title
+
+ Paragraph 1.
\ No newline at end of file

Propchange: maven/doxia/doxia-tools/trunk/doxia-ide/eclipse/plugins/org.apache.maven.doxia.ide.eclipse.apt.ui/src/main/resources/org/apache/maven/doxia/ide/eclipse/apt/ui/wizard/new.apt
------------------------------------------------------------------------------
    svn:eol-style = native

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