Custom Property View Widget for Operation Result Parameter [message #1712162] |
Wed, 21 October 2015 15:40 |
|
Hello,
we are implementing some custom property views and custom widgets for
our needs, e.g. provide text fields for Code behavior which will be
handled automatically as OpaqueFunctionBehavior with a code body and set
it as behavior for the feature. This works great so far and the
extensibility of the Papyrus framework is awesome.
Many thanks to all guys who are working on that!
Now, we try to implement a custom widget which allows the user to see
and edit the return parameter of an operation. Therefore, our widget
uses the ReferenceDialog. Then we want to filter the parameters list of
the operation to an entry, which has the direction set to "return".
We already did some research in the Papyrus sources of other Editors and
Widgets and read many lines about several (Content)Providers, but we
could not figure out a proper solution for our problem. The main idea is
a kind of filtered content provider, but how should we map the multiple
reference (parameters list) to a single reference (filtered/selected
parameter)?
I would be glad to get any hints even in some short key points.
Regards
Joachim
|
|
|
|
Re: Custom Property View Widget for Operation Result Parameter [message #1712887 is a reply to message #1712356] |
Thu, 29 October 2015 08:28 |
|
Hi Camille,
thank you very much for your advice. We actually did it very similar to
what you have mentioned. We use the ValueObservable which transforms the
ListObservable to only one value.
Finally, the widget itself works as expected.
But there is another issue. The property view still contains the widget
for all parameters including the return parameter which is also used by
the return widget. If you change the value using the return widget edit
view, then the appropriate entry of the parameters list will not update
until the whole property views is reloaded, e.g. after selecting another
model element and return back to the operation.
Does the list widget (MultipleReferenceView) not listen on changes on
the model to perform an update of its contents?
Kind regards,
Joachim
|
|
|
|
Re: Custom Property View Widget for Operation Result Parameter [message #1712964 is a reply to message #1712897] |
Thu, 29 October 2015 16:14 |
|
> Indeed, that's a general issue for labels in the Papyrus properties
> views. LabelProviders do not install proper listeners, so labels are not
> refreshed when a change occurs. The refresh only occurs when elements
> are added or removed (e.g. adding a new parameter should trigger the
> refresh, but changing the name of a parameter doesn't)
I see. Is this issue planned to be resolved in the future?
Is there another proper way to perform an update of the labels in other
widgets in general?
Regards,
Joachim
|
|
|
Powered by
FUDForum. Page generated in 0.04139 seconds