Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » properties view
properties view [message #223926] Mon, 09 October 2006 09:49 Go to next message
Eclipse UserFriend
Originally posted by: Sferzah.yandex.ru

in my simple editor,
when i create a new object, his properties view is clear, properties
appear after reclick by another object. where can be a mistake?
Re: properties view [message #228446 is a reply to message #223926] Thu, 21 December 2006 08:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: zoube76.hotmail.com

Hi Alexey. I have the same problem. It only goes away if I specify the following:

public Object getAdapter(Class type){
if(type == IPropertySheetPage.class){
return null;
}
return super.getAdapter(type);
}

within your editor class. However this does not solve the problem completely. The properties of the shape appearing in the view update only on SelectionChanged events, which is probably not what we want...

Does anybody know how to rectify this?

Cheers
Re: properties view [message #228454 is a reply to message #228446] Thu, 21 December 2006 09:02 Go to previous message
Eclipse UserFriend
Originally posted by: zoube76.hotmail.com

Ok, it seems that I should have paid more attention to other posts first. What needs to be done is to provide a method to return a non-null array of IPropertyDescriptors in the base class of the model, in my case ModelElement:

public IPropertyDescriptor[] getPropertyDescriptors() {
return new IPropertyDescriptor[0];
}

Thanks to Jeff Higgins for that...

And disregard my previous post on returning null. It should be like this:

public Object getAdapter(Class type){
if(type == IPropertySheetPage.class){
getPropertySheetPage();
}
}
Cheers
Previous Topic:GEF Shapes-RCP example and Property View
Next Topic:Draw2d polyline
Goto Forum:
  


Current Time: Fri Apr 19 21:12:47 GMT 2024

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

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

Back to the top