Transcript How To Finish your Graph Visualization Plug-in Project within Four Weeks
Gong Jun CCIS Northeastern Univ 10/2003
What You Already Have A detailed project description.
Source codes of a half implemented Eclipse plug-in.
An extended DJ package.
– Parse the Selector Language – Generate a list of StrategyExpressions and a list of NodeSubsetExpressions.
Lab exercises
What You Need to Do Write your own class dictionary of the Selector Language.
Add a syntax sensitive Selector Language Editor to this plug-in.
Add traversal highlighting functionality to the Class Diagram Editor.
Eclipse Platform Overview The definition from the official website: – Eclipse is a kind of universal tool platform an open extensible IDE for anything and nothing in particular. The Java compiler itself is a plug-in!!!
Eclipse Platform Overview
Eclipse Platform Overview Eclipse core Plugin.xml
Plug-in Manifest file Plugin_name.jar
Plug-in …
What ’ s Inside plug-in.xml
Function is added to the system using a common extension model.
Extension points – well-defined function points in the system that can be extended by plug-ins When a plug-in contributes an implementation for an extension point, we say that it adds an extension to the platform.
Example
Selector Language Editor A simple extension to
org.eclipse.ui.texteditor
Add syntax rules.
– Syntax coloring is provided in the platform text framework using a model of damage, repair, and reconciling Do Lab exercise 18.
GEF MVC Architecture MVC: Model-View-Controller.
Model:
represents the data being displayed
View:
responsible for rendering the data
Controller:
responsible for handling user input, making changes on the model if necessary, and refreshing the view.
GEF MVC Architecture
MVC Example 5
Class Diagram Editor Model ---- model – BasicSubpart, ClassDiagramModel, Connector BasicSubpart ClassDiagramModel Connector
Class Diagram Editor View ---- figure – ClassFigure, PolylineConnection Anchor.
Can be black boxes for this project.
Class Diagram Editor Controller ---- EditPart – ClassEditPart, ConnectorEditPart Installed EditPolicies.
e EditPart
ClassDiagramModel A list of all the ClassDiagramModels in the diagram will be given to you.
getSourceConnections() method.
getTargetConnections() method.
isSelected() method.
setSelected(
boolean
b) method.
How to have the list of all the connectors?
Construct DJ Class Graph Create a new class graph.
– Be sure to use: edu.neu.ccs.demeter.aplib.cd.ClassGraph
addConstructionEdge ( String String source, target) String addAlternationEdge ( name, String String source, target) addInheritanceEdge ( String String target) source,
Construct DJ Traversal Class Graph + Strategy = Traversal.
Be sure to use: edu.neu.ccs.demeter.aplib.Traversal
getEdgeSets () getNodeSets ()
Show The Path What you get from getEdgeSets () getNodeSets () are lists of names.
and Rescan the ClassDiagramModel list, when a selected ClassDiagramModel is met, setSelect().
If it’s not NodeSubsetLanguage, also scan the Connector list, do the same thing.
The Hooks public static ClassGraph createClassGraph(List nodeList) public static String highlightTraversal (ClassGraph cg, List nodeList, String strategy, boolean is_nodeset) public static String RefreshStrategy(String name) public static boolean isNodeSet(String name)
Good Luck!
The End