Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

UPDATE - Problems with customising properties view  RSS feed

Sarah Connor
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've a multi-page editor containing a Tree Table. I'm currently trying to customise the properties page for each TableItem on the tree page.

I'm really struggling with this. I've found some examples for customising the properties view with GEF objects but none for swt objects. I've also tried the example on the eclipse "Take control of your properties" article but it crashes on my machine.

Could anyone point me in the correct direction of some tutorials/examples? I'm tearing my hair out after three days of what seems like wasted effort.

I'm try to see a custom properties view for a button in one of my editors. When I click on the button I want to show a custom properties view showing the property text and the value "hello"

In my editor page I have added a SelectionProvider in the addPagesWithExc method

if (this.getSite() != null) {
this.getSite().setSelectionProvider(new SelectionProvider());

In my page (that I add to my editor) I add a button to the page
Button button = new Button(client, SWT.PUSH);
ButtonAdapter buttonAdapter = new ButtonAdapter(button, "Button");
I then add the button to a buttonAdapter (which implements IWorkbenchAdapter,IAdaptable)

Then I add the IAdaptable to and adapterList (extends WorkbenchAdapter implements IAdaptable)

I also have implemented a property source for the button
ButtonElementPropertySource implements IPropertySource which provides a TextPropertyDescriptor

I obviously need someway to connect them all up but I'm a bit flummoxed by this.
[ December 19, 2007: Message edited by: Sarah K ]
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!