##Description This plug-in designed to verify design pattern in Eclipse editor. This is project for CS585 class, Cal Poly Pomona.
##How to run this application [Debugging mode]
####Example result
Regarding Factory Pattern, we should not call implemented class from interface directly. We should call ShapFactory class in order to use this implemented objects
After run the plug-in, the plug-in will add mark at the line that code is wrote wrongly, and give recommendation for correct the wrong pattern
##Manipulate Java Source
####The Abstract Syntax Tree (AST) The AST is the base framework for many powerful tools of the Eclipse IDE.
####To work with AST:
######AST Workflow
Figure from AST Article
Parsing Source:
Basically we need to translate Java Source code to AST. You can implement your own class by using org.eclipse.jdt.core.dom.ASTParser or you also can download
free library as well. Since my project will work on plug-in, so I created Parser Class by myself for future extention purpose.
Below figure shows the Java Model overview. This project first select IPackageFragment in order to pull all Java Classes under same pacakge to identify type of class, if it is interface or else.
And mainly of project will work on ICompilationUnit, in order to manipulate Java Source Code.
Figure from AST Article
It's really important to understand AST Visitor, because it will help you figure out the way to manipulate the java source code. And if you understand it well, it will help your life more easier'
This is some code example. [Example AST Visitor](http://www.programcreek.com/java-api-examples/index.php?api=org.eclipse.jdt.core.dom.ASTVisitor)
##Start to work with plug-in
######Layered Libraries
Figure from RCP Tutorial
Before we start, please download Eclipse Software Development from this link --> [Download](http://download.eclipse.org/eclipse/downloads/).
In this project we create popup menu when we perform right-click at Package under Package Explorer section.
The tutorial is in this link Create Pop-up Commands
The plugin.xml of this project is in this link plugin.xml
##References Pictures
######Factory Design Pattern
Figure from Design Pattern Tutorial
######Step to apply algorithm by HEDGHOG
Figure from Research papers of Alex Blewitt
##References
Eclipse Plugins Exposed
Eclipse RCP Tutorial
Abstract Syntax Tree
Create Marker for Plug-in
Design Pattern Tutorial
Work with Abstract Syntax Tree
Format code by JDT
Work with JavaParser
Plug in developer guide
Implement with IFile
######Research papers related this project:
[HEDGEHOG] (http://www.bandlem.com/Alex/Papers/PhDThesis.pdf)
Automatic Verify Design Pattern Papers