[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[CASHeW-s-editor-patches] Solved all the bugs of the diagram presentatio
From: |
Xianfeng Liu |
Subject: |
[CASHeW-s-editor-patches] Solved all the bugs of the diagram presentation and the parser <Xianfeng Liu> |
Date: |
Thu, 14 Apr 2005 23:01:45 +0100 |
* solved the bug that it does not delete the connection of the node which has
been deleted.
* solved the bug that can not create connection from the last node of a saved
file to a new created node.
* solved the exceptions comes up while running the editor
* change the function EndDocument() in DiagramParser.java. Deleted all the old
method which uses a counter to match the corresponding source node and target
node of a connection.
- Xianfeng Liu address@hidden
Index: plugin.xml
===================================================================
RCS file: plugin.xml
diff -N plugin.xml
--- /tmp/cvsAAAaAaq7Q Thu Apr 14 22:51:20 2005
+++ /dev/null Thu Apr 14 22:24:38 2005
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<plugin id="nongnu.cashews.eclipse.composer"
- name="CASheW-s"
- version="0.0.0"
- provider-name="The CASheW-s Project"
- class="nongnu.cashews.eclipse.composer.Plugin">
-
- <runtime>
- <library name="composer.jar"/>
- </runtime>
- <requires>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.gef"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.ui.views"/>
- <import plugin="org.eclipse.jface"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.ui.workbench"/>
- <import plugin="org.eclipse.ui.cheatsheets"/>
- <import plugin="org.eclipse.ui.console"/>
- <import plugin="org.eclipse.ui.editors"/>
- <import plugin="org.eclipse.ui.externaltools"/>
- <import plugin="org.eclipse.ui.forms"/>
- <import plugin="org.eclipse.ui.ide"/>
- <import plugin="org.eclipse.ui.intro"/>
- </requires>
-
- <extension point="org.eclipse.ui.editors">
- <editor id="nongnu.cashews.eclipse.composer.editor"
- name="Cashews Editor"
- default="true"
- icon=""
- extensions="composer"
-
contributorClass="nongnu.cashews.eclipse.composer.actions.DiagramActionBarContributor"
- class="nongnu.cashews.eclipse.composer.ui.DiagramEditor">
- </editor>
- </extension>
-
- <extension point="org.eclipse.ui.newWizards">
- <category id="nongnu.cashews.eclipse.composer" name="Composer"/>
- <wizard id="nongnu.cashews.eclipse.composer.wizard.new.file"
- name="Composer Model"
- category="nongnu.cashews.eclipse.composer"
- class="nongnu.cashews.eclipse.composer.ui.DiagramCreationWizard">
- <description>Wizard for creating a new CASheW-s process
diagram.</description>
- <selection class="org.eclipse.core.resources.IResource">
- </selection>
- </wizard>
- </extension>
-
-</plugin>
\ No newline at end of file
Index: src/nongnu/cashews/eclipse/composer/commands/ConnectionCreateCommand.java
===================================================================
RCS file:
/share/darwin/darwin4/cvs/java/src/nongnu/cashews/eclipse/composer/commands/ConnectionCreateCommand.java,v
retrieving revision 1.5
diff -u -r1.5 ConnectionCreateCommand.java
--- src/nongnu/cashews/eclipse/composer/commands/ConnectionCreateCommand.java
2005/03/25 00:08:00 1.5
+++ src/nongnu/cashews/eclipse/composer/commands/ConnectionCreateCommand.java
2005/04/14 21:51:16
@@ -1,40 +1,41 @@
/* ConnectionCreateCommand.java -- Command for creating connections.
- Copyright (C) 2005 The University of Sheffield.
+ Copyright (C) 2005 The University of Sheffield.
-This file is part of the CASheW-s editor Eclipse plug-in.
+ This file is part of the CASheW-s editor Eclipse plug-in.
-The CASheW-s editor Eclipse plug-in is free software; you may copy, modify,
-and redistribute it under the terms of the GNU General Public License
-version 2 (or, at your option, any later version), and/or the Eclipse
-Public License version 1.0.
+ The CASheW-s editor Eclipse plug-in is free software; you may copy, modify,
+ and redistribute it under the terms of the GNU General Public License
+ version 2 (or, at your option, any later version), and/or the Eclipse
+ Public License version 1.0.
-The CASheW-s editor is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with The CASheW-s editor; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
-
-The University of Sheffield makes available all content in this plug-in
-("Content"). Unless otherwise indicated below, the Content is provided to
-you under the terms and conditions of the Eclipse Public License Version
-1.0 ("EPL"). A copy of the EPL is available at
-http://www.eclipse.org/legal/epl-v10.html. For purposes of the EPL,
-"Program" will mean the Content.
-
-If you did not receive this Content directly from the University of Sheffield,
-the Content is being redistributed by another party ("Redistributor") and
-different terms and conditions may apply to your use of any object code in
-the Content. Check the Redistributor's license that was provided with the
-Content. If no such license exists, contact the Redistributor. Unless
-otherwise indicated below, the terms and conditions of the EPL still apply
-to any source code in the Content.
+ The CASheW-s editor is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with The CASheW-s editor; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA.
+
+ The University of Sheffield makes available all content in this plug-in
+ ("Content"). Unless otherwise indicated below, the Content is provided to
+ you under the terms and conditions of the Eclipse Public License Version
+ 1.0 ("EPL"). A copy of the EPL is available at
+ http://www.eclipse.org/legal/epl-v10.html. For purposes of the EPL,
+ "Program" will mean the Content.
+
+ If you did not receive this Content directly from the University of Sheffield,
+ the Content is being redistributed by another party ("Redistributor") and
+ different terms and conditions may apply to your use of any object code in
+ the Content. Check the Redistributor's license that was provided with the
+ Content. If no such license exists, contact the Redistributor. Unless
+ otherwise indicated below, the terms and conditions of the EPL still apply
+ to any source code in the Content.
-*/
+ */
+
package nongnu.cashews.eclipse.composer.commands;
import java.util.List;
@@ -44,8 +45,7 @@
import org.eclipse.gef.commands.Command;
-public class ConnectionCreateCommand
- extends Command
+public class ConnectionCreateCommand extends Command
{
protected Connection connection;
@@ -82,14 +82,22 @@
public boolean canExecute()
{
if (source.equals(target))
- return false;
+ {
+ return false;
+ }
// Check for existence of connection already
- List connections = this.source.getOutgoingConnections();
- for (int i = 0; i < connections.size(); i++)
+ if (source.getOutgoingConnections() != null)
{
- if (((Connection) connections.get(i)).getTarget().equals(target))
- return false;
+ List connections = this.source.getOutgoingConnections();
+ if (connections.size() != 0)
+ {
+ for (int i = 0; i < connections.size(); i++)
+ {
+ if (((Connection)
connections.get(i)).getTarget().equals(target))
+ return false;
+ }
+ }
}
return true;
}
Index: src/nongnu/cashews/eclipse/composer/commands/DeleteNodeCommand.java
===================================================================
RCS file:
/share/darwin/darwin4/cvs/java/src/nongnu/cashews/eclipse/composer/commands/DeleteNodeCommand.java,v
retrieving revision 1.8
diff -u -r1.8 DeleteNodeCommand.java
--- src/nongnu/cashews/eclipse/composer/commands/DeleteNodeCommand.java
2005/04/11 21:02:44 1.8
+++ src/nongnu/cashews/eclipse/composer/commands/DeleteNodeCommand.java
2005/04/14 21:51:17
@@ -1,42 +1,45 @@
/* DeleteNodeCommand.java -- Command for deleting nodes.
- Copyright (C) 2005 The University of Sheffield.
+ Copyright (C) 2005 The University of Sheffield.
-This file is part of the CASheW-s editor Eclipse plug-in.
+ This file is part of the CASheW-s editor Eclipse plug-in.
-The CASheW-s editor Eclipse plug-in is free software; you may copy, modify,
-and redistribute it under the terms of the GNU General Public License
-version 2 (or, at your option, any later version), and/or the Eclipse
-Public License version 1.0.
+ The CASheW-s editor Eclipse plug-in is free software; you may copy, modify,
+ and redistribute it under the terms of the GNU General Public License
+ version 2 (or, at your option, any later version), and/or the Eclipse
+ Public License version 1.0.
-The CASheW-s editor is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with The CASheW-s editor; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
-
-The University of Sheffield makes available all content in this plug-in
-("Content"). Unless otherwise indicated below, the Content is provided to
-you under the terms and conditions of the Eclipse Public License Version
-1.0 ("EPL"). A copy of the EPL is available at
-http://www.eclipse.org/legal/epl-v10.html. For purposes of the EPL,
-"Program" will mean the Content.
-
-If you did not receive this Content directly from the University of Sheffield,
-the Content is being redistributed by another party ("Redistributor") and
-different terms and conditions may apply to your use of any object code in
-the Content. Check the Redistributor's license that was provided with the
-Content. If no such license exists, contact the Redistributor. Unless
-otherwise indicated below, the terms and conditions of the EPL still apply
-to any source code in the Content.
+ The CASheW-s editor is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with The CASheW-s editor; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA.
+
+ The University of Sheffield makes available all content in this plug-in
+ ("Content"). Unless otherwise indicated below, the Content is provided to
+ you under the terms and conditions of the Eclipse Public License Version
+ 1.0 ("EPL"). A copy of the EPL is available at
+ http://www.eclipse.org/legal/epl-v10.html. For purposes of the EPL,
+ "Program" will mean the Content.
+
+ If you did not receive this Content directly from the University of Sheffield,
+ the Content is being redistributed by another party ("Redistributor") and
+ different terms and conditions may apply to your use of any object code in
+ the Content. Check the Redistributor's license that was provided with the
+ Content. If no such license exists, contact the Redistributor. Unless
+ otherwise indicated below, the terms and conditions of the EPL still apply
+ to any source code in the Content.
-*/
+ */
+
package nongnu.cashews.eclipse.composer.commands;
+import java.util.Iterator;
+
import nongnu.cashews.eclipse.composer.model.Connection;
import nongnu.cashews.eclipse.composer.model.Diagram;
import nongnu.cashews.eclipse.composer.model.Node;
@@ -44,8 +47,7 @@
import org.eclipse.gef.commands.Command;
-public class DeleteNodeCommand
- extends Command
+public class DeleteNodeCommand extends Command
{
private Diagram diagram;
@@ -53,6 +55,7 @@
private Node node;
private Connection connection;
+
// setters
public void setDiagram(Diagram diagram)
@@ -64,10 +67,12 @@
{
this.node = node;
}
-
- public void setConnection (Connection connection){
- this.connection = connection;
+
+ public void setConnection(Connection connection)
+ {
+ this.connection = connection;
}
+
// ------------------------------------------------------------------------
// Overridden from Command
@@ -78,6 +83,71 @@
public void execute()
{
+ int nodeSize = diagram.getNodes().size();
+ for (int i = 0; i < nodeSize; i++)
+ {
+
+ Node temp = (Node) diagram.getNodes().get(i);
+ if (temp.getOutgoingConnections() != null)
+ {
+
+ if (temp.getOutgoingConnections().size() != 0)
+ {
+ for (int j = 0; j < temp.getOutgoingConnections().size(); j++)
+ {
+
+ Connection outgoing = (Connection)
temp.getOutgoingConnections().get(
+
j);
+ if (node.getName().equals(outgoing.getTarget().getName()))
+ {// temp.removeOutput(cn);
+
+ if (temp.getOutgoingConnections().remove(outgoing))
+ {
+ System.out.println("Connection Deleted");
+ j--;
+ }
+ else
+ {
+ System.out.println("Delete Failed");
+ }
+
+ }
+
+ }
+ }
+ }
+ if (temp.getIncomingConnections() != null)
+ {
+ if (temp.getIncomingConnections().size() != 0)
+ {
+ for (int k = 0; k < temp.getIncomingConnections().size(); k++)
+ {
+
+ Connection incoming = (Connection)
temp.getIncomingConnections().get(
+
k);
+
+ if (node.getName().equals(incoming.getSource().getName()))
+ {
+
+ if (temp.getIncomingConnections().remove(incoming))
+ {
+ System.out.println("Connection Deleted");
+ k--;
+
+ }
+ else
+ {
+ System.out.println("Delete Failed");
+ }
+ }
+
+ }
+ }
+
+ }
+ }
+ node.getOutgoingConnections().clear();
+ node.getIncomingConnections().clear();
diagram.removeNode(node);
NodeRegistrar.removeNode(node.getName());
}
Index: src/nongnu/cashews/eclipse/composer/model/Connection.java
===================================================================
RCS file:
/share/darwin/darwin4/cvs/java/src/nongnu/cashews/eclipse/composer/model/Connection.java,v
retrieving revision 1.7
diff -u -r1.7 Connection.java
--- src/nongnu/cashews/eclipse/composer/model/Connection.java 2005/03/31
02:45:13 1.7
+++ src/nongnu/cashews/eclipse/composer/model/Connection.java 2005/04/14
21:51:17
@@ -1,44 +1,46 @@
/* Connection.java -- A connection between two nodes.
- Copyright (C) 2005 The University of Sheffield.
+ Copyright (C) 2005 The University of Sheffield.
-This file is part of the CASheW-s editor Eclipse plug-in.
+ This file is part of the CASheW-s editor Eclipse plug-in.
-The CASheW-s editor Eclipse plug-in is free software; you may copy, modify,
-and redistribute it under the terms of the GNU General Public License
-version 2 (or, at your option, any later version), and/or the Eclipse
-Public License version 1.0.
+ The CASheW-s editor Eclipse plug-in is free software; you may copy, modify,
+ and redistribute it under the terms of the GNU General Public License
+ version 2 (or, at your option, any later version), and/or the Eclipse
+ Public License version 1.0.
-The CASheW-s editor is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with The CASheW-s editor; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-02111-1307 USA.
-
-The University of Sheffield makes available all content in this plug-in
-("Content"). Unless otherwise indicated below, the Content is provided to
-you under the terms and conditions of the Eclipse Public License Version
-1.0 ("EPL"). A copy of the EPL is available at
-http://www.eclipse.org/legal/epl-v10.html. For purposes of the EPL,
-"Program" will mean the Content.
-
-If you did not receive this Content directly from the University of Sheffield,
-the Content is being redistributed by another party ("Redistributor") and
-different terms and conditions may apply to your use of any object code in
-the Content. Check the Redistributor's license that was provided with the
-Content. If no such license exists, contact the Redistributor. Unless
-otherwise indicated below, the terms and conditions of the EPL still apply
-to any source code in the Content.
+ The CASheW-s editor is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with The CASheW-s editor; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA.
+
+ The University of Sheffield makes available all content in this plug-in
+ ("Content"). Unless otherwise indicated below, the Content is provided to
+ you under the terms and conditions of the Eclipse Public License Version
+ 1.0 ("EPL"). A copy of the EPL is available at
+ http://www.eclipse.org/legal/epl-v10.html. For purposes of the EPL,
+ "Program" will mean the Content.
+
+ If you did not receive this Content directly from the University of Sheffield,
+ the Content is being redistributed by another party ("Redistributor") and
+ different terms and conditions may apply to your use of any object code in
+ the Content. Check the Redistributor's license that was provided with the
+ Content. If no such license exists, contact the Redistributor. Unless
+ otherwise indicated below, the terms and conditions of the EPL still apply
+ to any source code in the Content.
-*/
+ */
+
package nongnu.cashews.eclipse.composer.model;
+
+import java.util.ArrayList;
-public class Connection
- extends Element
+public class Connection extends Element
{
/**
@@ -54,16 +56,31 @@
{
this.source = source;
this.target = target;
-
- source.addOutput(this);
- target.addInput(this);
+ if (target.inputs != null)
+ {
+ target.addInput(this);
+ }
+ else
+ {
+ target.inputs = new ArrayList<Connection>();
+ target.addInput(this);
+ }
+ if (source.outputs != null)
+ {
+ source.addOutput(this);
+ }
+ else
+ {
+ source.outputs = new ArrayList<Connection>();
+ source.addOutput(this);
+ }
}
public Node getTarget()
{
return this.target;
}
-
+
public Node getSource()
{
return this.source;
Index: src/nongnu/cashews/eclipse/composer/model/DiagramParser.java
===================================================================
RCS file:
/share/darwin/darwin4/cvs/java/src/nongnu/cashews/eclipse/composer/model/DiagramParser.java,v
retrieving revision 1.12
diff -u -r1.12 DiagramParser.java
--- src/nongnu/cashews/eclipse/composer/model/DiagramParser.java 2005/04/11
21:02:44 1.12
+++ src/nongnu/cashews/eclipse/composer/model/DiagramParser.java 2005/04/14
21:51:17
@@ -73,7 +73,7 @@
d = new Diagram();
sourceList = new ArrayList<String>();
targetList = new ArrayList<String>();
-
+
}
public void endDocument()
@@ -85,105 +85,58 @@
Iterator targetNames = targetList.iterator();
Iterator sourceNames = sourceList.iterator();
-
- int diagramNodeCount = 0;
-
+ Node sourceNodes = null;
+ Node targetNodes = null;
List diagramNodes = d.getNodes();
-
- String targetNodeName;
- String sourceNodeName;
-
- while (targetNames.hasNext())
+ Iterator diagramIterator = d.getNodes().iterator();
+ int counter = 0;
+ while (sourceNames.hasNext() && targetNames.hasNext())
{
- targetNodeName = (String) targetNames.next();
- sourceNodeName = (String) sourceNames.next();
- if (diagramNodeCount >= diagramNodes.size())
- {
- diagramNodeCount--;
- duplicateAtTheEnd = true;
- }
- Node sourceNode = (Node) diagramNodes.get(diagramNodeCount);
- if (sourceNode.getName().equals(sourceNodeName))
+ String tempSourceName = (String) sourceNames.next();
+ diagramIterator = d.getNodes().iterator();
+ while (diagramIterator.hasNext())
{
- Iterator j = d.getNodes().iterator();
- Node targetNode;
-
- while (j.hasNext())
+ Node tempNode = (Node) diagramIterator.next();
+ if (tempSourceName.equals((String) (tempNode.getName())))
{
- targetNode = (Node) j.next();
- if (targetNode.getName().equals(targetNodeName))
- {
- if (duplicateAtTheEnd == true)
- {
-
- sourceNode.outputs.add(new Connection(sourceNode,
- targetNode));
- }
- else
- {
- sourceNode.outputs = new ArrayList<Connection>();
- new Connection(sourceNode, targetNode);
- }
-
- }
+ sourceNodes = tempNode;
+
+
}
- diagramNodeCount++;
}
- else
+ diagramIterator = d.getNodes().iterator();
+ String tempTargetNode = (String) targetNames.next();
+ while (diagramIterator.hasNext())
{
- Node tempNode = (Node) diagramNodes.get(diagramNodeCount - 1);
- if (sourceNodeName.equals(tempNode.getName()))
+ Node tempNode = (Node) diagramIterator.next();
+ if (tempTargetNode.equals((String) (tempNode.getName())))
{
- diagramNodeCount--;
- sourceNode = (Node) diagramNodes.get(diagramNodeCount);
- Iterator j = d.getNodes().iterator();
- Node targetNode;
-
- while (j.hasNext())
- {
- targetNode = (Node) j.next();
- if (targetNode.getName().equals(targetNodeName))
- {
- sourceNode.outputs.add(new Connection(sourceNode,
- targetNode));
- }
- }
+ targetNodes = tempNode;
+
}
-
- else
- {
- while (!sourceNode.getName().equals(sourceNodeName))
- {
- diagramNodeCount++;
- sourceNode = (Node) diagramNodes.get(diagramNodeCount);
- }
- Iterator j = d.getNodes().iterator();
- Node targetNode;
-
- while (j.hasNext())
- {
- targetNode = (Node) j.next();
- if (targetNode.getName().equals(targetNodeName))
- {
- sourceNode.outputs = new ArrayList<Connection>();
- new Connection(sourceNode, targetNode);
+ }
+
+ if (counter!=0 &&
sourceNodes.getName().equals(sourceList.get(counter-1))){
+ sourceNodes.outputs.add(new Connection(sourceNodes,targetNodes));
+ }
+ else{
+ sourceNodes.outputs = new ArrayList<Connection>();
+ new Connection(sourceNodes, targetNodes);}
+ counter++;
+ }
- }
- }
- }
- diagramNodeCount++;
+ int max = 0;
+ for (int k = 0; k < d.nodes.size(); k++)
+ {
+ Node cur = (Node) d.nodes.get(k);
+ int tmp = Integer.parseInt(cur.getName().substring(8));
+ if (cur.getName().startsWith("Untitled") && tmp > max)
+ {
+ max = tmp;
}
}
- int max = 0;
- for (int k = 0; k < d.nodes.size(); k++) {
- Node cur = (Node) d.nodes.get(k);
- int tmp = Integer.parseInt(cur.getName().substring(8));
- if (cur.getName().startsWith("Untitled") && tmp > max)
- { max = tmp; }
- }
- System.out.println("Max autoId node is: " + max);
- NodeRegistrar.setMax(max);
-
+ System.out.println("Max autoId node is: " + max);
+ NodeRegistrar.setMax(max);
}
Index: src/nongnu/cashews/eclipse/composer/model/EllipseNode.java
===================================================================
RCS file:
/share/darwin/darwin4/cvs/java/src/nongnu/cashews/eclipse/composer/model/EllipseNode.java,v
retrieving revision 1.12
diff -u -r1.12 EllipseNode.java
--- src/nongnu/cashews/eclipse/composer/model/EllipseNode.java 2005/04/10
17:29:03 1.12
+++ src/nongnu/cashews/eclipse/composer/model/EllipseNode.java 2005/04/14
21:51:18
@@ -34,7 +34,12 @@
to any source code in the Content.
*/
-
+/**
+ *
+ * @author Xianfeng Liu <address@hidden>
+ *
+ *
+ */
package nongnu.cashews.eclipse.composer.model;
import java.util.Iterator;
@@ -99,6 +104,7 @@
public void addOutput(Connection connection)
{
+
outputs.add(connection);
fireStructureChange(OUTPUTS, connection);
}
Index: src/nongnu/cashews/eclipse/composer/model/EllipseNodeFactory.java
===================================================================
RCS file:
/share/darwin/darwin4/cvs/java/src/nongnu/cashews/eclipse/composer/model/EllipseNodeFactory.java,v
retrieving revision 1.4
diff -u -r1.4 EllipseNodeFactory.java
--- src/nongnu/cashews/eclipse/composer/model/EllipseNodeFactory.java
2005/03/25 00:08:01 1.4
+++ src/nongnu/cashews/eclipse/composer/model/EllipseNodeFactory.java
2005/04/14 21:51:18
@@ -34,7 +34,12 @@
to any source code in the Content.
*/
-
+/**
+ *
+ * @author Xianfeng Liu <address@hidden>
+ *
+ *
+ */
package nongnu.cashews.eclipse.composer.model;
public class EllipseNodeFactory extends NodeFactory
Index: src/nongnu/cashews/eclipse/composer/model/Node.java
===================================================================
RCS file:
/share/darwin/darwin4/cvs/java/src/nongnu/cashews/eclipse/composer/model/Node.java,v
retrieving revision 1.14
diff -u -r1.14 Node.java
--- src/nongnu/cashews/eclipse/composer/model/Node.java 2005/03/28 04:28:51 1.14
+++ src/nongnu/cashews/eclipse/composer/model/Node.java 2005/04/14 21:51:18
@@ -34,7 +34,12 @@
to any source code in the Content.
*/
-
+/**
+ *
+ * @author Xianfeng Liu <address@hidden>
+ *
+ *
+ */
package nongnu.cashews.eclipse.composer.model;
import java.util.ArrayList;
Index: src/nongnu/cashews/eclipse/composer/model/NodeFactory.java
===================================================================
RCS file:
/share/darwin/darwin4/cvs/java/src/nongnu/cashews/eclipse/composer/model/NodeFactory.java,v
retrieving revision 1.9
diff -u -r1.9 NodeFactory.java
--- src/nongnu/cashews/eclipse/composer/model/NodeFactory.java 2005/04/11
21:02:44 1.9
+++ src/nongnu/cashews/eclipse/composer/model/NodeFactory.java 2005/04/14
21:51:18
@@ -69,9 +69,9 @@
{
System.out.println("Create node autoId is: " + autoId);
node = createNode("Untitled" + autoId);
- nr.setMax(autoId);
- autoId++;
+ autoId++;
+ nr.setMax(autoId);
System.out.println("Creating node: Untitled" + autoId);
}
while (!NodeRegistrar.registerNewNode(
Index: src/nongnu/cashews/eclipse/composer/model/NodeRegistrar.java
===================================================================
RCS file:
/share/darwin/darwin4/cvs/java/src/nongnu/cashews/eclipse/composer/model/NodeRegistrar.java,v
retrieving revision 1.9
diff -u -r1.9 NodeRegistrar.java
--- src/nongnu/cashews/eclipse/composer/model/NodeRegistrar.java 2005/04/11
21:02:44 1.9
+++ src/nongnu/cashews/eclipse/composer/model/NodeRegistrar.java 2005/04/14
21:51:19
@@ -69,23 +69,6 @@
public static boolean registerNewNode(String name, Diagram d)
{
- /*Iterator i = d.nodes.iterator();
- //names.clear();
- int m = 0;
- String curName;
-
- while (i.hasNext())
- {
- curName = ((Node) i.next()).getName();
-
- m = Integer.parseInt(curName.substring(8));
- if (max < m)
- {
- max = m;
- }
-
- }*/
- // System.out.println("New Max is:" + max);
if (names.contains(name))
{
return false;
Index: src/nongnu/cashews/eclipse/composer/model/RectangleNode.java
===================================================================
RCS file:
/share/darwin/darwin4/cvs/java/src/nongnu/cashews/eclipse/composer/model/RectangleNode.java,v
retrieving revision 1.10
diff -u -r1.10 RectangleNode.java
--- src/nongnu/cashews/eclipse/composer/model/RectangleNode.java 2005/04/10
17:29:03 1.10
+++ src/nongnu/cashews/eclipse/composer/model/RectangleNode.java 2005/04/14
21:51:19
@@ -34,7 +34,12 @@
to any source code in the Content.
*/
-
+/**
+ *
+ * @author Xianfeng Liu <address@hidden>
+ *
+ *
+ */
package nongnu.cashews.eclipse.composer.model;
import java.util.List;
@@ -114,13 +119,13 @@
public void removeInput(Connection connection)
{
- inputs.remove(connection);
+ super.inputs.remove(connection);
fireStructureChange(INPUTS, connection);
}
public void removeOutput(Connection connection)
{
- outputs.remove(connection);
+ super.outputs.remove(connection);
fireStructureChange(OUTPUTS, connection);
}
Index: src/nongnu/cashews/eclipse/composer/model/RectangleNodeFactory.java
===================================================================
RCS file:
/share/darwin/darwin4/cvs/java/src/nongnu/cashews/eclipse/composer/model/RectangleNodeFactory.java,v
retrieving revision 1.5
diff -u -r1.5 RectangleNodeFactory.java
--- src/nongnu/cashews/eclipse/composer/model/RectangleNodeFactory.java
2005/03/25 00:08:01 1.5
+++ src/nongnu/cashews/eclipse/composer/model/RectangleNodeFactory.java
2005/04/14 21:51:19
@@ -34,7 +34,12 @@
to any source code in the Content.
*/
-
+/**
+ *
+ * @author Xianfeng Liu <address@hidden>
+ *
+ *
+ */
package nongnu.cashews.eclipse.composer.model;
public class RectangleNodeFactory
Index: resource/plugin.xml
===================================================================
RCS file: resource/plugin.xml
diff -N resource/plugin.xml
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ resource/plugin.xml 1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<plugin id="nongnu.cashews.eclipse.composer"
+ name="CASheW-s"
+ version="0.0.0"
+ provider-name="The CASheW-s Project"
+ class="nongnu.cashews.eclipse.composer.Plugin">
+
+ <runtime>
+ <library name="composer.jar"/>
+ </runtime>
+ <requires>
+ <import plugin="org.eclipse.core.runtime"/>
+ <import plugin="org.eclipse.gef"/>
+ <import plugin="org.eclipse.core.resources"/>
+ <import plugin="org.eclipse.ui.views"/>
+ <import plugin="org.eclipse.jface"/>
+ <import plugin="org.eclipse.ui"/>
+ <import plugin="org.eclipse.ui.workbench"/>
+ <import plugin="org.eclipse.ui.cheatsheets"/>
+ <import plugin="org.eclipse.ui.console"/>
+ <import plugin="org.eclipse.ui.editors"/>
+ <import plugin="org.eclipse.ui.externaltools"/>
+ <import plugin="org.eclipse.ui.forms"/>
+ <import plugin="org.eclipse.ui.ide"/>
+ <import plugin="org.eclipse.ui.intro"/>
+ </requires>
+
+ <extension point="org.eclipse.ui.editors">
+ <editor id="nongnu.cashews.eclipse.composer.editor"
+ name="Cashews Editor"
+ default="true"
+ icon=""
+ extensions="composer"
+
contributorClass="nongnu.cashews.eclipse.composer.actions.DiagramActionBarContributor"
+ class="nongnu.cashews.eclipse.composer.ui.DiagramEditor">
+ </editor>
+ </extension>
+
+ <extension point="org.eclipse.ui.newWizards">
+ <category id="nongnu.cashews.eclipse.composer" name="Composer"/>
+ <wizard id="nongnu.cashews.eclipse.composer.wizard.new.file"
+ name="Composer Model"
+ category="nongnu.cashews.eclipse.composer"
+ class="nongnu.cashews.eclipse.composer.ui.DiagramCreationWizard">
+ <description>Wizard for creating a new CASheW-s process
diagram.</description>
+ <selection class="org.eclipse.core.resources.IResource">
+ </selection>
+ </wizard>
+ </extension>
+
+</plugin>
AllPresentationAndParserBugsSolved.diff
Description: Binary data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [CASHeW-s-editor-patches] Solved all the bugs of the diagram presentation and the parser <Xianfeng Liu>,
Xianfeng Liu <=