diff options
author | canderson | 2010-08-20 00:57:25 +0000 |
---|---|---|
committer | canderson | 2010-08-20 00:57:25 +0000 |
commit | 16e4cd9e4abb07ae99fb247ff79b45269bb789fb (patch) | |
tree | 5ab5a22a4877822b086025b950b64cdeb6e98a47 | |
parent | b404ad545c1c16560d05f0d6b847f034de6e4647 (diff) | |
download | webtools.javaee-16e4cd9e4abb07ae99fb247ff79b45269bb789fb.tar.gz webtools.javaee-16e4cd9e4abb07ae99fb247ff79b45269bb789fb.tar.xz webtools.javaee-16e4cd9e4abb07ae99fb247ff79b45269bb789fb.zip |
[322953] J2EEDeployOperation affect projects support needs a way to tell if any deployer do not provide that info
-rw-r--r-- | plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/deploy/J2EEDeployOperation.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/deploy/J2EEDeployOperation.java b/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/deploy/J2EEDeployOperation.java index 1c6ef3b0d..4f970fc87 100644 --- a/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/deploy/J2EEDeployOperation.java +++ b/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/deploy/J2EEDeployOperation.java @@ -63,6 +63,7 @@ public class J2EEDeployOperation extends AbstractDataModelOperation { private IProject currentProject; private boolean wasAutoBuilding; private Set<IProject> affectedProjects; + private boolean isAllDeployersProvideAffectedProjects = false; /** * @@ -152,6 +153,7 @@ public class J2EEDeployOperation extends AbstractDataModelOperation { */ private void deploy(List visitors, IVirtualComponent component, IProgressMonitor monitor) { IProject proj = component.getProject(); + boolean curIsAllDeployersProvideAffectedProjects = true; for (int i = 0; i < visitors.size(); i++) { if (!(visitors.get(i) instanceof IConfigurationElement)) continue; @@ -182,6 +184,10 @@ public class J2EEDeployOperation extends AbstractDataModelOperation { if (changedProjects != null) { this.affectedProjects.addAll(changedProjects); } + } else { + // There is at least one deployer does not implements the new ICommand2 interface. Therfore, + // not all deployers have affected projects. + curIsAllDeployersProvideAffectedProjects = false; } addOKStatus(dep.getClass().getName()); } catch (CoreException ex) { @@ -191,6 +197,7 @@ public class J2EEDeployOperation extends AbstractDataModelOperation { continue; } } + isAllDeployersProvideAffectedProjects = curIsAllDeployersProvideAffectedProjects; } /** @@ -284,4 +291,14 @@ public class J2EEDeployOperation extends AbstractDataModelOperation { return this.affectedProjects; } + + /** + * Check if all deployers provide affected projects information. This method will help the + * caller to decide whether to use the affect project information or not. + * @return true if all deployers provides the affected projects list; otherwise, return false. + */ + public boolean isAllDeployersProvideAffectedProjects() { + return isAllDeployersProvideAffectedProjects; + } + }
\ No newline at end of file |