Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JBIDE-14564 - Runtime detection prompt shown on every IDE start #108

Merged
merged 1 commit into from
May 23, 2013

Conversation

snjeza
Copy link
Member

@snjeza snjeza commented May 22, 2013

https://issues.jboss.org/browse/JBIDE-14564
Runtime detection prompt shown on every IDE start

@@ -119,7 +119,9 @@ private boolean runtimeExists(boolean firstStart, IProgressMonitor monitor) {
continue;
}
monitor.setTaskName(Messages.RuntimeScanner_JBoss_Runtime_Detector_checking + runtimeDefinition.getLocation());
return RuntimeUIActivator.runtimeCreated(runtimeDefinition);
if (!RuntimeUIActivator.runtimeCreated(runtimeDefinition)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not following the change here - you are negating the result here and then negate it when checking.

Isn't the end result the same thing ?

Maybe time for adding a test for this logic?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it isn't. Now, the Search runtime dialog won't be open when there is no one runtime definition.
I have debugged and tested that.
We would probably be able to test the wouldOpenSearchRuntimePathDialog method without adding UI/SWTBoot tests.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before this patch, this logic would take the first path which was marked as "scan on every startup" and return whether that runtime was already created. This was bad because it did not support the case of multiple paths, all of which were marked for 'scan on every startup'. In the case of multiple paths, the new logic is correct.

However, for the case of only 1 path to be scanned, the effect of this would appear to be no effect at all.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

However, for the case of only 1 path to be scanned, the effect of this would appear to be no effect at all.?

Try to test just one runtime path that doesn't contains any runtime.

@robstryker robstryker merged commit de0ecb1 into jbosstools:master May 23, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants