Home » Eclipse Projects » Requirements Modeling Framework » Color Requirements
| |
Re: Color Requirements [message #1098073 is a reply to message #1097497] |
Fri, 30 August 2013 15:20 |
Daniel Acki Messages: 19 Registered: August 2013 |
Junior Member |
|
|
When i follow the steps i need the org.eclipse.rmf.reqif10.pror project. Can i find this anywhere or do i have to create it myself?
And later when i try to generate the Headline.genmodel i can't load the Headline.ecore, it says: The default value literal" must be a valid literal of the attributes type.
What do i have to write in it?
[Updated on: Fri, 30 August 2013 15:29] Report message to a moderator
|
|
| | |
Re: Color Requirements [message #1109632 is a reply to message #1108185] |
Sun, 15 September 2013 18:55 |
|
Hi Daniel,
Yes, it's the same. Long story - we changed the name because we had complications with the EMF code generation from the model. If you have an Eclipse account, it would be great if you could fix the tutorial, as you go along. If not, let me know, and I'll fix it.
Thanks for bringing it up.
- Michael
|
|
| |
Re: Color Requirements [message #1115028 is a reply to message #1110161] |
Mon, 23 September 2013 14:48 |
|
Hi Daniel,
Quote:Now if i click on service it opens a class with the Methods public ProrPresentationConfiguration getConfigurationInstance() and public Class<? extends ProrPresentationConfiguration> getConfigurationInterface(). Are these the Methods getCellEditor() and getCellRenderer(), which are needed in the Guide?
It opens or creates a class? You should configure the extension point to return a class that inherits from AbstractPresentationService - check out org.eclipse.rmf.reqif10.pror.presentation.ui.IdPresentationService to see how this should work. But this is just "administration" of the extension point.
The actual work is done by the ItemProvider of the configuration element (subclassing ProrPresentationConfigurationItemProvider). By default, it implements PresentationEditInterface and may also implement PresentationEditorInterface. That's where getCellEditor() and getCellRenderer() are implemented.
I hope this helps!
- Michael
|
|
| |
Re: Color Requirements [message #1129414 is a reply to message #1115716] |
Tue, 08 October 2013 15:57 |
|
Hi Daniel,
Sorry, I missed this one.
Quote:I click on service in the Extension view and then following class is created
You can use org.eclipse.rmf.reqif10.pror.editor.presentation.service.AbstractPresentationService to create an implementation where you have to write just one line of code. Just have a look at org.eclipse.rmf.reqif10.pror.presentation.headline.ui.HeadlinePresentationService
Best,
- Michael
|
|
| |
Re: Color Requirements [message #1142323 is a reply to message #1132941] |
Thu, 17 October 2013 14:50 |
|
Hi Daniel,
Quote:And with the AbstractPresentationService i don't need the getCallEditor and getCallRenderer methods, the getConfigurationInstance Method is enough?
The PresentationService is just the entry point, the work will be done by the ItemProvider of the Configuration Element (which should be stateful).
If you want to set Renderer and Editor, then the ItemProvider must implement PresentationEditorInterface - that's where getCellRenderer and getCellEditor are defined.
Best,
- Michael
|
|
| | | |
Re: Color Requirements [message #1162554 is a reply to message #1162216] |
Wed, 30 October 2013 13:06 |
Daniel Acki Messages: 19 Registered: August 2013 |
Junior Member |
|
|
Hello, sorry i was in a hurry, when i wrote the post and didn't check if its easy to understand.
In the Presentation Configuration i now have: ID Generator, Linewrapping and Headline as choosable action. I wanted to know if one of these is the new Presentation.
And the second task was: The only ItemProvider i found was the HeadlineConfigurationItemProvider and there i implemented PresentationEditorInterface.
And i wanted to know if the HeadlineConfigurationItemProvider was the right class to implement the PresentationEditorInterface.
And another Question: I have an EMF Modell with Tests and i want to link these models with the requirement model, for example to color the requirements or to set the requirement to true. Can this be done with the Presentation or what is the best way to handle this?
Thanks
[Updated on: Thu, 31 October 2013 18:17] Report message to a moderator
|
|
|
Re: Color Requirements [message #1171778 is a reply to message #1162554] |
Tue, 05 November 2013 13:26 |
|
Hello Daniel,
Quote:I wanted to know if one of these is the new Presentation.
The name shown is derived from the name of the configuration element. Therefore, the entry for Headline could be yours, or it could be the original one. I suspect that you did not disable the Headlinepresentation that ships with RMF, therefore it's probably not yours. For testing, I recommend you to use a name that cannot be confused with an existing one.
Quote:And i wanted to know if the HeadlineConfigurationItemProvider was the right class to implement the PresentationEditorInterface.
Yes.
Quote:Can this be done with the Presentation or what is the best way to handle this?
Yes, that is exactly what Presentations are good for.
Best,
- Michael
|
|
| |
Re: Color Requirements [message #1209259 is a reply to message #1194602] |
Mon, 25 November 2013 12:18 |
|
Hi Daniel,
Quote:is it enough to change the name in the ecore Modell? In the Properties-View of Headline.ecore.
No, you also need to regenerate the code (will lead to compile errors), and there may be some other loose ends. But this is a great exercise to get familiar with the way how EMF and Plug-Ins work. It's really not that complicated.
Best,
- Michael
|
|
|
Re: Color Requirements [message #1219615 is a reply to message #1209259] |
Wed, 04 December 2013 22:46 |
Daniel Acki Messages: 19 Registered: August 2013 |
Junior Member |
|
|
Now i have changed the Name in the ecore Modell, regenerated the Code and did the same as told in the Guide, just instaed of headline i used the new name, but the new Presentation isn't shown in the Presentation Configuration. In the Guide i started at Implementing PresentationEditInterface after the new Code Generation. Was this wrong or do you have any ideas, why the Presentation isn't shown?
And another Question: When the Presentation works, i want to edit one row of the Requirement table. Can i do this using the Id Name in the code, or have i to use eachs field identifier?
[Updated on: Thu, 05 December 2013 20:52] Report message to a moderator
|
|
|
Re: Color Requirements [message #1219911 is a reply to message #1219615] |
Fri, 06 December 2013 16:27 |
|
Daniel,
> Was this wrong or do you have any ideas, why the Presentation isn't shown?
To be honest, this is just not enough information to debug why things are not working properly. If I had that problem, I'd set a breakpoint in the code where the presentation are being enumerated. As Eclipse resolves extensions at runtime by name, debugging is the best way of finding the problem. But this has nothing to do with RMF any more, this is a general Eclipse issue, and how it deals with extensions and extension points.
> When the Presentation works, i want to edit one row of the Requirement table. Can i do this using the Id Name in the code,
I am not sure what you mean. A Presentation can manage the editing of a cell, not the row. Do you mean that? I also have no idea what you mean by "Id Name" or "field identifier".
If you provide your own editor, you have to implement PresentationEditorInterface.getCellEditor(), which will give you the AttributeValue to be edited as an argument. Just make sure you use commands to update the value.
Hope this helps.
- Michael
|
|
| |
Re: Color Requirements [message #1220919 is a reply to message #1220413] |
Mon, 16 December 2013 07:45 |
|
Hi Daniel,
> With the second Question i wanted to check if it is possible to edit a complete row or just fields.
Keep in mind that the table view is merely one visual representation of the ReqIF Model. In the model, the concept of "row" does not exist at all. Thererfore, editing a row is not possible in principle.
> With Id name i meant the name in the Id column, for example REQ-1
As far as the model is concerned, this is just an AttributeValue as any other, there is nothing special about it. It is also not well-suited for uniquely identifying SpecObjects. Better use the ID property of the SpecObject, which will never ever change. In the GUI, you can inspect that property by using the advanced property tab, but of course it is read-only.
Best,
- Michael
|
|
| | | |
Re: Color Requirements [message #1230876 is a reply to message #1229538] |
Mon, 13 January 2014 09:37 |
|
Daniel,
Daniel Acki wrote on Thu, 09 January 2014 18:01
I would be nice if someone could explain, how the Parameters are used and for what they are needed.
I just improved the JavaDoc of PresentationEditorInterface a little. Also, you may want to look at org.eclipse.rmf.reqif10.pror.presentation.ui.LinewrapCellEditor to see how the interface is used.
Briefly, the parameters are needed to construct a proper Command that changes the element. In particular, setting the affectedObject properly is crucial for the EMF selection management to function correctly.
For your reference, here is the new JavaDoc:
* The cell editor must use EMF commands to set the new value. That's the reason why the other
* parameters are provided. Briefly, the easiest is to do the setting via
* {@link ProrUtil#setTheValue(AttributeValue, Object, Object, Object, EditingDomain)}, which
* allows you to just and the parameters through.
Best,
- Michael
|
|
|
Re: Color Requirements [message #1232014 is a reply to message #1230876] |
Thu, 16 January 2014 02:01 |
Daniel Acki Messages: 19 Registered: August 2013 |
Junior Member |
|
|
Hello, let's see if I got this correct
In the getCellEditor Method I call setTheValue with the parameters needt for the getCellEditor Method.
The AttributeValue is the change I want to make, affectedObject is Cell I want to edit?
Then what are EditingDomain, parent, Object value and AgileGrid?
[Updated on: Tue, 21 January 2014 14:48] Report message to a moderator
|
|
| |
Re: Color Requirements [message #1236212 is a reply to message #1232014] |
Sun, 26 January 2014 15:40 |
|
Daniel,
Quote:In the getCellEditor Method I call setTheValue with the parameters needt for the getCellEditor Method.
The getCellEditor simply returns a properly configured CellEditor, For instance:
return new LinewrapCellEditor(agileGrid, editingDomain, parent,
affectedObject);
No need to call setTheValue() there. That's done in the Editor. Again, some sample code:
protected Object doGetValue() {
String newText = (String) super.doGetValue();
ProrUtil.setTheValue(attributeValue, text.getText(), parent,
affectedObject, editingDomain);
return attributeValue;
}
The AttributeValue is the change I want to make, affectedObject is Cell I want to edit?
affectedObject is just handed through - it is required by ProrUtil.setTheValue(), to make sure that the Command sets the correct selection. No need to worry about it.
Quote:Then what are EditingDomain, parent, Object value and AgileGrid?
This is basic EMF stuff. Have you read the EMF-Book from Ed Merks?
Good Luck!
- Michael
|
|
|
Re: Color Requirements [message #1236218 is a reply to message #1234253] |
Sun, 26 January 2014 16:00 |
|
Daniel,
Quote:I would like to know, how i can achive following task:
I want to set the Enumeration Field with SpecObject identifier
rmf-17d2cd15-8cfd-4cdo-a339-16789998bef7 to true
What do I use as parameters to call
getCellEditor(AgileGrid agileGrid, EditingDomain editingDomain, AttributeValue av, SpecElementWithAttributes parent, Object affectedObject)?
Well, if you want to set the value, you don't need a CellEditor. You just have to create the correct command. For what you're trying to do, something like:
AddCommand.create(editngDomain, parent, ReqIF10Package.Literals.ATTRIBUTE_VALUE_ENUMERATION__VALUES, enumValue);
You then have to execute the resulting Command using the EditingDomain.
Good Luck!
- Michael
|
|
| |
Re: Color Requirements [message #1250688 is a reply to message #1249712] |
Wed, 19 February 2014 13:42 |
|
Hello Daniel,
Daniel Acki wrote on Tue, 18 February 2014 15:46Hello, to call the Cell I need the Idetifier of the Spec Object, not of the Spec Hierarchy?
That depends, as the cell editor is used in the Specification View (SpecHierarchy) and the Properties View (SpecObject). But there should not be a need to do anything with the Identifier.
Daniel Acki wrote on Tue, 18 February 2014 15:46Do I write the Identifier with or without the " - "?
You mean the internal identifier? This can be anything, as long as it's unique within the ReqIF File.
Best,
- Michael
|
|
| |
Re: Color Requirements [message #1250943 is a reply to message #1250820] |
Wed, 19 February 2014 19:06 |
|
Daniel, the create method works with references, not IDs. Therefore, you need a reference to the AttributeValueEnumeration, but not its ID. For instance, check out org.eclipse.rmf.reqif10.pror.editor.agilegrid.CellEditor#doGetValue():
AddCommand
.create(
editingDomain,
attributeValue,
ReqIF10Package.Literals.ATTRIBUTE_VALUE_ENUMERATION__VALUES,
itemList.get(selectedIndex))
|
|
|
Goto Forum:
Current Time: Sat Nov 09 01:10:34 GMT 2024
Powered by FUDForum. Page generated in 0.12447 seconds
|