if (TomcatUtils.getInstance().isRunning(_runtime)) {
monitor.beginTask("connecting to local WGA server", IProgressMonitor.UNKNOWN);
WGARemoteServer local = _runtime.createRemoteServer();
local.connectToServer();
Version localWGAVersion = null;
try {
monitor.beginTask("retrieving local WGA server version", IProgressMonitor.UNKNOWN);
localWGAVersion = local.getServices().getWGAVersion(local.getSession());
}
catch (Exception e) {
// this might happen if server version is < 5.3
}
try {
monitor.beginTask("retrieving remote WGA server version", IProgressMonitor.UNKNOWN);
_remoteWGAVersion = _server.getServices().getWGAVersion(_server.getSession());
}
catch (Exception e) {
// this might happen if server version is < 5.3
}
// check local and remote WGA version - plugin sync is available for WGA >= 5.3
if (localWGAVersion != null && localWGAVersion.isAtLeast(5, 3) && _remoteWGAVersion != null && _remoteWGAVersion.isAtLeast(5, 3)) {
monitor.beginTask("retrieving local plugin infos", IProgressMonitor.UNKNOWN);
List<PluginInfo> infos = local.getServices().getPluginInformation(local.getSession());
for (PluginInfo info : infos) {
// we will sync only active & valid plugins ... dev plugins & platform plugins are excluded