Home » Eclipse Projects » GEF » Question for Documentation (Detailed description of writing own Module extending MvcFxModule)
|Re: Question for Documentation [message #1802904 is a reply to message #1802669]
||Mon, 18 February 2019 18:42
|| Matthias Wienand
Registered: March 2015
unfortunately, adapters and their dependencies are under-documented, as you already figured.
However, separation into Viewers, Models, Parts, Behaviors, Factories, Providers, Gestures, Handlers, Policies, and Supports helps understand the adapter setup. (However, the module will look awkward nonetheless.)
An adapter can be adaptable-bound. That just means it has a back-reference to its adaptable, i.e. the object where the adapter is registered.
Adapters are only injected into an adaptable if that adaptable's adaptable-chain is closed. This is very similar to the "bootstrapping" being performed during regular injection. In GEF, you usually start with a Domain as the top adaptable.
Bound to the domain are the individual Viewer adapters. Each Viewer has exactly one adapted RootPart, as well as any number of other Visual Parts (Content, Feedback, and Handle Parts). Usually, the parts will serve as adaptables for Handler adapters that process user interaction. These handlers often make use of Policy adapters that are also bound, for example, to individual parts or a viewer. A Policy is a special adapter that provides an interface for manipulation of something. When manipulation is finished, the policy is commited, resulting in an Operation that is capable of executing and undoing certain changes.
The domain also serves as the adaptable for a number of Gesture adapters that implement event listeners and forward event data on to corresponding Handler adapters at the parts that control the visuals the user is interacting with.
- Model, Behavior, and Factory are usually bound to a viewer. Examples: SelectionModel, SelectionBehavior, SelectionFeedbackPartFactory, SelectionHandlePartFactory, etc.
- Provider<T> may be bound to some adaptable so that other parts of the code base can query certain data from that adaptable (e.g. selection color, feedback geometry, etc.).
- Support adapters may be used to reuse code from other adapters (usually handlers), similar to policies, but not restricted to the policy interface.
You need to consult the documentation to find the available adapters. They are grouped in "handlers", "policies", etc. packages . It does also help to think about the adapters that you need for a new application on the basis of GEF, e.g. writing down the necessary Handlers (i.e. user interaction) with descriptive names might let you derive necessary Parts, Gestures, and Policies or Supports.
PS: The Mind Map Tutorial was written and implemented by Hannes Niederhausen. However, Alexander Nyßen has also published various material on GEF in the form of blog articles (as part of his personal blog), as well as slides / recorded videos, which you can find referenced in the GEF Wiki @ GitHub .
[Updated on: Mon, 18 February 2019 18:44]
Report message to a moderator
Current Time: Tue Sep 28 11:30:52 GMT 2021
Powered by FUDForum
. Page generated in 0.01637 seconds