Download presentation
Presentation is loading. Please wait.
Published byBaldwin Morrison Modified over 9 years ago
2
Graph Visualization Plug-in for Eclipse Gong Jun CCIS Northeastern Univ 10/2003 How To Finish your Project within Four Weeks
3
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
4
What You Need to Do Add a syntax sensitive Selector Language Editor to this plug-in. Add traversal highlighting functionality to the Class Diagram Editor. Write your own class dictionary of the Selector Language.
5
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!!!
6
Eclipse Platform Overview
7
Plugin.xml Plug-in Manifest file Plugin_name.jar Plug-in Eclipse core …
8
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.
9
Example
10
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.
11
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.
12
GEF MVC Architecture
13
MVC Example 5
14
Class Diagram Editor Model ---- model – BasicSubpart, ClassDiagramModel, Connector BasicSubpart ClassDiagramModelConnector
15
Class Diagram Editor View ---- figure – ClassFigure, PolylineConnection Anchor. Can be black boxes for this project.
16
Class Diagram Editor Controller ---- EditPart – ClassEditPart, ConnectorEditPart Installed EditPolicies. EditPart e
17
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?
18
Construct DJ Class Graph Create a new class graph. – Be sure to use: edu.neu.ccs.demeter.aplib.cd.ClassGraph addConstructionEdge (String source, String name, String target)String addAlternationEdge(String source, String target) addAlternationEdgeString addInheritanceEdge(String source, String target) addInheritanceEdgeString
19
Construct DJ Traversal Class Graph + Strategy = Traversal. Be sure to use: edu.neu.ccs.demeter.aplib.Traversal getEdgeSets() getEdgeSets getNodeSets() getNodeSets
20
Show The Path What you get from getEdgeSets() and getNodeSets() are lists of names. getEdgeSets getNodeSets 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.
21
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)
22
Good Luck! The End
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.