Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Importing Existing Plug-ins

  1. Download the zip file with all our prepared tutorial plugins an example plug-in from our Stash. Unzip the file.
  2. Open the context menu within the Package-Explorer (on the very left, right-click the empty space).
  3. Select Import. Then chose General > Existing Projects into Workspace.
  4. Browse to the location where you unzipped the downloaded plug-insin. Click open. Check the checkbox in front of the de.cau.cs.kieler.tutorials.plugins.shouter plug-in and press Finish.

...

In Eclipse, we develop plug-ins that extend the basic functionality of Eclipse itself. As we do not always want to run Eclipse with all the functionality there is, we can use Run Configurations to precisely specify the functionality we want.

  1. Click Run > Debug Run Configurations...
  2. Right-click Eclipse Application and click New. Set the configuration's name to Eclipse Test.
  3. On the Plug-ins tab, set Launch with to plug-ins selected below only.
    1. Click Deselect All.
    2. Check the Workspace item in the tree.
    3. Check the org.eclipse.ui.ide.application plugins under Target Platform
    4. Click Add Required Plug-ins. Press it twice (just to be sure!).
  4. Click Apply to save your changes and then Debug Run to start an Eclipse instance to test with.
  5. In the newly started Eclipse, open the context menu of the Project Explorer.
  6. You should see a Hello Shouter entry which shouts out Hello if you press it.

Note that you can run your configuration also by using the debug button in the main menu. In that case you will be able to use debug features and code changes will be directly active in your Eclipse instance after saving. In the rather rare cases where this is impossible you will be notified.

Creating Your First Plug-in

...

  1. In your previously created plugin (de.cau.cs.kieler.tutorials.myshouter) create a new class MyShouter that implements the IShouter interface.
    1. From the Package Explorer context menu select New > Class.
  2. Open the MANIFEST.MF of your plugin and navigate to the Extensions tab. 
  3. Press Add and select the de.cau.cs.kieler.tutorials.plugins.shouters extension point. Press Finish.
  4. Give it a name and using the Browse button select your previously created class implementing the IShouter interface.
  5. Start your Eclipse instance again using the created run configuration and test your very own shouter.

 

...