Vcs plugin: How can I detect if a VirtualFile is not under version control?

Hi,

in my ChangeProvider implementation I process unversioned files with builder.processUnversionedFile(). Now, when I later query this file with FileStatusprovider.getStatus() it returns a status value of 'FileStatus.NOT_CHANGED'. This is not very usefull to detect if the file is under version control.

How can I tell if a file is versioned or not?

-Tim

2 comments
Comment actions Permalink

Hello Tim,

in my ChangeProvider implementation I process unversioned files with
builder.processUnversionedFile(). Now, when I later query this file
with FileStatusprovider.getStatus() it returns a status value of
'FileStatus.NOT_CHANGED'. This is not very usefull to detect if the
file is under version control.

How can I tell if a file is versioned or not?


You should use ChangeListManager.getInstance().getStatus(VirtualFile) for
this.

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


0
Comment actions Permalink

Thanks for the quick reply. That was what I was looking for.

0

Please sign in to leave a comment.