MPE and two GEF viewers showing same data (not supposed to!) [message #169247] |
Mon, 21 February 2005 22:37  |
Eclipse User |
|
|
|
All,
Am trying to implement two GEF viewers within two different editor
pages in an MPE. Getting the pages and palettes to show up works fine,
but when I load data into view #1, then switch to view #2 (where no
data/models/parts should have been loaded) I see everything in view #1
still.
I would have expected the contents of view#2(empty) to be shown. When
I do load view #2 with data while view#1's data is showing GEF connects
objects between views. It's almost behaving like the viewers are just
layers in a single view.
Facts:
Single EditDomain
Each view has their own instance of ScrollingGraphicalViewer
Each view has their own instance of root edit part
Each view has their own instance of base diagram model which starts
out empty.
Each page extends EditorPart
If I open a palette drawer in view#1 and switch to view#2, that
drawer is not open.
Ideas? Suggestions?
Thanks!
Pierre
|
|
|
|
Re: MPE and two GEF viewers showing same data (not supposed to!) [message #169341 is a reply to message #169292] |
Tue, 22 February 2005 15:02  |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
Pierre Padovani wrote:
> Pierre Padovani wrote:
>
>> All,
>> Am trying to implement two GEF viewers within two different editor
>> pages in an MPE. Getting the pages and palettes to show up works fine,
>> but when I load data into view #1, then switch to view #2 (where no
>> data/models/parts should have been loaded) I see everything in view #1
>> still.
>> I would have expected the contents of view#2(empty) to be shown.
>> When I do load view #2 with data while view#1's data is showing GEF
>> connects objects between views. It's almost behaving like the viewers
>> are just layers in a single view.
>>
>> Facts:
>> Single EditDomain
>> Each view has their own instance of ScrollingGraphicalViewer
>> Each view has their own instance of root edit part
>> Each view has their own instance of base diagram model which starts
>> out empty.
>> Each page extends EditorPart
>> If I open a palette drawer in view#1 and switch to view#2, that
>> drawer is not open.
>>
>> Ideas? Suggestions?
>>
>> Thanks!
>>
>> Pierre
>
> Oh I forgot to mention that if I don't setContents on view#2, then
> switching views shows an expected blank area where the models would
> normally reside.
>
> Pierre
Found the main problem, it was my own stupidity. The main edit part that
listens for adds etc, was listening to the wrong model, and so both
viewers were being updated with the same data even if the underlying
model didn't have the correct data.
Duh.
Pierre
|
|
|
Powered by
FUDForum. Page generated in 0.06932 seconds