Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
264,100
String () { return myDeploymentName; }
getDeploymentName
264,101
void (String deploymentName) { myDeploymentName = deploymentName; }
setDeploymentName
264,102
String (DeploymentSource deploymentSource) { return isDefaultDeploymentName() ? getDefaultDeploymentSourceName(deploymentSource) : getDeploymentName(); }
getDeploymentSourceName
264,103
String (DeploymentSource deploymentSource) { return CloudDeploymentNameProvider.DEFAULT_NAME_PROVIDER.getDeploymentName(deploymentSource); }
getDefaultDeploymentSourceName
264,104
void (@NotNull final UndeploymentTaskCallback callback) { myTaskExecutor.submit(() -> getApplication().undeploy(new CloudAgentDeploymentCallback() { @Override public void succeeded() { callback.succeeded(); } @Override public void errorOccurred(@Nls String errorMessage) { callback.errorOccurred(errorMessage); } }), cal...
undeploy
264,105
void () { callback.succeeded(); }
succeeded
264,106
void (@Nls String errorMessage) { callback.errorOccurred(errorMessage); }
errorOccurred
264,107
ServerTaskExecutor () { return myTaskExecutor; }
getTaskExecutor
264,108
AgentTaskExecutor () { throw new UnsupportedOperationException(); }
getAgentTaskExecutor
264,109
String () { return myProjectLocationHash; }
getProjectHash
264,110
void (String message) { LOG.info(message); }
println
264,111
LogListener (String pipeName) { return LogListener.NULL; }
getOrCreateLogListener
264,112
boolean () { return false; }
isTtySupported
264,113
TerminalListener (String pipeName, OutputStream terminalInput, InputStream terminalOutput, InputStream stderr) { return TerminalListener.NULL; }
createTerminal
264,114
ServerType<SC> () { return myCloudType; }
getCloudType
264,115
JComponent () { return getMainPanel(); }
createComponent
264,116
boolean () { return !getEmailTextField().getText().equals(myConfiguration.getEmail()) || !new String(getPasswordField().getPassword()).equals(myConfiguration.getPasswordSafe()) || !myConfiguration.isPasswordSafe(); }
isModified
264,117
void () { getEmailTextField().setText(myConfiguration.getEmail()); getPasswordField().setText(myConfiguration.getPasswordSafe()); }
reset
264,118
boolean (SC configuration1, SC configuration2) { return Objects.equals(configuration1.getEmail(), configuration2.getEmail()) && Objects.equals(configuration1.getPasswordSafe(), configuration2.getPasswordSafe()); }
isCoreConfigEqual
264,119
String () { return myApplicationName; }
getApplicationName
264,120
DeploymentStatus () { return null; }
getStatus
264,121
String () { return null; }
getStatusText
264,122
void (@NotNull Deployment deployment) { myDeployment = deployment; }
setDeploymentModel
264,123
Deployment () { return myDeployment; }
getDeploymentModel
264,124
CloudNotifier () { return new CloudNotifier(getCloudType().getPresentableName()); }
getCloudNotifier
264,125
void (final Project project, final Runnable onDone) { getTaskExecutor().submit(() -> { try { getAgentTaskExecutor().execute(() -> { Deployment deployment = getDeploymentModel(); CloudAgentLoggingHandler loggingHandler = deployment == null ? null : new CloudLoggingHandlerImpl(deployment.getOrCreateLogManager(project)) {...
perform
264,126
void (String message) { LOG.info(message); }
println
264,127
DeploymentNode (@NotNull AnActionEvent e) { return ServiceViewActionUtils.getTarget(e, DeploymentNode.class); }
getDeploymentTarget
264,128
Deployment (@Nullable DeploymentNode node) { return node == null ? null : ObjectUtils.tryCast(node.getValue(), Deployment.class); }
getDeployment
264,129
Runnable (@NotNull Project project, @NotNull ServersTreeNodeSelector selector, @NotNull DeploymentNode node, @NotNull String logName) { SelectLogRunnable selectLogRunnable = new SelectLogRunnable(project, selector, node, logName); DisposableSelectLogRunnableWrapper wrapper = new DisposableSelectLogRunnableWrapper(selec...
createLogSelector
264,130
void () { mySelectLogRunnable = null; }
dispose
264,131
void () { Runnable selectLogRunnable = mySelectLogRunnable; if (selectLogRunnable != null) { selectLogRunnable.run(); Disposer.dispose(this); } }
run
264,132
void () { RemoteServer<?> server = (RemoteServer<?>)myNode.getServerNode().getValue(); ServerConnection<?> connection = ServerConnectionManager.getInstance().getConnection(server); if (connection == null) return; Deployment deployment = findDeployment(connection); if (deployment == null) return; AppUIExecutor.onUiThrea...
run
264,133
Deployment (ServerConnection<?> connection) { DeploymentRuntime applicationRuntime = getApplicationRuntime(myNode, DeploymentRuntime.class); for (Deployment deployment : connection.getDeployments()) { if (applicationRuntime == deployment.getRuntime()) { return deployment; } } return null; }
findDeployment
264,134
String (@NotNull DeploymentSource deploymentSource) { return StringUtil.toLowerCase(FileUtil.sanitizeFileName(deploymentSource.getPresentableName())); }
getDeploymentName
264,135
void (@NlsContexts.NotificationContent String message, MessageType messageType) { NotificationGroup group = Optional .ofNullable(NotificationGroup.findRegisteredGroup(myNotificationDisplayId)) .orElseGet(() -> NotificationGroup.balloonGroup(myNotificationDisplayId)); group.createNotification(message, messageType).notif...
showMessage
264,136
void (ActionEvent e) { onNewButton(); }
actionPerformed
264,137
void (ActionEvent e) { if (myServerSelectionListener != null) { myServerSelectionListener.run(); } }
actionPerformed
264,138
void (Runnable listener) { myServerSelectionListener = listener; }
setAccountSelectionListener
264,139
void () { if (myCloudTypes.size() == 1) { createAccount(ContainerUtil.getFirstItem(myCloudTypes)); return; } DefaultActionGroup group = new DefaultActionGroup(); for (final ServerType<?> cloudType : myCloudTypes) { group.add(new AnAction(cloudType.getPresentableName(), cloudType.getPresentableName(), cloudType.getIcon(...
onNewButton
264,140
void (@NotNull AnActionEvent e) { createAccount(cloudType); }
actionPerformed
264,141
void (ServerType<?> cloudType) { RemoteServer<?> newAccount = RemoteServersManager.getInstance().createServer(cloudType, generateServerName(cloudType)); final Ref<Consumer<@Nls String>> errorConsumerRef = new Ref<>(); SingleRemoteServerConfigurable configurable = new SingleRemoteServerConfigurable(newAccount, null, tru...
createAccount
264,142
void (boolean error, String text) { super.setConnectionStatusText(error, error ? "" : text); errorConsumerRef.get().consume(error ? text : null); }
setConnectionStatusText
264,143
JComponent () { return myMainPanel; }
getMainPanel
264,144
String (ServerType<?> cloudType) { return UniqueNameGenerator.generateUniqueName(cloudType.getPresentableName(), s -> { for (RemoteServer<?> server : RemoteServersManager.getInstance().getServers()) { if (server.getName().equals(s)) { return false; } } return true; }); }
generateServerName
264,145
void (WizardContext context) { RemoteServer<?> account = getSelectedAccount(); if (account == null) { return; } context.putUserData(getKey(account.getType()), account); }
setAccountOnContext
264,146
void (WizardContext context, ServerType<?> cloudType) { context.putUserData(getKey(cloudType), null); }
unsetAccountOnContext
264,147
void (WizardContext context, ServerType<?> cloudType, Module module, CloudDeploymentNameConfiguration configuration) { RemoteServer<?> account = context.getUserData(getKey(cloudType)); if (account == null) { return; } CloudRunConfigurationUtil.createRunConfiguration(account, module, configuration); }
createRunConfiguration
264,148
void (String accountName) { for (int i = 0; i < myAccountComboBox.getItemCount(); i++) { AccountItem accountItem = (AccountItem)myAccountComboBox.getItemAt(i); if (StringUtil.equals(accountName, accountItem.getAccount().getName())) { myAccountComboBox.setSelectedItem(accountItem); } } }
setSelectedAccount
264,149
String () { return myAccount.getName(); }
toString
264,150
String () { return myName; }
getName
264,151
boolean () { return false; }
isEditable
264,152
void (T row, Object value) { throw new UnsupportedOperationException(); }
setColumnValue
264,153
boolean () { return false; }
needPack
264,154
CloudAgentApplication () { return myAgentApplication; }
getApplication
264,155
void () { if (myAlarm.isDisposed()) { return; } myAlarm.addRequest(() -> { checkChanges(); queueChangesCheck(); }, CHANGES_CHECK_TIME, ModalityState.any()); }
queueChangesCheck
264,156
void () { if (wasChanged()) { myChangesPastTime = 0; } else { if (myChangesPastTime != NO_CHANGES) { myChangesPastTime += CHANGES_CHECK_TIME; if (myChangesPastTime >= RUN_DELAY_TIME) { myChangesPastTime = NO_CHANGES; run(); } } } }
checkChanges
264,157
void () { Disposer.dispose(myAlarm); }
dispose
264,158
String () { Project project = myLogManager.getProject(); return "`" + project.getName() + "`:" + project.getLocationHash(); }
getProjectHash
264,159
void (String message) { myMainLoggingHandler.print(message + "\n"); }
println
264,160
LogListener (String pipeName) { LogListenerImpl cached = myPipeName2LogListener.get(pipeName); if (cached != null && !cached.isClosed()) { return cached; } LogListenerImpl result = new LogListenerImpl(myLogManager.addAdditionalLog(pipeName)); myPipeName2LogListener.put(pipeName, result); return result; }
getOrCreateLogListener
264,161
boolean () { return myLogManager.isTtySupported(); }
isTtySupported
264,162
TerminalListener (@Nls String pipeName, OutputStream terminalInput, InputStream terminalOutput, InputStream stderr) { final TerminalHandler terminalHandler = myLogManager.addTerminal(pipeName, terminalOutput, terminalInput); return new TerminalListener() { @Override public void close() { if (terminalHandler != null) { ...
createTerminal
264,163
void () { if (terminalHandler != null) { terminalHandler.close(); } }
close
264,164
void (@Nullable TtyResizeHandler ttyResizeHandler) { if (terminalHandler instanceof TerminalHandlerBase && ttyResizeHandler != null) { ((TerminalHandlerBase)terminalHandler).setResizeHandler(ttyResizeHandler); } }
setTtyResizeHandler
264,165
void (String line) { myLoggingHandler.print(line); }
lineLogged
264,166
void (String line, Runnable action) { myLoggingHandler.printHyperlink(line, new HyperlinkInfo() { @Override public void navigate(@NotNull Project project) { action.run(); } }); }
printHyperlink
264,167
void (@NotNull Project project) { action.run(); }
navigate
264,168
void () { if (myLoggingHandler instanceof LoggingHandlerBase) { ((LoggingHandlerBase)myLoggingHandler).close(); } }
close
264,169
boolean () { return myLoggingHandler instanceof LoggingHandlerBase && ((LoggingHandlerBase)myLoggingHandler).isClosed(); }
isClosed
264,170
void (int offset) { myLoggingHandler.scrollTo(offset); }
scrollTo
264,171
void () { myLoggingHandler.clear(); }
clear
264,172
void (@Nullable CredentialAttributes credentialAttributes, @Nullable String credentialUser, @Nullable String secretValue) { doSetSafeValue(credentialAttributes, credentialUser, secretValue, value -> {}); }
doSetSafeValue
264,173
void (@Nullable CredentialAttributes credentialAttributes, @Nullable String credentialUser, @Nullable String secretValue, @NotNull Consumer<? super String> unsafeSetter) { if (credentialAttributes != null) { PasswordSafe.getInstance().set(credentialAttributes, new Credentials(credentialUser, secretValue), false); unsaf...
doSetSafeValue
264,174
Optional<String> (@Nullable CredentialAttributes credentialAttributes) { return Optional.ofNullable(credentialAttributes) .map(attributes -> PasswordSafe.getInstance().get(attributes)) .map(Credentials::getPasswordAsString); }
doGetSafeValue
264,175
String (@Nullable CredentialAttributes credentialAttributes, @NotNull Supplier<String> unsafeGetter) { return doGetSafeValue(credentialAttributes).orElseGet(unsafeGetter); }
doGetSafeValue
264,176
boolean (@Nullable CredentialAttributes credentialAttributes) { return credentialAttributes != null && PasswordSafe.getInstance().get(credentialAttributes) != null; }
hasSafeCredentials
264,177
CredentialAttributes (String serviceName, String credentialsUser) { return StringUtil.isEmpty(serviceName) || StringUtil.isEmpty(credentialsUser) ? null : new CredentialAttributes(serviceName, credentialsUser); }
createCredentialAttributes
264,178
void (String message) { myErrorMessage = message; }
onError
264,179
void () { myErrorMessage = null; }
clear
264,180
String (@NotNull CancellationException ex) { return ObjectUtils.notNull(ex.getMessage(), "Operation cancelled"); }
safeMessage
264,181
RemoteServersView (@NotNull Project project) { return project.getService(RemoteServersView.class); }
getInstance
264,182
ServerConnectionEventDispatcher () { return myEventDispatcher; }
getEventDispatcher
264,183
void (@NotNull RemoteServer<?> server) { ServerConnectionManagerImpl impl = (ServerConnectionManagerImpl)ServerConnectionManager.getInstance(); ServerConnection<?> connection = impl.getConnection(server); if (connection != null) { connection.disconnect(); } }
serverRemoved
264,184
void (@NotNull RemoteServer<?> server) { // }
serverAdded
264,185
void (@NotNull Runnable command) { myTaskExecutor.execute(command); }
execute
264,186
void (@NotNull Runnable command) { execute(command); }
submit
264,187
void (@NotNull final ThrowableRunnable<?> command, @NotNull final RemoteOperationCallback callback) { execute(() -> { try { command.run(); } catch (Throwable e) { LOG.info(e); @NlsSafe String message = Optional.ofNullable(e.getMessage()).orElseGet(() -> e.getClass().getName()); callback.errorOccurred(message); } }); }
submit
264,188
void (ServerConnection<?> connection) { myMessageBus.syncPublisher(ServerConnectionListener.TOPIC).onConnectionCreated(connection); }
fireConnectionCreated
264,189
void (final ServerConnectionImpl<?> connection) { myEventsQueue.activate(); myEventsQueue.queue(new Update(connection, CONNECTION_STATUS_PRIORITY) { @Override public void run() { myMessageBus.syncPublisher(ServerConnectionListener.TOPIC).onConnectionStatusChanged(connection); } }); }
queueConnectionStatusChanged
264,190
void () { myMessageBus.syncPublisher(ServerConnectionListener.TOPIC).onConnectionStatusChanged(connection); }
run
264,191
void (final ServerConnectionImpl<?> connection) { myEventsQueue.activate(); myEventsQueue.queue(new Update(connection, DEPLOYMENTS_PRIORITY) { @Override public void run() { myMessageBus.syncPublisher(ServerConnectionListener.TOPIC).onDeploymentsChanged(connection); } }); }
queueDeploymentsChanged
264,192
void () { myMessageBus.syncPublisher(ServerConnectionListener.TOPIC).onDeploymentsChanged(connection); }
run
264,193
ConnectionStatus () { return myStatus; }
getStatus
264,194
String () { return myStatusText != null ? myStatusText : myStatus.getPresentableText(); }
getStatusText
264,195
void (final @NotNull Runnable onFinished) { doDisconnect(); connectIfNeeded(new ServerConnector.ConnectionCallback<>() { @Override public void connected(@NotNull ServerRuntimeInstance<D> serverRuntimeInstance) { onFinished.run(); } @Override public void errorOccurred(@NotNull String errorMessage) { onFinished.run(); } ...
connect
264,196
void (@NotNull ServerRuntimeInstance<D> serverRuntimeInstance) { onFinished.run(); }
connected
264,197
void (@NotNull String errorMessage) { onFinished.run(); }
errorOccurred
264,198
void () { if (myConnectionManager != null) { myConnectionManager.removeConnection(myServer); } doDisconnect(); }
disconnect
264,199
void () { if (myStatus == ConnectionStatus.CONNECTED) { if (myRuntimeInstance != null) { myRuntimeInstance.disconnect(); myRuntimeInstance = null; } setStatus(ConnectionStatus.DISCONNECTED); for (LogManagersForProject forNextProject : myPerProjectLogManagers.values()) { forNextProject.disposeAllLogs(); } if (myMessageB...
doDisconnect