140 likes | 239 Views
Textual Visualization Plug-in for Eclipse. Gong Jun CCIS Northeastern Univ 02/2004. What You Are Given. A detailed project description. An extended DJ Plug-in. Can be used to parse the Selector Language Lab exercises. What You Need to Do.
E N D
Textual Visualization Plug-in for Eclipse Gong Jun CCIS Northeastern Univ 02/2004
What You Are Given • A detailed project description. • An extended DJ Plug-in. • Can be used to parse the Selector Language • Lab exercises
What You Need to Do • Write your class dictionary for the Selector Language. • Starting from an empty Plug-in, add a syntax sensitive Selector Language Editor to it. • Add traversal highlighting functionality to the Traversal Highlighting View. • From where do you get the Class Graph to be traversed and highlighted?
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!!! • No 1 misunderstanding about Eclipse!
Eclipse core Plugin_name.jar Plug-in Plugin.xml Plug-in Manifest file … Eclipse Platform Overview
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.
Selector Language Editor • A simple extension to org.eclipse.ui.texteditor • Add syntax rules. • Contribute buttons to Menu or Toolbar • Class Action, method run() • DocumentProvider • IDocument.get() • Lab exercise 18 has detailed implementation details.
Traversal Highlighting View • Extension point: • org.eclipse.ui.views • Class extends ViewPart • Create widgets in the view by instantiating the classes of those widgets. • Only a StyledText is enough!
StyledText • org.eclipse.swt.custom.StyledText • SWT widget • append(String string) • setStyleRanges(StyleRange[]) • StyleRange specifies various styles for some parts of the text
Construct DJ Class Graph • Create a new class graph. • Be sure to use: edu.neu.ccs.demeter.aplib.cd.ClassGraph • ClassGraph.fromString(Strings) • Construct Traversal • Traversal.getEdgeSets() • Traversal.getNodeSets() • Tricky part: Create ClassGraph from source files
Good Luck! The End