JBoss Tools SVN: r34311 - trunk/maven/tests/org.jboss.tools.maven.ui.bot.test.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-08-25 11:03:52 -0400 (Thu, 25 Aug 2011)
New Revision: 34311
Added:
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/.gitignore
Log:
.gitignore file
Added: trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/.gitignore
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/.gitignore (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/.gitignore 2011-08-25 15:03:52 UTC (rev 34311)
@@ -0,0 +1 @@
+screenshots
14 years, 4 months
JBoss Tools SVN: r34310 - trunk/build/aggregate/site.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-08-25 11:03:39 -0400 (Thu, 25 Aug 2011)
New Revision: 34310
Modified:
trunk/build/aggregate/site/aggregateSite.jbosstools.properties
trunk/build/aggregate/site/index-template.html
trunk/build/aggregate/site/index.html
Log:
add Google Plugin for Eclipse 3.7 site to assoc and index* files
Modified: trunk/build/aggregate/site/aggregateSite.jbosstools.properties
===================================================================
--- trunk/build/aggregate/site/aggregateSite.jbosstools.properties 2011-08-25 13:18:41 UTC (rev 34309)
+++ trunk/build/aggregate/site/aggregateSite.jbosstools.properties 2011-08-25 15:03:39 UTC (rev 34310)
@@ -4,4 +4,4 @@
#update.site.version=3.2.0.M2.2010-07-16_13-26-18-H21
# associate sites to add to the resulting repo
-associate.sites=http://download.jboss.org/jbosstools/updates/indigo/SR0/
+associate.sites=http://download.jboss.org/jbosstools/updates/indigo/SR0/,http://dl.google.com/eclipse/plugin/3.7/
Modified: trunk/build/aggregate/site/index-template.html
===================================================================
--- trunk/build/aggregate/site/index-template.html 2011-08-25 13:18:41 UTC (rev 34309)
+++ trunk/build/aggregate/site/index-template.html 2011-08-25 15:03:39 UTC (rev 34310)
@@ -42,6 +42,7 @@
<ul>
<li><a href="http://download.jboss.org/jbosstools/updates/indigo/SR0">JBoss Tools Requirements - Composite Mirror - Indigo SR0</a></li>
+ <li><a href="http://dl.google.com/eclipse/plugin/3.7/">Google Plugin for Eclipse 3.7 (Indigo)</a></li>
</ul>
</td>
</tr>
Modified: trunk/build/aggregate/site/index.html
===================================================================
--- trunk/build/aggregate/site/index.html 2011-08-25 13:18:41 UTC (rev 34309)
+++ trunk/build/aggregate/site/index.html 2011-08-25 15:03:39 UTC (rev 34310)
@@ -41,7 +41,8 @@
</p>
<ul>
- <li><a href="http://download.jboss.org/jbosstools/updates/indigo/SR0">JBoss Tools Requirements - Composite Mirror - Indigo SR0</a></li>
+ <li><a href="http://download.jboss.org/jbosstools/updates/indigo/SR0/">JBoss Tools Requirements - Composite Mirror - Indigo SR0</a></li>
+ <li><a href="http://dl.google.com/eclipse/plugin/3.7/">Google Plugin for Eclipse 3.7 (Indigo)</a></li>
</ul>
</td>
</tr>
14 years, 4 months
JBoss Tools SVN: r34309 - in trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template: util and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2011-08-25 09:18:41 -0400 (Thu, 25 Aug 2011)
New Revision: 34309
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesCollapsibleSubTableTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableChildrenEncoder.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSubTableTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/util/RichFaces.java
Log:
https://issues.jboss.org/browse/JBIDE-8950 , collapsibleSubTable template was recreated, header and footer were added, helper classes were used.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesCollapsibleSubTableTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesCollapsibleSubTableTemplate.java 2011-08-25 11:35:14 UTC (rev 34308)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesCollapsibleSubTableTemplate.java 2011-08-25 13:18:41 UTC (rev 34309)
@@ -12,30 +12,112 @@
import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.editor.util.VisualDomUtil;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
-public class RichFacesCollapsibleSubTableTemplate extends RichFacesSubTableTemplate {
+public class RichFacesCollapsibleSubTableTemplate extends VpeAbstractTemplate {
+ private static final String CST_TBODY_CLASS = "rf-cst"; //$NON-NLS-1$
+ private static final String CST_ROW_CLASS = "rf-cst-r"; //$NON-NLS-1$
+ private static final String CST_FIRST_RAW_CLASS = "rf-cst-fst-r"; //$NON-NLS-1$
+ private static final String CST_CELL_CLASS = "rf-cst-c"; //$NON-NLS-1$
+ private static final String CST_HEADER_CLASS = "rf-cst-hdr"; //$NON-NLS-1$
+ private static final String CST_FIRST_HEADER_CLASS = "rf-cst-hdr-fst"; //$NON-NLS-1$
+ private static final String CST_FIRST_HEADER_ROW_CLASS = "rf-cst-hdr-fst-r"; //$NON-NLS-1$
+ private static final String CST_HEADER_CELL_CLASS = "rf-cst-hdr-c"; //$NON-NLS-1$
+ private static final String CST_SUBHEADER_CLASS = "rf-cst-shdr"; //$NON-NLS-1$
+ private static final String CST_SUBHEADER_CELL_CLASS = "rf-cst-shdr-c"; //$NON-NLS-1$
+ private static final String CST_FOOTER_CLASS = "rf-cst-ftr"; //$NON-NLS-1$
+ private static final String CST_FIRST_FOOTER_CLASS = "rf-cst-ftr-fst"; //$NON-NLS-1$
+ private static final String CST_FOOTER_CELL_CLASS = "rf-cst-ftr-c"; //$NON-NLS-1$
+ private static final String CST_SUBFOOTER_CLASS = "rf-cst-sftr"; //$NON-NLS-1$
+ private static final String CST_FIRST_SUBFOOTER_CLASS = "rf-cst-sftr-fst"; //$NON-NLS-1$
+ private static final String CST_SUBFOOTER_CELL_CLASS = "rf-cst-sftr-c"; //$NON-NLS-1$
+
public VpeCreationData create(final VpePageContext pageContext,
final Node sourceNode, final nsIDOMDocument visualDocument) {
- final Element sourceElement = (Element)sourceNode;
+ final Element sourceElement = (Element) sourceNode;
final nsIDOMElement tbody = visualDocument.createElement(HTML.TAG_TBODY);
- String style = "display: table-row-group;"; //$NON-NLS-1$
+ /*
+ * Copy attributes from the source node to visual node.
+ */
+ VisualDomUtil.copyAttributes(sourceNode, tbody);
+ /*
+ * Add collapsible style property
+ */
+ String displayStyle = "display: table-row-group;"; //$NON-NLS-1$
if (RichFaces.readCollapsedStateFromSourceNode(sourceNode)) {
- style = "display: none;"; //$NON-NLS-1$
+ displayStyle = "display: none;"; //$NON-NLS-1$
}
+ /*
+ * Get previous style attribute value
+ */
+ String style = null;
+ if (sourceElement.hasAttribute(HTML.ATTR_STYLE)) {
+ style = sourceElement.getAttribute(HTML.ATTR_STYLE);
+ }
+ style += displayStyle;
+ /*
+ * Re-set style to the visual node
+ */
tbody.setAttribute(HTML.ATTR_STYLE, style);
+ tbody.setAttribute(HTML.ATTR_CLASS, CST_TBODY_CLASS);
+ /*
+ * Create VpeCreationData for this visual node.
+ * Initialize ChildrenEncoder.
+ */
VpeCreationData creationData = new VpeCreationData(tbody);
- creationData = encodeSubTable(pageContext, creationData, sourceElement,
- visualDocument, tbody);
+ RichFacesDataTableChildrenEncoder childrenEncoder = new RichFacesDataTableChildrenEncoder(
+ creationData, visualDocument, sourceElement, tbody);
+ childrenEncoder.setRowClasses(CST_FIRST_RAW_CLASS, CST_ROW_CLASS);
+ /*
+ * Encode header
+ */
+ childrenEncoder.encodeTableHeader(
+ pageContext, tbody, null,
+ HTML.TAG_TD, RichFaces.NAME_FACET_HEADER, CST_HEADER_CLASS,
+ null, null, null, CST_HEADER_CELL_CLASS);
+ /*
+ * Encode children
+ */
+ childrenEncoder.encodeChildren();
+ /*
+ * Encode footer
+ */
+ childrenEncoder.encodeTableFooter(
+ pageContext, tbody, null,
+ HTML.TAG_TD, RichFaces.NAME_FACET_FOOTER, CST_FOOTER_CLASS,
+ null, null, null, CST_FOOTER_CELL_CLASS);
+
return creationData;
}
+
+ @Override
+ public void validate(VpePageContext pageContext, Node sourceNode,
+ nsIDOMDocument visualDocument, VpeCreationData creationData) {
+ RichFacesDataTableChildrenEncoder.validateChildren(
+ pageContext, sourceNode, visualDocument, creationData);
+ /*
+ * Apply css styles to the generated visual node.
+ */
+ final RichFacesDataTableStyleClassesApplier styleClassesApplier =
+ new RichFacesDataTableStyleClassesApplier(visualDocument, pageContext, sourceNode);
+ styleClassesApplier.applyClasses((nsIDOMElement) creationData.getNode());
+ }
+
+ /**
+ * Method that is responsible for collapsing/expanding subtable
+ *
+ * @param sourceNode source node for the subtable
+ * @param toggleId the id
+ */
public void toggle(Node sourceNode, String toggleId) {
/*
* Collapsed state will be changed.
@@ -47,4 +129,5 @@
sourceNode.setUserData(RichFaces.COLLAPSED_STATE, "true", null); //$NON-NLS-1$
}
}
+
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableChildrenEncoder.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableChildrenEncoder.java 2011-08-25 11:35:14 UTC (rev 34308)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableChildrenEncoder.java 2011-08-25 13:18:41 UTC (rev 34309)
@@ -10,7 +10,9 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.richfaces.template;
+import java.util.ArrayList;
import java.util.List;
+import java.util.Map;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
import org.jboss.tools.jsf.vpe.richfaces.RichFacesTemplatesActivator;
@@ -21,6 +23,7 @@
import org.jboss.tools.vpe.editor.template.VpeCreatorUtil;
import org.jboss.tools.vpe.editor.template.VpeTemplate;
import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.editor.util.SourceDomUtil;
import org.jboss.tools.vpe.editor.util.VisualDomUtil;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
@@ -67,16 +70,16 @@
private static final String TAG_SUB_TABLE_OR_COLUMN_GROUP_CONTAINER = "subTableOrColumnGroup-container"; //$NON-NLS-1$
private final VpeCreationData creationData;
private final nsIDOMDocument visualDocument;
- private final Element sourceElement;
- private final nsIDOMElement table;
+ private final Element tableSourceElement;
+ private final nsIDOMElement tableVisualTag;
public RichFacesDataTableChildrenEncoder(final VpeCreationData creationData,
- final nsIDOMDocument visualDocument, final Element sourceElement,
- final nsIDOMElement table) {
+ final nsIDOMDocument visualDocument, final Element tableSourceElement,
+ final nsIDOMElement tableVisualTag) {
this.creationData = creationData;
this.visualDocument = visualDocument;
- this.sourceElement = sourceElement;
- this.table = table;
+ this.tableSourceElement = tableSourceElement;
+ this.tableVisualTag = tableVisualTag;
}
/**
@@ -93,8 +96,8 @@
// except ones specified in another vpeChildrenInfo's
final VpeChildrenInfo childInfo = new VpeChildrenInfo(null);
creationData.addChildrenInfo(childInfo);
-
- final List<Node> children = ComponentUtil.getChildren(sourceElement);
+
+ final List<Node> children = ComponentUtil.getChildren(tableSourceElement);
boolean createNewRow = true;
for (final Node child : children) {
final String nodeName = child.getNodeName();
@@ -122,15 +125,16 @@
final nsIDOMNode visualNode = creationData.getNode();
fixSubTables(visualNode);
}
-
+
/**
* Creates a container for {@code subTableOrColumnGroupNode} in {@code table}
* and adds an appropriate object of {@link VpeChildrenInfo} to {@code creationData}.
* <BR/>The container is the tag {@link #TAG_SUB_TABLE_OR_COLUMN_GROUP_CONTAINER}.
*/
private nsIDOMElement addSubTableOrColumnGroupToTable(final Node subTableOrColumnGroupNode) {
- final nsIDOMElement subTableOrColumnGroupContainer = visualDocument.createElement(TAG_SUB_TABLE_OR_COLUMN_GROUP_CONTAINER);
- table.appendChild(subTableOrColumnGroupContainer);
+ final nsIDOMElement subTableOrColumnGroupContainer = visualDocument
+ .createElement(TAG_SUB_TABLE_OR_COLUMN_GROUP_CONTAINER);
+ tableVisualTag.appendChild(subTableOrColumnGroupContainer);
final VpeChildrenInfo childInfo = new VpeChildrenInfo(subTableOrColumnGroupContainer);
childInfo.addSourceChild(subTableOrColumnGroupNode);
creationData.addChildrenInfo(childInfo);
@@ -150,7 +154,7 @@
private nsIDOMElement addColumnToRow(final Node columnNode, final boolean createNewRow) {
if ( createNewRow || (currentRow == null) ) {
currentRow = visualDocument.createElement(HTML.TAG_TR);
- table.appendChild(currentRow);
+ tableVisualTag.appendChild(currentRow);
currentRowChildrenInfo = new VpeChildrenInfo(currentRow);
creationData.addChildrenInfo(currentRowChildrenInfo);
rowNumber++;
@@ -172,7 +176,7 @@
* */
private void addElementToTable(final Node node) {
final nsIDOMElement tr = this.visualDocument.createElement(HTML.TAG_TR);
- table.appendChild(tr);
+ tableVisualTag.appendChild(tr);
final nsIDOMElement td = this.visualDocument.createElement(HTML.TAG_TD);
td.setAttribute(HTML.ATTR_COLSPAN, HTML.VALUE_COLSPAN_ALL);
@@ -200,8 +204,264 @@
final RuntimeException e = new RuntimeException("This is probably a bug. subTable-container should have one inner tag.");//$NON-NLS-1$
RichFacesTemplatesActivator.getPluginLog().logError(e);
}
-
+
VisualDomUtil.replaceNodeByItsChildren(subTableContainer);
}
}
+
+ /**
+ * Encoded facets from columns to the table.
+ *
+ * @param pageContext VpePageContext
+ * @param columnsWithFacets list of the source elements for columns
+ * @param facetName {@code "header"} or {@code "footer"} or other
+ * @param visualParentTR visal element to put {@code "<tr>"} to
+ * @param visualElementForTD string name for facet cell (usually {@code <td>})
+ * @param cellClass css class for the facet's cell
+ * @param headerClass user defined css class for column's header
+ */
+ public void encodeColumnsFacets(VpePageContext pageContext,
+ ArrayList<Element> columnsWithFacets, String facetName,
+ nsIDOMElement visualParentTR, String visualElementForTD,
+ String cellClass, String headerClass) {
+
+ for (Element column : columnsWithFacets) {
+ Element facet = SourceDomUtil.getFacetByName(pageContext,column, facetName);
+ /*
+ * If facet is null unwanted cells might be added.
+ * Thus do not add TD for such facets.
+ */
+ if (null != facet) {
+ String classAttribute = facetName + "Class"; //$NON-NLS-1$
+
+ String columnHeaderClass = column.hasAttribute(classAttribute) ? column.getAttribute(classAttribute) : null;
+ nsIDOMElement td = visualDocument.createElement(visualElementForTD);
+ visualParentTR.appendChild(td);
+ String styleClass = ComponentUtil.encodeStyleClass(null, cellClass, headerClass, columnHeaderClass);
+ if (!RichFacesColumnTemplate.isVisible(column)) {
+ VisualDomUtil.setSubAttribute(td, HTML.ATTR_STYLE,
+ HTML.STYLE_PARAMETER_DISPLAY, HTML.STYLE_VALUE_NONE);
+ }
+ td.setAttribute(HTML.ATTR_CLASS, styleClass);
+ td.setAttribute(HTML.ATTR_SCOPE, HTML.TAG_COL);
+ if(column.hasAttribute(HTML.ATTR_COLSPAN)) {
+ String colspan = column.getAttribute(HTML.ATTR_COLSPAN);
+ td.setAttribute(HTML.ATTR_COLSPAN, colspan);
+ }
+ if (RichFaces.NAME_FACET_HEADER.equals(facetName)) {
+ nsIDOMElement icon = RichFacesColumnTemplate.getHeaderIcon(pageContext, column, visualDocument);
+ if (icon != null) {
+ td.appendChild(icon);
+ }
+ }
+ /*
+ * Add facet source here
+ */
+ VpeChildrenInfo childrenInfo = new VpeChildrenInfo(td);
+ childrenInfo.addSourceChild(facet);
+ creationData.addChildrenInfo(childrenInfo);
+ }
+ }
+ }
+
+ /**
+ * Adds the header or footer facets to the table
+ *
+ * @param pageContext VpePageContext
+ * @param visualTagForFacet {@code <thead>} or {@code <tfoot>} or any similar
+ * @param innerFacetSourceNode single source elemen``t to be rendered inside facet
+ * @param visualElementForTD string name for facet cell (usually {@code <td>})
+ * @param facetTHeadClass css class for {@code <thead>} or {@code <tfoot>} or any similar
+ * @param firstRowClass css class for the first facet row
+ * @param rowClass css class for the facet's row
+ * @param cellClass css class for the facet's cell
+ */
+ public void encodeTableFacets(VpePageContext pageContext,
+ nsIDOMElement visualTagForFacet, Element innerFacetSourceNode,
+ String visualElementForTD, String facetTHeadClass,
+ String firstRowClass, String rowClass, String cellClass) {
+
+ if (null == innerFacetSourceNode) {
+ RichFacesTemplatesActivator.getDefault().logError("Source element to be rendered inside facet is 'null' !"); //$NON-NLS-1$
+ }
+
+ boolean isColumnGroup = innerFacetSourceNode.getNodeName().endsWith(RichFaces.TAG_COLUMN_GROUP);
+ boolean isSubTable = innerFacetSourceNode.getNodeName().endsWith(RichFaces.TAG_SUB_TABLE);
+ if(isColumnGroup) {
+ RichFacesColumnGroupTemplate.DEFAULT_INSTANCE.encodeSubTable(pageContext, creationData, innerFacetSourceNode, visualDocument, visualTagForFacet);
+ } else if(isSubTable) {
+ RichFacesSubTableTemplate.DEFAULT_INSTANCE.encodeSubTable(pageContext, creationData, innerFacetSourceNode, visualDocument, visualTagForFacet);
+ } else {
+ nsIDOMElement tr = visualDocument.createElement(HTML.TAG_TR);
+ visualTagForFacet.appendChild(tr);
+ // TODO facetTHeadClass should be applied only once
+ // TODO rowClass is never applied
+ String styleClass = ComponentUtil.encodeStyleClass(null, firstRowClass, facetTHeadClass, null);
+ if(styleClass!=null) {
+ tr.setAttribute(HTML.ATTR_CLASS, styleClass);
+ }
+ String style = ComponentUtil.getHeaderBackgoundImgStyle();
+ tr.setAttribute(HTML.ATTR_STYLE, style);
+
+ nsIDOMElement td = visualDocument.createElement(visualElementForTD);
+ tr.appendChild(td);
+ // TODO facetTHeadClass should be applied only once
+ styleClass = ComponentUtil.encodeStyleClass(null, cellClass, facetTHeadClass, null);
+ if(styleClass!=null) {
+ td.setAttribute(HTML.ATTR_CLASS, styleClass);
+ }
+ // the cell spans the entire row
+ td.setAttribute(HTML.ATTR_COLSPAN, HTML.VALUE_COLSPAN_ALL);
+ td.setAttribute(HTML.ATTR_SCOPE, HTML.TAG_COLGROUP);
+ VpeChildrenInfo child = new VpeChildrenInfo(td);
+ child.addSourceChild(innerFacetSourceNode);
+ creationData.addChildrenInfo(child);
+ }
+ }
+
+ /**
+ * Encodes the whole table's header and columns' header
+ *
+ * @param pageContext VpePageContext
+ * @param visualParentForFacetTHead visual node to put facet's {@code <thead>} or {@code <tfoot>} or similar
+ * @param visualTagForFacetTHead what tag will be rendered: {@code <thead>} or {@code <tfoot>} or other
+ * @param visualElementForTD string name for facet cell (usually {@code <td>})
+ * @param facetName {@code "header"} or {@code "footer"} or other
+ * @param customFacetClass user's class for columns' headers/footer
+ * @param facetTHeadClass user's class for table's headers/footer
+ * @param firstRowClass css class for the first row in table's headers/footer
+ * @param rowClass css class for non-first row in table's headers/footer
+ * @param cellClass css class for the facet's cell
+ */
+ public void encodeTableHeader(VpePageContext pageContext,
+ nsIDOMElement visualParentForFacetTHead,
+ String visualTagForFacetTHead, String visualElementForTD,
+ String facetName, String customFacetClass, String facetTHeadClass,
+ String firstRowClass, String rowClass, String cellClass) {
+
+ Element facetSourceElement = SourceDomUtil.getFacetByName(pageContext,
+ tableSourceElement, facetName);
+
+ ArrayList<Element> columns = RichFaces.getColumns(tableSourceElement);
+ int columnsLength = RichFaces.getColumnsCount(tableSourceElement, columns);
+
+ Map<String, List<Node>> facetChildren = VisualDomUtil.findFacetElements(facetSourceElement, pageContext);
+ boolean headerJsfElementPresents = facetChildren.get(VisualDomUtil.FACET_JSF_TAG).size() > 0;
+ boolean hasColumnWithFacets = RichFaces.hasColumnWithFacet(columns, facetName);
+ if(headerJsfElementPresents || hasColumnWithFacets) {
+ nsIDOMElement createdVisualTagForFacetTHead = null;
+ if ((null == visualTagForFacetTHead) || "".equalsIgnoreCase(visualTagForFacetTHead)) { //$NON-NLS-1$
+ /*
+ * For subtables mostly:
+ * Header won't be placed into separate thead or tfoot tag.
+ * Then put it to the parent's visual node.
+ */
+ createdVisualTagForFacetTHead = visualParentForFacetTHead;
+ } else {
+ createdVisualTagForFacetTHead = visualDocument.createElement(
+ visualTagForFacetTHead); //thead or tfoot
+ visualParentForFacetTHead.appendChild(createdVisualTagForFacetTHead);
+ }
+ String facetClass = null;
+ if (tableSourceElement.hasAttribute(facetName + "Class")) { //$NON-NLS-1$
+ facetClass = tableSourceElement.getAttribute(facetName + "Class"); //$NON-NLS-1$
+ }
+ /*
+ * Encode facet for the whole table
+ */
+ if(headerJsfElementPresents) {
+ Element node = (Element) facetChildren.get(VisualDomUtil.FACET_JSF_TAG).get(0);
+ encodeTableFacets(pageContext,
+ createdVisualTagForFacetTHead, node, visualElementForTD,
+ facetTHeadClass, firstRowClass, rowClass, cellClass);
+ }
+ /*
+ * Encode facets for columns
+ */
+ if(hasColumnWithFacets) {
+ nsIDOMElement visualParentTR = visualDocument.createElement(HTML.TAG_TR);
+ createdVisualTagForFacetTHead.appendChild(visualParentTR);
+ String styleClass = ComponentUtil.encodeStyleClass(null, customFacetClass, null, facetClass);
+ if(styleClass!=null) {
+ visualParentTR.setAttribute(HTML.ATTR_CLASS, styleClass);
+ }
+ encodeColumnsFacets(pageContext,
+ columns, facetName, visualParentTR, visualElementForTD,
+ cellClass, facetClass);
+ }
+ }
+ }
+
+ /**
+ * Encodes the whole table's footer and columns' footer
+ *
+ * @param pageContext VpePageContext
+ * @param visualParentForFacetTHead visual node to put facet's {@code <thead>} or {@code <tfoot>} or similar
+ * @param visualTagForFacetTHead what tag will be rendered: {@code <thead>} or {@code <tfoot>} or other
+ * @param visualElementForTD string name for facet cell (usually {@code <td>})
+ * @param facetName {@code "header"} or {@code "footer"} or other
+ * @param customFacetClass user's class for columns' headers/footer
+ * @param facetTHeadClass user's class for table's headers/footer
+ * @param firstRowClass css class for the first row in table's headers/footer
+ * @param rowClass css class for non-first row in table's headers/footer
+ * @param cellClass css class for the facet's cell
+ */
+ public void encodeTableFooter(VpePageContext pageContext,
+ nsIDOMElement visualParentForFacetTHead,
+ String visualTagForFacetTHead, String visualElementForTD,
+ String facetName, String customFacetClass, String facetTHeadClass,
+ String firstRowClass, String rowClass, String cellClass) {
+
+ Element facetSourceElement = SourceDomUtil.getFacetByName(pageContext,
+ tableSourceElement, facetName);
+
+ ArrayList<Element> columns = RichFaces.getColumns(tableSourceElement);
+ int columnsLength = RichFaces.getColumnsCount(tableSourceElement, columns);
+
+ Map<String, List<Node>> facetChildren = VisualDomUtil.findFacetElements(facetSourceElement, pageContext);
+ boolean headerJsfElementPresents = facetChildren.get(VisualDomUtil.FACET_JSF_TAG).size() > 0;
+ boolean hasColumnWithFacets = RichFaces.hasColumnWithFacet(columns, facetName);
+ if(headerJsfElementPresents || hasColumnWithFacets) {
+ nsIDOMElement createdVisualTagForFacetTHead = null;
+ if ((null == visualTagForFacetTHead) || "".equalsIgnoreCase(visualTagForFacetTHead)) { //$NON-NLS-1$
+ /*
+ * For subtables mostly:
+ * Header won't be placed into separate thead or tfoot tag.
+ * Then put it to the parent's visual node.
+ */
+ createdVisualTagForFacetTHead = visualParentForFacetTHead;
+ } else {
+ createdVisualTagForFacetTHead = visualDocument.createElement(
+ visualTagForFacetTHead); //thead or tfoot
+ visualParentForFacetTHead.appendChild(createdVisualTagForFacetTHead);
+ }
+ String facetClass = null;
+ if (tableSourceElement.hasAttribute(facetName + "Class")) { //$NON-NLS-1$
+ facetClass = tableSourceElement.getAttribute(facetName + "Class"); //$NON-NLS-1$
+ }
+ /*
+ * Encode facets for columns first
+ */
+ if(hasColumnWithFacets) {
+ nsIDOMElement visualParentTR = visualDocument.createElement(HTML.TAG_TR);
+ createdVisualTagForFacetTHead.appendChild(visualParentTR);
+ String styleClass = ComponentUtil.encodeStyleClass(null, customFacetClass, null, facetClass);
+ if(styleClass!=null) {
+ visualParentTR.setAttribute(HTML.ATTR_CLASS, styleClass);
+ }
+ encodeColumnsFacets(pageContext,
+ columns, facetName, visualParentTR, visualElementForTD,
+ cellClass, facetClass);
+ }
+ /*
+ * Encode facet for the whole table
+ */
+ if(headerJsfElementPresents) {
+ Element node = (Element) facetChildren.get(VisualDomUtil.FACET_JSF_TAG).get(0);
+ encodeTableFacets(pageContext,
+ createdVisualTagForFacetTHead, node, visualElementForTD,
+ facetTHeadClass, firstRowClass, rowClass, cellClass);
+ }
+ }
+ }
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableTemplate.java 2011-08-25 11:35:14 UTC (rev 34308)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableTemplate.java 2011-08-25 13:18:41 UTC (rev 34309)
@@ -52,8 +52,8 @@
table.setAttribute(HTML.ATTR_CLASS, tableClass);
// Encode colgroup definition.
- ArrayList<Element> columns = getColumns(sourceElement);
- int columnsLength = getColumnsCount(sourceElement, columns);
+ ArrayList<Element> columns = RichFaces.getColumns(sourceElement);
+ int columnsLength = RichFaces.getColumnsCount(sourceElement, columns);
nsIDOMElement colgroup = visualDocument.createElement(HTML.TAG_COLGROUP);
colgroup.setAttribute(HTML.ATTR_SPAN, String.valueOf(columnsLength));
table.appendChild(colgroup);
@@ -87,13 +87,17 @@
sourceElement, RichFaces.NAME_FACET_HEADER);
Map<String, List<Node>> headerFacetChildren = VisualDomUtil.findFacetElements(header, pageContext);
boolean headerJsfElementPresents = headerFacetChildren.get(VisualDomUtil.FACET_JSF_TAG).size() > 0;
- boolean hasColumnWithHeader = hasColumnWithFacet(columns, RichFaces.NAME_FACET_HEADER);
+ boolean hasColumnWithHeader = RichFaces.hasColumnWithFacet(columns, RichFaces.NAME_FACET_HEADER);
if(headerJsfElementPresents || hasColumnWithHeader) {
nsIDOMElement thead = visualDocument.createElement(HTML.TAG_THEAD);
table.appendChild(thead);
- String headerClass = sourceElement.hasAttribute(RichFaces.ATTR_HEADER_CLASS) ? sourceElement.getAttribute(RichFaces.ATTR_HEADER_CLASS) : null;
+ String headerClass = sourceElement.hasAttribute(RichFaces.ATTR_HEADER_CLASS)
+ ? sourceElement.getAttribute(RichFaces.ATTR_HEADER_CLASS) : null;
if(headerJsfElementPresents) {
Node node = headerFacetChildren.get(VisualDomUtil.FACET_JSF_TAG).get(0);
+ /*
+ * Encode Header for the whole table first
+ */
encodeTableHeaderOrFooterFacet(pageContext, creationData,
thead, columnsLength, visualDocument, node,
"dr-table-header rich-table-header", //$NON-NLS-1$
@@ -108,6 +112,9 @@
if(styleClass!=null) {
tr.setAttribute(HTML.ATTR_CLASS, styleClass);
}
+ /*
+ * Encode Header for columns
+ */
encodeHeaderOrFooterFacets(pageContext, creationData, tr,
visualDocument, columns,
"dr-table-subheadercell rich-table-subheadercell", //$NON-NLS-1$
@@ -122,11 +129,12 @@
sourceElement, RichFaces.NAME_FACET_FOOTER);
Map<String, List<Node>> footerFacetChildren = VisualDomUtil.findFacetElements(footer, pageContext);
boolean footerJsfElementPresents = footerFacetChildren.get(VisualDomUtil.FACET_JSF_TAG).size() > 0;
- boolean hasColumnWithFooter = hasColumnWithFacet(columns, RichFaces.NAME_FACET_FOOTER);
+ boolean hasColumnWithFooter = RichFaces.hasColumnWithFacet(columns, RichFaces.NAME_FACET_FOOTER);
if (footerJsfElementPresents || hasColumnWithFooter) {
nsIDOMElement tfoot = visualDocument.createElement(HTML.TAG_TFOOT);
table.appendChild(tfoot);
- String footerClass = sourceElement.hasAttribute(RichFaces.ATTR_FOOTER_CLASS) ? sourceElement.getAttribute(RichFaces.ATTR_FOOTER_CLASS) : null;
+ String footerClass = sourceElement.hasAttribute(RichFaces.ATTR_FOOTER_CLASS)
+ ? sourceElement.getAttribute(RichFaces.ATTR_FOOTER_CLASS) : null;
if(hasColumnWithFooter) {
nsIDOMElement tr = visualDocument.createElement(HTML.TAG_TR);
tfoot.appendChild(tr);
@@ -134,6 +142,9 @@
if(styleClass!=null) {
tr.setAttribute(HTML.ATTR_CLASS, styleClass);
}
+ /*
+ * Encode Footer for columns first
+ */
encodeHeaderOrFooterFacets(pageContext, creationData, tr,
visualDocument, columns,
"dr-table-subfootercell rich-table-subfootercell", //$NON-NLS-1$
@@ -141,6 +152,9 @@
}
if (footerJsfElementPresents) {
Node node = footerFacetChildren.get(VisualDomUtil.FACET_JSF_TAG).get(0);
+ /*
+ * Encode Footer for the whole table
+ */
encodeTableHeaderOrFooterFacet(pageContext, creationData,
tfoot, columnsLength, visualDocument, node,
"dr-table-footer rich-table-footer", //$NON-NLS-1$
@@ -283,91 +297,7 @@
}
}
- public static ArrayList<Element> getColumns(Node parentSourceElement) {
- ArrayList<Element> columns = new ArrayList<Element>();
- NodeList children = parentSourceElement.getChildNodes();
- for(int i=0; i<children.getLength(); i++) {
- Node child = children.item(i);
- String nodeName = child.getNodeName();
- if((child instanceof Element) && (
- nodeName.endsWith(RichFaces.TAG_COLUMN) ||
- nodeName.endsWith(RichFaces.TAG_COLUMNS)
- )) {
- columns.add((Element)child);
- }
- }
- return columns;
- }
-
/**
- * Returns true if and only if {@code columns} contains at least one column that have facet
- * with given {@code facetName}.
- */
- public static boolean hasColumnWithFacet(ArrayList<Element> columns, String facetName) {
- for (Element column : columns) {
- Node body = ComponentUtil.getFacet(column, facetName, true);
- if(body!=null) {
- return true;
- }
- }
-
- return false;
- }
-
- protected int getColumnsCount(Element sourceElement, ArrayList<Element> columns) {
- int count = 0;
- // check for exact value in component
- try {
- count = Integer.parseInt(sourceElement.getAttribute(RichFaces.ATTR_COLUMNS));
- } catch (NumberFormatException e) {
- count = calculateRowColumns(sourceElement, columns);
- }
- return count;
- }
-
- /*
- * Calculate max number of columns per row. For rows, recursive calculate
- * max length.
- */
- private int calculateRowColumns(Element sourceElement, ArrayList<Element> columns) {
- int count = 0;
- int currentLength = 0;
- for (Element column : columns) {
- if (ComponentUtil.isRendered(column)) {
- String nodeName = column.getNodeName();
- if (nodeName.endsWith(RichFaces.TAG_COLUMN_GROUP)) {
- // Store max calculated value of previous rows.
- count = Math.max(currentLength,count);
- // Calculate number of columns in row.
- currentLength = calculateRowColumns(sourceElement, getColumns(column));
- // Store max calculated value
- count = Math.max(currentLength,count);
- currentLength = 0;
- } else if (nodeName.equals(sourceElement.getPrefix() + Constants.COLON + RichFaces.TAG_COLUMN) ||
- nodeName.equals(sourceElement.getPrefix() + Constants.COLON + RichFaces.TAG_COLUMNS)) {
- // For new row, save length of previous.
- if (RichFacesColumnTemplate.isBreakBefore(column)) {
- count = Math.max(currentLength,count);
- currentLength = 0;
- }
- String colspanStr = column.getAttribute("colspan"); //$NON-NLS-1$
- try {
- currentLength += Integer.parseInt(colspanStr);
- } catch (NumberFormatException e) {
- currentLength++;
- }
- } else if (nodeName.endsWith(RichFaces.TAG_COLUMN)) {
- // UIColumn always have colspan == 1.
- currentLength++;
- }
- }
- }
- return Math.max(currentLength,count);
- }
-
-
-
- /**
* @see org.jboss.tools.vpe.editor.template.VpeAbstractTemplate#validate(org.jboss.tools.vpe.editor.context.VpePageContext, org.w3c.dom.Node, org.mozilla.interfaces.nsIDOMDocument, org.jboss.tools.vpe.editor.template.VpeCreationData)
*/
@Override
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSubTableTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSubTableTemplate.java 2011-08-25 11:35:14 UTC (rev 34308)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSubTableTemplate.java 2011-08-25 13:18:41 UTC (rev 34309)
@@ -38,6 +38,11 @@
private static List<String> rowClasses;
private static List<String> columnClasses;
+ private static final String ST_HEADER_CLASS = "dr-subtable-header rich-subtable-header";
+ private static final String ST_HEADER_CONTINUE_CLASS = "dr-subtable-header-continue rich-subtable-header-continue";
+ private static final String ST_FOOTER_CLASS = "dr-subtable-footer rich-subtable-footer";
+ private static final String ST_FOOTER_CONTINUE_CLASS = "dr-subtable-footer-continue rich-subtable-footer-continue";
+
/** @deprecated no one another template should know about this template */
public static final RichFacesSubTableTemplate DEFAULT_INSTANCE = new RichFacesSubTableTemplate();
@@ -227,12 +232,10 @@
final nsIDOMElement parentVisualNode, final String facetName,
final String trClass, final String tdClass) {
- final ArrayList<Element> columns = RichFacesDataTableTemplate
- .getColumns(sourceElement);
+ final ArrayList<Element> columns = RichFaces.getColumns(sourceElement);
// final ArrayList<Element> columnsHeaders =
// ComponentUtil.getColumnsWithFacet(columns, facetName);
- final boolean hasColumnWithFacet = RichFacesDataTableTemplate
- .hasColumnWithFacet(columns, facetName);
+ final boolean hasColumnWithFacet = RichFaces.hasColumnWithFacet(columns, facetName);
if (hasColumnWithFacet) {
final nsIDOMElement tr = visualDocument.createElement(HTML.TAG_TR);
parentVisualNode.appendChild(tr);
@@ -260,21 +263,21 @@
}
protected String getHeaderClass() {
- return "dr-subtable-header rich-subtable-header"; //$NON-NLS-1$
+ return ST_HEADER_CLASS;
}
protected String getHeaderContinueClass() {
- return "dr-subtable-header-continue rich-subtable-header-continue"; //$NON-NLS-1$
+ return ST_HEADER_CONTINUE_CLASS;
}
protected String getFooterClass() {
- return "dr-subtable-footer rich-subtable-footer"; //$NON-NLS-1$
+ return ST_FOOTER_CLASS;
}
protected String getFooterContinueClass() {
- return "dr-subtable-footer-continue rich-subtable-footer-continue"; //$NON-NLS-1$
+ return ST_FOOTER_CONTINUE_CLASS;
}
-
+
protected String getRowClass(final int row) {
String rowClass = DEAFAULT_CELL_CLASS;
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/util/RichFaces.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/util/RichFaces.java 2011-08-25 11:35:14 UTC (rev 34308)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/util/RichFaces.java 2011-08-25 13:18:41 UTC (rev 34309)
@@ -14,9 +14,12 @@
import java.util.ArrayList;
import java.util.List;
+import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
+import org.jboss.tools.jsf.vpe.richfaces.template.RichFacesColumnTemplate;
import org.jboss.tools.vpe.editor.template.expression.VpeExpression;
import org.jboss.tools.vpe.editor.template.expression.VpeExpressionBuilder;
import org.jboss.tools.vpe.editor.template.expression.VpeExpressionBuilderException;
+import org.jboss.tools.vpe.editor.util.Constants;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
@@ -166,12 +169,98 @@
return list;
}
+ /**
+ * Reads COLLAPSED_STATE attribute's value from the source node
+ *
+ * @param sourceNode the verifiable source node
+ * @return true, if node is collapsed
+ */
public static boolean readCollapsedStateFromSourceNode(Node sourceNode) {
- boolean colapsed = false;
+ boolean isCollapsed = false;
String collapsedState = (String) sourceNode.getUserData(COLLAPSED_STATE);
if ((collapsedState != null) && ("true".equalsIgnoreCase(collapsedState))){ //$NON-NLS-1$
- colapsed = true;
+ isCollapsed = true;
}
- return colapsed;
+ return isCollapsed;
}
+
+ public static ArrayList<Element> getColumns(Node parentSourceElement) {
+ ArrayList<Element> columns = new ArrayList<Element>();
+ NodeList children = parentSourceElement.getChildNodes();
+ for(int i=0; i<children.getLength(); i++) {
+ Node child = children.item(i);
+ String nodeName = child.getNodeName();
+ if((child instanceof Element) && (nodeName.endsWith(TAG_COLUMN)
+ || nodeName.endsWith(TAG_COLUMNS))) {
+ columns.add((Element)child);
+ }
+ }
+ return columns;
+ }
+
+ /**
+ * Returns true if and only if {@code columns} contains at least one column that have facet
+ * with given {@code facetName}.
+ */
+ public static boolean hasColumnWithFacet(ArrayList<Element> columns, String facetName) {
+ for (Element column : columns) {
+ Node body = ComponentUtil.getFacet(column, facetName, true);
+ if(body!=null) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public static int getColumnsCount(Element sourceElement, ArrayList<Element> columns) {
+ int count = 0;
+ // check for exact value in component
+ try {
+ count = Integer.parseInt(sourceElement.getAttribute(ATTR_COLUMNS));
+ } catch (NumberFormatException e) {
+ count = calculateRowColumns(sourceElement, columns);
+ }
+ return count;
+ }
+
+ /*
+ * Calculate max number of columns per row.
+ * For rows, recursive calculate max length.
+ */
+ public static int calculateRowColumns(Element sourceElement, ArrayList<Element> columns) {
+ int count = 0;
+ int currentLength = 0;
+ for (Element column : columns) {
+ if (ComponentUtil.isRendered(column)) {
+ String nodeName = column.getNodeName();
+ if (nodeName.endsWith(TAG_COLUMN_GROUP)) {
+ // Store max calculated value of previous rows.
+ count = Math.max(currentLength,count);
+ // Calculate number of columns in row.
+ currentLength = calculateRowColumns(sourceElement, getColumns(column));
+ // Store max calculated value
+ count = Math.max(currentLength,count);
+ currentLength = 0;
+ } else if (nodeName.equals(sourceElement.getPrefix() + Constants.COLON + TAG_COLUMN) ||
+ nodeName.equals(sourceElement.getPrefix() + Constants.COLON + TAG_COLUMNS)) {
+ // For new row, save length of previous.
+ if (RichFacesColumnTemplate.isBreakBefore(column)) {
+ count = Math.max(currentLength,count);
+ currentLength = 0;
+ }
+ String colspanStr = column.getAttribute("colspan"); //$NON-NLS-1$
+ try {
+ currentLength += Integer.parseInt(colspanStr);
+ } catch (NumberFormatException e) {
+ currentLength++;
+ }
+ } else if (nodeName.endsWith(TAG_COLUMN)) {
+ // UIColumn always have colspan == 1.
+ currentLength++;
+ }
+ }
+ }
+ return Math.max(currentLength, count);
+ }
+
}
14 years, 4 months
JBoss Tools SVN: r34308 - trunk/as/tests/org.jboss.ide.eclipse.as.management.as7.tests/src/org/jboss/ide/eclipse/as/internal/management/as7/tests.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-08-25 07:35:14 -0400 (Thu, 25 Aug 2011)
New Revision: 34308
Modified:
trunk/as/tests/org.jboss.ide.eclipse.as.management.as7.tests/src/org/jboss/ide/eclipse/as/internal/management/as7/tests/JBossManagementServiceTest.java
Log:
[JBIDE-9586] make sure that service bundle is started
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.management.as7.tests/src/org/jboss/ide/eclipse/as/internal/management/as7/tests/JBossManagementServiceTest.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.management.as7.tests/src/org/jboss/ide/eclipse/as/internal/management/as7/tests/JBossManagementServiceTest.java 2011-08-25 11:34:01 UTC (rev 34307)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.management.as7.tests/src/org/jboss/ide/eclipse/as/internal/management/as7/tests/JBossManagementServiceTest.java 2011-08-25 11:35:14 UTC (rev 34308)
@@ -15,6 +15,7 @@
import java.net.UnknownHostException;
import org.jboss.ide.eclipse.as.core.server.v7.management.IJBoss7ManagerService;
+import org.jboss.ide.eclipse.as.internal.management.as7.AS7ManagementActivator;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -42,35 +43,48 @@
@Test
public void serviceIsReachable() throws BundleException {
ensureDSIsRunning();
+ ensureServiceBundleIsRunning();
BundleContext context = Activator.getContext();
- ServiceReference<IJBoss7ManagerService> reference =
+ ServiceReference<IJBoss7ManagerService> reference =
context.getServiceReference(IJBoss7ManagerService.class);
assertNotNull(reference);
IJBoss7ManagerService service = context.getService(reference);
assertNotNull(service);
}
+ private void ensureServiceBundleIsRunning() throws BundleException {
+ BundleContext context = Activator.getContext();
+ assertNotNull("bundle of this test is not active", context);
+ Bundle bundle = getBundle(AS7ManagementActivator.PLUGIN_ID);
+ assertNotNull(AS7ManagementActivator.PLUGIN_ID + " not installed", bundle);
+ startBundle(bundle);
+ }
+
private void ensureDSIsRunning() throws BundleException {
BundleContext context = Activator.getContext();
assertNotNull("bundle of this test is not active", context);
- Bundle bundle = getDSBundle();
+ Bundle bundle = getBundle(DS_BUNDLEID);
assertNotNull(
DS_BUNDLEID + " not installed. You have to install the declarative services daemon so that "
+ IJBoss7ManagerService.class + " service is registered"
, bundle);
+ startBundle(bundle);
+ }
+
+ private void startBundle(Bundle bundle) throws BundleException {
if (bundle.getState() != Bundle.ACTIVE) {
bundle.start();
}
}
- private Bundle getDSBundle() {
- Bundle dsBundle = null;
+ private Bundle getBundle(String id) {
+ Bundle bundleFound = null;
for (Bundle bundle : Activator.getContext().getBundles()) {
- if (DS_BUNDLEID.equals(bundle.getSymbolicName())) {
- dsBundle = bundle;
+ if (id.equals(bundle.getSymbolicName())) {
+ bundleFound = bundle;
break;
}
}
- return dsBundle;
+ return bundleFound;
}
}
14 years, 4 months
JBoss Tools SVN: r34307 - in trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7: src/org/jboss/ide/eclipse/as/internal/management/as7 and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-08-25 07:34:01 -0400 (Thu, 25 Aug 2011)
New Revision: 34307
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/src/org/jboss/ide/eclipse/as/internal/management/as7/AS7ManagementActivator.java
Removed:
trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/src/org/jboss/ide/eclipse/as/internal/management/as7/Activator.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/META-INF/MANIFEST.MF
trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/src/org/jboss/ide/eclipse/as/internal/management/as7/DeploymentOperationResult.java
Log:
[JBIDE-9586] renamed Activator to AS7ManagementActivator
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/META-INF/MANIFEST.MF 2011-08-25 09:20:36 UTC (rev 34306)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/META-INF/MANIFEST.MF 2011-08-25 11:34:01 UTC (rev 34307)
@@ -3,7 +3,7 @@
Bundle-Name: JBoss AS7 management API
Bundle-SymbolicName: org.jboss.ide.eclipse.as.management.as7
Bundle-Version: 2.3.0.qualifier
-Bundle-Activator: org.jboss.ide.eclipse.as.internal.management.as7.Activator
+Bundle-Activator: org.jboss.ide.eclipse.as.internal.management.as7.AS7ManagementActivator
Require-Bundle: org.jboss.ide.eclipse.as.core;bundle-version="2.3.0",
org.eclipse.core.runtime;bundle-version="[3.7.0,4.0.0)",
org.eclipse.wst.server.core;bundle-version="1.1.302"
Copied: trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/src/org/jboss/ide/eclipse/as/internal/management/as7/AS7ManagementActivator.java (from rev 34306, trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/src/org/jboss/ide/eclipse/as/internal/management/as7/Activator.java)
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/src/org/jboss/ide/eclipse/as/internal/management/as7/AS7ManagementActivator.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/src/org/jboss/ide/eclipse/as/internal/management/as7/AS7ManagementActivator.java 2011-08-25 11:34:01 UTC (rev 34307)
@@ -0,0 +1,54 @@
+package org.jboss.ide.eclipse.as.internal.management.as7;
+
+import org.eclipse.core.runtime.Plugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class AS7ManagementActivator extends Plugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.jboss.ide.eclipse.as.management.as7"; //$NON-NLS-1$
+
+ // The shared instance
+ private static AS7ManagementActivator plugin;
+
+ /**
+ * The constructor
+ */
+ public AS7ManagementActivator() {
+ }
+
+ public static BundleContext getContext() {
+ return plugin.getBundle().getBundleContext();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static AS7ManagementActivator getDefault() {
+ return plugin;
+ }
+
+}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/src/org/jboss/ide/eclipse/as/internal/management/as7/Activator.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/src/org/jboss/ide/eclipse/as/internal/management/as7/Activator.java 2011-08-25 09:20:36 UTC (rev 34306)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/src/org/jboss/ide/eclipse/as/internal/management/as7/Activator.java 2011-08-25 11:34:01 UTC (rev 34307)
@@ -1,54 +0,0 @@
-package org.jboss.ide.eclipse.as.internal.management.as7;
-
-import org.eclipse.core.runtime.Plugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends Plugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.jboss.ide.eclipse.as.management.as7"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- public static BundleContext getContext() {
- return plugin.getBundle().getBundleContext();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
-}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/src/org/jboss/ide/eclipse/as/internal/management/as7/DeploymentOperationResult.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/src/org/jboss/ide/eclipse/as/internal/management/as7/DeploymentOperationResult.java 2011-08-25 09:20:36 UTC (rev 34306)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/src/org/jboss/ide/eclipse/as/internal/management/as7/DeploymentOperationResult.java 2011-08-25 11:34:01 UTC (rev 34307)
@@ -89,7 +89,7 @@
}
private IStatus createStatus(int severity, String messagePattern, Object... messageArguments) {
- return new Status(severity, Activator.getContext().getBundle().getSymbolicName(), MessageFormat.format(
+ return new Status(severity, AS7ManagementActivator.getContext().getBundle().getSymbolicName(), MessageFormat.format(
messagePattern, messageArguments));
}
}
\ No newline at end of file
14 years, 4 months
JBoss Tools SVN: r34306 - in trunk/as: tests/org.jboss.ide.eclipse.as.egit.test/META-INF and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-08-25 05:20:36 -0400 (Thu, 25 Aug 2011)
New Revision: 34306
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.egit.ui/META-INF/MANIFEST.MF
trunk/as/tests/org.jboss.ide.eclipse.as.egit.test/META-INF/MANIFEST.MF
Log:
[JBIDE-9585] corrected dependencies to EGit 1.0 (was: EGit 1.1): corrected code and manifests
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.egit.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.egit.ui/META-INF/MANIFEST.MF 2011-08-25 09:20:29 UTC (rev 34305)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.egit.ui/META-INF/MANIFEST.MF 2011-08-25 09:20:36 UTC (rev 34306)
@@ -4,8 +4,8 @@
Bundle-SymbolicName: org.jboss.ide.eclipse.as.egit.ui;singleton:=true
Bundle-Version: 0.0.1.qualifier
Bundle-Activator: org.jboss.ide.eclipse.as.egit.internal.ui.EGitUIActivator
-Require-Bundle: org.eclipse.egit.core;bundle-version="1.1.0",
- org.eclipse.jgit;bundle-version="1.1.0",
+Require-Bundle: org.eclipse.egit.core;bundle-version="1.0.0",
+ org.eclipse.jgit;bundle-version="1.0.0",
org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.core.expressions;bundle-version="[3.4.300,4.0.0)",
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.egit.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.egit.test/META-INF/MANIFEST.MF 2011-08-25 09:20:29 UTC (rev 34305)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.egit.test/META-INF/MANIFEST.MF 2011-08-25 09:20:36 UTC (rev 34306)
@@ -6,8 +6,8 @@
Bundle-Activator: org.jboss.ide.eclipse.as.egit.internal.test.EGitTestActivator
Bundle-Vendor: JBoss by Red Hat
Require-Bundle: org.jboss.ide.eclipse.as.egit.core;bundle-version="0.0.1",
- org.eclipse.egit.core;bundle-version="1.1.0",
- org.eclipse.jgit;bundle-version="[1.1.0,2.0.0)",
+ org.eclipse.egit.core;bundle-version="1.0.0",
+ org.eclipse.jgit;bundle-version="[1.0.0,2.0.0)",
org.eclipse.core.runtime,
org.eclipse.core.resources;bundle-version="[3.7.100,4.0.0)",
org.eclipse.core.filesystem;bundle-version="1.3.100",
14 years, 4 months
JBoss Tools SVN: r34305 - in trunk/as/plugins/org.jboss.ide.eclipse.as.egit.core: src/org/jboss/ide/eclipse/as/egit/core and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-08-25 05:20:29 -0400 (Thu, 25 Aug 2011)
New Revision: 34305
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.egit.core/META-INF/MANIFEST.MF
trunk/as/plugins/org.jboss.ide.eclipse.as.egit.core/src/org/jboss/ide/eclipse/as/egit/core/EGitUtils.java
Log:
[JBIDE-9585] corrected dependencies to EGit 1.0 (was: EGit 1.1): corrected code and manifests
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.egit.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.egit.core/META-INF/MANIFEST.MF 2011-08-25 08:55:26 UTC (rev 34304)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.egit.core/META-INF/MANIFEST.MF 2011-08-25 09:20:29 UTC (rev 34305)
@@ -5,10 +5,10 @@
Bundle-Version: 0.0.1.qualifier
Bundle-Activator: org.jboss.ide.eclipse.as.egit.core.internal.EGitCoreActivator
Require-Bundle: org.jboss.ide.eclipse.as.core;bundle-version="2.3.0",
- org.eclipse.jgit;bundle-version="[1.1.0,2.1.0)",
- org.eclipse.egit;bundle-version="[1.1.0,2.0.0)",
- org.eclipse.egit.core;bundle-version="[1.1.0,2.0.0)",
- org.eclipse.egit.ui;bundle-version="[1.1.0,2.0.0)",
+ org.eclipse.jgit;bundle-version="[1.0.0,2.1.0)",
+ org.eclipse.egit;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.egit.core;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.egit.ui;bundle-version="[1.0.0,2.0.0)",
org.eclipse.team.core;bundle-version="[3.6.0,4.0.0)",
org.eclipse.wst.server.core;bundle-version="[1.1.302,2.0.0)",
org.eclipse.core.resources;bundle-version="[3.7.100,4.0.0)",
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.egit.core/src/org/jboss/ide/eclipse/as/egit/core/EGitUtils.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.egit.core/src/org/jboss/ide/eclipse/as/egit/core/EGitUtils.java 2011-08-25 08:55:26 UTC (rev 34304)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.egit.core/src/org/jboss/ide/eclipse/as/egit/core/EGitUtils.java 2011-08-25 09:20:29 UTC (rev 34305)
@@ -131,15 +131,19 @@
"Repository \"{0}\" has no remote repository with the name \"{1}\"",
repository.toString(), remote));
}
- createPushOperation(remote, repository).run(monitor);
+ createPushOperation(remoteConfig, repository).run(monitor);
} catch (Exception e) {
throw new CoreException(createStatus(e, "Could not push repo {0}", repository.toString()));
}
}
- private static PushOperation createPushOperation(String remoteName, Repository repository) {
- return new PushOperation(repository, remoteName, false, PUSH_TIMEOUT);
- }
+ //
+ // only available in EGit 1.1
+ //
+ // private static PushOperation createPushOperation(String remoteName,
+ // Repository repository) { return new PushOperation(repository, remoteName,
+ // false, PUSH_TIMEOUT); }
+ //
private static PushOperation createPushOperation(RemoteConfig remoteConfig, Repository repository)
throws CoreException {
14 years, 4 months
JBoss Tools SVN: r34304 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2011-08-25 04:55:26 -0400 (Thu, 25 Aug 2011)
New Revision: 34304
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaQueryContainerImpl.java
Log:
https://issues.jboss.org/browse/JBIDE-9436
Fix wrong changed property name for Hibernate queries
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaQueryContainerImpl.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaQueryContainerImpl.java 2011-08-25 08:54:58 UTC (rev 34303)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaQueryContainerImpl.java 2011-08-25 08:55:26 UTC (rev 34304)
@@ -111,12 +111,12 @@
}
protected void removeHibernateNamedQuery_(int index) {
- this.removeItemFromList(index, this.hibernateNamedQueries, NAMED_QUERIES_LIST);
+ this.removeItemFromList(index, this.hibernateNamedQueries, HIBERNATE_NAMED_QUERIES_LIST);
}
public void moveHibernateNamedQuery(int targetIndex, int sourceIndex) {
this.owner.getResourceAnnotatedElement().moveAnnotation(targetIndex, sourceIndex, HibernateNamedQueriesAnnotation.ANNOTATION_NAME);
- this.moveItemInList(targetIndex, sourceIndex, this.hibernateNamedQueries, NAMED_QUERIES_LIST);
+ this.moveItemInList(targetIndex, sourceIndex, this.hibernateNamedQueries, HIBERNATE_NAMED_QUERIES_LIST);
}
protected void initializeHibernateNamedQueries() {
@@ -144,12 +144,12 @@
}
protected void moveHibernateNamedQuery_(int index, HibernateJavaNamedQuery hibernateNamedQuery) {
- this.moveItemInList(index, hibernateNamedQuery, this.hibernateNamedQueries, NAMED_QUERIES_LIST);
+ this.moveItemInList(index, hibernateNamedQuery, this.hibernateNamedQueries, HIBERNATE_NAMED_QUERIES_LIST);
}
protected HibernateJavaNamedQuery addHibernateNamedQuery_(int index, HibernateNamedQueryAnnotation hibernateNamedQueryAnnotation) {
HibernateJavaNamedQuery query = this.buildHibernateNamedQuery(hibernateNamedQueryAnnotation);
- this.addItemToList(index, query, this.hibernateNamedQueries, NAMED_QUERIES_LIST);
+ this.addItemToList(index, query, this.hibernateNamedQueries, HIBERNATE_NAMED_QUERIES_LIST);
return query;
}
@@ -220,12 +220,12 @@
}
protected void removeHibernateNamedNativeQuery_(int index) {
- this.removeItemFromList(index, this.hibernateNamedNativeQueries, NAMED_NATIVE_QUERIES_LIST);
+ this.removeItemFromList(index, this.hibernateNamedNativeQueries, HIBERNATE_NAMED_NATIVE_QUERIES_LIST);
}
public void moveHibernateNamedNativeQuery(int targetIndex, int sourceIndex) {
this.owner.getResourceAnnotatedElement().moveAnnotation(targetIndex, sourceIndex, HibernateNamedNativeQueriesAnnotation.ANNOTATION_NAME);
- this.moveItemInList(targetIndex, sourceIndex, this.hibernateNamedNativeQueries, NAMED_NATIVE_QUERIES_LIST);
+ this.moveItemInList(targetIndex, sourceIndex, this.hibernateNamedNativeQueries, HIBERNATE_NAMED_NATIVE_QUERIES_LIST);
}
protected void initializeHibernateNamedNativeQueries() {
@@ -253,12 +253,12 @@
}
protected void moveHibernateNamedNativeQuery_(int index, HibernateJavaNamedNativeQuery hibernateNamedNativeQuery) {
- this.moveItemInList(index, hibernateNamedNativeQuery, this.hibernateNamedNativeQueries, NAMED_NATIVE_QUERIES_LIST);
+ this.moveItemInList(index, hibernateNamedNativeQuery, this.hibernateNamedNativeQueries, HIBERNATE_NAMED_NATIVE_QUERIES_LIST);
}
protected HibernateJavaNamedNativeQuery addHibernateNamedNativeQuery_(int index, HibernateNamedNativeQueryAnnotation hibernateNamedNativeQueryAnnotation) {
HibernateJavaNamedNativeQuery query = this.buildHibernateNamedNativeQuery(hibernateNamedNativeQueryAnnotation);
- this.addItemToList(index, query, this.hibernateNamedNativeQueries, NAMED_NATIVE_QUERIES_LIST);
+ this.addItemToList(index, query, this.hibernateNamedNativeQueries, HIBERNATE_NAMED_NATIVE_QUERIES_LIST);
return query;
}
14 years, 4 months
JBoss Tools SVN: r34303 - in trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal: mapping/details and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2011-08-25 04:54:58 -0400 (Thu, 25 Aug 2011)
New Revision: 34303
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/details/java/HibernateJavaEntityComposite.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/HibernateUIMappingMessages.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/messages.properties
Log:
https://issues.jboss.org/browse/JBIDE-9436
Externalize strings
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/details/java/HibernateJavaEntityComposite.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/details/java/HibernateJavaEntityComposite.java 2011-08-25 08:54:26 UTC (rev 34302)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/details/java/HibernateJavaEntityComposite.java 2011-08-25 08:54:58 UTC (rev 34303)
@@ -27,6 +27,7 @@
import org.jboss.tools.hibernate.jpt.ui.internal.details.HibernateTableComposite;
import org.jboss.tools.hibernate.jpt.ui.internal.mapping.details.HibernateGenerationComposite;
import org.jboss.tools.hibernate.jpt.ui.internal.mapping.details.HibernateQueriesComposite;
+import org.jboss.tools.hibernate.jpt.ui.internal.mapping.details.HibernateUIMappingMessages;
import org.jboss.tools.hibernate.jpt.ui.internal.mapping.details.TypeDefsComposite;
/**
@@ -54,7 +55,7 @@
protected void initializeTypeDefCollapsibleSection(Composite container) {
container = addCollapsibleSection(
container,
- "Type Definitions");
+ HibernateUIMappingMessages.HibernateJavaEntityComposite_TypeDefinitionsSection);
this.initializeTypeDefsSection(container, buildTypeDefContainerHolder());
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/HibernateUIMappingMessages.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/HibernateUIMappingMessages.java 2011-08-25 08:54:26 UTC (rev 34302)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/HibernateUIMappingMessages.java 2011-08-25 08:54:58 UTC (rev 34303)
@@ -44,6 +44,9 @@
public static String HibernateIdMappingComposite_genericGeneratorSection;
public static String HibernateIdMappingComposite_genericGeneratorCheckBox;
public static String HibernateDiscriminatorColumnComposite_formula;
+
+
+ public static String HibernateJavaEntityComposite_TypeDefinitionsSection;
public static String BasicGeneralSection_generated;
public static String IndexHolderComposite_name;
public static String Index_section_index;
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/messages.properties
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/messages.properties 2011-08-25 08:54:26 UTC (rev 34302)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/messages.properties 2011-08-25 08:54:58 UTC (rev 34303)
@@ -22,6 +22,7 @@
HibernateIdMappingComposite_genericGeneratorSection=Generic Generator
HibernateIdMappingComposite_genericGeneratorCheckBox=Generic generator
HibernateDiscriminatorColumnComposite_formula=Formula:
+HibernateJavaEntityComposite_TypeDefinitionsSection=Type Definitions
BasicGeneralSection_generated = Generation Time:
IndexHolderComposite_name=Name:
Index_section_index=Index
14 years, 4 months
JBoss Tools SVN: r34302 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/resource/java.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2011-08-25 04:54:26 -0400 (Thu, 25 Aug 2011)
New Revision: 34302
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/resource/java/SourceGenericGeneratorsAnnotation.java
Log:
https://issues.jboss.org/browse/JBIDE-9436
Fix classCastException in GenericGenerators annotation
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/resource/java/SourceGenericGeneratorsAnnotation.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/resource/java/SourceGenericGeneratorsAnnotation.java 2011-08-25 04:08:55 UTC (rev 34301)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/resource/java/SourceGenericGeneratorsAnnotation.java 2011-08-25 08:54:26 UTC (rev 34302)
@@ -17,7 +17,6 @@
import org.eclipse.jpt.common.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
import org.eclipse.jpt.common.core.utility.jdt.AnnotatedElement;
import org.eclipse.jpt.common.core.utility.jdt.DeclarationAnnotationAdapter;
-import org.eclipse.jpt.common.core.utility.jdt.Member;
import org.eclipse.jpt.common.utility.internal.CollectionTools;
import org.eclipse.jpt.common.utility.internal.iterables.LiveCloneIterable;
import org.eclipse.jpt.jpa.core.internal.resource.java.source.AnnotationContainerTools;
@@ -33,7 +32,7 @@
* @author Dmitry Geraskov
*
*/
-public class SourceGenericGeneratorsAnnotation extends SourceAnnotation<Member> implements
+public class SourceGenericGeneratorsAnnotation extends SourceAnnotation<AnnotatedElement> implements
GenericGeneratorsAnnotation {
public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
@@ -41,8 +40,8 @@
private final Vector<GenericGeneratorAnnotation> genericGenerators = new Vector<GenericGeneratorAnnotation>();
- public SourceGenericGeneratorsAnnotation(JavaResourceNode parent, Member member) {
- super(parent, member, DECLARATION_ANNOTATION_ADAPTER);
+ public SourceGenericGeneratorsAnnotation(JavaResourceNode parent, AnnotatedElement element) {
+ super(parent, element, DECLARATION_ANNOTATION_ADAPTER);
}
public String getAnnotationName() {
@@ -154,7 +153,7 @@
}
public Annotation buildAnnotation(JavaResourceAnnotatedElement parent, AnnotatedElement annotatedElement) {
- return new SourceGenericGeneratorsAnnotation(parent, (Member) annotatedElement);
+ return new SourceGenericGeneratorsAnnotation(parent, annotatedElement);
}
public Annotation buildNullAnnotation(JavaResourceAnnotatedElement parent) {
14 years, 4 months