Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
commiting the class diagram plugin folder
- Loading branch information
tms08012
committed
Jun 7, 2012
1 parent
44f1f09
commit 1fb0ed0
Showing
82 changed files
with
1,949 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" path="src/main/java"/> | ||
<classpathentry excluding="src/main/java/" kind="src" path=""/> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> | ||
<classpathentry kind="lib" path="/VioletProduct.eclipse-plugin/trunk/lib/com.horstmann.violet-2.0.0-SNAPSHOT.jar"/> | ||
<classpathentry kind="output" path="bin"/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>VioletPlugin.ClassDiagram</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
</natures> | ||
</projectDescription> |
246 changes: 246 additions & 0 deletions
246
New folder/VioletPlugin.ClassDiagram/horstmann.eclipse.code.formatter.xml
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 | ||
http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>com.horstmann.violet.plugin</groupId> | ||
<artifactId>com.horstmann.violet.plugin.classdiagram</artifactId> | ||
<name>Violet UML Editor Class Diagram Plugin</name> | ||
<version>2.0.0-SNAPSHOT</version> | ||
<description></description> | ||
<packaging>jar</packaging> | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.horstmann.violet.framework</groupId> | ||
<artifactId>com.horstmann.violet.framework</artifactId> | ||
<version>2.0.0-SNAPSHOT</version> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<resources> | ||
<resource> | ||
<directory>src/main/resources</directory> | ||
</resource> | ||
<resource> | ||
<directory>src/main/java</directory> | ||
<includes> | ||
<include>**/*.gif</include> | ||
<include>**/*.jpg</include> | ||
<include>**/*.properties</include> | ||
<include>**/*.xml</include> | ||
</includes> | ||
</resource> | ||
</resources> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>2.0.2</version> | ||
<configuration> | ||
<source>1.6</source> | ||
<target>1.6</target> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
<distributionManagement> | ||
<repository> | ||
<id>web.sourceforge.net</id> | ||
<name>Violet's Maven Repository</name> | ||
<url> | ||
sftp://web.sourceforge.net/home/groups/v/vi/violet/htdocs/maven2/repo | ||
</url> | ||
</repository> | ||
</distributionManagement> | ||
<repositories> | ||
<repository> | ||
<id>violet.repo</id> | ||
<name>Violet's Maven repository (public access)</name> | ||
<url>http://violet.sourceforge.net/maven2/repo/</url> | ||
</repository> | ||
</repositories> | ||
</project> |
8 changes: 8 additions & 0 deletions
8
...gram/src/main/java/com/horstmann/violet/product/diagram/classes/ClassDiagramConstant.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.horstmann.violet.product.diagram.classes; | ||
|
||
public interface ClassDiagramConstant | ||
{ | ||
|
||
public static final String CLASS_DIAGRAM_STRINGS = "properties.ClassDiagramGraphStrings"; | ||
|
||
} |
97 changes: 97 additions & 0 deletions
97
...Diagram/src/main/java/com/horstmann/violet/product/diagram/classes/ClassDiagramGraph.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
package com.horstmann.violet.product.diagram.classes; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
import java.util.Locale; | ||
import java.util.ResourceBundle; | ||
|
||
import com.horstmann.violet.product.diagram.abstracts.AbstractGraph; | ||
import com.horstmann.violet.product.diagram.abstracts.edge.IEdge; | ||
import com.horstmann.violet.product.diagram.abstracts.node.INode; | ||
import com.horstmann.violet.product.diagram.classes.edges.AggregationEdge; | ||
import com.horstmann.violet.product.diagram.classes.edges.AssociationEdge; | ||
import com.horstmann.violet.product.diagram.classes.edges.CompositionEdge; | ||
import com.horstmann.violet.product.diagram.classes.edges.DependencyEdge; | ||
import com.horstmann.violet.product.diagram.classes.edges.InheritanceEdge; | ||
import com.horstmann.violet.product.diagram.classes.edges.InterfaceInheritanceEdge; | ||
import com.horstmann.violet.product.diagram.classes.nodes.ClassNode; | ||
import com.horstmann.violet.product.diagram.classes.nodes.InterfaceNode; | ||
import com.horstmann.violet.product.diagram.classes.nodes.PackageNode; | ||
import com.horstmann.violet.product.diagram.common.DiagramLinkNode; | ||
import com.horstmann.violet.product.diagram.common.NoteEdge; | ||
import com.horstmann.violet.product.diagram.common.NoteNode; | ||
|
||
/** | ||
* A UML class diagram. | ||
*/ | ||
public class ClassDiagramGraph extends AbstractGraph | ||
{ | ||
|
||
public List<INode> getNodePrototypes() | ||
{ | ||
return NODE_PROTOTYPES; | ||
} | ||
|
||
public List<IEdge> getEdgePrototypes() | ||
{ | ||
return EDGE_PROTOTYPES; | ||
} | ||
|
||
private static final List<INode> NODE_PROTOTYPES = new ArrayList<INode>(); | ||
|
||
private static final List<IEdge> EDGE_PROTOTYPES = new ArrayList<IEdge>(); | ||
|
||
static | ||
{ | ||
ResourceBundle rs = ResourceBundle.getBundle(ClassDiagramConstant.CLASS_DIAGRAM_STRINGS, Locale.getDefault()); | ||
|
||
ClassNode node0 = new ClassNode(); | ||
node0.setToolTip(rs.getString("node0.tooltip")); | ||
NODE_PROTOTYPES.add(node0); | ||
|
||
InterfaceNode node1 = new InterfaceNode(); | ||
node1.setToolTip(rs.getString("node1.tooltip")); | ||
NODE_PROTOTYPES.add(node1); | ||
|
||
PackageNode node2 = new PackageNode(); | ||
node2.setToolTip(rs.getString("node2.tooltip")); | ||
NODE_PROTOTYPES.add(node2); | ||
|
||
NoteNode node3 = new NoteNode(); | ||
node3.setToolTip(rs.getString("node3.tooltip")); | ||
NODE_PROTOTYPES.add(node3); | ||
|
||
DiagramLinkNode node4 = new DiagramLinkNode(); | ||
node4.setToolTip(rs.getString("node4.tooltip")); | ||
NODE_PROTOTYPES.add(node4); | ||
|
||
DependencyEdge dependency = new DependencyEdge(); | ||
dependency.setToolTip(rs.getString("edge0.tooltip")); | ||
EDGE_PROTOTYPES.add(dependency); | ||
|
||
InheritanceEdge inheritance = new InheritanceEdge(); | ||
inheritance.setToolTip(rs.getString("edge1.tooltip")); | ||
EDGE_PROTOTYPES.add(inheritance); | ||
|
||
InterfaceInheritanceEdge interfaceInheritance = new InterfaceInheritanceEdge(); | ||
interfaceInheritance.setToolTip(rs.getString("edge2.tooltip")); | ||
EDGE_PROTOTYPES.add(interfaceInheritance); | ||
|
||
AssociationEdge association = new AssociationEdge(); | ||
association.setToolTip(rs.getString("edge3.tooltip")); | ||
EDGE_PROTOTYPES.add(association); | ||
|
||
AggregationEdge aggregation = new AggregationEdge(); | ||
aggregation.setToolTip(rs.getString("edge4.tooltip")); | ||
EDGE_PROTOTYPES.add(aggregation); | ||
|
||
CompositionEdge composition = new CompositionEdge(); | ||
composition.setToolTip(rs.getString("edge5.tooltip")); | ||
EDGE_PROTOTYPES.add(composition); | ||
|
||
NoteEdge noteEdge = new NoteEdge(); | ||
noteEdge.setToolTip(rs.getString("edge6.tooltip")); | ||
EDGE_PROTOTYPES.add(noteEdge); | ||
} | ||
|
||
} |
109 changes: 109 additions & 0 deletions
109
...iagram/src/main/java/com/horstmann/violet/product/diagram/classes/ClassDiagramPlugin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
package com.horstmann.violet.product.diagram.classes; | ||
|
||
import java.util.HashMap; | ||
import java.util.Locale; | ||
import java.util.Map; | ||
import java.util.ResourceBundle; | ||
|
||
import com.horstmann.violet.framework.plugin.IDiagramPlugin; | ||
import com.horstmann.violet.framework.plugin.extensionpoint.Violet016FileFilterExtensionPoint; | ||
import com.horstmann.violet.product.diagram.abstracts.IGraph; | ||
import com.horstmann.violet.product.diagram.classes.edges.ClassRelationshipEdge; | ||
import com.horstmann.violet.product.diagram.classes.nodes.ClassNode; | ||
import com.horstmann.violet.product.diagram.classes.nodes.InterfaceNode; | ||
import com.horstmann.violet.product.diagram.classes.nodes.PackageNode; | ||
|
||
/** | ||
* Describes class diagram graph type | ||
* | ||
* @author Alexandre de Pellegrin | ||
* | ||
*/ | ||
public class ClassDiagramPlugin implements IDiagramPlugin, Violet016FileFilterExtensionPoint | ||
{ | ||
/* | ||
* (non-Javadoc) | ||
* | ||
* @see com.horstmann.violet.framework.plugin.AbstractPlugin#getDescription() | ||
*/ | ||
public String getDescription() | ||
{ | ||
return "Class UML diagram"; | ||
} | ||
|
||
/* | ||
* (non-Javadoc) | ||
* | ||
* @see com.horstmann.violet.framework.plugin.AbstractPlugin#getProvider() | ||
*/ | ||
public String getProvider() | ||
{ | ||
return "Alexandre de Pellegrin / Cays S. Horstmann"; | ||
} | ||
|
||
/* | ||
* (non-Javadoc) | ||
* | ||
* @see com.horstmann.violet.framework.plugin.AbstractPlugin#getVersion() | ||
*/ | ||
public String getVersion() | ||
{ | ||
return "1.0.0"; | ||
} | ||
|
||
/* | ||
* (non-Javadoc) | ||
* | ||
* @see com.horstmann.violet.product.diagram.abstracts.GraphType#getName() | ||
*/ | ||
public String getName() | ||
{ | ||
return this.rs.getString("menu.class_diagram.text"); | ||
} | ||
|
||
/* | ||
* (non-Javadoc) | ||
* | ||
* @see com.horstmann.violet.product.diagram.abstracts.GraphType#getFileExtension() | ||
*/ | ||
public String getFileExtension() | ||
{ | ||
return this.rs.getString("files.class.extension"); | ||
} | ||
|
||
/* | ||
* (non-Javadoc) | ||
* | ||
* @see com.horstmann.violet.product.diagram.abstracts.GraphType#getFileExtensionName() | ||
*/ | ||
public String getFileExtensionName() | ||
{ | ||
return this.rs.getString("files.class.name"); | ||
} | ||
|
||
/* | ||
* (non-Javadoc) | ||
* | ||
* @see com.horstmann.violet.product.diagram.abstracts.GraphType#getGraphClass() | ||
*/ | ||
public Class<? extends IGraph> getGraphClass() | ||
{ | ||
return ClassDiagramGraph.class; | ||
} | ||
|
||
|
||
public Map<String, String> getMappingToKeepViolet016Compatibility() | ||
{ | ||
Map<String, String> replaceMap = new HashMap<String, String>(); | ||
replaceMap.put("com.horstmann.violet.ClassDiagramGraph", ClassDiagramGraph.class.getName()); | ||
replaceMap.put("com.horstmann.violet.ClassNode", ClassNode.class.getName()); | ||
replaceMap.put("com.horstmann.violet.ClassRelationshipEdge", ClassRelationshipEdge.class.getName()); | ||
replaceMap.put("com.horstmann.violet.InterfaceNode", InterfaceNode.class.getName()); | ||
replaceMap.put("com.horstmann.violet.PackageNode", PackageNode.class.getName()); | ||
return replaceMap; | ||
} | ||
|
||
private ResourceBundle rs = ResourceBundle.getBundle(ClassDiagramConstant.CLASS_DIAGRAM_STRINGS, Locale.getDefault()); | ||
|
||
|
||
} |
Oops, something went wrong.