Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Properties drop down box, many elements
Properties drop down box, many elements [message #645331] Thu, 16 December 2010 16:04 Go to next message
Eclipse User
Originally posted by: marius.groeger.googlemail.com

Hello,

I'm facing the problem that I need to assign an associated element from
a huge list of candiates. The standard drop down box of the properties
view will not do the job, I'm dealing with thousands of objects. So I
need a hand crafted dialog for the. Can I override the properties page
WRT this?

One option I do see would be an Open Edit Policy. In that case I would
need to turn off the drop down box to avoid causing the the gui choking
on the user.

Thanks for any hints,
Marius
Re: Properties drop down box, many elements [message #645753 is a reply to message #645331] Mon, 20 December 2010 12:16 Go to previous messageGo to next message
Michael Golubev is currently offline Michael Golubev
Messages: 373
Registered: July 2009
Senior Member
Hello,

You can check how it had been done in the UML2Tools here:.

We are basically replacing the default combobox properties support by our own dialog similar to the JDT Open Type (ctrl-shift-t) one.

This had been done by replacing the default property section by the

- code similar to org.eclipse.uml2.diagram.common.sheet.UMLPropertySection, generated to every diagram plugin.
- that uses the decorated PropertySourceExtension (decorator over default EMF PropertySource)
- that in turn uses ReferencePropertyDescriptor that actually do the work in the createPropertyEditor

I am prettry sure it may be used as a starting point for implementing of your scenario.

Regards,
Michael
Re: Properties drop down box, many elements [message #645915 is a reply to message #645753] Tue, 21 December 2010 07:56 Go to previous messageGo to next message
Eclipse User
Originally posted by: marius.groeger.googlemail.com

Michael,

On 20.12.2010 13:16, Michael Golubev wrote:
> Hello,
> You can check how it had been done in the UML2Tools
....

> I am prettry sure it may be used as a starting point for implementing of
> your scenario.
> Regards, Michael

As it happened I have arrived at just the same solution myself by now
:-), but thanks for the link and confirming I did the right thing. Once
I had understood what's going on, the problem was surprisingly simple
and elegant to solve. (My typical Eclipse coding experience: you need to
research until you can re-invent the wheel, but only then you're
enlightened enough to find the ready-prepared wheel to use...)

As an addendum, I also began using EMF annotations in this context, so I
can put annotations in the EMF model that control how the properties
behave. I haven't used this much yet, but I find it kinda cool.

Regards
Marius
Re: Properties drop down box, many elements [message #669714 is a reply to message #645915] Wed, 11 May 2011 09:06 Go to previous message
Cindy  is currently offline Cindy
Messages: 59
Registered: May 2011
Member
I also come up with a question about property drop down box here which tortured me for a couple of days
Sad I want to implement the visual modeling editor for , let's say , a class diagram with a special function. For example , the classes which are modeled by users could be a kind of datatype of class attributes for other class. I want this kind of user-defined datatypes implemented in a combobox with the built-in datatypes. But I have no idea how to realize this?
have you got any idea here to solve this? Thanks a lot
Previous Topic:Displaying several features in element
Next Topic:data type conversion in OCL
Goto Forum:
  


Current Time: Thu Oct 30 14:46:25 GMT 2014

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

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