Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
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 Go to next message
masija . is currently offline masija .Friend
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 Wink

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 Go to previous messageGo to next message
Michael Jastram is currently offline Michael JastramFriend
Messages: 161
Registered: April 2010
Location: Düsseldorf, Germany
Senior Member
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 Go to previous messageGo to next message
masija . is currently offline masija .Friend
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 Wink

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 Wink

Masija

[Updated on: Tue, 26 June 2012 13:07]

Report message to a moderator

Re: Custom Properties Tab for a specific Attribute Definition [message #892136 is a reply to message #891857] Wed, 27 June 2012 07:52 Go to previous messageGo to next message
Michael Jastram is currently offline Michael JastramFriend
Messages: 161
Registered: April 2010
Location: Düsseldorf, Germany
Senior Member
Hi,

what you're trying to do you can do with a Presentation Plutonium, which allows you to plug in your own renderer and editors. There is a tutorial.

Typing on handheld, excuse brevity.

Michael
Re: Custom Properties Tab for a specific Attribute Definition [message #892192 is a reply to message #891844] Wed, 27 June 2012 11:21 Go to previous messageGo to next message
masija . is currently offline masija .Friend
Messages: 59
Registered: July 2010
Member
Hi Michael,

thanks for your reply and your hint with the presentation... I'll give this a try!

Best regards
Re: Custom Properties Tab for a specific Attribute Definition [message #892277 is a reply to message #892192] Wed, 27 June 2012 15:05 Go to previous messageGo to next message
masija . is currently offline masija .Friend
Messages: 59
Registered: July 2010
Member
If I follow the tutorial, I get an error in the generated classes that the
import org.eclipse.rmf.pror.reqif10.ReqIF10Package
can not be resolved. Actually I think this sould be
import org.eclipse.rmf.pror.ReqIF10Package
, but I don't know where to change this ... Did anything change since the publishing date of the tutorial?

Best regards

[Updated on: Wed, 27 June 2012 15:22]

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 Go to previous messageGo to next message
Michael Jastram is currently offline Michael JastramFriend
Messages: 161
Registered: April 2010
Location: Düsseldorf, Germany
Senior Member
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
Re: Custom Properties Tab for a specific Attribute Definition [message #892324 is a reply to message #892319] Wed, 27 June 2012 17:45 Go to previous messageGo to next message
masija . is currently offline masija .Friend
Messages: 59
Registered: July 2010
Member
Hi Michael,

thanks for your help, I will give this a try tomorrow and clarify this in the wiki.

Masija

[Updated on: Wed, 27 June 2012 17:46]

Report message to a moderator

Re: Custom Properties Tab for a specific Attribute Definition [message #892480 is a reply to message #892324] Thu, 28 June 2012 12:00 Go to previous message
masija . is currently offline masija .Friend
Messages: 59
Registered: July 2010
Member
This was exactly what I needed, the presentation works as a charm and is quite easy to implement! So thanks again for your help.
Previous Topic:org.agilemore.agilegrid 1.2.3 can not be resolved
Next Topic:Importing ReqIf file into ProR
Goto Forum:
  


Current Time: Mon Nov 24 00:30:56 GMT 2014

Powered by FUDForum. Page generated in 0.02795 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software