JBoss Tools SVN: r18924 - documentation/trunk/movies/HQL_JPA-QL_queries.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2009-11-30 11:21:05 -0500 (Mon, 30 Nov 2009)
New Revision: 18924
Modified:
documentation/trunk/movies/HQL_JPA-QL_queries/HQL_JPA-QL_queries.wnk
Log:
JBDS-906 HQL_JPA-QL_queries demo - updated
Modified: documentation/trunk/movies/HQL_JPA-QL_queries/HQL_JPA-QL_queries.wnk
===================================================================
(Binary files differ)
15 years, 1 month
JBoss Tools SVN: r18923 - trunk/hibernatetools/docs/reference/en/images/plugins.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2009-11-30 11:11:27 -0500 (Mon, 30 Nov 2009)
New Revision: 18923
Added:
trunk/hibernatetools/docs/reference/en/images/plugins/dali_integration6.png
Log:
JBDS-906 Demos update - when updating HQL_JPA-QL_queries demo and guide on this topic, a missing image was found in guide - added
Added: trunk/hibernatetools/docs/reference/en/images/plugins/dali_integration6.png
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/docs/reference/en/images/plugins/dali_integration6.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
15 years, 1 month
JBoss Tools SVN: r18922 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide.
by jbosstools-commits@lists.jboss.org
Author: yzhishko
Date: 2009-11-30 10:34:53 -0500 (Mon, 30 Nov 2009)
New Revision: 18922
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/SelectAllAndCut_JBIDE4853.java
Log:
Fix assertation exception
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/SelectAllAndCut_JBIDE4853.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/SelectAllAndCut_JBIDE4853.java 2009-11-30 15:32:55 UTC (rev 18921)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/SelectAllAndCut_JBIDE4853.java 2009-11-30 15:34:53 UTC (rev 18922)
@@ -41,8 +41,8 @@
textWidget.selectAll();
textWidget.cut();
+ TestUtil.delay(1000);
TestUtil.waitForIdle();
-
nsIDOMDocument document = vpeController.getXulRunnerEditor()
.getDOMDocument();
assertNull("Element with id='" + CUT_ELEMENT_ID //$NON-NLS-1$
15 years, 1 month
JBoss Tools SVN: r18921 - in trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template: util and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: yzhishko
Date: 2009-11-30 10:32:55 -0500 (Mon, 30 Nov 2009)
New Revision: 18921
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamMailBodyTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfAbstractTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfAnchorTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfBarChartTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfCellTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfChapterTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfDocumentTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfFooterTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfLineChartTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfListTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfParagraphTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfPieChartTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfSectionTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfTableTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfTextTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/util/SeamUtil.java
Log:
NON-NLS suppress warnings were added.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamMailBodyTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamMailBodyTemplate.java 2009-11-30 12:55:07 UTC (rev 18920)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamMailBodyTemplate.java 2009-11-30 15:32:55 UTC (rev 18921)
@@ -23,8 +23,8 @@
public class SeamMailBodyTemplate extends VpeAbstractTemplate {
- private static final String ATTR_TYPE = "type";
- private static final String ATTR_VALUE_PLAIN = "plain";
+ private static final String ATTR_TYPE = "type"; //$NON-NLS-1$
+ private static final String ATTR_VALUE_PLAIN = "plain"; //$NON-NLS-1$
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfAbstractTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfAbstractTemplate.java 2009-11-30 12:55:07 UTC (rev 18920)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfAbstractTemplate.java 2009-11-30 15:32:55 UTC (rev 18921)
@@ -29,10 +29,10 @@
public Node getNodeForUpdate(VpePageContext pageContext, Node sourceNode,
nsIDOMNode visualNode, Object data) {
Node[] footers = SeamUtil.getChildsByName(pageContext, sourceNode,
- "p:footer");
+ "p:footer"); //$NON-NLS-1$
if (footers != null && footers.length != 0) {
Node parentPdfDocumentNode = SeamUtil.getParentByName(pageContext,
- sourceNode, "p:document");
+ sourceNode, "p:document"); //$NON-NLS-1$
if (parentPdfDocumentNode != null) {
return parentPdfDocumentNode;
}
@@ -48,19 +48,19 @@
if (width != null) {
String styleAttrValue = visualElement.getAttribute(HTML.ATTR_STYLE);
if (styleAttrValue == null) {
- visualElement.setAttribute(HTML.ATTR_STYLE, "width:" + width);
+ visualElement.setAttribute(HTML.ATTR_STYLE, "width:" + width); //$NON-NLS-1$
} else {
visualElement.setAttribute(HTML.ATTR_STYLE, styleAttrValue
- + "; width:" + width);
+ + "; width:" + width); //$NON-NLS-1$
}
}
if (height != null) {
String styleAttrValue = visualElement.getAttribute(HTML.ATTR_STYLE);
if (styleAttrValue == null) {
- visualElement.setAttribute(HTML.ATTR_STYLE, "height:" + height);
+ visualElement.setAttribute(HTML.ATTR_STYLE, "height:" + height); //$NON-NLS-1$
} else {
visualElement.setAttribute(HTML.ATTR_STYLE, styleAttrValue
- + "; height:" + height);
+ + "; height:" + height); //$NON-NLS-1$
}
}
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfAnchorTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfAnchorTemplate.java 2009-11-30 12:55:07 UTC (rev 18920)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfAnchorTemplate.java 2009-11-30 15:32:55 UTC (rev 18921)
@@ -24,7 +24,7 @@
public class SeamPdfAnchorTemplate extends SeamPdfAbstractTemplate {
- private static final String ATTR_REF = "reference";
+ private static final String ATTR_REF = "reference"; //$NON-NLS-1$
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
@@ -35,7 +35,7 @@
visualElement.setAttribute(HTML.ATTR_NAME, sourceElement
.getAttribute(HTML.ATTR_NAME));
visualElement.setAttribute(HTML.ATTR_STYLE,
- "color:black; text-decoration:none");
+ "color:black; text-decoration:none"); //$NON-NLS-1$
}
if (sourceElement.hasAttribute(ATTR_REF)) {
visualElement.setAttribute(HTML.ATTR_HREF, sourceElement
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfBarChartTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfBarChartTemplate.java 2009-11-30 12:55:07 UTC (rev 18920)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfBarChartTemplate.java 2009-11-30 15:32:55 UTC (rev 18921)
@@ -21,14 +21,14 @@
public class SeamPdfBarChartTemplate extends SeamPdfAbstractTemplate {
- private static String BAR_CHART = "/barChart/barChart.png"; //$NON-NLS-1$
- private static String BAR_CHART_SERIES_NESTED = "/barChart/barChartSeriesNested.png"; //$NON-NLS-1$
+ private final static String BAR_CHART = "/barChart/barChart.png"; //$NON-NLS-1$
+ private final static String BAR_CHART_SERIES_NESTED = "/barChart/barChartSeriesNested.png"; //$NON-NLS-1$
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
nsIDOMElement visualElement = visualDocument.createElement(HTML.TAG_IMG);
- Node[] seriesNodes = SeamUtil.getChildsByName(pageContext, sourceNode, "p:series");
+ Node[] seriesNodes = SeamUtil.getChildsByName(pageContext, sourceNode, "p:series"); //$NON-NLS-1$
if (seriesNodes!=null && seriesNodes.length!=0) {
SeamUtil.setImg(visualElement, BAR_CHART_SERIES_NESTED);
}else {
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfCellTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfCellTemplate.java 2009-11-30 12:55:07 UTC (rev 18920)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfCellTemplate.java 2009-11-30 15:32:55 UTC (rev 18921)
@@ -37,7 +37,7 @@
visualElement = (nsIDOMElement) visualNode
.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
copyAttrs(visualElement, sourceElement);
- visualElement.setAttribute(HTML.ATTR_STYLE, "border-width: 2px; border-color: black; border-style: solid");
+ visualElement.setAttribute(HTML.ATTR_STYLE, "border-width: 2px; border-color: black; border-style: solid"); //$NON-NLS-1$
return new VpeCreationData(visualElement);
}
@@ -48,7 +48,7 @@
visualNode, data);
if (nodeForUpdate == null) {
nodeForUpdate = SeamUtil.getParentByName(pageContext, sourceNode,
- "p:table");
+ "p:table"); //$NON-NLS-1$
}
return nodeForUpdate;
}
@@ -68,9 +68,9 @@
if (attr != null) {
visualElement.setAttribute(HTML.ATTR_VALIGN, attr);
}
- attr = sourceElement.getAttribute("noWrap");
+ attr = sourceElement.getAttribute("noWrap"); //$NON-NLS-1$
if (attr != null) {
- visualElement.setAttribute("nowrap", attr);
+ visualElement.setAttribute("nowrap", attr); //$NON-NLS-1$
}
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfChapterTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfChapterTemplate.java 2009-11-30 12:55:07 UTC (rev 18920)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfChapterTemplate.java 2009-11-30 15:32:55 UTC (rev 18921)
@@ -29,7 +29,7 @@
public class SeamPdfChapterTemplate extends SeamPdfAbstractTemplate {
- private static final String NUMBER = "number";
+ private static final String NUMBER = "number"; //$NON-NLS-1$
private nsIDOMElement visualElement;
private Element sourceElement;
@@ -45,13 +45,13 @@
try {
Integer.parseInt(chapterNumber);
} catch (NumberFormatException e) {
- chapterNumber = "1";
+ chapterNumber = "1"; //$NON-NLS-1$
}
} else {
- chapterNumber = "1";
+ chapterNumber = "1"; //$NON-NLS-1$
}
nsIDOMText chapterNumberNode = visualDocument
- .createTextNode(chapterNumber + ". ");
+ .createTextNode(chapterNumber + ". "); //$NON-NLS-1$
headNode.appendChild(chapterNumberNode);
visualElement.appendChild(headNode);
return new VpeCreationData(visualElement);
@@ -63,7 +63,7 @@
NodeList children = sourceElement.getChildNodes();
for (int i = 0; i < children.getLength(); i++) {
if (children.item(i) instanceof Element) {
- if (children.item(i).getNodeName().endsWith(":title")) {
+ if (children.item(i).getNodeName().endsWith(":title")) { //$NON-NLS-1$
sourceTitleNode = children.item(i);
}
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfDocumentTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfDocumentTemplate.java 2009-11-30 12:55:07 UTC (rev 18920)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfDocumentTemplate.java 2009-11-30 15:32:55 UTC (rev 18921)
@@ -44,18 +44,18 @@
if (marginValues.length != 4) {
return false;
}
- headElement.removeAttribute("style");
- headElement.setAttribute("style", "margin-left:"
- + Float.toString(marginValues[0]) + ";margin-right:"
- + Float.toString(marginValues[1]) + ";margin-top:"
- + Float.toString(marginValues[2]) + ";margin-bottom:"
- + Float.toString(marginValues[3]) + ";");
+ headElement.removeAttribute("style"); //$NON-NLS-1$
+ headElement.setAttribute("style", "margin-left:" //$NON-NLS-1$//$NON-NLS-2$
+ + Float.toString(marginValues[0]) + ";margin-right:" //$NON-NLS-1$
+ + Float.toString(marginValues[1]) + ";margin-top:" //$NON-NLS-1$
+ + Float.toString(marginValues[2]) + ";margin-bottom:" //$NON-NLS-1$
+ + Float.toString(marginValues[3]) + ";"); //$NON-NLS-1$
return true;
}
private float[] parseMarginValues(String stringMarginValues)
throws NumberFormatException {
- String[] parts = stringMarginValues.split("\\s");
+ String[] parts = stringMarginValues.split("\\s"); //$NON-NLS-1$
float[] values = new float[parts.length];
for (int i = 0; i < parts.length; i++) {
values[i] = Float.valueOf(parts[i]);
@@ -71,7 +71,7 @@
String marginsAttrValue = sourceElement
.getAttribute(SeamUtil.SEAM_ATTR_MARGINS);
try {
- if (marginsAttrValue != null && !"".equals(marginsAttrValue)) {
+ if (marginsAttrValue != null && !"".equals(marginsAttrValue)) { //$NON-NLS-1$
float[] floatMarginValues = parseMarginValues(marginsAttrValue);
if (!setMarginValues(floatMarginValues)) {
setDefaultMargingValues();
@@ -93,7 +93,7 @@
private void setFooter(VpePageContext pageContext, Node sourceNode,
VpeCreationData data) {
Node[] footers = SeamUtil.getChildsByName(pageContext, sourceNode,
- "p:footer");
+ "p:footer"); //$NON-NLS-1$
nsIDOMNode visualFooter = null;
if (footers != null && footers.length != 0) {
visualFooter = pageContext.getDomMapping().getVisualNode(
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfFooterTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfFooterTemplate.java 2009-11-30 12:55:07 UTC (rev 18920)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfFooterTemplate.java 2009-11-30 15:32:55 UTC (rev 18921)
@@ -38,9 +38,9 @@
.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
SeamUtil.setAlignment(sourceElement, visualElement);
Node parentFontNode = SeamUtil.getParentByName(pageContext, sourceNode,
- "p:font");
+ "p:font"); //$NON-NLS-1$
String styleAttr = SeamUtil.getStyleAttr(parentFontNode);
- if (styleAttr != null && !"".equals(styleAttr)) {
+ if (styleAttr != null && !"".equals(styleAttr)) { //$NON-NLS-1$
visualElement.setAttribute(HTML.ATTR_STYLE, styleAttr);
}
return new VpeCreationData(visualElement);
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfLineChartTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfLineChartTemplate.java 2009-11-30 12:55:07 UTC (rev 18920)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfLineChartTemplate.java 2009-11-30 15:32:55 UTC (rev 18921)
@@ -21,8 +21,8 @@
public class SeamPdfLineChartTemplate extends SeamPdfAbstractTemplate {
- private static String LINE_CHART = "/lineChart/lineChart.png"; //$NON-NLS-1$
- private static String LINE_CHART_SERIES_NESTED = "/lineChart/lineChartSeriesNested.png"; //$NON-NLS-1$
+ private final static String LINE_CHART = "/lineChart/lineChart.png"; //$NON-NLS-1$
+ private final static String LINE_CHART_SERIES_NESTED = "/lineChart/lineChartSeriesNested.png"; //$NON-NLS-1$
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
@@ -30,7 +30,7 @@
nsIDOMElement visualElement = visualDocument
.createElement(HTML.TAG_IMG);
Node[] seriesNodes = SeamUtil.getChildsByName(pageContext, sourceNode,
- "p:series");
+ "p:series"); //$NON-NLS-1$
if (seriesNodes != null && seriesNodes.length != 0) {
SeamUtil.setImg(visualElement, LINE_CHART_SERIES_NESTED);
} else {
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfListTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfListTemplate.java 2009-11-30 12:55:07 UTC (rev 18920)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfListTemplate.java 2009-11-30 15:32:55 UTC (rev 18921)
@@ -24,11 +24,11 @@
private static List<String> NUMBERED_VALUES;
static{
NUMBERED_VALUES = new ArrayList<String>(0);
- NUMBERED_VALUES.add("numbered");
- NUMBERED_VALUES.add("greek");
- NUMBERED_VALUES.add("roman");
- NUMBERED_VALUES.add("zapfdingbats");
- NUMBERED_VALUES.add("zapfdingbats_number");
+ NUMBERED_VALUES.add("numbered"); //$NON-NLS-1$
+ NUMBERED_VALUES.add("greek"); //$NON-NLS-1$
+ NUMBERED_VALUES.add("roman"); //$NON-NLS-1$
+ NUMBERED_VALUES.add("zapfdingbats"); //$NON-NLS-1$
+ NUMBERED_VALUES.add("zapfdingbats_number"); //$NON-NLS-1$
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfParagraphTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfParagraphTemplate.java 2009-11-30 12:55:07 UTC (rev 18920)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfParagraphTemplate.java 2009-11-30 15:32:55 UTC (rev 18921)
@@ -48,9 +48,9 @@
if (firstChild != null) {
if (firstChild.getNodeType() == Node.TEXT_NODE) {
String nodeValue = firstChild.getNodeValue();
- nodeValue = nodeValue.replace(" ", "").replace("\n", "")
- .replace("\t", "").replace("\r", "");
- if (!nodeValue.equals("")) {
+ nodeValue = nodeValue.replace(" ", "").replace("\n", "") //$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$ //$NON-NLS-4$
+ .replace("\t", "").replace("\r", ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ if (!nodeValue.equals("")) { //$NON-NLS-1$
nsIDOMNode brNode = visualDocument
.createElement(HTML.TAG_BR);
visualElement.appendChild(brNode);
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfPieChartTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfPieChartTemplate.java 2009-11-30 12:55:07 UTC (rev 18920)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfPieChartTemplate.java 2009-11-30 15:32:55 UTC (rev 18921)
@@ -21,8 +21,8 @@
public class SeamPdfPieChartTemplate extends SeamPdfAbstractTemplate {
- private static String PIE_CHART = "/pieChart/pieChart.png"; //$NON-NLS-1$
- private static String PIE_CHART_SERIES_NESTED = "/pieChart/pieChartSeriesNested.png"; //$NON-NLS-1$
+ private final static String PIE_CHART = "/pieChart/pieChart.png"; //$NON-NLS-1$
+ private final static String PIE_CHART_SERIES_NESTED = "/pieChart/pieChartSeriesNested.png"; //$NON-NLS-1$
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
@@ -30,7 +30,7 @@
nsIDOMElement visualElement = visualDocument
.createElement(HTML.TAG_IMG);
Node[] seriesNodes = SeamUtil.getChildsByName(pageContext, sourceNode,
- "p:series");
+ "p:series"); //$NON-NLS-1$
if (seriesNodes != null && seriesNodes.length != 0) {
SeamUtil.setImg(visualElement, PIE_CHART_SERIES_NESTED);
} else {
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfSectionTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfSectionTemplate.java 2009-11-30 12:55:07 UTC (rev 18920)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfSectionTemplate.java 2009-11-30 15:32:55 UTC (rev 18921)
@@ -57,18 +57,18 @@
StringBuffer chapterNumberBuffer = new StringBuffer();
calculateNumberFromTree(pageContext, sourceElement, chapterNumberBuffer);
Node parentSection = SeamUtil.getParentByName(pageContext,
- sourceElement, "p:chapter");
+ sourceElement, "p:chapter"); //$NON-NLS-1$
if (parentSection != null) {
int chapterNumber = getChapterNumber(parentSection);
chapterNumberBuffer
- .insert(0, Integer.toString(chapterNumber) + ".");
+ .insert(0, Integer.toString(chapterNumber) + "."); //$NON-NLS-1$
}
return chapterNumberBuffer.toString();
}
private String calculateHeadName(String sectionNumberString) {
StringTokenizer tokenizer = new StringTokenizer(sectionNumberString,
- ".", false);
+ ".", false); //$NON-NLS-1$
int headNumber = 0;
while (tokenizer.hasMoreElements()) {
tokenizer.nextToken();
@@ -77,23 +77,23 @@
if (headNumber > 6) {
headNumber = 6;
}
- return "H" + Integer.toString(headNumber);
+ return "H" + Integer.toString(headNumber); //$NON-NLS-1$
}
private void calculateNumberFromTree(VpePageContext pageContext,
Element sourceElement, StringBuffer sectionNumberString) {
Node parentSection = SeamUtil.getParentByName(pageContext,
- sourceElement, "p:section");
+ sourceElement, "p:section"); //$NON-NLS-1$
if (parentSection != null) {
int sectionNum = 0;
NodeList children = parentSection.getChildNodes();
for (int i = 0; i < children.getLength(); i++) {
- if (children.item(i).getNodeName().endsWith(":section")) {
+ if (children.item(i).getNodeName().endsWith(":section")) { //$NON-NLS-1$
sectionNum++;
if (children.item(i) == sourceElement) {
sectionNumberString.insert(0, Integer
.toString(sectionNum)
- + ".");
+ + "."); //$NON-NLS-1$
break;
}
}
@@ -102,16 +102,16 @@
sectionNumberString);
} else {
Node parentChapter = SeamUtil.getParentByName(pageContext,
- sourceElement, "p:chapter");
+ sourceElement, "p:chapter"); //$NON-NLS-1$
int sectionNum = 0;
NodeList children = parentChapter.getChildNodes();
for (int i = 0; i < children.getLength(); i++) {
- if (children.item(i).getNodeName().endsWith(":section")) {
+ if (children.item(i).getNodeName().endsWith(":section")) { //$NON-NLS-1$
sectionNum++;
if (children.item(i) == sourceElement) {
sectionNumberString.insert(0, Integer
.toString(sectionNum)
- + ".");
+ + "."); //$NON-NLS-1$
break;
}
}
@@ -122,7 +122,7 @@
private int getChapterNumber(Node chapterNode) {
int chapterNumber = 1;
String chapterNumberString = ((Element) chapterNode)
- .getAttribute("number");
+ .getAttribute("number"); //$NON-NLS-1$
if (chapterNumberString != null) {
try {
chapterNumber = Integer.parseInt(chapterNumberString);
@@ -141,7 +141,7 @@
NodeList children = sourceElement.getChildNodes();
for (int i = 0; i < children.getLength(); i++) {
if (children.item(i) instanceof Element) {
- if (children.item(i).getNodeName().endsWith(":title")) {
+ if (children.item(i).getNodeName().endsWith(":title")) { //$NON-NLS-1$
sourceTitleNode = children.item(i);
}
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfTableTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfTableTemplate.java 2009-11-30 12:55:07 UTC (rev 18920)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfTableTemplate.java 2009-11-30 15:32:55 UTC (rev 18921)
@@ -42,7 +42,7 @@
.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
visualTable.setAttribute(HTML.ATTR_WIDTH, getWidthPerc(sourceElement));
visualTable.setAttribute(HTML.ATTR_ALIGN, getAlignment(sourceElement));
- visualTable.setAttribute(HTML.ATTR_CELLSPACING, "0px");
+ visualTable.setAttribute(HTML.ATTR_CELLSPACING, "0px"); //$NON-NLS-1$
return new VpeCreationData(visualElement);
}
@@ -55,7 +55,7 @@
private int getNumberOfColumns(Node sourceTableNode) {
int columnsNumber = 1;
String columnsNumberString = ((Element) sourceTableNode)
- .getAttribute("columns");
+ .getAttribute("columns"); //$NON-NLS-1$
if (columnsNumberString != null) {
try {
columnsNumber = Integer.parseInt(columnsNumberString);
@@ -75,7 +75,7 @@
nsIDOMDocument visualDocument, VpeCreationData data) {
int numberOfColumns = getNumberOfColumns(sourceNode);
Node[] cells = SeamUtil.getChildsByName(pageContext, sourceNode,
- "p:cell");
+ "p:cell"); //$NON-NLS-1$
int cellsLength = cells.length;
if (numberOfColumns > cellsLength) {
for (int i = 0; i < cells.length; i++) {
@@ -145,15 +145,15 @@
try {
int intWidth = Integer.parseInt(width);
if (intWidth < 1 || intWidth > 100) {
- width = "100%";
+ width = "100%"; //$NON-NLS-1$
} else {
- width = Integer.toString(intWidth) + "%";
+ width = Integer.toString(intWidth) + "%"; //$NON-NLS-1$
}
} catch (NumberFormatException e) {
- width = "100%";
+ width = "100%"; //$NON-NLS-1$
}
} else {
- width = "100%";
+ width = "100%"; //$NON-NLS-1$
}
return width;
}
@@ -165,7 +165,7 @@
for (int i = 0; i < SeamUtil.POSSIBLE_ALIGNS.length; i++) {
if (SeamUtil.POSSIBLE_ALIGNS[i].equalsIgnoreCase(align)) {
if (SeamUtil.POSSIBLE_ALIGNS[i]
- .equalsIgnoreCase("justifyall")) {
+ .equalsIgnoreCase("justifyall")) { //$NON-NLS-1$
return HTML.VALUE_ALIGN_JUSTIFY;
}
return align;
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfTextTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfTextTemplate.java 2009-11-30 12:55:07 UTC (rev 18920)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfTextTemplate.java 2009-11-30 15:32:55 UTC (rev 18921)
@@ -48,10 +48,10 @@
public Node getNodeForUpdate(VpePageContext pageContext, Node sourceNode,
nsIDOMNode visualNode, Object data) {
Node[] footers = SeamUtil.getChildsByName(pageContext, sourceNode,
- "p:footer");
+ "p:footer"); //$NON-NLS-1$
if (footers != null && footers.length != 0) {
Node parentPdfDocumentNode = SeamUtil.getParentByName(pageContext,
- sourceNode, "p:document");
+ sourceNode, "p:document"); //$NON-NLS-1$
if (parentPdfDocumentNode != null) {
return parentPdfDocumentNode;
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/util/SeamUtil.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/util/SeamUtil.java 2009-11-30 12:55:07 UTC (rev 18920)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/util/SeamUtil.java 2009-11-30 15:32:55 UTC (rev 18921)
@@ -38,15 +38,15 @@
public static final String ATTR_TEMPLATE = "template"; //$NON-NLS-1$
public static final String ATTR_STYLE_CLASS = "styleClass"; //$NON-NLS-1$
public static final String ATTR_URL = "url"; //$NON-NLS-1$
- public final static String SEAM_ATTR_MARGINS = "margins";
- public final static String[] POSSIBLE_ALIGNS = new String[] { "left",
- "right", "center", "justify", "justifyall" };
- public final static String SEAM_ATTR_ALIGNMENT = "alignment";
- public final static String SEAM_DIV_BASIC_STYLE_VALUE = "line-height: 142.0pt; font-family: unknown;";
- public final static String SEAM_SPAN_BASIC_STYLE_VALUE = "font-family: unknown;";
- public final static String SEAM_ATTR_HORIZONAL_ALIGNMENT = "horizontalAlignment";
- public final static String SEAM_ATTR_VERTICAL_ALIGNMENT = "verticalAlignment";
- public final static String SEAM_ATTR_WIDTH_PERCENTAGE = "widthPercentage";
+ public final static String SEAM_ATTR_MARGINS = "margins"; //$NON-NLS-1$
+ public final static String[] POSSIBLE_ALIGNS = new String[] { "left", //$NON-NLS-1$
+ "right", "center", "justify", "justifyall" }; //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$//$NON-NLS-4$
+ public final static String SEAM_ATTR_ALIGNMENT = "alignment"; //$NON-NLS-1$
+ public final static String SEAM_DIV_BASIC_STYLE_VALUE = "line-height: 142.0pt; font-family: unknown;"; //$NON-NLS-1$
+ public final static String SEAM_SPAN_BASIC_STYLE_VALUE = "font-family: unknown;"; //$NON-NLS-1$
+ public final static String SEAM_ATTR_HORIZONAL_ALIGNMENT = "horizontalAlignment"; //$NON-NLS-1$
+ public final static String SEAM_ATTR_VERTICAL_ALIGNMENT = "verticalAlignment"; //$NON-NLS-1$
+ public final static String SEAM_ATTR_WIDTH_PERCENTAGE = "widthPercentage"; //$NON-NLS-1$
public static Node getParentByName(VpePageContext pageContext,
Node sourceNode, String parentName) {
@@ -87,7 +87,7 @@
for (int i = 0; i < SeamUtil.POSSIBLE_ALIGNS.length; i++) {
if (SeamUtil.POSSIBLE_ALIGNS[i].equalsIgnoreCase(align)) {
if (SeamUtil.POSSIBLE_ALIGNS[i]
- .equalsIgnoreCase("justifyall")) {
+ .equalsIgnoreCase("justifyall")) { //$NON-NLS-1$
visualElement.setAttribute(HTML.ATTR_ALIGN,
HTML.VALUE_ALIGN_JUSTIFY);
return;
@@ -142,7 +142,7 @@
public static String getStyleAttr(Node sourceFontNode) {
if (sourceFontNode == null
- || !sourceFontNode.getNodeName().endsWith(":font")) {
+ || !sourceFontNode.getNodeName().endsWith(":font")) { //$NON-NLS-1$
return null;
}
String styleAttrValue = getFontFamily(sourceFontNode)
@@ -151,38 +151,38 @@
}
private static String parseFontStyleValue(Node sourceFontNode) {
- StringBuffer styleAttrValue = new StringBuffer("");
+ StringBuffer styleAttrValue = new StringBuffer(""); //$NON-NLS-1$
String stringValueToParse = ((Element) sourceFontNode)
.getAttribute(HTML.ATTR_STYLE);
if (stringValueToParse != null) {
- int boldPos = stringValueToParse.indexOf("bold");
+ int boldPos = stringValueToParse.indexOf("bold"); //$NON-NLS-1$
if (boldPos != -1) {
- styleAttrValue.append(" font-weight : bold;");
+ styleAttrValue.append(" font-weight : bold;"); //$NON-NLS-1$
}
- int italicPos = stringValueToParse.indexOf("italic");
+ int italicPos = stringValueToParse.indexOf("italic"); //$NON-NLS-1$
if (italicPos != -1) {
- styleAttrValue.append(" font-style : italic;");
+ styleAttrValue.append(" font-style : italic;"); //$NON-NLS-1$
}
- int underLinePos = stringValueToParse.indexOf("underline");
+ int underLinePos = stringValueToParse.indexOf("underline"); //$NON-NLS-1$
if (underLinePos != -1) {
- styleAttrValue.append(" text-decoration : underline;");
+ styleAttrValue.append(" text-decoration : underline;"); //$NON-NLS-1$
}
- int lineThroughPos = stringValueToParse.indexOf("line-through");
+ int lineThroughPos = stringValueToParse.indexOf("line-through"); //$NON-NLS-1$
if (lineThroughPos != -1) {
- styleAttrValue.append(" text-decoration : line-through;");
+ styleAttrValue.append(" text-decoration : line-through;"); //$NON-NLS-1$
}
}
return styleAttrValue.toString();
}
private static String getFontFamily(Node sourceFontNode) {
- String fontFamily = "unknown";
+ String fontFamily = "unknown"; //$NON-NLS-1$
String stringName = ((Element) sourceFontNode)
.getAttribute(HTML.ATTR_NAME);
if (stringName != null) {
fontFamily = stringName;
}
- return " font-family : " + fontFamily + ";";
+ return " font-family : " + fontFamily + ";"; //$NON-NLS-1$ //$NON-NLS-2$
}
private static String getSize(Node sourceFontNode) {
@@ -192,15 +192,15 @@
try {
int intSize = Integer.parseInt(stringSizeAttr);
if (intSize < 0) {
- return "";
+ return ""; //$NON-NLS-1$
}
} catch (NumberFormatException e) {
- return "";
+ return ""; //$NON-NLS-1$
}
} else {
- return "";
+ return ""; //$NON-NLS-1$
}
- return " font-size : " + stringSizeAttr + "pt;";
+ return " font-size : " + stringSizeAttr + "pt;"; //$NON-NLS-1$ //$NON-NLS-2$
}
public static String getAbsoluteResourcePath(String resourcePathInPlugin) {
15 years, 1 month
JBoss Tools SVN: r18920 - in trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors: actions and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-11-30 07:55:07 -0500 (Mon, 30 Nov 2009)
New Revision: 18920
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/DiagramActionBarContributor.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/DiagramViewer.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ShapeCollapseAction.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ShapeExpandAction.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ShapeHideAction.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ShapeShowAction.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ToggleShapeExpandStateAction.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ToggleShapeVisibleStateAction.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/command/ToggleShapeExpandStateCommand.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/command/ToggleShapeVisibleStateCommand.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5131 - fixed - simplify Show|Hide & Expand|Collapse functionality so the first selected item is a pattern to toggle selected items state
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/DiagramActionBarContributor.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/DiagramActionBarContributor.java 2009-11-30 11:38:06 UTC (rev 18919)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/DiagramActionBarContributor.java 2009-11-30 12:55:07 UTC (rev 18920)
@@ -172,15 +172,15 @@
act[6] = (Action)getAction(ConnectionRouterFanAction.ACTION_ID);
diagramToggleConnectionsAction.setMenuCreator(new ActionMenu(act));
//
- act = new Action[2];
- act[0] = (Action)getAction(ShapeExpandAction.ACTION_ID);
- act[1] = (Action)getAction(ShapeCollapseAction.ACTION_ID);
- diagramToggleExpandStateAction.setMenuCreator(new ActionMenu(act));
+ //act = new Action[2];
+ //act[0] = (Action)getAction(ShapeExpandAction.ACTION_ID);
+ //act[1] = (Action)getAction(ShapeCollapseAction.ACTION_ID);
+ //diagramToggleExpandStateAction.setMenuCreator(new ActionMenu(act));
//
- act = new Action[2];
- act[0] = (Action)getAction(ShapeShowAction.ACTION_ID);
- act[1] = (Action)getAction(ShapeHideAction.ACTION_ID);
- diagramToggleVisibleStateAction.setMenuCreator(new ActionMenu(act));
+ //act = new Action[2];
+ //act[0] = (Action)getAction(ShapeShowAction.ACTION_ID);
+ //act[1] = (Action)getAction(ShapeHideAction.ACTION_ID);
+ //diagramToggleVisibleStateAction.setMenuCreator(new ActionMenu(act));
//
addRetargetAction(new UndoRetargetAction());
addRetargetAction(new RedoRetargetAction());
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/DiagramViewer.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/DiagramViewer.java 2009-11-30 11:38:06 UTC (rev 18919)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/DiagramViewer.java 2009-11-30 12:55:07 UTC (rev 18920)
@@ -310,15 +310,15 @@
act[6] = (Action)registry.getAction(ConnectionRouterFanAction.ACTION_ID);
actionToggleConnections.setMenuCreator(new ActionMenu(act));
- act = new Action[2];
- act[0] = (Action)registry.getAction(ShapeExpandAction.ACTION_ID);
- act[1] = (Action)registry.getAction(ShapeCollapseAction.ACTION_ID);
- actionToggleShapeExpandState.setMenuCreator(new ActionMenu(act));
+ //act = new Action[2];
+ //act[0] = (Action)registry.getAction(ShapeExpandAction.ACTION_ID);
+ //act[1] = (Action)registry.getAction(ShapeCollapseAction.ACTION_ID);
+ //actionToggleShapeExpandState.setMenuCreator(new ActionMenu(act));
- act = new Action[2];
- act[0] = (Action)registry.getAction(ShapeShowAction.ACTION_ID);
- act[1] = (Action)registry.getAction(ShapeHideAction.ACTION_ID);
- actionToggleShapeVisibleState.setMenuCreator(new ActionMenu(act));
+ //act = new Action[2];
+ //act[0] = (Action)registry.getAction(ShapeShowAction.ACTION_ID);
+ //act[1] = (Action)registry.getAction(ShapeHideAction.ACTION_ID);
+ //actionToggleShapeVisibleState.setMenuCreator(new ActionMenu(act));
}
private TransferDropTargetListener createTransferDropTargetListener() {
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ShapeCollapseAction.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ShapeCollapseAction.java 2009-11-30 11:38:06 UTC (rev 18919)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ShapeCollapseAction.java 2009-11-30 12:55:07 UTC (rev 18920)
@@ -79,7 +79,7 @@
}
}
if (selectedShape.size() > 0) {
- cc.add(new ToggleShapeExpandStateCommand(selectedShape));
+ cc.add(new ToggleShapeExpandStateCommand(selectedShape, null));
}
return cc;
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ShapeExpandAction.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ShapeExpandAction.java 2009-11-30 11:38:06 UTC (rev 18919)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ShapeExpandAction.java 2009-11-30 12:55:07 UTC (rev 18920)
@@ -79,7 +79,7 @@
}
}
if (selectedShape.size() > 0) {
- cc.add(new ToggleShapeExpandStateCommand(selectedShape));
+ cc.add(new ToggleShapeExpandStateCommand(selectedShape, null));
}
return cc;
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ShapeHideAction.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ShapeHideAction.java 2009-11-30 11:38:06 UTC (rev 18919)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ShapeHideAction.java 2009-11-30 12:55:07 UTC (rev 18920)
@@ -81,7 +81,7 @@
}
}
if (selectedShape.size() > 0) {
- cc.add(new ToggleShapeVisibleStateCommand(selectedShape));
+ cc.add(new ToggleShapeVisibleStateCommand(selectedShape, null));
}
return cc;
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ShapeShowAction.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ShapeShowAction.java 2009-11-30 11:38:06 UTC (rev 18919)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ShapeShowAction.java 2009-11-30 12:55:07 UTC (rev 18920)
@@ -81,7 +81,7 @@
}
}
if (selectedShape.size() > 0) {
- cc.add(new ToggleShapeVisibleStateCommand(selectedShape));
+ cc.add(new ToggleShapeVisibleStateCommand(selectedShape, null));
}
return cc;
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ToggleShapeExpandStateAction.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ToggleShapeExpandStateAction.java 2009-11-30 11:38:06 UTC (rev 18919)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ToggleShapeExpandStateAction.java 2009-11-30 12:55:07 UTC (rev 18920)
@@ -19,6 +19,7 @@
import org.eclipse.gef.editparts.AbstractTreeEditPart;
import org.eclipse.gef.ui.actions.SelectionAction;
import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.IWorkbenchPart;
import org.jboss.tools.hibernate.ui.diagram.DiagramViewerMessages;
import org.jboss.tools.hibernate.ui.diagram.editors.DiagramViewer;
@@ -76,8 +77,21 @@
selectedShape.add((ExpandableShape)obj);
}
}
+ ExpandableShape primalElement = null;
+ if (getSelection() instanceof IStructuredSelection) {
+ Object firstElement = ((IStructuredSelection)getSelection()).getFirstElement();
+ Object obj = null;
+ if (firstElement instanceof OrmEditPart) {
+ obj = ((OrmEditPart)firstElement).getModel();
+ } else if (firstElement instanceof AbstractTreeEditPart) {
+ obj = ((AbstractTreeEditPart)firstElement).getModel();
+ }
+ if (null != obj && obj instanceof ExpandableShape) {
+ primalElement = (ExpandableShape)obj;
+ }
+ }
if (selectedShape.size() > 0) {
- cc.add(new ToggleShapeExpandStateCommand(selectedShape));
+ cc.add(new ToggleShapeExpandStateCommand(selectedShape, primalElement));
}
return cc;
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ToggleShapeVisibleStateAction.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ToggleShapeVisibleStateAction.java 2009-11-30 11:38:06 UTC (rev 18919)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/actions/ToggleShapeVisibleStateAction.java 2009-11-30 12:55:07 UTC (rev 18920)
@@ -19,6 +19,7 @@
import org.eclipse.gef.editparts.AbstractTreeEditPart;
import org.eclipse.gef.ui.actions.SelectionAction;
import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.IWorkbenchPart;
import org.hibernate.mapping.PersistentClass;
import org.hibernate.mapping.Table;
@@ -78,8 +79,21 @@
selectedShape.add((OrmShape)obj);
}
}
+ OrmShape primalElement = null;
+ if (getSelection() instanceof IStructuredSelection) {
+ Object firstElement = ((IStructuredSelection)getSelection()).getFirstElement();
+ Object obj = null;
+ if (firstElement instanceof OrmEditPart) {
+ obj = ((OrmEditPart)firstElement).getModel();
+ } else if (firstElement instanceof AbstractTreeEditPart) {
+ obj = ((AbstractTreeEditPart)firstElement).getModel();
+ }
+ if (null != obj && obj instanceof OrmShape) {
+ primalElement = (OrmShape)obj;
+ }
+ }
if (selectedShape.size() > 0) {
- cc.add(new ToggleShapeVisibleStateCommand(selectedShape));
+ cc.add(new ToggleShapeVisibleStateCommand(selectedShape, primalElement));
}
return cc;
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/command/ToggleShapeExpandStateCommand.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/command/ToggleShapeExpandStateCommand.java 2009-11-30 11:38:06 UTC (rev 18919)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/command/ToggleShapeExpandStateCommand.java 2009-11-30 12:55:07 UTC (rev 18920)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.hibernate.ui.diagram.editors.command;
+import java.util.ArrayList;
import java.util.List;
import org.eclipse.gef.commands.Command;
@@ -21,21 +22,35 @@
*/
public class ToggleShapeExpandStateCommand extends Command {
+ protected ExpandableShape primalElement;
protected List<ExpandableShape> selectedShape;
+ protected List<Boolean> selectedShapeStates;
- public ToggleShapeExpandStateCommand(List<ExpandableShape> selectedShape) {
+ public ToggleShapeExpandStateCommand(List<ExpandableShape> selectedShape, ExpandableShape primalElement) {
+ this.primalElement = primalElement;
this.selectedShape = selectedShape;
+ selectedShapeStates = new ArrayList<Boolean>();
+ for (ExpandableShape shape : selectedShape) {
+ selectedShapeStates.add(shape.isExpanded());
+ }
}
public void execute() {
+ boolean expState = false;
+ if (primalElement != null) {
+ expState = primalElement.isExpanded();
+ } else if (selectedShape.size() > 0) {
+ expState = selectedShape.get(0).isExpanded();
+ }
for (ExpandableShape shape : selectedShape) {
- shape.setExpanded(!shape.isExpanded());
+ shape.setExpanded(!expState);
}
}
public void undo() {
- for (ExpandableShape shape : selectedShape) {
- shape.setExpanded(!shape.isExpanded());
+ for (int i = 0; i < selectedShape.size(); i++) {
+ ExpandableShape shape = selectedShape.get(i);
+ shape.setExpanded(selectedShapeStates.get(i));
}
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/command/ToggleShapeVisibleStateCommand.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/command/ToggleShapeVisibleStateCommand.java 2009-11-30 11:38:06 UTC (rev 18919)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui/src/org/jboss/tools/hibernate/ui/diagram/editors/command/ToggleShapeVisibleStateCommand.java 2009-11-30 12:55:07 UTC (rev 18920)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.hibernate.ui.diagram.editors.command;
+import java.util.ArrayList;
import java.util.List;
import org.eclipse.gef.commands.Command;
@@ -23,26 +24,40 @@
*/
public class ToggleShapeVisibleStateCommand extends Command {
+ protected OrmShape primalElement;
protected List<OrmShape> selectedShape;
+ protected List<Boolean> selectedShapeStates;
- public ToggleShapeVisibleStateCommand(List<OrmShape> selectedShape) {
+ public ToggleShapeVisibleStateCommand(List<OrmShape> selectedShape, OrmShape primalElement) {
+ this.primalElement = primalElement;
this.selectedShape = selectedShape;
+ selectedShapeStates = new ArrayList<Boolean>();
+ for (OrmShape shape : selectedShape) {
+ selectedShapeStates.add(shape.isVisible());
+ }
}
public void execute() {
+ boolean visState = false;
+ if (primalElement != null) {
+ visState = primalElement.isVisible();
+ } else if (selectedShape.size() > 0) {
+ visState = selectedShape.get(0).isVisible();
+ }
for (OrmShape shape : selectedShape) {
Object ormElement = shape.getOrmElement();
if (ormElement instanceof PersistentClass || ormElement instanceof Table) {
- shape.setVisible(!shape.isVisible());
+ shape.setVisible(!visState);
}
}
}
public void undo() {
- for (OrmShape shape : selectedShape) {
+ for (int i = 0; i < selectedShape.size(); i++) {
+ OrmShape shape = selectedShape.get(i);
Object ormElement = shape.getOrmElement();
if (ormElement instanceof PersistentClass || ormElement instanceof Table) {
- shape.setVisible(!shape.isVisible());
+ shape.setVisible(selectedShapeStates.get(i));
}
}
}
15 years, 1 month
JBoss Tools SVN: r18919 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2009-11-30 06:38:06 -0500 (Mon, 30 Nov 2009)
New Revision: 18919
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamCheckboxEnumItemTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamDecorateTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamMailBodyTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamOptionEnumItemTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfAnchorTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfBarChartTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfCellTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfChapterTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfDocumentTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfFontTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfFooterTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfLineChartTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfListItemTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfListTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfParagraphTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfPieChartTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfSectionTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfTableTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfTextTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfTitleTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamRadioEnumItemTemplate.java
Log:
fixing broken build, remove java6 annatations
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamCheckboxEnumItemTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamCheckboxEnumItemTemplate.java 2009-11-30 07:41:08 UTC (rev 18918)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamCheckboxEnumItemTemplate.java 2009-11-30 11:38:06 UTC (rev 18919)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.tools.jsf.vpe.seam.template;
import org.jboss.tools.jsf.vpe.jsf.template.selectitem.AbstractCheckboxSelectItemTemplate;
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamDecorateTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamDecorateTemplate.java 2009-11-30 07:41:08 UTC (rev 18918)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamDecorateTemplate.java 2009-11-30 11:38:06 UTC (rev 18919)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.tools.jsf.vpe.seam.template;
import org.eclipse.jface.text.IRegion;
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamMailBodyTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamMailBodyTemplate.java 2009-11-30 07:41:08 UTC (rev 18918)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamMailBodyTemplate.java 2009-11-30 11:38:06 UTC (rev 18919)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.tools.jsf.vpe.seam.template;
import org.jboss.tools.vpe.editor.context.VpePageContext;
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamOptionEnumItemTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamOptionEnumItemTemplate.java 2009-11-30 07:41:08 UTC (rev 18918)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamOptionEnumItemTemplate.java 2009-11-30 11:38:06 UTC (rev 18919)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.tools.jsf.vpe.seam.template;
import org.jboss.tools.jsf.vpe.jsf.template.selectitem.AbstractOptionSelectItemTemplate;
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfAnchorTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfAnchorTemplate.java 2009-11-30 07:41:08 UTC (rev 18918)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfAnchorTemplate.java 2009-11-30 11:38:06 UTC (rev 18919)
@@ -26,7 +26,7 @@
private static final String ATTR_REF = "reference";
- @Override
+
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
Element sourceElement = (Element) sourceNode;
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfBarChartTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfBarChartTemplate.java 2009-11-30 07:41:08 UTC (rev 18918)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfBarChartTemplate.java 2009-11-30 11:38:06 UTC (rev 18919)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.tools.jsf.vpe.seam.template;
import org.jboss.tools.jsf.vpe.seam.template.util.SeamUtil;
@@ -14,7 +24,7 @@
private static String BAR_CHART = "/barChart/barChart.png"; //$NON-NLS-1$
private static String BAR_CHART_SERIES_NESTED = "/barChart/barChartSeriesNested.png"; //$NON-NLS-1$
- @Override
+
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
nsIDOMElement visualElement = visualDocument.createElement(HTML.TAG_IMG);
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfCellTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfCellTemplate.java 2009-11-30 07:41:08 UTC (rev 18918)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfCellTemplate.java 2009-11-30 11:38:06 UTC (rev 18919)
@@ -29,7 +29,7 @@
private nsIDOMElement visualElement;
private Element sourceElement;
- @Override
+
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
sourceElement = (Element) sourceNode;
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfChapterTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfChapterTemplate.java 2009-11-30 07:41:08 UTC (rev 18918)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfChapterTemplate.java 2009-11-30 11:38:06 UTC (rev 18919)
@@ -34,7 +34,7 @@
private nsIDOMElement visualElement;
private Element sourceElement;
- @Override
+
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
sourceElement = (Element) sourceNode;
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfDocumentTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfDocumentTemplate.java 2009-11-30 07:41:08 UTC (rev 18918)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfDocumentTemplate.java 2009-11-30 11:38:06 UTC (rev 18919)
@@ -29,7 +29,7 @@
private nsIDOMElement headElement;
private Element sourceElement;
- @Override
+
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
nsIDOMNode headNode = visualDocument.createElement(HTML.TAG_DIV);
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfFontTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfFontTemplate.java 2009-11-30 07:41:08 UTC (rev 18918)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfFontTemplate.java 2009-11-30 11:38:06 UTC (rev 18919)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.tools.jsf.vpe.seam.template;
import org.jboss.tools.jsf.vpe.seam.template.util.SeamUtil;
@@ -11,7 +21,7 @@
public class SeamPdfFontTemplate extends SeamPdfAbstractTemplate {
- @Override
+
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
nsIDOMNode visualNode = visualDocument.createElement(HTML.TAG_SPAN);
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfFooterTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfFooterTemplate.java 2009-11-30 07:41:08 UTC (rev 18918)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfFooterTemplate.java 2009-11-30 11:38:06 UTC (rev 18919)
@@ -29,7 +29,7 @@
private nsIDOMElement visualElement;
private Element sourceElement;
- @Override
+
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
sourceElement = (Element) sourceNode;
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfLineChartTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfLineChartTemplate.java 2009-11-30 07:41:08 UTC (rev 18918)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfLineChartTemplate.java 2009-11-30 11:38:06 UTC (rev 18919)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.tools.jsf.vpe.seam.template;
import org.jboss.tools.jsf.vpe.seam.template.util.SeamUtil;
@@ -14,7 +24,7 @@
private static String LINE_CHART = "/lineChart/lineChart.png"; //$NON-NLS-1$
private static String LINE_CHART_SERIES_NESTED = "/lineChart/lineChartSeriesNested.png"; //$NON-NLS-1$
- @Override
+
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
nsIDOMElement visualElement = visualDocument
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfListItemTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfListItemTemplate.java 2009-11-30 07:41:08 UTC (rev 18918)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfListItemTemplate.java 2009-11-30 11:38:06 UTC (rev 18919)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.tools.jsf.vpe.seam.template;
import org.jboss.tools.vpe.editor.context.VpePageContext;
@@ -9,7 +19,7 @@
public class SeamPdfListItemTemplate extends SeamPdfAbstractTemplate {
- @Override
+
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
nsIDOMNode visualNode = visualDocument.createElement(HTML.TAG_LI);
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfListTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfListTemplate.java 2009-11-30 07:41:08 UTC (rev 18918)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfListTemplate.java 2009-11-30 11:38:06 UTC (rev 18919)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.tools.jsf.vpe.seam.template;
import java.util.ArrayList;
@@ -21,7 +31,7 @@
NUMBERED_VALUES.add("zapfdingbats_number");
}
- @Override
+
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
String styleAttr = ((Element)sourceNode).getAttribute(HTML.ATTR_STYLE);
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfParagraphTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfParagraphTemplate.java 2009-11-30 07:41:08 UTC (rev 18918)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfParagraphTemplate.java 2009-11-30 11:38:06 UTC (rev 18919)
@@ -30,7 +30,7 @@
private Element sourceElement;
private nsIDOMDocument visualDocument;
- @Override
+
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
this.visualDocument = visualDocument;
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfPieChartTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfPieChartTemplate.java 2009-11-30 07:41:08 UTC (rev 18918)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfPieChartTemplate.java 2009-11-30 11:38:06 UTC (rev 18919)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.tools.jsf.vpe.seam.template;
import org.jboss.tools.jsf.vpe.seam.template.util.SeamUtil;
@@ -14,7 +24,7 @@
private static String PIE_CHART = "/pieChart/pieChart.png"; //$NON-NLS-1$
private static String PIE_CHART_SERIES_NESTED = "/pieChart/pieChartSeriesNested.png"; //$NON-NLS-1$
- @Override
+
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
nsIDOMElement visualElement = visualDocument
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfSectionTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfSectionTemplate.java 2009-11-30 07:41:08 UTC (rev 18918)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfSectionTemplate.java 2009-11-30 11:38:06 UTC (rev 18919)
@@ -37,7 +37,7 @@
private String sectionNumberString;
private String headNameString;
- @Override
+
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
visualElement = VisualDomUtil.createBorderlessContainer(visualDocument);
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfTableTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfTableTemplate.java 2009-11-30 07:41:08 UTC (rev 18918)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfTableTemplate.java 2009-11-30 11:38:06 UTC (rev 18919)
@@ -29,7 +29,7 @@
private nsIDOMElement visualElement;
private Element sourceElement;
- @Override
+
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
sourceElement = (Element) sourceNode;
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfTextTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfTextTemplate.java 2009-11-30 07:41:08 UTC (rev 18918)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfTextTemplate.java 2009-11-30 11:38:06 UTC (rev 18919)
@@ -27,7 +27,7 @@
public class SeamPdfTextTemplate extends AbstractOutputJsfTemplate {
- @Override
+
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
Element element = (Element) sourceNode;
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfTitleTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfTitleTemplate.java 2009-11-30 07:41:08 UTC (rev 18918)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamPdfTitleTemplate.java 2009-11-30 11:38:06 UTC (rev 18919)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.tools.jsf.vpe.seam.template;
import org.jboss.tools.vpe.editor.context.VpePageContext;
@@ -9,7 +19,7 @@
public class SeamPdfTitleTemplate extends SeamPdfAbstractTemplate {
- @Override
+
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
nsIDOMNode visualNode = VisualDomUtil.createBorderlessContainer(visualDocument);
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamRadioEnumItemTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamRadioEnumItemTemplate.java 2009-11-30 07:41:08 UTC (rev 18918)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamRadioEnumItemTemplate.java 2009-11-30 11:38:06 UTC (rev 18919)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.tools.jsf.vpe.seam.template;
import org.jboss.tools.jsf.vpe.jsf.template.selectitem.AbstractRadioSelectItemTemplate;
15 years, 1 month
JBoss Tools SVN: r18918 - in trunk/smooks/plugins: org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2009-11-30 02:41:08 -0500 (Mon, 30 Nov 2009)
New Revision: 18918
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/util/SmooksModelUtils.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksReaderFormPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/EDIDataParser.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/SelectorValidator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/AbstractSmooksFormEditor.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksGraphicalEditorPart.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksJavaMappingGraphicalEditor.java
Log:
JBIDE-5298
Done
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/util/SmooksModelUtils.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/util/SmooksModelUtils.java 2009-11-30 02:32:04 UTC (rev 18917)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/util/SmooksModelUtils.java 2009-11-30 07:41:08 UTC (rev 18918)
@@ -96,7 +96,7 @@
public static final String INPUT_TYPE_EDI_1_2 = SmooksInputType.INPUT_TYPE_EDI;
- public static final String INPUT_TYPE_JSON_1_2 = SmooksInputType.INPUT_TYPE_EDI;
+ public static final String INPUT_TYPE_JSON_1_2 = SmooksInputType.INPUT_TYPE_JSON;
public static EStructuralFeature ATTRIBUTE_PROPERTY = ExtendedMetaData.INSTANCE.demandFeature(null, "property",
false);
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksReaderFormPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksReaderFormPage.java 2009-11-30 02:32:04 UTC (rev 18917)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksReaderFormPage.java 2009-11-30 07:41:08 UTC (rev 18918)
@@ -197,7 +197,8 @@
mainContainer.setLayout(gl);
section.setClient(mainContainer);
- Hyperlink refreshLink = toolkit.createHyperlink(mainContainer, Messages.SmooksReaderFormPage_RefreshLinkLabel, SWT.NONE);
+ Hyperlink refreshLink = toolkit.createHyperlink(mainContainer, Messages.SmooksReaderFormPage_RefreshLinkLabel,
+ SWT.NONE);
refreshLink.addHyperlinkListener(new IHyperlinkListener() {
public void linkExited(HyperlinkEvent e) {
@@ -691,10 +692,14 @@
resourceList, IEditingDomainItemProvider.class);
Collection<?> collections = provider.getNewChildDescriptors(resourceList, editDomain, null);
+ String customReaderText = null;
+ Object customReaderInstance = null;
+
ISmooksModelProvider modelProvider = getSmooksModelProvider();
if (modelProvider != null) {
String version = modelProvider.getPlatformVersion();
OnlyReaderViewerFilter filter = new OnlyReaderViewerFilter();
+ // move the custom reader to the end of the reader type list.
for (Iterator<?> iterator = collections.iterator(); iterator.hasNext();) {
Object object = (Object) iterator.next();
if (object instanceof CommandParameter) {
@@ -710,12 +715,23 @@
IItemLabelProvider lp = (IItemLabelProvider) editDomain.getAdapterFactory().adapt(value,
IItemLabelProvider.class);
String text = lp.getText(value);
+
+ if (ReaderType.class.isInstance(value)) {
+ customReaderText = text;
+ customReaderInstance = value;
+ continue;
+ }
readerCombo.add(text);
readerTypeList.add(value);
}
}
}
}
+ if (customReaderInstance != null && customReaderText != null) {
+ readerCombo.add(customReaderText);
+ readerTypeList.add(customReaderInstance);
+ }
+
}
private void setInputDataActiveStatus(boolean active, InputType inputType, final CompoundCommand command) {
@@ -904,7 +920,8 @@
JavaUI.openInEditor(result);
else {
MessageDialog.openError(getSite().getWorkbenchWindow().getShell(),
- Messages.SmooksReaderFormPage_CantFindTypeErrorTitle, "Can't find type \"" + filePath + "\" in \"" //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
+ Messages.SmooksReaderFormPage_CantFindTypeErrorTitle,
+ "Can't find type \"" + filePath + "\" in \"" //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
+ javaProject.getProject().getName() + "\" project."); //$NON-NLS-1$
}
} catch (Exception e) {
@@ -923,7 +940,8 @@
try {
IDE.openEditorOnFileStore(page, fileStore);
} catch (PartInitException e) {
- MessageDialog.open(MessageDialog.ERROR, window.getShell(), Messages.SmooksReaderFormPage_OpenFileErrorTitle,
+ MessageDialog.open(MessageDialog.ERROR, window.getShell(),
+ Messages.SmooksReaderFormPage_OpenFileErrorTitle,
"Can't open the file : '" + filePath + "'", SWT.SHEET); //$NON-NLS-1$ //$NON-NLS-2$
}
} else {
@@ -931,7 +949,8 @@
}
} catch (Exception e) {
MessageDialog.open(MessageDialog.ERROR, getSite().getWorkbenchWindow().getShell(),
- Messages.SmooksReaderFormPage_OpenFileErrorTitle, "Can't open the file : '" + filePath + "'", SWT.SHEET); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
+ Messages.SmooksReaderFormPage_OpenFileErrorTitle,
+ "Can't open the file : '" + filePath + "'", SWT.SHEET); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
}
}
}
@@ -963,7 +982,8 @@
GridLayout l = new GridLayout();
buttonComposite.setLayout(l);
- addInputDataButton = toolkit.createButton(buttonComposite, Messages.SmooksReaderFormPage_AddButtonLabel, SWT.FLAT);
+ addInputDataButton = toolkit.createButton(buttonComposite, Messages.SmooksReaderFormPage_AddButtonLabel,
+ SWT.FLAT);
gd = new GridData(GridData.FILL_HORIZONTAL);
addInputDataButton.setLayoutData(gd);
addInputDataButton.addSelectionListener(new SelectionAdapter() {
@@ -974,7 +994,8 @@
});
- removeInputDataButton = toolkit.createButton(buttonComposite, Messages.SmooksReaderFormPage_DeleteButtonLabel, SWT.FLAT);
+ removeInputDataButton = toolkit.createButton(buttonComposite, Messages.SmooksReaderFormPage_DeleteButtonLabel,
+ SWT.FLAT);
gd = new GridData(GridData.FILL_HORIZONTAL);
removeInputDataButton.setLayoutData(gd);
removeInputDataButton.addSelectionListener(new SelectionAdapter() {
@@ -1075,7 +1096,11 @@
private void refreshInputModelView() {
if (inputModelViewer != null) {
List<Object> input = generateInputData();
- inputModelViewer.setInput(input);
+ try {
+ inputModelViewer.setInput(input);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
SmooksUIUtils.expandSelectorViewer(input, inputModelViewer);
}
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/EDIDataParser.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/EDIDataParser.java 2009-11-30 02:32:04 UTC (rev 18917)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/EDIDataParser.java 2009-11-30 07:41:08 UTC (rev 18918)
@@ -87,8 +87,8 @@
return null;
}
- public TagList parseEDIFile(InputStream stream,SmooksResourceListType resourceList)
- throws IOException, DocumentException {
+ public TagList parseEDIFile(InputStream stream, SmooksResourceListType resourceList) throws IOException,
+ DocumentException {
// String encoding = null;
// String mappingModel = null;
// String validate = null;
@@ -227,9 +227,9 @@
// FileInputStream stream
StringResult result = new StringResult();
smooks.filterSource(new StreamSource(ediInputStream), result);
-
+ String resultXMLContent = result.getResult();
XMLObjectAnalyzer analyzer = new XMLObjectAnalyzer();
- ByteArrayInputStream byteinputStream = new ByteArrayInputStream(result.getResult().getBytes());
+ ByteArrayInputStream byteinputStream = new ByteArrayInputStream(resultXMLContent.getBytes());
TagList tagList = analyzer.analyze(byteinputStream, null);
try {
@@ -253,7 +253,7 @@
return tagList;
}
- public TagList parseEDIFile(String path,SmooksResourceListType smooksResourceListType)
+ public TagList parseEDIFile(String path, SmooksResourceListType smooksResourceListType)
throws InvocationTargetException, FileNotFoundException, IOException, DocumentException {
String filePath = SmooksUIUtils.parseFilePath(path);
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java 2009-11-30 02:32:04 UTC (rev 18917)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java 2009-11-30 07:41:08 UTC (rev 18918)
@@ -866,7 +866,8 @@
toolkit.paintBordersFor(textContainer);
if (openFile) {
final IFilePathProcessor processor = filePathProcessor;
- Button fileBrowseButton = toolkit.createButton(textContainer, Messages.SmooksUIUtils_BrowseButtonLabel, SWT.NONE);
+ Button fileBrowseButton = toolkit.createButton(textContainer, Messages.SmooksUIUtils_BrowseButtonLabel,
+ SWT.NONE);
fileBrowseButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
@@ -1193,7 +1194,8 @@
notificationComposite.setLayoutData(gd);
editpart.setFieldMarker(notificationComposite);
- final SearchComposite searchComposite = new SearchComposite(tcom, toolkit, Messages.SmooksUIUtils_BrowseButtonLabel, dialog, SWT.NONE);
+ final SearchComposite searchComposite = new SearchComposite(tcom, toolkit,
+ Messages.SmooksUIUtils_BrowseButtonLabel, dialog, SWT.NONE);
gd = new GridData(GridData.FILL_HORIZONTAL);
searchComposite.setLayoutData(gd);
Object editValue = getEditValue(propertyDescriptor, model);
@@ -1239,7 +1241,8 @@
if (result != null)
JavaUI.openInEditor(result);
else {
- MessageDialog.openError(classTextComposite.getShell(), Messages.SmooksUIUtils_CantFindTypeErrorDialogTitle,
+ MessageDialog.openError(classTextComposite.getShell(),
+ Messages.SmooksUIUtils_CantFindTypeErrorDialogTitle,
"Can't find type \"" + typeName + "\" in \"" //$NON-NLS-1$ //$NON-NLS-2$
+ javaProject.getProject().getName() + "\" project."); //$NON-NLS-1$
}
@@ -1858,11 +1861,10 @@
}
return null;
}
-
- public static boolean isInputParamType(ParamType param){
+
+ public static boolean isInputParamType(ParamType param) {
String type = param.getType();
- if (SmooksModelUtils.INPUT_ACTIVE_TYPE.equals(type)
- || SmooksModelUtils.INPUT_DEACTIVE_TYPE.equals(type)) {
+ if (SmooksModelUtils.INPUT_ACTIVE_TYPE.equals(type) || SmooksModelUtils.INPUT_DEACTIVE_TYPE.equals(type)) {
return true;
}
return false;
@@ -2648,7 +2650,13 @@
List<TreeNodeModel> parentList = new ArrayList<TreeNodeModel>();
boolean canExpand = true;
while (parent != rootEditPart.getModel()) {
- parent = (TreeNodeModel) parent.getParent();
+ Object pa = parent.getParent();
+ if (pa instanceof TreeNodeModel) {
+ parent = (TreeNodeModel) pa;
+ } else {
+ canExpand = false;
+ break;
+ }
if (parent == null) {
canExpand = false;
break;
@@ -3011,18 +3019,18 @@
}
return SmooksConstants.VERSION_1_2;
}
-
- public static void addInputTypeParam(String inputType, SmooksResourceListType resourceList){
+
+ public static void addInputTypeParam(String inputType, SmooksResourceListType resourceList) {
ParamsType params = resourceList.getParams();
- if(params == null){
+ if (params == null) {
params = SmooksFactory.eINSTANCE.createParamsType();
resourceList.setParams(params);
}
-
+
ParamType param = SmooksFactory.eINSTANCE.createParamType();
param.setName(SmooksModelUtils.INPUT_TYPE);
param.setStringValue(inputType);
-
+
params.getParam().add(param);
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/SelectorValidator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/SelectorValidator.java 2009-11-30 02:32:04 UTC (rev 18917)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/SelectorValidator.java 2009-11-30 07:41:08 UTC (rev 18918)
@@ -17,6 +17,9 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.content.IContentDescription;
+import org.eclipse.core.runtime.content.IContentType;
import org.eclipse.emf.common.util.Diagnostic;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EObject;
@@ -24,15 +27,12 @@
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.part.FileEditorInput;
import org.jboss.tools.smooks.configuration.SmooksConfigurationActivator;
import org.jboss.tools.smooks.configuration.editors.IXMLStructuredObject;
import org.jboss.tools.smooks.configuration.editors.SelectorCreationDialog;
import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
-import org.jboss.tools.smooks.editor.AbstractSmooksFormEditor;
import org.jboss.tools.smooks.model.javabean.BindingsType;
import org.jboss.tools.smooks.model.javabean.ExpressionType;
import org.jboss.tools.smooks.model.javabean.ValueType;
@@ -92,7 +92,7 @@
sperator = " ";
}
if (feature != null && path != null) {
- if("#document".equals(path)){
+ if ("#document".equals(path)) {
return null;
}
Object node = null;
@@ -114,8 +114,10 @@
}
if (node == null && feature instanceof EAttribute) {
if (model instanceof BeanType || model instanceof BindingsType || model instanceof ValueType
- || model instanceof org.jboss.tools.smooks.model.javabean12.ValueType || model instanceof WiringType
- || model instanceof org.jboss.tools.smooks.model.javabean12.WiringType || model instanceof ExpressionType
+ || model instanceof org.jboss.tools.smooks.model.javabean12.ValueType
+ || model instanceof WiringType
+ || model instanceof org.jboss.tools.smooks.model.javabean12.WiringType
+ || model instanceof ExpressionType
|| model instanceof org.jboss.tools.smooks.model.javabean12.ExpressionType) {
return newWaringDiagnostic("Can't find the input source node : '" + path + "'", model,
(EAttribute) feature);
@@ -148,7 +150,26 @@
}
if (file == null)
return;
- final FileEditorInput input = new FileEditorInput(file);
+ IContentType contentType = null;
+ try {
+ IContentDescription contentDescription = file.getContentDescription();
+ if (contentDescription != null) {
+ contentType = contentDescription.getContentType();
+ }
+
+ } catch (Throwable t) {
+
+ }
+ IContentType smooksContentType = Platform.getContentTypeManager().getContentType(
+ "org.jboss.tools.smooks.ui.smooks.contentType");
+ IContentType ediMappingContentType = Platform.getContentTypeManager().getContentType(
+ "org.jboss.tools.smooks.ui.edimap.contentType");
+
+ if (!(smooksContentType.equals(contentType) || ediMappingContentType.equals(contentType))) {
+ return;
+ }
+
+ // final FileEditorInput input = new FileEditorInput(file);
final SmooksResourceListType finalList = listType;
Display dis = SmooksConfigurationActivator.getDefault().getWorkbench().getDisplay();
if (dis != null && !dis.isDisposed()) {
@@ -165,13 +186,15 @@
IWorkbenchPage activePage = window.getActivePage();
if (activePage != null) {
try {
- IEditorPart part = activePage.findEditor(input);
- if (part != null && part instanceof AbstractSmooksFormEditor) {
- List<Object> l = SelectorCreationDialog.generateInputData(finalList);
- if (l != null) {
- list.addAll(l);
- }
+ // IEditorPart part =
+ // activePage.findEditor(input);
+ // if (part != null && part instanceof
+ // AbstractSmooksFormEditor) {
+ List<Object> l = SelectorCreationDialog.generateInputData(finalList);
+ if (l != null) {
+ list.addAll(l);
}
+ // }
} catch (Throwable t) {
t.printStackTrace();
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/AbstractSmooksFormEditor.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/AbstractSmooksFormEditor.java 2009-11-30 02:32:04 UTC (rev 18917)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/AbstractSmooksFormEditor.java 2009-11-30 07:41:08 UTC (rev 18918)
@@ -683,7 +683,9 @@
}
} else {
inputType = SmooksUIUtils.judgeInputType(smooksModel);
- SmooksUIUtils.addInputTypeParam(inputType, resourceList);
+ if (inputType != null) {
+ SmooksUIUtils.addInputTypeParam(inputType, resourceList);
+ }
}
this.setInputType(inputType);
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksGraphicalEditorPart.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksGraphicalEditorPart.java 2009-11-30 02:32:04 UTC (rev 18917)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksGraphicalEditorPart.java 2009-11-30 07:41:08 UTC (rev 18918)
@@ -104,6 +104,12 @@
import org.jboss.tools.smooks.graphical.editors.model.xsl.XSLNodeGraphicalModel;
import org.jboss.tools.smooks.graphical.editors.model.xsl.XSLTemplateGraphicalModel;
import org.jboss.tools.smooks.graphical.editors.process.TaskType;
+import org.jboss.tools.smooks.model.javabean.BindingsType;
+import org.jboss.tools.smooks.model.javabean.JavabeanPackage;
+import org.jboss.tools.smooks.model.javabean.ValueType;
+import org.jboss.tools.smooks.model.javabean.WiringType;
+import org.jboss.tools.smooks.model.javabean12.BeanType;
+import org.jboss.tools.smooks.model.javabean12.Javabean12Package;
import org.jboss.tools.smooks.model.smooks.DocumentRoot;
import org.jboss.tools.smooks.model.smooks.ParamType;
import org.jboss.tools.smooks.model.smooks.ParamsType;
@@ -762,6 +768,9 @@
expandConnectedModels(connections);
this.autoLayout(false);
+
+ List<Diagnostic> diagnosticList = this.getSmooksModelProvider().getDiagnosticList();
+ this.validateEnd(diagnosticList);
}
protected AbstractSmooksGraphicalModel createGraphModel(Object model) {
@@ -1353,6 +1362,45 @@
}
protected String getDiagnosticMessage(Diagnostic diagnostic){
+ List<?> datas = diagnostic.getData();
+ if (datas.size() == 2) {
+ Object parentObj = datas.get(0);
+
+ if (parentObj instanceof BeanType || parentObj instanceof BindingsType) {
+ Object obj = datas.get(1);
+ if (obj == JavabeanPackage.Literals.BINDINGS_TYPE__BEAN_ID
+ || obj == Javabean12Package.Literals.BEAN_TYPE__BEAN_ID) {
+ String message = diagnostic.getMessage();
+ if (message != null && message.startsWith("The required feature")) { //$NON-NLS-1$
+ return Messages.SmooksJavaMappingGraphicalEditor_BeanIdEmptyErrormessage;
+ }
+ }
+ }
+
+ if (parentObj instanceof ValueType
+ || parentObj instanceof org.jboss.tools.smooks.model.javabean12.ValueType) {
+ Object obj = datas.get(1);
+ if (obj == JavabeanPackage.Literals.VALUE_TYPE__DATA
+ || obj == Javabean12Package.Literals.VALUE_TYPE__DATA) {
+ String message = diagnostic.getMessage();
+ if (message != null && message.startsWith("The required feature")) { //$NON-NLS-1$
+ return Messages.SmooksJavaMappingGraphicalEditor_NodeMustLinkWithSource;
+ }
+ }
+ }
+
+ if (parentObj instanceof WiringType
+ || parentObj instanceof org.jboss.tools.smooks.model.javabean12.WiringType) {
+ Object obj = datas.get(1);
+ if (obj == JavabeanPackage.Literals.WIRING_TYPE__BEAN_ID_REF
+ || obj == Javabean12Package.Literals.WIRING_TYPE__BEAN_ID_REF) {
+ String message = diagnostic.getMessage();
+ if (message != null && message.startsWith("The required feature")) { //$NON-NLS-1$
+ return Messages.SmooksJavaMappingGraphicalEditor_NodeMustLinkWithJavaBean;
+ }
+ }
+ }
+ }
return diagnostic.getMessage();
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksJavaMappingGraphicalEditor.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksJavaMappingGraphicalEditor.java 2009-11-30 02:32:04 UTC (rev 18917)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksJavaMappingGraphicalEditor.java 2009-11-30 07:41:08 UTC (rev 18918)
@@ -55,45 +55,6 @@
*/
@Override
protected String getDiagnosticMessage(Diagnostic diagnostic) {
- List<?> datas = diagnostic.getData();
- if (datas.size() == 2) {
- Object parentObj = datas.get(0);
-
- if (parentObj instanceof BeanType || parentObj instanceof BindingsType) {
- Object obj = datas.get(1);
- if (obj == JavabeanPackage.Literals.BINDINGS_TYPE__BEAN_ID
- || obj == Javabean12Package.Literals.BEAN_TYPE__BEAN_ID) {
- String message = diagnostic.getMessage();
- if (message != null && message.startsWith("The required feature")) { //$NON-NLS-1$
- return Messages.SmooksJavaMappingGraphicalEditor_BeanIdEmptyErrormessage;
- }
- }
- }
-
- if (parentObj instanceof ValueType
- || parentObj instanceof org.jboss.tools.smooks.model.javabean12.ValueType) {
- Object obj = datas.get(1);
- if (obj == JavabeanPackage.Literals.VALUE_TYPE__DATA
- || obj == Javabean12Package.Literals.VALUE_TYPE__DATA) {
- String message = diagnostic.getMessage();
- if (message != null && message.startsWith("The required feature")) { //$NON-NLS-1$
- return Messages.SmooksJavaMappingGraphicalEditor_NodeMustLinkWithSource;
- }
- }
- }
-
- if (parentObj instanceof WiringType
- || parentObj instanceof org.jboss.tools.smooks.model.javabean12.WiringType) {
- Object obj = datas.get(1);
- if (obj == JavabeanPackage.Literals.WIRING_TYPE__BEAN_ID_REF
- || obj == Javabean12Package.Literals.WIRING_TYPE__BEAN_ID_REF) {
- String message = diagnostic.getMessage();
- if (message != null && message.startsWith("The required feature")) { //$NON-NLS-1$
- return Messages.SmooksJavaMappingGraphicalEditor_NodeMustLinkWithJavaBean;
- }
- }
- }
- }
return super.getDiagnosticMessage(diagnostic);
}
15 years, 1 month
JBoss Tools SVN: r18917 - trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2009-11-29 21:32:04 -0500 (Sun, 29 Nov 2009)
New Revision: 18917
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/messages.properties
Log:
JBIDE-5256
Change Task configuration section title text
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/messages.properties
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/messages.properties 2009-11-29 17:03:03 UTC (rev 18916)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/messages.properties 2009-11-30 02:32:04 UTC (rev 18917)
@@ -4,7 +4,7 @@
SmooksJavaMappingGraphicalEditor_NullLabel=<NULL>
SmooksProcessGraphicalEditor_AddTaskActionText=Add Task
SmooksProcessGraphicalEditor_FormText=Smooks Processing
-SmooksProcessGraphicalEditor_TaskConfigurationSectionTitle=Task Configuration
+SmooksProcessGraphicalEditor_TaskConfigurationSectionTitle=Task Properties
SmooksProcessGraphicalEditor_TasksMapSectionTitle=Tasks Map
TaskTypeManager_ApplyTemplateTaskLabel=Apply Template
TaskTypeManager_ApplyXSLTemplateTaskLabel=Apply XSL Template
15 years, 1 month
JBoss Tools SVN: r18916 - trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2009-11-29 12:03:03 -0500 (Sun, 29 Nov 2009)
New Revision: 18916
Modified:
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/LinkHyperlink.java
Log:
JBIDE-5002: OpenOn doesn't work for html tags <link href="|"/> and <a href="|" /> inside <f:view>
Modified: trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/LinkHyperlink.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/LinkHyperlink.java 2009-11-29 13:40:21 UTC (rev 18915)
+++ trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/LinkHyperlink.java 2009-11-29 17:03:03 UTC (rev 18916)
@@ -10,6 +10,8 @@
******************************************************************************/
package org.jboss.tools.common.text.ext.hyperlink;
+import java.net.MalformedURLException;
+import java.net.URL;
import java.text.MessageFormat;
import org.eclipse.core.resources.IFile;
@@ -18,6 +20,10 @@
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IRegion;
import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.browser.IWebBrowser;
+import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
import org.eclipse.ui.ide.IDE;
import org.jboss.tools.common.text.ext.ExtensionsPlugin;
import org.jboss.tools.common.text.ext.hyperlink.xpl.Messages;
@@ -38,19 +44,29 @@
*/
protected void doHyperlink(IRegion region) {
- try {
String fileName = getFilePath(region);
IFile fileToOpen = getFileFromProject(fileName);
if (fileToOpen != null && fileToOpen.exists()) {
IWorkbenchPage workbenchPage = ExtensionsPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage();
- IDE.openEditor(workbenchPage,fileToOpen,true);
- } else {
+ try {
+ IDE.openEditor(workbenchPage,fileToOpen,true);
+ } catch (CoreException x) {
+ // could not open editor
+ openFileFailed();
+ }
+ return;
+ }
+ try {
+ URL url = new URL(fileName);
+ IWorkbenchBrowserSupport browserSupport = PlatformUI.getWorkbench().getBrowserSupport();
+ IWebBrowser browser = browserSupport.createBrowser(IWorkbenchBrowserSupport.LOCATION_BAR | IWorkbenchBrowserSupport.NAVIGATION_BAR, null, null, null);
+ browser.openURL(url);
+
+ } catch (MalformedURLException e) {
openFileFailed();
+ } catch (PartInitException e) {
+ openFileFailed();
}
- } catch (CoreException x) {
- // could not open editor
- openFileFailed();
- }
}
protected String getFilePath(IRegion region) {
15 years, 1 month
JBoss Tools SVN: r18915 - trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2009-11-29 08:40:21 -0500 (Sun, 29 Nov 2009)
New Revision: 18915
Modified:
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/HyperlinkPartitionerDefinition.java
Log:
JBIDE-5002: OpenOn doesn't work for html tags <link href="|"/> and <a href="|" /> inside <f:view>
Modified: trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/HyperlinkPartitionerDefinition.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/HyperlinkPartitionerDefinition.java 2009-11-29 13:31:29 UTC (rev 18914)
+++ trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/HyperlinkPartitionerDefinition.java 2009-11-29 13:40:21 UTC (rev 18915)
@@ -389,7 +389,7 @@
}
if(fEndDelim || path.endsWith(fDelimitedPathElements[fDelimitedPathElements.length-1])) {
int lastTaglib = path.lastIndexOf(TAGLIB);
- if(lastTaglib <= tagLib)
+ if(tagLib == -1 || lastTaglib <= tagLib)
return true;
}
return false;
15 years, 1 month