Permalink
Browse files

[389699] Run on server on starting server will not publish if the

module is changed
  • Loading branch information...
1 parent efceeb8 commit dd67198c92ab84dfc28957f6ad090a18bb03d4d4 @elsony elsony committed Jan 24, 2013
View
15 ...ui/org/eclipse/wst/server/ui/internal/actions/RunOnServerLaunchConfigurationDelegate.java
@@ -140,8 +140,19 @@ public boolean supports(IServer server3, Object launchable2, String launchMode3)
IModule[] modules = new IModule[] { module }; // TODO: get parent hierarchy correct
int state = server.getServerState();
if (state == IServer.STATE_STARTING) {
- LaunchClientJob clientJob = new LaunchClientJob(server, modules, launchMode, moduleArtifact, launchableAdapter, client);
- clientJob.schedule();
+ final LaunchClientJob clientJob = new LaunchClientJob(server, modules, launchMode, moduleArtifact, launchableAdapter, client);
+ final IServer server2 = server;
+ if (server2.shouldPublish()) {
+ server2.publish(IServer.PUBLISH_INCREMENTAL, null, info, new IServer.IOperationListener() {
+ public void done(IStatus result) {
+ if (result.isOK()){
+ clientJob.schedule();
+ }
+ }
+ });
+ } else {
+ clientJob.schedule();
+ }
} else if (state == IServer.STATE_STARTED) {
boolean restart = false;
String mode = server.getMode();

0 comments on commit dd67198

Please sign in to comment.