I am a software developer working with different ERPs based on different plat开发者_高级运维forms. Java is one of them. I've decided to learn Eclipse RCP. I am trying to understand the basics of Eclipse RCP regarding its views and editors concept. Working with other platforms I don't care how to make a form in GUI. All the forms in my application can show data say from a DB or save this data back into the DB. And I don't care if a form shows the list of entities or a detailed info about an entity. Here, in Eclipse RCP, I see that a form can reside in a view or in an editor. What is the difference between them? I would like to hear these differences from a business point of view, please. Or maybe these differences can be explained only in terms like "editor cannot have its own toolbar"? I would like to understand the purposes or common usages as a user not as a developer.
Thank you.
The wiki has a goof FAQ on this topic
- There is generally only one instance of a given view per workbench page, but there can be several instances of the same type of editor.
- Editors can appear in only one region of the page, whereas views can be moved to any part of the page and minimized as fast views.
- Editors can be in a dirty state, meaning that their contents are unsaved and will be lost if the editor is closed without saving.
- Views have a local toolbar, whereas editors contribute buttons to the global toolbar.
- Editors can be associated with a file name or an extension, and this association can be changed by users.
Some advanced use are mentioned
- here, about the ability to reuse an editor for several types of file.
- or there, for linking to an editor
Views can have a different organization than editor: see fast view.
In broad terms:
- Use editors for the main editable "documents".
- Document lifecycle (open/dirty/save/close) fits neatly with editors.
- Use all sorts of rich controls, hyperlinks, etc. It doesn't have to be a text editor.
- Use views to provide optional supplementary analysis/manipulation of the document in the current editor.
- Use views for other (often cross-document) navigation, analysis, search results, etc.
精彩评论