JBoss Tools SVN: r7189 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-03-28 14:31:50 -0400 (Fri, 28 Mar 2008)
New Revision: 7189
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
Log:
http://jira.jboss.org/jira/browse/JBIDE-1494
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2008-03-28 18:31:42 UTC (rev 7188)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2008-03-28 18:31:50 UTC (rev 7189)
@@ -48,30 +48,9 @@
<vpe:container-child tag-name="recursiveTreeNodesAdaptor" />
</vpe:drop>
</vpe:dnd>
- <vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
<vpe:format type="BlockFormat" addChildren="deny" />
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ </vpe:textFormatting>
<vpe:pseudoContent defaultText="yes" />
</vpe:template>
</vpe:tag>
@@ -167,11 +146,11 @@
<vpe:drag start-enable="yes" />
<vpe:drop container="no" />
</vpe:dnd>
- <vpe:textFormating>
+ <vpe:textFormatting>
<vpe:format type="BackgroundColorFormat">
<vpe:formatAttribute type="style" />
</vpe:format>
- </vpe:textFormating>
+ </vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -277,30 +256,9 @@
<vpe:container-child tag-name="column"/>
</vpe:drop>
</vpe:dnd>
- <vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
<vpe:format type="BlockFormat" addChildren="deny"/>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- </vpe:textFormating>
+ </vpe:textFormatting>
<vpe:pseudoContent defaultText="yes"/>
</vpe:template>
</vpe:tag>
@@ -317,30 +275,9 @@
<vpe:container-child tag-name="column"/>
</vpe:drop>
</vpe:dnd>
- <vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
<vpe:format type="BlockFormat" addChildren="deny"/>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- </vpe:textFormating>
+ </vpe:textFormatting>
<vpe:pseudoContent defaultText="yes"/>
</vpe:template>
</vpe:tag>
@@ -353,30 +290,9 @@
<vpe:container-child tag-name="column"/>
</vpe:drop>
</vpe:dnd>
- <vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
<vpe:format type="BlockFormat" addChildren="deny"/>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- </vpe:textFormating>
+ </vpe:textFormatting>
<vpe:pseudoContent defaultText="yes"/>
</vpe:template>
</vpe:tag>
@@ -459,46 +375,6 @@
</vpe:template>
</vpe:tag>
- <!-- vpe:tag name="rich:toggleControl" case-sensitive="yes">
- <vpe:template children="yes" modify="yes">
- <span class="{@styleClass}" style="color:blue;text-decoration:underline;{@style}" title="{tagstring()}">
- <vpe:value expr="{jsfvalue(@value)}"/>
- </span>
- <vpe:dnd>
- <vpe:drag start-enable="yes"/>
- <vpe:drop container="yes">
- <vpe:container-child tag-name="outputText"/>
- </vpe:drop>
- </vpe:dnd>
- <vpe:textFormating>
- <vpe:format type="BlockFormat"
- handler="org.jboss.tools.vpe.editor.toolbar.format.handler.BlockFormatHandler" />
- <vpe:format type="UnderlineFormat" setDefault="true">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- </vpe:textFormating>
- <vpe:pseudoContent/>
- </vpe:template>
- </vpe:tag -->
-
<vpe:tag name="rich:tabPanel" case-sensitive="yes">
<vpe:template children="yes" modify="yes" class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesTabPanelTemplate">
<vpe:resize>
@@ -728,29 +604,8 @@
<vpe:container-child tag-name="column" />
</vpe:drop>
</vpe:dnd>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
</vpe:template>
</vpe:tag>
16 years, 9 months
JBoss Tools SVN: r7188 - in trunk/vpe/plugins/org.jboss.tools.vpe: src/org/jboss/tools/vpe/editor/template and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-03-28 14:31:42 -0400 (Fri, 28 Mar 2008)
New Revision: 7188
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/resources/textFormatting.xml
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAbstractTemplate.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateManager.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/textformating/FormatAttributeData.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/textformating/FormatData.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/textformating/TextFormatingData.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-1494
Added: trunk/vpe/plugins/org.jboss.tools.vpe/resources/textFormatting.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/resources/textFormatting.xml (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/resources/textFormatting.xml 2008-03-28 18:31:42 UTC (rev 7188)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Author Max Areshkau
+ In this file contains configurations vpe:textFormatting tag
+-->
+<vpe:textFormatting>
+ <vpe:format type="UnderlineFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="BoldFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="ItalicFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="FontNameFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="FontSizeFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="BackgroundColorFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="ForegroundColorFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+</vpe:textFormatting>
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAbstractTemplate.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAbstractTemplate.java 2008-03-28 18:31:35 UTC (rev 7187)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAbstractTemplate.java 2008-03-28 18:31:42 UTC (rev 7188)
@@ -38,6 +38,11 @@
import org.w3c.dom.NodeList;
import org.w3c.dom.Text;
+/**
+ * Class which response for configuration template element from
+ * configuration file.
+ *
+ */
public abstract class VpeAbstractTemplate implements VpeTemplate {
protected boolean caseSensitive;
protected boolean children;
@@ -53,97 +58,97 @@
private TextFormatingData textFormatingData;
private VpePseudoContentCreator pseudoContentCreator;
- private static final String TAG_BREAKER = VpeTemplateManager.VPE_PREFIX + "breaker";
- private static final String ATTR_BREAKER_TYPE = "type";
- private static final String ATTR_BREAKER_TYPE_IGNORE = "ignore";
- private static final String ATTR_BREAKER_TYPE_SELECTITEM = "selectItem";
+ private static final String TAG_BREAKER = VpeTemplateManager.VPE_PREFIX + "breaker"; //$NON-NLS-1$
+ private static final String ATTR_BREAKER_TYPE = "type"; //$NON-NLS-1$
+ private static final String ATTR_BREAKER_TYPE_IGNORE = "ignore"; //$NON-NLS-1$
+ private static final String ATTR_BREAKER_TYPE_SELECTITEM = "selectItem"; //$NON-NLS-1$
private static final int BREAKER_TYPE_NONE = 0;
private static final int BREAKER_TYPE_IGNORE = 1;
private static final int BREAKER_TYPE_SELECTITEM = 2;
- private static final String TAG_PSEUDOCONTENT = VpeTemplateManager.VPE_PREFIX + "pseudoContent";
- private static final String ATTR_PSEUDOCONTENT_DEFAULTTEXT = "defaultText";
- private static final String ATTR_PSEUDOCONTENT_ATTRNAME = "attrName";
+ private static final String TAG_PSEUDOCONTENT = VpeTemplateManager.VPE_PREFIX + "pseudoContent"; //$NON-NLS-1$
+ private static final String ATTR_PSEUDOCONTENT_DEFAULTTEXT = "defaultText"; //$NON-NLS-1$
+ private static final String ATTR_PSEUDOCONTENT_ATTRNAME = "attrName"; //$NON-NLS-1$
private int breakerType = BREAKER_TYPE_NONE;
static private HashSet<String> inlineTags = new HashSet<String>();
static{
- inlineTags.add("b");
- inlineTags.add("i");
- inlineTags.add("u");
- inlineTags.add("img");
- inlineTags.add("sub");
- inlineTags.add("sup");
- inlineTags.add("strike");
- inlineTags.add("font");
- inlineTags.add("a");
- inlineTags.add("input");
- inlineTags.add("textarea");
- inlineTags.add("span");
- inlineTags.add("button");
- inlineTags.add("label");
+ inlineTags.add("b"); //$NON-NLS-1$
+ inlineTags.add("i"); //$NON-NLS-1$
+ inlineTags.add("u"); //$NON-NLS-1$
+ inlineTags.add("img"); //$NON-NLS-1$
+ inlineTags.add("sub"); //$NON-NLS-1$
+ inlineTags.add("sup"); //$NON-NLS-1$
+ inlineTags.add("strike"); //$NON-NLS-1$
+ inlineTags.add("font"); //$NON-NLS-1$
+ inlineTags.add("a"); //$NON-NLS-1$
+ inlineTags.add("input"); //$NON-NLS-1$
+ inlineTags.add("textarea"); //$NON-NLS-1$
+ inlineTags.add("span"); //$NON-NLS-1$
+ inlineTags.add("button"); //$NON-NLS-1$
+ inlineTags.add("label"); //$NON-NLS-1$
}
static private HashMap<String, Integer> tagResizeConstrans = new HashMap<String, Integer>();
static{
- tagResizeConstrans.put("table", Integer.valueOf(VpeTagDescription.RESIZE_CONSTRAINS_ALL));
- tagResizeConstrans.put("tr", Integer.valueOf(VpeTagDescription.RESIZE_CONSTRAINS_ALL));
- tagResizeConstrans.put("br", Integer.valueOf(VpeTagDescription.RESIZE_CONSTRAINS_NONE));
- tagResizeConstrans.put("b", Integer.valueOf(VpeTagDescription.RESIZE_CONSTRAINS_NONE));
- tagResizeConstrans.put("i", Integer.valueOf(VpeTagDescription.RESIZE_CONSTRAINS_NONE));
- tagResizeConstrans.put("u", Integer.valueOf(VpeTagDescription.RESIZE_CONSTRAINS_NONE));
- tagResizeConstrans.put("sub", Integer.valueOf(VpeTagDescription.RESIZE_CONSTRAINS_NONE));
- tagResizeConstrans.put("sup", Integer.valueOf(VpeTagDescription.RESIZE_CONSTRAINS_NONE));
- tagResizeConstrans.put("strike", Integer.valueOf(VpeTagDescription.RESIZE_CONSTRAINS_NONE));
- tagResizeConstrans.put("font", Integer.valueOf(VpeTagDescription.RESIZE_CONSTRAINS_NONE));
- tagResizeConstrans.put("a", Integer.valueOf(VpeTagDescription.RESIZE_CONSTRAINS_NONE));
+ tagResizeConstrans.put("table", Integer.valueOf(VpeTagDescription.RESIZE_CONSTRAINS_ALL)); //$NON-NLS-1$
+ tagResizeConstrans.put("tr", Integer.valueOf(VpeTagDescription.RESIZE_CONSTRAINS_ALL)); //$NON-NLS-1$
+ tagResizeConstrans.put("br", Integer.valueOf(VpeTagDescription.RESIZE_CONSTRAINS_NONE)); //$NON-NLS-1$
+ tagResizeConstrans.put("b", Integer.valueOf(VpeTagDescription.RESIZE_CONSTRAINS_NONE)); //$NON-NLS-1$
+ tagResizeConstrans.put("i", Integer.valueOf(VpeTagDescription.RESIZE_CONSTRAINS_NONE)); //$NON-NLS-1$
+ tagResizeConstrans.put("u", Integer.valueOf(VpeTagDescription.RESIZE_CONSTRAINS_NONE)); //$NON-NLS-1$
+ tagResizeConstrans.put("sub", Integer.valueOf(VpeTagDescription.RESIZE_CONSTRAINS_NONE)); //$NON-NLS-1$
+ tagResizeConstrans.put("sup", Integer.valueOf(VpeTagDescription.RESIZE_CONSTRAINS_NONE)); //$NON-NLS-1$
+ tagResizeConstrans.put("strike", Integer.valueOf(VpeTagDescription.RESIZE_CONSTRAINS_NONE)); //$NON-NLS-1$
+ tagResizeConstrans.put("font", Integer.valueOf(VpeTagDescription.RESIZE_CONSTRAINS_NONE)); //$NON-NLS-1$
+ tagResizeConstrans.put("a", Integer.valueOf(VpeTagDescription.RESIZE_CONSTRAINS_NONE)); //$NON-NLS-1$
}
static private HashSet<String> breakWithParagraphTags = new HashSet<String>();
static{
- breakWithParagraphTags.add("b");
- breakWithParagraphTags.add("a");
- breakWithParagraphTags.add("abbr");
- breakWithParagraphTags.add("acronym");
- breakWithParagraphTags.add("b");
- breakWithParagraphTags.add("bdo");
- breakWithParagraphTags.add("big");
- breakWithParagraphTags.add("blink");
- breakWithParagraphTags.add("cite");
- breakWithParagraphTags.add("code");
- breakWithParagraphTags.add("del");
- breakWithParagraphTags.add("dfn");
- breakWithParagraphTags.add("em");
- breakWithParagraphTags.add("font");
- breakWithParagraphTags.add("ins");
- breakWithParagraphTags.add("kbd");
- breakWithParagraphTags.add("nobr");
- breakWithParagraphTags.add("q");
- breakWithParagraphTags.add("s");
- breakWithParagraphTags.add("samp");
- breakWithParagraphTags.add("small");
- breakWithParagraphTags.add("span");
- breakWithParagraphTags.add("strike");
- breakWithParagraphTags.add("strong");
- breakWithParagraphTags.add("tt");
- breakWithParagraphTags.add("u");
- breakWithParagraphTags.add("var");
+ breakWithParagraphTags.add("b"); //$NON-NLS-1$
+ breakWithParagraphTags.add("a"); //$NON-NLS-1$
+ breakWithParagraphTags.add("abbr"); //$NON-NLS-1$
+ breakWithParagraphTags.add("acronym"); //$NON-NLS-1$
+ breakWithParagraphTags.add("b"); //$NON-NLS-1$
+ breakWithParagraphTags.add("bdo"); //$NON-NLS-1$
+ breakWithParagraphTags.add("big"); //$NON-NLS-1$
+ breakWithParagraphTags.add("blink"); //$NON-NLS-1$
+ breakWithParagraphTags.add("cite"); //$NON-NLS-1$
+ breakWithParagraphTags.add("code"); //$NON-NLS-1$
+ breakWithParagraphTags.add("del"); //$NON-NLS-1$
+ breakWithParagraphTags.add("dfn"); //$NON-NLS-1$
+ breakWithParagraphTags.add("em"); //$NON-NLS-1$
+ breakWithParagraphTags.add("font"); //$NON-NLS-1$
+ breakWithParagraphTags.add("ins"); //$NON-NLS-1$
+ breakWithParagraphTags.add("kbd"); //$NON-NLS-1$
+ breakWithParagraphTags.add("nobr"); //$NON-NLS-1$
+ breakWithParagraphTags.add("q"); //$NON-NLS-1$
+ breakWithParagraphTags.add("s"); //$NON-NLS-1$
+ breakWithParagraphTags.add("samp"); //$NON-NLS-1$
+ breakWithParagraphTags.add("small"); //$NON-NLS-1$
+ breakWithParagraphTags.add("span"); //$NON-NLS-1$
+ breakWithParagraphTags.add("strike"); //$NON-NLS-1$
+ breakWithParagraphTags.add("strong"); //$NON-NLS-1$
+ breakWithParagraphTags.add("tt"); //$NON-NLS-1$
+ breakWithParagraphTags.add("u"); //$NON-NLS-1$
+ breakWithParagraphTags.add("var"); //$NON-NLS-1$
}
static private HashSet<String> breakWithoutParagraphTags = new HashSet<String>();
static{
- breakWithoutParagraphTags.add("p");
- breakWithoutParagraphTags.add("address");
- breakWithoutParagraphTags.add("blockquote");
- breakWithoutParagraphTags.add("center");
- breakWithoutParagraphTags.add("div");
- breakWithoutParagraphTags.add("h1");
- breakWithoutParagraphTags.add("h2");
- breakWithoutParagraphTags.add("h3");
- breakWithoutParagraphTags.add("h4");
- breakWithoutParagraphTags.add("h5");
- breakWithoutParagraphTags.add("h6");
- breakWithoutParagraphTags.add("p");
- breakWithoutParagraphTags.add("pre");
+ breakWithoutParagraphTags.add("p"); //$NON-NLS-1$
+ breakWithoutParagraphTags.add("address"); //$NON-NLS-1$
+ breakWithoutParagraphTags.add("blockquote"); //$NON-NLS-1$
+ breakWithoutParagraphTags.add("center"); //$NON-NLS-1$
+ breakWithoutParagraphTags.add("div"); //$NON-NLS-1$
+ breakWithoutParagraphTags.add("h1"); //$NON-NLS-1$
+ breakWithoutParagraphTags.add("h2"); //$NON-NLS-1$
+ breakWithoutParagraphTags.add("h3"); //$NON-NLS-1$
+ breakWithoutParagraphTags.add("h4"); //$NON-NLS-1$
+ breakWithoutParagraphTags.add("h5"); //$NON-NLS-1$
+ breakWithoutParagraphTags.add("h6"); //$NON-NLS-1$
+ breakWithoutParagraphTags.add("p"); //$NON-NLS-1$
+ breakWithoutParagraphTags.add("pre"); //$NON-NLS-1$
}
/**
@@ -153,13 +158,13 @@
*/
public void init(Element templateElement, boolean caseSensitive) {
this.caseSensitive = caseSensitive;
- children = "yes".equals(templateElement.getAttribute(VpeTemplateManager.ATTR_TEMPLATE_CHILDREN));
- modify = "yes".equals(templateElement.getAttribute(VpeTemplateManager.ATTR_TEMPLATE_MODIFY));
+ children = "yes".equals(templateElement.getAttribute(VpeTemplateManager.ATTR_TEMPLATE_CHILDREN)); //$NON-NLS-1$
+ modify = "yes".equals(templateElement.getAttribute(VpeTemplateManager.ATTR_TEMPLATE_MODIFY)); //$NON-NLS-1$
String strHaveVisualPreview = templateElement.getAttribute(VpeTemplateManager.ATTR_TEMPLATE_HAVE_VISUAL_PREVIEW);
if (strHaveVisualPreview != null && strHaveVisualPreview.length() != 0 ) {
- haveVisualPreview = "yes".equals(strHaveVisualPreview);
+ haveVisualPreview = "yes".equals(strHaveVisualPreview); //$NON-NLS-1$
} else {
haveVisualPreview = true;
}
@@ -239,7 +244,7 @@
private void initPseudoContentHandler(Element templateSection) {
if (pseudoContentCreator == null) {
- if ("yes".equalsIgnoreCase(templateSection.getAttribute(ATTR_PSEUDOCONTENT_DEFAULTTEXT))) {
+ if ("yes".equalsIgnoreCase(templateSection.getAttribute(ATTR_PSEUDOCONTENT_DEFAULTTEXT))) { //$NON-NLS-1$
pseudoContentCreator = new VpeTextPseudoContentCreator(null, templateSection.getAttribute(ATTR_PSEUDOCONTENT_ATTRNAME));
} else {
NodeList children = templateSection.getChildNodes();
@@ -350,7 +355,7 @@
clearRegionToFormat();
Node focusNode = selection.getFocusNode();
int focusNodeType = focusNode.getNodeType();
- if (sourceNode.getNodeName().equalsIgnoreCase("li")) {
+ if (sourceNode.getNodeName().equalsIgnoreCase("li")) { //$NON-NLS-1$
Node where = null;
if (selection.getFocusOffset() == 0) {
where = sourceNode;
@@ -405,13 +410,13 @@
updateRegionToFormat(newLi);
reformatCallback(pageContext);
return true;
- } else if (focusNodeType == Node.ELEMENT_NODE && focusNode.getNodeName().equalsIgnoreCase("br")) {
- Node newNode = focusNode.getParentNode().insertBefore(focusNode.getOwnerDocument().createElement("br"), focusNode);
+ } else if (focusNodeType == Node.ELEMENT_NODE && focusNode.getNodeName().equalsIgnoreCase("br")) { //$NON-NLS-1$
+ Node newNode = focusNode.getParentNode().insertBefore(focusNode.getOwnerDocument().createElement("br"), focusNode); //$NON-NLS-1$
updateRegionToFormat(focusNode);
updateRegionToFormat(newNode);
reformatCallback(pageContext);
return true;
- } else if (focusNodeType == Node.ELEMENT_NODE && focusNode.getNodeName().equalsIgnoreCase("p")) {
+ } else if (focusNodeType == Node.ELEMENT_NODE && focusNode.getNodeName().equalsIgnoreCase("p")) { //$NON-NLS-1$
Node nextElement = focusNode.getNextSibling();
Node parent = focusNode.getParentNode();
if (parent != null) {
@@ -427,16 +432,16 @@
updateRegionToFormat(focusNode);
reformatCallback(pageContext);
return true;
- } else if (focusNodeType == Node.TEXT_NODE && focusNode.getParentNode().getNodeName().equalsIgnoreCase("td")) {
+ } else if (focusNodeType == Node.TEXT_NODE && focusNode.getParentNode().getNodeName().equalsIgnoreCase("td")) { //$NON-NLS-1$
Text newNode = ((Text)focusNode).splitText(selection.getFocusOffset());
setCursor(pageContext, newNode);
updateRegionToFormat(focusNode);
updateRegionToFormat(newNode);
reformatCallback(pageContext);
return true;
- } else if (sourceNode.getNodeType() == Node.ELEMENT_NODE && sourceNode.getNodeName().equalsIgnoreCase("tr")) {
+ } else if (sourceNode.getNodeType() == Node.ELEMENT_NODE && sourceNode.getNodeName().equalsIgnoreCase("tr")) { //$NON-NLS-1$
return true;
- } else if (focusNodeType == Node.TEXT_NODE && !focusNode.getParentNode().getNodeName().equalsIgnoreCase("body")) {
+ } else if (focusNodeType == Node.TEXT_NODE && !focusNode.getParentNode().getNodeName().equalsIgnoreCase("body")) { //$NON-NLS-1$
Node parent = focusNode.getParentNode();
if (parent != null) {
String parentName = parent.getNodeName();
@@ -444,14 +449,14 @@
Node p1 = null, p2 = null;
Node parentParent = parent.getParentNode();
if (parentParent != null) {
- if (!parentParent.getNodeName().equalsIgnoreCase("p")) {
+ if (!parentParent.getNodeName().equalsIgnoreCase("p")) { //$NON-NLS-1$
if (parentParent.getNodeType() != Node.DOCUMENT_NODE) {
- p1 = parentParent.getOwnerDocument().createElement("p");
+ p1 = parentParent.getOwnerDocument().createElement("p"); //$NON-NLS-1$
parentParent.insertBefore(p1, parent);
parent = parentParent.removeChild(parent);
p1.appendChild(parent);
} else {
- p1 = ((Document)parentParent).createElement("p");
+ p1 = ((Document)parentParent).createElement("p"); //$NON-NLS-1$
parentParent.insertBefore(p1, parent);
parent = parentParent.removeChild(parent);
p1.appendChild(parent);
@@ -548,9 +553,9 @@
}
}
}
- } else if (focusNodeType == Node.TEXT_NODE && focusNode.getParentNode().getNodeName().equalsIgnoreCase("body")) {
- Node p1 = focusNode.getOwnerDocument().createElement("p");
- Node p2 = focusNode.getOwnerDocument().createElement("p");
+ } else if (focusNodeType == Node.TEXT_NODE && focusNode.getParentNode().getNodeName().equalsIgnoreCase("body")) { //$NON-NLS-1$
+ Node p1 = focusNode.getOwnerDocument().createElement("p"); //$NON-NLS-1$
+ Node p2 = focusNode.getOwnerDocument().createElement("p"); //$NON-NLS-1$
Text newNode = ((Text)focusNode).splitText(selection.getFocusOffset());
focusNode.getParentNode().insertBefore(p1, focusNode);
focusNode.getParentNode().insertBefore(p2, newNode);
@@ -567,7 +572,7 @@
return true;
} else if (focusNodeType == Node.ELEMENT_NODE && selection.getFocusOffset() == 0) {
- Node newNode = focusNode.getParentNode().insertBefore(focusNode.getOwnerDocument().createElement("br"), focusNode);
+ Node newNode = focusNode.getParentNode().insertBefore(focusNode.getOwnerDocument().createElement("br"), focusNode); //$NON-NLS-1$
updateRegionToFormat(focusNode);
updateRegionToFormat(newNode);
reformatCallback(pageContext);
@@ -581,12 +586,12 @@
if (parent != null) {
boolean isH = false;
for (int i = 1; i < 7 && !isH; i++) {
- isH = parent.getNodeName().equalsIgnoreCase("h" + i);
+ isH = parent.getNodeName().equalsIgnoreCase("h" + i); //$NON-NLS-1$
}
if (!isH || clone) {
newParent = parent.cloneNode(false);
} else {
- newParent = parent.getOwnerDocument().createElement("p");
+ newParent = parent.getOwnerDocument().createElement("p"); //$NON-NLS-1$
}
}
return newParent;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateManager.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateManager.java 2008-03-28 18:31:35 UTC (rev 7187)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateManager.java 2008-03-28 18:31:42 UTC (rev 7188)
@@ -27,7 +27,9 @@
import org.jboss.tools.jst.web.tld.TaglibData;
import org.jboss.tools.vpe.VpePlugin;
import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.template.textformating.TextFormatingData;
import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.editor.util.VpeDebugUtil;
import org.jboss.tools.vpe.editor.util.XmlUtil;
import org.osgi.framework.Bundle;
import org.w3c.dom.Document;
@@ -37,7 +39,6 @@
public class VpeTemplateManager {
- static final String TEMPLATES_FILE_LIST_NAME = "vpe-templates-list.xml"; //$NON-NLS-1$
static final String AUTO_TEMPLATES_FILE_NAME = "templates/vpe-templates-auto.xml"; //$NON-NLS-1$
static final String TEMPLATES_FOLDER = File.separator + "templates" + File.separator; //$NON-NLS-1$
public static final String VPE_PREFIX = "vpe:"; //$NON-NLS-1$
@@ -96,7 +97,7 @@
static final String TAG_FACET = VPE_PREFIX + "facet"; //$NON-NLS-1$
static final String TAG_MY_FACES_PAGE_LAYOUT = VPE_PREFIX + "panellayout"; //$NON-NLS-1$
- public static final String TAG_TEXT_FORMATING = VPE_PREFIX + "textFormating"; //$NON-NLS-1$
+ public static final String TAG_TEXT_FORMATING = VPE_PREFIX + "textFormatting"; //$NON-NLS-1$
public static final String TAG_FORMAT = VPE_PREFIX + "format"; //$NON-NLS-1$
public static final String TAG_FORMAT_ATTRIBUTE = VPE_PREFIX + "formatAttribute"; //$NON-NLS-1$
@@ -121,7 +122,7 @@
static final String ATTR_TAG_NAME = "name"; //$NON-NLS-1$
static final String ATTR_TAG_CASE_SENSITIVE = "case-sensitive"; //$NON-NLS-1$
- static final String ATTR_VALUE_YES = "yes"; //$NON-NLS-1$
+ public static final String ATTR_VALUE_YES = "yes"; //$NON-NLS-1$
static final String ATTR_VALUE_NO = "no"; //$NON-NLS-1$
static final String ATTR_IF_TEST = "test"; //$NON-NLS-1$
@@ -226,6 +227,19 @@
private Set<String> withoutWhitespaceContainerSet = new HashSet<String>();
private Set<String> withoutPseudoElementContainerSet = new HashSet<String>();
+ /**
+ * added by Max Areshkau, JBIDE-1494
+ * Contains default text formating data
+ */
+ private static TextFormatingData defaultTextFormattingData;
+ /**
+ * contains default text formating file name
+ */
+ private static final String DEFAUL_TEXT_FORMATTING_CONF_FILE_NAME= File.separator+"resources"+File.separator+"textFormatting.xml"; //$NON-NLS-1$ //$NON-NLS-2$
+ /**
+ * Property which indicates that with this tag will be added default formats
+ */
+ public static final String ATTR_USE_DEFAULT_FORMATS="use-default-formats"; //$NON-NLS-1$
/*
* Added by Max Areshkau(mareshkau(a)exadel.com)
*/
@@ -235,7 +249,6 @@
*/
private static final String NAMESPACE_IDENTIFIER_ATTRIBUTE = "namespaceIdentifier"; //$NON-NLS-1$
-
private VpeTemplateManager() {
}
@@ -312,7 +325,13 @@
private void load() {
initWithoutWhitespaceContainerSet();
initPseudoElementContainerSet();
+ /*
+ * loads templates configurations files
+ */
templateFileList.load();
+ /*
+ * load templates
+ */
loadImpl();
}
@@ -861,4 +880,24 @@
}
return defTemplate;
}
+
+ /**
+ * Initialize and returns default text formatting data
+ * @return the defaultTextFormatingData
+ */
+ public static TextFormatingData getDefaultTextFormattingData() {
+
+ if(defaultTextFormattingData==null) {
+
+ try {
+ IPath path = VpeTemplateFileList.getFilePath(DEFAUL_TEXT_FORMATTING_CONF_FILE_NAME, null);
+ Element root = XMLUtilities.getElement(path.toFile(), null);
+ defaultTextFormattingData = new TextFormatingData(root);
+ } catch (Exception e) {
+
+ VpePlugin.getPluginLog().logError(e);
+ }
+ }
+ return defaultTextFormattingData;
+ }
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/textformating/FormatAttributeData.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/textformating/FormatAttributeData.java 2008-03-28 18:31:35 UTC (rev 7187)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/textformating/FormatAttributeData.java 2008-03-28 18:31:42 UTC (rev 7188)
@@ -17,9 +17,9 @@
/**
* @author Igels
*/
-public class FormatAttributeData {
+public class FormatAttributeData implements Cloneable{
- public static final String STYLE_TYPE = "style";
+ public static final String STYLE_TYPE = "style"; //$NON-NLS-1$
private String type;
private String name;
@@ -27,6 +27,24 @@
private boolean caseSensitive = false;
private FormatData parentFormatData;
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#clone()
+ */
+ @Override
+ public FormatAttributeData clone() throws CloneNotSupportedException {
+
+ FormatAttributeData result = new FormatAttributeData(parentFormatData, null);
+
+ result.type = new String(this.type);
+ result.name = new String(this.name);
+ result.value = new String(this.value);
+ result.caseSensitive = caseSensitive;
+ result.parentFormatData = this.parentFormatData;
+
+ return result;
+ }
+
/**
* @param formatAttribute - Element <vpe:formatAttribute>
*/
@@ -75,4 +93,11 @@
public FormatData getParentFormatData() {
return parentFormatData;
}
+
+ /**
+ * @param parentFormatData the parentFormatData to set
+ */
+ public void setParentFormatData(FormatData parentFormatData) {
+ this.parentFormatData = parentFormatData;
+ }
}
\ No newline at end of file
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/textformating/FormatData.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/textformating/FormatData.java 2008-03-28 18:31:35 UTC (rev 7187)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/textformating/FormatData.java 2008-03-28 18:31:42 UTC (rev 7188)
@@ -19,7 +19,7 @@
* FormatData describe vpe template text formating part for tag.
* @author Igels
*/
-public class FormatData {
+public class FormatData implements Cloneable{
private FormatAttributeData[] formatAttributes;
private String type;
@@ -51,12 +51,48 @@
addChildren = formatElement.getAttribute(VpeTemplateManager.ATTR_FORMAT_ADD_CHILDREN);
addChildrenHandler = formatElement.getAttribute(VpeTemplateManager.ATTR_FORMAT_ADD_CHILDREN_HANDLER);
handler = formatElement.getAttribute(VpeTemplateManager.ATTR_FORMAT_HANDLER);
- setDefault = "true".equals(formatElement.getAttribute(VpeTemplateManager.ATTR_FORMAT_SET_DEFAULT));
+ setDefault = "true".equals(formatElement.getAttribute(VpeTemplateManager.ATTR_FORMAT_SET_DEFAULT)); //$NON-NLS-1$
setAddChildrenFlags();
addParent = formatElement.getAttribute(VpeTemplateManager.ATTR_FORMAT_ADD_PARENT);
setAddParentFlags();
}
+ private FormatData() {
+
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#clone()
+ */
+ @Override
+ public FormatData clone() throws CloneNotSupportedException {
+
+ FormatData result = new FormatData();
+
+ result.formatAttributes = new FormatAttributeData[formatAttributes.length];
+ //clone format attributes
+ for(int i=0;i<formatAttributes.length;i++) {
+ result.formatAttributes[i]=this.formatAttributes[i].clone();
+ result.formatAttributes[i].setParentFormatData(result);
+ }
+ result.addChildren = new String(this.addChildren);
+ result.addChildrenByItself = this.addChildrenByItself;
+ result.addChildrenHandler = new String(this.addChildrenHandler);
+ result.addChildrenIsAllow = this.addChildrenIsAllow;
+ result.addChildrenIsAllowIfParentDoesntDeny = this.addChildrenIsAllowIfParentDoesntDeny;
+ result.addChildrenIsDeny=this.addChildrenIsDeny;
+ result.addParent = new String(this.addParent);
+ result.addParentByItself = this.addParentByItself;
+ result.addParentIsAllow = this.addParentIsAllow;
+ result.addParentIsAllowIfParentDoesntDeny = this.addParentIsAllowIfParentDoesntDeny;
+ result.addParentIsDeny = this.addParentIsDeny;
+ result.handler = new String(this.handler);
+ result.setDefault=this.setDefault;
+ result.type= new String(this.type);
+ return result;
+ }
+
+
private void setAddChildrenFlags() {
if(VpeTemplateManager.ATTR_FORMAT_ADD_CHILDREN_ALLOW_VALUE.equals(addChildren)) {
addChildrenIsAllow = true;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/textformating/TextFormatingData.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/textformating/TextFormatingData.java 2008-03-28 18:31:35 UTC (rev 7187)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/textformating/TextFormatingData.java 2008-03-28 18:31:42 UTC (rev 7188)
@@ -11,6 +11,7 @@
package org.jboss.tools.vpe.editor.template.textformating;
import java.util.ArrayList;
+import java.util.List;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
@@ -26,18 +27,65 @@
private FormatData[] formats;
/**
- * @param templateTextFormatingElement - Element <vpe:textFormating>
+ * @param templateTextFormatingElement - Element <vpe:textFormatting>
*/
public TextFormatingData(Element templateTextFormatingElement) {
NodeList list = templateTextFormatingElement.getElementsByTagName(VpeTemplateManager.TAG_FORMAT);
- formats = new FormatData[list.getLength()];
- for(int i=0; i<list.getLength(); i++) {
+
+ List<FormatData> defaultFormats = new ArrayList<FormatData>();
+
+ if(VpeTemplateManager.ATTR_VALUE_YES.
+ equals(templateTextFormatingElement.getAttribute(VpeTemplateManager.ATTR_USE_DEFAULT_FORMATS))) {
+ //adds default format data
+ FormatData[] formats =VpeTemplateManager.getDefaultTextFormattingData().getAllFormatData();
+ for (FormatData formatData :formats) {
+
+ defaultFormats.add(formatData);
+ }
+ }
+ List<FormatData> localFormats=new ArrayList<FormatData>();
+
+ for(int i=0;i<list.getLength();i++) {
Element element = (Element)list.item(i);
- formats[i] = new FormatData(element);
+ localFormats.add(new FormatData(element));
}
+ formats=(FormatData[])mergeLocalAndDefaultFormats(defaultFormats, localFormats).toArray(new FormatData[0]);
}
-
/**
+ * Merges local and default formats.
+ * If format with some type exist in local copy and remote, we use
+ * local format
+ *
+ * @return merged list
+ */
+ private List<FormatData> mergeLocalAndDefaultFormats(List<FormatData> defaultFormats,List<FormatData> localFormats) {
+
+ List<FormatData> result = new ArrayList<FormatData>(localFormats);
+ for (FormatData formatData : defaultFormats) {
+ if(!isFormatExistInList(result,formatData)) {
+ result.add(formatData);
+ }
+ }
+ return result;
+ }
+
+ private boolean isFormatExistInList(List<FormatData> formatData, FormatData data) {
+
+ if(data.getType()==null) {
+
+ return false;
+ }
+
+ for (FormatData format : formatData) {
+
+ if(data.getType().equals(format.getType())) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+ /**
* @return children - <vpe:format>
*/
public FormatData[] getAllFormatData() {
@@ -65,4 +113,5 @@
public boolean hasFormatData(String type) {
return getFormatDatas(type).length>0;
}
+
}
\ No newline at end of file
16 years, 9 months
JBoss Tools SVN: r7187 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.tomahawk/templates.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-03-28 14:31:35 -0400 (Fri, 28 Mar 2008)
New Revision: 7187
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.tomahawk/templates/vpe-templates-tomahawk.xml
Log:
http://jira.jboss.org/jira/browse/JBIDE-1494
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.tomahawk/templates/vpe-templates-tomahawk.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.tomahawk/templates/vpe-templates-tomahawk.xml 2008-03-28 17:58:02 UTC (rev 7186)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.tomahawk/templates/vpe-templates-tomahawk.xml 2008-03-28 18:31:35 UTC (rev 7187)
@@ -49,29 +49,8 @@
<input type="submit" value="{jsfvalue(@text)}"
disabled="true" class="{@styleClass}" style="{@style}"
title="{tagstring()}" />
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
</vpe:template>
</vpe:if>
<vpe:if test="not(attrpresent('image'))">
@@ -87,29 +66,8 @@
<vpe:width width-attr="style.width" />
<vpe:height height-attr="style.height" />
</vpe:resize>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
</vpe:template>
</vpe:if>
<vpe:if
@@ -125,29 +83,8 @@
<vpe:width width-attr="style.width" />
<vpe:height height-attr="style.height" />
</vpe:resize>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
</vpe:template>
</vpe:if>
</vpe:if>
@@ -163,29 +100,8 @@
<vpe:width width-attr="style.width" />
<vpe:height height-attr="style.height" />
</vpe:resize>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
</vpe:template>
</vpe:if>
</vpe:tag>
@@ -261,29 +177,8 @@
<vpe:container-child tag-name="selectItems"/>
</vpe:drop>
</vpe:dnd>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- </vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -307,30 +202,12 @@
<vpe:drag start-enable="yes" />
<vpe:drop container="no" />
</vpe:dnd>
- <vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
<vpe:format type="BlockFormat" handler="org.jboss.tools.vpe.editor.toolbar.format.handler.BlockFormatHandler" />
<vpe:format type="UnderlineFormat" setDefault="true">
<vpe:formatAttribute type="style" />
</vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ </vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -341,29 +218,8 @@
action="{@action}" title="{tagstring()}">
<vpe:value expr="{jsfvalue(@value)}" />
</div>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -375,29 +231,8 @@
action="{@action}" title="{tagstring()}">
<vpe:value expr="{jsfvalue(@value)}" />
</li>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -407,29 +242,8 @@
title="{tagstring()}">
<vpe:value expr="{jsfvalue(@value)}" />
</div>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -445,29 +259,8 @@
title="{tagstring()}">
<vpe:value expr="{jsfvalue(@value)}" />
</vpe:grid>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
</vpe:template>
</vpe:if>
<vpe:template children="yes" modify="no">
@@ -476,29 +269,8 @@
class="{@styleClass}" style="{@style}" title="{tagstring()}">
<vpe:value expr="{jsfvalue(@value)}" />
</vpe:list>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -525,29 +297,8 @@
headerClass="{@headerClass}" rowClasses="{@rowClasses}"
frame="{@frame}" rules="{@rules}" class="{@styleClass}"
style="{@style}" title="{tagstring()}" />
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -563,29 +314,8 @@
headerClass="{@headerClass}" rowClasses="{@rowClasses}"
frame="{@frame}" rules="{@rules}" class="{@styleClass}"
style="{@style}" title="{tagstring()}" />
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -634,29 +364,8 @@
title="{tagstring()}">
<vpe:value expr="{jsfvalue(@value)}" />
</div>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -717,29 +426,8 @@
<vpe:width width-attr="style.width" />
<vpe:height height-attr="style.height" />
</vpe:resize>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
</vpe:template>
</vpe:if>
<vpe:if test="@disabled='true'">
@@ -759,58 +447,16 @@
<vpe:width width-attr="style.width" />
<vpe:height height-attr="style.height" />
</vpe:resize>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
</vpe:template>
</vpe:if>
<vpe:template children="no" modify="yes">
<input type="text" value="{jsfvalue(@value)}"
class="{@styleClass}" style="{@style}"
title="{tagstring()}" size="{@size}"/>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -845,29 +491,8 @@
<vpe:width width-attr="style.width" />
<vpe:height height-attr="style.height" />
</vpe:resize>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
</vpe:template>
</vpe:if>
<vpe:if test="@disabled='true'">
@@ -887,29 +512,8 @@
<vpe:width width-attr="style.width" />
<vpe:height height-attr="style.height" />
</vpe:resize>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
</vpe:template>
</vpe:if>
<vpe:template children="no" modify="no">
@@ -925,29 +529,8 @@
<vpe:width width-attr="style.width" />
<vpe:height height-attr="style.height" />
</vpe:resize>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -967,29 +550,8 @@
<vpe:width width-attr="style.width" />
<vpe:height height-attr="style.height" />
</vpe:resize>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -1028,39 +590,6 @@
<td><a href="#">25</a></td><td><a href="#">26</a></td><td><a href="#">27</a></td><td><a href="#">28</a></td><td><a href="#">29</a></td><td><a href="#">30</a></td><td class="{@currentDayCellClass}"><a href="#">31</a></td></tr>
</table>
</vpe:template>
- <!--vpe:template children="no" modify="no">
- <div class="{@styleClass}" style="{@style}"
- title="{tagstring()}">
- <vpe:value expr="{jsfvalue(@value)}" />
- </div>
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- <vpe:drop container="no" />
- </vpe:dnd>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
- </vpe:template-->
</vpe:tag>
<vpe:tag name="t:messages">
@@ -1093,30 +622,9 @@
<vpe:width width-attr="style.width" />
<vpe:height height-attr="style.height" />
</vpe:resize>
- <vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
<vpe:format type="BlockFormat" handler="org.jboss.tools.vpe.editor.toolbar.format.handler.BlockFormatHandler" />
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ </vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -1161,30 +669,9 @@
<vpe:width width-attr="style.width" />
<vpe:height height-attr="style.height" />
</vpe:resize>
- <vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
<vpe:format type="BlockFormat" handler="org.jboss.tools.vpe.editor.toolbar.format.handler.BlockFormatHandler" />
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ </vpe:textFormatting>
</vpe:template>
</vpe:if>
<vpe:template children="yes" modify="yes">
@@ -1200,30 +687,9 @@
<vpe:width width-attr="style.width" />
<vpe:height height-attr="style.height" />
</vpe:resize>
- <vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
<vpe:format type="BlockFormat" handler="org.jboss.tools.vpe.editor.toolbar.format.handler.BlockFormatHandler" />
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ </vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -1239,29 +705,8 @@
border="{@border}" style="background-color:{@bgcolor};{@style}"
title="{tagstring()}">
</div>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -1287,29 +732,8 @@
</vpe:if>
<vpe:template children="yes" modify="no">
<div class="{@styleClass}" style="{@style}" />
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -1324,29 +748,8 @@
style="background-color:{@bgcolor};{@style}" rendered="{@rendered}"
bgcolor="{@bgcolor}">
</div>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -1358,29 +761,8 @@
</vpe:if>
<vpe:template children="yes" modify="no">
<vpe:panellayout />
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -1418,29 +800,8 @@
<vpe:container-child tag-name="selectItems" />
</vpe:drop>
</vpe:dnd>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
</vpe:template>
</vpe:if>
<vpe:template children="yes" modify="yes">
@@ -1453,29 +814,8 @@
<vpe:container-child tag-name="selectItems" />
</vpe:drop>
</vpe:dnd>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -1493,57 +833,15 @@
<input type="checkbox" disabled="true"
style="{@style}" class="{@styleClass}" />
</vpe:grid>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
</vpe:template>
</vpe:if>
<vpe:template children="yes" modify="yes">
<vpe:grid layout="{@layout}" border="{@border}"
title="{tagstring()}" style="{@style}" class="{@styleClass}" />
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -1590,29 +888,8 @@
<vpe:drop container="yes" />
</vpe:dnd>
</vpe:template>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
</vpe:if>
<vpe:if test="@readonly = 'true'">
<vpe:template children="no" modify="no">
@@ -1626,29 +903,8 @@
<vpe:drag start-enable="yes" />
<vpe:drop container="yes" />
</vpe:dnd>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
</vpe:template>
</vpe:if>
<vpe:template children="yes" modify="yes">
@@ -1660,29 +916,8 @@
<vpe:drag start-enable="yes" />
<vpe:drop container="yes" />
</vpe:dnd>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -1722,29 +957,8 @@
headerClass="{@headerClass}" rowClasses="{@rowClasses}"
frame="{@frame}" rules="{@rules}" class="{@styleClass}"
style="{@style}" title="{tagstring()}" />
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -1930,29 +1144,8 @@
<vpe:width width-attr="style.width" />
<vpe:height height-attr="style.height" />
</vpe:resize>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -1990,29 +1183,8 @@
<vpe:container-child tag-name="selectItems"/>
</vpe:drop>
</vpe:dnd>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- </vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -2030,29 +1202,8 @@
<vpe:drop container="yes"/>
</vpe:dnd>
<vpe:breaker type="ignore"/>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- </vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
</vpe:template>
</vpe:tag>
16 years, 9 months
JBoss Tools SVN: r7186 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test: resources/jsfTest/WebContent/pages/JBIDE/1494 and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-03-28 13:58:02 -0400 (Fri, 28 Mar 2008)
New Revision: 7186
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/1494/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/1494/JBIDE-1494.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE1494.java
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-1494, junit test for JBIDE-1494
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/1494/JBIDE-1494.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/1494/JBIDE-1494.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/1494/JBIDE-1494.xhtml 2008-03-28 17:58:02 UTC (rev 7186)
@@ -0,0 +1,23 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:rich="http://richfaces.org/rich">
+<head>
+<title>JBIDE-1494</title>
+</head>
+<body>
+<h:outputText value="JBIDE-1494 Test" />
+<h:dataTable>
+ <h:column>
+ <h:outputText value="column 1" />
+ </h:column>
+ <h:column>
+ <h:outputText value="column 2" />
+ </h:column>
+</h:dataTable>
+<span>Test</span>
+</body>
+</html>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2008-03-28 17:15:28 UTC (rev 7185)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2008-03-28 17:58:02 UTC (rev 7186)
@@ -20,6 +20,7 @@
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE1460Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE1479Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE1484Test;
+import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE1494;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE1615Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE1720Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE1730Test;
@@ -62,6 +63,7 @@
suite.addTestSuite(JBIDE1720Test.class);
suite.addTestSuite(JsfJbide1718Test.class);
suite.addTestSuite(JBIDE1730Test.class);
+ suite.addTestSuite(JBIDE1494.class);
// $JUnit-END$
// added by Max Areshkau
// add here projects which should be imported for junit tests
@@ -73,7 +75,7 @@
// Perfomance Tests
// TODO dsakovich adjust perfomance tests
- suite.addTestSuite(PerfomanceTest.class);
+// suite.addTestSuite(PerfomanceTest.class);
ImportBean importPerfomanceBean = new ImportBean();
importPerfomanceBean.setImportProjectName(PerfomanceTest.IMPORT_PROJECT_NAME);
importPerfomanceBean.setImportProjectPath(JsfTestPlugin.getPluginResourcePath());
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE1494.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE1494.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE1494.java 2008-03-28 17:58:02 UTC (rev 7186)
@@ -0,0 +1,107 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.vpe.jsf.test.jbide;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
+import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.vpe.editor.VpeController;
+import org.jboss.tools.vpe.editor.template.VpeTemplate;
+import org.jboss.tools.vpe.editor.template.VpeTemplateManager;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+import org.jboss.tools.vpe.ui.test.VpeTest;
+import org.w3c.dom.Node;
+
+/**
+ * @author mareshkau
+ *
+ */
+public class JBIDE1494 extends VpeTest{
+
+ public static final String IMPORT_PROJECT_NAME = "jsfTest"; //$NON-NLS-1$
+
+ private static final String TEST_PAGE_NAME = "JBIDE/1494/JBIDE-1494.xhtml"; //$NON-NLS-1$
+
+ public JBIDE1494(String name) {
+ super(name);
+ }
+
+ public void testJBIDE1494() throws Throwable {
+ // wait
+ TestUtil.waitForJobs();
+ // set exception
+ setException(null);
+ // Tests CA
+ // get test page path
+ IFile file = (IFile) TestUtil.getComponentPath(TEST_PAGE_NAME,
+ IMPORT_PROJECT_NAME);
+ assertNotNull("Could not open specified file " + TEST_PAGE_NAME, file); //$NON-NLS-1$
+
+ IEditorInput input = new FileEditorInput(file);
+
+ assertNotNull("Editor input is null", input); //$NON-NLS-1$
+
+ // open and get editor
+ JSPMultiPageEditor part = openEditor(input);
+
+ StyledText styledText = part.getSourceEditor().getTextViewer()
+ .getTextWidget();
+
+ styledText.setCaretOffset(424);
+ Node h_outputText = (Node) ContentAssistUtils.getNodeAt(part
+ .getSourceEditor().getTextViewer(), 424);
+
+ assertNotNull(h_outputText);
+
+ VpeController vpeController = getVpeController(part);
+
+ VpeTemplateManager templateManager= vpeController.getPageContext().getVisualBuilder().getTemplateManager();
+ assertNotNull(templateManager);
+ Set<?> dependencySet = new HashSet();
+ VpeTemplate h_output_template = templateManager.getTemplate(vpeController.getPageContext(),h_outputText, dependencySet);
+
+ assertNotNull(h_output_template.getTextFormatingData());
+ //text formating for h:output
+ assertEquals(7,h_output_template.getTextFormatingData().getAllFormatData().length);
+
+ Node h_dataTable = (Node) ContentAssistUtils.getNodeAt(part
+ .getSourceEditor().getTextViewer(), 473);
+
+ assertNotNull(h_dataTable);
+
+ dependencySet=new HashSet();
+
+ VpeTemplate h_data_Table = templateManager.getTemplate(vpeController.getPageContext(),h_dataTable , dependencySet);
+
+ assertNotNull(h_data_Table.getTextFormatingData());
+
+ assertEquals(8,h_data_Table.getTextFormatingData().getAllFormatData().length);
+
+ Node span =(Node) ContentAssistUtils.getNodeAt(part
+ .getSourceEditor().getTextViewer(), 615);
+
+ dependencySet=new HashSet();
+
+ VpeTemplate spanTemplate = templateManager.getTemplate(vpeController.getPageContext(),span, dependencySet);
+
+ assertNotNull(spanTemplate);
+ assertEquals(10,spanTemplate.getTextFormatingData().getAllFormatData().length);
+ }
+
+
+}
16 years, 9 months
JBoss Tools SVN: r7185 - in trunk/seam: tests/org.jboss.tools.seam.ui.test/projects/TestSeamELContentAssist/WebContent and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2008-03-28 13:15:28 -0400 (Fri, 28 Mar 2008)
New Revision: 7185
Added:
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestSeamELContentAssist/WebContent/messages.xhtml
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestSeamELContentAssist/src/action/messages.properties
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamExpressionResolver.java
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/SeamUiAllTests.java
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTest.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1258
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java 2008-03-28 16:24:17 UTC (rev 7184)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java 2008-03-28 17:15:28 UTC (rev 7185)
@@ -35,6 +35,7 @@
import org.jboss.tools.seam.core.ScopeType;
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.seam.internal.core.el.ElVarSearcher.Var;
+import org.jboss.tools.seam.internal.core.el.SeamExpressionResolver.MessagesInfo;
/**
* Utility class used to collect info for EL
@@ -571,7 +572,13 @@
if (token.getType() == ELOperandToken.EL_SEPARATOR_TOKEN) {
// return all the methods + properties
for (TypeInfoCollector.MemberInfo mbr : members) {
- if (mbr.getMemberType() == null) continue;
+ if (mbr instanceof MessagesInfo) {
+ proposals.addAll(((MessagesInfo)mbr).getKeys());
+ continue;
+ }
+ if (mbr.getMemberType() == null) {
+ continue;
+ }
TypeInfoCollector infos = SeamExpressionResolver.collectTypeInfo(mbr);
if (TypeInfoCollector.isNotParameterizedCollection(mbr) || TypeInfoCollector.isResourceBundle(mbr.getMemberType())) {
status.setMapOrCollectionOrBundleAmoungTheTokens();
@@ -585,6 +592,10 @@
// return filtered methods + properties
Set<String> proposalsToFilter = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
for (TypeInfoCollector.MemberInfo mbr : members) {
+ if (mbr instanceof MessagesInfo) {
+ proposalsToFilter.addAll(((MessagesInfo)mbr).getKeys());
+ continue;
+ }
if (mbr.getMemberType() == null) continue;
TypeInfoCollector infos = SeamExpressionResolver.collectTypeInfo(mbr);
if (TypeInfoCollector.isNotParameterizedCollection(mbr) || TypeInfoCollector.isResourceBundle(mbr.getMemberType())) {
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamExpressionResolver.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamExpressionResolver.java 2008-03-28 16:24:17 UTC (rev 7184)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamExpressionResolver.java 2008-03-28 17:15:28 UTC (rev 7185)
@@ -12,11 +12,17 @@
package org.jboss.tools.seam.internal.core.el;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.List;
import java.util.Set;
+import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IMember;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaModelException;
import org.jboss.tools.common.model.util.TypeInfoCollector;
+import org.jboss.tools.common.model.util.TypeInfoCollector.MemberInfo;
+import org.jboss.tools.common.model.util.TypeInfoCollector.Type;
import org.jboss.tools.seam.core.BijectedAttributeType;
import org.jboss.tools.seam.core.IBijectedAttribute;
import org.jboss.tools.seam.core.ISeamComponent;
@@ -26,10 +32,12 @@
import org.jboss.tools.seam.core.ISeamElement;
import org.jboss.tools.seam.core.ISeamJavaComponentDeclaration;
import org.jboss.tools.seam.core.ISeamJavaSourceReference;
+import org.jboss.tools.seam.core.ISeamMessages;
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.ISeamXmlFactory;
import org.jboss.tools.seam.core.ScopeType;
import org.jboss.tools.seam.core.SeamComponentMethodType;
+import org.jboss.tools.seam.core.SeamCorePlugin;
/**
* Utility class used to resolve Seam project variables and to get the methods/properties and their presentation strings from type
@@ -158,6 +166,56 @@
}
/**
+ * This object wraps "messages" context variable.
+ * @author Alexey Kazakov
+ */
+ public static class MessagesInfo extends MemberInfo {
+
+ private ISeamMessages messages;
+
+ /**
+ * @param parentMember
+ * @param messages
+ * @throws JavaModelException
+ */
+ protected MessagesInfo(MemberInfo parentMember, ISeamMessages messages) throws JavaModelException {
+ super(null, null, messages.getName(), 0, null, false, null);
+ IMember member = messages.getSourceMember();
+ IType type = member.getDeclaringType();
+ setSourceType(type);
+ setDeclaringTypeQualifiedName(type==null?null:type.getFullyQualifiedName());
+ setName(messages.getName());
+ setModifiers(type.getFlags());
+ setParentMember(parentMember);
+ setDataModel(false);
+ setType(type==null?null:new Type(null, type));
+ this.messages = messages;
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.common.model.util.TypeInfoCollector.MemberInfo#getJavaElement()
+ */
+ @Override
+ public IJavaElement getJavaElement() {
+ return messages.getSourceMember();
+ }
+
+ /**
+ * @return property
+ */
+ public ISeamMessages getMessages() {
+ return messages;
+ }
+
+ /**
+ * @return keys of resource bundle
+ */
+ public Collection<String> getKeys() {
+ return messages.getPropertyNames();
+ }
+ }
+
+ /**
* Returns the IMember for the variable specified
*
* @param variable
@@ -168,6 +226,15 @@
if(variable instanceof ISeamContextShortVariable) {
return getMemberInfoByVariable(((ISeamContextShortVariable)variable).getOriginal(), onlyEqualNames);
}
+ if(variable instanceof ISeamMessages) {
+ MemberInfo info = null;;
+ try {
+ info = new MessagesInfo(null, (ISeamMessages)variable);
+ } catch (JavaModelException e) {
+ SeamCorePlugin.getPluginLog().logError(e);
+ }
+ return info;
+ }
if (variable instanceof ISeamComponent) {
ISeamComponent component = (ISeamComponent)variable;
Added: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestSeamELContentAssist/WebContent/messages.xhtml
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestSeamELContentAssist/WebContent/messages.xhtml (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestSeamELContentAssist/WebContent/messages.xhtml 2008-03-28 17:15:28 UTC (rev 7185)
@@ -0,0 +1,11 @@
+<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ template="layout/template.xhtml">
+<ui:define name="body">
+ <h:outputText value="#{messages.}"/>
+</ui:define>
+</ui:composition>
\ No newline at end of file
Added: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestSeamELContentAssist/src/action/messages.properties
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestSeamELContentAssist/src/action/messages.properties (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestSeamELContentAssist/src/action/messages.properties 2008-03-28 17:15:28 UTC (rev 7185)
@@ -0,0 +1,2 @@
+Text1=sss
+Text2=sssss
\ No newline at end of file
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/SeamUiAllTests.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/SeamUiAllTests.java 2008-03-28 16:24:17 UTC (rev 7184)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/SeamUiAllTests.java 2008-03-28 17:15:28 UTC (rev 7185)
@@ -34,16 +34,16 @@
public static Test suite() {
TestSuite suite = new TestSuite("Seam UI tests");
-// suite.addTestSuite(OpenSeamComponentDialogTest.class);
-// suite.addTest(SeamComponentsViewAllTests.suite());
-// suite.addTestSuite(SeamProjectNewWizardTest.class);
-// suite.addTestSuite(SeamFormNewWizardTest.class);
-// suite.addTestSuite(SeamPreferencesPageTest.class);
-// suite.addTestSuite(SeamViewHyperlinkPartitionerTest.class);
-// suite.addTestSuite(SeamELContentAssistTest.class);
-// suite.addTestSuite(SeamELContentAssistJbide1676Test.class);
-// suite.addTestSuite(SeamELContentAssistJbide1645Test.class);
-// suite.addTestSuite(SeamSettingsPreferencesPageTest.class);
+ suite.addTestSuite(OpenSeamComponentDialogTest.class);
+ suite.addTest(SeamComponentsViewAllTests.suite());
+ suite.addTestSuite(SeamProjectNewWizardTest.class);
+ suite.addTestSuite(SeamFormNewWizardTest.class);
+ suite.addTestSuite(SeamPreferencesPageTest.class);
+ suite.addTestSuite(SeamViewHyperlinkPartitionerTest.class);
+ suite.addTestSuite(SeamELContentAssistTest.class);
+ suite.addTestSuite(SeamELContentAssistJbide1676Test.class);
+ suite.addTestSuite(SeamELContentAssistJbide1645Test.class);
+ suite.addTestSuite(SeamSettingsPreferencesPageTest.class);
suite.addTest(new ProjectImportTestSetup(new TestSuite(SeamSettingsPreferencesPageTest.class), "org.jboss.tools.seam.ui.test", "projects/TestSeamSettingsPreferencesPage", "TestSeamSettingsPreferencesPage"));
return suite;
}
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTest.java 2008-03-28 16:24:17 UTC (rev 7184)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTest.java 2008-03-28 17:15:28 UTC (rev 7185)
@@ -30,6 +30,8 @@
import org.jboss.tools.test.util.JUnitUtils;
import org.jboss.tools.test.util.xpl.EditorTestHelper;
+import sun.management.counter.Units;
+
public class SeamELContentAssistTest extends ContentAssistantTestCase {
TestProjectProvider provider = null;
boolean makeCopy = false;
@@ -60,6 +62,19 @@
}
/**
+ * Test for http://jira.jboss.com/jira/browse/JBIDE-1258
+ */
+ public void testMessages() {
+ try {
+ EditorTestHelper.joinBackgroundActivities();
+ } catch (Exception e) {
+ JUnitUtils.fail(e.getMessage(), e);;
+ }
+ assertTrue("Test project \"" + PROJECT_NAME + "\" is not loaded", (project != null));
+ checkProposals("/WebContent/messages.xhtml", 494, new String[]{"messages.Text1", "messages.Text2"}, true);
+ }
+
+ /**
* Test for http://jira.jboss.com/jira/browse/JBIDE-1803
*/
public void testVarAttributes() {
16 years, 9 months
JBoss Tools SVN: r7184 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-03-28 12:24:17 -0400 (Fri, 28 Mar 2008)
New Revision: 7184
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java
Log:
JBIDE-1828
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java 2008-03-28 14:33:33 UTC (rev 7183)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java 2008-03-28 16:24:17 UTC (rev 7184)
@@ -447,7 +447,7 @@
* @throws IOException
*/
public static List<String> getClassPath(IProject project) throws CoreException, IOException {
- if(!project.hasNature(JavaCore.NATURE_ID)) return null;
+ if(project == null || !project.isAccessible() || !project.hasNature(JavaCore.NATURE_ID)) return null;
ArrayList<String> l = new ArrayList<String>();
IJavaProject javaProject = JavaCore.create(project);
16 years, 9 months
JBoss Tools SVN: r7183 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2008-03-28 10:33:33 -0400 (Fri, 28 Mar 2008)
New Revision: 7183
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuItemTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1588, drop-down functionality added
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java 2008-03-28 14:08:41 UTC (rev 7182)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java 2008-03-28 14:33:33 UTC (rev 7183)
@@ -128,23 +128,23 @@
public static VpeCreationData encode(VpePageContext pageContext,
VpeCreationData creationData, Element sourceParentElement,
Element sourceElement, nsIDOMDocument visualDocument,
- nsIDOMElement parentVisualElement, boolean expanded,
- int activeChildId) {
+ nsIDOMElement parentVisualElement, List<String> activeIds,
+ String childId) {
+
+ /*
+ * Counts child groups in a parent group
+ */
+ int childGroupCount = 1;
boolean disabled = false;
Element parent = getRichPanelParent(sourceElement);
ComponentUtil.setCSSLink(pageContext, STYLE_PATH, NAME_COMPONENT);
-
- if (expanded == true) {
- activeChildId = -1;
- }
-
+ boolean expanded = activeIds.contains(childId);
nsIDOMElement div = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_DIV);
parentVisualElement.appendChild(div);
div.setAttribute(COMPONENT_ATTR_VPE_SUPPORT, NAME_COMPONENT);
- div.setAttribute(COMPONENT_ATTR_VPE_USER_TOGGLE_ID, String
- .valueOf(activeChildId));
+ div.setAttribute(COMPONENT_ATTR_VPE_USER_TOGGLE_ID, childId);
if ("true".equalsIgnoreCase(sourceParentElement
.getAttribute(PANEL_MENU_GROUP_ATTR_DISABLED))) {
@@ -158,7 +158,7 @@
}
buildTable(pageContext, sourceParentElement, parent, sourceElement,
- visualDocument, div, expanded, disabled, activeChildId);
+ visualDocument, div, expanded, disabled, childId);
List<Node> children = ComponentUtil.getChildren(sourceElement);
@@ -181,14 +181,15 @@
PANEL_MENU_GROUP_END_TAG)) {
RichFacesPanelMenuGroupTemplate.encode(pageContext,
creationData, sourceParentElement,
- (Element) child, visualDocument, div, true,
- -1);
+ (Element) child, visualDocument, div, activeIds,
+ childId + "-" + childGroupCount);
+ childGroupCount++;
} else {
RichFacesPanelMenuItemTemplate
.encode(pageContext, creationData,
sourceParentElement,
(Element) child, visualDocument,
- div, false);
+ div);
}
}
@@ -207,14 +208,13 @@
creationData.addChildrenInfo(childrenInfo);
}
}
-
return creationData;
}
private static final void buildTable(VpePageContext pageContext,
Element sourceParentElement, Element parent, Element sourceElement,
nsIDOMDocument visualDocument, nsIDOMElement div, boolean expanded,
- boolean disabled, int activeChildId) {
+ boolean disabled, String activeChildId) {
String disabledStyle = sourceElement
.getAttribute(PANEL_MENU_GROUP_ATTR_DISABLED_STYLE);
String disableClass = null;
@@ -290,7 +290,9 @@
setIcon(pageContext, parent, sourceParentElement, sourceElement, img1,
img2, expanded, disabled);
- if (parent.getNodeName().endsWith(PANEL_MENU_END_TAG)) {
+ if (parent.getNodeName().endsWith(PANEL_MENU_END_TAG)
+ || ((parent.getNodeName().endsWith(PANEL_MENU_GROUP_END_TAG))
+ && (sourceElement.getNodeName().endsWith(PANEL_MENU_GROUP_END_TAG)))) {
if (styleClass != null
&& sourceParentElement
.getAttribute(PANEL_MENU_ATTR_TOP_GROUP_CLASS) != null) {
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuItemTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuItemTemplate.java 2008-03-28 14:08:41 UTC (rev 7182)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuItemTemplate.java 2008-03-28 14:33:33 UTC (rev 7183)
@@ -99,7 +99,7 @@
public static VpeCreationData encode(VpePageContext pageContext,
VpeCreationData creationData, Element sourceParentElement,
Element sourceElement, nsIDOMDocument visualDocument,
- nsIDOMElement parentVisualElement, boolean active) {
+ nsIDOMElement parentVisualElement) {
ComponentUtil.setCSSLink(pageContext, STYLE_PATH, PANEL_MENU_ITEM);
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java 2008-03-28 14:08:41 UTC (rev 7182)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java 2008-03-28 14:33:33 UTC (rev 7183)
@@ -10,7 +10,9 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.richfaces.template;
+import java.util.ArrayList;
import java.util.HashMap;
+import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -44,7 +46,7 @@
private static final String PANEL_MENU_GROUP_END = ":panelMenuGroup";
private static final String PANEL_MENU_ITEM_END = ":panelMenuItem";
- private static Map toggleMap = new HashMap();
+ private List<String> activeIds = new ArrayList<String>();
// private static final String DISABLED_STYLE_FOR_TABLE = "color:#B1ADA7";
@@ -74,22 +76,18 @@
}
List<Node> children = ComponentUtil.getChildren(sourceElement);
- int activeId = getActiveId(sourceElement, children);
- int i = 0;
+ int i = 1;
for (Node child : children) {
-
- boolean expanded = (i == activeId);
-
if (child.getNodeName().endsWith(PANEL_MENU_GROUP_END)) {
RichFacesPanelMenuGroupTemplate.encode(pageContext,
vpeCreationData, sourceElement, (Element) child,
- visualDocument, div, expanded, i);
+ visualDocument, div, getActiveIds(), String.valueOf(i));
i++;
} else if (child.getNodeName().endsWith(PANEL_MENU_ITEM_END)) {
RichFacesPanelMenuItemTemplate.encode(pageContext,
vpeCreationData, sourceElement, (Element) child,
- visualDocument, div, expanded);
+ visualDocument, div);
} else {
nsIDOMElement childDiv = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_DIV);
@@ -104,25 +102,12 @@
}
/**
+ * Gets the active ids.
*
- * @param sourceElement
- * @param children
- * @return
+ * @return the active ids
*/
- private int getActiveId(Element sourceElement, List<Node> children) {
- int activeId = -1;
- try {
- activeId = Integer.valueOf((String) toggleMap.get(sourceElement));
- } catch (NumberFormatException nfe) {
- activeId = -1;
- }
-
- int count = getChildrenCount(children);
- if (count - 1 < activeId) {
- activeId = count - 1;
- }
-
- return activeId;
+ private List<String> getActiveIds() {
+ return activeIds;
}
/**
@@ -142,11 +127,24 @@
public void toggle(VpeVisualDomBuilder builder, Node sourceNode,
String toggleId) {
- toggleMap.put(sourceNode, toggleId);
+
+ if (activeIds.contains(toggleId)) {
+ activeIds.remove(toggleId);
+
+ for (Iterator<String> iterator = activeIds.iterator(); iterator.hasNext();) {
+ String id = iterator.next();
+ if (id.startsWith(toggleId)) {
+ iterator.remove();
+ }
+ }
+ } else{
+ activeIds.add(toggleId);
+ }
+
}
public void stopToggling(Node sourceNode) {
- toggleMap.remove(sourceNode);
+ activeIds.clear();
}
public boolean isRecreateAtAttrChange(VpePageContext pageContext,
16 years, 9 months
JBoss Tools SVN: r7182 - in trunk/jsf/docs/jsf_tools_ref_guide/en: modules and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-03-28 10:08:41 -0400 (Fri, 28 Mar 2008)
New Revision: 7182
Added:
trunk/jsf/docs/jsf_tools_ref_guide/en/modules/creation_and_registration.xml
Modified:
trunk/jsf/docs/jsf_tools_ref_guide/en/master.xml
trunk/jsf/docs/jsf_tools_ref_guide/en/modules/introduction.xml
trunk/jsf/docs/jsf_tools_ref_guide/en/modules/jsf_config_file.xml
trunk/jsf/docs/jsf_tools_ref_guide/en/modules/jsf_support.xml
trunk/jsf/docs/jsf_tools_ref_guide/en/modules/projects.xml
Log:
http://jira.jboss.com/jira/browse/JBDS-261 - the new chapter was organized
Modified: trunk/jsf/docs/jsf_tools_ref_guide/en/master.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_ref_guide/en/master.xml 2008-03-28 13:08:29 UTC (rev 7181)
+++ trunk/jsf/docs/jsf_tools_ref_guide/en/master.xml 2008-03-28 14:08:41 UTC (rev 7182)
@@ -8,8 +8,7 @@
<!ENTITY projects SYSTEM "modules/projects.xml">
<!ENTITY jsf_config_file SYSTEM "modules/jsf_config_file.xml">
<!ENTITY managed_beans SYSTEM "modules/managed_beans.xml">
-<!ENTITY cust_converters_validators SYSTEM "modules/cust_converters_validators.xml">
-<!ENTITY referenced_beans SYSTEM "modules/referenced_beans.xml">
+<!ENTITY creation_and_registration SYSTEM "modules/creation_and_registration.xml">
<!ENTITY jsf_project_verification SYSTEM "modules/jsf_project_verification.xml">
]>
<book>
@@ -31,7 +30,6 @@
&projects;
&jsf_config_file;
&managed_beans;
- &cust_converters_validators;
- &referenced_beans;
+ &creation_and_registration;
&jsf_project_verification;
</book>
\ No newline at end of file
Added: trunk/jsf/docs/jsf_tools_ref_guide/en/modules/creation_and_registration.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_ref_guide/en/modules/creation_and_registration.xml (rev 0)
+++ trunk/jsf/docs/jsf_tools_ref_guide/en/modules/creation_and_registration.xml 2008-03-28 14:08:41 UTC (rev 7182)
@@ -0,0 +1,362 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="creation_and_registration">
+ <?dbhtml filename="creation_and_registration.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>JSF Tools</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Creation and Registration</title>
+
+ <section id="CreateAndRegisterACustomConverter94230">
+
+ <title>Create and Register a Custom Converter</title>
+
+ <para>To create and register a custom converter it's necessary to
+ go through the following steps:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>In the Project Explorer view open <emphasis>
+ <property>faces-config.xml</property>
+ </emphasis> and select <emphasis>
+ <property>Tree</property>
+ </emphasis> tab.</para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>Converters</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/jsf_support/jsf_support_44.png"
+ />
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Select <emphasis>
+ <property>Converters</property>
+ </emphasis> and click on<emphasis>
+ <property> Add</property>
+ </emphasis> button.</para>
+ </listitem>
+ <listitem>
+ <para>On the form type the name of your converter in the <emphasis>
+ <property>Converter-id</property>
+ </emphasis> field and name of the class for
+ converters. After clicking <emphasis>
+ <property>Finish</property>
+ </emphasis> button your custom converter is
+ registered under the entered name.</para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>Add Converter Form</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/jsf_support/jsf_support_45.png"
+ />
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Now you can create <emphasis role="italic">
+ <property>"converter"</property>
+ </emphasis> class. In the Converter section you
+ should see your <emphasis>
+ <property>Converter-id</property>
+ </emphasis> and
+ <emphasis><property>Converter-class</property>.</emphasis>
+ Click on <emphasis>
+ <property>Converter-class</property>
+ </emphasis> to generate the source code.</para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>Generation of Source Code for Converter Class</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/jsf_support/jsf_support_46.png"
+ />
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>A usual wizard for creating a Java class will appear.
+ All needed fields here will be adjusted
+ automatically. Just leave everything without changes
+ and click <emphasis>
+ <property>Finish</property>.
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>New Java Class Form</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/jsf_support/jsf_support_47.png"
+ />
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>To open a converter class click again on <emphasis>
+ <property>Converter-class</property>
+ </emphasis> link in the Converter section. Now you
+ are able to add a business logic of converter in the
+ Java editor.</para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>Converter Class</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/jsf_support/jsf_support_48.png"
+ />
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section id="CreateAndRegisterACustomValidator5632">
+
+ <title>Create and Register a Custom Validator</title>
+
+ <para>With the help of JBDS it's also quite easy to develop your
+ own custom Validators. You should perform the actions similar to
+ previous. Go through the following steps:</para>
+ <itemizedlist>
+ <listitem>
+ <para>In the Project Explorer view open<emphasis>
+ <property> faces-config.xml</property>
+ </emphasis> and select <emphasis>
+ <property>Tree </property>
+ </emphasis>tab.</para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>Validator in Faces Config Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/jsf_support/jsf_support_49.png"
+ />
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Select <emphasis>
+ <property>Validators</property>
+ </emphasis> and click on <emphasis>
+ <property>Add </property>
+ </emphasis>button.</para>
+ </listitem>
+ <listitem>
+ <para>Type the name of your validator in the <emphasis>
+ <property>Validator-id</property>
+ </emphasis> field and name of the class for
+ validators. After clicking <emphasis>
+ <property>Finish</property>
+ </emphasis> button your custom validator is
+ registered under the entered name.</para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>Adding Validator</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/jsf_support/jsf_support_50.png"
+ />
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Now you can create the "validator" class. </para>
+ <itemizedlist>
+ <listitem>
+ <para>In the Validator section you can see your <emphasis>
+ <property>Validator-id</property>
+ </emphasis> and <emphasis>
+ <property>Validator-class</property>
+ </emphasis>. To generate the source code click on <emphasis>
+ <property>Validator-class</property>.
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>Creating Validator Class</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/jsf_support/jsf_support_51.png"
+ />
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Java class will be created automatically. Leave
+ everything without changes and click <emphasis>
+ <property>Finish</property>.
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>New Java Class Form</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/jsf_support/jsf_support_52.png"
+ />
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>To open validator class click again on <emphasis>
+ <property>Validator-Class</property>
+ </emphasis> link in the Validator section. Now you
+ are able to write a business logic of validator in
+ the Java editor.</para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>Converter Class Editing</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/jsf_support/jsf_support_53.png"
+ />
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section>
+ <title>Create and Register Referenced Beans</title>
+
+ <para>Creation of Referenced Beans is similar to creation of Custom
+ Validator.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>In the Project Explorer view open<emphasis>
+ <property> faces-config.xml</property>
+ </emphasis> and select <emphasis>
+ <property>Tree </property>
+ </emphasis>tab.</para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>Referenced Beans in Faces Config Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/jsf_support/jsf_support_54.png"
+ />
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Select <emphasis>
+ <property>Referenced Beans</property>
+ </emphasis> and click on <emphasis>
+ <property>Add</property>
+ </emphasis> button.</para>
+ </listitem>
+ <listitem>
+ <para>Type in the name of your Referenced Bean and type in
+ or select <emphasis>
+ <property>Referenced-Bean-Class</property>
+ </emphasis> by using <emphasis>
+ <property>Browse</property>
+ </emphasis> button.</para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>Add Referenced Bean</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/jsf_support/jsf_support_55.png"
+ />
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>In the Referenced Bean section you should see your <emphasis>
+ <property>Referenced-Bean-Name</property>
+ </emphasis> and
+ <emphasis><property>Referenced-Bean-Class</property>.</emphasis>
+ Click on the link to open the Java creation
+ wizard.</para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>Create Referenced Bean Class</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/jsf_support/jsf_support_56.png"
+ />
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Java class will be created automatically. Leave
+ everything without changes and click <emphasis>
+ <property>Finish</property>.
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>New Java Class Form</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/jsf_support/jsf_support_57.png"
+ />
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>To open Referenced Bean class click again on <emphasis>
+ <property>Referenced-Bean-Class</property>
+ </emphasis> in the Referenced Bean section. Now you
+ are able to write business logic of Referenced Bean
+ in the Java editor.</para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>Referenced Bean Class Editing</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/jsf_support/jsf_support_58.png"
+ />
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+</chapter>
\ No newline at end of file
Modified: trunk/jsf/docs/jsf_tools_ref_guide/en/modules/introduction.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_ref_guide/en/modules/introduction.xml 2008-03-28 13:08:29 UTC (rev 7181)
+++ trunk/jsf/docs/jsf_tools_ref_guide/en/modules/introduction.xml 2008-03-28 14:08:41 UTC (rev 7182)
@@ -14,7 +14,13 @@
<title>Introduction</title>
- <para>This guide provides information on JSF tooling in JBoss Developer Studio
+ <para>JBoss Developer Studio is especially designed for supporting JSF and JSF-related
+ technologies. JBDS provides extensible and exemplary tools for building JSF-based
+ applications as well as adding JSF capabilities to existing web projects, importing
+ JSF projects (created outside JBDS) and choosing any JSF implementation while
+ developing JSF application.</para>
+
+ <para>In this guide we provide you with the information on JSF tooling in JBoss Developer Studio
which allows you to develop JSF applications much faster and with far fewer
errors so sparing your time.</para>
</chapter>
Modified: trunk/jsf/docs/jsf_tools_ref_guide/en/modules/jsf_config_file.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_ref_guide/en/modules/jsf_config_file.xml 2008-03-28 13:08:29 UTC (rev 7181)
+++ trunk/jsf/docs/jsf_tools_ref_guide/en/modules/jsf_config_file.xml 2008-03-28 14:08:41 UTC (rev 7182)
@@ -10,279 +10,236 @@
<keyword>JBoss</keyword>
</keywordset>
</chapterinfo>
-
+
<title>JSF Configuration File</title>
-
- <para>First, we should mention that JSF configuration file (<emphasis>
+
+ <para>First, we should mention that JSF configuration file (<emphasis>
<property>faces-config.xml</property>
- </emphasis>) is intended for registering JSF application resources
- such as Converters, Validators, Managed Beans and page-to-page
- navigation rules.</para>
- <para>Now, let's look at how you can easily configure this file by
- means of a special graphical editor. The editor has three main
- viewers (modes):</para>
-
+ </emphasis>) is intended for registering JSF application resources such as Converters,
+ Validators, Managed Beans and page-to-page navigation rules.</para>
+ <para>Now, let's look at how you can easily configure this file by means of a special
+ graphical editor for JSF configuration file. The editor has three main views:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Diagram</para>
+ </listitem>
+ <listitem>
+ <para>Tree</para>
+ </listitem>
+ <listitem>
+ <para>Source</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>They can be selected via the tabs at the bottom of the editor.</para>
+
+ <para>The JSF configuration editor also comes with a very useful <link
+ linkend="OpenOnSelection4Hyperlinknavigation">OpenOn</link> selection feature.</para>
+
+ <section id="Diagram9553">
+
+ <title>Diagram view</title>
+
+ <para>Here, we will show you how to work with JSF configuration file through the Diagram
+ view of the editor.</para>
+ <para>As you can see on the figure below, the Diagram view displays the navigation rules in
+ the faces-config.xml:</para>
+ <figure>
+ <title>Diagram View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_21.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>To create a new page here, you should click the page icon (View Template) on the
+ toolbar from the left and then click anywhere on the diagram. A New Page Wizard will
+ appear.</para>
+
+ <para>To create a transition for connecting pages:</para>
+
<itemizedlist>
<listitem>
- <para>Diagram</para>
+ <para>Select the transition icon from the toolbar (New Connection).</para>
</listitem>
<listitem>
- <para>Tree</para>
+ <para>Click the source page.</para>
</listitem>
<listitem>
- <para>Source</para>
+ <para>Click the target page.</para>
</listitem>
</itemizedlist>
-
- <para>The modes can be selected via the tabs at the bottom of the editor.</para>
-
- <para>The JSF configuration editor also comes with a very useful <link
- linkend="OpenOnSelection4Hyperlinknavigation">OpenOn</link>
- selection feature.</para>
-
- <section id="Diagram9553">
-
- <title>Diagram</title>
- <para>The Diagram view displays the navigation rules in the JSF
- configuration file:</para>
- <figure>
- <title>Diagram View</title>
- <mediaobject>
- <imageobject>
- <imagedata
- fileref="images/jsf_support/jsf_support_21.png"
- />
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- <section id="CreatingNewViewPage85">
-
- <title>Creating New View (Page)</title>
-
- <para>To create a new page (view), you can click the page icon on
- this toolbar and then click anywhere on the diagram. A New
- Page Wizard will appear.</para>
-
- <para>To create a transition (rule) connecting pages:</para>
-
-
- <itemizedlist>
- <listitem>
- <para>Select the transition icon from the toolbar
- (2nd from the bottom).</para>
- </listitem>
- <listitem>
- <para>Click the source page.</para>
- </listitem>
- <listitem>
- <para>Click the target page.</para>
- </listitem>
- </itemizedlist>
-
- <para>A transition will appear between the two pages:</para>
- <figure>
- <title>Transition Between JSP Pages</title>
- <mediaobject>
- <imageobject>
- <imagedata
- fileref="images/jsf_support/jsf_support_22.png"
- />
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>It is also possible to create a new page with context menu by
- right-clicking anywhere on the diagram and selecting <emphasis>
- <property>New View</property>. </emphasis></para>
- <figure>
- <title>Creating a New View</title>
- <mediaobject>
- <imageobject>
- <imagedata
- fileref="images/jsf_support/jsf_support_23.png"
- />
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>To edit an existing transition, first select the transition
- line. Then, place the mouse cursor over the last black dot
- (on the target page). The mouse cursor will change to a big
- +. At this point, drag the line to a new target page:</para>
- <figure>
- <title>Editing Transition Between Views</title>
- <mediaobject>
- <imageobject>
- <imagedata
- fileref="images/jsf_support/jsf_support_24.png"
- />
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- <section id="TreeView11123">
-
+
+ <para>A transition will appear between the two pages:</para>
+ <figure>
+ <title>Transition Between JSP Pages</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_22.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>It is also possible to create a new page with context menu by right-clicking anywhere
+ on the diagram and selecting <emphasis>
+ <property>New View</property>. </emphasis></para>
+ <figure>
+ <title>Creating a New View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_23.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>To edit an existing transition, first select the transition line. Then, place the
+ mouse cursor over the last black dot (on the target page). The mouse cursor will change
+ to a big +. At this point, drag the line to a new target page:</para>
+ <figure>
+ <title>Editing Transition Between Views</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_24.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="TreeView11123">
+
+ <title>Tree View</title>
+
+ <para>The Tree mode for the editor displays all JSF application artifacts referenced in the
+ configuration file in a tree format. By selecting any node you can see and edit its
+ properties which will appear in the right-hand area. For example, a Managed Bean:</para>
+ <figure>
<title>Tree View</title>
-
- <para>The Tree mode for the editor displays all JSF application
- artifacts referenced in the configuration file in a tree
- format. By selecting any node you can see and edit its
- properties which will appear in the right-hand area. For
- example, a Managed Bean:</para>
- <figure>
- <title>Tree View</title>
- <mediaobject>
- <imageobject>
- <imagedata
- fileref="images/jsf_support/jsf_support_25.png"
- />
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>To edit some artifact, right-click any node and select one of
- the available actions in the context menu. You can also edit
- in the properties window to the right:</para>
- <figure>
- <title>Editing in Tree View</title>
- <mediaobject>
- <imageobject>
- <imagedata
- fileref="images/jsf_support/jsf_support_26.png"
- />
- </imageobject>
- </mediaobject>
- </figure>
- <para>The same way you can create a new artifact:</para>
- <figure>
- <title>Creating a New Artifact in Tree View</title>
- <mediaobject>
- <imageobject>
- <imagedata
- fileref="images/jsf_support/jsf_support_59.png"
- />
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- <section id="SourceView4643">
-
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_25.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>To edit some artifact, right-click any node and select one of the available actions in
+ the context menu. You can also edit in the properties window to the right:</para>
+ <figure>
+ <title>Editing in Tree View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_26.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>The same way you can create a new artifact:</para>
+ <figure>
+ <title>Creating a New Artifact in Tree View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_59.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="SourceView4643">
+
+ <title>Source View</title>
+
+ <para>The Source mode for the editor displays a text view of the JSF configuration file. All
+ three viewers are always synchronized, so any changes made in one of the viewers will
+ immediately appear in the others:</para>
+ <figure>
<title>Source View</title>
-
- <para>The Source mode for the editor displays a text view of the JSF
- configuration file. All three viewers are always
- synchronized, so any changes made in one of the viewers will
- immediately appear in the others:</para>
- <figure>
- <title>Source View</title>
- <mediaobject>
- <imageobject>
- <imagedata
- fileref="images/jsf_support/jsf_support_27.png"
- scale="75"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_27.png" scale="75"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
<section id="ContentAssist976">
-
+
<title>Code Assist</title>
- <para>Code Assist provides pop-up tip to help you complete your code
- statements. It allows you to write your code faster and with
- more accuracy.</para>
+ <para>Code Assist provides pop-up tip to help you complete your code statements. It
+ allows you to write your code faster and with more accuracy.</para>
<para>Code assist is always available in the Source mode:</para>
<figure>
<title>Code Assist in Source View</title>
<mediaobject>
<imageobject>
- <imagedata
- fileref="images/jsf_support/jsf_support_28.png"
- scale="75"/>
+ <imagedata fileref="images/jsf_support/jsf_support_28.png" scale="75"/>
</imageobject>
</mediaobject>
</figure>
</section>
<section id="ErrorReporting3324">
-
+
<title>Error Reporting</title>
- <para>When you are developing your project, JBoss Developer Studio
- constantly provides error checking. This greatly reduces
- your development time as it allows you to catch many of the
- errors during development.</para>
- <para>Errors will be reported by JBoss Developer Studio's
- <link linkend="verif_valid"> verification</link>
- facility:</para>
+ <para>When you are developing your project, JBoss Developer Studio constantly provides
+ error checking. This greatly reduces your development time as it allows you to catch
+ many of the errors during development.</para>
+ <para>Errors will be reported by JBoss Developer Studio's <link
+ linkend="verif_valid"> verification</link> facility:</para>
<figure>
<title>Error Reporting in Source View</title>
<mediaobject>
<imageobject>
- <imagedata
- fileref="images/jsf_support/jsf_support_29.png"
- scale="75"/>
+ <imagedata fileref="images/jsf_support/jsf_support_29.png" scale="75"/>
</imageobject>
</mediaobject>
</figure>
-
+
<para>Other errors are also reported.</para>
<figure>
<title>Other Errors Reporting</title>
<mediaobject>
<imageobject>
- <imagedata
- fileref="images/jsf_support/jsf_support_30.png"
- scale="75"/>
+ <imagedata fileref="images/jsf_support/jsf_support_30.png" scale="75"/>
</imageobject>
</mediaobject>
</figure>
-
+
<para>You can also work in the Source editor with the help of the <emphasis>
- <property>Outline view</property>.</emphasis> The
- Outline views show a tree structure of the JSF configuration
- file. Simply select any element in the Outline view, and it
- will jump to the same place in the Source editor, so you can
- navigate through the source code with Outline view.</para>
+ <property>Outline view</property>.</emphasis> The Outline views show a tree
+ structure of the JSF configuration file. Simply select any element in the Outline
+ view, and it will jump to the same place in the Source editor, so you can navigate
+ through the source code with Outline view.</para>
<figure>
<title>Outline View</title>
<mediaobject>
<imageobject>
- <imagedata
- fileref="images/jsf_support/jsf_support_31.png"
- scale="60"/>
+ <imagedata fileref="images/jsf_support/jsf_support_31.png" scale="60"/>
</imageobject>
</mediaobject>
</figure>
-
- <para>If your diagram is large, within Outline view you can switch
- to a <emphasis>
+
+ <para>If your diagram is large, within Outline view you can switch to a <emphasis>
<property>Diagram Navigator</property>
- </emphasis> mode by selecting the middle icon at the top of
- the view window. It allows you to easily move around the
- diagram. Just move the blue area in any direction, and the
- diagram on the left will also move:</para>
+ </emphasis> mode by selecting the middle icon at the top of the view window. It
+ allows you to easily move around the diagram. Just move the blue area in any
+ direction, and the diagram on the left will also move:</para>
<figure>
<title>Outline View for Diagram</title>
<mediaobject>
<imageobject>
- <imagedata
- fileref="images/jsf_support/jsf_support_32.png"
- scale="60"/>
+ <imagedata fileref="images/jsf_support/jsf_support_32.png" scale="60"/>
</imageobject>
</mediaobject>
</figure>
-
- <para>You can also edit the properties of the selected element in
- the <property>Tree</property> mode with the help of the
- Properties view as shown below:</para>
+
+ <para>You can also edit the properties of the selected element in the
+ <property>Tree</property> mode with the help of the Properties view as shown below:</para>
<figure>
<title>Properties View </title>
<mediaobject>
<imageobject>
- <imagedata
- fileref="images/jsf_support/jsf_support_33.png"
- scale="75"/>
+ <imagedata fileref="images/jsf_support/jsf_support_33.png" scale="75"/>
</imageobject>
</mediaobject>
</figure>
</section>
+ </section>
+
+
</chapter>
Modified: trunk/jsf/docs/jsf_tools_ref_guide/en/modules/jsf_support.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_ref_guide/en/modules/jsf_support.xml 2008-03-28 13:08:29 UTC (rev 7181)
+++ trunk/jsf/docs/jsf_tools_ref_guide/en/modules/jsf_support.xml 2008-03-28 14:08:41 UTC (rev 7182)
@@ -13,23 +13,16 @@
<title>JavaServer Faces Support</title>
- <para>JBoss Developer Studio is especially designed for supporting JSF and JSF-related
- technologies. JBDS provides extensible and exemplary tools for building JSF-based
- applications as well as adding JSF capabilities to existing web projects, importing
- JSF projects (created outside JBDS) and choosing any JSF implementation while
- developing JSF application.</para>
-
<para>With Developer Studio, we don't lock you into any one <property>JavaServer
- Faces</property> implementation. You can select the one which is necessary
- for you while <link linkend="new_jsf_project">creating a new JSF project</link> or
- <link linkend="add_jsf_capability">adding JSF capability</link> to any
- existing Eclipse project.</para>
+ Faces</property> implementation. You can always select the one which is
+ necessary for you while <link linkend="new_jsf_project">creating a new JSF
+ project</link> or <link linkend="add_jsf_capability">adding JSF capability</link> to
+ any existing Eclipse project.</para>
+ <para>At this point the spacial wizard will prompt you to specify a proper JSF environment.
+ It may be JSF 1.1.02 RI or JSF 1.2 which is integrates a number of new features and
+ changes. The wizard also lets you select JSF implementation with a component
+ orientation such as JSF 1.2 with Facelets or MyFaces 1.1.4.</para>
- <para>The spacial wizard will prompt you to specify a proper JSF environment. It may be
- JSF 1.1.02 RI or JSF 1.2 which is integrates a number of new features and
- changes. The wizard also lets you select JSF implementations with a component orientation such as JSF 1.2 with
- Facelets or MyFaces 1.1.4.</para>
-
<figure>
<title>Choosing JSF Environment</title>
<mediaobject>
@@ -39,8 +32,8 @@
</mediaobject>
</figure>
- <para>After specifying a proper JSF environment all the required libraries for the selected version will be added to
- your project.</para>
+ <para>After specifying a proper JSF environment all the required libraries for the selected
+ version will be added to your project.</para>
<!--
<section id="AddingSupportForTheOracleADFComponentsLibraryOrAnyOtherSupport64">
@@ -73,21 +66,22 @@
<section id="FaceletsSupport865">
<title>Facelets Support</title>
- <para>This section will perform you all concepts that JBDS involves to use the
- Facelets.</para>
+ <para>In this section we will focus more on all concepts that JBDS integrates for
+ working with Facelets.</para>
<para>The Facelets extends JavaServer Faces by providing a lightweight framework
that radically simplifies the design of presentation pages for JSF. JBoss
- Developer Studio provides support for Facelets in a variety of ways:</para>
+ Developer Studio provides support for Facelets in a variety of ways that we
+ will consider further in this section.</para>
+
<section>
<title>Facelets templates</title>
-
- <para>The New JSF Project wizard contains templates for creating Facelets
- projects based on version 1.2 of the JSF Reference Implementation.
- Select the <emphasis>
+ <para>If you want to build an application using Facelets, just create a
+ project with Facelets based on version 1.2 of the JSF Reference
+ Implementation, i. e. select the <emphasis>
<property>JSF 1.2 with Facelets</property>
- </emphasis> in JSF Environment section.</para>
-
+ </emphasis> in the JSF Environment section of the New JSF Project wizard.</para>
+
<figure>
<title>Choosing Facelets Environment</title>
<mediaobject>
@@ -98,10 +92,9 @@
</imageobject>
</mediaobject>
</figure>
-
- <para>Once you select the environment, you can specify the one of three
- available templates:</para>
-
+
+ <para>Once you've selected the
+ environment, it's possible to specify the one of three available templates:</para>
<figure>
<title>Choosing Facelets Template</title>
<mediaobject>
@@ -112,8 +105,7 @@
</imageobject>
</mediaobject>
</figure>
-
- <para>The following table lists possible Facelets templates for any JSF
+ <para>The following table lists possible templates with Facelets for any JSF
project and gives a proper description for each one.</para>
<table>
<title>Facelets Templates</title>
@@ -168,7 +160,7 @@
</entry>
<entry>
- <para>a sample application with
+ <para>A sample application with
Facelets that is ready to
run</para>
</entry>
@@ -184,7 +176,7 @@
</entry>
<entry>
- <para>a sample application without
+ <para>A sample application without
libraries</para>
</entry>
</row>
@@ -192,11 +184,11 @@
</tbody>
</tgroup>
</table>
-
</section>
<section>
<title>Facelets components</title>
+ <para>ss</para>
<para>The <link linkend="palette">JBoss Tools Palette</link> comes with the
Facelets components ready to use. A useful tip appears when you
hover the mouse cursor over the tag, the tip includes a detailed
@@ -222,7 +214,7 @@
</figure>
</section>
<section>
- <title>Code assist</title>
+ <title>Code assist for Facelets</title>
<para>Code assist (Ctrl + Space) for <property>Facelets tags</property> is
available when editing <emphasis>
Modified: trunk/jsf/docs/jsf_tools_ref_guide/en/modules/projects.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_ref_guide/en/modules/projects.xml 2008-03-28 13:08:29 UTC (rev 7181)
+++ trunk/jsf/docs/jsf_tools_ref_guide/en/modules/projects.xml 2008-03-28 14:08:41 UTC (rev 7182)
@@ -368,7 +368,7 @@
<para>Once the file have been created, it should be open in a
special <link
- linkend="GraphicalEditorAndViewingForJSFConfigurationFiles76331"
+ linkend="jsf_config_file"
>Faces Config Editor</link>.</para>
</section>
<section id="AddingYourOwnProjectTemplates853">
16 years, 9 months
JBoss Tools SVN: r7181 - in trunk/hibernatetools/plugins/org.hibernate.eclipse.console: src/org/hibernate/eclipse/console and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2008-03-28 09:08:29 -0400 (Fri, 28 Mar 2008)
New Revision: 7181
Added:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/plugin.properties
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/GenerateEntitiesAction.java
Removed:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/GenerateSeamEntities.java
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/plugin.xml
Log:
http://jira.jboss.com/jira/browse/JBIDE-1178
Added: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/plugin.properties
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/plugin.properties (rev 0)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/plugin.properties 2008-03-28 13:08:29 UTC (rev 7181)
@@ -0,0 +1 @@
+GenerateEntities=Generate Entities
\ No newline at end of file
Property changes on: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/plugin.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/plugin.xml
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/plugin.xml 2008-03-28 13:03:00 UTC (rev 7180)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/plugin.xml 2008-03-28 13:08:29 UTC (rev 7181)
@@ -669,9 +669,9 @@
id="org.hibernate.eclipse.console.objectContribution2"
objectClass="org.hibernate.mapping.Table">
<action
- class="org.hibernate.eclipse.console.GenerateSeamEntities"
+ class="org.hibernate.eclipse.console.GenerateEntitiesAction"
id="org.hibernate.eclipse.console.action1"
- label="Generate Seam Entities">
+ label="%GenerateEntities">
</action>
</objectContribution>
<!--objectContribution
Copied: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/GenerateEntitiesAction.java (from rev 7180, trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/GenerateSeamEntities.java)
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/GenerateEntitiesAction.java (rev 0)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/GenerateEntitiesAction.java 2008-03-28 13:08:29 UTC (rev 7181)
@@ -0,0 +1,271 @@
+package org.hibernate.eclipse.console;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.TreePath;
+import org.eclipse.jface.viewers.TreeSelection;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbenchPart;
+import org.hibernate.cfg.Configuration;
+import org.hibernate.cfg.JDBCMetaDataConfiguration;
+import org.hibernate.cfg.reveng.DefaultReverseEngineeringStrategy;
+import org.hibernate.cfg.reveng.OverrideRepository;
+import org.hibernate.cfg.reveng.ReverseEngineeringSettings;
+import org.hibernate.cfg.reveng.ReverseEngineeringStrategy;
+import org.hibernate.cfg.reveng.TableFilter;
+import org.hibernate.console.ConsoleConfiguration;
+import org.hibernate.console.HibernateConsoleRuntimeException;
+import org.hibernate.console.execution.ExecutionContext.Command;
+import org.hibernate.eclipse.console.model.impl.ExporterDefinition;
+import org.hibernate.eclipse.console.model.impl.ExporterFactory;
+import org.hibernate.eclipse.console.utils.DialogSelectionHelper;
+import org.hibernate.eclipse.launch.PathHelper;
+import org.hibernate.mapping.Table;
+import org.hibernate.tool.hbm2x.ArtifactCollector;
+import org.hibernate.tool.hbm2x.Exporter;
+
+public class GenerateEntitiesAction implements IObjectActionDelegate {
+
+ private TreeSelection selection;
+
+ private String outputPath;
+
+ private Map<ConsoleConfiguration, List<Table>> tableGroups;
+
+ public void run(IAction action) {
+
+ IPath[] paths = DialogSelectionHelper.chooseFolderEntries(null, null,
+ Messages.GenerateSeamEntities_dialog_title,
+ Messages.GenerateSeamEntities_dialog_message,
+ false);
+
+ if (paths.length == 0) return;
+
+ outputPath = paths[0].toOSString();
+
+ splitOnGroupsByConsoleCfg();
+
+ ExporterFactory[] exporters = getExporterFactories();
+
+ Set<ConsoleConfiguration> ccs = tableGroups.keySet();
+
+ for (Iterator<ConsoleConfiguration> iterator = ccs.iterator(); iterator
+ .hasNext();) {
+ ConsoleConfiguration consoleConfiguration = iterator.next();
+ runExporters(exporters, consoleConfiguration);
+ }
+
+ refreshOutputDir(getOutputPath());
+ }
+
+ private ArtifactCollector runExporters(
+ final ExporterFactory[] exporterFactories, ConsoleConfiguration cc) {
+ final IProgressMonitor monitor = new NullProgressMonitor();
+
+ monitor.beginTask("Generating code for " + cc.getName(), exporterFactories.length + 1); //$NON-NLS-1$
+
+ final Configuration cfg = buildConfiguration(cc, tableGroups.get(cc));
+
+ monitor.worked(1);
+
+ if (monitor.isCanceled())
+ return null;
+
+ return (ArtifactCollector) cc.execute(new Command() {
+
+ public Object execute() {
+ ArtifactCollector artifactCollector = new ArtifactCollector();
+
+ // Global properties
+ Properties props = new Properties();
+ props.put("ejb3", "true"); //$NON-NLS-1$ //$NON-NLS-2$
+ props.put("jdk5", "true"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ for (int i = 0; i < exporterFactories.length; i++) {
+ monitor.subTask(exporterFactories[i]
+ .getExporterDefinition().getDescription());
+
+ Properties globalProperties = new Properties();
+ globalProperties.putAll(props);
+
+ Set outputDirectories = new HashSet();
+ Exporter exporter;
+ try {
+ exporter = exporterFactories[i]
+ .createConfiguredExporter(cfg, getOutputPath(),
+ null, globalProperties,
+ outputDirectories, artifactCollector);
+ } catch (CoreException e) {
+ throw new HibernateConsoleRuntimeException(
+ "Error while setting up " //$NON-NLS-1$
+ + exporterFactories[i]
+ .getExporterDefinition(), e);
+ }
+
+ exporter.start();
+ monitor.worked(1);
+ }
+ return artifactCollector;
+ }
+
+ });
+
+ }
+
+ private ExporterFactory[] getExporterFactories() {
+ List<String> exporterNames = new ArrayList<String>();
+ exporterNames.add("org.hibernate.tools.hbm2java"); //$NON-NLS-1$
+ //exporterNames.add("org.hibernate.tools.hbm2dao"); //$NON-NLS-1$
+
+ Map exDefinitions = ExtensionManager.findExporterDefinitionsAsMap();
+ List<ExporterFactory> factories = new ArrayList<ExporterFactory>();
+
+ for (Iterator<String> iterator = exporterNames.iterator(); iterator
+ .hasNext();) {
+ String exporterId = iterator.next();
+
+ ExporterDefinition expDef = (ExporterDefinition) exDefinitions
+ .get(exporterId);
+ if (expDef == null) {
+ throw new HibernateConsoleRuntimeException(
+ "Could not locate exporter for '" + exporterId + "'"); //$NON-NLS-1$ //$NON-NLS-2$
+ } else {
+ ExporterFactory exporterFactory = new ExporterFactory(expDef,
+ exporterId);
+ factories.add(exporterFactory);
+ }
+ }
+ return factories.toArray(new ExporterFactory[factories.size()]);
+ }
+
+ private Configuration buildConfiguration(ConsoleConfiguration cc,
+ final List<Table> tables) {
+ Configuration configuration = null;
+ if (cc.hasConfiguration()) {
+ configuration = cc.getConfiguration();
+ } else {
+ configuration = cc.buildWith(null, false);
+ }
+
+ final JDBCMetaDataConfiguration cfg = new JDBCMetaDataConfiguration();
+ Properties properties = configuration.getProperties();
+ cfg.setProperties(properties);
+ cc.buildWith(cfg, false);
+
+ cfg.setPreferBasicCompositeIds(true);
+
+ cc.execute(new Command() {
+ /* need to execute in the console configuration to let it handle classpath stuff!*/
+ public Object execute() {
+
+ OverrideRepository repository = new OverrideRepository();
+
+ TableFilter filter = null;
+ for (int i = 0; i < tables.size(); i++) {
+ Table table = tables.get(i);
+
+ filter = new TableFilter();
+ filter.setExclude(false);
+ if (table.getCatalog() != null) {
+ filter.setMatchCatalog(table.getCatalog());
+ }
+ if (table.getSchema() != null) {
+ filter.setMatchSchema(table.getSchema());
+ }
+ filter.setMatchName(tables.get(i).getName());
+
+ repository.addTableFilter(filter);
+ }
+
+ ReverseEngineeringStrategy res = repository
+ .getReverseEngineeringStrategy(new DefaultReverseEngineeringStrategy());
+
+ ReverseEngineeringSettings qqsettings = new ReverseEngineeringSettings(res)
+ .setDetectManyToMany(true)
+ .setDetectOptimisticLock(true);
+
+ res.setSettings(qqsettings);
+
+ cfg.setReverseEngineeringStrategy(res);
+
+ cfg.readFromJDBC();
+ cfg.buildMappings();
+ return null;
+ }
+ });
+
+ return cfg;
+ }
+
+ private String getOutputPath() {
+ return outputPath;
+ }
+
+ private void splitOnGroupsByConsoleCfg() {
+ TreePath[] paths = selection.getPaths();
+
+ tableGroups = new HashMap<ConsoleConfiguration, List<Table>>();
+
+ for (int i = 0; i < paths.length; i++) {
+ if (paths[i].getLastSegment() instanceof Table) {
+ ConsoleConfiguration cc = getConsoleConfiguration(paths[i]);
+ if (cc == null) continue;
+
+ if (tableGroups.containsKey(cc)) {
+ List<Table> tables = tableGroups.get(cc);
+ tables.add((Table) paths[i].getLastSegment());
+ } else {
+ List<Table> tables = new ArrayList<Table>();
+ tables.add((Table) paths[i].getLastSegment());
+ tableGroups.put(cc, tables);
+ }
+ }
+ }
+ }
+
+ private ConsoleConfiguration getConsoleConfiguration(TreePath path) {
+ for (int i = 0; i < path.getSegmentCount(); i++) {
+ if (path.getSegment(i) instanceof ConsoleConfiguration)
+ return (ConsoleConfiguration) path.getSegment(i);
+ }
+ return null;
+ }
+
+ public void setActivePart(IAction action, IWorkbenchPart targetPart) {
+ }
+
+ public void selectionChanged(IAction action, ISelection selection) {
+ if (selection instanceof TreeSelection) {
+ this.selection = (TreeSelection) selection;
+ }
+ }
+
+ private void refreshOutputDir(String outputdir) {
+ IResource bufferRes = PathHelper.findMember(ResourcesPlugin
+ .getWorkspace().getRoot(), outputdir);
+
+ if (bufferRes != null && bufferRes.isAccessible()) {
+ try {
+ bufferRes.refreshLocal(IResource.DEPTH_INFINITE, null);
+ } catch (CoreException e) {
+ // ignore, maybe merge into possible existing status.
+ }
+ }
+ }
+
+}
Deleted: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/GenerateSeamEntities.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/GenerateSeamEntities.java 2008-03-28 13:03:00 UTC (rev 7180)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/GenerateSeamEntities.java 2008-03-28 13:08:29 UTC (rev 7181)
@@ -1,271 +0,0 @@
-package org.hibernate.eclipse.console;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.TreePath;
-import org.eclipse.jface.viewers.TreeSelection;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbenchPart;
-import org.hibernate.cfg.Configuration;
-import org.hibernate.cfg.JDBCMetaDataConfiguration;
-import org.hibernate.cfg.reveng.DefaultReverseEngineeringStrategy;
-import org.hibernate.cfg.reveng.OverrideRepository;
-import org.hibernate.cfg.reveng.ReverseEngineeringSettings;
-import org.hibernate.cfg.reveng.ReverseEngineeringStrategy;
-import org.hibernate.cfg.reveng.TableFilter;
-import org.hibernate.console.ConsoleConfiguration;
-import org.hibernate.console.HibernateConsoleRuntimeException;
-import org.hibernate.console.execution.ExecutionContext.Command;
-import org.hibernate.eclipse.console.model.impl.ExporterDefinition;
-import org.hibernate.eclipse.console.model.impl.ExporterFactory;
-import org.hibernate.eclipse.console.utils.DialogSelectionHelper;
-import org.hibernate.eclipse.launch.PathHelper;
-import org.hibernate.mapping.Table;
-import org.hibernate.tool.hbm2x.ArtifactCollector;
-import org.hibernate.tool.hbm2x.Exporter;
-
-public class GenerateSeamEntities implements IObjectActionDelegate {
-
- private TreeSelection selection;
-
- private String outputPath;
-
- private Map<ConsoleConfiguration, List<Table>> tableGroups;
-
- public void run(IAction action) {
-
- IPath[] paths = DialogSelectionHelper.chooseFolderEntries(null, null,
- Messages.GenerateSeamEntities_dialog_title,
- Messages.GenerateSeamEntities_dialog_message,
- false);
-
- if (paths.length == 0) return;
-
- outputPath = paths[0].toOSString();
-
- splitOnGroupsByConsoleCfg();
-
- ExporterFactory[] exporters = getExporterFactories();
-
- Set<ConsoleConfiguration> ccs = tableGroups.keySet();
-
- for (Iterator<ConsoleConfiguration> iterator = ccs.iterator(); iterator
- .hasNext();) {
- ConsoleConfiguration consoleConfiguration = iterator.next();
- runExporters(exporters, consoleConfiguration);
- }
-
- refreshOutputDir(getOutputPath());
- }
-
- private ArtifactCollector runExporters(
- final ExporterFactory[] exporterFactories, ConsoleConfiguration cc) {
- final IProgressMonitor monitor = new NullProgressMonitor();
-
- monitor.beginTask("Generating code for " + cc.getName(), exporterFactories.length + 1); //$NON-NLS-1$
-
- final Configuration cfg = buildConfiguration(cc, tableGroups.get(cc));
-
- monitor.worked(1);
-
- if (monitor.isCanceled())
- return null;
-
- return (ArtifactCollector) cc.execute(new Command() {
-
- public Object execute() {
- ArtifactCollector artifactCollector = new ArtifactCollector();
-
- // Global properties
- Properties props = new Properties();
- props.put("ejb3", "true"); //$NON-NLS-1$ //$NON-NLS-2$
- props.put("jdk5", "true"); //$NON-NLS-1$ //$NON-NLS-2$
-
- for (int i = 0; i < exporterFactories.length; i++) {
- monitor.subTask(exporterFactories[i]
- .getExporterDefinition().getDescription());
-
- Properties globalProperties = new Properties();
- globalProperties.putAll(props);
-
- Set outputDirectories = new HashSet();
- Exporter exporter;
- try {
- exporter = exporterFactories[i]
- .createConfiguredExporter(cfg, getOutputPath(),
- null, globalProperties,
- outputDirectories, artifactCollector);
- } catch (CoreException e) {
- throw new HibernateConsoleRuntimeException(
- "Error while setting up " //$NON-NLS-1$
- + exporterFactories[i]
- .getExporterDefinition(), e);
- }
-
- exporter.start();
- monitor.worked(1);
- }
- return artifactCollector;
- }
-
- });
-
- }
-
- private ExporterFactory[] getExporterFactories() {
- List<String> exporterNames = new ArrayList<String>();
- exporterNames.add("org.hibernate.tools.hbm2java"); //$NON-NLS-1$
- //exporterNames.add("org.hibernate.tools.hbm2dao"); //$NON-NLS-1$
-
- Map exDefinitions = ExtensionManager.findExporterDefinitionsAsMap();
- List<ExporterFactory> factories = new ArrayList<ExporterFactory>();
-
- for (Iterator<String> iterator = exporterNames.iterator(); iterator
- .hasNext();) {
- String exporterId = iterator.next();
-
- ExporterDefinition expDef = (ExporterDefinition) exDefinitions
- .get(exporterId);
- if (expDef == null) {
- throw new HibernateConsoleRuntimeException(
- "Could not locate exporter for '" + exporterId + "'"); //$NON-NLS-1$ //$NON-NLS-2$
- } else {
- ExporterFactory exporterFactory = new ExporterFactory(expDef,
- exporterId);
- factories.add(exporterFactory);
- }
- }
- return factories.toArray(new ExporterFactory[factories.size()]);
- }
-
- private Configuration buildConfiguration(ConsoleConfiguration cc,
- final List<Table> tables) {
- Configuration configuration = null;
- if (cc.hasConfiguration()) {
- configuration = cc.getConfiguration();
- } else {
- configuration = cc.buildWith(null, false);
- }
-
- final JDBCMetaDataConfiguration cfg = new JDBCMetaDataConfiguration();
- Properties properties = configuration.getProperties();
- cfg.setProperties(properties);
- cc.buildWith(cfg, false);
-
- cfg.setPreferBasicCompositeIds(true);
-
- cc.execute(new Command() {
- /* need to execute in the console configuration to let it handle classpath stuff!*/
- public Object execute() {
-
- OverrideRepository repository = new OverrideRepository();
-
- TableFilter filter = null;
- for (int i = 0; i < tables.size(); i++) {
- Table table = tables.get(i);
-
- filter = new TableFilter();
- filter.setExclude(false);
- if (table.getCatalog() != null) {
- filter.setMatchCatalog(table.getCatalog());
- }
- if (table.getSchema() != null) {
- filter.setMatchSchema(table.getSchema());
- }
- filter.setMatchName(tables.get(i).getName());
-
- repository.addTableFilter(filter);
- }
-
- ReverseEngineeringStrategy res = repository
- .getReverseEngineeringStrategy(new DefaultReverseEngineeringStrategy());
-
- ReverseEngineeringSettings qqsettings = new ReverseEngineeringSettings(res)
- .setDetectManyToMany(true)
- .setDetectOptimisticLock(true);
-
- res.setSettings(qqsettings);
-
- cfg.setReverseEngineeringStrategy(res);
-
- cfg.readFromJDBC();
- cfg.buildMappings();
- return null;
- }
- });
-
- return cfg;
- }
-
- private String getOutputPath() {
- return outputPath;
- }
-
- private void splitOnGroupsByConsoleCfg() {
- TreePath[] paths = selection.getPaths();
-
- tableGroups = new HashMap<ConsoleConfiguration, List<Table>>();
-
- for (int i = 0; i < paths.length; i++) {
- if (paths[i].getLastSegment() instanceof Table) {
- ConsoleConfiguration cc = getConsoleConfiguration(paths[i]);
- if (cc == null) continue;
-
- if (tableGroups.containsKey(cc)) {
- List<Table> tables = tableGroups.get(cc);
- tables.add((Table) paths[i].getLastSegment());
- } else {
- List<Table> tables = new ArrayList<Table>();
- tables.add((Table) paths[i].getLastSegment());
- tableGroups.put(cc, tables);
- }
- }
- }
- }
-
- private ConsoleConfiguration getConsoleConfiguration(TreePath path) {
- for (int i = 0; i < path.getSegmentCount(); i++) {
- if (path.getSegment(i) instanceof ConsoleConfiguration)
- return (ConsoleConfiguration) path.getSegment(i);
- }
- return null;
- }
-
- public void setActivePart(IAction action, IWorkbenchPart targetPart) {
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- if (selection instanceof TreeSelection) {
- this.selection = (TreeSelection) selection;
- }
- }
-
- private void refreshOutputDir(String outputdir) {
- IResource bufferRes = PathHelper.findMember(ResourcesPlugin
- .getWorkspace().getRoot(), outputdir);
-
- if (bufferRes != null && bufferRes.isAccessible()) {
- try {
- bufferRes.refreshLocal(IResource.DEPTH_INFINITE, null);
- } catch (CoreException e) {
- // ignore, maybe merge into possible existing status.
- }
- }
- }
-
-}
16 years, 9 months
JBoss Tools SVN: r7180 - in trunk/hibernatetools/plugins/org.hibernate.eclipse.console: src/org/hibernate/eclipse/console and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2008-03-28 09:03:00 -0400 (Fri, 28 Mar 2008)
New Revision: 7180
Added:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/GenerateSeamEntities.java
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/plugin.xml
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/Messages.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/messages.properties
Log:
http://jira.jboss.com/jira/browse/JBIDE-1178
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/plugin.xml
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/plugin.xml 2008-03-28 12:18:57 UTC (rev 7179)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/plugin.xml 2008-03-28 13:03:00 UTC (rev 7180)
@@ -654,6 +654,36 @@
</moveParticipant-->
</extension>
+ <extension
+ point="org.eclipse.ui.popupMenus">
+ <!--objectContribution
+ id="org.hibernate.eclipse.console.objectContribution1"
+ objectClass="org.eclipse.datatools.connectivity.sqm.core.rte.jdbc.JDBCTable">
+ <action
+ class="org.hibernate.eclipse.console.GenerateSeamEntities3"
+ id="org.hibernate.eclipse.console.action2"
+ label="Generate Seam Entities">
+ </action>
+ </objectContribution-->
+ <objectContribution
+ id="org.hibernate.eclipse.console.objectContribution2"
+ objectClass="org.hibernate.mapping.Table">
+ <action
+ class="org.hibernate.eclipse.console.GenerateSeamEntities"
+ id="org.hibernate.eclipse.console.action1"
+ label="Generate Seam Entities">
+ </action>
+ </objectContribution>
+ <!--objectContribution
+ id="org.hibernate.eclipse.console.objectContribution2"
+ objectClass="org.hibernate.eclipse.console.workbench.TableContainer">
+ <action
+ class="org.hibernate.eclipse.console.GenerateSeamEntities"
+ id="org.hibernate.eclipse.console.action1"
+ label="Generate Seam Entities">
+ </action>
+ </objectContribution-->
+ </extension>
<!-- <extension
point="org.eclipse.ui.themes">
<themeElementCategory
Added: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/GenerateSeamEntities.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/GenerateSeamEntities.java (rev 0)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/GenerateSeamEntities.java 2008-03-28 13:03:00 UTC (rev 7180)
@@ -0,0 +1,271 @@
+package org.hibernate.eclipse.console;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.TreePath;
+import org.eclipse.jface.viewers.TreeSelection;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbenchPart;
+import org.hibernate.cfg.Configuration;
+import org.hibernate.cfg.JDBCMetaDataConfiguration;
+import org.hibernate.cfg.reveng.DefaultReverseEngineeringStrategy;
+import org.hibernate.cfg.reveng.OverrideRepository;
+import org.hibernate.cfg.reveng.ReverseEngineeringSettings;
+import org.hibernate.cfg.reveng.ReverseEngineeringStrategy;
+import org.hibernate.cfg.reveng.TableFilter;
+import org.hibernate.console.ConsoleConfiguration;
+import org.hibernate.console.HibernateConsoleRuntimeException;
+import org.hibernate.console.execution.ExecutionContext.Command;
+import org.hibernate.eclipse.console.model.impl.ExporterDefinition;
+import org.hibernate.eclipse.console.model.impl.ExporterFactory;
+import org.hibernate.eclipse.console.utils.DialogSelectionHelper;
+import org.hibernate.eclipse.launch.PathHelper;
+import org.hibernate.mapping.Table;
+import org.hibernate.tool.hbm2x.ArtifactCollector;
+import org.hibernate.tool.hbm2x.Exporter;
+
+public class GenerateSeamEntities implements IObjectActionDelegate {
+
+ private TreeSelection selection;
+
+ private String outputPath;
+
+ private Map<ConsoleConfiguration, List<Table>> tableGroups;
+
+ public void run(IAction action) {
+
+ IPath[] paths = DialogSelectionHelper.chooseFolderEntries(null, null,
+ Messages.GenerateSeamEntities_dialog_title,
+ Messages.GenerateSeamEntities_dialog_message,
+ false);
+
+ if (paths.length == 0) return;
+
+ outputPath = paths[0].toOSString();
+
+ splitOnGroupsByConsoleCfg();
+
+ ExporterFactory[] exporters = getExporterFactories();
+
+ Set<ConsoleConfiguration> ccs = tableGroups.keySet();
+
+ for (Iterator<ConsoleConfiguration> iterator = ccs.iterator(); iterator
+ .hasNext();) {
+ ConsoleConfiguration consoleConfiguration = iterator.next();
+ runExporters(exporters, consoleConfiguration);
+ }
+
+ refreshOutputDir(getOutputPath());
+ }
+
+ private ArtifactCollector runExporters(
+ final ExporterFactory[] exporterFactories, ConsoleConfiguration cc) {
+ final IProgressMonitor monitor = new NullProgressMonitor();
+
+ monitor.beginTask("Generating code for " + cc.getName(), exporterFactories.length + 1); //$NON-NLS-1$
+
+ final Configuration cfg = buildConfiguration(cc, tableGroups.get(cc));
+
+ monitor.worked(1);
+
+ if (monitor.isCanceled())
+ return null;
+
+ return (ArtifactCollector) cc.execute(new Command() {
+
+ public Object execute() {
+ ArtifactCollector artifactCollector = new ArtifactCollector();
+
+ // Global properties
+ Properties props = new Properties();
+ props.put("ejb3", "true"); //$NON-NLS-1$ //$NON-NLS-2$
+ props.put("jdk5", "true"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ for (int i = 0; i < exporterFactories.length; i++) {
+ monitor.subTask(exporterFactories[i]
+ .getExporterDefinition().getDescription());
+
+ Properties globalProperties = new Properties();
+ globalProperties.putAll(props);
+
+ Set outputDirectories = new HashSet();
+ Exporter exporter;
+ try {
+ exporter = exporterFactories[i]
+ .createConfiguredExporter(cfg, getOutputPath(),
+ null, globalProperties,
+ outputDirectories, artifactCollector);
+ } catch (CoreException e) {
+ throw new HibernateConsoleRuntimeException(
+ "Error while setting up " //$NON-NLS-1$
+ + exporterFactories[i]
+ .getExporterDefinition(), e);
+ }
+
+ exporter.start();
+ monitor.worked(1);
+ }
+ return artifactCollector;
+ }
+
+ });
+
+ }
+
+ private ExporterFactory[] getExporterFactories() {
+ List<String> exporterNames = new ArrayList<String>();
+ exporterNames.add("org.hibernate.tools.hbm2java"); //$NON-NLS-1$
+ //exporterNames.add("org.hibernate.tools.hbm2dao"); //$NON-NLS-1$
+
+ Map exDefinitions = ExtensionManager.findExporterDefinitionsAsMap();
+ List<ExporterFactory> factories = new ArrayList<ExporterFactory>();
+
+ for (Iterator<String> iterator = exporterNames.iterator(); iterator
+ .hasNext();) {
+ String exporterId = iterator.next();
+
+ ExporterDefinition expDef = (ExporterDefinition) exDefinitions
+ .get(exporterId);
+ if (expDef == null) {
+ throw new HibernateConsoleRuntimeException(
+ "Could not locate exporter for '" + exporterId + "'"); //$NON-NLS-1$ //$NON-NLS-2$
+ } else {
+ ExporterFactory exporterFactory = new ExporterFactory(expDef,
+ exporterId);
+ factories.add(exporterFactory);
+ }
+ }
+ return factories.toArray(new ExporterFactory[factories.size()]);
+ }
+
+ private Configuration buildConfiguration(ConsoleConfiguration cc,
+ final List<Table> tables) {
+ Configuration configuration = null;
+ if (cc.hasConfiguration()) {
+ configuration = cc.getConfiguration();
+ } else {
+ configuration = cc.buildWith(null, false);
+ }
+
+ final JDBCMetaDataConfiguration cfg = new JDBCMetaDataConfiguration();
+ Properties properties = configuration.getProperties();
+ cfg.setProperties(properties);
+ cc.buildWith(cfg, false);
+
+ cfg.setPreferBasicCompositeIds(true);
+
+ cc.execute(new Command() {
+ /* need to execute in the console configuration to let it handle classpath stuff!*/
+ public Object execute() {
+
+ OverrideRepository repository = new OverrideRepository();
+
+ TableFilter filter = null;
+ for (int i = 0; i < tables.size(); i++) {
+ Table table = tables.get(i);
+
+ filter = new TableFilter();
+ filter.setExclude(false);
+ if (table.getCatalog() != null) {
+ filter.setMatchCatalog(table.getCatalog());
+ }
+ if (table.getSchema() != null) {
+ filter.setMatchSchema(table.getSchema());
+ }
+ filter.setMatchName(tables.get(i).getName());
+
+ repository.addTableFilter(filter);
+ }
+
+ ReverseEngineeringStrategy res = repository
+ .getReverseEngineeringStrategy(new DefaultReverseEngineeringStrategy());
+
+ ReverseEngineeringSettings qqsettings = new ReverseEngineeringSettings(res)
+ .setDetectManyToMany(true)
+ .setDetectOptimisticLock(true);
+
+ res.setSettings(qqsettings);
+
+ cfg.setReverseEngineeringStrategy(res);
+
+ cfg.readFromJDBC();
+ cfg.buildMappings();
+ return null;
+ }
+ });
+
+ return cfg;
+ }
+
+ private String getOutputPath() {
+ return outputPath;
+ }
+
+ private void splitOnGroupsByConsoleCfg() {
+ TreePath[] paths = selection.getPaths();
+
+ tableGroups = new HashMap<ConsoleConfiguration, List<Table>>();
+
+ for (int i = 0; i < paths.length; i++) {
+ if (paths[i].getLastSegment() instanceof Table) {
+ ConsoleConfiguration cc = getConsoleConfiguration(paths[i]);
+ if (cc == null) continue;
+
+ if (tableGroups.containsKey(cc)) {
+ List<Table> tables = tableGroups.get(cc);
+ tables.add((Table) paths[i].getLastSegment());
+ } else {
+ List<Table> tables = new ArrayList<Table>();
+ tables.add((Table) paths[i].getLastSegment());
+ tableGroups.put(cc, tables);
+ }
+ }
+ }
+ }
+
+ private ConsoleConfiguration getConsoleConfiguration(TreePath path) {
+ for (int i = 0; i < path.getSegmentCount(); i++) {
+ if (path.getSegment(i) instanceof ConsoleConfiguration)
+ return (ConsoleConfiguration) path.getSegment(i);
+ }
+ return null;
+ }
+
+ public void setActivePart(IAction action, IWorkbenchPart targetPart) {
+ }
+
+ public void selectionChanged(IAction action, ISelection selection) {
+ if (selection instanceof TreeSelection) {
+ this.selection = (TreeSelection) selection;
+ }
+ }
+
+ private void refreshOutputDir(String outputdir) {
+ IResource bufferRes = PathHelper.findMember(ResourcesPlugin
+ .getWorkspace().getRoot(), outputdir);
+
+ if (bufferRes != null && bufferRes.isAccessible()) {
+ try {
+ bufferRes.refreshLocal(IResource.DEPTH_INFINITE, null);
+ } catch (CoreException e) {
+ // ignore, maybe merge into possible existing status.
+ }
+ }
+ }
+
+}
Property changes on: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/GenerateSeamEntities.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/Messages.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/Messages.java 2008-03-28 12:18:57 UTC (rev 7179)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/Messages.java 2008-03-28 13:03:00 UTC (rev 7180)
@@ -34,6 +34,8 @@
public static String find_replace_action_tooltip;
public static String find_replace_action_image;
public static String find_replace_action_description;
+ public static String GenerateSeamEntities_dialog_title;
+ public static String GenerateSeamEntities_dialog_message;
private Messages() {
// noop
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/messages.properties
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/messages.properties 2008-03-28 12:18:57 UTC (rev 7179)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/messages.properties 2008-03-28 13:03:00 UTC (rev 7180)
@@ -20,3 +20,6 @@
ContentFormat.tooltip =Format HQL
ContentFormat.image =
ContentFormat.description =Format HQL source
+
+GenerateSeamEntities_dialog_title = Select output directory
+GenerateSeamEntities_dialog_message = Choose directory in which the generated files will be stored
16 years, 9 months