diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2011-08-10 08:50:20 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2011-08-10 08:50:20 +0000 |
commit | 22870cb9ae701690e712fe6e648cdd463cf532cb (patch) | |
tree | 4394c37c48b96b8a4748b8408feb044b43b07937 /collaboration | |
parent | 8b11d455da750618fec1f0b387ca7d5a94c638c7 (diff) |
Add the option to draw the virtual domain composite
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1156073 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'collaboration')
-rw-r--r-- | collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/org/apache/tuscany/sca/diagram/shell/DrawShellCommand.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/org/apache/tuscany/sca/diagram/shell/DrawShellCommand.java b/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/org/apache/tuscany/sca/diagram/shell/DrawShellCommand.java index 7124525c92..2be3d1dedb 100644 --- a/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/org/apache/tuscany/sca/diagram/shell/DrawShellCommand.java +++ b/collaboration/GSoC-2011-Nirmal/CompositeDiagramShellPlugin/src/main/java/org/apache/tuscany/sca/diagram/shell/DrawShellCommand.java @@ -45,7 +45,7 @@ public class DrawShellCommand implements Command { }
public String getShortHelp() {
- return "draw <contributionURI> <compositeURI>";
+ return "draw [DOMAIN | <contributionURI> <compositeURI>]";
}
public String getHelp() {
@@ -53,6 +53,7 @@ public class DrawShellCommand implements Command { helpText.append("Draws a picture of the composite.\n");
helpText.append("\n");
helpText.append("Arguments:\n");
+ helpText.append(" DOMAIN - When the only argument is DOMAIN display the domain composite, otherwise:\n");
helpText.append(" contributionURI - (required) the URI of the installed contribution\n");
helpText.append(" compositeURL - (required) the URI of a started composite\n");
return helpText.toString();
@@ -60,7 +61,12 @@ public class DrawShellCommand implements Command { public boolean invoke(String[] args) throws Exception {
- Composite composite = shell.getNode().getContribution(args[0]).getArtifactModel(args[1]);
+ Composite composite;
+ if ("DOMAIN".equals(args[0])) {
+ composite = shell.getNode().getDomainComposite();
+ } else {
+ composite = shell.getNode().getContribution(args[0]).getArtifactModel(args[1]);
+ }
TuscanyCompositeEntityBuilder eb = new TuscanyCompositeEntityBuilder(composite);
CompositeEntity comp = eb.buildCompositeEntity();
DiagramGenerator dg = new DiagramGenerator(comp);
|