JBoss Tools SVN: r23173 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/JBIDE/5908.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2010-07-02 05:24:19 -0400 (Fri, 02 Jul 2010)
New Revision: 23173
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/JBIDE/5908/welcome.xhtml.xml
Log:
https://jira.jboss.org/browse/JBIDE-6542 :
VPE Templates affected by changes in org.eclipse.wst.xml.core.internal.document.ElementImpl
- patch renderFacetAndInsertChildrenTest.patch from Denis Vinnichek for fixing RenderFacetAndInsertChildrenTest is applied.
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/JBIDE/5908/welcome.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/JBIDE/5908/welcome.xhtml.xml 2010-07-02 09:22:54 UTC (rev 23172)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsf2test/WebContent/pages/JBIDE/5908/welcome.xhtml.xml 2010-07-02 09:24:19 UTC (rev 23173)
@@ -32,7 +32,7 @@
<TBODY STYLE="-moz-user-modify: read-only;">
<TR STYLE="-moz-user-modify: read-only;">
<TD CLASS="header_bg" STYLE="-moz-user-modify: read-only;">
- <DIV CLASS="header_content rich-page-header " STYLE="-moz-user-modify: read-only;">
+ <DIV CLASS="header_content rich-page-header #{cc.attrs.headerClass}" STYLE="-moz-user-modify: read-only;">
<SPAN STYLE="display: none; -moz-user-modify: read-only;">
</SPAN>
</DIV>
@@ -47,7 +47,7 @@
STYLE="-moz-user-modify: read-only;">
<TBODY STYLE="-moz-user-modify: read-only;">
<TR STYLE="-moz-user-modify: read-only;">
- <TD CLASS="menu_col rich-page-sidebar " STYLE="-moz-user-modify: read-only;">
+ <TD CLASS="menu_col rich-page-sidebar #{cc.attrs.sidebarClass}" STYLE="-moz-user-modify: read-only;">
<DIV CLASS="menu_width spacer" STYLE="-moz-user-modify: read-only;">
<BR VPE:PSEUDO-ELEMENT="yes"
STYLE="font-style: italic; color: green; -moz-user-modify: read-only;" />
15 years, 9 months
JBoss Tools SVN: r23172 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2010-07-02 05:22:54 -0400 (Fri, 02 Jul 2010)
New Revision: 23172
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSeparatorTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTabPanelTemplate.java
Log:
https://jira.jboss.org/browse/JBIDE-6542 :
VPE Templates affected by changes in org.eclipse.wst.xml.core.internal.document.ElementImpl
- patch separatorAndTabPanel.patch from Denis Vinnichek is applied
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSeparatorTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSeparatorTemplate.java 2010-07-02 08:22:41 UTC (rev 23171)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSeparatorTemplate.java 2010-07-02 09:22:54 UTC (rev 23172)
@@ -78,31 +78,24 @@
nsIDOMElement line = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_DIV);
VpeCreationData creationData = new VpeCreationData(separator);
- String width = sourceElement
- .getAttribute(HtmlComponentUtil.HTML_ATR_WIDTH);
- String height = sourceElement
- .getAttribute(HtmlComponentUtil.HTML_ATR_HEIGHT);
+ String width = sourceElement.hasAttribute(HtmlComponentUtil.HTML_ATR_WIDTH) ? sourceElement.getAttribute(HtmlComponentUtil.HTML_ATR_WIDTH) : null;
+ String height = sourceElement.hasAttribute(HtmlComponentUtil.HTML_ATR_HEIGHT) ? sourceElement.getAttribute(HtmlComponentUtil.HTML_ATR_HEIGHT) : null;
/* Set align for separator */
- String align = sourceElement
- .getAttribute(HtmlComponentUtil.HTML_ALIGN_ATTR);
separator.setAttribute(HtmlComponentUtil.HTML_ALIGN_ATTR,
- (align == null ? DEFAULT_ALIGN : align));
+ sourceElement.hasAttribute(HtmlComponentUtil.HTML_ALIGN_ATTR) ? sourceElement.getAttribute(HtmlComponentUtil.HTML_ALIGN_ATTR) : DEFAULT_ALIGN);
separator.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
"td-parentdiv"); //$NON-NLS-1$
String lineClass = sourceElement.getAttribute("styleClass"); //$NON-NLS-1$
/* Apply class for separator */
String lineType = sourceElement.getAttribute(LINE_TYPE_ATTR);
String style = sourceElement.getAttribute("style"); //$NON-NLS-1$
- if (lineType == null || lineType.equalsIgnoreCase(LINE_BEVELED)) {
+ if (!sourceElement.hasAttribute(LINE_TYPE_ATTR) || lineType.equalsIgnoreCase(LINE_BEVELED)) {
line.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- "dr-table-header rich-table-header-continue" //$NON-NLS-1$
- + (lineClass == null ? "" : lineClass)); //$NON-NLS-1$
+ "dr-table-header rich-table-header-continue" + lineClass); //$NON-NLS-1$
style = setBeveledStyle(width, height, ComponentUtil
- .getHeaderBackgoundImgStyle()
- + ";" + (style == null ? "" : style)); //$NON-NLS-1$ //$NON-NLS-2$
+ .getHeaderBackgoundImgStyle() + ";" + style); //$NON-NLS-1$
} else {
- line.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- (lineClass == null ? "" : lineClass)); //$NON-NLS-1$
+ line.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, lineClass);
style = setStyle(lineType, width, height, style);
line.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
"separator-color"); //$NON-NLS-1$
@@ -121,21 +114,18 @@
nsIDOMElement element = queryInterface(visualNode, nsIDOMElement.class);
nsIDOMElement line = getLineElement(element);
String style = sourceElement.getAttribute(HtmlComponentUtil.HTML_STYLE_ATTR);
- String width = sourceElement.getAttribute(HtmlComponentUtil.HTML_ATR_WIDTH);
+ String width = sourceElement.hasAttribute(HtmlComponentUtil.HTML_ATR_WIDTH) ? sourceElement.getAttribute(HtmlComponentUtil.HTML_ATR_WIDTH) : null;
+ String height = sourceElement.hasAttribute(HtmlComponentUtil.HTML_ATR_HEIGHT) ? sourceElement.getAttribute(HtmlComponentUtil.HTML_ATR_HEIGHT) : null;
String newStyle;
- String height = sourceElement.getAttribute(HtmlComponentUtil.HTML_ATR_HEIGHT);
- String lineType = sourceElement.getAttribute(LINE_TYPE_ATTR);
- if (lineType == null) {
- lineType = LINE_BEVELED;
- }
+ String lineType = sourceElement.hasAttribute(LINE_TYPE_ATTR) ? sourceElement.getAttribute(LINE_TYPE_ATTR) : LINE_BEVELED;
+
if (name.equalsIgnoreCase(HtmlComponentUtil.HTML_ATR_HEIGHT)
|| name.equalsIgnoreCase(LINE_TYPE_ATTR)
|| name.equalsIgnoreCase(HtmlComponentUtil.HTML_ATR_WIDTH)) {
if (lineType != null && lineType.equalsIgnoreCase(LINE_BEVELED)) {
newStyle = setBeveledStyle(width, height, ComponentUtil
- .getHeaderBackgoundImgStyle()
- + ";" + (style == null ? "" : style)); //$NON-NLS-1$ //$NON-NLS-2$
+ .getHeaderBackgoundImgStyle() + ";" + style); //$NON-NLS-1$
} else {
newStyle = setStyle(lineType, (width == null ? DEFAULT_WIDTH
: addPrefixSize(width)),
@@ -173,24 +163,18 @@
visualNode, data, name, value);
nsIDOMElement element = queryInterface(visualNode, nsIDOMElement.class);
nsIDOMElement line = getLineElement(element);
- String style = sourceElement
- .getAttribute(HtmlComponentUtil.HTML_STYLE_ATTR);
- String width = sourceElement
- .getAttribute(HtmlComponentUtil.HTML_ATR_WIDTH);
- String height = sourceElement
- .getAttribute(HtmlComponentUtil.HTML_ATR_HEIGHT);
- String lineType = sourceElement.getAttribute(LINE_TYPE_ATTR);
- if (lineType == null) {
- lineType = LINE_BEVELED;
- }
+ String style = sourceElement.getAttribute(HtmlComponentUtil.HTML_STYLE_ATTR);
+ String width = sourceElement.hasAttribute(HtmlComponentUtil.HTML_ATR_WIDTH) ? sourceElement.getAttribute(HtmlComponentUtil.HTML_ATR_WIDTH) : null;
+ String height = sourceElement.hasAttribute(HtmlComponentUtil.HTML_ATR_HEIGHT) ? sourceElement.getAttribute(HtmlComponentUtil.HTML_ATR_HEIGHT) : null;
+ String lineType = sourceElement.hasAttribute(LINE_TYPE_ATTR) ? sourceElement.getAttribute(LINE_TYPE_ATTR) : LINE_BEVELED;
+
if (name.equalsIgnoreCase(HtmlComponentUtil.HTML_ATR_HEIGHT)) {
if (!isNumber(value) && (value.indexOf(PIXEL_PREFIX)) == -1) {
return;
}
if (lineType.equalsIgnoreCase(LINE_BEVELED)) {
newStyle = setBeveledStyle(width, value, ComponentUtil
- .getHeaderBackgoundImgStyle()
- + ";" + (style == null ? "" : style)); //$NON-NLS-1$ //$NON-NLS-2$
+ .getHeaderBackgoundImgStyle() + ";" + style); //$NON-NLS-1$
} else {
newStyle = setStyle(
lineType,
@@ -205,8 +189,7 @@
}
if (lineType.equalsIgnoreCase(LINE_BEVELED)) {
newStyle = setBeveledStyle(value, height, ComponentUtil
- .getHeaderBackgoundImgStyle()
- + ";" + (style == null ? "" : style)); //$NON-NLS-1$ //$NON-NLS-2$
+ .getHeaderBackgoundImgStyle() + ";" + style); //$NON-NLS-1$
} else {
newStyle = setStyle(lineType, (value == null ? DEFAULT_WIDTH
: addPrefixSize(value)),
@@ -220,8 +203,7 @@
}
if (value.equalsIgnoreCase(LINE_BEVELED)) {
newStyle = setBeveledStyle(width, height, ComponentUtil
- .getHeaderBackgoundImgStyle()
- + ";" + (style == null ? "" : style)); //$NON-NLS-1$ //$NON-NLS-2$
+ .getHeaderBackgoundImgStyle() + ";" + style); //$NON-NLS-1$
} else {
newStyle = setStyle(value, (width == null ? DEFAULT_WIDTH
: addPrefixSize(width)),
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTabPanelTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTabPanelTemplate.java 2010-07-02 08:22:41 UTC (rev 23171)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTabPanelTemplate.java 2010-07-02 09:22:54 UTC (rev 23172)
@@ -121,8 +121,7 @@
img.setAttribute(HTML.ATTR_WIDTH, TWO);
img.setAttribute(HTML.ATTR_HEIGHT, ONE);
img.setAttribute(HTML.ATTR_BORDER, ZERO);
-
- String headerSpacing = sourceElement.getAttribute(HEADER_SPACING);
+
List<Node> children = ComponentUtil.getChildren(sourceElement);
int activeId = getActiveId(sourceElement, children);
int i = 0;
@@ -136,6 +135,7 @@
}
if(child.getNodeName().endsWith(TAB)) {
+ String headerSpacing = sourceElement.hasAttribute(HEADER_SPACING) ? sourceElement.getAttribute(HEADER_SPACING) : ONE;
/*
* Adds spacer before first tab
*/
@@ -218,9 +218,6 @@
ComponentUtil.setImg(spaceImg, SPACER_FILE_PATH);
spaceImg.setAttribute(HTML.ATTR_HEIGHT, ONE);
spaceImg.setAttribute(HTML.ATTR_BORDER, ZERO);
- if(headerSpacing==null) {
- headerSpacing = ONE;
- }
spaceImg.setAttribute(HTML.ATTR_STYLE, "width: " + headerSpacing + Constants.PIXEL); //$NON-NLS-1$
}
@@ -233,7 +230,9 @@
}
if (activeId == -1) {
- activeId = getTabId(children, sourceElement.getAttribute(SELECTED_TAB));
+ if (sourceElement.hasAttribute(SELECTED_TAB)) {
+ activeId = getTabId(children, sourceElement.getAttribute(SELECTED_TAB));
+ }
}
if (activeId == -1)
@@ -258,7 +257,6 @@
}
private int getTabId(List<Node> children, String tabName) {
- if (tabName == null) return -1;
int count = 0;
for (Node child : children) {
if (child.getNodeName().endsWith(TAB)) {
@@ -276,19 +274,17 @@
}
private String getStyle(Element sourceElement) {
-
- String widthAttrValue = sourceElement.getAttribute(HTML.ATTR_WIDTH);
- String heightAttrValue = sourceElement.getAttribute(HTML.ATTR_HEIGHT);
+
String styleAttrValue = sourceElement.getAttribute(HTML.ATTR_STYLE);
- String style = styleAttrValue != null ? styleAttrValue : EMPTY;
+ String style = sourceElement.hasAttribute(HTML.ATTR_STYLE) ? styleAttrValue : EMPTY;
if (!ComponentUtil.parameterPresent(styleAttrValue, HTML.ATTR_WIDTH)) {
- String width = (widthAttrValue != null && widthAttrValue.length() > 0) ? widthAttrValue : "100%"; //$NON-NLS-1$
+ String width = sourceElement.hasAttribute(HTML.ATTR_WIDTH) ? sourceElement.getAttribute(HTML.ATTR_WIDTH) : "100%"; //$NON-NLS-1$
style = ComponentUtil.addParameter(style, "width:" + width); //$NON-NLS-1$
}
if (!ComponentUtil.parameterPresent(styleAttrValue, HTML.ATTR_HEIGHT)) {
- String height = (heightAttrValue != null && heightAttrValue.length() > 0) ? heightAttrValue : EMPTY;
+ String height = sourceElement.hasAttribute(HTML.ATTR_HEIGHT) ? sourceElement.getAttribute(HTML.ATTR_HEIGHT) : EMPTY;
if (height.length() > 0) {
style =ComponentUtil.addParameter(style, "height:" + height); //$NON-NLS-1$
}
@@ -314,11 +310,7 @@
}
private String getHeaderAlignment(Element sourceElement) {
- String headerAlignment = sourceElement.getAttribute(HEADER_ALINGMENT);
- if(headerAlignment==null) {
- headerAlignment = HTML.VALUE_ALIGN_LEFT;
- }
- return headerAlignment;
+ return sourceElement.hasAttribute(HEADER_ALINGMENT) ? sourceElement.getAttribute(HEADER_ALINGMENT) : HTML.VALUE_ALIGN_LEFT;
}
public void toggle(VpeVisualDomBuilder builder, Node sourceNode, String toggleId) {
15 years, 9 months
JBoss Tools SVN: r23171 - in trunk: struts/tests/org.jboss.tools.struts.vpe.struts.test/META-INF and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2010-07-02 04:22:41 -0400 (Fri, 02 Jul 2010)
New Revision: 23171
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/META-INF/MANIFEST.MF
trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/META-INF/MANIFEST.MF
Log:
https://jira.jboss.org/browse/JBIDE-6564 :
Find the reason why VPE JUnits for Struts and Ajax4JSF tests are skipped.
- Bundle-ClassPath of org.jboss.tools.struts.vpe.struts.test and org.jboss.tools.jsf.vpe.ajax4jsf.test has been reset to default
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/META-INF/MANIFEST.MF 2010-07-02 04:33:14 UTC (rev 23170)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/META-INF/MANIFEST.MF 2010-07-02 08:22:41 UTC (rev 23171)
@@ -17,7 +17,6 @@
org.jboss.tools.jsf.vpe.ajax4jsf,
org.jboss.tools.common.el.core
Bundle-ActivationPolicy: lazy
-Bundle-ClassPath: vpe-a4j-test.jar
Export-Package: org.jboss.tools.jsf.vpe.ajax4jsf.test
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/META-INF/MANIFEST.MF 2010-07-02 04:33:14 UTC (rev 23170)
+++ trunk/struts/tests/org.jboss.tools.struts.vpe.struts.test/META-INF/MANIFEST.MF 2010-07-02 08:22:41 UTC (rev 23171)
@@ -15,7 +15,6 @@
org.jboss.tools.vpe.jsp;bundle-version="3.1.0",
org.jboss.tools.vpe.html;bundle-version="3.1.0"
Bundle-ActivationPolicy: lazy
-Bundle-ClassPath: struts-test.jar
Export-Package: org.jboss.tools.struts.vpe.struts.test
Bundle-Vendor: %Bundle-Vendor.0
Bundle-Localization: plugin
15 years, 9 months
JBoss Tools SVN: r23170 - in branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks: gef/tree/figures and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2010-07-02 00:33:14 -0400 (Fri, 02 Jul 2010)
New Revision: 23170
Modified:
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/gef/tree/editparts/TreeNodeConnectionEditPart.java
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/gef/tree/figures/LeftOrRightAnchor.java
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksGraphicalEditorPart.java
Log:
Modified: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/gef/tree/editparts/TreeNodeConnectionEditPart.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/gef/tree/editparts/TreeNodeConnectionEditPart.java 2010-07-02 00:08:51 UTC (rev 23169)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/gef/tree/editparts/TreeNodeConnectionEditPart.java 2010-07-02 04:33:14 UTC (rev 23170)
@@ -303,6 +303,7 @@
}
public PointList getPoints() {
+// if(true) return super.getPoints();
ConnectionAnchor sourceAnchor = getSourceConnectionAnchor();
ConnectionAnchor targetAnchor = getTargetConnectionAnchor();
boolean startLeft = false;
Modified: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/gef/tree/figures/LeftOrRightAnchor.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/gef/tree/figures/LeftOrRightAnchor.java 2010-07-02 00:08:51 UTC (rev 23169)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/gef/tree/figures/LeftOrRightAnchor.java 2010-07-02 04:33:14 UTC (rev 23170)
@@ -3,6 +3,7 @@
import org.eclipse.draw2d.ChopboxAnchor;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.geometry.Point;
+import org.jboss.tools.smooks.graphical.figures.ContainerFigure;
public class LeftOrRightAnchor extends ChopboxAnchor {
@@ -18,9 +19,17 @@
}
public Point getLocation(Point reference) {
+// if(true) return super.getLocation(reference);
Point p;
IFigure hostFigure = getOwner();
IFigure parent = hostFigure.getParent();
+ IFigure containerFigure = hostFigure.getParent();
+ while(containerFigure != null && !(containerFigure instanceof ContainerFigure)){
+ if(containerFigure == null || containerFigure instanceof ContainerFigure){
+ break;
+ }
+ containerFigure = containerFigure.getParent();
+ }
while(parent != null && !(parent instanceof TreeContainerFigure)){
if(parent == null || parent instanceof TreeContainerFigure){
break;
Modified: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksGraphicalEditorPart.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksGraphicalEditorPart.java 2010-07-02 00:08:51 UTC (rev 23169)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksGraphicalEditorPart.java 2010-07-02 04:33:14 UTC (rev 23170)
@@ -19,7 +19,9 @@
import java.util.Map;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.draw2d.ConnectionLayer;
import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.ViewportAwareConnectionLayerClippingStrategy;
import org.eclipse.draw2d.geometry.Point;
import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.draw2d.graph.DirectedGraph;
@@ -46,6 +48,7 @@
import org.eclipse.gef.EditPartFactory;
import org.eclipse.gef.GraphicalEditPart;
import org.eclipse.gef.GraphicalViewer;
+import org.eclipse.gef.LayerConstants;
import org.eclipse.gef.Request;
import org.eclipse.gef.commands.CommandStack;
import org.eclipse.gef.commands.CommandStackEvent;
@@ -65,10 +68,6 @@
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ControlEvent;
-import org.eclipse.swt.events.ControlListener;
-import org.eclipse.swt.events.PaintEvent;
-import org.eclipse.swt.events.PaintListener;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
@@ -95,6 +94,8 @@
import org.jboss.tools.smooks.gef.tree.editparts.TreeNodeEditPart;
import org.jboss.tools.smooks.gef.tree.figures.GraphAnimation;
import org.jboss.tools.smooks.gef.tree.figures.IMoveableModel;
+import org.jboss.tools.smooks.gef.tree.figures.TreeContainerFigure;
+import org.jboss.tools.smooks.gef.tree.figures.TreeNodeFigure;
import org.jboss.tools.smooks.gef.tree.model.TreeContainerModel;
import org.jboss.tools.smooks.gef.tree.model.TreeNodeConnection;
import org.jboss.tools.smooks.gef.tree.model.TreeNodeModel;
@@ -123,7 +124,8 @@
* @author Dart
*
*/
-public class SmooksGraphicalEditorPart extends GraphicalEditor implements ISelectionChangedListener, ISourceSynchronizeListener,
+public class SmooksGraphicalEditorPart extends GraphicalEditor implements
+ ISelectionChangedListener, ISourceSynchronizeListener,
IGraphicalEditorPart, ITaskNodeProvider, ISmooksModelValidateListener {
private CommandStackListener emfCommandStackListener = null;
@@ -180,12 +182,13 @@
}
});
- this.editDomain.getCommandStack().addCommandStackEventListener(new CommandStackEventListener() {
+ this.editDomain.getCommandStack().addCommandStackEventListener(
+ new CommandStackEventListener() {
- public void stackChanged(CommandStackEvent event) {
- firePropertyChange(PROP_DIRTY);
- }
- });
+ public void stackChanged(CommandStackEvent event) {
+ firePropertyChange(PROP_DIRTY);
+ }
+ });
this.smooksModelProvider = provider;
this.setEditDomain(editDomain);
@@ -195,48 +198,70 @@
private void createEMFCommandStackListener() {
emfCommandStackListener = new org.eclipse.emf.common.command.CommandStackListener() {
public void commandStackChanged(EventObject event) {
- final Command mostRecentCommand = ((org.eclipse.emf.common.command.CommandStack) event.getSource()).getMostRecentCommand();
+ final Command mostRecentCommand = ((org.eclipse.emf.common.command.CommandStack) event
+ .getSource()).getMostRecentCommand();
final EventObject fe = event;
- getEditorSite().getShell().getDisplay().asyncExec(new Runnable() {
- public void run() {
- if (mostRecentCommand != null) {
- Command rawCommand = mostRecentCommand;
- while (rawCommand instanceof CommandWrapper) {
- rawCommand = ((CommandWrapper) rawCommand).getCommand();
- }
- int commandType = EXECUTE_COMMAND;
- Command undoCommand = ((org.eclipse.emf.common.command.CommandStack) fe.getSource()).getUndoCommand();
- Command redoCommand = ((org.eclipse.emf.common.command.CommandStack) fe.getSource()).getRedoCommand();
- if (undoCommand != null || rawCommand.equals(undoCommand)) {
- commandType = EXECUTE_COMMAND;
- }
- if (redoCommand != null || rawCommand.equals(redoCommand)) {
- commandType = UNDO_COMMAND;
- }
- if (rawCommand instanceof CompoundCommand) {
- List<Command> commandList = ((CompoundCommand) rawCommand).getCommandList();
- for (Iterator<?> iterator = commandList.iterator(); iterator.hasNext();) {
- Command command = (Command) iterator.next();
- while (command instanceof CommandWrapper) {
- command = ((CommandWrapper) command).getCommand();
+ getEditorSite().getShell().getDisplay()
+ .asyncExec(new Runnable() {
+ public void run() {
+ if (mostRecentCommand != null) {
+ Command rawCommand = mostRecentCommand;
+ while (rawCommand instanceof CommandWrapper) {
+ rawCommand = ((CommandWrapper) rawCommand)
+ .getCommand();
}
- handleInputParamChange(command);
- if (command instanceof SetCommand || command instanceof AddCommand || command instanceof DeleteCommand
- || command instanceof RemoveCommand) {
- refershRecentAffectedModel(command, command.getAffectedObjects(), commandType);
+ int commandType = EXECUTE_COMMAND;
+ Command undoCommand = ((org.eclipse.emf.common.command.CommandStack) fe
+ .getSource()).getUndoCommand();
+ Command redoCommand = ((org.eclipse.emf.common.command.CommandStack) fe
+ .getSource()).getRedoCommand();
+ if (undoCommand != null
+ || rawCommand.equals(undoCommand)) {
+ commandType = EXECUTE_COMMAND;
}
+ if (redoCommand != null
+ || rawCommand.equals(redoCommand)) {
+ commandType = UNDO_COMMAND;
+ }
+ if (rawCommand instanceof CompoundCommand) {
+ List<Command> commandList = ((CompoundCommand) rawCommand)
+ .getCommandList();
+ for (Iterator<?> iterator = commandList
+ .iterator(); iterator.hasNext();) {
+ Command command = (Command) iterator
+ .next();
+ while (command instanceof CommandWrapper) {
+ command = ((CommandWrapper) command)
+ .getCommand();
+ }
+ handleInputParamChange(command);
+ if (command instanceof SetCommand
+ || command instanceof AddCommand
+ || command instanceof DeleteCommand
+ || command instanceof RemoveCommand) {
+ refershRecentAffectedModel(
+ command,
+ command.getAffectedObjects(),
+ commandType);
+ }
+ }
+ } else {
+ if (rawCommand instanceof SetCommand
+ || rawCommand instanceof AddCommand
+ || rawCommand instanceof DeleteCommand
+ || rawCommand instanceof RemoveCommand) {
+ handleInputParamChange(rawCommand);
+ refershRecentAffectedModel(
+ rawCommand,
+ mostRecentCommand
+ .getAffectedObjects(),
+ commandType);
+ }
+ }
}
- } else {
- if (rawCommand instanceof SetCommand || rawCommand instanceof AddCommand
- || rawCommand instanceof DeleteCommand || rawCommand instanceof RemoveCommand) {
- handleInputParamChange(rawCommand);
- refershRecentAffectedModel(rawCommand, mostRecentCommand.getAffectedObjects(), commandType);
- }
}
- }
- }
- });
+ });
}
};
}
@@ -261,7 +286,8 @@
IEditorSite site = getEditorSite();
if (site instanceof SmooksTaskDetailsEditorSite) {
- FormPage page = ((SmooksTaskDetailsEditorSite) site).getParentEditor();
+ FormPage page = ((SmooksTaskDetailsEditorSite) site)
+ .getParentEditor();
FormToolkit tool = page.getManagedForm().getToolkit();
Composite mainComposite = tool.createComposite(parent);
mainComposite.setBackground(tool.getColors().getBorderColor());
@@ -280,7 +306,8 @@
return super.getGraphicalViewer();
}
- private void handleCommandStack(org.eclipse.emf.common.command.CommandStack commandStack) {
+ private void handleCommandStack(
+ org.eclipse.emf.common.command.CommandStack commandStack) {
if (emfCommandStackListener != null) {
commandStack.addCommandStackListener(emfCommandStackListener);
}
@@ -294,7 +321,8 @@
@Override
public void dispose() {
if (smooksModelProvider != null) {
- smooksModelProvider.getEditingDomain().getCommandStack().removeCommandStackListener(emfCommandStackListener);
+ smooksModelProvider.getEditingDomain().getCommandStack()
+ .removeCommandStackListener(emfCommandStackListener);
}
super.dispose();
}
@@ -302,7 +330,8 @@
protected void autoLayoutWhenCommandChange(Command command) {
Collection<?> affectedObjects = command.getAffectedObjects();
boolean refreshInputModel = false;
- for (Iterator<?> iterator2 = affectedObjects.iterator(); iterator2.hasNext();) {
+ for (Iterator<?> iterator2 = affectedObjects.iterator(); iterator2
+ .hasNext();) {
Object object = (Object) iterator2.next();
if (command instanceof AddCommand) {
if (needToLayoutWhenAddModel(object)) {
@@ -318,7 +347,8 @@
deletedObjs = ((RemoveCommand) command).getCollection();
}
if (deletedObjs != null) {
- for (Iterator<?> iterator = deletedObjs.iterator(); iterator.hasNext();) {
+ for (Iterator<?> iterator = deletedObjs.iterator(); iterator
+ .hasNext();) {
Object object2 = (Object) iterator.next();
if (needToLayoutWhenRemoveModel(object2)) {
refreshInputModel = true;
@@ -346,7 +376,8 @@
protected void handleInputParamChange(Command command) {
Collection<?> affectedObjects = command.getAffectedObjects();
boolean refreshInputModel = false;
- for (Iterator<?> iterator2 = affectedObjects.iterator(); iterator2.hasNext();) {
+ for (Iterator<?> iterator2 = affectedObjects.iterator(); iterator2
+ .hasNext();) {
Object object = (Object) iterator2.next();
if (object instanceof ParamType) {
if (SmooksUIUtils.isInputParamType((ParamType) object)) {
@@ -366,7 +397,8 @@
deletedObjs = ((RemoveCommand) command).getCollection();
}
if (deletedObjs != null) {
- for (Iterator<?> iterator = deletedObjs.iterator(); iterator.hasNext();) {
+ for (Iterator<?> iterator = deletedObjs.iterator(); iterator
+ .hasNext();) {
Object object2 = (Object) iterator.next();
if (object2 instanceof ParamType) {
if (SmooksUIUtils.isInputParamType((ParamType) object2)) {
@@ -401,7 +433,8 @@
return new ConnectionModelFactoryImpl();
}
- public void setConnectionModelFactory(ConnectionModelFactory connectionModelFactory) {
+ public void setConnectionModelFactory(
+ ConnectionModelFactory connectionModelFactory) {
this.connectionModelFactory = connectionModelFactory;
}
@@ -416,7 +449,8 @@
return new GraphicalModelFactoryImpl();
}
- public void setGraphicalModelFactory(GraphicalModelFactoryImpl graphicalModelFactory) {
+ public void setGraphicalModelFactory(
+ GraphicalModelFactoryImpl graphicalModelFactory) {
this.graphicalModelFactory = graphicalModelFactory;
}
@@ -429,29 +463,40 @@
getSelectionActions().add(autoLayout.getId());
}
- private void deleteRelatedConnection(AbstractSmooksGraphicalModel effecedNode, EStructuralFeature feature, SetCommand command) {
- EObject data = (EObject) AdapterFactoryEditingDomain.unwrap(effecedNode.getData());
+ private void deleteRelatedConnection(
+ AbstractSmooksGraphicalModel effecedNode,
+ EStructuralFeature feature, SetCommand command) {
+ EObject data = (EObject) AdapterFactoryEditingDomain.unwrap(effecedNode
+ .getData());
if (feature.equals(SmooksUIUtils.getBeanIDRefFeature(data))) {
- List<TreeNodeConnection> sourceConnections = effecedNode.getSourceConnections();
- List<TreeNodeConnection> temp = new ArrayList<TreeNodeConnection>(sourceConnections);
+ List<TreeNodeConnection> sourceConnections = effecedNode
+ .getSourceConnections();
+ List<TreeNodeConnection> temp = new ArrayList<TreeNodeConnection>(
+ sourceConnections);
for (Iterator<?> iterator = temp.iterator(); iterator.hasNext();) {
- TreeNodeConnection treeNodeConnection = (TreeNodeConnection) iterator.next();
- AbstractSmooksGraphicalModel target = treeNodeConnection.getTargetNode();
+ TreeNodeConnection treeNodeConnection = (TreeNodeConnection) iterator
+ .next();
+ AbstractSmooksGraphicalModel target = treeNodeConnection
+ .getTargetNode();
Object refValue = command.getValue();
if (refValue == null)
continue;
String refID = refValue.toString();
- Object targetModel = AdapterFactoryEditingDomain.unwrap(target.getData());
+ Object targetModel = AdapterFactoryEditingDomain.unwrap(target
+ .getData());
if (targetModel instanceof EObject) {
- EStructuralFeature idfeature = SmooksUIUtils.getBeanIDFeature((EObject) targetModel);
+ EStructuralFeature idfeature = SmooksUIUtils
+ .getBeanIDFeature((EObject) targetModel);
if (idfeature == null)
continue;
Object iddata = ((EObject) targetModel).eGet(idfeature);
if (iddata != null) {
if (refID == null || !refID.equals(iddata)) {
- target.getTargetConnections().remove(treeNodeConnection);
- effecedNode.getSourceConnections().remove(treeNodeConnection);
+ target.getTargetConnections().remove(
+ treeNodeConnection);
+ effecedNode.getSourceConnections().remove(
+ treeNodeConnection);
target.fireConnectionChanged();
}
}
@@ -460,22 +505,31 @@
}
if (feature.equals(SmooksUIUtils.getBeanIDFeature(data))) {
- List<TreeNodeConnection> targetConnections = effecedNode.getTargetConnections();
- List<TreeNodeConnection> temp = new ArrayList<TreeNodeConnection>(targetConnections);
+ List<TreeNodeConnection> targetConnections = effecedNode
+ .getTargetConnections();
+ List<TreeNodeConnection> temp = new ArrayList<TreeNodeConnection>(
+ targetConnections);
for (Iterator<?> iterator = temp.iterator(); iterator.hasNext();) {
- TreeNodeConnection treeNodeConnection = (TreeNodeConnection) iterator.next();
- AbstractSmooksGraphicalModel source = treeNodeConnection.getSourceNode();
+ TreeNodeConnection treeNodeConnection = (TreeNodeConnection) iterator
+ .next();
+ AbstractSmooksGraphicalModel source = treeNodeConnection
+ .getSourceNode();
String beanID = command.getValue().toString();
- Object sourceModel = AdapterFactoryEditingDomain.unwrap(source.getData());
+ Object sourceModel = AdapterFactoryEditingDomain.unwrap(source
+ .getData());
if (sourceModel instanceof EObject) {
- EStructuralFeature idRefFeature = SmooksUIUtils.getBeanIDRefFeature((EObject) sourceModel);
+ EStructuralFeature idRefFeature = SmooksUIUtils
+ .getBeanIDRefFeature((EObject) sourceModel);
if (idRefFeature == null)
continue;
- Object idRefData = ((EObject) sourceModel).eGet(idRefFeature);
+ Object idRefData = ((EObject) sourceModel)
+ .eGet(idRefFeature);
if (idRefData != null) {
if (beanID == null || !beanID.equals(idRefData)) {
- source.getSourceConnections().remove(treeNodeConnection);
- effecedNode.getTargetConnections().remove(treeNodeConnection);
+ source.getSourceConnections().remove(
+ treeNodeConnection);
+ effecedNode.getTargetConnections().remove(
+ treeNodeConnection);
source.fireConnectionChanged();
}
}
@@ -484,27 +538,37 @@
}
if (feature.equals(SmooksUIUtils.getSelectorFeature(data))) {
- List<TreeNodeConnection> targetConnections = effecedNode.getTargetConnections();
- List<TreeNodeConnection> temp = new ArrayList<TreeNodeConnection>(targetConnections);
+ List<TreeNodeConnection> targetConnections = effecedNode
+ .getTargetConnections();
+ List<TreeNodeConnection> temp = new ArrayList<TreeNodeConnection>(
+ targetConnections);
for (Iterator<?> iterator = temp.iterator(); iterator.hasNext();) {
- TreeNodeConnection treeNodeConnection = (TreeNodeConnection) iterator.next();
- AbstractSmooksGraphicalModel source = treeNodeConnection.getSourceNode();
- if (source instanceof InputDataContianerModel || source instanceof InputDataTreeNodeModel) {
+ TreeNodeConnection treeNodeConnection = (TreeNodeConnection) iterator
+ .next();
+ AbstractSmooksGraphicalModel source = treeNodeConnection
+ .getSourceNode();
+ if (source instanceof InputDataContianerModel
+ || source instanceof InputDataTreeNodeModel) {
String selector = command.getValue().toString();
- Object sourceModel = AdapterFactoryEditingDomain.unwrap(source.getData());
+ Object sourceModel = AdapterFactoryEditingDomain
+ .unwrap(source.getData());
if (sourceModel instanceof IXMLStructuredObject) {
- IXMLStructuredObject root = SmooksUIUtils.getRootParent((IXMLStructuredObject) sourceModel);
+ IXMLStructuredObject root = SmooksUIUtils
+ .getRootParent((IXMLStructuredObject) sourceModel);
Object oldNode = null;
try {
- oldNode = SmooksUIUtils.localXMLNodeWithPath(selector, root);
+ oldNode = SmooksUIUtils.localXMLNodeWithPath(
+ selector, root);
} catch (Throwable t) {
}
if (oldNode == sourceModel) {
break;
} else {
- source.getSourceConnections().remove(treeNodeConnection);
- effecedNode.getTargetConnections().remove(treeNodeConnection);
+ source.getSourceConnections().remove(
+ treeNodeConnection);
+ effecedNode.getTargetConnections().remove(
+ treeNodeConnection);
source.fireConnectionChanged();
}
}
@@ -521,43 +585,56 @@
* @param affectedObjects
* @param commandType
*/
- protected void refershRecentAffectedModel(Command command, Collection<?> affectedObjects, int commandType) {
- for (Iterator<?> iterator = affectedObjects.iterator(); iterator.hasNext();) {
+ protected void refershRecentAffectedModel(Command command,
+ Collection<?> affectedObjects, int commandType) {
+ for (Iterator<?> iterator = affectedObjects.iterator(); iterator
+ .hasNext();) {
Object object = (Object) iterator.next();
object = AdapterFactoryEditingDomain.unwrap(object);
if (commandType == EXECUTE_COMMAND || commandType == REDO_COMMAND) {
if (object instanceof SmooksResourceListType) {
if (command instanceof AddCommand) {
- Collection<?> colletion = ((AddCommand) command).getCollection();
- for (Iterator<?> iterator2 = colletion.iterator(); iterator2.hasNext();) {
+ Collection<?> colletion = ((AddCommand) command)
+ .getCollection();
+ for (Iterator<?> iterator2 = colletion.iterator(); iterator2
+ .hasNext();) {
Object childModel = (Object) iterator2.next();
- childModel = AdapterFactoryEditingDomain.unwrap(childModel);
+ childModel = AdapterFactoryEditingDomain
+ .unwrap(childModel);
AbstractSmooksGraphicalModel graphModel = createGraphModel(childModel);
if (graphModel == null)
continue;
- root.getTargetContainerModel().addTreeNode(graphModel);
+ root.getTargetContainerModel().addTreeNode(
+ graphModel);
applyGraphicalInformation(graphModel);
Collection<TreeNodeConnection> connections = createAllConnection(graphModel);
expandConnectedModels(connections);
}
}
- if (command instanceof DeleteCommand || command instanceof RemoveCommand) {
+ if (command instanceof DeleteCommand
+ || command instanceof RemoveCommand) {
Collection<?> colletion = null;
if (command instanceof DeleteCommand) {
- colletion = ((DeleteCommand) command).getCollection();
+ colletion = ((DeleteCommand) command)
+ .getCollection();
}
if (command instanceof RemoveCommand) {
- colletion = ((RemoveCommand) command).getCollection();
+ colletion = ((RemoveCommand) command)
+ .getCollection();
}
- for (Iterator<?> iterator2 = colletion.iterator(); iterator2.hasNext();) {
+ for (Iterator<?> iterator2 = colletion.iterator(); iterator2
+ .hasNext();) {
Object childModel = (Object) iterator2.next();
- childModel = AdapterFactoryEditingDomain.unwrap(childModel);
+ childModel = AdapterFactoryEditingDomain
+ .unwrap(childModel);
AbstractSmooksGraphicalModel graphModel = findGraphicalModel(childModel);
if (graphModel == null)
continue;
- AbstractSmooksGraphicalModel.disconnectAllConnections(graphModel);
- root.getTargetContainerModel().removeTreeNode(graphModel);
+ AbstractSmooksGraphicalModel
+ .disconnectAllConnections(graphModel);
+ root.getTargetContainerModel().removeTreeNode(
+ graphModel);
}
}
} else {
@@ -568,9 +645,11 @@
continue;
}
node.fireVisualChanged();
- EStructuralFeature feature = ((SetCommand) command).getFeature();
+ EStructuralFeature feature = ((SetCommand) command)
+ .getFeature();
if (SmooksUIUtils.isRelatedConnectionFeature(feature)) {
- deleteRelatedConnection(node, feature, (SetCommand) command);
+ deleteRelatedConnection(node, feature,
+ (SetCommand) command);
Collection<TreeNodeConnection> connections = createConnection(node);
node.fireConnectionChanged();
expandConnectedModels(connections);
@@ -584,7 +663,8 @@
if (graphModel == null)
continue;
try {
- root.getTargetContainerModel().addTreeNode(graphModel);
+ root.getTargetContainerModel().addTreeNode(
+ graphModel);
} catch (Throwable t) {
t.printStackTrace();
}
@@ -603,7 +683,8 @@
node.fireChildrenChanged();
node.fireConnectionChanged();
}
- if (command instanceof DeleteCommand || command instanceof RemoveCommand) {
+ if (command instanceof DeleteCommand
+ || command instanceof RemoveCommand) {
if (node != null) {
node.fireChildrenChanged();
}
@@ -617,13 +698,17 @@
AbstractSmooksGraphicalModel node = findGraphicalModel(object);
if (command instanceof AddCommand) {
if (object instanceof SmooksResourceListType) {
- Collection<?> cccc = ((AddCommand) command).getCollection();
- for (Iterator<?> iterator2 = cccc.iterator(); iterator2.hasNext();) {
+ Collection<?> cccc = ((AddCommand) command)
+ .getCollection();
+ for (Iterator<?> iterator2 = cccc.iterator(); iterator2
+ .hasNext();) {
Object object2 = (Object) iterator2.next();
- object2 = AdapterFactoryEditingDomain.unwrap(object2);
+ object2 = AdapterFactoryEditingDomain
+ .unwrap(object2);
AbstractSmooksGraphicalModel gmodel = findGraphicalModel(object2);
if (gmodel != null) {
- root.getTargetContainerModel().removeTreeNode(gmodel);
+ root.getTargetContainerModel().removeTreeNode(
+ gmodel);
break;
}
}
@@ -638,15 +723,18 @@
continue;
}
node.fireVisualChanged();
- EStructuralFeature feature = ((SetCommand) command).getFeature();
+ EStructuralFeature feature = ((SetCommand) command)
+ .getFeature();
if (SmooksUIUtils.isRelatedConnectionFeature(feature)) {
- deleteRelatedConnection(node, feature, (SetCommand) command);
+ deleteRelatedConnection(node, feature,
+ (SetCommand) command);
Collection<TreeNodeConnection> connections = createConnection(node);
node.fireConnectionChanged();
expandConnectedModels(connections);
}
}
- if (command instanceof DeleteCommand || command instanceof RemoveCommand) {
+ if (command instanceof DeleteCommand
+ || command instanceof RemoveCommand) {
Collection<?> cccc = null;
if (command instanceof DeleteCommand) {
cccc = ((DeleteCommand) command).getCollection();
@@ -654,19 +742,22 @@
if (command instanceof RemoveCommand) {
cccc = ((RemoveCommand) command).getCollection();
}
- for (Iterator<?> iterator2 = cccc.iterator(); iterator2.hasNext();) {
+ for (Iterator<?> iterator2 = cccc.iterator(); iterator2
+ .hasNext();) {
Object object2 = (Object) iterator2.next();
object2 = AdapterFactoryEditingDomain.unwrap(object2);
// it means that it's deletecommand undo
if (object == object2) {
EObject owner = ((EObject) object).eContainer();
if (owner instanceof SmooksResourceListType) {
- object = AdapterFactoryEditingDomain.unwrap(object);
+ object = AdapterFactoryEditingDomain
+ .unwrap(object);
AbstractSmooksGraphicalModel graphModel = createGraphModel(object);
if (graphModel == null)
continue;
node = graphModel;
- root.getTargetContainerModel().addTreeNode(graphModel);
+ root.getTargetContainerModel().addTreeNode(
+ graphModel);
Collection<TreeNodeConnection> connections = createAllConnection(graphModel);
expandConnectedModels(connections);
applyGraphicalInformation(graphModel);
@@ -713,34 +804,70 @@
super.configureGraphicalViewer();
getGraphicalViewer().setEditDomain(editDomain);
getGraphicalViewer().setEditPartFactory(createEdtiPartFactory());
- getGraphicalViewer().getControl().addControlListener(new ControlListener() {
- public void controlResized(ControlEvent e) {
- }
+ getGraphicalViewer().setRootEditPart(
+ new FreeformGraphicalRootEditPart() {
+ public DragTracker getDragTracker(Request req) {
+ return new RightClickSelectMarqueeDragTraker();
+ }
+ });
- public void controlMoved(ControlEvent e) {
- // TODO Auto-generated method stub
+ ConnectionLayer connectionLayer = (ConnectionLayer) ((FreeformGraphicalRootEditPart) getGraphicalViewer()
+ .getRootEditPart()).getLayer(LayerConstants.CONNECTION_LAYER);
+ connectionLayer
+ .setClippingStrategy(new ViewportAwareConnectionLayerClippingStrategy(
+ connectionLayer) {
+ protected Rectangle getAbsoluteBoundsAsCopy(IFigure figure) {
- }
- });
- getGraphicalViewer().getControl().addPaintListener(new PaintListener() {
+ Rectangle absoluteFigureBounds = figure.getBounds()
+ .getCopy();
+ figure.translateToAbsolute(absoluteFigureBounds);
- public void paintControl(PaintEvent e) {
- // ((AbstractGraphicalEditPart)getGraphicalViewer().getRootEditPart()).getFigure().getLayoutManager().layout(null);
- }
- });
+ IFigure parent = figure;
+ while(parent != null && !(parent instanceof TreeContainerFigure)){
+ parent = parent.getParent();
+ }
+ if (parent != null && parent instanceof TreeContainerFigure) {
+ Rectangle pr = parent.getBounds().getCopy();
+ parent.translateToAbsolute(pr);
+// absoluteFigureBounds.y = absoluteFigureBounds.y - 4;
+ absoluteFigureBounds.x = pr.x - 7;
+ absoluteFigureBounds.width = pr.width+14;
+ }else{
+ parent = figure;
+ while (parent != null
+ && !(parent instanceof TreeNodeFigure)) {
+ parent = parent.getParent();
+ }
+ if (parent != null && parent instanceof TreeNodeFigure) {
+ while (parent != null
+ && !(parent instanceof TreeContainerFigure)) {
+ parent = parent.getParent();
+ }
+ if (parent instanceof TreeContainerFigure) {
+ Rectangle pr = parent.getBounds().getCopy();
+ parent.translateToAbsolute(pr);
+// absoluteFigureBounds.y = absoluteFigureBounds.y - 4;
+ absoluteFigureBounds.x = pr.x - 7;
+ absoluteFigureBounds.width = pr.width+14;
+ }
+ }
+ }
+
- getGraphicalViewer().setRootEditPart(new FreeformGraphicalRootEditPart() {
- public DragTracker getDragTracker(Request req) {
- return new RightClickSelectMarqueeDragTraker();
- }
- });
+ return absoluteFigureBounds;
+ }
+ });
- getGraphicalViewer().addDropTargetListener(
- (TransferDropTargetListener) new TemplateTransferDropTargetListener(getGraphicalViewer()));
+ getGraphicalViewer()
+ .addDropTargetListener(
+ (TransferDropTargetListener) new TemplateTransferDropTargetListener(
+ getGraphicalViewer()));
- GraphicalViewerKeyHandler keyHandler = new GraphicalViewerKeyHandler(getGraphicalViewer());
- keyHandler.put(org.eclipse.gef.KeyStroke.getPressed(SWT.DEL, 0), this.getActionRegistry().getAction(ActionFactory.DELETE.getId()));
+ GraphicalViewerKeyHandler keyHandler = new GraphicalViewerKeyHandler(
+ getGraphicalViewer());
+ keyHandler.put(org.eclipse.gef.KeyStroke.getPressed(SWT.DEL, 0), this
+ .getActionRegistry().getAction(ActionFactory.DELETE.getId()));
ContextMenuProvider provider = getContextMenuProvider();
getGraphicalViewer().setContextMenu(provider);
@@ -749,7 +876,8 @@
}
protected ContextMenuProvider getContextMenuProvider() {
- return new SmooksGraphicalEditorMenuContextProvider(getGraphicalViewer(), this.getActionRegistry());
+ return new SmooksGraphicalEditorMenuContextProvider(
+ getGraphicalViewer(), this.getActionRegistry());
}
private void hookSelectionActions() {
@@ -757,7 +885,8 @@
while (actions.hasNext()) {
Object action = actions.next();
if (action instanceof SelectionAction) {
- ((SelectionAction) action).setSelectionProvider(getGraphicalViewer());
+ ((SelectionAction) action)
+ .setSelectionProvider(getGraphicalViewer());
}
}
}
@@ -768,7 +897,8 @@
InputSourceContainerModel tcontainer = new InputSourceContainerModel();
root.setSourceContainerModel(tcontainer);
root.addTreeNode(tcontainer);
- for (Iterator<?> iterator = inputDataList.iterator(); iterator.hasNext();) {
+ for (Iterator<?> iterator = inputDataList.iterator(); iterator
+ .hasNext();) {
Object object = (Object) iterator.next();
ITreeContentProvider contentProvider = new XMLStructuredDataContentProvider();
ILabelProvider labelProvider = new XMLStructuredDataLabelProvider();
@@ -781,7 +911,8 @@
}
containerModel.getChildren().add((IXMLStructuredObject) object);
if (containerModel != null) {
- TreeContainerModel container = new InputDataContianerModel(containerModel, contentProvider, labelProvider,
+ TreeContainerModel container = new InputDataContianerModel(
+ containerModel, contentProvider, labelProvider,
getSmooksModelProvider());
tcontainer.addTreeNode(container);
inputGraphModel.add(container);
@@ -794,7 +925,8 @@
@Override
protected void hookGraphicalViewer() {
getSelectionSynchronizer().addViewer(getGraphicalViewer());
- getGraphicalViewer().addSelectionChangedListener(getSelectionSynchronizer());
+ getGraphicalViewer().addSelectionChangedListener(
+ getSelectionSynchronizer());
getGraphicalViewer().addSelectionChangedListener(this);
}
@@ -811,10 +943,13 @@
OutputTargetModel targetContainer = new OutputTargetModel();
root.addTreeNode(targetContainer);
root.setTargetContainerModel(targetContainer);
- AdapterFactoryEditingDomain editingDomain = (AdapterFactoryEditingDomain) smooksModelProvider.getEditingDomain();
- if (inputDataList != null && obj != null && obj instanceof DocumentRoot && editingDomain != null) {
+ AdapterFactoryEditingDomain editingDomain = (AdapterFactoryEditingDomain) smooksModelProvider
+ .getEditingDomain();
+ if (inputDataList != null && obj != null && obj instanceof DocumentRoot
+ && editingDomain != null) {
createInputDataGraphModel();
- SmooksResourceListType listType = ((DocumentRoot) obj).getSmooksResourceList();
+ SmooksResourceListType listType = ((DocumentRoot) obj)
+ .getSmooksResourceList();
List<?> arcList = listType.getAbstractResourceConfig();
for (Iterator<?> iterator = arcList.iterator(); iterator.hasNext();) {
Object object = (Object) iterator.next();
@@ -838,15 +973,18 @@
this.autoLayout(false);
- List<Diagnostic> diagnosticList = this.getSmooksModelProvider().getDiagnosticList();
+ List<Diagnostic> diagnosticList = this.getSmooksModelProvider()
+ .getDiagnosticList();
this.validateEnd(diagnosticList);
}
protected AbstractSmooksGraphicalModel createGraphModel(Object model) {
GraphicalModelFactory factory = getGraphicalModelFactory();
if (factory != null) {
- Object gmodel = factory.createGraphicalModel(model, smooksModelProvider);
- if (gmodel != null && gmodel instanceof AbstractSmooksGraphicalModel) {
+ Object gmodel = factory.createGraphicalModel(model,
+ smooksModelProvider);
+ if (gmodel != null
+ && gmodel instanceof AbstractSmooksGraphicalModel) {
AbstractSmooksGraphicalModel graphicalModel = (AbstractSmooksGraphicalModel) gmodel;
return graphicalModel;
}
@@ -859,7 +997,8 @@
if (root != null) {
List<AbstractSmooksGraphicalModel> children = new ArrayList<AbstractSmooksGraphicalModel>();
List<?> containers = root.getChildren();
- for (Iterator<?> iterator = containers.iterator(); iterator.hasNext();) {
+ for (Iterator<?> iterator = containers.iterator(); iterator
+ .hasNext();) {
Object object = (Object) iterator.next();
if (object instanceof RootModel) {
children.addAll(((RootModel) object).getChildren());
@@ -870,7 +1009,8 @@
return connections;
}
- protected Collection<TreeNodeConnection> createAllConnection(AbstractSmooksGraphicalModel model) {
+ protected Collection<TreeNodeConnection> createAllConnection(
+ AbstractSmooksGraphicalModel model) {
try {
if (model == null)
return null;
@@ -898,13 +1038,15 @@
}
}
- public Collection<TreeNodeConnection> createConnection(AbstractSmooksGraphicalModel model) {
+ public Collection<TreeNodeConnection> createConnection(
+ AbstractSmooksGraphicalModel model) {
ConnectionModelFactory connectionModelFactory = getConnectionModelFactory();
List<TreeNodeConnection> cs = new ArrayList<TreeNodeConnection>();
if (connectionModelFactory != null) {
if (connectionModelFactory.hasConnection(model)) {
- Collection<TreeNodeConnection> cList = connectionModelFactory.createConnection(inputDataList, getSmooksResourceList(),
- root, model);
+ Collection<TreeNodeConnection> cList = connectionModelFactory
+ .createConnection(inputDataList,
+ getSmooksResourceList(), root, model);
if (cList != null) {
cs.addAll(cList);
}
@@ -974,16 +1116,19 @@
return null;
}
- public void createConnection(List<AbstractSmooksGraphicalModel> children, List<TreeNodeConnection> connections) {
+ public void createConnection(List<AbstractSmooksGraphicalModel> children,
+ List<TreeNodeConnection> connections) {
for (Iterator<?> iterator = children.iterator(); iterator.hasNext();) {
- AbstractSmooksGraphicalModel abstractSmooksGraphicalModel = (AbstractSmooksGraphicalModel) iterator.next();
+ AbstractSmooksGraphicalModel abstractSmooksGraphicalModel = (AbstractSmooksGraphicalModel) iterator
+ .next();
if (canCreateConnection(abstractSmooksGraphicalModel)) {
Collection<TreeNodeConnection> c = createConnection(abstractSmooksGraphicalModel);
if (c != null) {
connections.addAll(c);
}
}
- List<AbstractSmooksGraphicalModel> cchildren = abstractSmooksGraphicalModel.getChildren();
+ List<AbstractSmooksGraphicalModel> cchildren = abstractSmooksGraphicalModel
+ .getChildren();
createConnection(cchildren, connections);
}
}
@@ -1012,35 +1157,45 @@
Object obj = smooksModelProvider.getSmooksModel();
smooksResourceList = null;
if (obj instanceof DocumentRoot) {
- smooksResourceList = ((DocumentRoot) obj).getSmooksResourceList();
- inputDataList = SelectorCreationDialog.generateInputData(smooksResourceList);
+ smooksResourceList = ((DocumentRoot) obj)
+ .getSmooksResourceList();
+ inputDataList = SelectorCreationDialog
+ .generateInputData(smooksResourceList);
}
}
}
@Override
- public void init(IEditorSite site, IEditorInput input) throws PartInitException {
+ public void init(IEditorSite site, IEditorInput input)
+ throws PartInitException {
super.init(site, input);
initSmooksData();
if (smooksModelProvider != null) {
- this.handleCommandStack(smooksModelProvider.getEditingDomain().getCommandStack());
+ this.handleCommandStack(smooksModelProvider.getEditingDomain()
+ .getCommandStack());
}
}
- protected void expandConnectedModels(Collection<TreeNodeConnection> connections) {
+ protected void expandConnectedModels(
+ Collection<TreeNodeConnection> connections) {
if (connections == null || connections.isEmpty())
return;
List<TreeNodeModel> expanedTreeNodeList = new ArrayList<TreeNodeModel>();
for (Iterator<?> iterator = connections.iterator(); iterator.hasNext();) {
- TreeNodeConnection treeNodeConnection = (TreeNodeConnection) iterator.next();
- AbstractSmooksGraphicalModel source = treeNodeConnection.getSourceNode();
- AbstractSmooksGraphicalModel target = treeNodeConnection.getTargetNode();
+ TreeNodeConnection treeNodeConnection = (TreeNodeConnection) iterator
+ .next();
+ AbstractSmooksGraphicalModel source = treeNodeConnection
+ .getSourceNode();
+ AbstractSmooksGraphicalModel target = treeNodeConnection
+ .getTargetNode();
Object data = source.getData();
Object data2 = target.getData();
- if (source instanceof TreeNodeModel && data instanceof IXMLStructuredObject) {
+ if (source instanceof TreeNodeModel
+ && data instanceof IXMLStructuredObject) {
expanedTreeNodeList.add((TreeNodeModel) source);
}
- if (target instanceof TreeNodeModel && data2 instanceof IXMLStructuredObject) {
+ if (target instanceof TreeNodeModel
+ && data2 instanceof IXMLStructuredObject) {
expanedTreeNodeList.add((TreeNodeModel) target);
}
}
@@ -1050,11 +1205,13 @@
List<?> childrenEditPart = new ArrayList();
for (Iterator iterator = containers.iterator(); iterator.hasNext();) {
Object object = (Object) iterator.next();
- childrenEditPart.addAll(((EditPart)object).getChildren());
+ childrenEditPart.addAll(((EditPart) object).getChildren());
}
- for (Iterator<?> iterator = childrenEditPart.iterator(); iterator.hasNext();) {
+ for (Iterator<?> iterator = childrenEditPart.iterator(); iterator
+ .hasNext();) {
Object object = (Object) iterator.next();
- SmooksUIUtils.expandGraphTree(expanedTreeNodeList, (TreeNodeEditPart) object);
+ SmooksUIUtils.expandGraphTree(expanedTreeNodeList,
+ (TreeNodeEditPart) object);
}
}
@@ -1068,10 +1225,12 @@
@Override
protected void initializeGraphicalViewer() {
initGraphicalModel();
- ((GraphicalEditPart) getGraphicalViewer().getRootEditPart()).getFigure().validate();
+ ((GraphicalEditPart) getGraphicalViewer().getRootEditPart())
+ .getFigure().validate();
}
- protected void applyGraphicalInformation(AbstractSmooksGraphicalModel graphicalModel) {
+ protected void applyGraphicalInformation(
+ AbstractSmooksGraphicalModel graphicalModel) {
// GraphType graph1 = getSmooksGraphicsExtType().getGraph();
// applyGraphicalInformation(graph1, graphicalModel);
}
@@ -1138,7 +1297,8 @@
if (gm instanceof IMoveableModel) {
IMoveableModel graphicalModel = (IMoveableModel) gm;
map.put(graphicalModel, new Point(node.x, node.y));
- graphAnimation.recordFinal(part, new Rectangle(node.x, node.y, 0, 0));
+ graphAnimation.recordFinal(part, new Rectangle(node.x,
+ node.y, 0, 0));
}
}
IEditorSite editorSite = getEditorSite();
@@ -1193,7 +1353,8 @@
return null;
}
- protected DirectedGraph collectionGraphInformation(HashMap<Object, Node> nodeMap) {
+ protected DirectedGraph collectionGraphInformation(
+ HashMap<Object, Node> nodeMap) {
DirectedGraph graph = new DirectedGraph();
if (getGraphicalViewer() == null) {
return graph;
@@ -1204,7 +1365,8 @@
List children = new ArrayList();
for (Iterator iterator = containers.iterator(); iterator.hasNext();) {
Object c = (Object) iterator.next();
- if (c instanceof OutputContainerEditPart || c instanceof InputSourceContainerEditPart) {
+ if (c instanceof OutputContainerEditPart
+ || c instanceof InputSourceContainerEditPart) {
children.addAll(((AbstractGraphicalEditPart) c).getChildren());
}
// children.add(c);
@@ -1226,17 +1388,21 @@
for (Iterator<?> iterator = children.iterator(); iterator.hasNext();) {
GraphicalEditPart object = (GraphicalEditPart) iterator.next();
- for (Iterator<?> iterator2 = children.iterator(); iterator2.hasNext();) {
- GraphicalEditPart testEditPart = (GraphicalEditPart) iterator2.next();
+ for (Iterator<?> iterator2 = children.iterator(); iterator2
+ .hasNext();) {
+ GraphicalEditPart testEditPart = (GraphicalEditPart) iterator2
+ .next();
Node node = nodeMap.get(object);
Node testNode = nodeMap.get(testEditPart);
if (node != null && testNode != null) {
- if (hasConnectionAssociation(object, testEditPart, SOURCE_CONNECT_TYPE)) {
+ if (hasConnectionAssociation(object, testEditPart,
+ SOURCE_CONNECT_TYPE)) {
Edge edge = new Edge(node, testNode);
edge.data = testEditPart;
graph.edges.add(edge);
}
- if (hasConnectionAssociation(object, testEditPart, TARGET_CONNECT_TYPE)) {
+ if (hasConnectionAssociation(object, testEditPart,
+ TARGET_CONNECT_TYPE)) {
Edge edge = new Edge(testNode, node);
graph.edges.add(edge);
}
@@ -1250,10 +1416,12 @@
if (model == editPart.getModel()) {
return true;
}
- AbstractSmooksGraphicalModel grphicalModel = (AbstractSmooksGraphicalModel) editPart.getModel();
+ AbstractSmooksGraphicalModel grphicalModel = (AbstractSmooksGraphicalModel) editPart
+ .getModel();
if (!grphicalModel.getChildrenWithoutDynamic().isEmpty()) {
List<?> children = editPart.getChildren();
- for (Iterator<?> iterator2 = children.iterator(); iterator2.hasNext();) {
+ for (Iterator<?> iterator2 = children.iterator(); iterator2
+ .hasNext();) {
GraphicalEditPart gpart = (GraphicalEditPart) iterator2.next();
if (hasAssociation(model, gpart)) {
return true;
@@ -1263,7 +1431,8 @@
return false;
}
- private boolean hasConnectionAssociation(GraphicalEditPart editPart, GraphicalEditPart testEditPart, int connectType) {
+ private boolean hasConnectionAssociation(GraphicalEditPart editPart,
+ GraphicalEditPart testEditPart, int connectType) {
List<?> sourceConnections = null;
if (connectType == SOURCE_CONNECT_TYPE) {
sourceConnections = editPart.getSourceConnections();
@@ -1271,9 +1440,11 @@
if (connectType == TARGET_CONNECT_TYPE) {
sourceConnections = editPart.getTargetConnections();
}
- for (Iterator<?> iterator = sourceConnections.iterator(); iterator.hasNext();) {
+ for (Iterator<?> iterator = sourceConnections.iterator(); iterator
+ .hasNext();) {
GraphicalEditPart object = (GraphicalEditPart) iterator.next();
- TreeNodeConnection connection = (TreeNodeConnection) object.getModel();
+ TreeNodeConnection connection = (TreeNodeConnection) object
+ .getModel();
Object testModel = null;
if (connectType == SOURCE_CONNECT_TYPE) {
testModel = connection.getTargetNode();
@@ -1285,12 +1456,15 @@
return true;
}
}
- AbstractSmooksGraphicalModel sourceGraphModel = (AbstractSmooksGraphicalModel) editPart.getModel();
+ AbstractSmooksGraphicalModel sourceGraphModel = (AbstractSmooksGraphicalModel) editPart
+ .getModel();
if (!sourceGraphModel.getChildrenWithoutDynamic().isEmpty()) {
List<?> children = editPart.getChildren();
for (Iterator<?> iterator = children.iterator(); iterator.hasNext();) {
- GraphicalEditPart childEditPart = (GraphicalEditPart) iterator.next();
- if (hasConnectionAssociation(childEditPart, testEditPart, connectType)) {
+ GraphicalEditPart childEditPart = (GraphicalEditPart) iterator
+ .next();
+ if (hasConnectionAssociation(childEditPart, testEditPart,
+ connectType)) {
return true;
}
}
@@ -1317,7 +1491,8 @@
*/
@Override
public void doSave(IProgressMonitor monitor) {
- if (getEditDomain() != null && getEditDomain().getCommandStack() != null) {
+ if (getEditDomain() != null
+ && getEditDomain().getCommandStack() != null) {
getEditDomain().getCommandStack().flush();
}
}
@@ -1329,7 +1504,8 @@
public void selectionChanged(SelectionChangedEvent event) {
updateActions(getSelectionActions());
- ISelectionProvider provider = ((SmooksTaskDetailsEditorSite) getSite()).getMultiPageEditor().getSite().getSelectionProvider();
+ ISelectionProvider provider = ((SmooksTaskDetailsEditorSite) getSite())
+ .getMultiPageEditor().getSite().getSelectionProvider();
if (provider != null) {
provider.setSelection(event.getSelection());
}
@@ -1354,7 +1530,8 @@
Object obj = smooksModelProvider.getSmooksModel();
smooksResourceList = null;
if (obj instanceof DocumentRoot) {
- smooksResourceList = ((DocumentRoot) obj).getSmooksResourceList();
+ smooksResourceList = ((DocumentRoot) obj)
+ .getSmooksResourceList();
}
return smooksResourceList;
}
@@ -1371,21 +1548,25 @@
public void inputTypeChanged() {
if (root != null && inputDataList != null) {
- List<Object> newInputDataList = SelectorCreationDialog.generateInputData(getSmooksResourceListType());
+ List<Object> newInputDataList = SelectorCreationDialog
+ .generateInputData(getSmooksResourceListType());
List<InputDataContianerModel> inputs = new ArrayList<InputDataContianerModel>();
List<AbstractSmooksGraphicalModel> children = root.getChildren();
// remove all input data graph model
for (Iterator<?> iterator = children.iterator(); iterator.hasNext();) {
- AbstractSmooksGraphicalModel abstractSmooksGraphicalModel = (AbstractSmooksGraphicalModel) iterator.next();
+ AbstractSmooksGraphicalModel abstractSmooksGraphicalModel = (AbstractSmooksGraphicalModel) iterator
+ .next();
if (abstractSmooksGraphicalModel instanceof InputDataContianerModel) {
inputs.add((InputDataContianerModel) abstractSmooksGraphicalModel);
}
}
for (Iterator<?> iterator = inputs.iterator(); iterator.hasNext();) {
- InputDataContianerModel inputModel = (InputDataContianerModel) iterator.next();
- AbstractSmooksGraphicalModel.disconnectAllConnections(inputModel);
+ InputDataContianerModel inputModel = (InputDataContianerModel) iterator
+ .next();
+ AbstractSmooksGraphicalModel
+ .disconnectAllConnections(inputModel);
root.removeTreeNode(inputModel);
}
@@ -1412,7 +1593,8 @@
return;
List<AbstractSmooksGraphicalModel> children = root.getChildren();
for (Iterator<?> iterator = children.iterator(); iterator.hasNext();) {
- AbstractSmooksGraphicalModel abstractSmooksGraphicalModel = (AbstractSmooksGraphicalModel) iterator.next();
+ AbstractSmooksGraphicalModel abstractSmooksGraphicalModel = (AbstractSmooksGraphicalModel) iterator
+ .next();
cleanValidationMarker(abstractSmooksGraphicalModel);
}
}
@@ -1420,9 +1602,11 @@
protected void cleanValidationMarker(AbstractSmooksGraphicalModel model) {
model.setSeverity(IValidatableModel.NONE);
model.getMessage().clear();
- List<AbstractSmooksGraphicalModel> children = model.getChildrenWithoutDynamic();
+ List<AbstractSmooksGraphicalModel> children = model
+ .getChildrenWithoutDynamic();
for (Iterator<?> iterator = children.iterator(); iterator.hasNext();) {
- AbstractSmooksGraphicalModel abstractSmooksGraphicalModel = (AbstractSmooksGraphicalModel) iterator.next();
+ AbstractSmooksGraphicalModel abstractSmooksGraphicalModel = (AbstractSmooksGraphicalModel) iterator
+ .next();
cleanValidationMarker(abstractSmooksGraphicalModel);
}
}
@@ -1440,7 +1624,8 @@
public void run() {
cleanValidationMarker();
- for (Iterator<?> iterator = flist.iterator(); iterator.hasNext();) {
+ for (Iterator<?> iterator = flist.iterator(); iterator
+ .hasNext();) {
Diagnostic diagnostic = (Diagnostic) iterator.next();
refreshValidateResult(diagnostic);
}
@@ -1459,7 +1644,8 @@
Object obj = datas.get(1);
if (obj == Javabean12Package.Literals.BEAN_TYPE__BEAN_ID) {
String message = diagnostic.getMessage();
- if (message != null && message.startsWith("The required feature")) { //$NON-NLS-1$
+ if (message != null
+ && message.startsWith("The required feature")) { //$NON-NLS-1$
return Messages.SmooksJavaMappingGraphicalEditor_BeanIdEmptyErrormessage;
}
}
@@ -1469,7 +1655,8 @@
Object obj = datas.get(1);
if (obj == Javabean12Package.Literals.VALUE_TYPE__DATA) {
String message = diagnostic.getMessage();
- if (message != null && message.startsWith("The required feature")) { //$NON-NLS-1$
+ if (message != null
+ && message.startsWith("The required feature")) { //$NON-NLS-1$
return Messages.SmooksJavaMappingGraphicalEditor_NodeMustLinkWithSource;
}
}
@@ -1479,7 +1666,8 @@
Object obj = datas.get(1);
if (obj == Javabean12Package.Literals.WIRING_TYPE__BEAN_ID_REF) {
String message = diagnostic.getMessage();
- if (message != null && message.startsWith("The required feature")) { //$NON-NLS-1$
+ if (message != null
+ && message.startsWith("The required feature")) { //$NON-NLS-1$
return Messages.SmooksJavaMappingGraphicalEditor_NodeMustLinkWithJavaBean;
}
}
@@ -1498,7 +1686,8 @@
Object object = (Object) iterator2.next();
object = AdapterFactoryEditingDomain.unwrap(object);
if (object instanceof EObject) {
- AbstractSmooksGraphicalModel graphModel = SmooksGraphUtil.findSmooksGraphModel(root, object);
+ AbstractSmooksGraphicalModel graphModel = SmooksGraphUtil
+ .findSmooksGraphModel(root, object);
if (graphModel == null)
continue;
obj = graphModel;
@@ -1509,7 +1698,8 @@
}
}
if (obj != null) {
- for (Iterator<?> iterator2 = datas.iterator(); iterator2.hasNext();) {
+ for (Iterator<?> iterator2 = datas.iterator(); iterator2
+ .hasNext();) {
Object object = (Object) iterator2.next();
object = AdapterFactoryEditingDomain.unwrap(object);
if (object instanceof EAttribute && obj != null) {
15 years, 9 months
JBoss Tools SVN: r23169 - trunk/tests/features/org.jboss.tools.test.feature.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-07-01 20:08:51 -0400 (Thu, 01 Jul 2010)
New Revision: 23169
Modified:
trunk/tests/features/org.jboss.tools.test.feature/pom.xml
Log:
maven repo alignet to be the same with svn
Modified: trunk/tests/features/org.jboss.tools.test.feature/pom.xml
===================================================================
--- trunk/tests/features/org.jboss.tools.test.feature/pom.xml 2010-07-02 00:08:03 UTC (rev 23168)
+++ trunk/tests/features/org.jboss.tools.test.feature/pom.xml 2010-07-02 00:08:51 UTC (rev 23169)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.tests.features</groupId>
<artifactId>org.jboss.tools.test.feature</artifactId>
<version>3.1.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
15 years, 9 months
JBoss Tools SVN: r23168 - in trunk/tests: features and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-07-01 20:08:03 -0400 (Thu, 01 Jul 2010)
New Revision: 23168
Modified:
trunk/tests/features/pom.xml
trunk/tests/plugins/org.jboss.tools.tests/pom.xml
trunk/tests/plugins/pom.xml
trunk/tests/pom.xml
Log:
maven repo aligned to be the same with svn repo
Modified: trunk/tests/features/pom.xml
===================================================================
--- trunk/tests/features/pom.xml 2010-07-01 23:59:11 UTC (rev 23167)
+++ trunk/tests/features/pom.xml 2010-07-02 00:08:03 UTC (rev 23168)
@@ -1,18 +1,13 @@
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <relativePath>../../parent-pom.xml</relativePath>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>tests.features</artifactId>
+ <groupId>org.jboss.tools.tests</groupId>
+ <artifactId>features</artifactId>
+ <name>tests.features</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>org.jboss.tools.test.feature</module>
</modules>
</project>
-
\ No newline at end of file
+
Modified: trunk/tests/plugins/org.jboss.tools.tests/pom.xml
===================================================================
--- trunk/tests/plugins/org.jboss.tools.tests/pom.xml 2010-07-01 23:59:11 UTC (rev 23167)
+++ trunk/tests/plugins/org.jboss.tools.tests/pom.xml 2010-07-02 00:08:03 UTC (rev 23168)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.tests.plugins</groupId>
<artifactId>org.jboss.tools.tests</artifactId>
<version>3.1.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
Modified: trunk/tests/plugins/pom.xml
===================================================================
--- trunk/tests/plugins/pom.xml 2010-07-01 23:59:11 UTC (rev 23167)
+++ trunk/tests/plugins/pom.xml 2010-07-02 00:08:03 UTC (rev 23168)
@@ -1,18 +1,13 @@
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <relativePath>../../parent-pom.xml</relativePath>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>tests.plugins</artifactId>
+ <groupId>org.jboss.tools.tests</groupId>
+ <artifactId>plugins</artifactId>
+ <name>tests.plugins</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>org.jboss.tools.tests</module>
</modules>
</project>
-
\ No newline at end of file
+
Modified: trunk/tests/pom.xml
===================================================================
--- trunk/tests/pom.xml 2010-07-01 23:59:11 UTC (rev 23167)
+++ trunk/tests/pom.xml 2010-07-02 00:08:03 UTC (rev 23168)
@@ -1,14 +1,9 @@
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <relativePath>../parent-pom.xml</relativePath>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
<groupId>org.jboss.tools</groupId>
<artifactId>tests</artifactId>
+ <name>tests.all</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
15 years, 9 months
JBoss Tools SVN: r23167 - in trunk/maven: features and 8 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-07-01 19:59:11 -0400 (Thu, 01 Jul 2010)
New Revision: 23167
Modified:
trunk/maven/features/org.jboss.tools.maven.feature/pom.xml
trunk/maven/features/org.jboss.tools.maven.seam.feature/pom.xml
trunk/maven/features/pom.xml
trunk/maven/plugins/org.jboss.tools.maven.core/pom.xml
trunk/maven/plugins/org.jboss.tools.maven.seam/pom.xml
trunk/maven/plugins/org.jboss.tools.maven.ui/pom.xml
trunk/maven/plugins/pom.xml
trunk/maven/pom.xml
trunk/maven/site/pom.xml
trunk/maven/tests/pom.xml
Log:
maven repo structure changed to match svn repo
Modified: trunk/maven/features/org.jboss.tools.maven.feature/pom.xml
===================================================================
--- trunk/maven/features/org.jboss.tools.maven.feature/pom.xml 2010-07-01 23:34:25 UTC (rev 23166)
+++ trunk/maven/features/org.jboss.tools.maven.feature/pom.xml 2010-07-01 23:59:11 UTC (rev 23167)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.maven.features</groupId>
<artifactId>org.jboss.tools.maven.feature</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
Modified: trunk/maven/features/org.jboss.tools.maven.seam.feature/pom.xml
===================================================================
--- trunk/maven/features/org.jboss.tools.maven.seam.feature/pom.xml 2010-07-01 23:34:25 UTC (rev 23166)
+++ trunk/maven/features/org.jboss.tools.maven.seam.feature/pom.xml 2010-07-01 23:59:11 UTC (rev 23167)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.maven.features</groupId>
<artifactId>org.jboss.tools.maven.seam.feature</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
Modified: trunk/maven/features/pom.xml
===================================================================
--- trunk/maven/features/pom.xml 2010-07-01 23:34:25 UTC (rev 23166)
+++ trunk/maven/features/pom.xml 2010-07-01 23:59:11 UTC (rev 23167)
@@ -1,14 +1,9 @@
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <relativePath>../../parent-pom.xml</relativePath>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>maven.features</artifactId>
+ <groupId>org.jboss.tools.maven</groupId>
+ <artifactId>features</artifactId>
+ <name>maven.features</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
@@ -16,4 +11,4 @@
<module>org.jboss.tools.maven.seam.feature</module>
</modules>
</project>
-
\ No newline at end of file
+
Modified: trunk/maven/plugins/org.jboss.tools.maven.core/pom.xml
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.core/pom.xml 2010-07-01 23:34:25 UTC (rev 23166)
+++ trunk/maven/plugins/org.jboss.tools.maven.core/pom.xml 2010-07-01 23:59:11 UTC (rev 23167)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.maven.plugins</groupId>
<artifactId>org.jboss.tools.maven.core</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
Modified: trunk/maven/plugins/org.jboss.tools.maven.seam/pom.xml
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.seam/pom.xml 2010-07-01 23:34:25 UTC (rev 23166)
+++ trunk/maven/plugins/org.jboss.tools.maven.seam/pom.xml 2010-07-01 23:59:11 UTC (rev 23167)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.maven.plugins</groupId>
<artifactId>org.jboss.tools.maven.seam</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
Modified: trunk/maven/plugins/org.jboss.tools.maven.ui/pom.xml
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.ui/pom.xml 2010-07-01 23:34:25 UTC (rev 23166)
+++ trunk/maven/plugins/org.jboss.tools.maven.ui/pom.xml 2010-07-01 23:59:11 UTC (rev 23167)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.maven.plugins</groupId>
<artifactId>org.jboss.tools.maven.ui</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
Modified: trunk/maven/plugins/pom.xml
===================================================================
--- trunk/maven/plugins/pom.xml 2010-07-01 23:34:25 UTC (rev 23166)
+++ trunk/maven/plugins/pom.xml 2010-07-01 23:59:11 UTC (rev 23167)
@@ -1,14 +1,9 @@
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <relativePath>../../parent-pom.xml</relativePath>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>maven.plugins</artifactId>
+ <groupId>org.jboss.tools.maven</groupId>
+ <artifactId>plugins</artifactId>
+ <name>maven.plugins</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
@@ -17,4 +12,4 @@
<module>org.jboss.tools.maven.ui</module>
</modules>
</project>
-
\ No newline at end of file
+
Modified: trunk/maven/pom.xml
===================================================================
--- trunk/maven/pom.xml 2010-07-01 23:34:25 UTC (rev 23166)
+++ trunk/maven/pom.xml 2010-07-01 23:59:11 UTC (rev 23167)
@@ -1,14 +1,9 @@
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <relativePath>../parent-pom.xml</relativePath>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
<groupId>org.jboss.tools</groupId>
- <artifactId>maven.all</artifactId>
+ <artifactId>maven</artifactId>
+ <name>maven.all</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
Modified: trunk/maven/site/pom.xml
===================================================================
--- trunk/maven/site/pom.xml 2010-07-01 23:34:25 UTC (rev 23166)
+++ trunk/maven/site/pom.xml 2010-07-01 23:59:11 UTC (rev 23167)
@@ -6,8 +6,9 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>maven.site</artifactId>
+ <groupId>org.jboss.tools.maven</groupId>
+ <artifactId>site</artifactId>
+ <name>maven.site</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>eclipse-update-site</packaging>
</project>
Modified: trunk/maven/tests/pom.xml
===================================================================
--- trunk/maven/tests/pom.xml 2010-07-01 23:34:25 UTC (rev 23166)
+++ trunk/maven/tests/pom.xml 2010-07-01 23:59:11 UTC (rev 23167)
@@ -1,17 +1,12 @@
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <relativePath>../../parent-pom.xml</relativePath>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>maven.tests</artifactId>
+ <groupId>org.jboss.tools.maven</groupId>
+ <artifactId>tests</artifactId>
+ <name>maven.tests</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
</modules>
</project>
-
\ No newline at end of file
+
15 years, 9 months
JBoss Tools SVN: r23166 - in trunk/examples: features and 10 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-07-01 19:34:25 -0400 (Thu, 01 Jul 2010)
New Revision: 23166
Modified:
trunk/examples/features/org.jboss.tools.community.project.examples.feature/pom.xml
trunk/examples/features/org.jboss.tools.project.examples.feature/pom.xml
trunk/examples/features/org.jboss.tools.project.examples.test.feature/pom.xml
trunk/examples/features/pom.xml
trunk/examples/plugins/org.jboss.tools.community.project.examples/pom.xml
trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/pom.xml
trunk/examples/plugins/org.jboss.tools.project.examples/pom.xml
trunk/examples/plugins/pom.xml
trunk/examples/pom.xml
trunk/examples/site/pom.xml
trunk/examples/tests/org.jboss.tools.project.examples.test/pom.xml
trunk/examples/tests/pom.xml
Log:
1. maven repo structure alligned to be the same as svn repo rot examples component
2. coverage report is enabled
Modified: trunk/examples/features/org.jboss.tools.community.project.examples.feature/pom.xml
===================================================================
--- trunk/examples/features/org.jboss.tools.community.project.examples.feature/pom.xml 2010-07-01 23:33:27 UTC (rev 23165)
+++ trunk/examples/features/org.jboss.tools.community.project.examples.feature/pom.xml 2010-07-01 23:34:25 UTC (rev 23166)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.examples.features</groupId>
<artifactId>org.jboss.tools.community.project.examples.feature</artifactId>
<version>1.1.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
Modified: trunk/examples/features/org.jboss.tools.project.examples.feature/pom.xml
===================================================================
--- trunk/examples/features/org.jboss.tools.project.examples.feature/pom.xml 2010-07-01 23:33:27 UTC (rev 23165)
+++ trunk/examples/features/org.jboss.tools.project.examples.feature/pom.xml 2010-07-01 23:34:25 UTC (rev 23166)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.examples.features</groupId>
<artifactId>org.jboss.tools.project.examples.feature</artifactId>
<version>1.1.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
Modified: trunk/examples/features/org.jboss.tools.project.examples.test.feature/pom.xml
===================================================================
--- trunk/examples/features/org.jboss.tools.project.examples.test.feature/pom.xml 2010-07-01 23:33:27 UTC (rev 23165)
+++ trunk/examples/features/org.jboss.tools.project.examples.test.feature/pom.xml 2010-07-01 23:34:25 UTC (rev 23166)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.examples.features</groupId>
<artifactId>org.jboss.tools.project.examples.test.feature</artifactId>
<version>1.1.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
Modified: trunk/examples/features/pom.xml
===================================================================
--- trunk/examples/features/pom.xml 2010-07-01 23:33:27 UTC (rev 23165)
+++ trunk/examples/features/pom.xml 2010-07-01 23:34:25 UTC (rev 23166)
@@ -1,14 +1,9 @@
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <relativePath>../../parent-pom.xml</relativePath>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>examples.features</artifactId>
+ <groupId>org.jboss.tools.examples</groupId>
+ <artifactId>features</artifactId>
+ <name>examples.features</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
@@ -17,4 +12,4 @@
<module>org.jboss.tools.project.examples.test.feature</module>
</modules>
</project>
-
\ No newline at end of file
+
Modified: trunk/examples/plugins/org.jboss.tools.community.project.examples/pom.xml
===================================================================
--- trunk/examples/plugins/org.jboss.tools.community.project.examples/pom.xml 2010-07-01 23:33:27 UTC (rev 23165)
+++ trunk/examples/plugins/org.jboss.tools.community.project.examples/pom.xml 2010-07-01 23:34:25 UTC (rev 23166)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.examples.plugins</groupId>
<artifactId>org.jboss.tools.community.project.examples</artifactId>
<version>1.1.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/pom.xml
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/pom.xml 2010-07-01 23:33:27 UTC (rev 23165)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/pom.xml 2010-07-01 23:34:25 UTC (rev 23166)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.examples.plugins</groupId>
<artifactId>org.jboss.tools.project.examples</artifactId>
<version>1.1.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
Modified: trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/pom.xml
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/pom.xml 2010-07-01 23:33:27 UTC (rev 23165)
+++ trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/pom.xml 2010-07-01 23:34:25 UTC (rev 23166)
@@ -7,7 +7,7 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.examples.plugins</groupId>
<artifactId>org.jboss.tools.project.examples.cheatsheet</artifactId>
<version>1.1.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
Modified: trunk/examples/plugins/pom.xml
===================================================================
--- trunk/examples/plugins/pom.xml 2010-07-01 23:33:27 UTC (rev 23165)
+++ trunk/examples/plugins/pom.xml 2010-07-01 23:34:25 UTC (rev 23166)
@@ -1,14 +1,9 @@
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <relativePath>../../parent-pom.xml</relativePath>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>examples.plugins</artifactId>
+ <groupId>org.jboss.tools.examples</groupId>
+ <artifactId>plugins</artifactId>
+ <name>examples.plugins</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
@@ -17,4 +12,4 @@
<module>org.jboss.tools.project.examples.cheatsheet</module>
</modules>
</project>
-
\ No newline at end of file
+
Modified: trunk/examples/pom.xml
===================================================================
--- trunk/examples/pom.xml 2010-07-01 23:33:27 UTC (rev 23165)
+++ trunk/examples/pom.xml 2010-07-01 23:34:25 UTC (rev 23166)
@@ -1,14 +1,9 @@
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <relativePath>../parent-pom.xml</relativePath>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
<groupId>org.jboss.tools</groupId>
- <artifactId>examples.all</artifactId>
+ <artifactId>examples</artifactId>
+ <name>examples.all</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
Modified: trunk/examples/site/pom.xml
===================================================================
--- trunk/examples/site/pom.xml 2010-07-01 23:33:27 UTC (rev 23165)
+++ trunk/examples/site/pom.xml 2010-07-01 23:34:25 UTC (rev 23166)
@@ -6,8 +6,9 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>examples.site</artifactId>
+ <groupId>org.jboss.tools.examples</groupId>
+ <artifactId>site</artifactId>
+ <name>examples.site</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>eclipse-update-site</packaging>
</project>
Modified: trunk/examples/tests/org.jboss.tools.project.examples.test/pom.xml
===================================================================
--- trunk/examples/tests/org.jboss.tools.project.examples.test/pom.xml 2010-07-01 23:33:27 UTC (rev 23165)
+++ trunk/examples/tests/org.jboss.tools.project.examples.test/pom.xml 2010-07-01 23:34:25 UTC (rev 23166)
@@ -7,8 +7,13 @@
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.jboss.tools</groupId>
+ <groupId>org.jboss.tools.examples.tests</groupId>
<artifactId>org.jboss.tools.project.examples.test</artifactId>
<version>1.1.0-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
+
+ <properties>
+ <emma.filter>org.jboss.tools.project.examples*</emma.filter>
+ <emma.instrument.bundles>org.jboss.tools.project.examples</emma.instrument.bundles>
+ </properties>
</project>
Modified: trunk/examples/tests/pom.xml
===================================================================
--- trunk/examples/tests/pom.xml 2010-07-01 23:33:27 UTC (rev 23165)
+++ trunk/examples/tests/pom.xml 2010-07-01 23:34:25 UTC (rev 23166)
@@ -1,18 +1,13 @@
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <relativePath>../../parent-pom.xml</relativePath>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- </parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>examples.tests</artifactId>
+ <groupId>org.jboss.tools.examples</groupId>
+ <artifactId>tests</artifactId>
+ <name>examples.tests</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>org.jboss.tools.project.examples.test</module>
</modules>
</project>
-
\ No newline at end of file
+
15 years, 9 months
JBoss Tools SVN: r23165 - in trunk/cdi: plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences and 7 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-07-01 19:33:27 -0400 (Thu, 01 Jul 2010)
New Revision: 23165
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/members/
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/members/InterceptorBindingMemberBroken.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/members/SimpleAnnotation.java
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanManager.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferenceInitializer.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AnnotationDefinition.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/errorList.txt
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2708 Added new validation rules:
- Array-valued member of an interceptor binding type is not annotated @Nonbinding
- Anotation-valued member of an interceptor binding type is not annotated @Nonbinding
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanManager.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanManager.java 2010-07-01 23:31:43 UTC (rev 23164)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanManager.java 2010-07-01 23:33:27 UTC (rev 23165)
@@ -209,6 +209,14 @@
IInterceptorBinding getInterceptorBinding(String qualifiedName);
/**
+ * Returns the interceptor binding type by resource path.
+ *
+ * @param resource path
+ * @return interceptor binding type by resource path
+ */
+ IInterceptorBinding getInterceptorBinding(IPath path);
+
+ /**
* Returns qualifier model element for fully qualified name
* of qualifier annotation type
* @param qualifiedName
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferenceInitializer.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferenceInitializer.java 2010-07-01 23:31:43 UTC (rev 23164)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferenceInitializer.java 2010-07-01 23:33:27 UTC (rev 23165)
@@ -45,5 +45,6 @@
defaultPreferences.put(CDIPreferences.INJECTED_DECORATOR, CDIPreferences.WARNING);
defaultPreferences.put(CDIPreferences.INJECTED_INTERCEPTOR, CDIPreferences.WARNING);
defaultPreferences.put(CDIPreferences.ILLEGAL_LIFECYCLE_CALLBACK_INTERCEPTOR_BINDING, CDIPreferences.WARNING);
+ defaultPreferences.put(CDIPreferences.MISSING_NONBINDING_IN_INTERCEPTOR_BINDING_TYPE_MEMBER, CDIPreferences.WARNING);
}
}
\ No newline at end of file
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java 2010-07-01 23:31:43 UTC (rev 23164)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java 2010-07-01 23:33:27 UTC (rev 23165)
@@ -67,6 +67,7 @@
private Map<String, StereotypeElement> stereotypes = new HashMap<String, StereotypeElement>();
private Map<IPath, StereotypeElement> stereotypesByPath = new HashMap<IPath, StereotypeElement>();
private Map<String, InterceptorBindingElement> interceptorBindings = new HashMap<String, InterceptorBindingElement>();
+ private Map<IPath, InterceptorBindingElement> interceptorBindingsByPath = new HashMap<IPath, InterceptorBindingElement>();
private Map<String, QualifierElement> qualifiers = new HashMap<String, QualifierElement>();
private Map<IPath, QualifierElement> qualifiersByPath = new HashMap<IPath, QualifierElement>();
private Map<String, ScopeElement> scopes = new HashMap<String, ScopeElement>();
@@ -728,14 +729,17 @@
return result;
}
+ @Override
public CDIProject getCDIProject() {
return this;
}
+ @Override
public IResource getResource() {
return n.getProject();
}
+ @Override
public IPath getSourcePath() {
return n.getProject().getFullPath();
}
@@ -764,6 +768,14 @@
return interceptorBindings.get(qualifiedName);
}
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.cdi.core.IBeanManager#getInterceptorBinding(org.eclipse.core.runtime.IPath)
+ */
+ public IInterceptorBinding getInterceptorBinding(IPath path) {
+ return interceptorBindingsByPath.get(path);
+ }
+
public QualifierElement getQualifier(String qualifiedName) {
return qualifiers.get(qualifiedName);
}
@@ -794,6 +806,7 @@
interceptorBindings.clear();
qualifiers.clear();
qualifiersByPath.clear();
+ interceptorBindingsByPath.clear();
scopes.clear();
List<AnnotationDefinition> ds = n.getDefinitions().getAllAnnotations();
for (AnnotationDefinition d: ds) {
@@ -808,6 +821,9 @@
InterceptorBindingElement s = new InterceptorBindingElement();
initAnnotationElement(s, d);
interceptorBindings.put(d.getQualifiedName(), s);
+ if(d.getResource() != null && d.getResource().getFullPath() != null) {
+ interceptorBindingsByPath.put(d.getResource().getFullPath(), s);
+ }
} else if(d.getKind() == AnnotationDefinition.QUALIFIER) {
QualifierElement s = new QualifierElement();
initAnnotationElement(s, d);
@@ -1024,7 +1040,7 @@
try {
type = EclipseJavaUtil.findType(EclipseUtil.getJavaProject(getNature().getProject()), fullyQualifiedBeanType);
} catch (JavaModelException e) {
- //ignore
+ CDICorePlugin.getDefault().logError(e);
}
if(type == null) {
return Collections.emptySet();
@@ -1035,7 +1051,7 @@
try {
type = EclipseJavaUtil.findType(EclipseUtil.getJavaProject(getNature().getProject()), s);
} catch (JavaModelException e) {
- //ignore
+ CDICorePlugin.getDefault().logError(e);
}
if(type != null) qualifiers.add(type);
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AnnotationDefinition.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AnnotationDefinition.java 2010-07-01 23:31:43 UTC (rev 23164)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AnnotationDefinition.java 2010-07-01 23:33:27 UTC (rev 23165)
@@ -86,8 +86,8 @@
} else if(AnnotationHelper.CDI_ANNOTATION_TYPES.contains(qualifiedName)) {
kind = AnnotationDefinition.CDI;
}
-
- if(kind == QUALIFIER) {
+
+ if(kind == QUALIFIER || kind == INTERCEPTOR_BINDING) {
initMemberDefinitions(contextType, context);
}
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-07-01 23:31:43 UTC (rev 23164)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-07-01 23:33:27 UTC (rev 23165)
@@ -46,6 +46,7 @@
import org.jboss.tools.cdi.core.IAnnotationDeclaration;
import org.jboss.tools.cdi.core.IBean;
import org.jboss.tools.cdi.core.IBeanMethod;
+import org.jboss.tools.cdi.core.ICDIAnnotation;
import org.jboss.tools.cdi.core.ICDIProject;
import org.jboss.tools.cdi.core.IClassBean;
import org.jboss.tools.cdi.core.IDecorator;
@@ -264,6 +265,11 @@
for (IQualifier qualifier : qualifiers) {
validateQualifier(qualifier);
}
+
+ IInterceptorBinding[] bindings = cdiProject.getInterceptorBindings();
+ for (IInterceptorBinding binding : bindings) {
+ validateInterceptorBinding(binding);
+ }
return OK_STATUS;
}
@@ -286,6 +292,9 @@
IQualifier qualifier = cdiProject.getQualifier(file.getFullPath());
validateQualifier(qualifier);
+
+ IInterceptorBinding binding = cdiProject.getInterceptorBinding(file.getFullPath());
+ validateInterceptorBinding(binding);
}
/**
@@ -1759,16 +1768,36 @@
* 5.2.5. Qualifier annotations with members
* - array-valued or annotation-valued member of a qualifier type is not annotated @Nonbinding (Non-Portable behavior)
*/
- IType type = qualifier.getSourceType();
+ validateAnnotationMembers(qualifier, CDIValidationMessages.MISSING_NONBINDING_FOR_ARRAY_VALUE_IN_QUALIFIER_TYPE_MEMBER, CDIValidationMessages.MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_QUALIFIER_TYPE_MEMBER, CDIPreferences.MISSING_NONBINDING_IN_QUALIFIER_TYPE_MEMBER);
+ }
+
+ private void validateInterceptorBinding(IInterceptorBinding binding) {
+ if(binding==null) {
+ return;
+ }
+ IResource resource = binding.getResource();
+ if (resource == null || !resource.getName().toLowerCase().endsWith(".java")) {
+ // validate sources only
+ return;
+ }
+ /*
+ * 9.5.2. Interceptor binding types with members
+ * array-valued or annotation-valued member of an interceptor binding type is not annotated @Nonbinding (Non-Portable behavior)
+ */
+ validateAnnotationMembers(binding, CDIValidationMessages.MISSING_NONBINDING_FOR_ARRAY_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER, CDIValidationMessages.MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER, CDIPreferences.MISSING_NONBINDING_IN_INTERCEPTOR_BINDING_TYPE_MEMBER);
+ }
+
+ private void validateAnnotationMembers(ICDIAnnotation annotation, String arrayMessageErrorKey, String annotationValueErrorKey, String preferencesKey) {
+ IType type = annotation.getSourceType();
try {
IMethod[] methods = type.getMethods();
for (IMethod method : methods) {
String returnTypeSignature = method.getReturnType();
int kind = Signature.getTypeSignatureKind(returnTypeSignature);
if(kind == Signature.ARRAY_TYPE_SIGNATURE) {
- if(!qualifier.getNonBindingMethods().contains(method)) {
+ if(!annotation.getNonBindingMethods().contains(method)) {
ITextSourceReference reference = CDIUtil.convertToSourceReference(method.getNameRange());
- addError(CDIValidationMessages.MISSING_NONBINDING_FOR_ARRAY_VALUE_IN_QUALIFIER_TYPE_MEMBER, CDIPreferences.MISSING_NONBINDING_IN_QUALIFIER_TYPE_MEMBER, reference, qualifier.getResource());
+ addError(arrayMessageErrorKey, preferencesKey, reference, annotation.getResource());
}
} else if(kind == Signature.CLASS_TYPE_SIGNATURE) {
String typeName = Signature.getSignatureSimpleName(returnTypeSignature);
@@ -1781,9 +1810,9 @@
if(typeName!=null) {
IType memberType = type.getJavaProject().findType(typeName);
if(memberType!=null && memberType.isAnnotation()) {
- if(!qualifier.getNonBindingMethods().contains(method)) {
+ if(!annotation.getNonBindingMethods().contains(method)) {
ITextSourceReference reference = CDIUtil.convertToSourceReference(method.getNameRange());
- addError(CDIValidationMessages.MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_QUALIFIER_TYPE_MEMBER, CDIPreferences.MISSING_NONBINDING_IN_QUALIFIER_TYPE_MEMBER, reference, qualifier.getResource());
+ addError(annotationValueErrorKey, preferencesKey, reference, annotation.getResource());
}
}
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/errorList.txt
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/errorList.txt 2010-07-01 23:31:43 UTC (rev 23164)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/errorList.txt 2010-07-01 23:33:27 UTC (rev 23165)
@@ -169,9 +169,6 @@
- non-static, non-private, final method of a managed bean has a method level
interceptor binding
-
-
-
9.5.2. Interceptor binding types with members
- the set of interceptor bindings of a bean or interceptor, including bindings
inherited from stereotypes and other interceptor bindings, has two instances
@@ -180,8 +177,6 @@
- array-valued or annotation-valued member of an interceptor binding type
is not annotated @Nonbinding (Non-Portable behavior)
-
-
10.4.2. Declaring an observer method
- method has more than one parameter annotated @Observes
- observer method is annotated @Produces or @Inject or has a parameter annotated @Disposes
@@ -189,6 +184,8 @@
and the method is not a business method of the EJB
- interceptor or decorator has a method with a parameter annotated @Observes
+
+
10.4.3. Conditional observer methods
- bean with scope @Dependent has an observer method declared receive=IF_EXISTS
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties 2010-07-01 23:31:43 UTC (rev 23164)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties 2010-07-01 23:33:27 UTC (rev 23165)
@@ -17,10 +17,10 @@
INJECTION_TYPE_IS_VARIABLE=Injection point type is a type variable
INJECT_RESOLVES_TO_NULLABLE_BEAN=Injection point of primitive type resolves to the bean that may have a null value
STEREOTYPE_IS_ANNOTATED_TYPED=Stereotype is annotated @Typed
-MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_QUALIFIER_TYPE_MEMBER=Annotation-valued member of a qualifier type is not annotated @Nonbinding
-MISSING_NONBINDING_FOR_ARRAY_VALUE_IN_QUALIFIER_TYPE_MEMBER=Array-valued member of a qualifier type is not annotated @Nonbinding
-MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER=Annotation-valued member of an interceptor binding type is not annotated @Nonbinding
-MISSING_NONBINDING_FOR_ARRAY_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER=Array-valued member of an interceptor binding type is not annotated @Nonbinding
+MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_QUALIFIER_TYPE_MEMBER=Annotation-valued member of a qualifier type should be annotated @Nonbinding [JSR-299 �5.2.5]
+MISSING_NONBINDING_FOR_ARRAY_VALUE_IN_QUALIFIER_TYPE_MEMBER=Array-valued member of a qualifier type should be annotated @Nonbinding [JSR-299 �5.2.5]
+MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER=Annotation-valued member of an interceptor binding type should be annotated @Nonbinding [JSR-299 �9.5.2]
+MISSING_NONBINDING_FOR_ARRAY_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER=Array-valued member of an interceptor binding type should be annotated @Nonbinding [JSR-299 �9.5.2]
MULTIPLE_SCOPE_TYPE_ANNOTATIONS=Bean class or producer method or field specifies multiple scope type annotations
MISSING_SCOPE_WHEN_THERE_IS_NO_DEFAULT_SCOPE=Bean does not explicitly declare a scope when there is no default scope
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java 2010-07-01 23:31:43 UTC (rev 23164)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java 2010-07-01 23:33:27 UTC (rev 23165)
@@ -54,7 +54,7 @@
{CDIPreferences.INJECTION_TYPE_IS_VARIABLE, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_injectionTypeIsVariable_label},
{CDIPreferences.STEREOTYPE_IS_ANNOTATED_TYPED, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_stereotypeIsAnnotatedTyped_label},
{CDIPreferences.MISSING_NONBINDING_IN_QUALIFIER_TYPE_MEMBER, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_missingNonbindingInQualifierTypeMember_label},
-// {CDIPreferences.MISSING_NONBINDING_IN_INTERCEPTOR_BINDING_TYPE_MEMBER, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_missingNonbindingInInterceptorBindingTypeMember_label},
+ {CDIPreferences.MISSING_NONBINDING_IN_INTERCEPTOR_BINDING_TYPE_MEMBER, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_missingNonbindingInInterceptorBindingTypeMember_label},
},
CDICorePlugin.PLUGIN_ID
);
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/members/InterceptorBindingMemberBroken.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/members/InterceptorBindingMemberBroken.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/members/InterceptorBindingMemberBroken.java 2010-07-01 23:33:27 UTC (rev 23165)
@@ -0,0 +1,23 @@
+package org.jboss.jsr299.tck.tests.jbt.validation.interceptors.members;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.enterprise.util.Nonbinding;
+import javax.interceptor.InterceptorBinding;
+
+@Inherited
+@InterceptorBinding
+@Target( { TYPE, METHOD })
+@Retention(RUNTIME)
+@interface InterceptorBindingMemberBroken {
+ SimpleAnnotation memberBroken();
+ @Nonbinding SimpleAnnotation member();
+ String[] pricesBroken();
+ @Nonbinding String[] prices();
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/members/InterceptorBindingMemberBroken.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/members/SimpleAnnotation.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/members/SimpleAnnotation.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/members/SimpleAnnotation.java 2010-07-01 23:33:27 UTC (rev 23165)
@@ -0,0 +1,27 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.jbt.validation.interceptors.members;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+@Retention(RUNTIME)
+@Target(TYPE)
+@interface SimpleAnnotation {}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/validation/interceptors/members/SimpleAnnotation.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java 2010-07-01 23:31:43 UTC (rev 23164)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java 2010-07-01 23:33:27 UTC (rev 23165)
@@ -1289,6 +1289,30 @@
}
/**
+ * 9.5.2. Interceptor binding types with members
+ * - annotation-valued member of an interceptor binding type is not annotated @Nonbinding (Non-Portable behavior)
+ *
+ * @throws Exception
+ */
+ public void testAnnotationTypeMemberWithoutNonBindingInInterceptorByndingType() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/members/InterceptorBindingMemberBroken.java");
+ assertMarkerIsCreated(file, CDIValidationMessages.MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER, 19);
+ assertMarkerIsNotCreated(file, CDIValidationMessages.MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER, 20);
+ }
+
+ /**
+ * 9.5.2. Interceptor binding types with members
+ * - array-valued member of an interceptor binding type is not annotated @Nonbinding (Non-Portable behavior)
+ *
+ * @throws Exception
+ */
+ public void testArrayTypeMemberWithoutNonBindingInInterceptorByndingType() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/interceptors/members/InterceptorBindingMemberBroken.java");
+ assertMarkerIsCreated(file, CDIValidationMessages.MISSING_NONBINDING_FOR_ARRAY_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER, 21);
+ assertMarkerIsNotCreated(file, CDIValidationMessages.MISSING_NONBINDING_FOR_ANNOTATION_VALUE_IN_INTERCEPTOR_BINDING_TYPE_MEMBER, 22);
+ }
+
+ /**
* 10.4.2. Declaring an observer method
* - method has more than one parameter annotated @Observes
*
15 years, 9 months