public Object transform(Object value) { String existingServerInstId = (String)value; IServer serverInst = null; if (existingServerInstId != null) { serverInst = ServerCore.findServer(existingServerInstId); } return serverInst; }
/** * Returns whether the editor input exists. * <p> * This method is primarily used to determine if an editor input should * appear in the "File Most Recently Used" menu. An editor input will appear * in the list until the return value of <code>exists</code> becomes * <code>false</code> or it drops off the bottom of the list. * * @return <code>true</code> if the editor input exists; <code>false</code> * otherwise */ public boolean exists() { if (serverId != null && ServerCore.findServer(serverId) == null) return false; return true; }
/** * Returns the label of an IServer given its id * @param instanceId id of an IServer * @return String label of the IServer with an id equal to instanceId. */ public static String getServerInstanceLabelFromInstanceId( String instanceId ) { IServer server = ServerCore.findServer( instanceId ); return server.getName(); }
/** * Returns the name of this editor input for display purposes. * <p> * For instance, if the fully qualified input name is * <code>"a\b\MyFile.gif"</code>, the return value would be just * <code>"MyFile.gif"</code>. * * @return the file name string */ public String getName() { if (serverId != null) { IServer server = ServerCore.findServer(serverId); if (server != null) return server.getName(); return serverId; } return ""; }
public IStatus execute( IProgressMonitor monitor, IAdaptable adaptable ) { IStatus status = Status.OK_STATUS; if(sampleServerInstanceId != null){ sampleExistingServer = ServerCore.findServer(sampleServerInstanceId); if (sampleExistingServer != null) sampleServerTypeID = sampleExistingServer.getServerType().getId(); } return status; }
/** * @see org.eclipse.debug.ui.ILaunchConfigurationTab#isValid(ILaunchConfiguration) */ public boolean isValid(ILaunchConfiguration launchConfig) { try { String id = launchConfig.getAttribute(Server.ATTR_SERVER_ID, ""); if (id != null && !id.equals("")) { IServer server2 = ServerCore.findServer(id); if (server2 == null) return false; if (server2.getServerState() == IServer.STATE_STOPPED) return true; } } catch (CoreException e) { // ignore } return false; }
/** * @see org.eclipse.debug.ui.ILaunchConfigurationTab#isValid(ILaunchConfiguration) */ public boolean isValid(ILaunchConfiguration launchConfig) { try { String id = launchConfig.getAttribute(Server.ATTR_SERVER_ID, ""); if (id != null && !id.equals("")) { IServer server2 = ServerCore.findServer(id); if (server2 == null) return false; if (server2.getServerState() == IServer.STATE_STOPPED) return true; } } catch (CoreException e) { // ignore } return false; }
public String getToolTipText() { String s = null; if (serverId != null) { IServer server = ServerCore.findServer(serverId); if (server != null) { Server server2 = (Server) server; if (server2.getFile() != null) { s = server2.getFile().getFullPath().makeRelative().toString(); if (s.startsWith("/")) s = s.substring(1); } else s = server.getName(); } } if (s == null) s = ""; return s; }
public INamedWidgetContributor getFirstNamedWidget() { IServer server = null; if( webserviceClient_ != null && context_.getRun()) { server = ServerCore.findServer(webserviceClient_.getWebServiceClientInfo().getServerInstanceId() ); } if( server != null && server.getServerState() != IServer.STATE_STARTED ) { return new StartClientWidgetContributor( server ); } return null; }
public void run() { if (!stopAnimation) { try { labelProvider.animate(); int size = 0; String[] servers; synchronized (starting) { size = starting.size(); servers = new String[size]; starting.toArray(servers); } for (int i = 0; i < size; i++) { IServer server = ServerCore.findServer(servers[i]); if (server != null && getTree() != null && !getTree().isDisposed()) updateAnimation(server); } } catch (Exception e) { Trace.trace(Trace.FINEST, "Error in Servers view animation", e); } display.timerExec(SLEEP, animator[0]); } } };
String clientId = configuration.getAttribute(RunOnServerLaunchConfigurationDelegate.ATTR_CLIENT_ID, (String)null); server = ServerCore.findServer(serverId); module = null; moduleArtifact = null;
IServer server = null; if (id != null) server = ServerCore.findServer(id); if (server != null) info.wc = server.createWorkingCopy();
/** * Reload the command manager for a given id. * * @param id an id */ public void reload(String id) { try { CommandManagerInfo info = getExistingCommandManagerInfo(id); if (info != null) { IServer server = null; if (id != null) server = ServerCore.findServer(id); if (server != null) info.wc = server.createWorkingCopy(); firePropertyChangeEvent(PROP_RELOAD, id, null); } clearUndoList(id); clearRedoList(id); undoSaveIndex = undoList.size(); setDirtyState(id, false); updateTimestamps(id); } catch (Exception e) { Trace.trace(Trace.SEVERE, "Could not release command manager", e); } }
private TestInfo getTestInfo() { // get the server stuff if (serviceids.getServerInstanceId() != null) serviceExistingServer = ServerCore.findServer(serviceids.getServerInstanceId()); else if (serviceServerInstanceId!=null) serviceExistingServer = ServerCore.findServer(serviceServerInstanceId); if (serviceExistingServer != null) serviceServerTypeID = serviceExistingServer.getServerType().getId(); else serviceServerTypeID = serviceids.getServerId(); // server will be created in ServerDeployableConfigurationCommand TestInfo testInfo = new TestInfo(); if (serviceExistingServer!=null) testInfo.setServiceExistingServer(serviceExistingServer); testInfo.setServiceServerTypeID(serviceServerTypeID); testInfo.setServiceProject(serverProject); testInfo.setWsdlServiceURL(wsdlURI); testInfo.setExternalBrowser(externalBrowser); testInfo.setEndpoint(endpoints); return testInfo; }
IStatus status = Status.OK_STATUS; IServer server = ServerCore.findServer(serverInstanceId); if (server == null)
String clientId = configuration.getAttribute(ATTR_CLIENT_ID, (String)null); IServer server = ServerCore.findServer(serverId); IModule module = null; ModuleArtifactDelegate moduleArtifact = null;
serviceExistingServer = ServerCore.findServer(serverIds.getServerInstanceId());
String serverId = configuration.getAttribute(Server.ATTR_SERVER_ID, ""); if (serverId != null && !serverId.equals("")) { server = ServerCore.findServer(serverId);
if (!commandManager.isDirty(serverId)) { if (commandManager.hasChanged(serverId)) { IServer newServer = ServerCore.findServer(serverId); if (newServer != null && ((Server)newServer).getTimestamp() > ((Server)server).getTimestamp()) commandManager.reload(serverId);