Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Question for Documentation (Detailed description of writing own Module extending MvcFxModule)
Question for Documentation [message #1802669] Wed, 13 February 2019 16:58 Go to next message
Sebastian Heinrich is currently offline Sebastian HeinrichFriend
Messages: 24
Registered: July 2018
Junior Member
Hello everybody

I am starting do get into GEF MVC stuff as we want to build a new application with it.
I have some experience building applications on top of eclipse platform but rather less experiance with GEF (just maintained an application where GEF 3 was used, but I was not the author of the GEF code there).

Ok now my question: I just did the tutorial that Alexander Nyßen put on itemis homepage and read around and tried to just start an own small example.
There are plenty of possibilities one can bind an adapter to and even more roles with which it is possible to bind adapters.
Is there any place of documentation where this is documented/explained?
What possibilities are there, which policies and behaviours are already implemented (I know I can have a look into GEF source code but I just want to use it as a framework and not develope GEF :-) ) and to which "places" I can bind adapters and which roles can they have?

Since this is aggregated in writing an own module extending MvcFxModule is there a detailed documentation what possibilites are available. I mean from the view of a framework user?

Best regards

Sebastian
Re: Question for Documentation [message #1802904 is a reply to message #1802669] Mon, 18 February 2019 18:42 Go to previous messageGo to next message
Matthias Wienand is currently offline Matthias WienandFriend
Messages: 230
Registered: March 2015
Senior Member
Hi Sebastian,

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.

Example: Interactions:

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.

Other:
- 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 [1]. 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 [2].

[1] https://github.com/eclipse/gef/wiki/MVC#handlers
[2] https://github.com/eclipse/gef/wiki#further-reading

Best regards,
Matthias

[Updated on: Mon, 18 February 2019 18:44]

Report message to a moderator

Re: Question for Documentation [message #1802923 is a reply to message #1802904] Tue, 19 February 2019 07:21 Go to previous messageGo to next message
Sebastian Heinrich is currently offline Sebastian HeinrichFriend
Messages: 24
Registered: July 2018
Junior Member
Hi Matthias

Many thanks for this long answer.
I will try to find time to read in the next few days.

Thanks in advance.

Sebastian
Re: Question for Documentation [message #1803078 is a reply to message #1802923] Thu, 21 February 2019 21:33 Go to previous message
Matthias Wienand is currently offline Matthias WienandFriend
Messages: 230
Registered: March 2015
Senior Member
Take your time and feel free to come back with questions so we can fix this documentation issue :-D
Previous Topic:Undo/Redo button, ignore scroll down/up events
Next Topic:How to correctly delete Part
Goto Forum:
  


Current Time: Tue Sep 28 11:30:52 GMT 2021

Powered by FUDForum. Page generated in 0.01637 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top