Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[pde-dev] Re: pde-dev Digest, Vol 24, Issue 6

hey thanks for replying...
actually i have made eclipse plugin whch has a view(Tree viewer).now this view needs to get updated as my back end XML file is getting modified.
By putting listeners i can identify when my XML doc is getting modified.Now the problem is -
i cant reinitialize or recreate the respective view since evry plugin gets initialised only once in its lifetime.so the solution that i ahve tried is dispose the whole composite regarding that plugin and initialize it again with the fresh XML doc.
but failed in disposing the composite.
 
So lemme know if my approach is right n any new pointers to move on.
 
Thanks,
--vrush

pde-dev-request@xxxxxxxxxxx wrote:
Send pde-dev mailing list submissions to
pde-dev@xxxxxxxxxxx

To subscribe or unsubscribe via the World Wide Web, visit
https://dev.eclipse.org/mailman/listinfo/pde-dev
or, via email, send a message with subject or body 'help' to
pde-dev-request@xxxxxxxxxxx

You can reach the person managing the list at
pde-dev-owner@xxxxxxxxxxx

When replying, please edit your Subject line so it is more specific
than "Re: Contents of pde-dev digest..."


Today's Topics:

1. Re: how to reflect changes in view plug-in dynamically
(Brian de Alwis)


----------------------------------------------------------------------

Message: 1
Date: Thu, 22 Mar 2007 10:13:48 -0600
From: Brian de Alwis
Subject: Re: [pde-dev] how to reflect changes in view plug-in
dynamically
To: "Eclipse PDE general developers list."
Message-ID: <20070322161348.GB29396@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset=us-ascii

Hi Vrush. I'm a bit confused in reading your e-mail: I'm guessing
you're new to Eclipse development, and my reply assumes this. If
that's not the case, I apologize. I'd highly recommend you pick up
a copy of an something like the Java Developer's Guide to Eclipse.

>From your message, I think you're confusing `plug-in' and `view'
-- they're not the same thing. A plug-in can contribute many views;
a view is provided by a plug-in. A plug-in doesn't have to have
any views.


On 2007.03.22 07:18:48 -0700, vrushali babar wrote:
> - Plugin is not getting updated dynamically(the way
> outline gets updated as editor contents changes).

Well that's your responsibility: upon any change (to your XML file)
you should refresh your view. The Model-View-Controller style
suggests having your Eclipse view be notified of changes through
a listener interface provided by your model (something modelling
the XML file).

Or is this XML file being editted in an Eclipse editor? If so,
you need to register as a listener for changes to the particular
text editor.

You could also try using the IResourceChangeListener framework (see
IWorkspace.addResourceChangeListener()) but this will cause you to
be notified for changes to all resources.

> - It gets initialized only once in its life time & each
> plugin has its own composite.

Yes, a plug-in is initialized only once for the entire workbench.
A view generally has only a single instance in any particular
workbench window. Try creating a new window (Window -> New Window),
and then opening an instance of your view.

> - To update/refresh the contents of the plugin we need
> to dump the whole plugin so as to create the new one with the new
> composite & that will get initailised as per the current changes.

That's because you're not hooking in a listener.

> - Not able to dispose the current composite;so the
> changes are not getting reflacted in the plugin.
>
> I have tried disposing the composite but failed.Even we have
> tried getting the respective methods executed on the particular
> event but without having new composite none the changes are getting
> reflacted.

I assume that you're trying to do this because of the lack of a
MVC style listener use.

Brian.

--
Brian de Alwis | Software Practices Lab | UBC | http://www.cs.ubc.ca/~bsd/
"Amusement to an observing mind is study." - Benjamin Disraeli


------------------------------

_______________________________________________
pde-dev mailing list
pde-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/pde-dev


End of pde-dev Digest, Vol 24, Issue 6
**************************************


Finding fabulous fares is fun.
Let Yahoo! FareChase search your favorite travel sites to find flight and hotel bargains.

Back to the top