Com S 362 - Object-Oriented Analysis and Design (Fall 2007 Edition)

Com S 362: Homework 1

  1. Create a simple Eclipse Plug-in [Due Wed, Aug 22] (Points 5)
    1. Start the Eclipse IDE, if you don't have the IDE you can download the latest version from http://www.eclipse.org.
    2. From the Eclipse menu, select File=>New=>Other, select plug-in project from the dialog box, click next and type in "edu.iastate.cs.cs362.hridesh.helloworld" as the name of the plug-in project. Please replace hridesh with your own cs account name.
    3. Click next twice and then select "HelloWorld" as the available template for your plug-in
    4. Click finish to generate the skeleton for the plug-in.
    5. In the generated plug-in open the file plugin.xml as text by right-clicking on the file and selecting "open with" text editor.
    6. This sample plug-in adds a menu item to the Eclipse tool bar. The label of this menu item is represented by the xml tag " <menu label="Sample &Menu"". Change the label to "Hello Menu".
    7. This sample plug-in adds an action item to the Eclipse tool bar. The label of this action item is represented by the xml tag " <action tooltip="Hello, Eclipse world" label="&Sample Action" ". Change the label to "Say Hello".
    8. When the action item "Say Hello" is selected in the Eclipse tool bar, the method "run" in the class "SampleAction" is called, which in turn opens a message dialog box. Change the dialog box to say "Hello Com S 362 Students".
    9. Select the project, and select Run=>Run as=>Eclipse Application to launch your new plug-in. Eclipse should launch a new workbench containing your new menu. Ensure that the menu contains the action "Say Hello", which in turn opens a dialog box that says "Hello Com S 362 Students".
    10. Create a compressed version of your plug-in, name it [your Com S account name]-hw1-1.zip and send it by e-mail to cs362@cs.iastate.edu
  2. Create an Eclipse Plug-in for converting source code to XML form[Due date to be announced](Points 20)

Resources

Exploring Eclipse's ASTParser

AST View

Abstract Syntax Tree