TestRoots / watchdog

IntelliJ & Eclipse plugin for monitoring how Java applications are developed and tested
http://www.testroots.org
Other
18 stars 10 forks source link

WatchDog for IntelliJ has wrong preferences in multi-project environment #201

Closed levaja closed 8 years ago

levaja commented 8 years ago

In IntelliJ, it is possible to have more projects opened at the same time (causing more instances of IntelliJ which share the same settings folder). The bug reported by our user (using OS X):

I have two projects open right now, and they each have a different project id registered. First, I opened one project and assigned it a project ID, and worked with it for some time. Then, a week later, I opened another project, assigned it an ID, and then used it for a while. Now I have both open, and the original project doesn't seem to know its own ID any more - the plugin preferences only show the second ID. Even closing the second project doesn't restore the first project to working correctly. Worse, tests run in the first project are showing up in the second project's statistics.

In the follow-up, we got the preferences, and the one interesting is:

<property name="WATCHDOG.WORKSPACE_SETTINGS" value="[{&quot;project&quot;:&quot;PROJECT1NAME&quot;,&quot;projectId&quot;:&quot;PROJECT1ID&quot;,&quot;enableWatchdog&quot;:true,&quot;startupQuestionAsked&quot;:true},{&quot;project&quot;:&quot;PROJECT2NAME&quot;,&quot;projectId&quot;:&quot;PROJECT1ID&quot;,&quot;enableWatchdog&quot;:true,&quot;startupQuestionAsked&quot;:true},{&quot;project&quot;:&quot;PROJECT3NAME&quot;,&quot;projectId&quot;:&quot;PROJECT3ID&quot;,&quot;enableWatchdog&quot;:true,&quot;startupQuestionAsked&quot;:true}]" />

Name of the projects and ids are omitted, although it's noticeable that first 2 registered projects with different names have the same ID (can be caused by user entering the existing id for another project).

This, most likely, bug is probably caused by IntelliJ providing a wrong project name to our plugin.

Also, as reported by another user, error on server in registration wizards makes wizard page unreadable.

levaja commented 8 years ago

Furthermore:

Same issue - from startup, PROJECT2 has the right ID (and WatchDog contents), but when I open a second intellij project at the same time, the preferences only show the second one, and both projects only show the second one. Closing the second one doesn't fix it, but restarting does.

I will look into this tomorrow, I hope I'll be able to reproduce it and fix it.