"Derived" folders

63 views
Skip to first unread message

Aaron Digulla

unread,
May 19, 2011, 10:27:49 AM5/19/11
to Workspace Mechanic for Eclipse
Eclipse has "derived" folders which are not part of some operations
(Find Resource Ctrl+Shift+R, for example).

Can WMfE set this flag? It's not stored in the project's .settings...

--
Aaron Digulla

Robert Konigsberg

unread,
May 19, 2011, 10:41:30 AM5/19/11
to workspac...@googlegroups.com
Are you asking if Eclipse is capable of showing derived sources in the
Find Resource dialog?

--
Robert Konigsberg
konig...@gmail.com

David Plass

unread,
May 19, 2011, 11:09:12 AM5/19/11
to workspac...@googlegroups.com
You can always write a custom task that does this, if it's not recordable via the preference recorder.

Aaron Digulla

unread,
May 3, 2013, 3:54:34 AM5/3/13
to workspac...@googlegroups.com, dpl...@alum.mit.edu
On Thursday, May 19, 2011 5:09:12 PM UTC+2, David Plass wrote:

You can always write a custom task that does this, if it's not recordable via the preference recorder.

It's not recordable since Eclipse doesn't seem to save this value anywhere. Plugins are expected to iterate over all resources of a project and call IResource.setDerived(true)

Is it possible to iterate over resources of a project with WMfE?

--
Aaron Digulla

Terry Parker

unread,
May 6, 2013, 3:51:12 PM5/6/13
to workspac...@googlegroups.com, dpl...@alum.mit.edu
I believe the "derived" state is attached as metadata to the project's resource tree.  The preference recorder can only record preferences stored in the workspace (rather than project-level preferences).

Class Tasks, being code you write, can do anything.  Grab the workspace root, iterate over each of the direct children of each of its projects, and set the resources that should be derived.

--Terry


--
You received this message because you are subscribed to the Google Groups "Workspace Mechanic for Eclipse" group.
To unsubscribe from this group and stop receiving emails from it, send an email to workspacemecha...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Aaron Digulla

unread,
May 25, 2013, 3:57:07 PM5/25/13
to workspac...@googlegroups.com, dpl...@alum.mit.edu
On Monday, May 6, 2013 9:51:12 PM UTC+2, Terry wrote:

I believe the "derived" state is attached as metadata to the project's resource tree.  The preference recorder can only record preferences stored in the workspace (rather than project-level preferences).

Class Tasks, being code you write, can do anything.  Grab the workspace root, iterate over each of the direct children of each of its projects, and set the resources that should be derived.


Class Tasks sounds like the way to go. When you say "Grab the workspace root", how would I do that exactly? From the documentation, it looks as if I can't access any Eclipse classes unless I unpack the OSGi bundle into the folder ~/.eclipse/mechanic.

I know how to iterate over all Java projects once I have the current workspace instance.

Robert Konigsberg

unread,
May 25, 2013, 7:09:14 PM5/25/13
to workspacemechanic, David Plass
Class tasks are run as part of the plug-in, so it has access to all the plug-ins already depended on by it, which includes the resources.core plug-in. So you can just grab it with WorkspacePlugin.getWorkspace().getRoot() (though it's been a while since I wrote plug-in code, I think that's the correct invocation.)


--
You received this message because you are subscribed to the Google Groups "Workspace Mechanic for Eclipse" group.
To unsubscribe from this group and stop receiving emails from it, send an email to workspacemecha...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Robert Konigsberg
Reply all
Reply to author
Forward
0 new messages