Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » PropertiesView based on EMF.edit Framework
PropertiesView based on EMF.edit Framework [message #188237] Tue, 19 July 2005 15:38 Go to next message
Andreas Holtz is currently offline Andreas HoltzFriend
Messages: 53
Registered: July 2009
Member
Hello,

I need some help with showing properties in a propertyView based on the
emf.edit framework.

What I had realized since now:
The editpart which owns the properties returns a propertySoure within it
getAdapter()-method.
this propertySource work with a propertySource which based on Factories
created by the emf.edit framework:

public NewPropertySource(EObject object){
itsObject = object;
List factories = new ArrayList();
factories.add(new ResourceItemProviderAdapterFactory());
//lots of factories
//...
factories.add(new ReflectiveItemProviderAdapterFactory());
adapterFactory = new ComposedAdapterFactory(factories);
AdapterFactoryContentProvider contentProvider = new
AdapterFactoryContentProvider(adapterFactory);
itsPropertySource = contentProvider.getPropertySource(object);
}

all methods of NewPropertySource are delegated to itsPropertySource.
At this point, the properties are shown correctly.

The problem is, that if I try to edit the properties, there are errors.
For example: To the valid()-Method of the
EDataTypeCellEditor#isValid(Object object) an
ItemPropertyDescriptor$PropertyValueWrapper is passed, not a EDataType.

It would be really nice if someone could give me a hint or show me an
example, where GEF uses emf.edit (not the merlin-example. they use
merlin-classes).

thanx in advance

Andreas
Re: PropertiesView based on EMF.edit Framework [message #188268 is a reply to message #188237] Tue, 19 July 2005 16:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.unknown.com

You might find it easier to not use the EMF-generated properties and just
create your own, that will work better with GEF. If you must, however, then
check out the EDiagram example with the tag "oldProperties."

"Andreas Holtz" <A.Holtz@gmx.net> wrote in message
news:dbj6q9$ce$1@news.eclipse.org...
> Hello,
>
> I need some help with showing properties in a propertyView based on the
> emf.edit framework.
>
> What I had realized since now:
> The editpart which owns the properties returns a propertySoure within it
> getAdapter()-method.
> this propertySource work with a propertySource which based on Factories
> created by the emf.edit framework:
>
> public NewPropertySource(EObject object){
> itsObject = object;
> List factories = new ArrayList();
> factories.add(new ResourceItemProviderAdapterFactory());
> //lots of factories
> //...
> factories.add(new ReflectiveItemProviderAdapterFactory());
> adapterFactory = new ComposedAdapterFactory(factories);
> AdapterFactoryContentProvider contentProvider = new
> AdapterFactoryContentProvider(adapterFactory);
> itsPropertySource = contentProvider.getPropertySource(object);
> }
>
> all methods of NewPropertySource are delegated to itsPropertySource.
> At this point, the properties are shown correctly.
>
> The problem is, that if I try to edit the properties, there are errors.
> For example: To the valid()-Method of the
> EDataTypeCellEditor#isValid(Object object) an
> ItemPropertyDescriptor$PropertyValueWrapper is passed, not a EDataType.
>
> It would be really nice if someone could give me a hint or show me an
> example, where GEF uses emf.edit (not the merlin-example. they use
> merlin-classes).
>
> thanx in advance
>
> Andreas
Re: PropertiesView based on EMF.edit Framework [message #188367 is a reply to message #188268] Wed, 20 July 2005 08:57 Go to previous messageGo to next message
Andreas Holtz is currently offline Andreas HoltzFriend
Messages: 53
Registered: July 2009
Member
Pratik Shah schrieb am 19.07.2005 18:00:
> You might find it easier to not use the EMF-generated properties and just
> create your own, that will work better with GEF. If you must, however, then
> check out the EDiagram example with the tag "oldProperties."
>

Hi Pratik,

I thought I oversaw this example, but some weeks ago I posted a question
"why is org.eclipse.gef.ui.properties.UndoablePropertySheetEntry final?".
The reason was, that the ediagramm example does not work with the
current version of GEF.

The reason, why I want to use generated properties is, that I did not
find a way to create properties for EReferences. EMF generates a really
nice dialog, where you can add multiple elements to your model.
I did not find a way to use this dialog. So if you (or someone else)
ould give me an hint, I could solve this or I have to switch back to an
older version of GEF (and maybe stay there..)

The ediagramm example seems not to use this dialog. There you implement
your own dialog and this is quite difficult for me.

Andreas
Re: PropertiesView based on EMF.edit Framework [message #188842 is a reply to message #188367] Fri, 22 July 2005 19:18 Go to previous message
Eclipse UserFriend
Originally posted by: none.unknown.com

Yes, unfortunately, that tagged version of the example works with an older
GEF version. You can open a feature request to have
UndoablePropertySheetEntry be not made final.

"Andreas Holtz" <A.Holtz@gmx.net> wrote in message
news:dbl3m3$ufh$1@news.eclipse.org...
> Pratik Shah schrieb am 19.07.2005 18:00:
> > You might find it easier to not use the EMF-generated properties and
just
> > create your own, that will work better with GEF. If you must, however,
then
> > check out the EDiagram example with the tag "oldProperties."
> >
>
> Hi Pratik,
>
> I thought I oversaw this example, but some weeks ago I posted a question
> "why is org.eclipse.gef.ui.properties.UndoablePropertySheetEntry final?".
> The reason was, that the ediagramm example does not work with the
> current version of GEF.
>
> The reason, why I want to use generated properties is, that I did not
> find a way to create properties for EReferences. EMF generates a really
> nice dialog, where you can add multiple elements to your model.
> I did not find a way to use this dialog. So if you (or someone else)
> ould give me an hint, I could solve this or I have to switch back to an
> older version of GEF (and maybe stay there..)
>
> The ediagramm example seems not to use this dialog. There you implement
> your own dialog and this is quite difficult for me.
>
> Andreas
Previous Topic:Layout for graphs with cycles
Next Topic:Refreshing Images
Goto Forum:
  


Current Time: Fri Apr 26 12:58:51 GMT 2024

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

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

Back to the top