properties view [message #223926] |
Mon, 09 October 2006 09:49 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.04041 seconds