Changes

Jump to: navigation, search

Teams Winter 2011/team1/RCP/Define and use editors

31 bytes added, 19:32, 4 March 2011
3. Define and Use Editors
=== 3. Define and Use Editors ===
====3.1 Editor area====
The first step to add editor area to the application is to make the visibility of the editor area in <code>Perspective.java </code> to <code> true </code>.
}
</source>
====3.2 Add input editor====
IEditorInput serves as the model for the editor and is supposed to be a light-weight representation of the model. For example the Eclipse IDE uses this concept to identify files without handling with the complete file. Based on the equals method the system will determine if the corresponding editor is already open or not therefore you should overwrite the method equals and hashcode in an implementation of IEditor.
====3.3 Adding the editor====
Now we should add the <code>''editor''</code> to our extensions.<br/>
Go to <code>''plugin.xml''</code> and select the tab extensions. Add the extension <code>''org.eclipse.ui.editors''</code>.<br/>
====3.4 Open editor====
The way we want to interact with the editor is, whenever we double click on a field, the editor opens in its area.<br/>
We need to take two steps for this:
1
edit

Navigation menu