|
Re: iPath.getFullPath doesn"t return the device letter [message #328192 is a reply to message #328190] |
Fri, 16 May 2008 17:00 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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+++
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.03098 seconds