Components

Here we list the behaviors that can be customized for all components.

  • If you need a machanism to fill some data for the first time you use a model, you can provide a specific implementation of Emty Resource Initializer.
  • If you want to interact with Resource Loading, you can provide a specific Resource Loader

For what concern saving objects, there are some specific parts that can be customized:

The following sections describe the basic components provided, that are the foundations for all parts built upon Emf Parsley. For each component we present a set of customizations, just to get an idea of how it works. You can refer to Customization Section for a complete list.

Top

Form Component

The Form Component can be used to rapresent an EObject (src) in a row-oriented form, like in the image above.

For each EStructuralFeature (src) defined for the EClass (src) (that is the type of the object to rapresent), the component builds a row with a label with the name of the feature and a control to access the data. It can be used the factory to create such a component, like in the code below.

formComposite = formFactory.createFormDetailComposite(parent, SWT.NONE);
formComposite.init(eObject);

The form component can be customized in many way, in particular the feature list, the labels and the controls.

Form Customizations

The Form Component can be customized in several way. Here the complete list.

  • The list fo feature displayed on the form can be customized via the Feature Provider to select the features or the order.
  • The description on the left side of the form caan be customizzed via the Property Description Provider.
  • Otherwise to customize the controls on the right, you can use the Form Control Factory.
  • Depending on the feature types, can be some fields that use predefined values (e.g. combo). You can provide the exact proposal list via the Proposal Provider.

Top

Tree Component

The Tree Component provides a tree rapresentation of data that can be feeded with an EResource, a Resource URI, and a simple EObject. This component use the EMF Meta-Model information to display objects in the tree.

Tree Customizations

The Tree Componentcan be customized in several way via the standard EMF Edit facilities or with the EMF Parsley codeinjection based mechanism. If you are familiar with Jface APIs, you can easily use the basic class with some facilties to define the specific implementation. See the corrisponding sections for more details.

TODO

Top

Tree Form Component

The Tree Form Component contains a section TreeComponent that provides a tree rapresentation of data that can be feeded with an EResource, a Resource URI, and a simple EObject. This component use the EMF Meta-Model information to display objects in the tree. The component also combines a section FormComponent detail that display the current selected object.

Tree Form Customization

Since Tree Form Component is a combination of Tree Component and Form Component, all their customizations are avaible for it.

Top

Table Component

The Table Component can rapresent data in a grid, once you have specified what kind of object need to be rapresented. It uses metamodel infos to build column as needed.

To be continued