Unversioned files

I'm noticing something rather odd with unversioned files:

When I create a new file, its status is being set to NOT_CHANGED until I save the new document (at which point its status is properly set).

The really strange thing is that the Change List is showing the file as being unversioned and colored appropriately, however in the file view the color of the file seems to be NOT_CHANGED.

I setup a few breakpoints, and the ChangeProvider is indeed calling processUnversionedFile() as expected. For some reason the status set by my ChangeProvider is being overridden in the file view down the line.

Any ideas?

Steve

7 comments

Hello Steven,

I'm noticing something rather odd with unversioned files:

When I create a new file, its status is being set to NOT_CHANGED until
I save the new document (at which point its status is properly set).

The really strange thing is that the Change List is showing the file
as being unversioned and colored appropriately, however in the file
view the color of the file seems to be NOT_CHANGED.

I setup a few breakpoints, and the ChangeProvider is indeed calling
processUnversionedFile() as expected. For some reason the status set
by my ChangeProvider is being overridden in the file view down the
line.

Any ideas?


Not really, 'cause the file view has been dropped in 7.0.

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


0

Dmitry,

This is really bothering me. I have spent all day trying to understand what is happening, and I have it narrowed down, however I honestly have no idea how to work around this issue.

Here is what I have observed so far:

1) This only occurs when a new file is created via the New File action.

2) The Change List is updated with the unversioned file (which is colored appropriately) in the Change View, however the file in the editor and any other view (project or otherwise) does not change (appears to be NOT_CHANGED).

3) The editor and project views update correctly once a change is made to the file. A single keystroke is all that is needed (the document does not need to be saved for it to take effect)

4) Refreshing the Changes View does not fix the problem. Either introducing a change (mentioned above) or restarting IDEA seem to be the only ways to refresh the editor and project views.

This is the last major bug that I have come across getting the new MKS plugin ready. Any help or tips would be much appreciated.

Thanks so much for the help,

Steve

0

Hello Steven,

This is really bothering me. I have spent all day trying to understand
what is happening, and I have it narrowed down, however I honestly
have no idea how to work around this issue.

Here is what I have observed so far:

1) This only occurs when a new file is created via the New File
action.

2) The Change List is updated with the unversioned file (which is
colored appropriately) in the Change View, however the file in the
editor and any other view (project or otherwise) does not change
(appears to be NOT_CHANGED).

3) The editor and project views update once additional content is made
to the file. A single keystroke is all that is needed (the document
does not have to be saved for it to take effect)

4) Refreshing the Changes View does not fix the problem. Either adding
content as mentioned above or restarting IDEA seem to be the only ways
to refresh the editor and project views.

This is the last major bug that I have come across getting the new MKS
plugin ready. Any help or tips would be much appreciated.


As a workaround, manually calling FileStatusManager.getInstance(project).fileStatusChanged(file)
should ensure correct coloring of project view and other views.

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


0

Steven, not really related to your question, but there is already a mks plugin underwork, if you plan on creating a new one, maybe we should pool our forces together ?

please have a look at http://code.google.com/p/ideamksplugin/

I've not released a new version for a few months now, but I'm still working on it

0

if you want to have a look at the current development state, please use the following branch

http://ideamksplugin.googlecode.com/svn/branches/feature_mks_listener

Message was edited by:
Thibaut

0

Looks like that did it - I'm kicking myself for missing something so simple :)

Thanks again Dmitry!

0

Thanks for the information Thibaut.

I've actually been watching the original MKS Plugin's development for several years now. I have (un)fortunately been an MKS user for quite some time now.

Last year I started development on a newer plugin which would play nicely with IDEA 5+ and MKS Source 2006.

The plugin is now in its second major revision. Due to issues with the MKS API, I started the OpenMKS project to create a simpler, more direct API which would allow integrations such as IDEA to be implemented without jumping through hoops.

The OpenMKS project is creating plugins for more than just IDEA (although it will be the first public release). There is a complete and tested cruisecontrol plugin available (not yet released) as well as a teamcity plugin in the works. There will eventually be ant tasks, and possibly netbeans integration.

If you are curious, you take a look at the new plugin here: http://open-mks.cvs.sourceforge.net/open-mks/mks-idea/.

0

Please sign in to leave a comment.