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.

0

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
Avatar
Permanently deleted user

Great. Thanks. I'll try that.

0

请先登录再写评论。