diff -r c2638ad8cb2b j2ee.sun.appsrv/src/org/netbeans/modules/j2ee/sun/api/ServerLocationManager.java --- a/j2ee.sun.appsrv/src/org/netbeans/modules/j2ee/sun/api/ServerLocationManager.java Sat Mar 08 00:41:01 2008 +0300 +++ b/j2ee.sun.appsrv/src/org/netbeans/modules/j2ee/sun/api/ServerLocationManager.java Fri Mar 07 18:31:10 2008 -0800 @@ -60,6 +60,7 @@ import org.openide.filesystems.FileObjec import org.openide.filesystems.FileObject; import org.openide.filesystems.Repository; import org.openide.util.Lookup; +import org.openide.util.Utilities; public class ServerLocationManager { @@ -77,7 +78,7 @@ public class ServerLocationManager { public static final String INSTALL_ROOT_PROP_NAME = "com.sun.aas.installRoot"; //NOI18N private static final String JAR_BRIGDES_DEFINITION_LAYER="/J2EE/SunAppServer/Bridge"; //NOI18N private static Map serverLocationAndClassLoaderMap = Collections.synchronizedMap((Map)new HashMap(2,1)); - + private static void updatePluginLoader(File platformLocation, ExtendedClassLoader loader) throws Exception{ try { java.io.File f = platformLocation; @@ -377,4 +378,38 @@ public class ServerLocationManager { } return version; } + + /** + * Does this Sun AppServer install have an update center launcher? + * + * @param asInstallRoot appserver install location + * @return true if update center launcher was located, false otherwise. + */ + public static boolean hasUpdateCenter(File asInstallRoot) { + return getUpdateCenterLauncher(asInstallRoot) != null; + } + + /** + * Locate update center launcher within the glassfish installation + * [installRoot]/updatecenter/bin/updatetool[.BAT] + * + * @param asInstallRoot appserver install location + * @return File reference to launcher, or null if not found. + */ + public static File getUpdateCenterLauncher(File asInstallRoot) { + File result = null; + if(asInstallRoot != null && asInstallRoot.exists()) { + File updateCenterBin = new File(asInstallRoot, "updatecenter/bin"); // NOI18N + if(updateCenterBin.exists()) { + String launcher = "updatetool"; // NOI18N + if(Utilities.isWindows()) { + launcher += ".BAT"; // NOI18N + } + File launcherPath = new File(updateCenterBin, launcher); + result = (launcherPath.exists()) ? launcherPath : null; + } + } + return result; + } + } diff -r c2638ad8cb2b j2ee.sun.appsrv81/src/org/netbeans/modules/j2ee/sun/ide/j2ee/runtime/actions/Bundle.properties --- a/j2ee.sun.appsrv81/src/org/netbeans/modules/j2ee/sun/ide/j2ee/runtime/actions/Bundle.properties Sat Mar 08 00:41:01 2008 +0300 +++ b/j2ee.sun.appsrv81/src/org/netbeans/modules/j2ee/sun/ide/j2ee/runtime/actions/Bundle.properties Fri Mar 07 18:31:11 2008 -0800 @@ -43,6 +43,7 @@ LBL_RegisterServerAction=Register Applic LBL_RegisterServerAction=Register Application Server Instance... LBL_ViewlogAction=View Server Log LBL_ShowAdminGUIAction=View Admin Console +LBL_ShowUpdateCenterAction=View Update Center # To include a mnemomic for the Main Window menus, use e.g.: # LBL_Action=My Act&ion diff -r c2638ad8cb2b j2ee.sun.appsrv81/src/org/netbeans/modules/j2ee/sun/ide/j2ee/runtime/actions/RunASVerifierAction.java --- a/j2ee.sun.appsrv81/src/org/netbeans/modules/j2ee/sun/ide/j2ee/runtime/actions/RunASVerifierAction.java Sat Mar 08 00:41:01 2008 +0300 +++ b/j2ee.sun.appsrv81/src/org/netbeans/modules/j2ee/sun/ide/j2ee/runtime/actions/RunASVerifierAction.java Fri Mar 07 18:31:11 2008 -0800 @@ -108,7 +108,7 @@ public class RunASVerifierAction extends } public String getName() { - return NbBundle.getMessage(ShowAdminToolAction.class, "LBL_RunASVeriferAction"); + return NbBundle.getMessage(RunASVerifierAction.class, "LBL_RunASVeriferAction"); } protected String iconResource() { diff -r c2638ad8cb2b j2ee.sun.appsrv81/src/org/netbeans/modules/j2ee/sun/ide/j2ee/runtime/nodes/ManagerNode.java --- a/j2ee.sun.appsrv81/src/org/netbeans/modules/j2ee/sun/ide/j2ee/runtime/nodes/ManagerNode.java Sat Mar 08 00:41:01 2008 +0300 +++ b/j2ee.sun.appsrv81/src/org/netbeans/modules/j2ee/sun/ide/j2ee/runtime/nodes/ManagerNode.java Fri Mar 07 18:31:11 2008 -0800 @@ -52,6 +52,7 @@ import org.netbeans.modules.j2ee.sun.api import org.netbeans.modules.j2ee.sun.api.SunDeploymentManagerInterface; import org.netbeans.modules.j2ee.sun.ide.j2ee.DeploymentManagerProperties; import org.netbeans.modules.j2ee.sun.ide.j2ee.runtime.actions.ShowAdminToolAction; +import org.netbeans.modules.j2ee.sun.ide.j2ee.runtime.actions.ShowUpdateCenterAction; import org.netbeans.modules.j2ee.sun.ide.j2ee.runtime.actions.ViewLogAction; import org.netbeans.modules.j2ee.sun.ide.j2ee.ui.Customizer; import org.openide.cookies.InstanceCookie; @@ -117,11 +118,14 @@ public class ManagerNode extends Abstrac ch = dir.getChildren(); nbextraoptions = ch.length; } - javax.swing.Action[] newActions = new javax.swing.Action[4 + nbextraoptions] ;// 5 hardcoded number of actionns!! + javax.swing.Action[] newActions = new javax.swing.Action[5 + nbextraoptions] ;// 5 hardcoded number of actionns!! int a=0; newActions[a++]=(null); newActions[a++]= (SystemAction.get(ShowAdminToolAction.class)); newActions[a++]=(SystemAction.get(ViewLogAction.class)); + if(ServerLocationManager.hasUpdateCenter(sdm.getPlatformRoot())) { + newActions[a++]=(SystemAction.get(ShowUpdateCenterAction.class)); + } boolean isGlassFish = ServerLocationManager.isGlassFish(sdm.getPlatformRoot()); for(int i = 0; i < nbextraoptions; i++) { try{