PluginDevelopmentHowTo00004 

HOME INDEX SEARCH GO  

 <<O>>  Difference Topic PluginDevelopmentHowTo00004 (r1.1 - 15 Feb 2005 - AlexeyEfimov)
Added:
>
>

%META:TOPICINFO{author="AlexeyEfimov" date="1108453320" format="1.0" version="1.1"}%

PluginDevelopmentHowTo00004

Problem description

Get the VirtualFile? from absolute file path.

Problem resolution

From SystemToolsPlugin sources:

    public VirtualFile getVirtualFile() {
        VirtualFileSystem fileSystem = LocalFileSystem.getInstance();
        return fileSystem.findFileByPath(fileContext.getFile().getAbsolutePath().replace(File.separatorChar, '/'));
    }

Related Topics: PluginDevelopmentHowTo, PluginDocumentation, ProjectPluginTemplate, OpenAPI, IntellijPluginDocumentation, IntellijPluginDocumentation, PluginDeployment, IdeasForPlugins

-- AlexeyEfimov - 15 Feb 2005

%META:FORM{name="PluginDevelopmentHowToForm"}% %META:FIELD{name="HowToQuestion" title="HowToQuestion" value="How to get VirtualFile? by absolute file path"}% %META:FIELD{name="OpenAPI" title="OpenAPI" value="VFS"}% %META:FIELD{name="HowToStatus" title="HowToStatus" value="choice-yes.gif "}%


View | Diffs | r1.1 | More

e d i t a t t a c h r e f - b y d i f f s
Ideas,requests,problems regarding this site? Send feedback.
Copyright @ 2000-2003 by the contribution authors. All material on this collaboration tool is the property of the contributing authors.

Revision -
Revision r1.1 - 15 Feb 2005 - 07:42 GMT - AlexeyEfimov
Copyright © 2001 by the contributing authors. All material on this collaboration tool is the property of the contributing authors.
Ideas, requests, problems regarding this site? Send feedback.