JBoss Tools SVN: r15589 - in trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4: src/org/jboss/tools/flow/jpdl4/editor and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2009-05-28 17:04:00 -0400 (Thu, 28 May 2009)
New Revision: 15589
Added:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskVariableSection.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ScriptTaskExpressionSection.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ScriptTaskLanguageSection.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ScriptTaskTextSection.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ScriptTaskVariableSection.java
Removed:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskVarSection.java
Modified:
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/ScriptTask.java
Log:
support script attributes and elements (GPD-329)
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml 2009-05-28 20:08:34 UTC (rev 15588)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml 2009-05-28 21:04:00 UTC (rev 15589)
@@ -453,11 +453,39 @@
</propertySection>
<propertySection
afterSection="org.jboss.tools.jpdl4.javaTask.method"
- class="org.jboss.tools.flow.jpdl4.properties.JavaTaskVarSection"
+ class="org.jboss.tools.flow.jpdl4.properties.JavaTaskVariableSection"
id="org.jboss.tools.jpdl4.javaTask.var"
tab="org.jboss.tools.jpdl4.general">
<input type="org.jboss.tools.flow.jpdl4.model.JavaTask"/>
</propertySection>
+ <propertySection
+ afterSection="org.jboss.tools.jpdl4.name"
+ class="org.jboss.tools.flow.jpdl4.properties.ScriptTaskExpressionSection"
+ id="org.jboss.tools.jpdl4.scriptTask.expr"
+ tab="org.jboss.tools.jpdl4.general">
+ <input type="org.jboss.tools.flow.jpdl4.model.ScriptTask"/>
+ </propertySection>
+ <propertySection
+ afterSection="org.jboss.tools.jpdl4.scriptTask.expr"
+ class="org.jboss.tools.flow.jpdl4.properties.ScriptTaskLanguageSection"
+ id="org.jboss.tools.jpdl4.scriptTask.lang"
+ tab="org.jboss.tools.jpdl4.general">
+ <input type="org.jboss.tools.flow.jpdl4.model.ScriptTask"/>
+ </propertySection>
+ <propertySection
+ afterSection="org.jboss.tools.jpdl4.scriptTask.lang"
+ class="org.jboss.tools.flow.jpdl4.properties.ScriptTaskVariableSection"
+ id="org.jboss.tools.jpdl4.scriptTask.var"
+ tab="org.jboss.tools.jpdl4.general">
+ <input type="org.jboss.tools.flow.jpdl4.model.ScriptTask"/>
+ </propertySection>
+ <propertySection
+ afterSection="org.jboss.tools.jpdl4.scriptTask.var"
+ class="org.jboss.tools.flow.jpdl4.properties.ScriptTaskTextSection"
+ id="org.jboss.tools.jpdl4.scriptTask.text"
+ tab="org.jboss.tools.jpdl4.general">
+ <input type="org.jboss.tools.flow.jpdl4.model.ScriptTask"/>
+ </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-28 20:08:34 UTC (rev 15588)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlDeserializer.java 2009-05-28 21:04:00 UTC (rev 15589)
@@ -25,6 +25,7 @@
import org.jboss.tools.flow.jpdl4.model.HumanTask;
import org.jboss.tools.flow.jpdl4.model.JavaTask;
import org.jboss.tools.flow.jpdl4.model.Process;
+import org.jboss.tools.flow.jpdl4.model.ScriptTask;
import org.jboss.tools.flow.jpdl4.model.SequenceFlow;
import org.jboss.tools.flow.jpdl4.model.SubprocessTask;
import org.jboss.tools.flow.jpdl4.model.Swimlane;
@@ -111,6 +112,15 @@
}
}
+ class ScriptTaskAttributeHandler extends NodeAttributeHandler {
+ public void deserializeAttributes(Wrapper wrapper, Element element) {
+ super.deserializeAttributes(wrapper, element);
+ wrapper.setPropertyValue(ScriptTask.EXPR, element.getAttribute("expr"));
+ wrapper.setPropertyValue(ScriptTask.LANG, element.getAttribute("lang"));
+ wrapper.setPropertyValue(ScriptTask.VAR, element.getAttribute("var"));
+ }
+ }
+
class TerminateEndEventAttributeHandler extends NodeAttributeHandler {
public void deserializeAttributes(Wrapper wrapper, Element element) {
super.deserializeAttributes(wrapper, element);
@@ -278,6 +288,21 @@
}
}
+ class ScriptTaskChildNodeHandler extends NodeChildNodeHandler {
+ public Wrapper deserializeChildNode(Wrapper parent, Node node) {
+ Wrapper result = null;
+ if (node instanceof Element && "text".equals(node.getNodeName())) {
+ String text = ((Element)node).getTextContent();
+ if (text != null && !("".equals(text))) {
+ parent.setPropertyValue(ScriptTask.TEXT, text);
+ }
+ } else {
+ result = super.deserializeChildNode(parent, node);
+ }
+ return result;
+ }
+ }
+
class ProcessChildNodeHandler implements ChildNodeDeserializer {
public Wrapper deserializeChildNode(Wrapper parent, Node node) {
Wrapper result = null;
@@ -477,6 +502,8 @@
return new TerminateEndEventAttributeHandler();
} else if (element instanceof JavaTask) {
return new JavaTaskAttributeHandler();
+ } else if (element instanceof ScriptTask) {
+ return new ScriptTaskAttributeHandler();
} else {
return new NodeAttributeHandler();
}
@@ -499,6 +526,8 @@
Object element = wrapper.getElement();
if (element instanceof ExclusiveGateway) {
return new ExclusiveGateWayChildNodeHandler();
+ } else if (element instanceof ScriptTask) {
+ return new ScriptTaskChildNodeHandler();
} else {
return new NodeChildNodeHandler();
}
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-28 20:08:34 UTC (rev 15588)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java 2009-05-28 21:04:00 UTC (rev 15589)
@@ -382,6 +382,34 @@
}
}
+ class ScriptTaskWrapperSerializer extends ProcessNodeWrapperSerializer {
+ protected List<String> getAttributesToSave() {
+ List<String> result = super.getAttributesToSave();
+ result.add("expr");
+ result.add("lang");
+ result.add("var");
+ return result;
+ }
+ protected String getPropertyName(String attributeName) {
+ if ("expr".equals(attributeName)) {
+ return ScriptTask.EXPR;
+ } else if ("lang".equals(attributeName)) {
+ return ScriptTask.LANG;
+ } else if ("var".equals(attributeName)) {
+ return ScriptTask.VAR;
+ }
+ return super.getPropertyName(attributeName);
+ }
+ public void appendBody(StringBuffer buffer, Wrapper wrapper, int level) {
+ String text = (String)wrapper.getPropertyValue(ScriptTask.TEXT);
+ if (text != null && !("".equals(text))) {
+ buffer.append("\n");
+ appendPadding(buffer, level + 1);
+ buffer.append("<text>" + text + "</text>");
+ }
+ }
+ }
+
class HumanTaskWrapperSerializer extends ProcessNodeWrapperSerializer {
protected List<String> getAttributesToSave() {
List<String> result = super.getAttributesToSave();
@@ -659,7 +687,7 @@
} else if (element instanceof JavaTask) {
new JavaTaskWrapperSerializer().appendOpening(buffer, wrapper, level);
} else if (element instanceof ScriptTask) {
- new ProcessNodeWrapperSerializer().appendOpening(buffer, wrapper, level);
+ new ScriptTaskWrapperSerializer().appendOpening(buffer, wrapper, level);
} else if (element instanceof MailTask) {
new ProcessNodeWrapperSerializer().appendOpening(buffer, wrapper, level);
} else if (element instanceof ServiceTask) {
@@ -712,7 +740,7 @@
} else if (element instanceof JavaTask) {
new ProcessNodeWrapperSerializer().appendBody(buffer, wrapper, level);
} else if (element instanceof ScriptTask) {
- new ProcessNodeWrapperSerializer().appendBody(buffer, wrapper, level);
+ new ScriptTaskWrapperSerializer().appendBody(buffer, wrapper, level);
} else if (element instanceof MailTask) {
new ProcessNodeWrapperSerializer().appendBody(buffer, wrapper, level);
} else if (element instanceof ServiceTask) {
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/ScriptTask.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/ScriptTask.java 2009-05-28 20:08:34 UTC (rev 15588)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/ScriptTask.java 2009-05-28 21:04:00 UTC (rev 15589)
@@ -1,10 +1,111 @@
package org.jboss.tools.flow.jpdl4.model;
+import org.eclipse.ui.views.properties.IPropertyDescriptor;
+import org.eclipse.ui.views.properties.IPropertySource;
+
public class ScriptTask extends Task {
+ public static final String EXPR = "org.jboss.tools.flow.jpdl4.model.scriptTask.expr";
+ public static final String LANG = "org.jboss.tools.flow.jpdl4.model.scriptTask.lang";
+ public static final String VAR = "org.jboss.tools.flow.jpdl4.model.javaTask.var";
+ public static final String TEXT = "org.jboss.tools.flow.jpdl4.model.javaTask.text";
+
+ private String expression;
+ private String language;
+ private String variableName;
+ private String text;
+
+ public ScriptTask() {
+ setMetaData("propertySource", new PropertySource());
+ }
+
+ public String getExpression() {
+ return expression;
+ }
+
+ public void setExpression(String expression) {
+ this.expression = expression;
+ }
+
+ public String getLanguage() {
+ return language;
+ }
+
+ public void setLanguage(String language) {
+ this.language = language;
+ }
+
+ public String getVariableName() {
+ return variableName;
+ }
+
+ public void setVariableName(String variableName) {
+ this.variableName = variableName;
+ }
+
+ public String getText() {
+ return text;
+ }
+
+ public void setText(String text) {
+ this.text = text;
+ }
+
protected boolean isPropagationExclusive() {
return true;
}
+ private class PropertySource implements IPropertySource {
+
+ public Object getEditableValue() {
+ return null;
+ }
+
+ public IPropertyDescriptor[] getPropertyDescriptors() {
+ return new IPropertyDescriptor[0];
+ }
+
+ public Object getPropertyValue(Object id) {
+ if (EXPR.equals(id)) {
+ return getExpression();
+ } else if (LANG.equals(id)) {
+ return getLanguage();
+ } else if (VAR.equals(id)) {
+ return getVariableName();
+ } else if (TEXT.equals(id)) {
+ return getText();
+ }
+ return null;
+ }
+
+ public boolean isPropertySet(Object id) {
+ if (EXPR.equals(id)) {
+ return getExpression() != null;
+ } else if (LANG.equals(id)) {
+ return getLanguage() != null;
+ } else if (VAR.equals(id)) {
+ return getVariableName() != null;
+ } else if (TEXT.equals(id)) {
+ return getText() != null;
+ }
+ return false;
+ }
+
+ public void resetPropertyValue(Object id) {
+ }
+
+ public void setPropertyValue(Object id, Object value) {
+ if (EXPR.equals(id)) {
+ setExpression((String)value);
+ } else if (LANG.equals(id)) {
+ setLanguage((String)value);
+ } else if (VAR.equals(id)) {
+ setVariableName((String)value);
+ } else if (TEXT.equals(id)) {
+ setText((String)value);
+ }
+ }
+
+ }
}
Deleted: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskVarSection.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskVarSection.java 2009-05-28 20:08:34 UTC (rev 15588)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskVarSection.java 2009-05-28 21:04:00 UTC (rev 15589)
@@ -1,11 +0,0 @@
-package org.jboss.tools.flow.jpdl4.properties;
-
-import org.jboss.tools.flow.jpdl4.model.JavaTask;
-
-public class JavaTaskVarSection extends TextFieldPropertySection {
-
- public JavaTaskVarSection() {
- super(JavaTask.VAR, "Variable Name");
- }
-
-}
Copied: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskVariableSection.java (from rev 15588, trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskVarSection.java)
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskVariableSection.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskVariableSection.java 2009-05-28 21:04:00 UTC (rev 15589)
@@ -0,0 +1,11 @@
+package org.jboss.tools.flow.jpdl4.properties;
+
+import org.jboss.tools.flow.jpdl4.model.JavaTask;
+
+public class JavaTaskVariableSection extends TextFieldPropertySection {
+
+ public JavaTaskVariableSection() {
+ super(JavaTask.VAR, "Variable Name");
+ }
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskVariableSection.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ScriptTaskExpressionSection.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ScriptTaskExpressionSection.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ScriptTaskExpressionSection.java 2009-05-28 21:04:00 UTC (rev 15589)
@@ -0,0 +1,11 @@
+package org.jboss.tools.flow.jpdl4.properties;
+
+import org.jboss.tools.flow.jpdl4.model.ScriptTask;
+
+public class ScriptTaskExpressionSection extends TextFieldPropertySection {
+
+ public ScriptTaskExpressionSection() {
+ super(ScriptTask.EXPR, "Expression");
+ }
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ScriptTaskExpressionSection.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ScriptTaskLanguageSection.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ScriptTaskLanguageSection.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ScriptTaskLanguageSection.java 2009-05-28 21:04:00 UTC (rev 15589)
@@ -0,0 +1,11 @@
+package org.jboss.tools.flow.jpdl4.properties;
+
+import org.jboss.tools.flow.jpdl4.model.ScriptTask;
+
+public class ScriptTaskLanguageSection extends TextFieldPropertySection {
+
+ public ScriptTaskLanguageSection() {
+ super(ScriptTask.LANG, "Language");
+ }
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ScriptTaskLanguageSection.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ScriptTaskTextSection.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ScriptTaskTextSection.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ScriptTaskTextSection.java 2009-05-28 21:04:00 UTC (rev 15589)
@@ -0,0 +1,11 @@
+package org.jboss.tools.flow.jpdl4.properties;
+
+import org.jboss.tools.flow.jpdl4.model.ScriptTask;
+
+public class ScriptTaskTextSection extends TextFieldPropertySection {
+
+ public ScriptTaskTextSection() {
+ super(ScriptTask.TEXT, "Text");
+ }
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ScriptTaskTextSection.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ScriptTaskVariableSection.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ScriptTaskVariableSection.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ScriptTaskVariableSection.java 2009-05-28 21:04:00 UTC (rev 15589)
@@ -0,0 +1,11 @@
+package org.jboss.tools.flow.jpdl4.properties;
+
+import org.jboss.tools.flow.jpdl4.model.ScriptTask;
+
+public class ScriptTaskVariableSection extends TextFieldPropertySection {
+
+ public ScriptTaskVariableSection() {
+ super(ScriptTask.VAR, "Variable Name");
+ }
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ScriptTaskVariableSection.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 7 months
JBoss Tools SVN: r15588 - in trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4: src/org/jboss/tools/flow/jpdl4/editor and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2009-05-28 16:08:34 -0400 (Thu, 28 May 2009)
New Revision: 15588
Added:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskClassSection.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskMethodSection.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskVarSection.java
Modified:
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/JavaTask.java
Log:
JavaTask attributes: class, method, var
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml 2009-05-28 19:39:25 UTC (rev 15587)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml 2009-05-28 20:08:34 UTC (rev 15588)
@@ -437,6 +437,27 @@
tab="org.jboss.tools.jpdl4.general">
<input type="org.jboss.tools.flow.jpdl4.model.SequenceFlow"/>
</propertySection>
+ <propertySection
+ afterSection="org.jboss.tools.jpdl4.name"
+ class="org.jboss.tools.flow.jpdl4.properties.JavaTaskClassSection"
+ id="org.jboss.tools.jpdl4.javaTask.class"
+ tab="org.jboss.tools.jpdl4.general">
+ <input type="org.jboss.tools.flow.jpdl4.model.JavaTask"/>
+ </propertySection>
+ <propertySection
+ afterSection="org.jboss.tools.jpdl4.javaTask.class"
+ class="org.jboss.tools.flow.jpdl4.properties.JavaTaskMethodSection"
+ id="org.jboss.tools.jpdl4.javaTask.method"
+ tab="org.jboss.tools.jpdl4.general">
+ <input type="org.jboss.tools.flow.jpdl4.model.JavaTask"/>
+ </propertySection>
+ <propertySection
+ afterSection="org.jboss.tools.jpdl4.javaTask.method"
+ class="org.jboss.tools.flow.jpdl4.properties.JavaTaskVarSection"
+ id="org.jboss.tools.jpdl4.javaTask.var"
+ tab="org.jboss.tools.jpdl4.general">
+ <input type="org.jboss.tools.flow.jpdl4.model.JavaTask"/>
+ </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-28 19:39:25 UTC (rev 15587)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlDeserializer.java 2009-05-28 20:08:34 UTC (rev 15588)
@@ -23,6 +23,7 @@
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.JavaTask;
import org.jboss.tools.flow.jpdl4.model.Process;
import org.jboss.tools.flow.jpdl4.model.SequenceFlow;
import org.jboss.tools.flow.jpdl4.model.SubprocessTask;
@@ -101,6 +102,15 @@
}
}
+ class JavaTaskAttributeHandler extends NodeAttributeHandler {
+ public void deserializeAttributes(Wrapper wrapper, Element element) {
+ super.deserializeAttributes(wrapper, element);
+ wrapper.setPropertyValue(JavaTask.CLASS, element.getAttribute("class"));
+ wrapper.setPropertyValue(JavaTask.METHOD, element.getAttribute("method"));
+ wrapper.setPropertyValue(JavaTask.VAR, element.getAttribute("var"));
+ }
+ }
+
class TerminateEndEventAttributeHandler extends NodeAttributeHandler {
public void deserializeAttributes(Wrapper wrapper, Element element) {
super.deserializeAttributes(wrapper, element);
@@ -465,6 +475,8 @@
return new ExclusiveGatewayAttributeHandler();
} else if (element instanceof TerminateEndEvent) {
return new TerminateEndEventAttributeHandler();
+ } else if (element instanceof JavaTask) {
+ return new JavaTaskAttributeHandler();
} else {
return new NodeAttributeHandler();
}
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-28 19:39:25 UTC (rev 15587)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java 2009-05-28 20:08:34 UTC (rev 15588)
@@ -362,6 +362,26 @@
}
}
+ class JavaTaskWrapperSerializer extends ProcessNodeWrapperSerializer {
+ protected List<String> getAttributesToSave() {
+ List<String> result = super.getAttributesToSave();
+ result.add("class");
+ result.add("method");
+ result.add("var");
+ return result;
+ }
+ protected String getPropertyName(String attributeName) {
+ if ("class".equals(attributeName)) {
+ return JavaTask.CLASS;
+ } else if ("method".equals(attributeName)) {
+ return JavaTask.METHOD;
+ } else if ("var".equals(attributeName)) {
+ return JavaTask.VAR;
+ }
+ return super.getPropertyName(attributeName);
+ }
+ }
+
class HumanTaskWrapperSerializer extends ProcessNodeWrapperSerializer {
protected List<String> getAttributesToSave() {
List<String> result = super.getAttributesToSave();
@@ -637,7 +657,7 @@
} else if (element instanceof SqlTask) {
new ProcessNodeWrapperSerializer().appendOpening(buffer, wrapper, level);
} else if (element instanceof JavaTask) {
- new ProcessNodeWrapperSerializer().appendOpening(buffer, wrapper, level);
+ new JavaTaskWrapperSerializer().appendOpening(buffer, wrapper, level);
} else if (element instanceof ScriptTask) {
new ProcessNodeWrapperSerializer().appendOpening(buffer, wrapper, level);
} else if (element instanceof MailTask) {
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/JavaTask.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/JavaTask.java 2009-05-28 19:39:25 UTC (rev 15587)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/JavaTask.java 2009-05-28 20:08:34 UTC (rev 15588)
@@ -1,10 +1,95 @@
package org.jboss.tools.flow.jpdl4.model;
+import org.eclipse.ui.views.properties.IPropertyDescriptor;
+import org.eclipse.ui.views.properties.IPropertySource;
+
public class JavaTask extends Task {
+ public static final String CLASS = "org.jboss.tools.flow.jpdl4.model.javaTask.class";
+ public static final String METHOD = "org.jboss.tools.flow.jpdl4.model.javaTask.method";
+ public static final String VAR = "org.jboss.tools.flow.jpdl4.model.javaTask.var";
+
+ private String className;
+ private String methodName;
+ private String variableName;
+
+ public JavaTask() {
+ setMetaData("propertySource", new PropertySource());
+ }
+
+ public String getClassName() {
+ return className;
+ }
+
+ public void setClassName(String className) {
+ this.className = className;
+ }
+
+ public String getMethodName() {
+ return methodName;
+ }
+
+ public void setMethodName(String methodName) {
+ this.methodName = methodName;
+ }
+
+ public String getVariableName() {
+ return variableName;
+ }
+
+ public void setVariableName(String variableName) {
+ this.variableName = variableName;
+ }
+
protected boolean isPropagationExclusive() {
return true;
}
+ private class PropertySource implements IPropertySource {
+
+ public Object getEditableValue() {
+ return null;
+ }
+
+ public IPropertyDescriptor[] getPropertyDescriptors() {
+ return new IPropertyDescriptor[0];
+ }
+
+ public Object getPropertyValue(Object id) {
+ if (CLASS.equals(id)) {
+ return getClassName();
+ } else if (METHOD.equals(id)) {
+ return getMethodName();
+ } else if (VAR.equals(id)) {
+ return getVariableName();
+ }
+ return null;
+ }
+
+ public boolean isPropertySet(Object id) {
+ if (CLASS.equals(id)) {
+ return getClassName() != null;
+ } else if (METHOD.equals(id)) {
+ return getMethodName() != null;
+ } else if (VAR.equals(id)) {
+ return getVariableName() != null;
+ }
+ return false;
+ }
+
+ public void resetPropertyValue(Object id) {
+ }
+
+ public void setPropertyValue(Object id, Object value) {
+ if (CLASS.equals(id)) {
+ setClassName((String)value);
+ } else if (METHOD.equals(id)) {
+ setMethodName((String)value);
+ } else if (VAR.equals(id)) {
+ setVariableName((String)value);
+ }
+ }
+
+ }
}
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskClassSection.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskClassSection.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskClassSection.java 2009-05-28 20:08:34 UTC (rev 15588)
@@ -0,0 +1,11 @@
+package org.jboss.tools.flow.jpdl4.properties;
+
+import org.jboss.tools.flow.jpdl4.model.JavaTask;
+
+public class JavaTaskClassSection extends TextFieldPropertySection {
+
+ public JavaTaskClassSection() {
+ super(JavaTask.CLASS, "Class Name");
+ }
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskClassSection.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskMethodSection.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskMethodSection.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskMethodSection.java 2009-05-28 20:08:34 UTC (rev 15588)
@@ -0,0 +1,11 @@
+package org.jboss.tools.flow.jpdl4.properties;
+
+import org.jboss.tools.flow.jpdl4.model.JavaTask;
+
+public class JavaTaskMethodSection extends TextFieldPropertySection {
+
+ public JavaTaskMethodSection() {
+ super(JavaTask.METHOD, "Method Name");
+ }
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskMethodSection.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskVarSection.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskVarSection.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskVarSection.java 2009-05-28 20:08:34 UTC (rev 15588)
@@ -0,0 +1,11 @@
+package org.jboss.tools.flow.jpdl4.properties;
+
+import org.jboss.tools.flow.jpdl4.model.JavaTask;
+
+public class JavaTaskVarSection extends TextFieldPropertySection {
+
+ public JavaTaskVarSection() {
+ super(JavaTask.VAR, "Variable Name");
+ }
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskVarSection.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 7 months
JBoss Tools SVN: r15587 - in trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet: src/org/jboss/tools/project/examples/cheatsheet/actions and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2009-05-28 15:39:25 -0400 (Thu, 28 May 2009)
New Revision: 15587
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/
trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/RunOnServer.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4180 We should have the projects featured in Seam tutorials available in Project Examples
Property changes on: trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet
___________________________________________________________________
Name: svn:ignore
+ bin
Modified: trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/RunOnServer.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/RunOnServer.java 2009-05-28 18:55:41 UTC (rev 15586)
+++ trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/RunOnServer.java 2009-05-28 19:39:25 UTC (rev 15587)
@@ -34,7 +34,7 @@
}
if (params[1] != null) {
IFile file = wRoot.getFile(new Path(params[1]));
- if (file != null || file.exists()) {
+ if (file != null && file.exists()) {
try {
SingleDeployableFactory.makeDeployable(file.getFullPath());
IServer[] deployableServersAsIServers = ServerConverter
15 years, 7 months
JBoss Tools SVN: r15586 - in trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4: src/org/jboss/tools/flow/jpdl4/editor and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2009-05-28 14:55:41 -0400 (Thu, 28 May 2009)
New Revision: 15586
Added:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/EventListenerContainerTimerSection.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/SequenceFlowTimerSection.java
Modified:
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/EventListenerContainer.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/SequenceFlow.java
Log:
Timers on events and transitions (GPD-323)
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml 2009-05-28 16:11:13 UTC (rev 15585)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml 2009-05-28 18:55:41 UTC (rev 15586)
@@ -350,7 +350,7 @@
</propertySection>
<propertySection
class="org.jboss.tools.flow.jpdl4.properties.EventTypeSection"
- id="org.jboss.tools.jpdl4.eventType"
+ id="org.jboss.tools.jpdl4.eventListenerContainer.eventType"
tab="org.jboss.tools.jpdl4.general">
<input type="org.jboss.tools.flow.jpdl4.model.EventListenerContainer"/>
</propertySection>
@@ -423,6 +423,20 @@
tab="org.jboss.tools.jpdl4.general">
<input type="org.jboss.tools.flow.jpdl4.model.TerminateEndEvent"/>
</propertySection>
+ <propertySection
+ afterSection="org.jboss.tools.jpdl4.eventListenerContainer.eventType"
+ class="org.jboss.tools.flow.jpdl4.properties.EventListenerContainerTimerSection"
+ id="org.jboss.tools.jpdl4.eventListenerContainer.timer"
+ tab="org.jboss.tools.jpdl4.general">
+ <input type="org.jboss.tools.flow.jpdl4.model.EventListenerContainer"/>
+ </propertySection>
+ <propertySection
+ afterSection="org.jboss.tools.jpdl4.name"
+ class="org.jboss.tools.flow.jpdl4.properties.SequenceFlowTimerSection"
+ id="org.jboss.tools.jpdl4.sequenceFlow.timer"
+ tab="org.jboss.tools.jpdl4.general">
+ <input type="org.jboss.tools.flow.jpdl4.model.SequenceFlow"/>
+ </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-28 16:11:13 UTC (rev 15585)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlDeserializer.java 2009-05-28 18:55:41 UTC (rev 15586)
@@ -24,6 +24,7 @@
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.SequenceFlow;
import org.jboss.tools.flow.jpdl4.model.SubprocessTask;
import org.jboss.tools.flow.jpdl4.model.Swimlane;
import org.jboss.tools.flow.jpdl4.model.TerminateEndEvent;
@@ -249,6 +250,12 @@
if (!(parent instanceof ConnectionWrapper)) return result;
ConnectionWrapper connectionWrapper = (ConnectionWrapper)parent;
if (node instanceof Element) {
+ if ("timer".equals(node.getNodeName())) {
+ String duedate = ((Element)node).getAttribute("duedate");
+ if (duedate != null && !("".equals(duedate))) {
+ parent.setPropertyValue(SequenceFlow.TIMER, duedate);
+ }
+ }
result = createWrapper((Element)node);
if (result == null) return null;
if (result instanceof Wrapper) {
@@ -286,11 +293,20 @@
class EventListenerContainerChildNodeHandler implements ChildNodeDeserializer {
public Wrapper deserializeChildNode(Wrapper parent, Node node) {
Wrapper result = null;
+ if (!(parent.getElement() instanceof EventListenerContainer)) return result;
if (node instanceof Element) {
- result = createWrapper((Element)node);
- if (result == null) return null;
- if (result.getElement() instanceof EventListener) {
- parent.addChild(EventListenerContainer.LISTENERS, result);
+ if ("timer".equals(node.getNodeName())) {
+ String duedate = ((Element)node).getAttribute("duedate");
+ if (duedate != null && !("".equals(duedate))) {
+ ((EventListenerContainer)parent.getElement()).setTimer(duedate);
+ }
+ } else {
+ result = createWrapper((Element)node);
+ if (result != null) {
+ if (result.getElement() instanceof EventListener) {
+ parent.addChild(EventListenerContainer.LISTENERS, result);
+ }
+ }
}
}
return result;
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-28 16:11:13 UTC (rev 15585)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java 2009-05-28 18:55:41 UTC (rev 15586)
@@ -266,6 +266,12 @@
buffer.append("\"");
}
public void appendBody(StringBuffer buffer, Wrapper wrapper, int level) {
+ String timer = (String)wrapper.getPropertyValue(SequenceFlow.TIMER);
+ if (timer != null && !("".equals(timer))) {
+ buffer.append("\n");
+ appendPadding(buffer, level + 1);
+ buffer.append("<timer duedate=\"" + timer + "\"/>");
+ }
List<Element> eventListeners = wrapper.getChildren("listener");
if (eventListeners != null) {
for (Element eventListener : eventListeners) {
@@ -485,6 +491,13 @@
return super.getPropertyName(attributeName);
}
public void appendBody(StringBuffer buffer, Wrapper wrapper, int level) {
+ EventListenerContainer eventListenerContainer = (EventListenerContainer)wrapper.getElement();
+ String timer = eventListenerContainer.getTimer();
+ if (timer != null && !"".equals(timer)) {
+ buffer.append("\n");
+ appendPadding(buffer, level + 1);
+ buffer.append("<timer duedate=\"" + timer + "\"/>");
+ }
List<Element> eventListeners = wrapper.getChildren(EventListenerContainer.LISTENERS);
if (eventListeners != null) {
for (Element eventListener : eventListeners) {
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/EventListenerContainer.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/EventListenerContainer.java 2009-05-28 16:11:13 UTC (rev 15585)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/EventListenerContainer.java 2009-05-28 18:55:41 UTC (rev 15586)
@@ -13,7 +13,10 @@
public static final String LISTENERS = "org.jboss.tools.flow.jpdl4.model.eventListenerContainer.listeners";
public static final String EVENT_TYPE = "org.jboss.tools.flow.jpdl4.model.eventListenerContainer.eventType";
+ public static final String TIMER = "org.jboss.tools.flow.jpdl4.model.eventListenerContainer.timer";
+
private String eventType;
+ private String timer;
private List<EventListener> listeners = new ArrayList<EventListener>();
public EventListenerContainer() {
@@ -28,6 +31,14 @@
this.eventType = eventType;
}
+ public String getTimer() {
+ return timer;
+ }
+
+ public void setTimer(String timer) {
+ this.timer = timer;
+ }
+
public List<EventListener> getListeners() {
return listeners;
}
@@ -58,7 +69,9 @@
if (LISTENERS.equals(id)) {
return listeners;
} else if (EVENT_TYPE.equals(id)) {
- return getEventType() != null ? getEventType() : "";
+ return getEventType();
+ } else if (TIMER.equals(id)) {
+ return getTimer();
}
return null;
}
@@ -68,6 +81,8 @@
return true;
} else if (EVENT_TYPE.equals(id)) {
return getEventType() != null;
+ } else if (TIMER.equals(id)) {
+ return getTimer() != null;
}
return false;
}
@@ -77,10 +92,10 @@
public void setPropertyValue(Object id, Object value) {
if (EVENT_TYPE.equals(id)) {
- if (value == null || value instanceof String) {
- setEventType((String)value);
- }
- }
+ setEventType((String)value);
+ } else if (TIMER.equals(id)) {
+ setTimer((String)value);
+ }
}
}
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/SequenceFlow.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/SequenceFlow.java 2009-05-28 16:11:13 UTC (rev 15585)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/SequenceFlow.java 2009-05-28 18:55:41 UTC (rev 15586)
@@ -12,8 +12,11 @@
public class SequenceFlow extends DefaultConnection {
+ public static final String TIMER = "org.jboss.tools.flow.jpdl4.model.eventListenerContainer.timer";
+
private String name;
private boolean conditional = false;
+ private String timer;
public SequenceFlow() {
this(null, null);
@@ -32,6 +35,14 @@
return name;
}
+ public String getTimer() {
+ return timer;
+ }
+
+ public void setTimer(String timer) {
+ this.timer = timer;
+ }
+
public void setConditional(boolean conditional) {
this.conditional = conditional;
}
@@ -71,7 +82,9 @@
public Object getPropertyValue(Object id) {
if (NAME.equals(id) || LABEL.equals(id)) {
- return getName() != null ? getName() : "";
+ return getName();
+ } else if (TIMER.equals(id)) {
+ return getTimer();
}
return null;
}
@@ -79,6 +92,8 @@
public boolean isPropertySet(Object id) {
if (NAME.equals(id) || LABEL.equals(id)) {
return getName() != null;
+ } else if (TIMER.equals(id)) {
+ return getTimer() != null;
}
return false;
}
@@ -88,10 +103,10 @@
public void setPropertyValue(Object id, Object value) {
if (NAME.equals(id) || LABEL.equals(id)) {
- if (value instanceof String) {
- setName((String)value);
- }
- }
+ setName((String)value);
+ } else if (TIMER.equals(id)) {
+ setTimer((String)value);
+ }
}
}
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/EventListenerContainerTimerSection.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/EventListenerContainerTimerSection.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/EventListenerContainerTimerSection.java 2009-05-28 18:55:41 UTC (rev 15586)
@@ -0,0 +1,11 @@
+package org.jboss.tools.flow.jpdl4.properties;
+
+import org.jboss.tools.flow.jpdl4.model.EventListenerContainer;
+
+public class EventListenerContainerTimerSection extends TextFieldPropertySection {
+
+ public EventListenerContainerTimerSection() {
+ super(EventListenerContainer.TIMER, "Timer");
+ }
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/EventListenerContainerTimerSection.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/SequenceFlowTimerSection.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/SequenceFlowTimerSection.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/SequenceFlowTimerSection.java 2009-05-28 18:55:41 UTC (rev 15586)
@@ -0,0 +1,11 @@
+package org.jboss.tools.flow.jpdl4.properties;
+
+import org.jboss.tools.flow.jpdl4.model.SequenceFlow;
+
+public class SequenceFlowTimerSection extends TextFieldPropertySection {
+
+ public SequenceFlowTimerSection() {
+ super(SequenceFlow.TIMER, "Timer");
+ }
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/SequenceFlowTimerSection.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 7 months
JBoss Tools SVN: r15585 - trunk/documentation/jbosstools-jdocbook-style/src/main/com/css/css.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2009-05-28 12:11:13 -0400 (Thu, 28 May 2009)
New Revision: 15585
Modified:
trunk/documentation/jbosstools-jdocbook-style/src/main/com/css/css/tools.css
Log:
https://jira.jboss.org/jira/browse/JBDS-359 - "nightly builds" lable is fixed for JBDS guides
Modified: trunk/documentation/jbosstools-jdocbook-style/src/main/com/css/css/tools.css
===================================================================
--- trunk/documentation/jbosstools-jdocbook-style/src/main/com/css/css/tools.css 2009-05-28 15:08:23 UTC (rev 15584)
+++ trunk/documentation/jbosstools-jdocbook-style/src/main/com/css/css/tools.css 2009-05-28 16:11:13 UTC (rev 15585)
@@ -3,7 +3,7 @@
/* -----Override jbossenterprise-single.css----- */
body {
-background-image:url(../images/richfaces_label2.png);
+background-image:url(../images/jbds_label2.png);
background-repeat:no-repeat;
background-attachment:fixed;
background-position:top left;
15 years, 7 months
JBoss Tools SVN: r15584 - in trunk: documentation/guides/GettingStartedGuide/en/modules and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2009-05-28 11:08:23 -0400 (Thu, 28 May 2009)
New Revision: 15584
Modified:
trunk/documentation/guides/GettingStartedGuide/en/master.xml
trunk/documentation/guides/GettingStartedGuide/en/modules/further_reading.xml
trunk/documentation/guides/GettingStartedGuide/en/modules/getting_started.xml
trunk/esb/docs/esb_ref_guide/en/modules/esb_support.xml
trunk/jmx/docs/reference/en/modules/introduction.xml
trunk/portlet/docs/reference/en/modules/installation.xml
trunk/seam/docs/reference/en/modules/intro.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-670 broken linkes are fixed
Modified: trunk/documentation/guides/GettingStartedGuide/en/master.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en/master.xml 2009-05-28 13:21:57 UTC (rev 15583)
+++ trunk/documentation/guides/GettingStartedGuide/en/master.xml 2009-05-28 15:08:23 UTC (rev 15584)
@@ -29,6 +29,7 @@
<!ENTITY smookslink "../../jboss_smooks_plugin_ref_guide/html_single/index.html">
<!ENTITY droolslink "../../drools_tools_ref_guide/html_single/index.html">
<!ENTITY jmxlink "../../jmx_ref_guide/html_single/index.html">
+<!ENTITY guvnorlink "../../guvnor_tools_ref_guide/html_single/index.html">
]>
Modified: trunk/documentation/guides/GettingStartedGuide/en/modules/further_reading.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en/modules/further_reading.xml 2009-05-28 13:21:57 UTC (rev 15583)
+++ trunk/documentation/guides/GettingStartedGuide/en/modules/further_reading.xml 2009-05-28 15:08:23 UTC (rev 15584)
@@ -117,6 +117,16 @@
</listitem>
<listitem>
+ <para>
+ <emphasis role="bold">Eclipse Guvnor Tools Reference Guide</emphasis>
+ <ulink url="&guvnorlink;">(html)</ulink>
+ </para>
+ <para>The purpose of this guide is to describe briefly the functionality present in the Eclipse Guvnor Tools (EGT) for Drools 5.</para>
+ </listitem>
+
+
+
+ <listitem>
<para>
<emphasis role="bold">JSF Tools Tutorial</emphasis>
<ulink url="&jsftutoriallink;">(html)</ulink>
Modified: trunk/documentation/guides/GettingStartedGuide/en/modules/getting_started.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en/modules/getting_started.xml 2009-05-28 13:21:57 UTC (rev 15583)
+++ trunk/documentation/guides/GettingStartedGuide/en/modules/getting_started.xml 2009-05-28 15:08:23 UTC (rev 15584)
@@ -467,7 +467,7 @@
Instead we suggest that you download the full binary from <ulink url="http://www.eclipse.org/downloads/">here</ulink>.</para>
</tip>
- <para>If you can only use Eclipse 3.3 use <ulink url="http://www.jboss.org/tools/download/index.html#stable">JBoss Tools 2.1.2</ulink>, but
+ <para>If you can only use Eclipse 3.3 use <ulink url="http://www.jboss.org/tools/download.html">JBoss Tools 2.1.2</ulink>, but
JBoss Tools 2.x will not have any of the new features.</para>
<note>
Modified: trunk/esb/docs/esb_ref_guide/en/modules/esb_support.xml
===================================================================
--- trunk/esb/docs/esb_ref_guide/en/modules/esb_support.xml 2009-05-28 13:21:57 UTC (rev 15583)
+++ trunk/esb/docs/esb_ref_guide/en/modules/esb_support.xml 2009-05-28 15:08:23 UTC (rev 15584)
@@ -24,7 +24,7 @@
<para>ESB Tools come as one module of JBoss Tools project. Since ESB Tools have a
dependence on other JBoss Tools modules we recommend you to install a bundle
- of all <ulink url="http://labs.jboss.com/tools/download/index.html">JBoss
+ of all <ulink url="http://labs.jboss.com/tools/download.html">JBoss
Tools plug-ins</ulink>. You can find all necessary installation instructions on JBoss Wiki in the <ulink url="http://labs.jboss.com/wiki/InstallingJBossTools"
>InstallingJBossTools</ulink> section.</para>
</section>
Modified: trunk/jmx/docs/reference/en/modules/introduction.xml
===================================================================
--- trunk/jmx/docs/reference/en/modules/introduction.xml 2009-05-28 13:21:57 UTC (rev 15583)
+++ trunk/jmx/docs/reference/en/modules/introduction.xml 2009-05-28 15:08:23 UTC (rev 15584)
@@ -53,7 +53,7 @@
do depend on the JMX Tooling and even extend it. </para>
<para>You can find the <property>JBoss Tools</property> plugins over at the <ulink
- url="http://labs.jboss.com/tools/download/index.html">download pages</ulink>. The only
+ url="http://labs.jboss.com/tools/download.html">download pages</ulink>. The only
package you'll need to get is the JMX Tooling, however the <property>AS
Tools</property> would give you a more full experience when using JMX with JBoss Servers.
You can find further download and installation instructions on the JBoss Wiki in the <ulink
Modified: trunk/portlet/docs/reference/en/modules/installation.xml
===================================================================
--- trunk/portlet/docs/reference/en/modules/installation.xml 2009-05-28 13:21:57 UTC (rev 15583)
+++ trunk/portlet/docs/reference/en/modules/installation.xml 2009-05-28 15:08:23 UTC (rev 15584)
@@ -20,7 +20,7 @@
<listitem>
<para>Next, download the JBoss Portal + JBoss AS bundle from <ulink
- url="http://www.jboss.org/jbossportal/download/index.html">JBoss Portal Download
+ url="http://www.jboss.org/jbossportal/download.html">JBoss Portal Download
page</ulink></para>
<note>
Modified: trunk/seam/docs/reference/en/modules/intro.xml
===================================================================
--- trunk/seam/docs/reference/en/modules/intro.xml 2009-05-28 13:21:57 UTC (rev 15583)
+++ trunk/seam/docs/reference/en/modules/intro.xml 2009-05-28 15:08:23 UTC (rev 15584)
@@ -31,7 +31,7 @@
<para>Here, we are going to explain how to install Seam plugin into Eclipse.</para>
<para>Seam is a one module of JBoss Tools project. Since Seam has a dependence on other JBoss Tools modules we recommend you to install
- a bundle of all <ulink url="http://labs.jboss.com/tools/download/index.html">JBoss Tools plug-ins</ulink>. Installation instruction you can find on JBoss Wiki in <ulink url="http://labs.jboss.com/wiki/InstallingJBossTools">InstallingJBossTools</ulink> section.</para>
+ a bundle of all <ulink url="http://labs.jboss.com/tools/download.html">JBoss Tools plug-ins</ulink>. Installation instruction you can find on JBoss Wiki in <ulink url="http://labs.jboss.com/wiki/InstallingJBossTools">InstallingJBossTools</ulink> section.</para>
</section>
15 years, 7 months
JBoss Tools SVN: r15583 - trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2009-05-28 09:21:57 -0400 (Thu, 28 May 2009)
New Revision: 15583
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/XulRunnerEditor.java
Log:
fixing errors in junit tests
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/XulRunnerEditor.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/XulRunnerEditor.java 2009-05-28 12:53:45 UTC (rev 15582)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/XulRunnerEditor.java 2009-05-28 13:21:57 UTC (rev 15583)
@@ -113,14 +113,17 @@
public void handleEvent(Event event) {
Display.getCurrent().asyncExec(new Thread(){
+ @Override
public void run(){
/*
* https://jira.jboss.org/jira/browse/JBIDE-3917
* Resizer should be updated together with selection rectangle.
* Otherwise after window maximizing/restoring resizer shows old position.
*/
- showResizer();
- showSelectionRectangle();
+ if(getBrowser()!=null && !getBrowser().isDisposed()) {
+ showResizer();
+ showSelectionRectangle();
+ }
}
});
}};
15 years, 7 months
JBoss Tools SVN: r15582 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2009-05-28 08:53:45 -0400 (Thu, 28 May 2009)
New Revision: 15582
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamContextVariableRenameHandler.java
Log:
Seam Context Variable Refactoring https://jira.jboss.org/jira/browse/JBIDE-1077
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamContextVariableRenameHandler.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamContextVariableRenameHandler.java 2009-05-28 12:07:34 UTC (rev 15581)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamContextVariableRenameHandler.java 2009-05-28 12:53:45 UTC (rev 15582)
@@ -34,6 +34,12 @@
import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
+import org.jboss.tools.common.el.core.model.ELInstance;
+import org.jboss.tools.common.el.core.model.ELInvocationExpression;
+import org.jboss.tools.common.el.core.model.ELModel;
+import org.jboss.tools.common.el.core.model.ELPropertyInvocation;
+import org.jboss.tools.common.el.core.parser.ELParser;
+import org.jboss.tools.common.el.core.parser.ELParserUtil;
import org.jboss.tools.common.util.FileUtil;
import org.jboss.tools.seam.core.ISeamComponent;
import org.jboss.tools.seam.core.SeamCorePlugin;
@@ -51,6 +57,8 @@
private static final String XHTML_EXT = "xhtml"; //$NON-NLS-1$
private static final String JSP_EXT = "jsp"; //$NON-NLS-1$
private static final String PROPERTIES_EXT = "properties"; //$NON-NLS-1$
+
+ String selectedText = "";
/*
* (non-Javadoc)
*
@@ -72,9 +80,9 @@
if(sel instanceof TextSelection && editor.getEditorInput() instanceof FileEditorInput){
TextSelection selection = (TextSelection)sel;
- String text = selection.getText();
+ selectedText = selection.getText();
- System.out.println("Selection text - "+text);
+ System.out.println("Selection text - "+selectedText);
FileEditorInput input = (FileEditorInput)editor.getEditorInput();
@@ -88,11 +96,11 @@
SeamCorePlugin.getPluginLog().logError(e);
return null;
}
- if(ext.equalsIgnoreCase(JAVA_EXT)){
+ if(JAVA_EXT.equalsIgnoreCase(ext)){
findContextVariableInJava(file, content, selection);
- } else if(ext.equalsIgnoreCase(XML_EXT) || ext.equalsIgnoreCase(XHTML_EXT) || ext.equalsIgnoreCase(JSP_EXT))
+ } else if(XML_EXT.equalsIgnoreCase(ext) || XHTML_EXT.equalsIgnoreCase(ext) || JSP_EXT.equalsIgnoreCase(ext))
findContextVariableInDOM(file, content, selection);
- else if(ext.equalsIgnoreCase(PROPERTIES_EXT))
+ else if(PROPERTIES_EXT.equalsIgnoreCase(ext))
findContextVariableInProperties(file, content, selection);
}
return null;
@@ -110,7 +118,7 @@
int offset = scaner.getTokenOffset();
String value = document.get(offset, length);
if(value.indexOf('{')>-1) {
- //scanString(file, value, offset);
+ scanString(file, value, offset);
}
}
token = scaner.nextToken();
@@ -120,6 +128,38 @@
}
}
+ private void scanString(IFile file, String string, int offset) {
+ int startEl = string.indexOf("#{"); //$NON-NLS-1$
+ if(startEl>-1) {
+ ELParser parser = ELParserUtil.getJbossFactory().createParser();
+ ELModel model = parser.parse(string);
+ for (ELInstance instance : model.getInstances()) {
+ for(ELInvocationExpression ie : instance.getExpression().getInvocations()){
+ ELPropertyInvocation pi = findComponentReference(ie);
+ if(pi != null){
+
+ }
+ }
+ }
+ }
+ }
+
+ private ELPropertyInvocation findComponentReference(ELInvocationExpression invocationExpression){
+ ELInvocationExpression invExp = invocationExpression;
+ while(invExp != null){
+ if(invExp instanceof ELPropertyInvocation){
+ if(((ELPropertyInvocation)invExp).getQualifiedName() != null && ((ELPropertyInvocation)invExp).getQualifiedName().equals(selectedText))
+ return (ELPropertyInvocation)invExp;
+ else
+ invExp = invExp.getLeft();
+
+ }else{
+ invExp = invExp.getLeft();
+ }
+ }
+ return null;
+ }
+
private void findContextVariableInDOM(IFile file, String content, TextSelection selection){
IModelManager manager = StructuredModelManager.getModelManager();
if(manager == null) {
15 years, 7 months
JBoss Tools SVN: r15581 - trunk/smooks/docs/reference/en/modules.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2009-05-28 08:07:34 -0400 (Thu, 28 May 2009)
New Revision: 15581
Modified:
trunk/smooks/docs/reference/en/modules/introduction.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-670 broken linkes are fixed
Modified: trunk/smooks/docs/reference/en/modules/introduction.xml
===================================================================
--- trunk/smooks/docs/reference/en/modules/introduction.xml 2009-05-28 12:00:36 UTC (rev 15580)
+++ trunk/smooks/docs/reference/en/modules/introduction.xml 2009-05-28 12:07:34 UTC (rev 15581)
@@ -77,7 +77,7 @@
<para> The Smooks tools was included by the <property>JBoss Tools</property> since 3.0.0
Beta1 version. You can download the <property>JBoss Tools</property> from <ulink
- url="http://www.jboss.org/tools/download/index.html">JBoss download site</ulink>.</para>
+ url="http://jboss.org/tools/download.html">JBoss download site</ulink>.</para>
<para> Smooks tools (<property>JBoss Tools</property>) run with the latest Eclipse and
other required plug-ins (GEF, EMF, etc.).</para>
<para> You should download the latest IDE for Java EE developers from <ulink
15 years, 7 months
JBoss Tools SVN: r15580 - trunk/as/docs/reference/en/images/runtimes_servers.
by jbosstools-commits@lists.jboss.org
Author: chukhutsina
Date: 2009-05-28 08:00:36 -0400 (Thu, 28 May 2009)
New Revision: 15580
Added:
trunk/as/docs/reference/en/images/runtimes_servers/runtimes_servers_4a.png
trunk/as/docs/reference/en/images/runtimes_servers/runtimes_servers_4b.png
trunk/as/docs/reference/en/images/runtimes_servers/runtimes_servers_4c.png
Log:
<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:9pt;font-family:Sans Serif">
<p>https://jira.jboss.org/jira/browse/JBDS-732 -According to the new features of JBoss AS profile docs were updated. </p>
</body></html>
Added: trunk/as/docs/reference/en/images/runtimes_servers/runtimes_servers_4a.png
===================================================================
(Binary files differ)
Property changes on: trunk/as/docs/reference/en/images/runtimes_servers/runtimes_servers_4a.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/as/docs/reference/en/images/runtimes_servers/runtimes_servers_4b.png
===================================================================
(Binary files differ)
Property changes on: trunk/as/docs/reference/en/images/runtimes_servers/runtimes_servers_4b.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/as/docs/reference/en/images/runtimes_servers/runtimes_servers_4c.png
===================================================================
(Binary files differ)
Property changes on: trunk/as/docs/reference/en/images/runtimes_servers/runtimes_servers_4c.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
15 years, 7 months