|Re: How to open the SpecificationEditor programmatically [message #1734602 is a reply to message #1734598]
||Thu, 09 June 2016 18:49
|| Michael Jastram
Registered: April 2010
Location: Düsseldorf, Germany
> I guess I have to open this one, right?
Yes, this acts as the main conduit to the .reqif file. We were contemplating to do this vis Sphinx, which could do without it (but so far, we have no strong incentive to do so).
> 2) I can then call Reqif10Editor.openSpecEditor(...), but I need a Specification object as parameter.
The problem is, a SpecObject is only referenced from a Specification. This means that the SpecObject can be in more than one Specification - or none at all!
So the answer is: Iterate over all Specs (including their SpecHierarchies) and see whether the SpecObject in question is attached to it. But then you have to decide what to do if there is 0 or more than 1.
The alternative is to simply select the SpecObject. If you do so, then the SpecObject should show in the PropertyView. Maybe that's already enough? Or do you really need the SpecObject in the context of the Specification? If so, then you have to bite the bullet and hunt for it in the Specifications.
Subscribe to System Engineering Trends (German) or the ProR/RMF Newsletter by Formal Mind (English)
Powered by FUDForum
. Page generated in 0.05141 seconds