Find out the file name for a Document or Editor instance

Hi.

How can I find out the file name for a Document or Editor instance (grabbed by EditorFactory).
Can't find it when I browse the JavaDoc.

Thanks, Jonas.

2 comments
Comment actions Permalink

Hello Drutten,

How can I find out the file name for a Document or Editor instance
(grabbed by EditorFactory). Can't find it when I browse the JavaDoc.


Not all Documents have an associated file name. For those that do, you can
call FileDocumentManager.getFile(), and if it returns not null, call VirtualFile.getPath()
on the returned file.

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

Great. Thanks. I'll try that.

0

Please sign in to leave a comment.