1 / 7

HW #5

HW #5. Assignment. 1. Add a "LoD checker properties" page.

Download Presentation

HW #5

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. HW #5

  2. Assignment • 1. Add a "LoD checker properties" page. Any Java project should have "LoD checker properties" page. Make sure it appears only for Java projects. The properties page is the nerve center where the user can choose which version of the LoD should be checked. Offer the capabilities you implemented in hw 4, e.g. defining stable classes. • 2. Add AspectJ project nature. If a Java project does not have AspectJ nature and the LoD checker is enabled, add the AspectJ nature to the project.You need to deal with the AspectJ plug-in when compiling the project. At this point find out how to deal with project natures and how to save information between start-ups and shutdowns of the Platform.

  3. What does it mean? • You need to create a “Property Page”, that • is visible only for projects labeled with Java nature. • contains all the necessary widgets for tuning your checker for the selected project. • is AspectJ plug-in aware. • attaches/detaches checker source code files on enabling/disabling checker. • treats all the properties as persistent

  4. What to do. Manifest file. • Write your plug-in manifest file (plug-in.xml) that defines extension to the org.eclipse.ui.propertyPages extension point. Hints: • See the extension points reference in the Plug-in the Plug-in Developer documentation at eclipse.org • To find out how to associate your extension with Java Nature projects look at the manifest files for existing plugins (example – AspectJ plugin) • Don’t forget to define all the plug-ins your plug-in uses (import tag of the manifest file).

  5. What to do. Implementation. • Write Java implementation class containing all the necessary logic. • Read Preferences and properties section of the Plug-In Developer guide • Use documentation (API reference) !!! • Take a close look at resources API (org.eclipse.core.resources)!!! • Take a close look at SWT API (org.eclipse.swt.widgets) • In order to find out how to operate Java kind of resources – look at JDT Plug-in Developer Guide, API reference (org.eclipse.jdt.core) (you’ll need it in the stage of attaching your checker files to the project)

  6. More on implementation. • Don’t forget to add AspectJ project nature to the project if necessary. (resources API) Remember – your checker uses AspectJplug-in and can be applied to any Java project. • Don’t forget to remove AspectJ project nature if it’s possible and user don’t need it any more. (if project had AspectJ nature before first use of the checker – we cannot remove AspectJ nature from the project) • Keep your checker files in the plug-in directory (they comes with your plugin). Copy them to a current project directory when enabling checker.

  7. Any questions? Ask ME Sergei Kojarski kojarski@ccs.neu.edu

More Related