setting a new model in an opened editor [message #193586] |
Fri, 26 August 2005 16:50 |
Eclipse User |
|
|
|
Originally posted by: no.yes.maybe
Hi,
I want to set a completely new model in a previously opened GEF editor.
what method should I call to get the view recreated? refreshVisual() is
not doing it...
thanks,
Roberto
|
|
|
Re: setting a new model in an opened editor [message #193594 is a reply to message #193586] |
Fri, 26 August 2005 17:11 |
Eclipse User |
|
|
|
Originally posted by: mvsteenbergen.eljakim.scratch-this.nl
Try calling getGraphicalViewer().setContents(Object model). If you're
doing this from outside your GraphicalEditor, you might need to create
an extra method to provide access to the normally protected GraphicalViewer.
Regards,
Martijn.
roberto wrote:
> I want to set a completely new model in a previously opened GEF editor.
|
|
|
Re: setting a new model in an opened editor [message #193609 is a reply to message #193594] |
Fri, 26 August 2005 17:51 |
Eclipse User |
|
|
|
Originally posted by: no.yes.maybe
Ok, I did that, but....
I've a periodic task that checks for certain conditions. If the
condition is met, it replaces the model. I'm using jdk 1.5 concurrency
to implement the periodic task. When I invoke the setContents() in the
run() of the new thread, I get an exception.
I take it that I have to run the code in some Eclipse thread. How do I
do that?
ROberto
Martijn van Steenbergen wrote:
> Try calling getGraphicalViewer().setContents(Object model). If you're
> doing this from outside your GraphicalEditor, you might need to create
> an extra method to provide access to the normally protected
> GraphicalViewer.
>
> Regards,
>
> Martijn.
>
> roberto wrote:
>
>> I want to set a completely new model in a previously opened GEF editor.
|
|
|
|
|
|
|
Re: setting a new model in an opened editor [message #218715 is a reply to message #193650] |
Wed, 28 June 2006 15:34 |
Eclipse User |
|
|
|
Originally posted by: glebsattel.gmail.com
hi roberto,
how did you solve your problem with the outline view. i have the same
problem.
1. Step: Refresh my Editor with
getGraphicalViewer().setContents(myNewModel);
2. Step: Refresh my Outline: how do i get the outline to do the same
like above?
Olaf
roberto schrieb:
> Ok, I have a different problem. The solution mentioned here fixes one
> editor. However I also have the outline view on the same model, and
> that's not updated automatically. What do I need to do to get every view
> on the model updated?
>
> Thanks,
> Roberto
>
>
> Martijn van Steenbergen wrote:
>
>> roberto wrote:
>>
>>> I take it that I have to run the code in some Eclipse thread. How do
>>> I do that?
>>
>>
>>
>> http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/plat form-swt-home/faq.html#uithread
>>
>>
>> M.
|
|
|
Re: setting a new model in an opened editor [message #218731 is a reply to message #218715] |
Wed, 28 June 2006 19:27 |
Eclipse User |
|
|
|
Originally posted by: lamont_gilbert.rigidsoftware.com
Is your outline view tracking any other view or selection?
Glebsattel wrote:
> hi roberto,
>
> how did you solve your problem with the outline view. i have the same
> problem.
> 1. Step: Refresh my Editor with
> getGraphicalViewer().setContents(myNewModel);
> 2. Step: Refresh my Outline: how do i get the outline to do the same
> like above?
>
> Olaf
>
> roberto schrieb:
>
>> Ok, I have a different problem. The solution mentioned here fixes one
>> editor. However I also have the outline view on the same model, and
>> that's not updated automatically. What do I need to do to get every view
>> on the model updated?
>>
>> Thanks,
>> Roberto
>>
>>
>> Martijn van Steenbergen wrote:
>>
>>> roberto wrote:
>>>
>>>> I take it that I have to run the code in some Eclipse thread. How do
>>>> I do that?
>>>
>>>
>>>
>>>
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/plat form-swt-home/faq.html#uithread
>>>
>>>
>>> M.
--
Respectfully,
CL Gilbert
"Verily, verily, I say unto you, He that entereth not by the door() into the
sheepfold{}, but climbeth up some other *way, the same is a thief and a
robber."
|
|
|
Re: setting a new model in an opened editor [message #218746 is a reply to message #218731] |
Thu, 29 June 2006 08:19 |
Eclipse User |
|
|
|
Originally posted by: glebsattel.hardsoftware.de
I've realized it like the ShapesEditor. The viewer of the outline is a
TreeViewer which presents my model. The PropertySheet is tracking the
outline view (and the Editor) and shows the properties of each node (or
EditParts in the Editor) in the tree. This works fine when I load my
model at the first time!
Now I update my model with a different content from the db (for example
I switch the language). The editor (here FlowPages) shows the right
content and the interaction with the PropertySheet works fine!
Only the outline stil has the model with the old content. Which is the
right way to set the new content to the TreeViewer in the outline.
In the Editor are different
CL [dnoyeb] Gilbert schrieb:
> Is your outline view tracking any other view or selection?
>
> Glebsattel wrote:
>
>
>>hi roberto,
>>
>>how did you solve your problem with the outline view. i have the same
>>problem.
>>1. Step: Refresh my Editor with
>>getGraphicalViewer().setContents(myNewModel);
>>2. Step: Refresh my Outline: how do i get the outline to do the same
>>like above?
>>
>>Olaf
>>
>>roberto schrieb:
>>
>>
>>>Ok, I have a different problem. The solution mentioned here fixes one
>>>editor. However I also have the outline view on the same model, and
>>>that's not updated automatically. What do I need to do to get every view
>>>on the model updated?
>>>
>>> Thanks,
>>> Roberto
>>>
>>>
>>>Martijn van Steenbergen wrote:
>>>
>>>
>>>>roberto wrote:
>>>>
>>>>
>>>>>I take it that I have to run the code in some Eclipse thread. How do
>>>>>I do that?
>>>>
>>>>
>>>>
>>>>
> http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/plat form-swt-home/faq.html#uithread
>
>>>>
>>>>M.
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.04685 seconds