Open henpower opened 1 year ago
The cause of this bug start inside the method
CapellaRequirementsOpenJavaService#evaluateExpression
Called by the method
CapellaRequirementsOpenJavaService#getRequirementTitle
Indeed, let's check line 390
Capella-5.1 with VP_Requirement-0.12.2
390: String sanytizedResult = LabelHelper.transformHTMLToTextWithLineFeed(evaluationResult);
Capella-61 with VP_Requirement-0.13.1
390: String sanytizedResult = LabelHelper.unescape( LabelHelper.transformHTMLToText(evaluationResult) );
So, there is something going wrong with the method
StringEscapeUtils#unescapeHtml
called by
LabelHelper#unescape
It seems like the called method
StringEscapeUtils#unescapeHtml
Also remove the newline tag.
When I remove the call to
LabelHelper#unescape
Then alignment works fine again!
Kind Regards
This seems to be linked to https://github.com/eclipse-capella/capella-requirements-vp/issues/169
I created a PR https://github.com/eclipse-capella/capella-requirements-vp/pull/193
In #169 the goal was to improve the display of labels for requirements in the importer, and also the dialog invoked by the Requirements tool in the palette. For example, i created a requirements with a description richtext ("Text" tab in Properties view). The content is written with HTML tags in the model.
Without the org.polarsys.kitalpha.vp.requirements.model.helpers.LabelHelper.toOneLine(String)
method:
And with the org.polarsys.kitalpha.vp.requirements.model.helpers.LabelHelper.toOneLine(String)
method:
Indeed, the use of the LabelHelper.toOneLine(String)
method is not necessary for the display on diagrams.
Hi In Capella-5.1, informations about requirements like long_name, name, chapter, etc. where written each in a row (see figure).
Unfortunately, in Capella-6.1, all these informations are in the same row (see figure).
Of course, this make diagram hard to to read because of the size of requirement object.
Kind Regards