Properties view add buttons [message #199829] |
Fri, 01 August 2008 12:34 |
Eclipse User |
|
|
|
Originally posted by: sk_stani.gbg.bg
Hallo,
Is there any way to put buttons instead of cells in the properties view
and of course get notification for pressing them.
Best Regards,
Stanislav
|
|
|
|
|
|
|
Re: Properties view add buttons [message #200097 is a reply to message #199910] |
Mon, 04 August 2008 12:42 |
Eclipse User |
|
|
|
Originally posted by: sk_stani.gbg.bg
Hi,
As i said i founded where the properties view is created but i just can't
get my properties to show in a customed way. every thing is fine before
the method setPropertySourceProvider which in my opinion doesn't even
executes. I don't get any exception but the properties view is blank. Can
you please help me.
|
|
|
|
Re: Properties view add buttons [message #200142 is a reply to message #200105] |
Mon, 04 August 2008 14:09 |
Eclipse User |
|
|
|
Originally posted by: sk_stani.gbg.bg
propertySheetPage.setPropertySourceProvider
(new AdapterFactoryContentProvider(adapterFactory)
{
@Override
protected IPropertySource createPropertySource(Object object,
IItemPropertySource itemPropertySource)
{
return
new PropertySource(object, itemPropertySource)
{
@Override
protected IPropertyDescriptor
createPropertyDescriptor(IItemPropertyDescriptor itemPropertyDescriptor)
{
return
new PropertyDescriptor(object, itemPropertyDescriptor)
{
@Override
public CellEditor createPropertyEditor(Composite
composite)
{
// Test for your case based on the feature or the
type of the feature.
// See the super method for details.
//
Object feature =
temPropertyDescriptor.getFeature(this.object);
return super.createPropertyEditor(composite);
}
};
}
};
}
});
}
Sorry for wasting your time but i really got stuck. In this code where and
how should i call the overridden methods. Because as my inspections showed
that they are never called?
|
|
|
|
Re: Properties view add buttons [message #200171 is a reply to message #200165] |
Mon, 04 August 2008 15:38 |
Eclipse User |
|
|
|
Originally posted by: sk_stani.gbg.bg
Yes in the main edir class of *.diagram.part. and this is the overridden
getAdapter
@Override
public Object getAdapter(Class type) {
if (type.equals(IPropertySheetPage.class)) {
MindmapEditor editor = new MindmapEditor();
return editor.getPropertySheetPage();
} else
return super.getAdapter(type);
}
and the set method i called inside getPropertySheetPage();
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04605 seconds