Author: dvinnichek
Date: 2010-10-06 09:05:44 -0400 (Wed, 06 Oct 2010)
New Revision: 25520
Added:
trunk/vpe/plugins/org.jboss.tools.vpe.docbook/src/org/jboss/tools/vpe/docbook/template/DocbookCautionTemplate.java
trunk/vpe/plugins/org.jboss.tools.vpe.docbook/src/org/jboss/tools/vpe/docbook/template/DocbookImportantTemplate.java
trunk/vpe/tests/org.jboss.tools.vpe.docbook.test/resources/DocbookTest/WebContent/pages/components/caution/
trunk/vpe/tests/org.jboss.tools.vpe.docbook.test/resources/DocbookTest/WebContent/pages/components/caution/caution.xml
trunk/vpe/tests/org.jboss.tools.vpe.docbook.test/resources/DocbookTest/WebContent/pages/components/caution/caution.xml.xml
trunk/vpe/tests/org.jboss.tools.vpe.docbook.test/resources/DocbookTest/WebContent/pages/components/important/
trunk/vpe/tests/org.jboss.tools.vpe.docbook.test/resources/DocbookTest/WebContent/pages/components/important/important.xml
trunk/vpe/tests/org.jboss.tools.vpe.docbook.test/resources/DocbookTest/WebContent/pages/components/important/important.xml.xml
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.docbook/src/org/jboss/tools/vpe/docbook/template/util/Docbook.java
trunk/vpe/plugins/org.jboss.tools.vpe.docbook/templates/vpe-templates-docbook.xml
trunk/vpe/tests/org.jboss.tools.vpe.docbook.test/src/org/jboss/tools/vpe/docbook/test/DocbookComponentContentTest.java
Log:
create classes for displaying docbook elements <caution> and <important> in
vpe (
https://jira.jboss.org/browse/JBIDE-7242)
Added:
trunk/vpe/plugins/org.jboss.tools.vpe.docbook/src/org/jboss/tools/vpe/docbook/template/DocbookCautionTemplate.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe.docbook/src/org/jboss/tools/vpe/docbook/template/DocbookCautionTemplate.java
(rev 0)
+++
trunk/vpe/plugins/org.jboss.tools.vpe.docbook/src/org/jboss/tools/vpe/docbook/template/DocbookCautionTemplate.java 2010-10-06
13:05:44 UTC (rev 25520)
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.vpe.docbook.template;
+
+import org.jboss.tools.vpe.docbook.template.util.Docbook;
+
+/**
+ * Class for <caution>
+ *
+ * @author Denis Vinnichek (dvinnichek)
+ */
+public class DocbookCautionTemplate extends ElementWithGeneratedOutputTemplate {
+
+ @Override
+ protected String getGeneratedText() {
+ return Docbook.ELEMENT_CAUTION.toUpperCase();
+ }
+}
Property changes on:
trunk/vpe/plugins/org.jboss.tools.vpe.docbook/src/org/jboss/tools/vpe/docbook/template/DocbookCautionTemplate.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/vpe/plugins/org.jboss.tools.vpe.docbook/src/org/jboss/tools/vpe/docbook/template/DocbookImportantTemplate.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe.docbook/src/org/jboss/tools/vpe/docbook/template/DocbookImportantTemplate.java
(rev 0)
+++
trunk/vpe/plugins/org.jboss.tools.vpe.docbook/src/org/jboss/tools/vpe/docbook/template/DocbookImportantTemplate.java 2010-10-06
13:05:44 UTC (rev 25520)
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.vpe.docbook.template;
+
+import org.jboss.tools.vpe.docbook.template.util.Docbook;
+
+/**
+ * Class for <important>
+ *
+ * @author Denis Vinnichek (dvinnichek)
+ */
+public class DocbookImportantTemplate extends ElementWithGeneratedOutputTemplate {
+
+ @Override
+ protected String getGeneratedText() {
+ return Docbook.ELEMENT_IMPORTANT.toUpperCase();
+ }
+}
Property changes on:
trunk/vpe/plugins/org.jboss.tools.vpe.docbook/src/org/jboss/tools/vpe/docbook/template/DocbookImportantTemplate.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.docbook/src/org/jboss/tools/vpe/docbook/template/util/Docbook.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe.docbook/src/org/jboss/tools/vpe/docbook/template/util/Docbook.java 2010-10-06
12:26:21 UTC (rev 25519)
+++
trunk/vpe/plugins/org.jboss.tools.vpe.docbook/src/org/jboss/tools/vpe/docbook/template/util/Docbook.java 2010-10-06
13:05:44 UTC (rev 25520)
@@ -25,4 +25,6 @@
public static final String ELEMENT_TIP = "tip"; //$NON-NLS-1$
public static final String ELEMENT_NOTE = "note"; //$NON-NLS-1$
public static final String ELEMENT_WARNING = "warning"; //$NON-NLS-1$
+ public static final String ELEMENT_CAUTION = "caution"; //$NON-NLS-1$
+ public static final String ELEMENT_IMPORTANT = "important"; //$NON-NLS-1$
}
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.docbook/templates/vpe-templates-docbook.xml
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe.docbook/templates/vpe-templates-docbook.xml 2010-10-06
12:26:21 UTC (rev 25519)
+++
trunk/vpe/plugins/org.jboss.tools.vpe.docbook/templates/vpe-templates-docbook.xml 2010-10-06
13:05:44 UTC (rev 25520)
@@ -615,11 +615,8 @@
</vpe:template>
</vpe:tag>
<vpe:tag name="important" case-sensitive="yes"
docbook="yes">
- <vpe:template children="yes" modify="yes">
- <div id="{@id}" style="background-color: #ECF3FF; border: 1px solid
black;">
- <h2><vpe:value expr="Important" /></h2>
- </div>
- </vpe:template>
+ <vpe:template children="yes" modify="yes"
+ class="org.jboss.tools.vpe.docbook.template.DocbookImportantTemplate"/>
</vpe:tag>
<vpe:tag name="warning" case-sensitive="yes"
docbook="yes">
<vpe:template children="yes" modify="yes"
@@ -966,9 +963,8 @@
</vpe:template>
</vpe:tag>
<vpe:tag name="caution" case-sensitive="yes"
docbook="yes">
- <vpe:template children="yes" modify="yes">
- <div id="{@id}"/>
- </vpe:template>
+ <vpe:template children="yes" modify="yes"
+ class="org.jboss.tools.vpe.docbook.template.DocbookCautionTemplate"/>
</vpe:tag>
<vpe:tag name="citation" case-sensitive="yes"
docbook="yes">
<vpe:template children="no" modify="yes">
Added:
trunk/vpe/tests/org.jboss.tools.vpe.docbook.test/resources/DocbookTest/WebContent/pages/components/caution/caution.xml
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.docbook.test/resources/DocbookTest/WebContent/pages/components/caution/caution.xml
(rev 0)
+++
trunk/vpe/tests/org.jboss.tools.vpe.docbook.test/resources/DocbookTest/WebContent/pages/components/caution/caution.xml 2010-10-06
13:05:44 UTC (rev 25520)
@@ -0,0 +1,9 @@
+<!DOCTYPE caution PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<caution id="caution01">
+ <title>No User Servicable Parts Inside</title>
+ <para> Breaking this seal voids all warranties. </para>
+</caution>
+<caution id="caution02">
+ <para> Breaking this seal voids all warranties. </para>
+</caution>
\ No newline at end of file
Property changes on:
trunk/vpe/tests/org.jboss.tools.vpe.docbook.test/resources/DocbookTest/WebContent/pages/components/caution/caution.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added:
trunk/vpe/tests/org.jboss.tools.vpe.docbook.test/resources/DocbookTest/WebContent/pages/components/caution/caution.xml.xml
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.docbook.test/resources/DocbookTest/WebContent/pages/components/caution/caution.xml.xml
(rev 0)
+++
trunk/vpe/tests/org.jboss.tools.vpe.docbook.test/resources/DocbookTest/WebContent/pages/components/caution/caution.xml.xml 2010-10-06
13:05:44 UTC (rev 25520)
@@ -0,0 +1,29 @@
+<tests>
+ <test id="caution01">
+ <DIV ID="caution01" STYLE="border: 1px solid black; background-color:
rgb(236, 243, 255);">
+ <H1>
+ <SPAN>
+ No User Servicable Parts Inside
+ </SPAN>
+ </H1>
+ <P>
+ <SPAN>
+ Breaking this seal voids all warranties.
+ </SPAN>
+ </P>
+ </DIV>
+ </test>
+ <test id="caution02">
+ <DIV ID="caution02"
+ STYLE="border: 1px solid black; background-color: rgb(236, 243, 255);">
+ <H1>
+ CAUTION
+ </H1>
+ <P>
+ <SPAN>
+ Breaking this seal voids all warranties.
+ </SPAN>
+ </P>
+ </DIV>
+ </test>
+</tests>
\ No newline at end of file
Property changes on:
trunk/vpe/tests/org.jboss.tools.vpe.docbook.test/resources/DocbookTest/WebContent/pages/components/caution/caution.xml.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added:
trunk/vpe/tests/org.jboss.tools.vpe.docbook.test/resources/DocbookTest/WebContent/pages/components/important/important.xml
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.docbook.test/resources/DocbookTest/WebContent/pages/components/important/important.xml
(rev 0)
+++
trunk/vpe/tests/org.jboss.tools.vpe.docbook.test/resources/DocbookTest/WebContent/pages/components/important/important.xml 2010-10-06
13:05:44 UTC (rev 25520)
@@ -0,0 +1,13 @@
+<!DOCTYPE important PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<important id="important01">
+ <title>Title</title>
+ <para>
+ No user-servicable parts inside. Breaking this seal voids all warranties.
+ </para>
+</important>
+<important id="important02">
+ <para>
+ No user-servicable parts inside. Breaking this seal voids all warranties.
+ </para>
+</important>
\ No newline at end of file
Property changes on:
trunk/vpe/tests/org.jboss.tools.vpe.docbook.test/resources/DocbookTest/WebContent/pages/components/important/important.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added:
trunk/vpe/tests/org.jboss.tools.vpe.docbook.test/resources/DocbookTest/WebContent/pages/components/important/important.xml.xml
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.docbook.test/resources/DocbookTest/WebContent/pages/components/important/important.xml.xml
(rev 0)
+++
trunk/vpe/tests/org.jboss.tools.vpe.docbook.test/resources/DocbookTest/WebContent/pages/components/important/important.xml.xml 2010-10-06
13:05:44 UTC (rev 25520)
@@ -0,0 +1,29 @@
+<tests>
+ <test id="important01">
+ <DIV ID="important01" STYLE="border: 1px solid black;
background-color: rgb(236, 243, 255);">
+ <H1>
+ <SPAN>
+ Title
+ </SPAN>
+ </H1>
+ <P>
+ <SPAN>
+ No user-servicable parts inside. Breaking this seal voids all warranties.
+ </SPAN>
+ </P>
+ </DIV>
+ </test>
+ <test id="important02">
+ <DIV ID="important02"
+ STYLE="border: 1px solid black; background-color: rgb(236, 243, 255);">
+ <H1>
+ IMPORTANT
+ </H1>
+ <P>
+ <SPAN>
+ No user-servicable parts inside. Breaking this seal voids all warranties.
+ </SPAN>
+ </P>
+ </DIV>
+ </test>
+</tests>
\ No newline at end of file
Property changes on:
trunk/vpe/tests/org.jboss.tools.vpe.docbook.test/resources/DocbookTest/WebContent/pages/components/important/important.xml.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.docbook.test/src/org/jboss/tools/vpe/docbook/test/DocbookComponentContentTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.docbook.test/src/org/jboss/tools/vpe/docbook/test/DocbookComponentContentTest.java 2010-10-06
12:26:21 UTC (rev 25519)
+++
trunk/vpe/tests/org.jboss.tools.vpe.docbook.test/src/org/jboss/tools/vpe/docbook/test/DocbookComponentContentTest.java 2010-10-06
13:05:44 UTC (rev 25520)
@@ -52,6 +52,14 @@
performContentTest("components/warning/warning.xml"); //$NON-NLS-1$
}
+ public void testCaution() throws Throwable {
+ performContentTest("components/caution/caution.xml"); //$NON-NLS-1$
+ }
+
+ public void testImportant() throws Throwable {
+ performContentTest("components/important/important.xml"); //$NON-NLS-1$
+ }
+
@Override
protected String getTestProjectName() {
return DocbookAllTests.IMPORT_PROJECT_NAME;