Home » Eclipse Projects » JFace » "L" at the beginning of a path
|
Re: "L" at the beginning of a path [message #1561 is a reply to message #1547] |
Wed, 06 May 2009 22:09   |
Eclipse User |
|
|
|
It sounds like you are just calling toString() on the selection. Maybe
check if the first element is an IResource, and then you can do
getPath() which has a few additional to*String() methods.
Hope that helps.
-Ben
Tilaye wrote:
> Hi,
>
> This is probably a common issue but I couldn't find any discussion on
> this. I am developing a plugin that lets the user select a file on
> Package Explorer, right click on it, and then do some operation. I can
> get hold of the selected object when my,
>
> IObjectActionDelegate.selectionChanged(IAction action, ISelection
> selection)
>
> method gets called. Inside this method I do,
>
> ((IStructuredSelection)selection).getFirstElement()
>
> which gives me the relative path of the file selected. This looks like,
>
> L/PluginProject/src/file.xml
>
> Everything is good except the "L" at the beginning of the path. Of
> course I can strip it and go on with my life, but just wondering what
> this letter stands for and should I expect the same behavior in other
> Eclipse versions? I am currently using Eclipse 3.4.2 under Ubuntu.
>
> Any help much appreciated!
>
> Tilaye.
>
|
|
| | | | |
Goto Forum:
Current Time: Fri May 02 07:42:15 EDT 2025
Powered by FUDForum. Page generated in 0.06950 seconds
|