Author: koen.aers(a)jboss.com
Date: 2009-05-25 18:35:22 -0400 (Mon, 25 May 2009)
New Revision: 15497
Added:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/EventListenerClassNameSection.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ExclusiveGatewayClassNameSection.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ExclusiveGatewayExpressionSection.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ExclusiveGatewayLanguageSection.java
Removed:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ClassNameSection.java
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/META-INF/MANIFEST.MF
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlDeserializer.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/ExclusiveGateway.java
Log:
- Decision attributes and subelements (GPD-325)
- No namespace updates (GPD-338)
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/META-INF/MANIFEST.MF
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/META-INF/MANIFEST.MF 2009-05-25 21:22:02
UTC (rev 15496)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/META-INF/MANIFEST.MF 2009-05-25 22:35:22
UTC (rev 15497)
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name.0
Bundle-SymbolicName: org.jboss.tools.flow.jpdl4;singleton:=true
-Bundle-Version: 1.0.0.beta2
+Bundle-Version: 1.0.0.CR1
Bundle-Vendor: %Bundle-Vendor.0
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Require-Bundle: org.jboss.tools.flow.common;bundle-version="1.0.0",
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml 2009-05-25 21:22:02 UTC (rev
15496)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml 2009-05-25 22:35:22 UTC (rev
15497)
@@ -355,8 +355,8 @@
<input
type="org.jboss.tools.flow.jpdl4.model.EventListenerContainer"/>
</propertySection>
<propertySection
- class="org.jboss.tools.flow.jpdl4.properties.ClassNameSection"
- id="org.jboss.tools.jpdl4.className"
+
class="org.jboss.tools.flow.jpdl4.properties.EventListenerClassNameSection"
+ id="org.jboss.tools.jpdl4.eventListener.className"
tab="org.jboss.tools.jpdl4.general">
<input
type="org.jboss.tools.flow.jpdl4.model.EventListener"/>
</propertySection>
@@ -370,24 +370,45 @@
<propertySection
afterSection="org.jboss.tools.jpdl4.name"
class="org.jboss.tools.flow.jpdl4.properties.ProcessKeySection"
- id="org.jboss.tools.jpdl4.processKey"
+ id="org.jboss.tools.jpdl4.process.key"
tab="org.jboss.tools.jpdl4.general">
<input type="org.jboss.tools.flow.jpdl4.model.Process"/>
</propertySection>
<propertySection
- afterSection="org.jboss.tools.jpdl4.processKey"
+ afterSection="org.jboss.tools.jpdl4.process.key"
class="org.jboss.tools.flow.jpdl4.properties.ProcessVersionSection"
- id="org.jboss.tools.jpdl4.processVersion"
+ id="org.jboss.tools.jpdl4.process.version"
tab="org.jboss.tools.jpdl4.general">
<input type="org.jboss.tools.flow.jpdl4.model.Process"/>
</propertySection>
<propertySection
- afterSection="org.jboss.tools.jpdl4.processVersion"
+ afterSection="org.jboss.tools.jpdl4.process.version"
class="org.jboss.tools.flow.jpdl4.properties.ProcessDescriptionSection"
- id="org.jboss.tools.jpdl4.processDescription"
+ id="org.jboss.tools.jpdl4.process.description"
tab="org.jboss.tools.jpdl4.general">
<input type="org.jboss.tools.flow.jpdl4.model.Process"/>
</propertySection>
+ <propertySection
+ afterSection="org.jboss.tools.jpdl4.name"
+
class="org.jboss.tools.flow.jpdl4.properties.ExclusiveGatewayLanguageSection"
+ id="org.jboss.tools.jpdl4.exclusivegateway.language"
+ tab="org.jboss.tools.jpdl4.general">
+ <input
type="org.jboss.tools.flow.jpdl4.model.ExclusiveGateway"/>
+ </propertySection>
+ <propertySection
+ afterSection="org.jboss.tools.jpdl4.exclusivegateway.language"
+
class="org.jboss.tools.flow.jpdl4.properties.ExclusiveGatewayExpressionSection"
+ id="org.jboss.tools.jpdl4.exclusivegateway.expression"
+ tab="org.jboss.tools.jpdl4.general">
+ <input
type="org.jboss.tools.flow.jpdl4.model.ExclusiveGateway"/>
+ </propertySection>
+ <propertySection
+
afterSection="org.jboss.tools.jpdl4.exclusivegateway.expression"
+
class="org.jboss.tools.flow.jpdl4.properties.ExclusiveGatewayClassNameSection"
+ id="org.jboss.tools.jpdl4.exclusivegateway.classname"
+ tab="org.jboss.tools.jpdl4.general">
+ <input
type="org.jboss.tools.flow.jpdl4.model.ExclusiveGateway"/>
+ </propertySection>
</propertySections>
</extension>
<extension
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlDeserializer.java
===================================================================
---
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlDeserializer.java 2009-05-25
21:22:02 UTC (rev 15496)
+++
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlDeserializer.java 2009-05-25
22:35:22 UTC (rev 15497)
@@ -21,6 +21,7 @@
import org.jboss.tools.flow.jpdl4.model.AssignmentPropertySource;
import org.jboss.tools.flow.jpdl4.model.EventListener;
import org.jboss.tools.flow.jpdl4.model.EventListenerContainer;
+import org.jboss.tools.flow.jpdl4.model.ExclusiveGateway;
import org.jboss.tools.flow.jpdl4.model.HumanTask;
import org.jboss.tools.flow.jpdl4.model.Process;
import org.jboss.tools.flow.jpdl4.model.SubprocessTask;
@@ -88,6 +89,16 @@
}
}
+ class ExclusiveGatewayAttributeHandler extends NodeAttributeHandler {
+ public void deserializeAttributes(Wrapper wrapper, Element element) {
+ super.deserializeAttributes(wrapper, element);
+ if (!(wrapper.getElement() instanceof ExclusiveGateway)) return;
+ ExclusiveGateway exclusiveGateWay = (ExclusiveGateway)wrapper.getElement();
+ exclusiveGateWay.setExpr(element.getAttribute("expr"));
+ exclusiveGateWay.setLang(element.getAttribute("lang"));
+ }
+ }
+
class HumanTaskAttributeHandler extends NodeAttributeHandler {
AssignmentAttributeHandler assignmentAttributeHandler = new
AssignmentAttributeHandler();
public void deserializeAttributes(Wrapper wrapper, Element element) {
@@ -278,6 +289,18 @@
}
}
+ class ExclusiveGateWayChildNodeHandler extends NodeChildNodeHandler {
+ public Wrapper deserializeChildNode(Wrapper parent, Node node) {
+ Wrapper result = super.deserializeChildNode(parent, node);
+ ExclusiveGateway exclusiveGateway = (ExclusiveGateway)parent.getElement();
+ if (node instanceof Element && "handler".equals(node.getNodeName()))
{
+ String className = ((Element)node).getAttribute("class");
+ exclusiveGateway.setHandler("".equals(className) ? null : className);
+ }
+ return result;
+ }
+ }
+
class ProcessPostProcessor implements PostProcessor {
@SuppressWarnings("unchecked")
public void postProcess(Wrapper wrapper) {
@@ -387,6 +410,8 @@
return new HumanTaskAttributeHandler();
} else if (element instanceof SubprocessTask) {
return new SubprocessTaskAttributeHandler();
+ } else if (element instanceof ExclusiveGateway) {
+ return new ExclusiveGatewayAttributeHandler();
} else {
return new NodeAttributeHandler();
}
@@ -396,13 +421,22 @@
if (wrapper instanceof FlowWrapper) {
return new ProcessChildNodeHandler();
} else if (wrapper instanceof NodeWrapper) {
- return new NodeChildNodeHandler();
+ return getNodeChildNodeDeserializer(wrapper);
} else if (wrapper instanceof DefaultWrapper) {
return getDefaultChildNodeHandler(wrapper);
}
return null;
}
+ private ChildNodeDeserializer getNodeChildNodeDeserializer(Wrapper wrapper) {
+ Object element = wrapper.getElement();
+ if (element instanceof ExclusiveGateway) {
+ return new ExclusiveGateWayChildNodeHandler();
+ } else {
+ return new NodeChildNodeHandler();
+ }
+ }
+
private ChildNodeDeserializer getDefaultChildNodeHandler(Wrapper wrapper) {
if (wrapper.getElement() != null && wrapper.getElement() instanceof
EventListenerContainer) {
return new EventListenerContainerChildNodeHandler();
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java
===================================================================
---
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java 2009-05-25
21:22:02 UTC (rev 15496)
+++
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java 2009-05-25
22:35:22 UTC (rev 15497)
@@ -173,6 +173,8 @@
public void appendClosing(StringBuffer buffer, Wrapper wrapper) {
buffer.append("</" + getNodeName(wrapper.getElement()) +
">");
}
+ public void appendBody(StringBuffer buffer, Wrapper wrapper, int level) {
+ }
}
private String getNodeName(Element element) {
@@ -280,6 +282,8 @@
appendName(buffer, (ProcessNode)element);
} else if ("g".equals(attributeName)) {
appendGraphics(buffer, (NodeWrapper)wrapper);
+ } else {
+ super.appendAttributeToSave(attributeName, buffer, wrapper);
}
}
protected void appendName(StringBuffer buffer, ProcessNode processNode) {
@@ -299,11 +303,45 @@
buffer.append(constraint.height);
buffer.append("\"");
}
+ public void appendBody(StringBuffer buffer, Wrapper wrapper, int level) {
+ NodeWrapper nodeWrapper = (NodeWrapper)wrapper;
+ List<ConnectionWrapper> children = nodeWrapper.getOutgoingConnections();
+ for (ConnectionWrapper connectionWrapper : children) {
+ appendToBuffer(buffer, connectionWrapper, level+1);
+ }
+ }
}
- class HumanTaskSerializer extends ProcessNodeWrapperSerializer {
+ class ExclusiveGatewayWrapperSerializer extends ProcessNodeWrapperSerializer {
protected List<String> getAttributesToSave() {
List<String> result = super.getAttributesToSave();
+ result.add("expr");
+ result.add("lang");
+ return result;
+ }
+ protected String getPropertyName(String attributeName) {
+ if ("expr".equals(attributeName)) {
+ return ExclusiveGateway.EXPR;
+ } else if ("repeat".equals(attributeName)) {
+ return ExclusiveGateway.LANG;
+ }
+ return super.getPropertyName(attributeName);
+ }
+ public void appendBody(StringBuffer buffer, Wrapper wrapper, int level) {
+ ExclusiveGateway exclusiveGateway = (ExclusiveGateway)wrapper.getElement();
+ String handler = exclusiveGateway.getHandler();
+ if (handler != null && !"".equals(handler)) {
+ buffer.append("\n");
+ appendPadding(buffer, level + 1);
+ buffer.append("<handler class=\"" + handler + "\"
/>");
+ }
+ super.appendBody(buffer, wrapper, level);
+ }
+ }
+
+ class HumanTaskWrapperSerializer extends ProcessNodeWrapperSerializer {
+ protected List<String> getAttributesToSave() {
+ List<String> result = super.getAttributesToSave();
result.add(Assignment.ASSIGNEE);
result.add(Assignment.CANDIDATE_GROUPS);
result.add(Assignment.SWIMLANE);
@@ -397,7 +435,7 @@
}
}
- class SubprocessTaskWrapperSerializer extends AbstractWrapperSerializer {
+ class SubprocessTaskWrapperSerializer extends ProcessNodeWrapperSerializer {
protected List<String> getAttributesToSave() {
ArrayList<String> result = new ArrayList<String>();
result.add("sub-process-id");
@@ -429,6 +467,15 @@
}
return super.getPropertyName(attributeName);
}
+ public void appendBody(StringBuffer buffer, Wrapper wrapper, int level) {
+ List<Element> eventListeners =
wrapper.getChildren(EventListenerContainer.LISTENERS);
+ if (eventListeners != null) {
+ for (Element eventListener : eventListeners) {
+ if (!(eventListener instanceof Wrapper)) continue;
+ appendToBuffer(buffer, (Wrapper)eventListener, level+1);
+ }
+ }
+ }
}
class EventListenerWrapperSerializer extends AbstractWrapperSerializer {
@@ -475,8 +522,8 @@
appendDescription(buffer, (Process)element);
} else if ("initial".equals(attributeName)) {
appendInitial(buffer, (Process)element);
- } else if ("xmlns".equals(attributeName)) {
- buffer.append("
xmlns=\"http://jbpm.org/4/jpdl\"");
+ } else {
+ super.appendAttributeToSave(attributeName, buffer, wrapper);
}
}
protected void appendName(StringBuffer buffer, Process process) {
@@ -508,6 +555,35 @@
if (value == null || "".equals(value)) return;
buffer.append(" description=\"" + value + "\"");
}
+ public void appendBody(StringBuffer buffer, Wrapper wrapper, int level) {
+ FlowWrapper flowWrapper = (FlowWrapper)wrapper;
+ List<Element> swimlanes = flowWrapper.getChildren("swimlane");
+ if (swimlanes != null) {
+ for (Element swimlane : swimlanes) {
+ if (!(swimlane instanceof Wrapper)) continue;
+ appendToBuffer(buffer, (Wrapper)swimlane, level+1);
+ }
+ }
+ List<Element> timers = flowWrapper.getChildren("timer");
+ if (timers != null) {
+ for (Element timer : timers) {
+ if (!(timer instanceof Wrapper)) continue;
+ appendToBuffer(buffer, (Wrapper)timer, level+1);
+ }
+ }
+ List<Element> eventListenerContainers =
flowWrapper.getChildren("eventListener");
+ if (eventListenerContainers != null) {
+ for (Element eventListenerContainer : eventListenerContainers) {
+ if (!(eventListenerContainer instanceof Wrapper)) continue;
+ appendToBuffer(buffer, (Wrapper)eventListenerContainer, level+1);
+ }
+ }
+ ContainerWrapper containerWrapper = (ContainerWrapper)wrapper;
+ List<NodeWrapper> children = containerWrapper.getNodeWrappers();
+ for (NodeWrapper nodeWrapper : children) {
+ appendToBuffer(buffer, nodeWrapper, level+1);
+ }
+ }
}
private void appendOpening(StringBuffer buffer, Wrapper wrapper, int level) {
@@ -539,11 +615,11 @@
} else if (element instanceof ServiceTask) {
new ProcessNodeWrapperSerializer().appendOpening(buffer, wrapper, level);
} else if (element instanceof HumanTask) {
- new HumanTaskSerializer().appendOpening(buffer, wrapper, level);
+ new HumanTaskWrapperSerializer().appendOpening(buffer, wrapper, level);
} else if (element instanceof SubprocessTask) {
new SubprocessTaskWrapperSerializer().appendOpening(buffer, wrapper, level);
} else if (element instanceof ExclusiveGateway) {
- new ProcessNodeWrapperSerializer().appendOpening(buffer, wrapper, level);
+ new ExclusiveGatewayWrapperSerializer().appendOpening(buffer, wrapper, level);
} else if (element instanceof ForkParallelGateway) {
new ProcessNodeWrapperSerializer().appendOpening(buffer, wrapper, level);
} else if (element instanceof JoinParallelGateway) {
@@ -564,54 +640,54 @@
@SuppressWarnings("unchecked")
private void appendBody(StringBuffer buffer, Wrapper wrapper, int level) {
- if (wrapper instanceof FlowWrapper) {
- FlowWrapper flowWrapper = (FlowWrapper)wrapper;
- List<Element> swimlanes = flowWrapper.getChildren("swimlane");
- if (swimlanes != null) {
- for (Element swimlane : swimlanes) {
- if (!(swimlane instanceof Wrapper)) continue;
- appendToBuffer(buffer, (Wrapper)swimlane, level+1);
- }
- }
- List<Element> timers = flowWrapper.getChildren("timer");
- if (timers != null) {
- for (Element timer : timers) {
- if (!(timer instanceof Wrapper)) continue;
- appendToBuffer(buffer, (Wrapper)timer, level+1);
- }
- }
- List<Element> eventListenerContainers =
flowWrapper.getChildren("eventListener");
- if (eventListenerContainers != null) {
- for (Element eventListenerContainer : eventListenerContainers) {
- if (!(eventListenerContainer instanceof Wrapper)) continue;
- appendToBuffer(buffer, (Wrapper)eventListenerContainer, level+1);
- }
- }
+ Element element = wrapper.getElement();
+ if (element instanceof SequenceFlow) {
+ new SequenceFlowWrapperSerializer().appendBody(buffer, wrapper, level);
+ } else if (element instanceof TerminateEndEvent) {
+ new ProcessNodeWrapperSerializer().appendBody(buffer, wrapper, level);
+ } else if (element instanceof ErrorEndEvent) {
+ new ProcessNodeWrapperSerializer().appendBody(buffer, wrapper, level);
+ } else if (element instanceof CancelEndEvent) {
+ new ProcessNodeWrapperSerializer().appendBody(buffer, wrapper, level);
+ } else if (element instanceof StartEvent) {
+ new ProcessNodeWrapperSerializer().appendBody(buffer, wrapper, level);
+ } else if (element instanceof SuperState) {
+ new ProcessNodeWrapperSerializer().appendBody(buffer, wrapper, level);
+ } else if (element instanceof WaitTask) {
+ new ProcessNodeWrapperSerializer().appendBody(buffer, wrapper, level);
+ } else if (element instanceof HqlTask) {
+ new ProcessNodeWrapperSerializer().appendBody(buffer, wrapper, level);
+ } else if (element instanceof SqlTask) {
+ new ProcessNodeWrapperSerializer().appendBody(buffer, wrapper, level);
+ } else if (element instanceof JavaTask) {
+ new ProcessNodeWrapperSerializer().appendBody(buffer, wrapper, level);
+ } else if (element instanceof ScriptTask) {
+ new ProcessNodeWrapperSerializer().appendBody(buffer, wrapper, level);
+ } else if (element instanceof MailTask) {
+ new ProcessNodeWrapperSerializer().appendBody(buffer, wrapper, level);
+ } else if (element instanceof ServiceTask) {
+ new ProcessNodeWrapperSerializer().appendBody(buffer, wrapper, level);
+ } else if (element instanceof HumanTask) {
+ new HumanTaskWrapperSerializer().appendBody(buffer, wrapper, level);
+ } else if (element instanceof SubprocessTask) {
+ new SubprocessTaskWrapperSerializer().appendBody(buffer, wrapper, level);
+ } else if (element instanceof ExclusiveGateway) {
+ new ExclusiveGatewayWrapperSerializer().appendBody(buffer, wrapper, level);
+ } else if (element instanceof ForkParallelGateway) {
+ new ProcessNodeWrapperSerializer().appendBody(buffer, wrapper, level);
+ } else if (element instanceof JoinParallelGateway) {
+ new ProcessNodeWrapperSerializer().appendBody(buffer, wrapper, level);
+ } else if (element instanceof Process) {
+ new ProcessWrapperSerializer().appendBody(buffer, wrapper, level);
+ } else if (element instanceof Swimlane) {
+ new SwimlaneWrapperSerializer().appendBody(buffer, wrapper, level);
+ } else if (element instanceof Timer) {
+ new TimerWrapperSerializer().appendBody(buffer, wrapper, level);
+ } else if (element instanceof EventListenerContainer) {
+ new EventListenerContainerWrapperSerializer().appendBody(buffer, wrapper, level);
+ } else if (element instanceof EventListener) {
+ new EventListenerWrapperSerializer().appendBody(buffer, wrapper, level);
}
- if (wrapper instanceof ContainerWrapper) {
- ContainerWrapper containerWrapper = (ContainerWrapper)wrapper;
- List<NodeWrapper> children = containerWrapper.getNodeWrappers();
- for (NodeWrapper nodeWrapper : children) {
- appendToBuffer(buffer, nodeWrapper, level+1);
- }
- }
- if (wrapper instanceof NodeWrapper) {
- NodeWrapper nodeWrapper = (NodeWrapper)wrapper;
- List<ConnectionWrapper> children = nodeWrapper.getOutgoingConnections();
- for (ConnectionWrapper connectionWrapper : children) {
- appendToBuffer(buffer, connectionWrapper, level+1);
- }
- }
- Element element = (Element)wrapper.getElement();
- if (element instanceof EventListenerContainer) {
- List<Element> eventListeners =
wrapper.getChildren(EventListenerContainer.LISTENERS);
- if (eventListeners != null) {
- for (Element eventListener : eventListeners) {
- if (!(eventListener instanceof Wrapper)) continue;
- appendToBuffer(buffer, (Wrapper)eventListener, level+1);
- }
- }
- }
ArrayList<Node> trailingNodeList =
(ArrayList<Node>)element.getMetaData("trailingNodes");
boolean appendTrailingNodes = trailingNodeList != null &&
!trailingNodeList.isEmpty();
if (appendTrailingNodes) {
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/ExclusiveGateway.java
===================================================================
---
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/ExclusiveGateway.java 2009-05-25
21:22:02 UTC (rev 15496)
+++
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/ExclusiveGateway.java 2009-05-25
22:35:22 UTC (rev 15497)
@@ -1,10 +1,97 @@
package org.jboss.tools.flow.jpdl4.model;
+import org.eclipse.ui.views.properties.IPropertyDescriptor;
+import org.eclipse.ui.views.properties.IPropertySource;
+
public class ExclusiveGateway extends Gateway {
+
+ public static final String LANG = "lang";
+ public static final String EXPR = "expr";
+ public static final String HANDLER = "handler";
+
+ private String lang;
+ private String expr;
+ private String handler;
+
+ public ExclusiveGateway() {
+ setMetaData("propertySource", new PropertySource());
+ }
protected boolean isPropagationExclusive() {
return true;
}
+ public String getLang() {
+ return lang;
+ }
+
+ public void setLang(String lang) {
+ this.lang = lang;
+ }
+
+ public String getExpr() {
+ return expr;
+ }
+
+ public void setExpr(String expr) {
+ this.expr = expr;
+ }
+
+ public String getHandler() {
+ return handler;
+ }
+
+ public void setHandler(String handler) {
+ this.handler = handler;
+ }
+
+ private class PropertySource implements IPropertySource {
+
+ public IPropertyDescriptor[] getPropertyDescriptors() {
+ return new IPropertyDescriptor[0];
+ }
+
+ public Object getPropertyValue(Object id) {
+ if (LANG.equals(id)) {
+ return getLang();
+ } else if (EXPR.equals(id)) {
+ return getExpr();
+ } else if (HANDLER.equals(id)) {
+ return getHandler();
+ } else {
+ return null;
+ }
+ }
+
+ public boolean isPropertySet(Object id) {
+ if (LANG.equals(id)) {
+ return getName() != null;
+ } else if (EXPR.equals(id)) {
+ return getExpr() != null;
+ } else if (HANDLER.equals(id)) {
+ return getHandler() != null;
+ } else {
+ return false;
+ }
+ }
+
+ public void resetPropertyValue(Object id) {
+ }
+
+ public void setPropertyValue(Object id, Object value) {
+ if (LANG.equals(id)) {
+ setLang((String)value);
+ } else if (EXPR.equals(id)) {
+ setExpr((String)value);
+ } else if (HANDLER.equals(id)) {
+ setHandler((String)value);
+ }
+ }
+
+ public Object getEditableValue() {
+ return null;
+ }
+
+ }
}
Deleted:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ClassNameSection.java
===================================================================
---
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ClassNameSection.java 2009-05-25
21:22:02 UTC (rev 15496)
+++
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ClassNameSection.java 2009-05-25
22:35:22 UTC (rev 15497)
@@ -1,11 +0,0 @@
-package org.jboss.tools.flow.jpdl4.properties;
-
-import org.jboss.tools.flow.jpdl4.model.EventListener;
-
-public class ClassNameSection extends TextFieldPropertySection {
-
- public ClassNameSection() {
- super(EventListener.CLASS_NAME, "Class");
- }
-
-}
Copied:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/EventListenerClassNameSection.java
(from rev 15356,
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ClassNameSection.java)
===================================================================
---
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/EventListenerClassNameSection.java
(rev 0)
+++
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/EventListenerClassNameSection.java 2009-05-25
22:35:22 UTC (rev 15497)
@@ -0,0 +1,11 @@
+package org.jboss.tools.flow.jpdl4.properties;
+
+import org.jboss.tools.flow.jpdl4.model.EventListener;
+
+public class EventListenerClassNameSection extends TextFieldPropertySection {
+
+ public EventListenerClassNameSection() {
+ super(EventListener.CLASS_NAME, "Class");
+ }
+
+}
Property changes on:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/EventListenerClassNameSection.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ExclusiveGatewayClassNameSection.java
===================================================================
---
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ExclusiveGatewayClassNameSection.java
(rev 0)
+++
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ExclusiveGatewayClassNameSection.java 2009-05-25
22:35:22 UTC (rev 15497)
@@ -0,0 +1,11 @@
+package org.jboss.tools.flow.jpdl4.properties;
+
+import org.jboss.tools.flow.jpdl4.model.ExclusiveGateway;
+
+public class ExclusiveGatewayClassNameSection extends TextFieldPropertySection {
+
+ public ExclusiveGatewayClassNameSection() {
+ super(ExclusiveGateway.HANDLER, "Handler Class");
+ }
+
+}
Property changes on:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ExclusiveGatewayClassNameSection.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ExclusiveGatewayExpressionSection.java
===================================================================
---
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ExclusiveGatewayExpressionSection.java
(rev 0)
+++
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ExclusiveGatewayExpressionSection.java 2009-05-25
22:35:22 UTC (rev 15497)
@@ -0,0 +1,11 @@
+package org.jboss.tools.flow.jpdl4.properties;
+
+import org.jboss.tools.flow.jpdl4.model.ExclusiveGateway;
+
+public class ExclusiveGatewayExpressionSection extends TextFieldPropertySection {
+
+ public ExclusiveGatewayExpressionSection() {
+ super(ExclusiveGateway.EXPR, "Expression");
+ }
+
+}
Property changes on:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ExclusiveGatewayExpressionSection.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ExclusiveGatewayLanguageSection.java
===================================================================
---
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ExclusiveGatewayLanguageSection.java
(rev 0)
+++
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ExclusiveGatewayLanguageSection.java 2009-05-25
22:35:22 UTC (rev 15497)
@@ -0,0 +1,11 @@
+package org.jboss.tools.flow.jpdl4.properties;
+
+import org.jboss.tools.flow.jpdl4.model.ExclusiveGateway;
+
+public class ExclusiveGatewayLanguageSection extends TextFieldPropertySection {
+
+ public ExclusiveGatewayLanguageSection() {
+ super(ExclusiveGateway.LANG, "Language");
+ }
+
+}
Property changes on:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ExclusiveGatewayLanguageSection.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain