Home » Eclipse Projects » Requirements Modeling Framework » Custom Properties Tab for a specific Attribute Definition
Custom Properties Tab for a specific Attribute Definition [message #891844] |
Tue, 26 June 2012 09:20  |
masija . Messages: 59 Registered: July 2010 |
Member |
|
|
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 #891852 is a reply to message #891844] |
Tue, 26 June 2012 09:47   |
|
Hello Masija,
Maybe I misunderstand what you're trying to achieve, but I believe that what you're trying to do is part of the core ProR functionality. If you would like an additional attribute, you can use the Datatype Configuration Editor (Menu ProR | Datatype Configuration). Simply add a new attribute to the SpecType that you would like to extend, using the context menu. New attributes will appear automatically in the Properties view.
Hope this helps!
- Michael
|
|
|
Re: Custom Properties Tab for a specific Attribute Definition [message #891857 is a reply to message #891852] |
Tue, 26 June 2012 10:34   |
masija . Messages: 59 Registered: July 2010 |
Member |
|
|
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 13:07] Report message to a moderator
|
|
| | | |
Re: Custom Properties Tab for a specific Attribute Definition [message #892319 is a reply to message #892277] |
Wed, 27 June 2012 17:37   |
|
Hi Masija,
This is something that should definitely be added to the tutorial! We use different package name for model and item provider files, something that EMF cannot handle. This results in compile errors in the generated files.
There is a hack to fix this: Open every file with compile errors and organize imports (Ctrl-Shift-O).
The "correct" resolution for this issue would be to fix the generator templates, but I didn't get to this yet.
It you have the time, it would be great if you could edit the Wiki and correct (or clarify) problems like this one.
Cheers,
- Michael
|
|
| | |
Goto Forum:
Current Time: Thu Oct 05 04:09:49 GMT 2023
Powered by FUDForum. Page generated in 0.02133 seconds
|