public static void ensureHostSetup(ExecutionEnvironment env) { if (env != null) { ServerList.get(env); // this will ensure the remote host is setup } } public static boolean isDevHostValid(ExecutionEnvironment env) {
public static void ensureHostSetup(ExecutionEnvironment env) { if (env != null) { ServerList.get(env); // this will ensure the remote host is setup } } public static boolean isDevHostValid(ExecutionEnvironment env) {
@Override protected void performAction(final ExecutionEnvironment execEnv, final Node[] activatedNodes) { RP.post(new NamedRunnable("Uploading to " + ServerList.get(execEnv).getDisplayName()) { // NOI18N @Override protected void runImpl() { upload(execEnv, activatedNodes); } }); }
public UpDownLoader(ExecutionEnvironment execEnv, Node[] nodes, InputOutput tab) { this.execEnv = execEnv; this.nodes = nodes; this.tab = tab; envName = ServerList.get(execEnv).getDisplayName(); }
public static boolean isDevHostValid(ExecutionEnvironment env) { ServerRecord record = ServerList.get(env); return record != null && record.isOnline(); }
@Override protected void performAction(final ExecutionEnvironment execEnv, final Node[] activatedNodes) { RP.post(new NamedRunnable("Uploading to " + ServerList.get(execEnv).getDisplayName()) { // NOI18N @Override protected void runImpl() { download(execEnv, activatedNodes); } }); }
private static void runActionWorker(ExecutionEnvironment exeEnv, CancellableTask actionWorker) { ServerRecord record = ServerList.get(exeEnv); assert record != null; invokeLongAction(record, actionWorker); }
public static boolean isDevHostValid(ExecutionEnvironment env) { ServerRecord record = ServerList.get(env); return record != null && record.isOnline(); }
public String getHostDisplayName(boolean displayIfNotFound) { String out = ServerList.get(getExecutionEnvironment()).getServerDisplayName(); if (displayIfNotFound && !isConfigured()) { out = NbBundle.getMessage(DevelopmentHostConfiguration.class, "NOT_CONFIGURED", out); // NOI18N } return out; }
@Override public void propertyChange(PropertyChangeEvent evt) { if (evt.getNewValue() instanceof DevelopmentHostConfiguration) { ExecutionEnvironment execEnv = ((DevelopmentHostConfiguration) evt.getNewValue()).getExecutionEnvironment(); RemoteSyncFactory newFactory = ServerList.get(execEnv).getSyncFactory(); if ((newFactory == null && factory != null) || !newFactory.equals(factory)) { factory = newFactory; PropertyEditor ed = getPropertyEditor(); if (ed instanceof PropertyEditorSupport) { ((PropertyEditorSupport) ed).firePropertyChange(); } } } }
@Override public void run() { boolean exists = false; if (ServerList.get(manager.getExecutionEnvironment()).isOnline()) { exists = ServerList.isValidExecutable(manager.getExecutionEnvironment(), txt); } lastValid.put(tool, exists); updateField(field, exists, tool); } });
@Override public void run() { ServerRecord record = ServerList.get(env); if (record != null) { // Not sure why we do this in an RP, but don't want to remove it this late in the release setValue(focs.getName()); if (compilerSetNodeProp != null) { compilerSetNodeProp.repaint(); } } } });
@Override public void run() { boolean exists = false; if (ServerList.get(manager.getExecutionEnvironment()).isOnline()) { exists = ServerList.isValidExecutable(manager.getExecutionEnvironment(), txt); } lastValid.put(tool, exists); updateField(field, exists, tool); } });
@Override public void run() { try { ConnectionManager.getInstance().connectTo(env); ServerRecord rec = ServerList.get(env); if (rec != null) { rec.checkSetupAfterConnection(null); } } catch (IOException ex) { } catch (CancellationException ex) { // don't log CancellationException } } });
@Override public void finishInitialization() { log.log(Level.FINE, "Code Model Ready for {0}", CompilerSetManagerImpl.this.toString()); // FIXUP: this server has been probably deleted; TODO: provide return statis from loader if (!ServerList.get(executionEnvironment).isDeleted()) { SPIAccessor.get().runTasks(CompilerSetManagerEvents.get(executionEnvironment)); } }
public String getDisplayName(boolean displayIfNotFound) { String out = ServerList.get(getExecutionEnvironment()).getDisplayName(); if (displayIfNotFound && !isConfigured()) { out = NbBundle.getMessage(DevelopmentHostConfiguration.class, "NOT_CONFIGURED", out); // NOI18N } else { int platformID = getBuildPlatformConfiguration().getValue(); // platformID = CompilerSetManager.getDefault(getExecutionEnvironment()).getPlatform(); Platform platform = Platforms.getPlatform(platformID); if (platform != null) { out += " [" + platform.getDisplayName() + "]"; // NOI18N } } return out; }
@Override public String getName() { if (!wasEnabled()) { return getDummyItemText(); } final Node[] activatedNodes = activatedNodesCache.get(); if (activatedNodes == null || activatedNodes.length == 0) { return getDummyItemText(); } Pair<ExecutionEnvironment, RemoteSyncFactory> p = getEnv(activatedNodes); ExecutionEnvironment execEnv = (p == null) ? null : p.first(); if (execEnv == null || execEnv.isLocal()) { return getDummyItemText(); } final String hostName = ServerList.get(execEnv).getDisplayName(); return getItemText(hostName); } }
protected static boolean checkConnection(ExecutionEnvironment execEnv) { if (execEnv.isRemote()) { try { ConnectionManager.getInstance().connectTo(execEnv); ServerRecord record = ServerList.get(execEnv); if (record.isOffline()) { record.validate(true); } return record.isOnline(); } catch (IOException ex) { return false; } catch (CancellationException ex) { return false; } } else { return true; } }
/*package*/ static boolean syncValidate(final String name) { if (name != null && name.equals("localhost")) { // NOI18N return true; } Host host = Host.byName(name); final ServerRecord serverRecord = ServerList.get(host.executionEnvironment()); serverRecord.validate(true); // No need to continue if connection is not available if (!serverRecord.isOnline()) { showErrorDialog(serverRecord); return false; } ExecutionEnvironment exEnv = serverRecord.getExecutionEnvironment(); CompilerSetManager csm = CompilerSetManager.get(exEnv); csm.initialize(true, true, null); // initialize host info PlatformInfo.getDefault(exEnv); return true; }