然后,将图模型对象传递给查看器。
在本文的例子中,当查看器包含有作为emf模型的实例的对象时,将调用导航器内容。
In our case, our navigator content will be invoked when the viewer contains an object that is an instance of an EMF model.
通常,EMF项目资源 — 如 EMFEcore模型 —作为查看器中的单个对象进行显示(见图1的左侧)。
Typically, EMF project resources — EMF Ecore models, for example — are displayed as single objects in a viewer (see left side of Figure 1).
可能得到的子元素规定了扩展何时为查看器中的对象提供父对象,在本文的例子中,这些对象指的是EMF模型对象或资源的实例。
The possible children element dictates when our extension can provide parents for objects in the viewer, in our case these are objects that are instances of EMF model objects or resources.
一个需要注意的重要方面是,树形查看器通过称为内容提供程序的适配器访问模型对象,并使用标签提供程序确定显示对象的方式。
One important aspect to note is that tree viewers access model objects through an adapter called a content provider and determine how the object should be visualized through a label provider.
在设定查看器的内容时,您可以通过为该查看器提供表示输入的模型对象来完成。
When you set the viewer's contents, you do so by providing the model object that represents the input for that viewer.
在设定查看器的内容时,您可以通过为该查看器提供表示输入的模型对象来完成。
When you set the viewer's contents, you do so by providing the model object that represents the input for that viewer.
应用推荐