Child pages
  • The Plug-in Architecture of Eclipse

Versions Compared

Key

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

...

  1. Copy the attached file to a new subfolder icons in the plug-in folder (right-click the plug-in folder in the Package Explorer and choose New -> Folder...). You can copy the file by importing it from inside Eclipse (File -> Import... -> File System) or by copying it from outside Eclipse and refreshing the plug-in project afterwards (right-click the plug-in folder in the Package Explorer and choose Refresh).
  2. Open the Plug-in Manifest Editor again and switch to the Extensions tab.
  3. Click Add..., choose the org.eclipse.ui.editors extension point and click Finish.
  4. The extension point is now shown in the list of extensions, along with an editor extension. Select that extension and edit its details using the fields on the right. Set the ID to de.cau.cs.rtprakt.login.simple.editor, the name to Simple Text Editor, the icon to icons/turing-file.gif, the extensions to simple, the class to de.cau.cs.rtprakt.login.simple.editors.SimpleEditorPart, and the default to true.
  5. Save the manifest editor.

Test the Editor

It's time to test your new simple editor in a new Eclipse instance.

  1. Switch back to the Overview tab of the Plug-in Manifest Editor.
  2. Click Launch an Eclipse Application.
    • For future tests, you can now select Eclipse Application in the run menu.
    • To enable debug mode for your test instances: open the Run Configurations dialog, select the Arguments tab of the Eclipse Application configuration, and add -debug -consoleLog as program arguments. This dumps all errors and exceptions to the console view, so you can directly see what went wrong.
    • To improve performance, select only the plugins that are necessary: in the Plug-ins tab select Launch with plug-ins selected below only, deselect Target Platform, select Workspace, and then Add Required Plug-ins.
      • Make sure that org.eclipse.ui.ide.application is also selected, else you won't be able to launch Eclipse.
      • The requirements list needs to be updated when the dependencies of your plugins have changed; click Add Required Plug-ins again for updating. 
  3. In the new Eclipse instance, click New -> Project... -> General -> Project. Enter test as the project name.
  4. Right-click the new project and click New -> File... As the file name, enter test.simple. This will create a new file with that name and open the file in your newly added text editor. (You can see that it is your editor by looking at the editor icon, which should look like the icon you downloaded and put into the icons folder.)