Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Should path variables be handled per workspace or per resource?
Should path variables be handled per workspace or per resource? [message #634517] Fri, 22 October 2010 04:26 Go to next message
Kristof Szabados is currently offline Kristof SzabadosFriend
Messages: 82
Registered: July 2009
Member
Hi,

In my current task, that I have to export and import project information
containing the path variables active in the workspace.

And I have found something confusing:
- when using the workspace as a user it seems as if the path variable
were global setting stored on workspace level.
- But when I try to reach them from code it seems as if they were
resource specific.

For example if I reach them like this I always get an empty array of
String -s:
ResourcesPlugin.getWorkspace().getPathVariableManager().getP athVariableNames();

However if I have an IFile object and use it like this, I always get the
list visible to me in the menus:
file.getPathVariableManager().getPathVariableNames();
But in this case I always receive the exact same list for every resource !

Which is the better understanding, I should use in my implementation?
Can I assume, that there is only one list of path variables per workspace?
Or should I assume, that sooner or later this will change into ... like
a hierarchical structure, based on the folders?

Thanks for any help,
Kristof
Re: Should path variables be handled per workspace or per resource? [message #634606 is a reply to message #634517] Fri, 22 October 2010 12:32 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Kristof Szabados wrote:
> For example if I reach them like this I always get an empty array of
> String -s:
> ResourcesPlugin.getWorkspace().getPathVariableManager().getP athVariableNames();
>

I'd use:
ResourcesPlugin.getWorkspace().getRoot().getPathVariableMana ger().getPathVariableNames();



--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Previous Topic:Having a hard time installing plug-ins via a *.zip file with Eclipse 3.5.X
Next Topic:Plug-ins of Run Configuration
Goto Forum:
  


Current Time: Fri Apr 26 10:44:13 GMT 2024

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

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

Back to the top