Jump to: navigation, search

Difference between revisions of "FAQ What is the difference between a view and a viewer?"

 
m
 
Line 1: Line 1:
An unfortunate choice of terminology resulted in one of the basic building blocks of
+
An unfortunate choice of terminology resulted in one of the basic building blocks of the Eclipse workbench having a remarkably similar name to a central construct in JFace. The apprentice Eclipse programmer often falls into the trap of using the terms ''view'' and ''viewer'' interchangeably and then becomes horribly confused by conflicting accounts of their usage.  In reality, they are completely different and fundamentally unrelated constructs. As outlined earlier, JFace viewers are SWT widget adapters that, among other things, perform transformations between model objects and view objects.  Views, on the other hand, are one of the two kinds of visible parts that make up a workbench window.   
the Eclipse workbench having a remarkably similar name to a central construct
+
in JFace. The apprentice Eclipse programmer often falls into the trap of using the
+
terms ''view'' and ''viewer'' interchangeably and then becomes  
+
horribly confused by conflicting accounts
+
of their usage.  In reality, they are completely different and fundamentally unrelated
+
constructs.
+
As outlined earlier, JFace viewers are SWT widget adapters that,
+
among other things, perform transformations between model objects and view
+
objects.  Views, on the other hand, are one of the two kinds of visible parts
+
that make up a workbench window.   
+
  
 
+
To confuse matters,  a view often contains a viewer. The Navigator view, for example, contains a tree viewer.  This is not always true, however. A view may contain no viewers, or it may contains several viewers.  Viewers can also appear outside of views; for example, in dialogs or editors.  In short,  views and viewers have no fixed relationship. To put it mathematically, they are orthogonal concepts that often intersect.
To confuse matters,  a view often contains a viewer.
+
The Navigator view, for example, contains a tree viewer.  This is not always
+
true, however. A view may contain no viewers, or it may contains
+
several viewers.  Viewers can also appear outside of views; for example, in dialogs
+
or editors.  In short,  views and viewers have no fixed relationship. To
+
put it mathematically, they are orthogonal concepts that often intersect.
+
  
 
== See Also: ==
 
== See Also: ==
 +
*[[FAQ What is a viewer?]]
 +
*[[FAQ What is a view?]]
  
[[FAQ_What_is_a_viewer%3F]]
+
{{Template:FAQ_Tagline}}
 
+
[[FAQ_What_is_a_view%3F]]
+
 
+
<hr><font size=-2>This FAQ was originally published in [http://www.eclipsefaq.org Official Eclipse 3.0 FAQs]. Copyright 2004, Pearson Education, Inc. All rights reserved. This text is made available here under the terms of the [http://www.eclipse.org/legal/epl-v10.html Eclipse Public License v1.0].</font>
+

Latest revision as of 20:51, 29 May 2006

An unfortunate choice of terminology resulted in one of the basic building blocks of the Eclipse workbench having a remarkably similar name to a central construct in JFace. The apprentice Eclipse programmer often falls into the trap of using the terms view and viewer interchangeably and then becomes horribly confused by conflicting accounts of their usage. In reality, they are completely different and fundamentally unrelated constructs. As outlined earlier, JFace viewers are SWT widget adapters that, among other things, perform transformations between model objects and view objects. Views, on the other hand, are one of the two kinds of visible parts that make up a workbench window.

To confuse matters, a view often contains a viewer. The Navigator view, for example, contains a tree viewer. This is not always true, however. A view may contain no viewers, or it may contains several viewers. Viewers can also appear outside of views; for example, in dialogs or editors. In short, views and viewers have no fixed relationship. To put it mathematically, they are orthogonal concepts that often intersect.

See Also:


This FAQ was originally published in Official Eclipse 3.0 FAQs. Copyright 2004, Pearson Education, Inc. All rights reserved. This text is made available here under the terms of the Eclipse Public License v1.0.