JBoss Tools SVN: r12590 - trunk/esb/docs/esb_ref_guide/en/images/esb_project.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2008-12-15 09:37:38 -0500 (Mon, 15 Dec 2008)
New Revision: 12590
Removed:
trunk/esb/docs/esb_ref_guide/en/images/esb_project/01_create_esb_project.png
trunk/esb/docs/esb_ref_guide/en/images/esb_project/02_create_esb_project.png
trunk/esb/docs/esb_ref_guide/en/images/esb_project/03_create_esb_project.png
trunk/esb/docs/esb_ref_guide/en/images/esb_project/04_create_esb_project.png
trunk/esb/docs/esb_ref_guide/en/images/esb_project/05_esb_project_example.png
trunk/esb/docs/esb_ref_guide/en/images/esb_project/06_esb_project_example.png
trunk/esb/docs/esb_ref_guide/en/images/esb_project/07_esb_project_example.png
trunk/esb/docs/esb_ref_guide/en/images/esb_project/08_esb_project_deploy.png
trunk/esb/docs/esb_ref_guide/en/images/esb_project/09_esb_project_deploy.png
Log:
https://jira.jboss.org/jira/browse/JBDS-468 - changing screenshots
Deleted: trunk/esb/docs/esb_ref_guide/en/images/esb_project/01_create_esb_project.png
===================================================================
(Binary files differ)
Deleted: trunk/esb/docs/esb_ref_guide/en/images/esb_project/02_create_esb_project.png
===================================================================
(Binary files differ)
Deleted: trunk/esb/docs/esb_ref_guide/en/images/esb_project/03_create_esb_project.png
===================================================================
(Binary files differ)
Deleted: trunk/esb/docs/esb_ref_guide/en/images/esb_project/04_create_esb_project.png
===================================================================
(Binary files differ)
Deleted: trunk/esb/docs/esb_ref_guide/en/images/esb_project/05_esb_project_example.png
===================================================================
(Binary files differ)
Deleted: trunk/esb/docs/esb_ref_guide/en/images/esb_project/06_esb_project_example.png
===================================================================
(Binary files differ)
Deleted: trunk/esb/docs/esb_ref_guide/en/images/esb_project/07_esb_project_example.png
===================================================================
(Binary files differ)
Deleted: trunk/esb/docs/esb_ref_guide/en/images/esb_project/08_esb_project_deploy.png
===================================================================
(Binary files differ)
Deleted: trunk/esb/docs/esb_ref_guide/en/images/esb_project/09_esb_project_deploy.png
===================================================================
(Binary files differ)
17 years, 4 months
JBoss Tools SVN: r12589 - in trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor: util and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: izhukov
Date: 2008-12-15 09:37:15 -0500 (Mon, 15 Dec 2008)
New Revision: 12589
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SelectionUtil.java
Log:
JBIDE-3388 fixed
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2008-12-15 11:55:03 UTC (rev 12588)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2008-12-15 14:37:15 UTC (rev 12589)
@@ -11,11 +11,11 @@
package org.jboss.tools.vpe.editor;
import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Properties;
+
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IPath;
@@ -66,7 +66,6 @@
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.fieldassist.ContentAssistCommandAdapter;
import org.eclipse.ui.internal.keys.WorkbenchKeyboard;
import org.eclipse.ui.keys.IBindingService;
import org.eclipse.ui.progress.UIJob;
@@ -78,7 +77,6 @@
import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
import org.eclipse.wst.sse.ui.StructuredTextEditor;
-import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
import org.eclipse.wst.sse.ui.internal.view.events.INodeSelectionListener;
import org.eclipse.wst.sse.ui.internal.view.events.ITextSelectionListener;
import org.eclipse.wst.sse.ui.internal.view.events.NodeSelectionChangedEvent;
@@ -150,7 +148,6 @@
import org.jboss.tools.vpe.editor.template.VpeTemplateManager;
import org.jboss.tools.vpe.editor.toolbar.format.FormatControllerManager;
import org.jboss.tools.vpe.editor.util.DocTypeUtil;
-import org.jboss.tools.vpe.editor.util.HTML;
import org.jboss.tools.vpe.editor.util.NodesManagingUtil;
import org.jboss.tools.vpe.editor.util.SelectionUtil;
import org.jboss.tools.vpe.editor.util.VisualDomUtil;
@@ -172,7 +169,6 @@
import org.mozilla.interfaces.nsIDOMNode;
import org.mozilla.interfaces.nsIFile;
import org.mozilla.interfaces.nsISelection;
-import org.mozilla.interfaces.nsISelectionController;
import org.mozilla.interfaces.nsISelectionListener;
import org.mozilla.interfaces.nsISupports;
import org.mozilla.interfaces.nsISupportsCString;
@@ -204,9 +200,7 @@
VpeDomMapping domMapping;
private VpeSourceDomBuilder sourceBuilder;
private VpeVisualDomBuilder visualBuilder;
- /**
- * @deprecated
- */
+ /** @deprecated */
private VpeSelectionBuilder selectionBuilder;
// private VpeVisualKeyHandler visualKeyHandler;
private ActiveEditorSwitcher switcher = new ActiveEditorSwitcher();
@@ -1508,12 +1502,12 @@
}
manager.add(new VpeTextOperationAction(
- "Cut", ActionFactory.CUT.getId(), (IndexedRegion) node)); //$NON-NLS-1$
+ "Cut", ActionFactory.CUT.getId(), node)); //$NON-NLS-1$
manager.add(new VpeTextOperationAction(
- "Copy", ActionFactory.COPY.getId(), (IndexedRegion) node)); //$NON-NLS-1$
+ "Copy", ActionFactory.COPY.getId(), node)); //$NON-NLS-1$
manager
.add(new VpeTextOperationAction(
- "Paste", ActionFactory.PASTE.getId(), (IndexedRegion) node)); //$NON-NLS-1$
+ "Paste", ActionFactory.PASTE.getId(), node)); //$NON-NLS-1$
} else if (node.getNodeType() == Node.TEXT_NODE) {
manager.add(new Action("Cut") { //$NON-NLS-1$
public void run() {
@@ -2427,19 +2421,18 @@
class VpeTextOperationAction extends Action {
private String id;
- private IndexedRegion region;
+ private Node region;
- public VpeTextOperationAction(String name, String id,
- IndexedRegion region) {
+ public VpeTextOperationAction(String name, String id, Node region) {
super(name);
this.id = id;
this.region = region;
}
public void run() {
- sourceEditor.getSelectionProvider().setSelection(
- new VpeSelection(region));
- sourceEditor.getAction(id).run();
+ SelectionUtil.setSourceSelection(pageContext, region);
+// sourceEditor.getSelectionProvider().setSelection(new VpeSelection(region));
+// sourceEditor.getAction(id).run();
}
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SelectionUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SelectionUtil.java 2008-12-15 11:55:03 UTC (rev 12588)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SelectionUtil.java 2008-12-15 14:37:15 UTC (rev 12589)
@@ -29,16 +29,15 @@
import org.w3c.dom.Node;
/**
- * Util class for selection manupalating
- *
+ * Utility class for selection manipulating.
+ *
* @author S.Dzmitrovich
- *
*/
public class SelectionUtil {
/**
* get selected visual node from nsISelection
- *
+ *
* @param selection
* @return
*/
@@ -53,7 +52,6 @@
selection.getFocusOffset() - 1);
} else
return selection.getFocusNode();
-
}
} else {
nsIDOMRange range = selection.getRangeAt(0);
@@ -74,11 +72,8 @@
int start = NodesManagingUtil.getStartOffsetNode(node);
int length = NodesManagingUtil.getNodeLength(node);
- pageContext.getSourceBuilder().getStructuredTextViewer()
- .setSelectedRange(start, length);
- pageContext.getSourceBuilder().getStructuredTextViewer().revealRange(
- start, length);
-
+ pageContext.getSourceBuilder().getStructuredTextViewer().setSelectedRange(start, length);
+ pageContext.getSourceBuilder().getStructuredTextViewer().revealRange(start, length);
}
/**
@@ -90,11 +85,8 @@
*/
public static void setSourceSelection(VpePageContext pageContext,
Node node, int offset, int length) {
-
int start = NodesManagingUtil.getStartOffsetNode(node);
-
setSourceSelection(pageContext, start + offset, length);
-
}
/**
@@ -103,14 +95,9 @@
* @param node
* @param offset
*/
- public static void setSourceSelection(VpePageContext pageContext,
- Node node, int offset) {
-
+ public static void setSourceSelection(VpePageContext pageContext, Node node, int offset) {
int start = NodesManagingUtil.getStartOffsetNode(node);
-
- pageContext.getSourceBuilder().getStructuredTextViewer()
- .getTextWidget().setSelection(start + offset);
-
+ pageContext.getSourceBuilder().getStructuredTextViewer().getTextWidget().setSelection(start + offset);
}
/**
@@ -119,20 +106,13 @@
* @param offset
* @param length
*/
- public static void setSourceSelection(VpePageContext pageContext,
- int offset, int length) {
-
- pageContext.getSourceBuilder().getStructuredTextViewer()
- .setSelectedRange(offset, length);
- pageContext.getSourceBuilder().getStructuredTextViewer().revealRange(
- offset, length);
-
+ public static void setSourceSelection(VpePageContext pageContext, int offset, int length) {
+ pageContext.getSourceBuilder().getStructuredTextViewer().setSelectedRange(offset, length);
+ pageContext.getSourceBuilder().getStructuredTextViewer().revealRange(offset, length);
}
public static VpeNodeMapping getNodeMappingBySourceSelection(
- IStructuredModel model, VpeDomMapping domMapping, int focus,
- int anchor) {
-
+ IStructuredModel model, VpeDomMapping domMapping, int focus, int anchor) {
/*
* implementation of IDOMModel's method getIndexedRegion(...) has one
* feature : if cursor is situated at the border of elements then this
@@ -141,48 +121,43 @@
* border of "h:inputText" element then getIndexedRegion() return
* "h:outputText" element. So for focus position we choose smaller value
*/
-
if (anchor < focus) {
+ int tmp = focus;
focus = anchor;
- anchor = focus;
+ anchor = tmp;
}
// get source node by offset
Node focusNode = getSourceNodeByPosition(model, focus);
// if focus node also contain anchor point (selected only 1 element)
- if ((focusNode != null)
- && NodesManagingUtil.isNodeContainsPosition(focusNode, anchor)) {
-
+ if (focusNode != null && NodesManagingUtil.isNodeContainsPosition(focusNode, anchor)) {
return NodesManagingUtil.getNodeMapping(domMapping, focusNode);
-
}
return null;
-
}
- public static Node getSourceNodeByPosition(IStructuredModel model,
- int position) {
+ public static Node getSourceNodeByPosition(IStructuredModel model, int position) {
//if we state at the end of text node, model will return
//for us next node or null if on page exists only text node,
//but we still in the end of text node, so we should check
//this situation
-
+
// get source node by position
//see jbide-3163
- IndexedRegion node = model.getIndexedRegion(position);
- IndexedRegion possbleNode = position>=1?model.getIndexedRegion(position-1):null;
- if(node==null && position>=1) {
- node = possbleNode;
- }else if((node!=null) &&(((Node)node).getNodeType()!=Node.TEXT_NODE)
- && (node.getStartOffset()==position)
- && (position>=1)) {
+ IndexedRegion node = model.getIndexedRegion(position);
+ IndexedRegion possibleNode = position >= 1 ? model.getIndexedRegion(position - 1) : null;
+ if (node == null && position >= 1) {
+ node = possibleNode;
+ } else if ((node!=null) && (((Node)node).getNodeType() != Node.TEXT_NODE)
+ && (node.getStartOffset() == position)
+ && (position >= 1)) {
//check for such situation #text<h1></h1>
- node = possbleNode;
- }else if((node!=null) &&(((Node)node).getNodeType()!=Node.TEXT_NODE)
- && (possbleNode!=null)
- && ((Node)possbleNode).getNodeType()==Node.TEXT_NODE){
- node = possbleNode;
+ node = possibleNode;
+ } else if((node != null) && (((Node)node).getNodeType() != Node.TEXT_NODE)
+ && (possibleNode != null)
+ && ((Node)possibleNode).getNodeType() == Node.TEXT_NODE) {
+ node = possibleNode;
}
return (Node)node;
@@ -192,21 +167,15 @@
* Returns selection range for visual part of editor Focus offset and anchor
* offset can be not equals to source focus offset and anchor offset
*
- * @param selection
- * -selection in visual part of editor
- *
+ * @param selection the selection in visual part of editor
* @return selection range for visual part of editor
*/
public static Point getVisualSelectionRange(nsISelection selection) {
- nsIDOMNode focusedNode = getSelectedNode(selection);
-
Point range = new Point(0, 0);
-
+ nsIDOMNode focusedNode = getSelectedNode(selection);
if (focusedNode != null) {
-
range.x = selection.getFocusOffset();
range.y = selection.getAnchorOffset() - selection.getFocusOffset();
-
}
return range;
}
@@ -214,13 +183,11 @@
/**
* Return source editor part selection range, range returns relatively to
* start of text in source, not for start of document
- *
- * @param selection
+ *
+ * @param selection the selection in visual part of editor
* @return source editor selection range
*/
- public static Point getSourceSelectionRange(nsISelection selection,
- Node sourceNode) {
-
+ public static Point getSourceSelectionRange(nsISelection selection, Node sourceNode) {
nsIDOMNode focusedNode = getSelectedNode(selection);
// gets visual selection range
Point sourceRange = new Point(0, 0);
@@ -229,24 +196,20 @@
sourceRange.x = TextUtil.sourcePosition(sourceNode.getNodeValue(),
focusedNode.getNodeValue(), selection.getFocusOffset());
sourceRange.y = TextUtil.sourcePosition(sourceNode.getNodeValue(),
- focusedNode.getNodeValue(), selection.getAnchorOffset())
- - sourceRange.x;
+ focusedNode.getNodeValue(), selection.getAnchorOffset()) - sourceRange.x;
}
return sourceRange;
}
public static VpeNodeMapping getNodeMappingBySourceSelection(
StructuredTextEditor sourceEditor, VpeDomMapping domMapping) {
-
Point range = sourceEditor.getTextViewer().getSelectedRange();
IDocument document = sourceEditor.getTextViewer().getDocument();
IStructuredModel model = null;
-
try {
- model = StructuredModelManager.getModelManager()
- .getExistingModelForRead(document);
+ model = StructuredModelManager.getModelManager().getExistingModelForRead(document);
int anchor = range.x;
int focus = range.x + range.y;
@@ -260,65 +223,67 @@
* getIndexedRegion() return "h:outputText" element. So for focus
* position we choose smaller value
*/
-
+ Node focusNode = null;
if (anchor < focus) {
+ int tmp = focus;
focus = anchor;
- anchor = focus;
+ anchor = tmp;
}
+ if (anchor == focus) {
+ // get source node by offset
+ // see JBIDE-3163
+ focusNode = getSourceNodeByPosition(model, focus);
+ } else {
+ // fixed JBIDE-3388: Incorrect selection after Copy/Cut actions
+ IndexedRegion node = model.getIndexedRegion(focus);
+ if (node != null) {
+ focusNode = (Node)node;
+ }
+ }
- // get source node by offset
- Node focusNode = getSourceNodeByPosition(model, focus);
-
// if focus node also contain anchor point (selected only 1 element)
if ((focusNode != null)
- && NodesManagingUtil.isNodeContainsPosition(focusNode,
- anchor)) {
-
+ && NodesManagingUtil.isNodeContainsPosition(focusNode, anchor)) {
return NodesManagingUtil.getNodeMapping(domMapping, focusNode);
-
}
} finally {
-
if (model != null) {
-
model.releaseFromRead();
}
}
return null;
-
}
+ /**
+ * Method is used to select the last selected node.
+ *
+ * @param pageContext VpePageContext object
+ * @return nsIDOMNode the last selected node
+ */
public static nsIDOMNode getLastSelectedNode(VpePageContext pageContext) {
-
- return pageContext.getVisualBuilder().getXulRunnerEditor()
- .getLastSelectedNode();
-
+ return pageContext.getVisualBuilder().getXulRunnerEditor().getLastSelectedNode();
}
/**
* Returns sourceSelectionRange
- *
- * @param sourceEditor
+ *
+ * @param sourceEditor StructuredTextEditor object
* @return sourceSelectionRange
*/
- static public Point getSourceSelectionRange(
- StructuredTextEditor sourceEditor) {
+ public static Point getSourceSelectionRange(StructuredTextEditor sourceEditor) {
ITextViewer textViewer = sourceEditor.getTextViewer();
-
- if (textViewer != null)
+ if (textViewer != null) {
return textViewer.getSelectedRange();
-
+ }
return null;
}
/**
*
- * @param selectionController
+ * @param selectionController VpeSelectionController object
*/
- static public void clearSelection(VpeSelectionController selectionController) {
- selectionController.getSelection(
- nsISelectionController.SELECTION_NORMAL).removeAllRanges();
+ public static void clearSelection(VpeSelectionController selectionController) {
+ selectionController.getSelection(nsISelectionController.SELECTION_NORMAL).removeAllRanges();
}
-
-}
+}
\ No newline at end of file
17 years, 4 months
JBoss Tools SVN: r12588 - trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2008-12-15 06:55:03 -0500 (Mon, 15 Dec 2008)
New Revision: 12588
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/KnownConfigurations.java
Log:
'Strin' in javadoc renamed to 'String'
Unnecessary import removed.
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/KnownConfigurations.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/KnownConfigurations.java 2008-12-15 10:51:48 UTC (rev 12587)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/KnownConfigurations.java 2008-12-15 11:55:03 UTC (rev 12588)
@@ -53,7 +53,6 @@
import org.hibernate.SessionFactory;
import org.hibernate.console.node.BaseNode;
import org.hibernate.console.node.ConfigurationListNode;
-import org.hibernate.eclipse.HibernatePlugin;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -191,7 +190,7 @@
/**
* Answer whether the provided configuration name is known by the provider or not.
- * The name string corresponds to the Strin returned by ConsoleConfiguration#getName()
+ * The name string corresponds to the String returned by ConsoleConfiguration#getName()
*/
public boolean isKnownConfiguration(String name) {
return internalGetRepository(name) != null;
17 years, 4 months
JBoss Tools SVN: r12587 - in trunk: jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: izhukov
Date: 2008-12-15 05:51:48 -0500 (Mon, 15 Dec 2008)
New Revision: 12587
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/paint2D/paint2D.css
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPaint2DTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSpacerTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/paint2D.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/paint2D.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/spacer.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/spacer.xhtml.xml
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java
Log:
Improve templates functionality for "paint2D" and "spacer" VPE components
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/paint2D/paint2D.css
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/paint2D/paint2D.css 2008-12-15 07:45:59 UTC (rev 12586)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/paint2D/paint2D.css 2008-12-15 10:51:48 UTC (rev 12587)
@@ -1,4 +1,2 @@
-.imgStyleClass{
-width: 300;
-height : 120;
+.rich-paint2D{
}
\ No newline at end of file
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java 2008-12-15 07:45:59 UTC (rev 12586)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java 2008-12-15 10:51:48 UTC (rev 12587)
@@ -440,7 +440,24 @@
*
* @param attributeName the attribute name
* @param sourceElement the source element
+ * @param defaultValue the default value
+ *
+ * @return the attribute
+ */
+ public static String getAttribute(Element sourceElement, String attributeName, String defaultValue) {
+ String attribute = sourceElement.getAttribute(attributeName);
+ if (attribute == null) {
+ attribute = defaultValue;
+ }
+ return attribute;
+ }
+
+ /**
+ * Returns value of attribute.
*
+ * @param attributeName the attribute name
+ * @param sourceElement the source element
+ *
* @return the attribute
*/
public static String getAttribute(nsIDOMElement sourceElement, String attributeName) {
@@ -525,10 +542,10 @@
String path = ElService.getInstance().replaceEl(pageContext.getVisualBuilder().getCurrentIncludeInfo().getFile(), fileImageName);
File file = new File(inputPath.toOSString() + File.separator + path);
if (file.exists()) {
- img.setAttribute(HtmlComponentUtil.HTML_ATR_SRC, HtmlComponentUtil.FILE_PROTOCOL + inputPath.toString() + "/" //$NON-NLS-1$
+ img.setAttribute(HTML.ATTR_SRC, HtmlComponentUtil.FILE_PROTOCOL + inputPath.toString() + "/" //$NON-NLS-1$
+ path.replace('\\', '/'));
} else {
- img.setAttribute(HtmlComponentUtil.HTML_ATR_SRC, undefinedImgName.replace('\\', '/'));
+ img.setAttribute(HTML.ATTR_SRC, undefinedImgName.replace('\\', '/'));
}
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPaint2DTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPaint2DTemplate.java 2008-12-15 07:45:59 UTC (rev 12586)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPaint2DTemplate.java 2008-12-15 10:51:48 UTC (rev 12587)
@@ -10,13 +10,16 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.richfaces.template;
+import java.util.List;
+
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
+import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.jboss.tools.vpe.editor.util.Constants;
import org.jboss.tools.vpe.editor.util.HTML;
-import org.jboss.tools.vpe.editor.util.VisualDomUtil;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.w3c.dom.Element;
@@ -35,6 +38,16 @@
/** PAINT2D_CSS_FILE */
private static final String PAINT2D_CSS_FILE = "/paint2D/paint2D.css"; //$NON-NLS-1$
+ /** DEFAULT_WIDTH */
+ private static final String DEFAULT_WIDTH = "10"; //$NON-NLS-1$
+ /** DEFAULT_HEIGHT */
+ private static final String DEFAULT_HEIGHT = "10"; //$NON-NLS-1$
+ /** ATTR_TRANSPARENT_VALUE */
+ private static final String ATTR_TRANSPARENT_VALUE = "transparent"; //$NON-NLS-1$
+
+ /** RICH_PAINT2D_STYLE */
+ private static final String RICH_PAINT2D_STYLE = "rich-paint2D"; //$NON-NLS-1$
+
/**
* Create html instead rich:faces component.
*
@@ -48,19 +61,59 @@
*/
public VpeCreationData create(VpePageContext pageContext, Node sourceNode, nsIDOMDocument visualDocument) {
ComponentUtil.setCSSLink(pageContext, PAINT2D_CSS_FILE, "paint2d"); //$NON-NLS-1$
+ // convert to Element
+ Element sourceElement = (Element) sourceNode;
nsIDOMElement img = visualDocument.createElement(HTML.TAG_IMG);
ComponentUtil.setImg(img, IMAGE_NAME);
- String attrValue = ((Element) sourceNode).getAttribute(RichFaces.ATTR_STYLE_CLASS);
- if (attrValue != null && attrValue.length() != 0) {
- img.setAttribute(HTML.ATTR_CLASS, attrValue);
- } else if (((Element) sourceNode).getAttribute(HTML.ATTR_WIDTH) == null
- && ((Element) sourceNode).getAttribute(HTML.ATTR_HEIGHT) == null) {
- img.setAttribute(HTML.ATTR_CLASS, "imgStyleClass"); //$NON-NLS-1$
+
+ // set STYLE attributes
+ String attrValue = ComponentUtil.getAttribute(sourceElement, RichFaces.ATTR_STYLE);
+ if (attrValue.length() != 0) {
+ img.setAttribute(HTML.ATTR_STYLE, attrValue);
}
- VisualDomUtil.copyAttributes(sourceNode, img);
- VpeCreationData creationData = new VpeCreationData(img);
+ // set CLASS attribute
+ attrValue = ComponentUtil.getAttribute(sourceElement, RichFaces.ATTR_STYLE_CLASS);
+ String styleClass = RICH_PAINT2D_STYLE;
+ if (attrValue.length() != 0) {
+ styleClass += Constants.WHITE_SPACE + attrValue;
+ }
+ img.setAttribute(HTML.ATTR_CLASS, styleClass);
+ // set WIDTH attribute
+ String width = ComponentUtil.getAttribute(sourceElement, HTML.ATTR_WIDTH, DEFAULT_WIDTH);
+ img.setAttribute(HTML.ATTR_WIDTH, width);
+ // set HEIGHT attribute
+ String height = ComponentUtil.getAttribute(sourceElement, HTML.ATTR_HEIGHT, DEFAULT_HEIGHT);
+ img.setAttribute(HTML.ATTR_HEIGHT, height);
+ // set BGCOLOR attribute
+ String bgColor = ComponentUtil.getAttribute(sourceElement, HTML.ATTR_BGCOLOR, ATTR_TRANSPARENT_VALUE);
+ img.setAttribute(HTML.ATTR_BGCOLOR, bgColor);
+ // ================================================================================
+ // Check if template component has children elements
+ // ================================================================================
+ List<Node> list = ComponentUtil.getChildren(sourceElement, true);
+ VpeCreationData creationData = null;
+ if (list != null && list.size() > 0) {
+ nsIDOMElement rootDiv = visualDocument.createElement(HTML.TAG_SPAN);
+
+ // this element is used to contains template children
+ nsIDOMElement childDiv = visualDocument.createElement(HTML.TAG_SPAN);
+
+ rootDiv.appendChild(childDiv);
+ rootDiv.appendChild(img);
+
+ // Create return variable contains template
+ creationData = new VpeCreationData(rootDiv);
+ VpeChildrenInfo divInfo = new VpeChildrenInfo(childDiv);
+ creationData.addChildrenInfo(divInfo);
+ for (Node child : list) {
+ divInfo.addSourceChild(child);
+ }
+ } else {
+ creationData = new VpeCreationData(img);
+ }
+
return creationData;
}
-}
+}
\ No newline at end of file
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSpacerTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSpacerTemplate.java 2008-12-15 07:45:59 UTC (rev 12586)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSpacerTemplate.java 2008-12-15 10:51:48 UTC (rev 12587)
@@ -10,14 +10,18 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.richfaces.template;
+import java.util.List;
+
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.HtmlComponentUtil;
+import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
+import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.jboss.tools.vpe.editor.util.Constants;
+import org.jboss.tools.vpe.editor.util.HTML;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
-import org.mozilla.interfaces.nsIDOMNode;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -26,13 +30,23 @@
*/
public class RichFacesSpacerTemplate extends VpeAbstractTemplate {
- final static private String IMAGE_NAME = "spacer/spacer.gif";
+ /** IMAGE_NAME */
+ private static final String IMAGE_NAME = "/spacer/spacer.gif"; //$NON-NLS-1$
+ /** SPACER_CSS_FILE */
+ private static final String SPACER_CSS_FILE = "/spacer/spacer.css"; //$NON-NLS-1$
+
+ /** DEFAULT_SIZE */
+ private static final String DEFAULT_SIZE = "1px"; //$NON-NLS-1$
+
+ /** RICH_SPACER_STYLE */
+ private static final String RICH_SPACER_STYLE = "rich-spacer"; //$NON-NLS-1$
+
/**
* Creates a node of the visual tree on the node of the source tree. This
* visual node should not have the parent node This visual node can have
* child nodes.
- *
+ *
* @param pageContext
* Contains the information on edited page.
* @param sourceNode
@@ -41,63 +55,58 @@
* The document of the visual tree.
* @return The information on the created node of the visual tree.
*/
- public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
- nsIDOMDocument visualDocument) {
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode, nsIDOMDocument visualDocument) {
+ ComponentUtil.setCSSLink(pageContext, SPACER_CSS_FILE, "spacer"); //$NON-NLS-1$
+ // convert to Element
+ Element sourceElement = (Element) sourceNode;
- nsIDOMElement img = visualDocument
- .createElement(HtmlComponentUtil.HTML_TAG_IMG);
+ nsIDOMElement img = visualDocument.createElement(HTML.TAG_IMG);
ComponentUtil.setImg(img, IMAGE_NAME);
- Element sourceElement = (Element) sourceNode;
+ // set STYLE attributes
+ String attrValue = ComponentUtil.getAttribute(sourceElement, RichFaces.ATTR_STYLE);
+ if (attrValue.length() != 0) {
+ img.setAttribute(HTML.ATTR_STYLE, attrValue);
+ }
+ // set CLASS attribute
+ attrValue = ComponentUtil.getAttribute(sourceElement, RichFaces.ATTR_STYLE_CLASS);
+ String styleClass = RICH_SPACER_STYLE;
+ if (attrValue.length() != 0) {
+ styleClass += Constants.WHITE_SPACE + attrValue;
+ }
+ img.setAttribute(HTML.ATTR_CLASS, styleClass);
+ // set WIDTH attribute
+ String width = ComponentUtil.getAttribute(sourceElement, HTML.ATTR_WIDTH, DEFAULT_SIZE);
+ img.setAttribute(HTML.ATTR_WIDTH, width);
+ // set HEIGHT attribute
+ String height = ComponentUtil.getAttribute(sourceElement, HTML.ATTR_HEIGHT, DEFAULT_SIZE);
+ img.setAttribute(HTML.ATTR_HEIGHT, height);
- setData(sourceElement, img);
+ // ================================================================================
+ // Check if template component has children elements
+ // ================================================================================
+ List<Node> list = ComponentUtil.getChildren(sourceElement, true);
+ VpeCreationData creationData = null;
+ if (list != null && list.size() > 0) {
+ nsIDOMElement rootDiv = visualDocument.createElement(HTML.TAG_SPAN);
- VpeCreationData creationData = new VpeCreationData(img);
+ // this element is used to contains template children
+ nsIDOMElement childDiv = visualDocument.createElement(HTML.TAG_SPAN);
- return creationData;
- }
+ rootDiv.appendChild(childDiv);
+ rootDiv.appendChild(img);
- private String getSize(Element sourceElement, String attributeName) {
- String size = sourceElement.getAttribute(attributeName);
- if (size == null || size.length() == 0) {
- return "1px";
+ // Create return variable contains template
+ creationData = new VpeCreationData(rootDiv);
+ VpeChildrenInfo divInfo = new VpeChildrenInfo(childDiv);
+ creationData.addChildrenInfo(divInfo);
+ for (Node child : list) {
+ divInfo.addSourceChild(child);
+ }
} else {
- return size;
+ creationData = new VpeCreationData(img);
}
- }
- /**
- *
- * @see com.exadel.vpe.editor.template.VpeAbstractTemplate#setAttribute(com.exadel.vpe.editor.context.VpePageContext,
- * org.w3c.dom.Element, org.w3c.dom.Document, org.w3c.dom.Node,
- * java.lang.Object, java.lang.String, java.lang.String)
- */
- @Override
- public void setAttribute(VpePageContext pageContext, Element sourceElement,
- nsIDOMDocument visualDocument, nsIDOMNode visualNode, Object data,
- String name, String value) {
- super.setAttribute(pageContext, sourceElement, visualDocument,
- visualNode, data, name, value);
-
- nsIDOMElement img = (nsIDOMElement) visualNode
- .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
-
- setData(sourceElement, img);
+ return creationData;
}
-
- /**
- *
- * @param sourceElement
- * @param visualElement
- */
- private void setData(Element sourceElement, nsIDOMElement visualElement) {
-
- visualElement
- .setAttribute("style", sourceElement.getAttribute("style"));
- visualElement.setAttribute("class", sourceElement
- .getAttribute("styleClass"));
- visualElement.setAttribute("width", getSize(sourceElement, "width"));
- visualElement.setAttribute("height", getSize(sourceElement, "height"));
-
- }
}
\ No newline at end of file
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2008-12-15 07:45:59 UTC (rev 12586)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2008-12-15 10:51:48 UTC (rev 12587)
@@ -7,7 +7,7 @@
<vpe:tag name="rich:paint2D" case-sensitive="yes">
- <vpe:template children="no" modify="yes"
+ <vpe:template children="yes" modify="yes"
class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesPaint2DTemplate">
<vpe:resize>
<vpe:width width-attr="style.width" />
@@ -17,6 +17,7 @@
<vpe:drag start-enable="yes" />
<vpe:drop container="no"></vpe:drop>
</vpe:dnd>
+ <vpe:pseudoContent defaultText="no" />
</vpe:template>
</vpe:tag>
@@ -216,7 +217,7 @@
</vpe:tag>
<vpe:tag name="rich:spacer" case-sensitive="yes">
- <vpe:template children="no" modify="yes"
+ <vpe:template children="yes" modify="yes"
class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesSpacerTemplate">
<vpe:resize>
<vpe:width width-attr="style.width" />
@@ -230,13 +231,11 @@
<vpe:format type="BackgroundColorFormat">
<vpe:formatAttribute type="style" />
</vpe:format>
- </vpe:textFormatting>
-
+ </vpe:textFormatting>
+ <vpe:pseudoContent defaultText="no"/>
</vpe:template>
- </vpe:tag>
+ </vpe:tag>
-
-
<vpe:tag name="rich:separator" case-sensitive="yes">
<vpe:template children="no" modify="no"
class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesSeparatorTemplate">
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/paint2D.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/paint2D.xhtml 2008-12-15 07:45:59 UTC (rev 12586)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/paint2D.xhtml 2008-12-15 10:51:48 UTC (rev 12587)
@@ -8,11 +8,16 @@
<head>
</head>
-
<body>
<f:view>
-<rich:paint2D id="paint2D" width="300" height="120" data="#{paintData}"
- format="png" paint="#{paintBean.paint}" />
+<rich:paint2D id="paint2D" data="#{paintData}" format="png" paint="#{paintBean.paint}"/>
+<rich:paint2D id="paint2DWithData" width="300" height="120" data="#{paintData}"
+ format="png" paint="#{paintBean.paint}" style="color:red" styleClass="customStyleClass"/>
+<rich:paint2D id="paint2DWithDataAndChildren" width="300" height="120" data="#{paintData}"
+ format="png" paint="#{paintBean.paint}" style="color:red" styleClass="customStyleClass">
+ Mama mila ramu
+ <input type="button" value="Button"/>
+</rich:paint2D>
</f:view>
</body>
</html>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/paint2D.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/paint2D.xhtml.xml 2008-12-15 07:45:59 UTC (rev 12586)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/paint2D.xhtml.xml 2008-12-15 10:51:48 UTC (rev 12587)
@@ -1,7 +1,20 @@
<tests>
<test id="paint2D">
- <IMG WIDTH="300" HEIGHT="120"
- SRC="/.*resources/paint2D/paint2D.gif/"
- ID="paint2D" DATA="#{paintData}" FORMAT="png" PAINT="#{paintBean.paint}" />
- </test>
+ <IMG WIDTH="10" HEIGHT="10" SRC="/.*resources/paint2D/paint2D.gif/"
+ CLASS="rich-paint2D" BGCOLOR="transparent"/>
+ </test>
+ <test id="paint2DWithData">
+ <IMG WIDTH="300" HEIGHT="120" SRC="/.*resources/paint2D/paint2D.gif/"
+ STYLE="color: red;" CLASS="rich-paint2D customStyleClass" BGCOLOR="transparent"/>
+ </test>
+ <test id="paint2DWithDataAndChildren">
+ <SPAN>
+ <SPAN>
+ <SPAN>Mama mila ramu</SPAN>
+ <INPUT TYPE="button" VALUE="Button"/>
+ </SPAN>
+ <IMG WIDTH="300" HEIGHT="120" SRC="/.*resources/paint2D/paint2D.gif/"
+ STYLE="color: red;" CLASS="rich-paint2D customStyleClass" BGCOLOR="transparent"/>
+ </SPAN>
+ </test>
</tests>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/spacer.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/spacer.xhtml 2008-12-15 07:45:59 UTC (rev 12586)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/spacer.xhtml 2008-12-15 10:51:48 UTC (rev 12587)
@@ -5,15 +5,15 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
-
<head>
</head>
-
<body>
<f:view>
- line1
- <rich:spacer id="spacer" width="1" height="5" title="Here is a spacer..." />
- line2
+ <rich:spacer id="spacer"/>
+ <rich:spacer id="spacerCSS" styleClass="customStyleClass" style="color:red" width="100" height="200"/>
+ <rich:spacer id="spacerCSSWithChildren" styleClass="customStyleClass" style="color:red" width="100" height="200">
+ <input type="button" value="Button"/><br/>Mama mila ramu
+ </rich:spacer>
</f:view>
</body>
</html>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/spacer.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/spacer.xhtml.xml 2008-12-15 07:45:59 UTC (rev 12586)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/spacer.xhtml.xml 2008-12-15 10:51:48 UTC (rev 12587)
@@ -1,6 +1,20 @@
<tests>
<test id="spacer">
- <IMG WIDTH="1" HEIGHT="5"
- SRC="/.*resources/spacer/spacer.gif/" />
- </test>
+ <IMG WIDTH="1" HEIGHT="1" SRC="/.*resources/spacer/spacer.gif/" CLASS="rich-spacer"/>
+ </test>
+ <test id="spacerCSS">
+ <IMG WIDTH="100" HEIGHT="200" SRC="/.*resources/spacer/spacer.gif/"
+ STYLE="color: red;" CLASS="rich-spacer customStyleClass"/>
+ </test>
+ <test id="spacerCSSWithChildren">
+ <SPAN>
+ <SPAN>
+ <INPUT TYPE="button" VALUE="Button" STYLE="-moz-user-modify: read-write;"/>
+ <BR/>
+ <SPAN>Mama mila ramu</SPAN>
+ </SPAN>
+ <IMG WIDTH="100" HEIGHT="200" SRC="/.*resources/spacer/spacer.gif/"
+ STYLE="color: red;" CLASS="rich-spacer customStyleClass"/>
+ </SPAN>
+ </test>
</tests>
\ No newline at end of file
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java 2008-12-15 07:45:59 UTC (rev 12586)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java 2008-12-15 10:51:48 UTC (rev 12587)
@@ -101,6 +101,7 @@
public static final String ATTR_SCOPE = "scope"; //$NON-NLS-1$
public static final String ATTR_SPAN = "span"; //$NON-NLS-1$
public static final String ATTR_BACKGROUND = "background"; //$NON-NLS-1$
+ public static final String ATTR_BGCOLOR = "bgcolor"; //$NON-NLS-1$
/**Use this constant if you have to span a column to entire row.*/
/* While in HTML 4.01 standard "colspan='0'" should be used for this purpose,
17 years, 4 months
JBoss Tools SVN: r12585 - in trunk/as/plugins/org.jboss.ide.eclipse.as.ui: jbossui/org/jboss/ide/eclipse/as/ui and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-12-13 16:54:26 -0500 (Sat, 13 Dec 2008)
New Revision: 12585
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/icons/actions/xpl/explore.gif
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ExploreAction.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ExploreUtils.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/JBossServerUISharedImages.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ModuleActionProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/ServerActionProvider.java
Log:
JBIDE-3087 Add an action to the server entry in the Servers view to open the deploy folder using the default OS file explorer
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/icons/actions/xpl/explore.gif
===================================================================
(Binary files differ)
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/icons/actions/xpl/explore.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/JBossServerUISharedImages.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/JBossServerUISharedImages.java 2008-12-13 16:24:13 UTC (rev 12584)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/JBossServerUISharedImages.java 2008-12-13 21:54:26 UTC (rev 12585)
@@ -52,6 +52,7 @@
public static final String PUBLISH_IMAGE = "PUBLISH_IMAGE";
public static final String UNPUBLISH_IMAGE = "UNPUBLISH_IMAGE";
public static final String JMX_IMAGE = "JMX_IMAGE";
+ public static final String EXPLORE_IMAGE = "EXPLORE_IMAGE";
private static JBossServerUISharedImages instance;
@@ -76,6 +77,7 @@
descriptors.put(PUBLISH_IMAGE, createImageDescriptor(pluginBundle, "/icons/publish.gif"));
descriptors.put(UNPUBLISH_IMAGE, createImageDescriptor(pluginBundle, "/icons/unpublish.gif"));
descriptors.put(JMX_IMAGE, createImageDescriptor(pluginBundle, "/icons/jmeth_obj.gif"));
+ descriptors.put(EXPLORE_IMAGE, createImageDescriptor(pluginBundle, "/icons/actions/xpl/explore.gif"));
Iterator<String> iter = descriptors.keySet().iterator();
while (iter.hasNext()) {
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ExploreAction.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ExploreAction.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ExploreAction.java 2008-12-13 21:54:26 UTC (rev 12585)
@@ -0,0 +1,56 @@
+/*************************************************************************************
+ * Copyright (c) 2008 JBoss, a division of Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * JBoss, a division of Red Hat - Initial implementation.
+ ************************************************************************************/
+package org.jboss.ide.eclipse.as.ui.actions;
+
+import java.io.IOException;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.ui.internal.view.servers.AbstractServerAction;
+import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
+import org.jboss.ide.eclipse.as.ui.JBossServerUISharedImages;
+
+/**
+ * @author snjeza
+ *
+ */
+
+public class ExploreAction extends AbstractServerAction {
+
+ public ExploreAction(Shell shell, ISelectionProvider selectionProvider) {
+ super(shell, selectionProvider, ExploreUtils.EXPLORE);
+ setToolTipText(ExploreUtils.EXPLORE_DESCRIPTION);
+ setImageDescriptor(JBossServerUISharedImages.getImageDescriptor(JBossServerUISharedImages.EXPLORE_IMAGE));
+ try {
+ selectionChanged((IStructuredSelection) selectionProvider
+ .getSelection());
+ } catch (Exception ignore) {
+ }
+ }
+
+ @Override
+ public void perform(IServer server) {
+ String deployDirectory = ExploreUtils.getDeployDirectory(server);
+ if (deployDirectory != null && deployDirectory.length() > 0) {
+ ExploreUtils.explore(deployDirectory);
+ }
+
+ }
+
+ @Override
+ public boolean accept(IServer server) {
+ return ExploreUtils.canExplore(server);
+ }
+
+}
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ExploreUtils.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ExploreUtils.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ExploreUtils.java 2008-12-13 21:54:26 UTC (rev 12585)
@@ -0,0 +1,145 @@
+/*************************************************************************************
+ * Copyright (c) 2008 JBoss, a division of Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * JBoss, a division of Red Hat - Initial implementation.
+ ************************************************************************************/
+package org.jboss.ide.eclipse.as.ui.actions;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.IServerWorkingCopy;
+import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.server.internal.ServerAttributeHelper;
+import org.jboss.ide.eclipse.as.core.util.ServerConverter;
+import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
+
+/**
+ * @author snjeza
+ *
+ */
+
+public class ExploreUtils {
+
+ public final static String PATH = "{%}";
+ public final static String EXPLORE = "Explore";
+ public final static String EXPLORE_DESCRIPTION = "Explore deploy directory";
+ private static String exploreFolderCommand;
+ private static String exploreFileCommand;
+
+ public static String getExploreCommand() {
+ if (exploreFolderCommand == null) {
+ setExploreCommands();
+ }
+ return exploreFolderCommand;
+ }
+
+ public static String getExploreFileCommand() {
+ if (exploreFileCommand == null) {
+ setExploreCommands();
+ }
+ return exploreFileCommand;
+ }
+
+ private static void setExploreCommands() {
+ if (Platform.OS_MACOSX.equals(Platform.getOS())) {
+ exploreFolderCommand = "/usr/bin/open -a /System/Library/CoreServices/Finder.app \""
+ + PATH + "\"";
+ exploreFileCommand = exploreFolderCommand;
+ } else if (Platform.OS_WIN32.equals(Platform.getOS())) {
+ exploreFolderCommand = "cmd /C start explorer /root,/e,\""
+ + PATH + "\"";
+ exploreFileCommand = "cmd /C start explorer /select,/e,\""
+ + PATH + "\"";
+ } else if (Platform.OS_LINUX.equals(Platform.getOS())) {
+ if (new File("/usr/bin/nautilus").exists()) {
+ exploreFolderCommand = "/usr/bin/nautilus \"" + PATH + "\"";
+ } else if (new File("/usr/bin/konqueror").exists()) {
+ exploreFolderCommand = "/usr/bin/konqueror \"" + PATH
+ + "\"";
+ }
+ exploreFileCommand = exploreFolderCommand;
+ }
+ }
+
+ public static String getDeployDirectory(IServer server) {
+ IDeployableServer deployableServer = ServerConverter.getDeployableServer(server);
+ if (deployableServer != null) {
+ return deployableServer.getDeployFolder();
+ }
+ IServerWorkingCopy swc = server.createWorkingCopy();
+ ServerAttributeHelper helper = new ServerAttributeHelper(swc
+ .getOriginal(), swc);
+ String deployDirectory = helper.getAttribute(
+ IDeployableServer.DEPLOY_DIRECTORY, "");
+ return deployDirectory.trim();
+ }
+
+ public static boolean canExplore(IServer server) {
+ String deployDirectory = ExploreUtils.getDeployDirectory(server);
+ if (deployDirectory == null || deployDirectory.length() <= 0) {
+ return false;
+ }
+ if (ExploreUtils.getExploreCommand() == null) {
+ return false;
+ }
+ return true;
+ }
+
+ public static void explore(String name) {
+ File file = new File(name);
+ String command = null;
+ if (file.isFile()) {
+ command = getExploreFileCommand();
+ } else {
+ command = getExploreCommand();
+ }
+ if (command != null) {
+ if (Platform.getOS().equals(Platform.OS_WIN32)) {
+ name = name.replace('/', '\\');
+ }
+ command = command.replace(ExploreUtils.PATH, name);
+ try {
+ Runtime.getRuntime().exec(command);
+ } catch (IOException e) {
+ JBossServerUIPlugin.log(e.getMessage(),e);
+ }
+ }
+ }
+
+ public static IPath getDeployPath(IDeployableServer server,IModule[] moduleTree) {
+ IPath root = new Path( server.getDeployFolder() );
+ String type, name;
+ for( int i = 0; i < moduleTree.length; i++ ) {
+ type = moduleTree[i].getModuleType().getId();
+ name = moduleTree[i].getName();
+ if( new Path(name).segmentCount() > 1 )
+ // we strongly suspect this is a binary object and not a project
+ return root.append(new Path(name).lastSegment());
+ if( "jst.ear".equals(type))
+ root = root.append(name + ".ear");
+ else if( "jst.web".equals(type))
+ root = root.append(name + ".war");
+ else if( "jst.utility".equals(type) && i >= 1 && "jst.web".equals(moduleTree[i-1].getModuleType().getId()))
+ root = root.append("WEB-INF").append("lib").append(name + ".jar");
+ else if( "jst.connector".equals(type)) {
+ root = root.append(name + ".rar");
+ } else if( "jst.jboss.esb".equals(type)){
+ root = root.append(name + ".esb");
+ }else
+ root = root.append(name + ".jar");
+ }
+ return root;
+ }
+
+}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ModuleActionProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ModuleActionProvider.java 2008-12-13 16:24:13 UTC (rev 12584)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ModuleActionProvider.java 2008-12-13 21:54:26 UTC (rev 12585)
@@ -1,10 +1,13 @@
package org.jboss.ide.eclipse.as.ui.views.server.extensions;
+import java.io.File;
import java.util.ArrayList;
import java.util.Iterator;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.dialogs.MessageDialog;
@@ -21,12 +24,21 @@
import org.eclipse.wst.server.core.internal.PublishServerJob;
import org.eclipse.wst.server.core.internal.Server;
import org.eclipse.wst.server.ui.internal.view.servers.ModuleServer;
+import org.jboss.ide.eclipse.as.core.ExtensionManager;
+import org.jboss.ide.eclipse.as.core.modules.SingleDeployableFactory.SingleDeployableModuleDelegate;
+import org.jboss.ide.eclipse.as.core.publishers.JstPublisher;
+import org.jboss.ide.eclipse.as.core.publishers.SingleFilePublisher;
+import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerPublisher;
import org.jboss.ide.eclipse.as.core.util.ModuleUtil;
+import org.jboss.ide.eclipse.as.core.util.ServerConverter;
import org.jboss.ide.eclipse.as.ui.JBossServerUISharedImages;
import org.jboss.ide.eclipse.as.ui.Messages;
+import org.jboss.ide.eclipse.as.ui.actions.ExploreUtils;
public class ModuleActionProvider extends CommonActionProvider {
private Action deleteModuleAction, fullPublishModuleAction, incrementalPublishModuleAction;
+ private Action exploreAction;
private ModuleServer[] selection;
private ICommonActionExtensionSite actionSite;
@@ -57,6 +69,15 @@
menu.add(deleteModuleAction);
menu.add(fullPublishModuleAction);
menu.add(incrementalPublishModuleAction);
+ if (selection.size() == 1) {
+ ModuleServer moduleServer = (ModuleServer) selection.getFirstElement();
+ IServer server = moduleServer.getServer();
+ if (ExploreUtils.canExplore(server)) {
+ if (getDeployPath() != null) {
+ menu.add(exploreAction);
+ }
+ }
+ }
}
}
@@ -100,6 +121,20 @@
incrementalPublishModuleAction.setDescription(Messages.PublishModuleDescription);
incrementalPublishModuleAction.setImageDescriptor(JBossServerUISharedImages.getImageDescriptor(JBossServerUISharedImages.PUBLISH_IMAGE));
+ exploreAction = new Action() {
+ public void run() {
+ IPath path = getDeployPath();
+ if (path != null) {
+ File file = path.toFile();
+ if (file.exists()) {
+ ExploreUtils.explore(file.getAbsolutePath());
+ }
+ }
+ }
+ };
+ exploreAction.setText(ExploreUtils.EXPLORE);
+ exploreAction.setDescription(ExploreUtils.EXPLORE_DESCRIPTION);
+ exploreAction.setImageDescriptor(JBossServerUISharedImages.getImageDescriptor(JBossServerUISharedImages.EXPLORE_IMAGE));
}
protected void actionPublish(int type) {
@@ -144,4 +179,32 @@
t.start();
}
}
+
+ private IPath getDeployPath() {
+ ModuleServer ms = selection[0];
+ IModule[] module = ms.module;
+ IJBossServerPublisher publisher = ExtensionManager.getDefault()
+ .getPublisher(ms.getServer(), module);
+ IPath path = null;
+ IDeployableServer deployableServer = ServerConverter
+ .getDeployableServer(ms.server);
+ if (deployableServer != null) {
+ if (publisher instanceof JstPublisher) {
+ path = ExploreUtils.getDeployPath(deployableServer,
+ module);
+ } else if (publisher instanceof SingleFilePublisher) {
+ SingleDeployableModuleDelegate delegate = (SingleDeployableModuleDelegate)module[0].loadAdapter(SingleDeployableModuleDelegate.class, new NullProgressMonitor());
+ if (delegate != null) {
+ IPath sourcePath = delegate.getGlobalSourcePath();
+ IPath destFolder = new Path(deployableServer.getDeployFolder());
+ path = destFolder.append(sourcePath.lastSegment());
+ } else {
+ path = new Path(deployableServer.getDeployFolder());
+ }
+ } else {
+ path = new Path(deployableServer.getDeployFolder());
+ }
+ }
+ return path;
+ }
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/ServerActionProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/ServerActionProvider.java 2008-12-13 16:24:13 UTC (rev 12584)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/ServerActionProvider.java 2008-12-13 21:54:26 UTC (rev 12585)
@@ -57,6 +57,7 @@
import org.eclipse.wst.server.ui.internal.view.servers.StartModuleAction;
import org.eclipse.wst.server.ui.internal.view.servers.StopAction;
import org.eclipse.wst.server.ui.internal.view.servers.StopModuleAction;
+import org.jboss.ide.eclipse.as.ui.actions.ExploreAction;
public class ServerActionProvider extends CommonActionProvider {
private ICommonActionExtensionSite actionSite;
@@ -111,7 +112,7 @@
clipboard = new Clipboard(tableViewer.getTree().getDisplay());
Shell shell = tableViewer.getTree().getShell();
- actions = new Action[6];
+ actions = new Action[7];
// create the start actions
actions[0] = new StartAction(shell, provider, ILaunchManager.DEBUG_MODE);
actions[1] = new StartAction(shell, provider, ILaunchManager.RUN_MODE);
@@ -123,6 +124,7 @@
// create the publish actions
actions[4] = new PublishAction(shell, provider);
actions[5] = new PublishCleanAction(shell, provider);
+ actions[6] = new ExploreAction(shell,provider);
// create the open action
openAction = new OpenAction(provider);
17 years, 4 months
JBoss Tools SVN: r12584 - in trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4: icons/large and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2008-12-13 11:24:13 -0500 (Sat, 13 Dec 2008)
New Revision: 12584
Added:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/large/gateway_parallel.png
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/figure/ParallelGatewayFigure.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/ParallelForkGateway.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/ParallelJoinGateway.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
Log:
added support for join and fork (parallel gateway)
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/large/gateway_parallel.png
===================================================================
(Binary files differ)
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/large/gateway_parallel.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml 2008-12-13 01:33:21 UTC (rev 12583)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml 2008-12-13 16:24:13 UTC (rev 12584)
@@ -93,6 +93,22 @@
</node>
</element>
<element
+ class="org.jboss.tools.flow.jpdl4.model.ParallelForkGateway"
+ id="org.jboss.tools.flow.jpdl4.parallelForkGateway"
+ language="org.jboss.tools.flow.jpdl4">
+ <node>
+ <figure class="org.jboss.tools.flow.jpdl4.figure.ParallelGatewayFigure"></figure>
+ </node>
+ </element>
+ <element
+ class="org.jboss.tools.flow.jpdl4.model.ParallelJoinGateway"
+ id="org.jboss.tools.flow.jpdl4.parallelJoinGateway"
+ language="org.jboss.tools.flow.jpdl4">
+ <node>
+ <figure class="org.jboss.tools.flow.jpdl4.figure.ParallelGatewayFigure"></figure>
+ </node>
+ </element>
+ <element
class="org.jboss.tools.flow.jpdl4.model.SequenceFlow"
figure="icons/sequence.gif"
id="org.jboss.tools.flow.jpdl4.sequenceFlow"
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 2008-12-13 01:33:21 UTC (rev 12583)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlDeserializer.java 2008-12-13 16:24:13 UTC (rev 12584)
@@ -118,6 +118,10 @@
result = (NodeWrapper)ElementRegistry.createWrapper("org.jboss.tools.flow.jpdl4.endEvent");
} else if ("exclusive".equals(child.getNodeName())) {
result = (NodeWrapper)ElementRegistry.createWrapper("org.jboss.tools.flow.jpdl4.exclusiveGateway");
+ } else if ("join".equals(child.getNodeName())) {
+ result = (NodeWrapper)ElementRegistry.createWrapper("org.jboss.tools.flow.jpdl4.parallelJoinGateway");
+ } else if ("fork".equals(child.getNodeName())) {
+ result = (NodeWrapper)ElementRegistry.createWrapper("org.jboss.tools.flow.jpdl4.parallelForkGateway");
}
if (result != null) {
wrapper.addElement(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 2008-12-13 01:33:21 UTC (rev 12583)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java 2008-12-13 16:24:13 UTC (rev 12584)
@@ -15,6 +15,8 @@
import org.jboss.tools.flow.common.wrapper.Wrapper;
import org.jboss.tools.flow.jpdl4.model.EndEvent;
import org.jboss.tools.flow.jpdl4.model.ExclusiveGateway;
+import org.jboss.tools.flow.jpdl4.model.ParallelForkGateway;
+import org.jboss.tools.flow.jpdl4.model.ParallelJoinGateway;
import org.jboss.tools.flow.jpdl4.model.Process;
import org.jboss.tools.flow.jpdl4.model.StartEvent;
import org.jboss.tools.flow.jpdl4.model.StateTask;
@@ -114,6 +116,30 @@
}
appendNodeGraphics(buffer, (NodeWrapper)wrapper);
buffer.append(">");
+ } else if (element instanceof ParallelForkGateway) {
+ ParallelForkGateway parallelForkGateway = (ParallelForkGateway)element;
+ buffer.append("\n");
+ appendPadding(buffer, level);
+ buffer.append("<fork");
+ if (parallelForkGateway.getName() != null) {
+ buffer.append(" ");
+ String value = parallelForkGateway.getName();
+ buffer.append("name=\"" + value + "\"");
+ }
+ appendNodeGraphics(buffer, (NodeWrapper)wrapper);
+ buffer.append(">");
+ } else if (element instanceof ParallelJoinGateway) {
+ ParallelJoinGateway parallelJoinGateway = (ParallelJoinGateway)element;
+ buffer.append("\n");
+ appendPadding(buffer, level);
+ buffer.append("<join");
+ if (parallelJoinGateway.getName() != null) {
+ buffer.append(" ");
+ String value = parallelJoinGateway.getName();
+ buffer.append("name=\"" + value + "\"");
+ }
+ appendNodeGraphics(buffer, (NodeWrapper)wrapper);
+ buffer.append(">");
} else if (element instanceof Process) {
Process process = (Process)element;
buffer.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n");
@@ -167,6 +193,14 @@
buffer.append("\n");
appendPadding(buffer, level);
buffer.append("</exclusive>");
+ } else if (element instanceof ParallelForkGateway) {
+ buffer.append("\n");
+ appendPadding(buffer, level);
+ buffer.append("</fork>");
+ } else if (element instanceof ParallelJoinGateway) {
+ buffer.append("\n");
+ appendPadding(buffer, level);
+ buffer.append("</join>");
} else if (element instanceof Process) {
buffer.append("\n");
appendPadding(buffer, level);
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/figure/ParallelGatewayFigure.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/figure/ParallelGatewayFigure.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/figure/ParallelGatewayFigure.java 2008-12-13 16:24:13 UTC (rev 12584)
@@ -0,0 +1,30 @@
+package org.jboss.tools.flow.jpdl4.figure;
+
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.jboss.tools.flow.common.figure.AbstractElementFigure;
+import org.jboss.tools.flow.jpdl4.Activator;
+
+public class ParallelGatewayFigure extends AbstractElementFigure { //DiamondElementFigure {
+
+ private static final Image ICON = ImageDescriptor.createFromURL(
+ Activator.getDefault().getBundle().getEntry(
+ "icons/large/gateway_parallel.png")).createImage();
+
+ public ParallelGatewayFigure() {
+ setSize(32, 32);
+ }
+
+ public void setText(String text) {
+ }
+
+ public void setBounds(Rectangle r) {
+ r.setSize(32, 32);
+ super.setBounds(r);
+ }
+
+ protected void customizeFigure() {
+ setIcon(ICON);
+ }
+}
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/ParallelForkGateway.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/ParallelForkGateway.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/ParallelForkGateway.java 2008-12-13 16:24:13 UTC (rev 12584)
@@ -0,0 +1,7 @@
+package org.jboss.tools.flow.jpdl4.model;
+
+import org.jboss.tools.flow.common.model.DefaultNode;
+
+public class ParallelForkGateway extends DefaultNode {
+
+}
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/ParallelJoinGateway.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/ParallelJoinGateway.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/ParallelJoinGateway.java 2008-12-13 16:24:13 UTC (rev 12584)
@@ -0,0 +1,7 @@
+package org.jboss.tools.flow.jpdl4.model;
+
+import org.jboss.tools.flow.common.model.DefaultNode;
+
+public class ParallelJoinGateway extends DefaultNode {
+
+}
17 years, 4 months
JBoss Tools SVN: r12583 - in trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4: icons/large and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2008-12-12 20:33:21 -0500 (Fri, 12 Dec 2008)
New Revision: 12583
Added:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/large/
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/large/end_event_empty.png
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/large/end_event_terminate.png
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/large/gateway_exclusive.png
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/large/start_event_empty.png
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/small/
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/small/end_event_empty.png
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/small/end_event_terminate.png
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/small/flow_sequence.png
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/small/gateway_exclusive.png
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/small/gateway_parallel.png
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/small/start_event_empty.png
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/small/task_empty.png
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/figure/EventFigure.java
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlPaletteFactory.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/figure/EndEventFigure.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/figure/ExclusiveGatewayFigure.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/figure/StartEventFigure.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/wizard/NewJpdl4FileWizard.java
Log:
add bpmn figures in palette and graph
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/large/end_event_empty.png
===================================================================
(Binary files differ)
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/large/end_event_empty.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/large/end_event_terminate.png
===================================================================
(Binary files differ)
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/large/end_event_terminate.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/large/gateway_exclusive.png
===================================================================
(Binary files differ)
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/large/gateway_exclusive.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/large/start_event_empty.png
===================================================================
(Binary files differ)
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/large/start_event_empty.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/small/end_event_empty.png
===================================================================
(Binary files differ)
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/small/end_event_empty.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/small/end_event_terminate.png
===================================================================
(Binary files differ)
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/small/end_event_terminate.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/small/flow_sequence.png
===================================================================
(Binary files differ)
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/small/flow_sequence.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/small/gateway_exclusive.png
===================================================================
(Binary files differ)
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/small/gateway_exclusive.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/small/gateway_parallel.png
===================================================================
(Binary files differ)
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/small/gateway_parallel.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/small/start_event_empty.png
===================================================================
(Binary files differ)
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/small/start_event_empty.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/small/task_empty.png
===================================================================
(Binary files differ)
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/small/task_empty.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlPaletteFactory.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlPaletteFactory.java 2008-12-12 23:07:11 UTC (rev 12582)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlPaletteFactory.java 2008-12-13 01:33:21 UTC (rev 12583)
@@ -8,7 +8,6 @@
import org.eclipse.gef.palette.PaletteContainer;
import org.eclipse.gef.palette.PaletteDrawer;
import org.eclipse.gef.palette.PaletteEntry;
-import org.eclipse.gef.palette.PaletteRoot;
import org.eclipse.gef.palette.ToolEntry;
import org.eclipse.jface.resource.ImageDescriptor;
import org.jboss.tools.flow.common.editor.PaletteFactory;
@@ -17,16 +16,25 @@
public class JpdlPaletteFactory extends PaletteFactory {
- protected List<PaletteContainer> createCategories(PaletteRoot root) {
- List<PaletteContainer> categories = new ArrayList<PaletteContainer>();
- categories.add(createControlGroup(root));
- categories.add(createEventsDrawer());
- categories.add(createTasksDrawer());
- categories.add(createGatewayDrawer());
- categories.add(createFlowDrawer());
- return categories;
+// protected List<PaletteContainer> createCategories(PaletteRoot root) {
+// List<PaletteContainer> categories = new ArrayList<PaletteContainer>();
+// categories.add(createControlGroup(root));
+// categories.add(createEventsDrawer());
+// categories.add(createTasksDrawer());
+// categories.add(createGatewayDrawer());
+// categories.add(createFlowDrawer());
+// return categories;
+// }
+
+ protected List<PaletteEntry> createComponentEntries() {
+ ArrayList<PaletteEntry> componentEntries = new ArrayList<PaletteEntry>();
+ componentEntries.addAll(createFlowEntries());
+ componentEntries.addAll(createEventEntries());
+ componentEntries.addAll(createTaskEntries());
+ componentEntries.addAll(createGatewayEntries());
+ return componentEntries;
}
-
+
protected PaletteContainer createEventsDrawer() {
PaletteDrawer drawer = new PaletteDrawer("Events", null);
List<PaletteEntry> entries = createEventEntries();
@@ -62,8 +70,8 @@
"Create a new Start Event",
"org.jboss.tools.flow.jpdl4.startEvent",
ElementRegistry.getCreationFactory("org.jboss.tools.flow.jpdl4.startEvent"),
- ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/start.gif")),
- ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/start.gif"))
+ ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/small/start_event_empty.png")),
+ ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/small/start_event_empty.png"))
);
entries.add(combined);
combined = new CombinedTemplateCreationEntry(
@@ -71,8 +79,8 @@
"Create a new End Event",
"org.jboss.tools.flow.jpdl4.endEvent",
ElementRegistry.getCreationFactory("org.jboss.tools.flow.jpdl4.endEvent"),
- ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/end.gif")),
- ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/end.gif"))
+ ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/small/end_event_terminate.png")),
+ ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/small/end_event_terminate.png"))
);
entries.add(combined);
return entries;
@@ -85,8 +93,8 @@
"Create a new Wait State Task",
"org.jboss.tools.flow.jpdl4.stateTask",
ElementRegistry.getCreationFactory("org.jboss.tools.flow.jpdl4.stateTask"),
- ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/state.gif")),
- ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/state.gif"))
+ ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/small/task_empty.png")),
+ ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/small/task_empty.png"))
);
entries.add(combined);
return entries;
@@ -99,10 +107,28 @@
"Create a new Exclusive Gateway",
"org.jboss.tools.flow.jpdl4.exclusiveGateway",
ElementRegistry.getCreationFactory("org.jboss.tools.flow.jpdl4.exclusiveGateway"),
- ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/exclusive.gif")),
- ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/exclusive.gif"))
+ ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/small/gateway_exclusive.png")),
+ ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/small/gateway_exclusive.png"))
);
entries.add(combined);
+ combined = new CombinedTemplateCreationEntry(
+ "Parallel Fork",
+ "Create a new Parallel Fork Gateway",
+ "org.jboss.tools.flow.jpdl4.parallelForkGateway",
+ ElementRegistry.getCreationFactory("org.jboss.tools.flow.jpdl4.parallelForkGateway"),
+ ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/small/gateway_parallel.png")),
+ ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/small/gateway_parallel.png"))
+ );
+ entries.add(combined);
+ combined = new CombinedTemplateCreationEntry(
+ "Parallel Join",
+ "Create a new Parallel Join Gateway",
+ "org.jboss.tools.flow.jpdl4.parallelJoinGateway",
+ ElementRegistry.getCreationFactory("org.jboss.tools.flow.jpdl4.parallelJoinGateway"),
+ ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/small/gateway_parallel.png")),
+ ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/small/gateway_parallel.png"))
+ );
+ entries.add(combined);
return entries;
}
@@ -112,8 +138,8 @@
"Sequence",
"Creating a new Sequence Flow",
ElementRegistry.getCreationFactory("org.jboss.tools.flow.jpdl4.sequenceFlow"),
- ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/sequence.gif")),
- ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/sequence.gif"))
+ ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/small/flow_sequence.png")),
+ ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/small/flow_sequence.png"))
);
entries.add(tool);
return entries;
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/figure/EndEventFigure.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/figure/EndEventFigure.java 2008-12-12 23:07:11 UTC (rev 12582)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/figure/EndEventFigure.java 2008-12-13 01:33:21 UTC (rev 12583)
@@ -1,12 +1,42 @@
package org.jboss.tools.flow.jpdl4.figure;
-import org.jboss.tools.flow.common.figure.EllipseElementFigure;
+import org.eclipse.draw2d.LineBorder;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.jboss.tools.flow.common.figure.AbstractElementFigure;
+import org.jboss.tools.flow.jpdl4.Activator;
-public class EndEventFigure extends EllipseElementFigure {
-
- protected void customizeFigure() {
- super.customizeFigure();
- ellipse.setLineWidth(5);
- }
-
+public class EndEventFigure extends AbstractElementFigure { //EventFigure {
+
+ private static final Image icon = ImageDescriptor.createFromURL(
+ Activator.getDefault().getBundle().getEntry(
+ "icons/large/end_event_terminate.png")).createImage();
+
+ public EndEventFigure() {
+ setSize(32, 32);
+ }
+
+ public void setText(String text) {
+ }
+
+ public void setBounds(Rectangle r) {
+ r.setSize(32, 32);
+ super.setBounds(r);
+ }
+
+ protected void customizeFigure() {
+ setIcon(icon);
+ }
+
+ public void setSelected(boolean b) {
+ super.setSelected(b);
+ ((LineBorder) getBorder()).setWidth(b ? 3 : 0);
+ repaint();
+ }
+ // protected void customizeFigure() {
+ // super.customizeFigure();
+ // ellipse.setLineWidth(5);
+ // }
+
}
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/figure/EventFigure.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/figure/EventFigure.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/figure/EventFigure.java 2008-12-13 01:33:21 UTC (rev 12583)
@@ -0,0 +1,7 @@
+package org.jboss.tools.flow.jpdl4.figure;
+
+import org.jboss.tools.flow.common.figure.EllipseElementFigure;
+
+public class EventFigure extends EllipseElementFigure {
+
+}
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/figure/ExclusiveGatewayFigure.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/figure/ExclusiveGatewayFigure.java 2008-12-12 23:07:11 UTC (rev 12582)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/figure/ExclusiveGatewayFigure.java 2008-12-13 01:33:21 UTC (rev 12583)
@@ -1,7 +1,30 @@
package org.jboss.tools.flow.jpdl4.figure;
-import org.jboss.tools.flow.common.figure.DiamondElementFigure;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.jboss.tools.flow.common.figure.AbstractElementFigure;
+import org.jboss.tools.flow.jpdl4.Activator;
-public class ExclusiveGatewayFigure extends DiamondElementFigure {
+public class ExclusiveGatewayFigure extends AbstractElementFigure { //DiamondElementFigure {
+ private static final Image ICON = ImageDescriptor.createFromURL(
+ Activator.getDefault().getBundle().getEntry(
+ "icons/large/gateway_exclusive.png")).createImage();
+
+ public ExclusiveGatewayFigure() {
+ setSize(32, 32);
+ }
+
+ public void setText(String text) {
+ }
+
+ public void setBounds(Rectangle r) {
+ r.setSize(32, 32);
+ super.setBounds(r);
+ }
+
+ protected void customizeFigure() {
+ setIcon(ICON);
+ }
}
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/figure/StartEventFigure.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/figure/StartEventFigure.java 2008-12-12 23:07:11 UTC (rev 12582)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/figure/StartEventFigure.java 2008-12-13 01:33:21 UTC (rev 12583)
@@ -1,7 +1,39 @@
package org.jboss.tools.flow.jpdl4.figure;
-import org.jboss.tools.flow.common.figure.EllipseElementFigure;
+import org.eclipse.draw2d.LineBorder;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.jboss.tools.flow.common.figure.AbstractElementFigure;
+import org.jboss.tools.flow.jpdl4.Activator;
-public class StartEventFigure extends EllipseElementFigure {
+public class StartEventFigure extends AbstractElementFigure { // EventFigure {
+
+ private static final Image icon = ImageDescriptor.createFromURL(
+ Activator.getDefault().getBundle().getEntry("icons/large/start_event_empty.png")).createImage();;
+
+ public StartEventFigure() {
+ setSize(32, 32);
+ }
+
+ public void setText(String text) {
+ }
+
+ public void setBounds(Rectangle r) {
+ r.setSize(32, 32);
+ super.setBounds(r);
+ }
+
+ protected void customizeFigure() {
+ setIcon(icon);
+ }
+
+ public void setSelected(boolean b) {
+ super.setSelected(b);
+ ((LineBorder) getBorder()).setWidth(b ? 3 : 1);
+ repaint();
+ }
+
}
+
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/wizard/NewJpdl4FileWizard.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/wizard/NewJpdl4FileWizard.java 2008-12-12 23:07:11 UTC (rev 12582)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/wizard/NewJpdl4FileWizard.java 2008-12-13 01:33:21 UTC (rev 12583)
@@ -10,10 +10,8 @@
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.ide.IDE;
-import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard;
import org.jboss.tools.flow.jpdl4.Logger;
-import org.jboss.tools.flow.jpdl4.editor.JpdlEditor;
public class NewJpdl4FileWizard extends Wizard implements IWorkbenchWizard {
17 years, 4 months
JBoss Tools SVN: r12582 - trunk/jmx/tests/org.jboss.tools.jmx.core.test/META-INF.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-12-12 18:07:11 -0500 (Fri, 12 Dec 2008)
New Revision: 12582
Modified:
trunk/jmx/tests/org.jboss.tools.jmx.core.test/META-INF/MANIFEST.MF
Log:
fix jmx.core.test compilation errors
Modified: trunk/jmx/tests/org.jboss.tools.jmx.core.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jmx/tests/org.jboss.tools.jmx.core.test/META-INF/MANIFEST.MF 2008-12-12 22:37:53 UTC (rev 12581)
+++ trunk/jmx/tests/org.jboss.tools.jmx.core.test/META-INF/MANIFEST.MF 2008-12-12 23:07:11 UTC (rev 12582)
@@ -7,11 +7,11 @@
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Vendor: %BundleProvider
-Require-Bundle: org.junit4;bundle-version="4.3.1",
- org.eclipse.core.resources;bundle-version="3.4.0",
- org.eclipse.core.runtime;bundle-version="3.4.0",
- org.jboss.tools.jmx.core;bundle-version="0.2.1",
- org.eclipse.debug.core;bundle-version="3.4.0",
- org.eclipse.jdt.launching;bundle-version="3.4.0"
+Require-Bundle: org.junit,
+ org.eclipse.core.resources,
+ org.eclipse.core.runtime,
+ org.jboss.tools.jmx.core,
+ org.eclipse.debug.core,
+ org.eclipse.jdt.launching
Export-Package: org.jboss.tools.jmx.core.tests,
org.jboss.tools.jmx.core.tests.util
17 years, 4 months
JBoss Tools SVN: r12581 - in trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server: internal and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-12-12 17:37:53 -0500 (Fri, 12 Dec 2008)
New Revision: 12581
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBossServerRuntime.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossServerRuntime.java
Log:
JBIDE-3080 Created servers uses specific JDK instead default JDK
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBossServerRuntime.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBossServerRuntime.java 2008-12-12 22:37:47 UTC (rev 12580)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBossServerRuntime.java 2008-12-12 22:37:53 UTC (rev 12581)
@@ -46,4 +46,5 @@
public String getDefaultRunArgs();
public String getDefaultRunVMArgs();
public HashMap<String, String> getDefaultRunEnvVars();
+ public boolean isUsingDefaultJRE();
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossServerRuntime.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossServerRuntime.java 2008-12-12 22:37:47 UTC (rev 12580)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossServerRuntime.java 2008-12-12 22:37:53 UTC (rev 12581)
@@ -77,6 +77,9 @@
}
public IVMInstall getVM() {
+ if (getVMInstallTypeId() == null) {
+ return JavaRuntime.getDefaultVMInstall();
+ }
String id = getAttribute(PROPERTY_VM_ID, (String)null);
String type = getAttribute(PROPERTY_VM_TYPE_ID, (String)null);
@@ -93,12 +96,14 @@
}
public void setVM(IVMInstall selectedVM) {
- if( selectedVM == null )
- selectedVM = JavaRuntime.getDefaultVMInstall();
-
- setAttribute(IJBossServerRuntime.PROPERTY_VM_ID, selectedVM.getId());
- setAttribute(IJBossServerRuntime.PROPERTY_VM_TYPE_ID, selectedVM
- .getVMInstallType().getId());
+ if (selectedVM == null) {
+ setAttribute(IJBossServerRuntime.PROPERTY_VM_ID, (String) null);
+ setAttribute(IJBossServerRuntime.PROPERTY_VM_TYPE_ID, (String) null);
+ } else {
+ setAttribute(IJBossServerRuntime.PROPERTY_VM_ID, selectedVM.getId());
+ setAttribute(IJBossServerRuntime.PROPERTY_VM_TYPE_ID, selectedVM
+ .getVMInstallType().getId());
+ }
}
public String getJBossConfiguration() {
@@ -135,4 +140,12 @@
envVars.put("Path", "native");
return envVars;
}
+
+ public boolean isUsingDefaultJRE() {
+ return getVMInstallTypeId() == null;
+ }
+
+ protected String getVMInstallTypeId() {
+ return getAttribute(PROPERTY_VM_TYPE_ID, (String)null);
+ }
}
17 years, 4 months