Adding extra nodes to the Content Merge Viewer [message #1751655] |
Thu, 12 January 2017 09:56 |
Conor O'Mahony Messages: 27 Registered: August 2016 |
Junior Member |
|
|
Hi all,
By following the PapyrusTreeContentMergeViewer implementation we were able to filter out some elements from the viewer, by applying a filter in the getChildren() method in our extension of TreeContentMergeViewerItemContentProvider (Thanks Philip - see https://www.eclipse.org/forums/index.php/t/1082766/ ).
Now we are wondering about the following, or if anyone has any pointers on doing this - how would it be possible to add in some extra children into the Content Viewer, that are not part of the original models (and resulting comparison)?
The case in our application is as follows -
We have an EMF model for a "Block", which has a "input" feature (a list of "Input" objects)
The EMF comparison compares 2 Blocks, and correctly detects the differences between the Inputs that are contained on the block.
But we have further "static" Block Inputs that are not persisted to the Block model (these are derived elsewhere), and we want to add these to our Content Merge Viewer - they are not different between blocks but form part of the "Content" of each block from the user's perspective.
e.g - something like the following:
Static Input list: Input0
Block_A contains Input1
Block_B contains Input2
Result of comparison - e.g., Input1 is added, Input2 is deleted
But Content Merge Viewer should show
Left
+ Block_A
+ Input0
+ Input1
Right
+ Block_B
+ Input0
+ Input2
|
|
|
Re: Adding extra nodes to the Content Merge Viewer [message #1751732 is a reply to message #1751655] |
Fri, 13 January 2017 08:38 |
|
Hi Conor,
The same approach you used to "hide" elements should work to "show" additional ones since you are directly in the content provider... Could you develop on the changes you've made and why it won't work to display additional data? From my understanding if you use a custom content provider that adds these static inputs to your block they should be shown on the viewer?
Laurent Goubet
Obeo
|
|
|
|
Powered by
FUDForum. Page generated in 0.03725 seconds