JBoss Tools SVN: r31393 - branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2011-05-20 04:25:55 -0400 (Fri, 20 May 2011)
New Revision: 31393
Modified:
branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/pom.xml
Log:
Make OSGi version match Maven version
Modified: branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/pom.xml
===================================================================
--- branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/pom.xml 2011-05-20 08:23:48 UTC (rev 31392)
+++ branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/pom.xml 2011-05-20 08:25:55 UTC (rev 31393)
@@ -8,6 +8,6 @@
</parent>
<groupId>org.jboss.tools.jbpm.plugins</groupId>
<artifactId>org.jbpm.gd.jpdl</artifactId>
- <version>3.3.0-SNAPSHOT</version>
+ <version>3.4.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
13 years, 4 months
JBoss Tools SVN: r31392 - trunk/jbpm/plugins/org.jbpm.gd.jpdl.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2011-05-20 04:23:48 -0400 (Fri, 20 May 2011)
New Revision: 31392
Modified:
trunk/jbpm/plugins/org.jbpm.gd.jpdl/pom.xml
Log:
make OSGi version match Maven version
Modified: trunk/jbpm/plugins/org.jbpm.gd.jpdl/pom.xml
===================================================================
--- trunk/jbpm/plugins/org.jbpm.gd.jpdl/pom.xml 2011-05-20 00:41:20 UTC (rev 31391)
+++ trunk/jbpm/plugins/org.jbpm.gd.jpdl/pom.xml 2011-05-20 08:23:48 UTC (rev 31392)
@@ -8,6 +8,6 @@
</parent>
<groupId>org.jboss.tools.jbpm.plugins</groupId>
<artifactId>org.jbpm.gd.jpdl</artifactId>
- <version>3.3.0-SNAPSHOT</version>
+ <version>3.4.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
\ No newline at end of file
13 years, 4 months
JBoss Tools SVN: r31391 - in trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext: META-INF and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-05-19 20:41:20 -0400 (Thu, 19 May 2011)
New Revision: 31391
Added:
trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/hyperlink/GenericInjectedPointHyperlink.java
trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/hyperlink/GenericInjectedPointHyperlinkDetector.java
trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/hyperlink/GenericInjectedPointListHyperlink.java
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/.classpath
trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/META-INF/MANIFEST.MF
trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/plugin.properties
trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/plugin.xml
trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/CDISeamExtMessages.java
trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/messages.properties
Log:
JBIDE-8692
https://issues.jboss.org/browse/JBIDE-8692
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/.classpath
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/.classpath 2011-05-20 00:24:15 UTC (rev 31390)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/.classpath 2011-05-20 00:41:20 UTC (rev 31391)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/META-INF/MANIFEST.MF 2011-05-20 00:24:15 UTC (rev 31390)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/META-INF/MANIFEST.MF 2011-05-20 00:41:20 UTC (rev 31391)
@@ -9,12 +9,15 @@
Export-Package: org.jboss.tools.cdi.seam.text.ext,
org.jboss.tools.cdi.seam.text.ext.hyperlink
Require-Bundle: org.eclipse.ui;bundle-version="3.7.0",
+ org.jboss.tools.common.el.core,
org.jboss.tools.common.text.ext;bundle-version="2.0.0",
org.eclipse.jface.text;bundle-version="3.7.0",
org.eclipse.jdt.ui;bundle-version="3.7.0",
org.jboss.tools.cdi.ui;bundle-version="1.2.0",
org.jboss.tools.cdi.core,
+ org.jboss.tools.cdi.text.ext,
org.jboss.tools.cdi.seam.config.core,
+ org.jboss.tools.cdi.seam.solder.core,
org.jboss.tools.jst.text.ext,
org.jboss.tools.jst.web;bundle-version="3.2.0"
Bundle-Version: 1.0.0.qualifier
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/plugin.properties
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/plugin.properties 2011-05-20 00:24:15 UTC (rev 31390)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/plugin.properties 2011-05-20 00:41:20 UTC (rev 31391)
@@ -1,2 +1,3 @@
providerName=JBoss by Red Hat
Bundle-Name.0 = CDI Seam Text Editors Extensions
+GenericInjectedPointHyperlinkDetector = CDI Seam Generic Injected Point
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/plugin.xml
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/plugin.xml 2011-05-20 00:24:15 UTC (rev 31390)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/plugin.xml 2011-05-20 00:41:20 UTC (rev 31391)
@@ -13,6 +13,16 @@
</extension>
+ <extension
+ point="org.eclipse.ui.workbench.texteditor.hyperlinkDetectors">
+ <hyperlinkDetector
+ class="org.jboss.tools.cdi.seam.text.ext.hyperlink.GenericInjectedPointHyperlinkDetector"
+ id="org.jboss.tools.cdi.seam.text.ext.hyperlink.GenericInjectedPointHyperlinkDetector"
+ name="%GenericInjectedPointHyperlinkDetector"
+ targetId="org.eclipse.jdt.ui.javaCode">
+ </hyperlinkDetector>
+ </extension>
+
<extension
point="org.jboss.tools.common.text.ext.hyperlinkPartitioner"
id="org.jboss.tools.cdi.text.ext.hyperlinkPartitioner"
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/CDISeamExtMessages.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/CDISeamExtMessages.java 2011-05-20 00:24:15 UTC (rev 31390)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/CDISeamExtMessages.java 2011-05-20 00:41:20 UTC (rev 31391)
@@ -21,4 +21,8 @@
public static String CDI_SEAM_EXT_PLUGIN_NO_MESSAGE;
public static String CDI_SEAM_RESOURCE_LOADING_HYPERLINK;
public static String CDI_SEAM_CONFIG_OPEN_TAG;
+
+ public static String CDI_INJECTED_POINT_HYPERLINK_SHOW_GENERIC_BEANS;
+ public static String OPEN_GENERIC_BEAN;
+ public static String OPEN_GENERIC_PRODUCER_BEAN;
}
Added: trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/hyperlink/GenericInjectedPointHyperlink.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/hyperlink/GenericInjectedPointHyperlink.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/hyperlink/GenericInjectedPointHyperlink.java 2011-05-20 00:41:20 UTC (rev 31391)
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.seam.text.ext.hyperlink;
+
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.osgi.util.NLS;
+import org.jboss.tools.cdi.core.IBean;
+import org.jboss.tools.cdi.core.IProducerField;
+import org.jboss.tools.cdi.core.IProducerMethod;
+import org.jboss.tools.cdi.seam.text.ext.CDISeamExtMessages;
+import org.jboss.tools.cdi.text.ext.hyperlink.InjectedPointHyperlink;
+
+public class GenericInjectedPointHyperlink extends InjectedPointHyperlink {
+
+ public GenericInjectedPointHyperlink(IRegion region, IBean bean, IDocument document, boolean b) {
+ super(region, bean, document, b);
+ }
+
+ @Override
+ public String getHyperlinkText() {
+ String text="";
+ if (bean != null) {
+ String name = bean.getBeanClass().getElementName();
+ if (bean instanceof IProducerField) {
+ name += "."+((IProducerField)bean).getField().getElementName();
+ text = NLS.bind(CDISeamExtMessages.OPEN_GENERIC_PRODUCER_BEAN, name);
+ } else if (bean instanceof IProducerMethod) {
+ name += "."+((IProducerMethod)bean).getMethod().getElementName()+"()";
+ text = NLS.bind(CDISeamExtMessages.OPEN_GENERIC_PRODUCER_BEAN, name);
+ } else {
+ text = NLS.bind(CDISeamExtMessages.OPEN_GENERIC_BEAN, name);
+ }
+ }
+ return text;
+ }
+
+}
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/hyperlink/GenericInjectedPointHyperlink.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/hyperlink/GenericInjectedPointHyperlinkDetector.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/hyperlink/GenericInjectedPointHyperlinkDetector.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/hyperlink/GenericInjectedPointHyperlinkDetector.java 2011-05-20 00:41:20 UTC (rev 31391)
@@ -0,0 +1,203 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.seam.text.ext.hyperlink;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jdt.core.ICodeAssist;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IField;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.ILocalVariable;
+import org.eclipse.jdt.core.IMethod;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.internal.core.ResolvedBinaryType;
+import org.eclipse.jdt.internal.core.ResolvedSourceType;
+import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility;
+import org.eclipse.jdt.internal.ui.javaeditor.JavaEditor;
+import org.eclipse.jdt.internal.ui.text.JavaWordFinder;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.hyperlink.AbstractHyperlinkDetector;
+import org.eclipse.jface.text.hyperlink.IHyperlink;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.jboss.tools.cdi.core.CDICoreNature;
+import org.jboss.tools.cdi.core.CDIUtil;
+import org.jboss.tools.cdi.core.IBean;
+import org.jboss.tools.cdi.core.IBeanMember;
+import org.jboss.tools.cdi.core.ICDIProject;
+import org.jboss.tools.cdi.core.IClassBean;
+import org.jboss.tools.cdi.core.IInjectionPoint;
+import org.jboss.tools.cdi.core.IInjectionPointField;
+import org.jboss.tools.cdi.core.IInjectionPointMethod;
+import org.jboss.tools.cdi.core.IInjectionPointParameter;
+import org.jboss.tools.cdi.seam.solder.core.CDISeamSolderConstants;
+import org.jboss.tools.cdi.seam.solder.core.generic.GenericClassBean;
+import org.jboss.tools.cdi.text.ext.CDIExtensionsPlugin;
+import org.jboss.tools.cdi.text.ext.hyperlink.AlternativeInjectedPointListHyperlink;
+import org.jboss.tools.cdi.text.ext.hyperlink.InjectedPointHyperlink;
+
+public class GenericInjectedPointHyperlinkDetector extends AbstractHyperlinkDetector{
+ private IRegion region;
+ private IDocument document;
+ private ITextViewer viewer;
+
+ public IHyperlink[] detectHyperlinks(ITextViewer textViewer,
+ IRegion region, boolean canShowMultipleHyperlinks) {
+ this.region = region;
+ this.viewer = textViewer;
+
+ ITextEditor textEditor= (ITextEditor)getAdapter(ITextEditor.class);
+ if (region == null || !canShowMultipleHyperlinks || !(textEditor instanceof JavaEditor))
+ return null;
+
+ int offset= region.getOffset();
+
+ IJavaElement input = EditorUtility.getEditorInputJavaElement(textEditor, false);
+ if (input == null)
+ return null;
+
+ if (input.getResource() == null || input.getResource().getProject() == null)
+ return null;
+
+ document= textEditor.getDocumentProvider().getDocument(textEditor.getEditorInput());
+ IRegion wordRegion= JavaWordFinder.findWord(document, offset);
+ if (wordRegion == null)
+ return null;
+
+ IFile file = null;
+
+ try {
+ IResource resource = input.getCorrespondingResource();
+ if (resource instanceof IFile)
+ file = (IFile) resource;
+ } catch (JavaModelException e) {
+ CDIExtensionsPlugin.log(e);
+ }
+
+ if(file == null)
+ return null;
+ CDICoreNature cdiNature = CDIUtil.getCDINatureWithProgress(file.getProject());
+ if(cdiNature == null)
+ return null;
+
+ IJavaElement[] elements = null;
+
+ try {
+ elements = ((ICodeAssist)input).codeSelect(wordRegion.getOffset(), wordRegion.getLength());
+ if (elements == null)
+ return null;
+
+ ArrayList<IHyperlink> hyperlinks = new ArrayList<IHyperlink>();
+ for (IJavaElement element : elements) {
+ int position = 0;
+ if(element instanceof ResolvedSourceType || element instanceof ResolvedBinaryType){
+ ICompilationUnit cUnit = (ICompilationUnit)input;
+ element = cUnit.getElementAt(wordRegion.getOffset());
+ if(element == null)
+ continue;
+
+ if(element instanceof IMethod){
+ position = offset;
+ }
+ }
+
+ findInjectedBeans(cdiNature, element, position, file, hyperlinks);
+ }
+
+ if (hyperlinks != null && !hyperlinks.isEmpty()) {
+ return (IHyperlink[])hyperlinks.toArray(new IHyperlink[hyperlinks.size()]);
+ }
+ } catch (JavaModelException jme) {
+ CDIExtensionsPlugin.log(jme);
+ }
+ return null;
+ }
+
+ private void findInjectedBeans(CDICoreNature nature, IJavaElement element, int offset, IFile file, ArrayList<IHyperlink> hyperlinks){
+ ICDIProject cdiProject = nature.getDelegate();
+
+ if(cdiProject == null) {
+ return;
+ }
+
+ Set<IBean> beans = cdiProject.getBeans(file.getFullPath());
+
+ Set<IInjectionPoint> injectionPoints = findInjectionPoints(beans, element, offset);
+ if(injectionPoints.isEmpty()) {
+ return;
+ }
+
+ Set<IBean> resultBeanSet2 = new HashSet<IBean>();
+
+ for (IInjectionPoint injectionPoint: injectionPoints) {
+ Set<IBean> resultBeanSet = cdiProject.getBeans(true, injectionPoint);
+
+ for (IBean b: resultBeanSet) {
+ IClassBean cb = null;
+ if(b instanceof IClassBean) {
+ cb = (IClassBean)b;
+ }
+ if(b instanceof IBeanMember) {
+ cb = ((IBeanMember)b).getClassBean();
+ }
+ if(cb instanceof GenericClassBean) {
+ GenericClassBean gcb = (GenericClassBean)cb;
+ IBean gpb = gcb.getGenericProducerBean();
+ if(gpb != null) {
+ resultBeanSet2.add(gpb);
+ }
+ } else if(injectionPoint.getClassBean() instanceof GenericClassBean
+ && injectionPoint.isAnnotationPresent(CDISeamSolderConstants.INJECT_GENERIC_ANNOTATION_TYPE_NAME)) {
+ resultBeanSet2.add(b);
+ }
+ }
+ }
+
+ List<IBean> resultBeanList = CDIUtil.sortBeans(resultBeanSet2);
+ if(resultBeanList.size() == 1) {
+ hyperlinks.add(new GenericInjectedPointHyperlink(region, resultBeanList.get(0), document, true));
+ } else if(resultBeanList.size() > 0) {
+ hyperlinks.add(new GenericInjectedPointListHyperlink(region, resultBeanList, viewer, document, hyperlinks.size()));
+ }
+ }
+
+ public static Set<IInjectionPoint> findInjectionPoints(Set<IBean> beans, IJavaElement element, int position) {
+ Set<IInjectionPoint> results = new HashSet<IInjectionPoint>();
+
+ for (IBean bean : beans) {
+ Set<IInjectionPoint> injectionPoints = bean.getInjectionPoints();
+ for (IInjectionPoint iPoint : injectionPoints) {
+ if (element instanceof IField && iPoint instanceof IInjectionPointField) {
+ if (((IInjectionPointField) iPoint).getField() != null && ((IInjectionPointField) iPoint).getField().getElementName().equals(element.getElementName()))
+ results.add(iPoint);
+ } else if (element instanceof IMethod && iPoint instanceof IInjectionPointMethod && position == 0) {
+ if (((IInjectionPointMethod) iPoint).getMethod() != null && ((IInjectionPointMethod) iPoint).getMethod().equals(element))
+ results.add(iPoint);
+ }else if(element instanceof ILocalVariable && iPoint instanceof IInjectionPointParameter){
+ if (((IInjectionPointParameter) iPoint).getName().equals(element.getElementName()))
+ results.add(iPoint);
+ }else if(iPoint instanceof IInjectionPointParameter && position != 0){
+ if(iPoint.getStartPosition() <= position && (iPoint.getStartPosition()+iPoint.getLength()) >= position)
+ results.add(iPoint);
+ }
+ }
+ }
+ return results;
+ }
+
+}
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/hyperlink/GenericInjectedPointHyperlinkDetector.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/hyperlink/GenericInjectedPointListHyperlink.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/hyperlink/GenericInjectedPointListHyperlink.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/hyperlink/GenericInjectedPointListHyperlink.java 2011-05-20 00:41:20 UTC (rev 31391)
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.seam.text.ext.hyperlink;
+
+import java.util.List;
+
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.hyperlink.IHyperlink;
+import org.jboss.tools.cdi.core.IBean;
+import org.jboss.tools.cdi.seam.text.ext.CDISeamExtMessages;
+import org.jboss.tools.cdi.text.ext.hyperlink.AlternativeInjectedPointListHyperlink;
+
+public class GenericInjectedPointListHyperlink extends
+ AlternativeInjectedPointListHyperlink {
+
+ public GenericInjectedPointListHyperlink(IRegion region, List<IBean> beans,
+ ITextViewer viewer, IDocument document, int previousIndex) {
+ super(region, beans, viewer, document, previousIndex);
+ }
+
+ @Override
+ public String getHyperlinkText() {
+ return CDISeamExtMessages.CDI_INJECTED_POINT_HYPERLINK_SHOW_GENERIC_BEANS;
+ }
+
+ @Override
+ protected IHyperlink createHyperlink(IRegion region, IBean bean) {
+ return new GenericInjectedPointHyperlink(region, bean, getDocument(), false);
+ }
+
+}
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/hyperlink/GenericInjectedPointListHyperlink.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/messages.properties
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/messages.properties 2011-05-20 00:24:15 UTC (rev 31390)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/messages.properties 2011-05-20 00:41:20 UTC (rev 31391)
@@ -1,3 +1,6 @@
CDI_SEAM_EXT_PLUGIN_NO_MESSAGE=No message
CDI_SEAM_RESOURCE_LOADING_HYPERLINK=Open Resource ''{0}''
CDI_SEAM_CONFIG_OPEN_TAG=Open Seam Config tag {0}
+CDI_INJECTED_POINT_HYPERLINK_SHOW_GENERIC_BEANS=Show All Generic Beans...
+OPEN_GENERIC_BEAN=Open Generic Bean {0}
+OPEN_GENERIC_PRODUCER_BEAN=Open Generic Producer Bean {0}
13 years, 4 months
JBoss Tools SVN: r31390 - trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-05-19 20:24:15 -0400 (Thu, 19 May 2011)
New Revision: 31390
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/AlternativeInjectedPointListHyperlink.java
trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/InjectedPointHyperlink.java
Log:
JBIDE-8692
https://issues.jboss.org/browse/JBIDE-8692
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/AlternativeInjectedPointListHyperlink.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/AlternativeInjectedPointListHyperlink.java 2011-05-20 00:10:09 UTC (rev 31389)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/AlternativeInjectedPointListHyperlink.java 2011-05-20 00:24:15 UTC (rev 31390)
@@ -44,7 +44,7 @@
int index=0;
for(IBean bean : beans){
- hyperlinks[index++] = new InjectedPointHyperlink(region, bean, getDocument());
+ hyperlinks[index++] = createHyperlink(region, bean);
}
if(hyperlinks.length == 0){
@@ -59,6 +59,10 @@
}
}
+ protected IHyperlink createHyperlink(IRegion region, IBean bean) {
+ return new InjectedPointHyperlink(region, bean, getDocument());
+ }
+
@Override
public String getHyperlinkText() {
return CDIExtensionsMessages.CDI_INJECTED_POINT_HYPERLINK_SHOW_ALTERNATIVES;
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/InjectedPointHyperlink.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/InjectedPointHyperlink.java 2011-05-20 00:10:09 UTC (rev 31389)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/InjectedPointHyperlink.java 2011-05-20 00:24:15 UTC (rev 31390)
@@ -27,7 +27,7 @@
import org.jboss.tools.common.text.ext.hyperlink.AbstractHyperlink;
public class InjectedPointHyperlink extends AbstractHyperlink{
- IBean bean;
+ protected IBean bean;
IRegion region;
boolean first = false;
13 years, 4 months
JBoss Tools SVN: r31389 - in trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core: .settings and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-05-19 20:10:09 -0400 (Thu, 19 May 2011)
New Revision: 31389
Added:
trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/.settings/
trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/.settings/org.eclipse.jdt.core.prefs
Log:
JBIDE-8674
https://issues.jboss.org/browse/JBIDE-8674
Added: trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/.settings/org.eclipse.jdt.core.prefs 2011-05-20 00:10:09 UTC (rev 31389)
@@ -0,0 +1,8 @@
+#Wed May 18 16:43:06 PDT 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Added: svn:mime-type
+ text/plain
13 years, 4 months
JBoss Tools SVN: r31388 - in trunk/cdi/plugins/org.jboss.tools.cdi.seam.solder.core: src/org/jboss/tools/cdi/seam/solder/core and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-05-19 20:09:19 -0400 (Thu, 19 May 2011)
New Revision: 31388
Added:
trunk/cdi/plugins/org.jboss.tools.cdi.seam.solder.core/src/org/jboss/tools/cdi/seam/solder/core/definition/GenericProducerField.java
trunk/cdi/plugins/org.jboss.tools.cdi.seam.solder.core/src/org/jboss/tools/cdi/seam/solder/core/generic/GenericClassBean.java
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.seam.solder.core/META-INF/MANIFEST.MF
trunk/cdi/plugins/org.jboss.tools.cdi.seam.solder.core/src/org/jboss/tools/cdi/seam/solder/core/CDISeamSolderConstants.java
trunk/cdi/plugins/org.jboss.tools.cdi.seam.solder.core/src/org/jboss/tools/cdi/seam/solder/core/generic/CDISeamSolderGenericBeanExtension.java
Log:
JBIDE-8674
https://issues.jboss.org/browse/JBIDE-8674
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.seam.solder.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.solder.core/META-INF/MANIFEST.MF 2011-05-20 00:05:45 UTC (rev 31387)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.solder.core/META-INF/MANIFEST.MF 2011-05-20 00:09:19 UTC (rev 31388)
@@ -28,5 +28,6 @@
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Vendor: JBoss by Red Hat
-Export-Package: org.jboss.tools.cdi.seam.solder.core
+Export-Package: org.jboss.tools.cdi.seam.solder.core,
+ org.jboss.tools.cdi.seam.solder.core.generic
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.seam.solder.core/src/org/jboss/tools/cdi/seam/solder/core/CDISeamSolderConstants.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.solder.core/src/org/jboss/tools/cdi/seam/solder/core/CDISeamSolderConstants.java 2011-05-20 00:05:45 UTC (rev 31387)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.solder.core/src/org/jboss/tools/cdi/seam/solder/core/CDISeamSolderConstants.java 2011-05-20 00:09:19 UTC (rev 31388)
@@ -37,5 +37,7 @@
public String GENERIC_ANNOTATION_KIND = "genericAnnotation";
public String GENERIC_QUALIFIER_TYPE_NAME = "org.jboss.seam.solder.bean.generic.Generic";
public String GENERIC_CONFIGURATION_ANNOTATION_TYPE_NAME = "org.jboss.seam.solder.bean.generic.GenericConfiguration";
+ public String APPLY_SCOPE_ANNOTATION_TYPE_NAME = "org.jboss.seam.solder.bean.generic.ApplyScope";
+ public String INJECT_GENERIC_ANNOTATION_TYPE_NAME = "org.jboss.seam.solder.bean.generic.InjectGeneric";
}
Added: trunk/cdi/plugins/org.jboss.tools.cdi.seam.solder.core/src/org/jboss/tools/cdi/seam/solder/core/definition/GenericProducerField.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.solder.core/src/org/jboss/tools/cdi/seam/solder/core/definition/GenericProducerField.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.solder.core/src/org/jboss/tools/cdi/seam/solder/core/definition/GenericProducerField.java 2011-05-20 00:09:19 UTC (rev 31388)
@@ -0,0 +1,7 @@
+package org.jboss.tools.cdi.seam.solder.core.definition;
+
+import org.jboss.tools.cdi.internal.core.impl.ProducerField;
+
+public class GenericProducerField extends ProducerField {
+
+}
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.seam.solder.core/src/org/jboss/tools/cdi/seam/solder/core/definition/GenericProducerField.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.seam.solder.core/src/org/jboss/tools/cdi/seam/solder/core/generic/CDISeamSolderGenericBeanExtension.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.solder.core/src/org/jboss/tools/cdi/seam/solder/core/generic/CDISeamSolderGenericBeanExtension.java 2011-05-20 00:05:45 UTC (rev 31387)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.solder.core/src/org/jboss/tools/cdi/seam/solder/core/generic/CDISeamSolderGenericBeanExtension.java 2011-05-20 00:09:19 UTC (rev 31388)
@@ -23,6 +23,7 @@
import org.eclipse.jdt.core.JavaModelException;
import org.jboss.tools.cdi.core.CDICoreNature;
import org.jboss.tools.cdi.core.IAnnotationDeclaration;
+import org.jboss.tools.cdi.core.IJavaAnnotation;
import org.jboss.tools.cdi.core.IProducer;
import org.jboss.tools.cdi.core.IQualifierDeclaration;
import org.jboss.tools.cdi.core.IRootDefinitionContext;
@@ -39,6 +40,7 @@
import org.jboss.tools.cdi.internal.core.impl.definition.AnnotationDefinition;
import org.jboss.tools.cdi.internal.core.impl.definition.FieldDefinition;
import org.jboss.tools.cdi.internal.core.impl.definition.MethodDefinition;
+import org.jboss.tools.cdi.internal.core.impl.definition.ParameterDefinition;
import org.jboss.tools.cdi.internal.core.impl.definition.TypeDefinition;
import org.jboss.tools.cdi.internal.core.scanner.FileSet;
import org.jboss.tools.cdi.seam.solder.core.CDISeamSolderConstants;
@@ -80,13 +82,23 @@
public void buildBeans() {
CDIProject p = ((CDIProject)project.getDelegate());
- for (GenericConfiguration c: context.getGenericConfigurations().values()) {
+ for (GenericConfiguration c: context.getGenericConfigurations().values()) {
+ //Create fake bean for injection of generic type annotation.
+ AnnotationDefinition genericTypeDef = c.getGenericTypeDefinition();
+ if(genericTypeDef != null) {
+ TypeDefinition fakeGenericType = new TypeDefinition();
+ fakeGenericType.setType(genericTypeDef.getType(), context.getRootContext(), 0);
+ ClassBean b = new ClassBean();
+ b.setDefinition(fakeGenericType);
+ b.setParent(p);
+ p.addBean(b);
+ }
+
Map<AbstractMemberDefinition, List<IAnnotationDeclaration>> ms = c.getGenericProducerBeans();
- //TODO scopes!
-
Set<TypeDefinition> ts = c.getGenericConfigurationBeans();
- for (List<IAnnotationDeclaration> list: ms.values()) {
+ for (AbstractMemberDefinition gp: ms.keySet()) {
+ List<IAnnotationDeclaration> list = ms.get(gp);
for (TypeDefinition t: ts) {
TypeDefinition ti = new TypeDefinition();
ti.setType(t.getType(), context.getRootContext(), 0);
@@ -98,9 +110,14 @@
}
}
}
- ClassBean cb = new ClassBean();
+ replaceGenericInjections(ti, list);
+
+ GenericClassBean cb = new GenericClassBean();
+ cb.setGenericProducerBeanDefinition(gp);
cb.setParent(p);
cb.setDefinition(ti);
+
+ p.addBean(cb);
Set<IProducer> producers = cb.getProducers();
for (IProducer producer: producers) {
p.addBean(producer);
@@ -110,9 +127,51 @@
}
}
+ private void replaceGenericInjections(TypeDefinition ti, List<IAnnotationDeclaration> list) {
+ List<FieldDefinition> fs = ti.getFields();
+ for (FieldDefinition f: fs) {
+ if(f.isAnnotationPresent(INJECT_ANNOTATION_TYPE_NAME) && f.isAnnotationPresent(GENERIC_QUALIFIER_TYPE_NAME)) {
+ for (IAnnotationDeclaration d: list) {
+ f.addAnnotation(((AnnotationDeclaration)d).getDeclaration(), context.getRootContext());
+ }
+ AnnotationDeclaration gd = f.getAnnotation(GENERIC_QUALIFIER_TYPE_NAME);
+ f.removeAnnotation(gd);
+ f.addAnnotation(createInjectGenericAnnotation(gd), context.getRootContext());
+ }
+ }
+
+ List<MethodDefinition> ms = ti.getMethods();
+ for (MethodDefinition m: ms) {
+ if(m.isAnnotationPresent(INJECT_ANNOTATION_TYPE_NAME)) {
+ boolean isMethodGeneric = m.isAnnotationPresent(GENERIC_QUALIFIER_TYPE_NAME);
+ List<ParameterDefinition> ps = m.getParameters();
+ for (ParameterDefinition p: ps) {
+ if(isMethodGeneric || p.isAnnotationPresent(GENERIC_QUALIFIER_TYPE_NAME)) {
+ for (IAnnotationDeclaration d: list) {
+ p.addAnnotation(((AnnotationDeclaration)d).getDeclaration(), context.getRootContext());
+ }
+ AnnotationDeclaration gd = p.getAnnotation(GENERIC_QUALIFIER_TYPE_NAME);
+ if(gd != null) {
+ p.removeAnnotation(gd);
+ p.addAnnotation(createInjectGenericAnnotation(gd), context.getRootContext());
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private IJavaAnnotation createInjectGenericAnnotation(AnnotationDeclaration genericAnnotation) {
+ IType type = project.getType(INJECT_GENERIC_ANNOTATION_TYPE_NAME);
+ return (type != null) ? new AnnotationLiteral(genericAnnotation.getResource(),
+ genericAnnotation.getStartPosition(), genericAnnotation.getLength(), null, 0, type)
+ : null;
+ }
+
@Override
public void processAnnotatedType(TypeDefinition typeDefinition, IRootDefinitionContext context) {
if(typeDefinition.isAnnotationPresent(GENERIC_CONFIGURATION_ANNOTATION_TYPE_NAME)) {
+ typeDefinition.veto();
IAnnotationDeclaration d = typeDefinition.getAnnotation(GENERIC_CONFIGURATION_ANNOTATION_TYPE_NAME);
Object o = d.getMemberValue(null);
if(o != null) {
@@ -129,43 +188,28 @@
}
}
}
- List<MethodDefinition> ms = typeDefinition.getMethods();
- for (MethodDefinition m: ms) {
- if(m.isAnnotationPresent(PRODUCES_ANNOTATION_TYPE_NAME)) {
- IType q = project.getType(GENERIC_QUALIFIER_TYPE_NAME);
- if(q != null) {
- AnnotationLiteral a = new AnnotationLiteral(m.getResource(), 0, 0, null, 0, q);
- m.addAnnotation(a, context);
- }
- }
- }
} else {
- IAnnotationDeclaration d = findAnnotationAnnotatedWithGenericType(typeDefinition);
- if(d != null) {
- addGenericProducerBean(typeDefinition, findAnnotationAnnotatedWithGenericType(typeDefinition).getTypeName());
- }
- List<MethodDefinition> ms = typeDefinition.getMethods();
- for (MethodDefinition m: ms) {
+ addGenericProducerBean(typeDefinition);
+ for (MethodDefinition m: typeDefinition.getMethods()) {
if(m.isAnnotationPresent(PRODUCES_ANNOTATION_TYPE_NAME)) {
- d = findAnnotationAnnotatedWithGenericType(m);
- if(d != null) {
- addGenericProducerBean(m, d.getTypeName());
- }
+ addGenericProducerBean(m);
}
}
- List<FieldDefinition> fs = typeDefinition.getFields();
- for (FieldDefinition f: fs) {
+ for (FieldDefinition f: typeDefinition.getFields()) {
if(f.isAnnotationPresent(PRODUCES_ANNOTATION_TYPE_NAME)) {
- d = findAnnotationAnnotatedWithGenericType(f);
- if(d != null) {
- addGenericProducerBean(f, d.getTypeName());
- }
+ addGenericProducerBean(f);
}
}
}
-
}
+ private void addGenericProducerBean(AbstractMemberDefinition def) {
+ IAnnotationDeclaration d = findAnnotationAnnotatedWithGenericType(def);
+ if(d != null) {
+ addGenericProducerBean(def, d.getTypeName());
+ }
+ }
+
private void addGenericProducerBean(AbstractMemberDefinition def, String genericType) {
GenericConfiguration c = ((GenericBeanDefinitionContext)this.context.getWorkingCopy()).getGenericConfiguration(genericType);
@@ -177,13 +221,7 @@
}
}
c.getGenericProducerBeans().put(def, list);
- if(c.getGenericProducerBeans().size() == 1) {
- IType q = project.getType(GENERIC_QUALIFIER_TYPE_NAME);
- if(q != null) {
- AnnotationLiteral a = new AnnotationLiteral(def.getResource(), 0, 0, null, 0, q);
- def.addAnnotation(a, context.getRootContext());
- }
- }
+
IResource r = def.getResource();
if(r != null && r.exists() && !c.getInvolvedTypes().contains(r.getFullPath())) {
IPath newPath = r.getFullPath();
Added: trunk/cdi/plugins/org.jboss.tools.cdi.seam.solder.core/src/org/jboss/tools/cdi/seam/solder/core/generic/GenericClassBean.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.solder.core/src/org/jboss/tools/cdi/seam/solder/core/generic/GenericClassBean.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.solder.core/src/org/jboss/tools/cdi/seam/solder/core/generic/GenericClassBean.java 2011-05-20 00:09:19 UTC (rev 31388)
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.seam.solder.core.generic;
+
+import java.util.Set;
+
+import org.jboss.tools.cdi.core.IBean;
+import org.jboss.tools.cdi.internal.core.impl.AbstractBeanElement;
+import org.jboss.tools.cdi.internal.core.impl.ClassBean;
+import org.jboss.tools.cdi.internal.core.impl.definition.AbstractMemberDefinition;
+import org.jboss.tools.cdi.seam.solder.core.CDISeamSolderConstants;
+
+/**
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public class GenericClassBean extends ClassBean {
+ protected AbstractMemberDefinition genericProducerBean;
+
+ public GenericClassBean() {}
+
+ public void setGenericProducerBeanDefinition(AbstractMemberDefinition def) {
+ genericProducerBean = def;
+ }
+
+ public IBean getGenericProducerBean() {
+ Set<IBean> bs = getCDIProject().getBeans(genericProducerBean.getTypeDefinition().getType().getPath());
+ for (IBean b: bs) {
+ if(b instanceof AbstractBeanElement) {
+ if(((AbstractBeanElement)b).getDefinition() == genericProducerBean) {
+ return b;
+ }
+ }
+ }
+ return null;
+ }
+
+ protected void computeScope() {
+ if(definition.isAnnotationPresent(CDISeamSolderConstants.APPLY_SCOPE_ANNOTATION_TYPE_NAME)) {
+ IBean generic = getGenericProducerBean();
+ if(generic != null) {
+ scope = generic.getScope();
+ }
+ }
+ if(scope == null) {
+ super.computeScope();
+ }
+ }
+
+}
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.seam.solder.core/src/org/jboss/tools/cdi/seam/solder/core/generic/GenericClassBean.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
13 years, 4 months
JBoss Tools SVN: r31387 - trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-05-19 20:05:45 -0400 (Thu, 19 May 2011)
New Revision: 31387
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/CDISeamConfigExtension.java
Log:
JBIDE-8674
https://issues.jboss.org/browse/JBIDE-8674
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/CDISeamConfigExtension.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/CDISeamConfigExtension.java 2011-05-19 22:28:23 UTC (rev 31386)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/CDISeamConfigExtension.java 2011-05-20 00:05:45 UTC (rev 31387)
@@ -26,7 +26,6 @@
import org.eclipse.osgi.util.NLS;
import org.jboss.tools.cdi.core.CDICoreNature;
import org.jboss.tools.cdi.core.extension.ICDIExtension;
-import org.jboss.tools.cdi.core.extension.IDefinitionContextExtension;
import org.jboss.tools.cdi.core.extension.feature.IBuildParticipantFeature;
import org.jboss.tools.cdi.core.extension.feature.IValidatorFeature;
import org.jboss.tools.cdi.internal.core.scanner.FileSet;
@@ -182,7 +181,7 @@
validator.addError(message, CDISeamConfigPreferences.UNRESOLVED_METHOD, new TextSourceReference(file, node), file);
} else if(CDISeamConfigConstants.ERROR_UNRESOLVED_CONSTRUCTOR.equals(problemId)) {
String name = node instanceof SAXElement && ((SAXElement)node).getParent() != null ? ((SAXElement)node).getParent().getName() : null;
- String message = NLS.bind(SeamConfigValidationMessages.UNRESOLVED_CONSTRUCTOR, ((SAXElement)node).getParent().getName());
+ String message = NLS.bind(SeamConfigValidationMessages.UNRESOLVED_CONSTRUCTOR, name);
validator.addError(message, CDISeamConfigPreferences.UNRESOLVED_CONSTRUCTOR, new TextSourceReference(file, node), file);
} else if(CDISeamConfigConstants.ERROR_ANNOTATION_EXPECTED.equals(problemId)) {
String message = NLS.bind(SeamConfigValidationMessages.ANNOTATION_EXPECTED, null);
13 years, 4 months
JBoss Tools SVN: r31386 - in trunk/cdi/plugins/org.jboss.tools.cdi.ui: src/org/jboss/tools/cdi/ui/wizard/xpl and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2011-05-19 18:28:23 -0400 (Thu, 19 May 2011)
New Revision: 31386
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/META-INF/MANIFEST.MF
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/xpl/AddQualifiersToBeanComposite.java
Log:
https://issues.jboss.org/browse/JBIDE-8958
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/META-INF/MANIFEST.MF 2011-05-19 15:52:37 UTC (rev 31385)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/META-INF/MANIFEST.MF 2011-05-19 22:28:23 UTC (rev 31386)
@@ -32,7 +32,8 @@
org.eclipse.wst.common.project.facet.ui;bundle-version="1.4.200",
org.eclipse.debug.ui;bundle-version="3.7.0",
org.eclipse.ui.navigator;bundle-version="3.5.0",
- org.eclipse.ui.navigator.resources;bundle-version="3.4.300"
+ org.eclipse.ui.navigator.resources;bundle-version="3.4.300",
+ org.eclipse.draw2d
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Vendor: %Bundle-Vendor.0
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/xpl/AddQualifiersToBeanComposite.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/xpl/AddQualifiersToBeanComposite.java 2011-05-19 15:52:37 UTC (rev 31385)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/xpl/AddQualifiersToBeanComposite.java 2011-05-19 22:28:23 UTC (rev 31386)
@@ -22,12 +22,14 @@
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.draw2d.ColorConstants;
import org.eclipse.jdt.core.Flags;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IColorProvider;
import org.eclipse.jface.viewers.IContentProvider;
import org.eclipse.jface.viewers.IDoubleClickListener;
import org.eclipse.jface.viewers.ILabelProvider;
@@ -35,9 +37,9 @@
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ListViewer;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerComparator;
import org.eclipse.jface.viewers.ViewerFilter;
@@ -50,6 +52,7 @@
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.FontData;
import org.eclipse.swt.graphics.Image;
@@ -59,8 +62,8 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.List;
import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.dialogs.SearchPattern;
@@ -95,8 +98,8 @@
// original + deployed
ArrayList<IQualifier> total = new ArrayList<IQualifier>();
- private ListViewer availableListViewer;
- private ListViewer deployedListViewer;
+ private TableViewer availableListViewer;
+ private TableViewer deployedListViewer;
private Button add, addAll;
private Button remove, removeAll;
@@ -105,7 +108,7 @@
protected boolean isComplete = true;
- private ILabelProvider labelProvider;
+ private ILabelProvider labelProvider = new QualifiersListLabelProvider();
public AddQualifiersToBeanComposite(Composite parent, WizardPage wizard) {
super(parent, SWT.NONE);
@@ -287,14 +290,14 @@
label = new Label(this, SWT.NONE);
label.setText(CDIUIMessages.ADD_QUALIFIERS_TO_BEAN_WIZARD_IN_BEAN);
- List availableList = new List(this, SWT.BORDER | SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
+ Table availableList = new Table(this, SWT.BORDER | SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
data = new GridData(GridData.FILL_BOTH);
data.heightHint = 200;
data.widthHint = 150;
availableList.setLayoutData(data);
- availableListViewer = new ListViewer(availableList);
- labelProvider = new QualifiersListLabelProvider();
+ availableListViewer = new TableViewer(availableList);
+
availableListViewer.setLabelProvider(labelProvider);
IContentProvider contentProvider = new QualifiersListContentProvider();
availableListViewer.setContentProvider(contentProvider);
@@ -375,12 +378,12 @@
}
});
- List deployedList = new List(this, SWT.BORDER | SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
+ Table deployedList = new Table(this, SWT.BORDER | SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
data = new GridData(GridData.FILL_BOTH);
data.widthHint = 150;
deployedList.setLayoutData(data);
- deployedListViewer = new ListViewer(deployedList);
+ deployedListViewer = new TableViewer(deployedList);
deployedListViewer.setLabelProvider(labelProvider);
deployedListViewer.setContentProvider(contentProvider);
deployedListViewer.setComparator(new ViewerComparator() {
@@ -634,7 +637,7 @@
return qualifiers;
}
- class QualifiersListLabelProvider implements ILabelProvider{
+ class QualifiersListLabelProvider implements ILabelProvider, IColorProvider{
public void addListener(ILabelProviderListener listener) {
}
@@ -643,7 +646,7 @@
}
public boolean isLabelProperty(Object element, String property) {
- return false;
+ return true;
}
public void removeListener(ILabelProviderListener listener) {
@@ -664,7 +667,18 @@
}
return "";
}
-
+
+ public Color getForeground(Object element) {
+ if(element instanceof IQualifier){
+ if(contains(originalQualifiers, (IQualifier)element))
+ return ColorConstants.lightGray;
+ }
+ return ColorConstants.black;
+ }
+
+ public Color getBackground(Object element) {
+ return null;
+ }
}
class QualifiersListContentProvider implements IStructuredContentProvider{
13 years, 4 months
JBoss Tools SVN: r31385 - trunk/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2011-05-19 11:52:37 -0400 (Thu, 19 May 2011)
New Revision: 31385
Modified:
trunk/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/Jbide6061Test.java
Log:
JBIDE-8949
org.jboss.tools.jst.jsp.test.JstJspAllTests failure
The issue is fixed.
Modified: trunk/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/Jbide6061Test.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/Jbide6061Test.java 2011-05-19 15:28:45 UTC (rev 31384)
+++ trunk/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/Jbide6061Test.java 2011-05-19 15:52:37 UTC (rev 31385)
@@ -29,6 +29,7 @@
private static final String PROJECT_NAME = "Jbide6061Test"; //$NON-NLS-1$
private static final String JSP_PAGE_NAME = "/WebContent/pages/jsp_page.jsp"; //$NON-NLS-1$
private static final String XHTML_PAGE_NAME = "/WebContent/pages/xhtml_page.xhtml"; //$NON-NLS-1$
+ private static final String HTML_PAGE_NAME = "/WebContent/pages/html_page.html"; //$NON-NLS-1$
private TestProjectProvider provider = null;
private final String[] CSSCLASS_PROPOSALS = new String[]{
"errors", //$NON-NLS-1$
@@ -38,8 +39,9 @@
"cls4", //$NON-NLS-1$
"cls5", //$NON-NLS-1$
};
- private static final String STRING_TO_FIND_IN_JSP = "styleClass=\"";
- private static final String STRING_TO_FIND_IN_XHTML = "class=\"";
+ private static final String[] STRINGS_TO_FIND_IN_JSP = new String[] {"class=\"", "styleClass=\""};
+ private static final String[] STRINGS_TO_FIND_IN_XHTML = new String[] {"class=\"", "styleClass=\""};
+ private static final String[] STRINGS_TO_FIND_IN_HTML = new String [] {"class=\""};
public static Test suite() {
return new TestSuite(Jbide6061Test.class);
@@ -57,36 +59,37 @@
}
public void testJbide6061OnJspPage(){
- openEditor(JSP_PAGE_NAME);
- IRegion reg=null;
- try {
- reg = new FindReplaceDocumentAdapter(this.document).find(0, STRING_TO_FIND_IN_JSP, true, false, false, false); //$NON-NLS-1$
- } catch (BadLocationException e) {
- fail(e.getMessage());
- }
-
- assertNotNull("Cannot find a text region to test", reg);
-
- final ICompletionProposal[] rst = checkProposals(JSP_PAGE_NAME,reg.getOffset() + STRING_TO_FIND_IN_JSP.length(), CSSCLASS_PROPOSALS, false);
-
- checkResult(rst,CSSCLASS_PROPOSALS);
- closeEditor();
+ for (String textToFind : STRINGS_TO_FIND_IN_JSP) {
+ doTheCSSClassValuesTest(JSP_PAGE_NAME, textToFind, CSSCLASS_PROPOSALS);
+ }
}
+ public void testJbide6061OnHtmlPage(){
+ for (String textToFind : STRINGS_TO_FIND_IN_HTML) {
+ doTheCSSClassValuesTest(HTML_PAGE_NAME, textToFind, CSSCLASS_PROPOSALS);
+ }
+ }
+
public void testJbide6061OnXhtmlPage(){
- openEditor(XHTML_PAGE_NAME);
+ for (String textToFind : STRINGS_TO_FIND_IN_XHTML) {
+ doTheCSSClassValuesTest(XHTML_PAGE_NAME, textToFind, CSSCLASS_PROPOSALS);
+ }
+ }
+
+ protected void doTheCSSClassValuesTest(String pageName, String textToFind, String[] proposals) {
+ openEditor(pageName);
IRegion reg=null;
try {
- reg = new FindReplaceDocumentAdapter(this.document).find(0, STRING_TO_FIND_IN_XHTML, true, false, false, false); //$NON-NLS-1$
+ reg = new FindReplaceDocumentAdapter(this.document).find(0, textToFind, true, false, false, false); //$NON-NLS-1$
} catch (BadLocationException e) {
fail(e.getMessage());
}
assertNotNull("Cannot find a text region to test", reg);
- final ICompletionProposal[] rst = checkProposals(XHTML_PAGE_NAME,reg.getOffset() + STRING_TO_FIND_IN_XHTML.length(), CSSCLASS_PROPOSALS, false);
+ final ICompletionProposal[] rst = checkProposals(pageName,reg.getOffset() + textToFind.length(), proposals, false);
- checkResult(rst,CSSCLASS_PROPOSALS);
+ checkResult(rst,proposals);
closeEditor();
}
13 years, 4 months
JBoss Tools SVN: r31384 - in branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl: META-INF and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2011-05-19 11:28:45 -0400 (Thu, 19 May 2011)
New Revision: 31384
Added:
branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/CompatibilityPage.java
Modified:
branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/META-INF/MANIFEST.MF
branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/plugin.xml
branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/Plugin.java
branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/model/AbstractNode.java
branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/properties/ConditionSection.java
branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/DecisionDomAdapter.java
branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/ForkDomAdapter.java
branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/JoinDomAdapter.java
branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/MailNodeDomAdapter.java
branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/NodeDomAdapter.java
branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/ProcessStateDomAdapter.java
branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/StartStateDomAdapter.java
branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/StateDomAdapter.java
branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/SubProcessDomAdapter.java
branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/SuperStateDomAdapter.java
branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/TaskNodeDomAdapter.java
branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/TransitionDomAdapter.java
Log:
JBIDE-8956
Modified: branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/META-INF/MANIFEST.MF
===================================================================
--- branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/META-INF/MANIFEST.MF 2011-05-19 14:57:51 UTC (rev 31383)
+++ branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/META-INF/MANIFEST.MF 2011-05-19 15:28:45 UTC (rev 31384)
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %bundleName
Bundle-SymbolicName: org.jbpm.gd.jpdl;singleton:=true
-Bundle-Version: 3.3.0.qualifier
+Bundle-Version: 3.4.0.qualifier
Bundle-ClassPath: .,
lib/dom4j-1.4.jar
Bundle-Activator: org.jbpm.gd.jpdl.Plugin
Modified: branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/plugin.xml
===================================================================
--- branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/plugin.xml 2011-05-19 14:57:51 UTC (rev 31383)
+++ branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/plugin.xml 2011-05-19 15:28:45 UTC (rev 31384)
@@ -379,6 +379,11 @@
id="org.jbpm.gd.jpdl.prefs.templates"
name="Jpdl Templates"
category="org.jbpm.gd.jpdl.prefs.jbpm3"/>
+ <page
+ class="org.jbpm.gd.jpdl.prefs.CompatibilityPage"
+ id="org.jbpm.gd.jpdl.prefs.templates"
+ name="Compatibility"
+ category="org.jbpm.gd.jpdl.prefs.jbpm3"/>
</extension>
<extension point="org.eclipse.ui.views.properties.tabbed.propertyContributor">
Modified: branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/Plugin.java
===================================================================
--- branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/Plugin.java 2011-05-19 14:57:51 UTC (rev 31383)
+++ branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/Plugin.java 2011-05-19 15:28:45 UTC (rev 31384)
@@ -33,6 +33,11 @@
private ResourceBundle resourceBundle;
+ /**
+ * @since 3.4
+ */
+ public static final String TRANS_COND_WARN_PREFERENCE = "transition condition warn";
+
public Plugin() {
super();
plugin = this;
Modified: branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/model/AbstractNode.java
===================================================================
--- branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/model/AbstractNode.java 2011-05-19 14:57:51 UTC (rev 31383)
+++ branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/model/AbstractNode.java 2011-05-19 15:28:45 UTC (rev 31384)
@@ -59,6 +59,7 @@
public void removeTransition(Transition transition) {
if (!(transitions.contains(transition))) return;
transitions.remove(transition);
+ transition.setSource(null);
firePropertyChange("transitionRemove", transition, null);
}
Added: branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/CompatibilityPage.java
===================================================================
--- branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/CompatibilityPage.java (rev 0)
+++ branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/CompatibilityPage.java 2011-05-19 15:28:45 UTC (rev 31384)
@@ -0,0 +1,79 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.gd.jpdl.prefs;
+
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.jbpm.gd.jpdl.Constants;
+import org.jbpm.gd.jpdl.Plugin;
+
+/**
+ * @since 3.4
+ */
+public class CompatibilityPage extends PreferencePage implements IWorkbenchPreferencePage, Constants {
+
+ private Button transCondWarningButton;
+
+ protected Control createContents(Composite parent) {
+ Composite clientArea = createClientArea(parent);
+ createIncludeXsdButton(clientArea);
+ return null;
+ }
+
+ private void createIncludeXsdButton(Composite parent) {
+ transCondWarningButton = new Button(parent, SWT.CHECK);
+ transCondWarningButton.setText("Suppress warning on invalid transitions with conditions." );
+ transCondWarningButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ transCondWarningButton.setSelection(getPreferenceStore().getBoolean(Plugin.TRANS_COND_WARN_PREFERENCE));
+ }
+
+ private Composite createClientArea(Composite parent) {
+ Composite clientArea = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 2;
+ clientArea.setLayout(layout);
+ GridData gridData = new GridData(GridData.FILL_BOTH);
+ clientArea.setLayoutData(gridData);
+ return clientArea;
+ }
+
+ public void init(IWorkbench workbench) {
+ setPreferenceStore(Plugin.getDefault().getPreferenceStore());
+ }
+
+ public void performDefaults() {
+ getPreferenceStore().setToDefault(Plugin.TRANS_COND_WARN_PREFERENCE);
+ }
+
+ public boolean performOk() {
+ getPreferenceStore().setValue(Plugin.TRANS_COND_WARN_PREFERENCE, transCondWarningButton.getSelection());
+ return true;
+ }
+
+}
Modified: branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/properties/ConditionSection.java
===================================================================
--- branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/properties/ConditionSection.java 2011-05-19 14:57:51 UTC (rev 31383)
+++ branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/properties/ConditionSection.java 2011-05-19 15:28:45 UTC (rev 31384)
@@ -1,5 +1,8 @@
package org.jbpm.gd.jpdl.properties;
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.SWT;
@@ -19,8 +22,11 @@
import org.jbpm.gd.common.part.NotationElementGraphicalEditPart;
import org.jbpm.gd.common.part.OutlineEditPart;
import org.jbpm.gd.common.properties.AbstractPropertySection;
+import org.jbpm.gd.jpdl.Plugin;
import org.jbpm.gd.jpdl.model.Condition;
+import org.jbpm.gd.jpdl.model.Decision;
import org.jbpm.gd.jpdl.model.Transition;
+import org.jbpm.gd.jpdl.prefs.CompatibilityPage;
public class ConditionSection extends AbstractPropertySection implements SelectionListener, FocusListener {
@@ -31,18 +37,29 @@
private Text expressionText;
private Text scriptText;
private Transition transition;
-
+
+ private static final String CONDITION_ON_TRANSITION_WARNING = "Invalid condition: transitions with conditions only valid if the source node is a decision!";
+
+ private Label warningLabel;
+ private Boolean hideTransitionConditionWarnings;
+
public void createControls(Composite parent,
TabbedPropertySheetPage aTabbedPropertySheetPage) {
super.createControls(parent, aTabbedPropertySheetPage);
Composite clientArea = getWidgetFactory().createFlatFormComposite(parent);
+
+ warningLabel = getWidgetFactory().createLabel(clientArea, "");
+ warningLabel.setForeground(ColorConstants.red);
conditionLabel = getWidgetFactory().createLabel(clientArea, "Condition Type");
conditionCombo = getWidgetFactory().createCCombo(clientArea);
- conditionCombo.setItems(new String[] {"Unconditional", "Expression", "Script" });
+ // updateConditionCombo(); -- refresh is always called, and the ConditionCombo is set there.
+
conditionCombo.setEditable(false);
label = getWidgetFactory().createLabel(clientArea, "");
expressionText = getWidgetFactory().createText(clientArea, "");
scriptText = getWidgetFactory().createText(clientArea, "", SWT.H_SCROLL | SWT.V_SCROLL);
+
+ warningLabel.setLayoutData(createWarningLabelLayoutData());
conditionLabel.setLayoutData(createConditionLabelLayoutData());
conditionCombo.setLayoutData(createConditionComboLayoutData());
label.setLayoutData(createLabelLayoutData());
@@ -51,15 +68,85 @@
hookListeners();
refresh();
}
-
+
+ IPropertyChangeListener preferenceListener = new IPropertyChangeListener() {
+ /*
+ * @see IPropertyChangeListener.propertyChange()
+ */
+ public void propertyChange(PropertyChangeEvent event) {
+ if (event.getProperty().equals(Plugin.TRANS_COND_WARN_PREFERENCE)) {
+ hideTransitionConditionWarnings = null;
+ }
+ }
+ };
+
private void hookListeners() {
conditionCombo.addSelectionListener(this);
expressionText.addSelectionListener(this);
expressionText.addFocusListener(this);
scriptText.addSelectionListener(this);
scriptText.addFocusListener(this);
+ Plugin.getDefault().getPreferenceStore().addPropertyChangeListener(preferenceListener);
}
-
+
+ public void dispose() {
+ Plugin.getDefault().getPreferenceStore().removePropertyChangeListener(preferenceListener);
+ super.dispose();
+ }
+
+ private void updateConditionCombo() {
+ if (transition == null) {
+ conditionCombo.setItems(new String[] { "Unconditional" });
+ }
+ else if (getHideTransitionConditionWarning() ) {
+ conditionCombo.setItems(new String[] { "Unconditional", "Expression", "Script" });
+ }
+ else {
+ // showTransitionConditionWarning && transition != null
+ if( transition.getSource() instanceof Decision ) {
+ conditionCombo.setItems(new String[] { "Unconditional", "Expression", "Script" });
+ }
+ else if (transition.getCondition() != null ) {
+ // backwards compatibility, warning will be shown
+ if (transition.getCondition().getExpression() != null) {
+ conditionCombo.setItems(new String[] { "Unconditional", "Expression" });
+ }
+ else if (transition.getCondition().getScript() != null) {
+ conditionCombo.setItems(new String[] { "Unconditional", "Script" });
+ }
+ }
+ else {
+ conditionCombo.setItems(new String[] { "Unconditional" });
+ }
+ }
+ }
+
+ private void updateWarningLabel() {
+ if( getHideTransitionConditionWarning() ) {
+ warningLabel.setText("");
+ }
+ else if (transition == null
+ || transition.getCondition() == null
+ || transition.getSource() == null
+ || transition.getSource() instanceof Decision) {
+ warningLabel.setText("");
+ }
+ else if (transition.getCondition() != null && !(transition.getSource() instanceof Decision)) {
+ warningLabel.setText(CONDITION_ON_TRANSITION_WARNING);
+ }
+ else {
+ warningLabel.setText("");
+ }
+ }
+
+ private FormData createWarningLabelLayoutData() {
+ FormData result = new FormData();
+ result.left = new FormAttachment(0, 5);
+ result.right = new FormAttachment(100, -5);
+ result.top = new FormAttachment(conditionCombo, 10);
+ return result;
+ }
+
private FormData createConditionLabelLayoutData() {
FormData result = new FormData();
result.left = new FormAttachment(0, 5);
@@ -78,7 +165,7 @@
FormData result = new FormData();
result.left = new FormAttachment(0, 5);
result.right = new FormAttachment(100, -5);
- result.top = new FormAttachment(conditionCombo, 10);
+ result.top = new FormAttachment(warningLabel, 10);
return result;
}
@@ -116,6 +203,8 @@
}
public void refresh() {
+ updateConditionCombo();
+ updateWarningLabel();
if (transition == null || transition.getCondition() == null){
conditionCombo.setText("Unconditional");
label.setText("");
@@ -146,7 +235,7 @@
scriptText.setVisible(false);
}
}
- }
+ }
public boolean shouldUseExtraSpace() {
return true;
@@ -180,6 +269,7 @@
private void handleConditionComboSelected() {
if ("Expression".equals(conditionCombo.getText())) {
+ updateWarningLabel();
label.setText("Expression");
scriptText.setVisible(false);
expressionText.setVisible(true);
@@ -187,6 +277,7 @@
updateCondition();
}
} else if ("Script".equals(conditionCombo.getText())) {
+ updateWarningLabel();
label.setText("Script");
expressionText.setVisible(false);
scriptText.setVisible(true);
@@ -194,6 +285,7 @@
updateCondition();
}
} else {
+ warningLabel.setText("");
label.setText("");
expressionText.setVisible(false);
scriptText.setVisible(false);
@@ -229,4 +321,12 @@
}
}
+ private Boolean getHideTransitionConditionWarning() {
+ if (hideTransitionConditionWarnings == null) {
+ hideTransitionConditionWarnings = Plugin.getDefault().getPreferenceStore()
+ .getBoolean(Plugin.TRANS_COND_WARN_PREFERENCE);
+ }
+ return hideTransitionConditionWarnings;
+ }
+
}
\ No newline at end of file
Modified: branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/DecisionDomAdapter.java
===================================================================
--- branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/DecisionDomAdapter.java 2011-05-19 14:57:51 UTC (rev 31383)
+++ branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/DecisionDomAdapter.java 2011-05-19 15:28:45 UTC (rev 31384)
@@ -11,6 +11,7 @@
import org.jbpm.gd.jpdl.model.Event;
import org.jbpm.gd.jpdl.model.ExceptionHandler;
import org.jbpm.gd.jpdl.model.Handler;
+import org.jbpm.gd.jpdl.model.NodeElement;
import org.jbpm.gd.jpdl.model.Transition;
public class DecisionDomAdapter extends XmlAdapter {
@@ -120,6 +121,7 @@
decision.addExceptionHandler((ExceptionHandler)jpdlElement);
} else if ("transition".equals(type)) {
decision.addTransition((Transition)jpdlElement);
+ ((Transition)jpdlElement).setSource((NodeElement)getSemanticElement());
}
}
Modified: branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/ForkDomAdapter.java
===================================================================
--- branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/ForkDomAdapter.java 2011-05-19 14:57:51 UTC (rev 31383)
+++ branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/ForkDomAdapter.java 2011-05-19 15:28:45 UTC (rev 31384)
@@ -10,6 +10,7 @@
import org.jbpm.gd.jpdl.model.Event;
import org.jbpm.gd.jpdl.model.ExceptionHandler;
import org.jbpm.gd.jpdl.model.Fork;
+import org.jbpm.gd.jpdl.model.NodeElement;
import org.jbpm.gd.jpdl.model.Script;
import org.jbpm.gd.jpdl.model.Timer;
import org.jbpm.gd.jpdl.model.Transition;
@@ -121,6 +122,7 @@
fork.addTimer((Timer)jpdlElement);
} else if ("transition".equals(type)) {
fork.addTransition((Transition)jpdlElement);
+ ((Transition)jpdlElement).setSource((NodeElement)getSemanticElement());
} else if ("description".equals(getNodeType(type))) {
fork.setDescription((Description)jpdlElement);
}
Modified: branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/JoinDomAdapter.java
===================================================================
--- branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/JoinDomAdapter.java 2011-05-19 14:57:51 UTC (rev 31383)
+++ branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/JoinDomAdapter.java 2011-05-19 15:28:45 UTC (rev 31384)
@@ -10,6 +10,7 @@
import org.jbpm.gd.jpdl.model.Event;
import org.jbpm.gd.jpdl.model.ExceptionHandler;
import org.jbpm.gd.jpdl.model.Join;
+import org.jbpm.gd.jpdl.model.NodeElement;
import org.jbpm.gd.jpdl.model.Timer;
import org.jbpm.gd.jpdl.model.Transition;
@@ -111,6 +112,7 @@
join.addTimer((Timer)jpdlElement);
} else if ("transition".equals(type)) {
join.addTransition((Transition)jpdlElement);
+ ((Transition)jpdlElement).setSource((NodeElement)getSemanticElement());
} else if ("description".equals(getNodeType(type))) {
join.setDescription((Description)jpdlElement);
}
Modified: branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/MailNodeDomAdapter.java
===================================================================
--- branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/MailNodeDomAdapter.java 2011-05-19 14:57:51 UTC (rev 31383)
+++ branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/MailNodeDomAdapter.java 2011-05-19 15:28:45 UTC (rev 31384)
@@ -10,6 +10,7 @@
import org.jbpm.gd.jpdl.model.Event;
import org.jbpm.gd.jpdl.model.ExceptionHandler;
import org.jbpm.gd.jpdl.model.MailNode;
+import org.jbpm.gd.jpdl.model.NodeElement;
import org.jbpm.gd.jpdl.model.Subject;
import org.jbpm.gd.jpdl.model.Text;
import org.jbpm.gd.jpdl.model.Timer;
@@ -148,6 +149,7 @@
mailNode.addTimer((Timer)jpdlElement);
} else if ("transition".equals(type)) {
mailNode.addTransition((Transition)jpdlElement);
+ ((Transition)jpdlElement).setSource((NodeElement)getSemanticElement());
} else if ("description".equals(getNodeType(type))) {
mailNode.setDescription((Description)jpdlElement);
}
Modified: branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/NodeDomAdapter.java
===================================================================
--- branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/NodeDomAdapter.java 2011-05-19 14:57:51 UTC (rev 31383)
+++ branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/NodeDomAdapter.java 2011-05-19 15:28:45 UTC (rev 31384)
@@ -14,6 +14,7 @@
import org.jbpm.gd.jpdl.model.ExceptionHandler;
import org.jbpm.gd.jpdl.model.MailAction;
import org.jbpm.gd.jpdl.model.Node;
+import org.jbpm.gd.jpdl.model.NodeElement;
import org.jbpm.gd.jpdl.model.Script;
import org.jbpm.gd.jpdl.model.Timer;
import org.jbpm.gd.jpdl.model.Transition;
@@ -149,6 +150,7 @@
node.addTimer((Timer)jpdlElement);
} else if ("transition".equals(type)) {
node.addTransition((Transition)jpdlElement);
+ ((Transition)jpdlElement).setSource((NodeElement)getSemanticElement());
}
}
Modified: branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/ProcessStateDomAdapter.java
===================================================================
--- branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/ProcessStateDomAdapter.java 2011-05-19 14:57:51 UTC (rev 31383)
+++ branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/ProcessStateDomAdapter.java 2011-05-19 15:28:45 UTC (rev 31384)
@@ -9,6 +9,7 @@
import org.jbpm.gd.jpdl.model.Description;
import org.jbpm.gd.jpdl.model.Event;
import org.jbpm.gd.jpdl.model.ExceptionHandler;
+import org.jbpm.gd.jpdl.model.NodeElement;
import org.jbpm.gd.jpdl.model.ProcessState;
import org.jbpm.gd.jpdl.model.SubProcess;
import org.jbpm.gd.jpdl.model.Timer;
@@ -124,6 +125,7 @@
processState.addTimer((Timer)jpdlElement);
} else if ("transition".equals(type)) {
processState.addTransition((Transition)jpdlElement);
+ ((Transition)jpdlElement).setSource((NodeElement)getSemanticElement());
} else if ("variable".equals(type)) {
processState.addVariable((Variable)jpdlElement);
} else if ("sub-process".equals(type)) {
Modified: branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/StartStateDomAdapter.java
===================================================================
--- branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/StartStateDomAdapter.java 2011-05-19 14:57:51 UTC (rev 31383)
+++ branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/StartStateDomAdapter.java 2011-05-19 15:28:45 UTC (rev 31384)
@@ -9,6 +9,7 @@
import org.jbpm.gd.jpdl.model.Description;
import org.jbpm.gd.jpdl.model.Event;
import org.jbpm.gd.jpdl.model.ExceptionHandler;
+import org.jbpm.gd.jpdl.model.NodeElement;
import org.jbpm.gd.jpdl.model.StartState;
import org.jbpm.gd.jpdl.model.Task;
import org.jbpm.gd.jpdl.model.Transition;
@@ -96,6 +97,7 @@
startState.setDescription((Description)jpdlElement);
} else if ("transition".equals(type)) {
startState.addTransition((Transition)jpdlElement);
+ ((Transition)jpdlElement).setSource((NodeElement)getSemanticElement());
} else if ("event".equals(type)) {
startState.addEvent((Event)jpdlElement);
} else if ("exception-handler".equals(type)) {
Modified: branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/StateDomAdapter.java
===================================================================
--- branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/StateDomAdapter.java 2011-05-19 14:57:51 UTC (rev 31383)
+++ branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/StateDomAdapter.java 2011-05-19 15:28:45 UTC (rev 31384)
@@ -9,6 +9,7 @@
import org.jbpm.gd.jpdl.model.Description;
import org.jbpm.gd.jpdl.model.Event;
import org.jbpm.gd.jpdl.model.ExceptionHandler;
+import org.jbpm.gd.jpdl.model.NodeElement;
import org.jbpm.gd.jpdl.model.State;
import org.jbpm.gd.jpdl.model.Timer;
import org.jbpm.gd.jpdl.model.Transition;
@@ -112,6 +113,7 @@
state.addTimer((Timer)jpdlElement);
} else if ("transition".equals(type)) {
state.addTransition((Transition)jpdlElement);
+ ((Transition)jpdlElement).setSource((NodeElement)getSemanticElement());
} else if ("description".equals(getNodeType(type))) {
state.setDescription((Description)jpdlElement);
}
Modified: branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/SubProcessDomAdapter.java
===================================================================
--- branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/SubProcessDomAdapter.java 2011-05-19 14:57:51 UTC (rev 31383)
+++ branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/SubProcessDomAdapter.java 2011-05-19 15:28:45 UTC (rev 31384)
@@ -4,7 +4,10 @@
import org.jbpm.gd.common.model.SemanticElement;
import org.jbpm.gd.common.xml.XmlAdapter;
+import org.jbpm.gd.jpdl.model.Fork;
+import org.jbpm.gd.jpdl.model.NodeElement;
import org.jbpm.gd.jpdl.model.SubProcess;
+import org.jbpm.gd.jpdl.model.Transition;
public class SubProcessDomAdapter extends XmlAdapter {
Modified: branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/SuperStateDomAdapter.java
===================================================================
--- branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/SuperStateDomAdapter.java 2011-05-19 14:57:51 UTC (rev 31383)
+++ branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/SuperStateDomAdapter.java 2011-05-19 15:28:45 UTC (rev 31384)
@@ -15,6 +15,7 @@
import org.jbpm.gd.jpdl.model.Join;
import org.jbpm.gd.jpdl.model.MailNode;
import org.jbpm.gd.jpdl.model.Node;
+import org.jbpm.gd.jpdl.model.NodeElement;
import org.jbpm.gd.jpdl.model.ProcessState;
import org.jbpm.gd.jpdl.model.State;
import org.jbpm.gd.jpdl.model.SuperState;
@@ -136,6 +137,7 @@
superState.addTimer((Timer)jpdlElement);
} else if ("transition".equals(type)) {
superState.addTransition((Transition)jpdlElement);
+ ((Transition)jpdlElement).setSource((NodeElement)getSemanticElement());
} else if ("node".equals(type)) {
superState.addNodeElement((Node)jpdlElement);
} else if ("state".equals(type)) {
Modified: branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/TaskNodeDomAdapter.java
===================================================================
--- branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/TaskNodeDomAdapter.java 2011-05-19 14:57:51 UTC (rev 31383)
+++ branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/TaskNodeDomAdapter.java 2011-05-19 15:28:45 UTC (rev 31384)
@@ -9,6 +9,7 @@
import org.jbpm.gd.jpdl.model.Description;
import org.jbpm.gd.jpdl.model.Event;
import org.jbpm.gd.jpdl.model.ExceptionHandler;
+import org.jbpm.gd.jpdl.model.NodeElement;
import org.jbpm.gd.jpdl.model.Task;
import org.jbpm.gd.jpdl.model.TaskNode;
import org.jbpm.gd.jpdl.model.Timer;
@@ -137,6 +138,7 @@
taskNode.addTimer((Timer)jpdlElement);
} else if ("transition".equals(type)) {
taskNode.addTransition((Transition)jpdlElement);
+ ((Transition)jpdlElement).setSource((NodeElement)getSemanticElement());
} else if ("task".equals(type)) {
taskNode.addTask((Task)jpdlElement);
} else if ("description".equals(getNodeType(type))) {
Modified: branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/TransitionDomAdapter.java
===================================================================
--- branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/TransitionDomAdapter.java 2011-05-19 14:57:51 UTC (rev 31383)
+++ branches/jbosstools-3.2.x/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/xml/TransitionDomAdapter.java 2011-05-19 15:28:45 UTC (rev 31384)
@@ -13,6 +13,7 @@
import org.jbpm.gd.jpdl.model.Description;
import org.jbpm.gd.jpdl.model.ExceptionHandler;
import org.jbpm.gd.jpdl.model.MailAction;
+import org.jbpm.gd.jpdl.model.NodeElement;
import org.jbpm.gd.jpdl.model.Script;
import org.jbpm.gd.jpdl.model.Transition;
@@ -86,6 +87,8 @@
transition.setTo(newValue);
} else if ("name".equals(name)) {
transition.setName(newValue);
+ } else if ("condition".equals(name)) {
+ transition.setName(newValue);
}
}
13 years, 4 months