Custom Properties Tab for a specific Attribute Definition [message #891844] |
Tue, 26 June 2012 05:20  |
Eclipse User |
|
|
|
Hi,
I am trying to implement a custom properties tab in the properties view of the pror editor, for a user created Attribute Definition. For example if the Attribute Definition "Description" is not enough, and the user wants to add some information in prose, a custom properties tab with a textbox which allows the editing of the specific Attribute Value would be very helpful.
As the ProR code is very extensive, some help would be nice, on how to implement such a custom properties tab.
So far, I added a TabItem with a SWT StyledText to the ProrPropertySheetPage, and added this styled text object to the selectionChanged Method, to set the Attribute Definitions value to the styled text object, if a selction change occurs.
Now I am trying to find out, how I could possibly save the contents of the textbox to the reqIF model... without messing the existing code up 
Any hints, comments or help would be appriciated!
Best regards,
Masija
|
|
|
|
Re: Custom Properties Tab for a specific Attribute Definition [message #891857 is a reply to message #891852] |
Tue, 26 June 2012 06:34   |
Eclipse User |
|
|
|
Hi Michael,
first of all, thanks for your fast reply!
What you explained is exactly what I did, I defined a new Attribute with the menu.
This attribute is displayed in the properties view and I added it as a new collum.
Unfortunately the standard properties view is not sufficient, I need a styledText field for this new attribute.
My idea was, to add a new properties tab, to the two existing (Standard Attributes, All Attributes) tabs, which has a styledText field and allows only the editing of the self defined attribute.
Sorry for the undetailed description of my problem in the first place, I hope this addition helps to unterstand it 
My current approach is, to change your implementation of ProrPropertySheetPage. There I added a new TabItem with a SWT StyledText, added a modifiedListener to this StyledText object, which saves the changes to the model, and changed your implementation of the selectionChanged method to set the text of the StyledText object to the value of my custom created AttributeValue. All in all, this works, but is a very unellegant solution, perhaps you have a better idea how to accomplish such a change of proR 
Masija
[Updated on: Tue, 26 June 2012 09:07] by Moderator
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.09360 seconds