Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » iPath.getFullPath doesn"t return the device letter
iPath.getFullPath doesn"t return the device letter [message #328190] Fri, 16 May 2008 15:51 Go to next message
No real name is currently offline No real nameFriend
Messages: 64
Registered: July 2009
Member
hi all

always trying to launch a command in a specified file

I ve obtained the path of the file with this portion of code


IEditorInput Editor =
this.window.getActivePage().getActiveEditor().getEditorInput ();
if (Editor instanceof IFileEditorInput)
{
IFile File = ((IFileEditorInput) Editor).getFile();
System.out.println(File.getFullPath);
System.out.println(File.getFullPath().getDevice());
}

the prob is I have that

/test/test.yy
null

in other word, I havent the device letter who is really problematic to
launch a command in a directory.

any idea.



what I m trying to do is to launch a special command in the directory
test (who is I:\runtime-application\test\test.yy). get and parse the
result, etc...etc..

thanks

a+++
Re: iPath.getFullPath doesn"t return the device letter [message #328192 is a reply to message #328190] Fri, 16 May 2008 17:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mircea.luchian.matrox.com

Hi,

Use the URI api. You will be able to get the file with the device letter
and path from your project file.

Mircea


julien wrote:
> hi all
>
> always trying to launch a command in a specified file
>
> I ve obtained the path of the file with this portion of code
>
>
> IEditorInput Editor =
> this.window.getActivePage().getActiveEditor().getEditorInput ();
> if (Editor instanceof IFileEditorInput)
> {
> IFile File = ((IFileEditorInput) Editor).getFile();
> System.out.println(File.getFullPath);
> System.out.println(File.getFullPath().getDevice());
> }
>
> the prob is I have that
>
> /test/test.yy
> null
>
> in other word, I havent the device letter who is really problematic to
> launch a command in a directory.
>
> any idea.
>
>
>
> what I m trying to do is to launch a special command in the directory
> test (who is I:\runtime-application\test\test.yy). get and parse the
> result, etc...etc..
>
> thanks
>
> a+++
Re: iPath.getFullPath doesn"t return the device letter [message #328193 is a reply to message #328192] Fri, 16 May 2008 17:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Guys,

You'd want to use getLocation or getLocationURI. The getFullPath method
returns the workspace relative path, not the physical location/URI of
the resource.


Mircea Luchian wrote:
> Hi,
>
> Use the URI api. You will be able to get the file with the device
> letter and path from your project file.
>
> Mircea
>
>
> julien wrote:
>> hi all
>>
>> always trying to launch a command in a specified file
>>
>> I ve obtained the path of the file with this portion of code
>>
>>
>> IEditorInput Editor =
>> this.window.getActivePage().getActiveEditor().getEditorInput ();
>> if (Editor instanceof IFileEditorInput)
>> {
>> IFile File = ((IFileEditorInput) Editor).getFile();
>> System.out.println(File.getFullPath);
>> System.out.println(File.getFullPath().getDevice());
>> }
>>
>> the prob is I have that
>>
>> /test/test.yy
>> null
>>
>> in other word, I havent the device letter who is really problematic
>> to launch a command in a directory.
>>
>> any idea.
>>
>>
>>
>> what I m trying to do is to launch a special command in the directory
>> test (who is I:\runtime-application\test\test.yy). get and parse the
>> result, etc...etc..
>>
>> thanks
>>
>> a+++
>
Re: iPath.getFullPath doesn"t return the device letter [message #328196 is a reply to message #328193] Fri, 16 May 2008 17:18 Go to previous message
No real name is currently offline No real nameFriend
Messages: 64
Registered: July 2009
Member
every thing works

thanks all

a++


Ed Merks a écrit :
> Guys,
>
> You'd want to use getLocation or getLocationURI. The getFullPath method
> returns the workspace relative path, not the physical location/URI of
> the resource.
>
>
> Mircea Luchian wrote:
>> Hi,
>>
>> Use the URI api. You will be able to get the file with the device
>> letter and path from your project file.
>>
>> Mircea
>>
>>
>> julien wrote:
>>> hi all
>>>
>>> always trying to launch a command in a specified file
>>>
>>> I ve obtained the path of the file with this portion of code
>>>
>>>
>>> IEditorInput Editor =
>>> this.window.getActivePage().getActiveEditor().getEditorInput ();
>>> if (Editor instanceof IFileEditorInput)
>>> {
>>> IFile File = ((IFileEditorInput) Editor).getFile();
>>> System.out.println(File.getFullPath);
>>> System.out.println(File.getFullPath().getDevice());
>>> }
>>>
>>> the prob is I have that
>>>
>>> /test/test.yy
>>> null
>>>
>>> in other word, I havent the device letter who is really problematic
>>> to launch a command in a directory.
>>>
>>> any idea.
>>>
>>>
>>>
>>> what I m trying to do is to launch a special command in the directory
>>> test (who is I:\runtime-application\test\test.yy). get and parse the
>>> result, etc...etc..
>>>
>>> thanks
>>>
>>> a+++
>>
Previous Topic:ActiveEditorId not set on startup
Next Topic:template completion (how to)
Goto Forum:
  


Current Time: Fri Dec 27 11:11:07 GMT 2024

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

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

Back to the top