Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » List of all visible ( package explorer) resources in workspace
List of all visible ( package explorer) resources in workspace [message #640399] Sun, 21 November 2010 17:41 Go to next message
Mikael Petterson is currently offline Mikael Petterson
Messages: 152
Registered: July 2009
Senior Member
Hi,

Is it possible to get a list of all the resources in a workspace visible in "Package Explorer" ?

br,

//mike
Re: List of all visible ( package explorer) resources in workspace [message #640472 is a reply to message #640399] Mon, 22 November 2010 08:52 Go to previous messageGo to next message
Dani Megert is currently offline Dani Megert
Messages: 3801
Registered: July 2009
Senior Member
Mikael Petterson wrote:
> Hi,
>
> Is it possible to get a list of all the resources in a workspace
> visible in "Package Explorer" ?
What do you mean with "visible"? Those that are actually shown in the
view or those that the Package Explorer can show, e.g. by scrolling or
expanding? What about filters? Why would you only want those from the
Package Explorer and not directly from the model?

Dani
>
> br,
>
> //mike
Re: List of all visible ( package explorer) resources in workspace [message #640483 is a reply to message #640472] Mon, 22 November 2010 09:50 Go to previous messageGo to next message
Mikael Petterson is currently offline Mikael Petterson
Messages: 152
Registered: July 2009
Senior Member
Hi,

Thanks for reply. I have need to make an efficient update of those elements that have directories or files that have been removed.

What I do is I set a new config spec ( clearcase) in my view and then some folders/files are not visible. I must show the change in Package Explorer. Since changing config spec - operation ( not a eclipse one) does not generate a resource state change event I need to find a way to update as few resources as possible.
If I do:

resource.getProject().refreshLocal(IResource.DEPTH_INFINITE, null);

It will take quite a while.

Is it possible to save an instance of the model ( which model do you mean) and then update the model again and find out the changes?

br,

//mike
Re: List of all visible ( package explorer) resources in workspace [message #640494 is a reply to message #640483] Mon, 22 November 2010 10:17 Go to previous messageGo to next message
Dani Megert is currently offline Dani Megert
Messages: 3801
Registered: July 2009
Senior Member
Mikael Petterson wrote:
> Hi,
>
> Thanks for reply. I have need to make an efficient update of those
> elements that have directories or files that have been removed.
>
> What I do is I set a new config spec ( clearcase) in my view and then
> some folders/files are not visible. I must show the change in Package
> Explorer. Since changing config spec - operation ( not a eclipse one)
> does not generate a resource state change event I need to find a way
> to update as few resources as possible. If I do:
>
> resource.getProject().refreshLocal(IResource.DEPTH_INFINITE, null);
>
> It will take quite a while.
>
> Is it possible to save an instance of the model ( which model do you
> mean) and then update the model again and find out the changes?
I meant the workspace (see IWorkspaceRoot). Refreshing the Package
Explorer is not enough since there's also the Project Explorer,
Navigator etc. Assuming you know what to refresh in the Package Explorer
you already have a way to find out the delta. Hence you only need to
refresh exactly those resources.

Dani
>
> br,
>
> //mike
Re: List of all visible ( package explorer) resources in workspace [message #640526 is a reply to message #640494] Mon, 22 November 2010 12:39 Go to previous messageGo to next message
Mikael Petterson is currently offline Mikael Petterson
Messages: 152
Registered: July 2009
Senior Member
How can I find out what resources I have in the project before the operation and after? Or is it possible to get a diff after operation?
I really don't know what API to look into?

br,

//mike
Re: List of all visible ( package explorer) resources in workspace [message #640593 is a reply to message #640526] Mon, 22 November 2010 15:02 Go to previous messageGo to next message
Dani Megert is currently offline Dani Megert
Messages: 3801
Registered: July 2009
Senior Member
Mikael Petterson wrote:
> How can I find out what resources I have in the project before the
> operation and after?
This is a completely different question than originally asked ;-)

Dani
> Or is it possible to get a diff after operation?
> I really don't know what API to look into?
>
> br,
>
> //mike
Re: List of all visible ( package explorer) resources in workspace [message #640636 is a reply to message #640593] Mon, 22 November 2010 16:30 Go to previous messageGo to next message
Mikael Petterson is currently offline Mikael Petterson
Messages: 152
Registered: July 2009
Senior Member
Sorry but it grew out of my first questions.

br,

//mike
Re: List of all visible ( package explorer) resources in workspace [message #640954 is a reply to message #640526] Tue, 23 November 2010 16:44 Go to previous message
Dani Megert is currently offline Dani Megert
Messages: 3801
Registered: July 2009
Senior Member
Mikael Petterson wrote:
> How can I find out what resources I have in the project before the
> operation and after? Or is it possible to get a diff after operation?
> I really don't know what API to look into?
If the change happens outside Eclipse then only a full refresh can
detect the delta and update your workspace. Another option is to enable
the auto-refresh option and wait until the workspace updates itself.

Dani
>
> br,
>
> //mike
Previous Topic:How to write % char within xml that is included for org.eclipse.ui.editors.templates
Next Topic:Blocking all plug-in actions if preference constant is not valid
Goto Forum:
  


Current Time: Thu Oct 23 04:06:51 GMT 2014

Powered by FUDForum. Page generated in 0.02379 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software