Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Implementing features on which level?
Implementing features on which level? [message #721600] Fri, 02 September 2011 09:03 Go to next message
Christian B is currently offline Christian BFriend
Messages: 68
Registered: August 2011

I need some best practice advice on which level to implement features.

An easy example model:
<dialog title="someTitle" message="someMessage">
		<button label="Ok" value="0" />
		<button label="Cancel" value="1" />

So lets say i Have an Add and a Create feature for a Dialog and the same for buttons. (The graphical representation is just some simple square with text fields for title, message and a List of the button labels)

Some questions to other standard features:

  • Direct Edit:
    Lets say i want direct editing for both title and message. Do i need a feature for each text field? Or do i have one feature for the dialog and this feature decides which text field is selected for direct editing?
  • Update:
    One Update feature for dialog and one for button?
    The dialog update feature checks for changes on title, message and then delegates the update check to the update feature of each button?

Thx for your help!

[Updated on: Fri, 02 September 2011 14:00]

Report message to a moderator

Re: Implementing features on which level? [message #722240 is a reply to message #721600] Mon, 05 September 2011 06:48 Go to previous message
Matthias Gorning is currently offline Matthias GorningFriend
Messages: 81
Registered: April 2010
Location: Germany
Direct Edit:

You can do this with one direct edit feature. The feature provider should know which text label is affected. You should put this value in the constructor of your feature.

The feature itself must differentiate this text labels. E.g. provide different validation handling.


Your idea is the right one. You should do this via delegation. In the class AbstractFeatureProvider is method which you can use for that purpose:

public IReason updateIfPossible(IUpdateContext context)

Previous Topic:DiagrammEditor with XML Domain Model
Next Topic:Editor marked dirty after loading default diagramm on startup
Goto Forum:

Current Time: Fri Dec 04 08:46:17 GMT 2020

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

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

Back to the top