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-21697 Server Adapter: user choose choose default route when creating the server #964

Merged
merged 1 commit into from Feb 19, 2016

Conversation

scabanovich
Copy link
Contributor

No description provided.

return welcomePageUrl = url;
}
}
}
Copy link
Member

Choose a reason for hiding this comment

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

this block would be an excellent candidate for a method #getRoute(String url). The invoking code would be more more clear (we're trying to pick the right route by the settings stored in the adapter/project and fall back to the user choosing it):

IRoute route = getRoute(OpenShiftServerUtils.getRouteURL(server), routes);
if (route != null) {
   welcomePageUrl = route.getURL();
} else {
   route = getRoute(routes);
   if (route != null) {
      welcomePageUrl = route.getURL();
   }
}
return welcomePageUrl;


Copy link
Member

Choose a reason for hiding this comment

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

btw. we're loading routes here from the server, is this code invoked in a background job by the WTP framework? I see a Display.syncExec hidden in the RouteChooser which is kinda unexpected, but I guess that's bcs it gets invoked at various places within jobs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok. done.
ShowInWelcomePageActionProvider executes the action in a non-ui job, and after it gets url, displays it using asyncExec.

@scabanovich scabanovich force-pushed the jbide-21697 branch 2 times, most recently from 8b9d8bb to 17fb6c9 Compare February 19, 2016 15:09
@adietish adietish merged commit 4d6cb67 into jbosstools:master Feb 19, 2016
@adietish
Copy link
Member

nice, thanks!
merged to master and jbosstools-4.3.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants