Common Navigator for Workbench Resources - Refreshing View [message #325369] |
Fri, 15 February 2008 11:15  |
Eclipse User |
|
|
|
Originally posted by: marcio.debarros.gmail.com
Hi,
I have a plug-in that has a view based on the Common Navigator Framework
(I followed Michael Elder's postings on this).
On it, I only want to display Workbench resources, IFolder, IFiles, etc...
A second view in my plug-in, has an action that writes files to the
currently opened IProject. This action is not associated to the CNF
view or IResources at all, just writes a file to the default project.
My problem is that until I hit the refresh button on that CNF view, the
new files created on the project, are not displayed on the view. The
manual refresh is calling the inputChanged() and visit() methods of my
ContentProvider... How can I automate this process ?
Thanks,
--MD.
|
|
|
Re: Common Navigator for Workbench Resources - Refreshing View [message #325371 is a reply to message #325369] |
Fri, 15 February 2008 11:52   |
Eclipse User |
|
|
|
Originally posted by: marcio.debarros.gmail.com
Marcio DeBarros wrote:
> Hi,
>
> I have a plug-in that has a view based on the Common Navigator Framework
> (I followed Michael Elder's postings on this).
> On it, I only want to display Workbench resources, IFolder, IFiles, etc...
>
> A second view in my plug-in, has an action that writes files to the
> currently opened IProject. This action is not associated to the CNF
> view or IResources at all, just writes a file to the default project.
>
> My problem is that until I hit the refresh button on that CNF view, the
> new files created on the project, are not displayed on the view. The
> manual refresh is calling the inputChanged() and visit() methods of my
> ContentProvider... How can I automate this process ?
>
>
> Thanks,
>
> --MD.
Nevermind, I figured out. I was creating the files outside the IResource
framework, by writing them directly to the file system.
|
|
|
Re: Common Navigator for Workbench Resources - Refreshing View [message #327025 is a reply to message #325371] |
Sun, 06 April 2008 09:35  |
Eclipse User |
|
|
|
You could also create a command and always have a single handler active
sitting inside a subclass of the CNF. When the handler is called, you
could refresh the view then. That way, you can force a refresh no matter
where you are in the system.
Marcio DeBarros wrote:
> Marcio DeBarros wrote:
>> Hi,
>>
>> I have a plug-in that has a view based on the Common Navigator
>> Framework (I followed Michael Elder's postings on this).
>> On it, I only want to display Workbench resources, IFolder, IFiles,
>> etc...
>>
>> A second view in my plug-in, has an action that writes files to the
>> currently opened IProject. This action is not associated to the CNF
>> view or IResources at all, just writes a file to the default project.
>>
>> My problem is that until I hit the refresh button on that CNF view,
>> the new files created on the project, are not displayed on the view.
>> The manual refresh is calling the inputChanged() and visit() methods
>> of my ContentProvider... How can I automate this process ?
>>
>>
>> Thanks,
>>
>> --MD.
>
>
> Nevermind, I figured out. I was creating the files outside the IResource
> framework, by writing them directly to the file system.
|
|
|
Powered by
FUDForum. Page generated in 0.03070 seconds