User Tools

Site Tools


Sidebar

Dave Orme muses about data-first development.

My current work emphasizes data engineering and analysis using Kubernetes, Clojure, Scala, Eclipse, and Google Cloud Platform or AWS.


Blog

The Cloud

Scala, Clojure, and FP

Data-First Development

Agile

Older work

Coconut Palm Software home


Donate Bitcoin:

1Ecnr9vtkC8b9FvmQjQaJ9ZsHB127UzVD6

Keywords:

Kubernetes, Docker, Streaming Data, Spark, Scala, Clojure, OSGi, Karaf, GCP, AWS, SQL

Disclaimer:

Everything I say here is my own opinion and not necessarily that of my employer.

blog:view_versus_editor_in_rcp

View versus Editor in RCP

At http://blog.cypal-solutions.com/2008/05/to-view-or-not-to-view.html, Prakash describes the following distinctions between views and editors:

  • Editors contribute to the global action bars, and views to its local action bar.
  • In the layout, editors have a special place called editorArea where all the editors will go. Views can go anywhere else, including fast views, detachable ones, etc.

He also points out that it's a common misconception that views don't support the save action. The save action will be enabled for a view if it implements ISaveablePart.

To me, this isn't the crux of the issue, however.

When to use a View versus an Editor

The only real difference between a view and an editor is that there is exactly 1 editor area and once visible, it is always visible even if no editors are open.

When would one care?

If your application has an open/edit/close life cycle (even if saving is implicit), the thing you edit probably should be an editor.

For example, in an order entry application, the order editor probably should be an Eclipse Editor, not a View. The thing that opens the order editor will likely be a View (or maybe another Editor, depending on the application).

If you try to make the thing you open, edit, and close into a view, then if the user closes all of the “editing views”, the space occupied by the view stack will disappear.

But if you make it an editor, then the editor area will remain even when all currently-opened editors are closed. This way it will be obvious to the user that s/he can still open a new thing to edit.

Conclusion

Use an editor for things you want the user to be able to open, edit, and close. And if it's reasonable, design your application around this user interface idiom since Eclipse supports it well.

Use a View as a device for browsing the things you can edit and/or for supplying additional information about the thing currently being edited.

~~LINKBACK~~ ~~DISCUSSION:closed~~

blog/view_versus_editor_in_rcp.txt · Last modified: 2014/10/17 22:08 (external edit)