...
- New -> Project...
- In the project wizard, choose Plug-in Project and click Next.
- As the project name, enter
de.cau.cs.rtprakt.login.simple
. Uncheck Use default location (which would put the project into your workspace), and put it into your local clone of the Git repository instead (the Location should read something like/path/to/git/repository/de.cau.cs.rtprakt.login.simple
). Click Next. - As the name, enter
Simple (login)
. Also, make sure that Generate an activator and This plug-in will make contributions to the UI are both checked. Click Finish. (Eclipse might ask you whether you want to switch to the Plug-in Development Perspective, which configures Eclipse to provide the views that are important for plug-in development. Choose Yes. Or No. It won't have a big influence on your future...) - Eclipse has now created your new plug-in and was nice enough to open the Plug-in Manifest Editor, which allows you to graphically edit two important files of your plugin:
plugin.xml
andMETA-INF/MANIFEST.MF
. (By the way, this would be a great time to research the editor and the two files online.) Basically, those two files provide information that tell Eclipse what other plug-ins your plug-in needs and how it works together with other plug-ins by providing extensions and extension points. Our new plug-in will depend on two other plug-ins, so switch to the Dependencies tab of the editor and add dependencies toorg.eclipse.ui.editors
andorg.eclipse.jface.text
. Save the editor and close it. (You can always reopen it by opening one of the two mentioned files from the Package Explorer.) - TODO: GIT PROJECT
Create the Main Editor Class
...
- 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).
- Open the Plug-in Manifest Editor again and switch to the Extensions tab.
- Click Add..., choose the
org.eclipse.ui.editors
extension point and click Finish. - 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 toSimple Text Editor
, the icon toicons/turing-file.gif
, the extensions tosimple
, the class tode.cau.cs.rtprakt.login.simple.editors.SimpleEditorPart
, and the default totrue
. - Save and close the manifest editor.
Test the Editor