more dynamic bundles

GitOrigin-RevId: f440550fdfe119a71860961b9bcbdddd3cea0eda
This commit is contained in:
Sergey Ignatov
2019-12-18 19:31:34 +00:00
committed by intellij-monorepo-bot
parent da81ff4937
commit f6498b18d6
22 changed files with 99 additions and 239 deletions
@@ -73,7 +73,7 @@ public abstract class CloudModuleBuilderSourceContribution<
final ServerType<?> cloudType = account.getType();
final Project project = module.getProject();
new CloudConnectionTask<Object, SC, DC, SR>(project,
CloudBundle.getText("cloud.support", cloudType.getPresentableName()),
CloudBundle.message("cloud.support", cloudType.getPresentableName()),
account) {
boolean myFirstAttempt = true;
@@ -144,7 +144,7 @@ public abstract class CloudModuleBuilderSourceContribution<
});
ProgressManager.getInstance()
.run(new Task.Backgroundable(project, CloudBundle.getText("detect.module.structure", getCloudType().getPresentableName()), false) {
.run(new Task.Backgroundable(project, CloudBundle.message("detect.module.structure", getCloudType().getPresentableName()), false) {
@Override
public void run(@NotNull ProgressIndicator indicator) {
@@ -173,7 +173,7 @@ public abstract class CloudModuleBuilderSourceContribution<
return;
}
moduleBuilder.commit(project);
getNotifier().showMessage(CloudBundle.getText("cloud.support.added", getCloudType().getPresentableName()), MessageType.INFO);
getNotifier().showMessage(CloudBundle.message("cloud.support.added", getCloudType().getPresentableName()), MessageType.INFO);
}
});
}
+6 -23
View File
@@ -1,37 +1,20 @@
package com.intellij.json;
import com.intellij.CommonBundle;
import com.intellij.reference.SoftReference;
import com.intellij.DynamicBundle;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey;
import java.lang.ref.Reference;
import java.util.ResourceBundle;
/**
* @author Mikhail Golubev
*/
public class JsonBundle {
private static Reference<ResourceBundle> ourBundle;
public class JsonBundle extends DynamicBundle {
@NonNls public static final String BUNDLE = "com.intellij.json.JsonBundle";
private static final JsonBundle INSTANCE = new JsonBundle();
private JsonBundle() {
// empty
super(BUNDLE);
}
@NotNull
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, @NotNull Object... params) {
return CommonBundle.message(getBundle(), key, params);
return INSTANCE.getMessage(key, params);
}
private static ResourceBundle getBundle() {
ResourceBundle bundle = SoftReference.dereference(ourBundle);
if (bundle == null) {
bundle = ResourceBundle.getBundle(BUNDLE);
ourBundle = new SoftReference<>(bundle);
}
return bundle;
}
}
}
@@ -14,9 +14,9 @@ import org.jetbrains.annotations.PropertyKey;
*/
public class JsonCodeStyleSettings extends CustomCodeStyleSettings {
public static int DO_NOT_ALIGN_PROPERTY = PropertyAlignment.DO_NOT_ALIGN.getId();
public static int ALIGN_PROPERTY_ON_VALUE = PropertyAlignment.ALIGN_ON_VALUE.getId();
public static int ALIGN_PROPERTY_ON_COLON = PropertyAlignment.ALIGN_ON_COLON.getId();
public static final int DO_NOT_ALIGN_PROPERTY = PropertyAlignment.DO_NOT_ALIGN.getId();
public static final int ALIGN_PROPERTY_ON_VALUE = PropertyAlignment.ALIGN_ON_VALUE.getId();
public static final int ALIGN_PROPERTY_ON_COLON = PropertyAlignment.ALIGN_ON_COLON.getId();
public boolean SPACE_AFTER_COLON = true;
public boolean SPACE_BEFORE_COLON = false;
@@ -24,7 +24,7 @@ public class JsonCodeStyleSettings extends CustomCodeStyleSettings {
// TODO: check whether it's possible to migrate CustomCodeStyleSettings to newer com.intellij.util.xmlb.XmlSerializer
/**
* Contains value of {@link com.intellij.json.formatter.JsonCodeStyleSettings.PropertyAlignment#getId()}
* Contains value of {@link JsonCodeStyleSettings.PropertyAlignment#getId()}
*
* @see #DO_NOT_ALIGN_PROPERTY
* @see #ALIGN_PROPERTY_ON_VALUE
@@ -16,36 +16,21 @@
package com.intellij.find;
import com.intellij.CommonBundle;
import com.intellij.DynamicBundle;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey;
import java.lang.ref.Reference;
import java.lang.ref.SoftReference;
import java.util.ResourceBundle;
/**
* @author yole
*/
public class FindBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, @NotNull Object... params) {
return CommonBundle.message(getBundle(), key, params);
}
private static Reference<ResourceBundle> ourBundle;
public class FindBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.FindBundle";
private static final FindBundle INSTANCE = new FindBundle();
private FindBundle() {
super(BUNDLE);
}
private static ResourceBundle getBundle() {
ResourceBundle bundle = com.intellij.reference.SoftReference.dereference(ourBundle);
if (bundle == null) {
bundle = ResourceBundle.getBundle(BUNDLE);
ourBundle = new SoftReference<>(bundle);
}
return bundle;
@NotNull
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, @NotNull Object... params) {
return INSTANCE.getMessage(key, params);
}
}
}
@@ -16,36 +16,21 @@
package com.intellij.lang;
import com.intellij.CommonBundle;
import com.intellij.DynamicBundle;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey;
import java.lang.ref.Reference;
import java.lang.ref.SoftReference;
import java.util.ResourceBundle;
/**
* @author yole
*/
public class LangBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, @NotNull Object... params) {
return CommonBundle.message(getBundle(), key, params);
}
private static Reference<ResourceBundle> ourBundle;
public class LangBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.LangBundle";
private static final LangBundle INSTANCE = new LangBundle();
private LangBundle() {
super(BUNDLE);
}
private static ResourceBundle getBundle() {
ResourceBundle bundle = com.intellij.reference.SoftReference.dereference(ourBundle);
if (bundle == null) {
bundle = ResourceBundle.getBundle(BUNDLE);
ourBundle = new SoftReference<>(bundle);
}
return bundle;
@NotNull
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, @NotNull Object... params) {
return INSTANCE.getMessage(key, params);
}
}
}
@@ -15,36 +15,22 @@
*/
package com.intellij.openapi.fileTypes;
import com.intellij.CommonBundle;
import com.intellij.DynamicBundle;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey;
import java.lang.ref.Reference;
import java.lang.ref.SoftReference;
import java.util.ResourceBundle;
/**
* @author yole
*/
public class FileTypesBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, @NotNull Object... params) {
return CommonBundle.message(getBundle(), key, params);
}
private static Reference<ResourceBundle> ourBundle;
public class FileTypesBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.FileTypesBundle";
private static final FileTypesBundle INSTANCE = new FileTypesBundle();
private FileTypesBundle() {
super(BUNDLE);
}
private static ResourceBundle getBundle() {
ResourceBundle bundle = com.intellij.reference.SoftReference.dereference(ourBundle);
if (bundle == null) {
bundle = ResourceBundle.getBundle(BUNDLE);
ourBundle = new SoftReference<>(bundle);
}
return bundle;
@NotNull
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, @NotNull Object... params) {
return INSTANCE.getMessage(key, params);
}
}
}
@@ -1,32 +1,21 @@
package com.intellij.dupLocator;
import com.intellij.CommonBundle;
import com.intellij.DynamicBundle;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey;
import java.lang.ref.Reference;
import java.lang.ref.SoftReference;
import java.util.ResourceBundle;
public class DupLocatorBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, @NotNull Object... params) {
return CommonBundle.message(getBundle(), key, params);
}
private static Reference<ResourceBundle> ourBundle;
public class DupLocatorBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.DupLocatorBundle";
private static final DupLocatorBundle INSTANCE = new DupLocatorBundle();
private DupLocatorBundle() {
super(BUNDLE);
}
private static ResourceBundle getBundle() {
ResourceBundle bundle = com.intellij.reference.SoftReference.dereference(ourBundle);
if (bundle == null) {
bundle = ResourceBundle.getBundle(BUNDLE);
ourBundle = new SoftReference<>(bundle);
}
return bundle;
@NotNull
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, @NotNull Object... params) {
return INSTANCE.getMessage(key, params);
}
}
}
@@ -16,36 +16,19 @@
package com.intellij.codeEditor.printing;
import com.intellij.CommonBundle;
import com.intellij.DynamicBundle;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey;
import java.lang.ref.Reference;
import java.lang.ref.SoftReference;
import java.util.ResourceBundle;
/**
* @author yole
*/
public class CodeEditorBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, @NotNull Object... params) {
return CommonBundle.message(getBundle(), key, params);
}
private static Reference<ResourceBundle> ourBundle;
public class CodeEditorBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.CodeEditorBundle";
private static final CodeEditorBundle INSTANCE = new CodeEditorBundle();
private CodeEditorBundle() {
}
private CodeEditorBundle() { super(BUNDLE); }
private static ResourceBundle getBundle() {
ResourceBundle bundle = com.intellij.reference.SoftReference.dereference(ourBundle);
if (bundle == null) {
bundle = ResourceBundle.getBundle(BUNDLE);
ourBundle = new SoftReference<>(bundle);
}
return bundle;
@NotNull
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, @NotNull Object... params) {
return INSTANCE.getMessage(key, params);
}
}
@@ -16,36 +16,21 @@
package com.intellij.tools;
import com.intellij.CommonBundle;
import com.intellij.DynamicBundle;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey;
import java.lang.ref.Reference;
import java.lang.ref.SoftReference;
import java.util.ResourceBundle;
/**
* @author yole
*/
public class ToolsBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, @NotNull Object... params) {
return CommonBundle.message(getBundle(), key, params);
}
private static Reference<ResourceBundle> ourBundle;
public class ToolsBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.ToolsBundle";
private static final ToolsBundle INSTANCE = new ToolsBundle();
private ToolsBundle() {
super(BUNDLE);
}
private static ResourceBundle getBundle() {
ResourceBundle bundle = com.intellij.reference.SoftReference.dereference(ourBundle);
if (bundle == null) {
bundle = ResourceBundle.getBundle(BUNDLE);
ourBundle = new SoftReference<>(bundle);
}
return bundle;
@NotNull
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, @NotNull Object... params) {
return INSTANCE.getMessage(key, params);
}
}
}
@@ -15,36 +15,19 @@
*/
package com.intellij.diagnostic;
import com.intellij.CommonBundle;
import com.intellij.DynamicBundle;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey;
import java.lang.ref.Reference;
import java.lang.ref.SoftReference;
import java.util.ResourceBundle;
/**
* @author yole
*/
public class DiagnosticBundle {
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, @NotNull Object... params) {
return CommonBundle.message(getBundle(), key, params);
}
private static Reference<ResourceBundle> ourBundle;
public class DiagnosticBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "messages.DiagnosticBundle";
private static final DiagnosticBundle INSTANCE = new DiagnosticBundle();
private DiagnosticBundle() {
}
private DiagnosticBundle() { super(BUNDLE); }
private static ResourceBundle getBundle() {
ResourceBundle bundle = com.intellij.reference.SoftReference.dereference(ourBundle);
if (bundle == null) {
bundle = ResourceBundle.getBundle(BUNDLE);
ourBundle = new SoftReference<>(bundle);
}
return bundle;
@NotNull
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, @NotNull Object... params) {
return INSTANCE.getMessage(key, params);
}
}
}
@@ -82,7 +82,7 @@ public class RemoteServerListConfigurable extends MasterDetailsComponent impleme
type -> type.getPresentableName(), ", ");
if (typeNames.length() > 0) {
return CloudBundle.getText("clouds.configure.empty.selection.string", typeNames);
return CloudBundle.message("clouds.configure.empty.selection.string", typeNames);
}
return null;
}
@@ -266,7 +266,7 @@ public abstract class DeployToServerSettingsEditor<S extends ServerConfiguration
IN_PROGRESS {
@Override
public void validateConnection() throws RuntimeConfigurationException {
throw new RuntimeConfigurationWarning(CloudBundle.getText("remote.server.combo.message.test.connection.in.progress"));
throw new RuntimeConfigurationWarning(CloudBundle.message("remote.server.combo.message.test.connection.in.progress"));
}
},
SUCCESSFUL {
@@ -279,7 +279,7 @@ public abstract class DeployToServerSettingsEditor<S extends ServerConfiguration
@Override
public void validateConnection() throws RuntimeConfigurationException {
throw new RuntimeConfigurationError(
CloudBundle.getText("remote.server.combo.message.test.connection.failed")/*, () -> createAndEditNewServer()*/);
CloudBundle.message("remote.server.combo.message.test.connection.failed")/*, () -> createAndEditNewServer()*/);
}
};
@@ -300,7 +300,7 @@ public abstract class DeployToServerSettingsEditor<S extends ServerConfiguration
ui.setIcon(getServerType().getIcon());
boolean failed = myTestConnectionStateA.get() == TestConnectionState.FAILED;
ui.append(CloudBundle.getText("remote.server.combo.auto.detected.server", getServerType().getPresentableName()),
ui.append(CloudBundle.message("remote.server.combo.auto.detected.server", getServerType().getPresentableName()),
failed ? SimpleTextAttributes.ERROR_ATTRIBUTES : SimpleTextAttributes.REGULAR_ITALIC_ATTRIBUTES);
}
@@ -248,7 +248,7 @@ public class RemoteServerCombo<S extends ServerConfiguration> extends ComboboxWi
@Override
public void render(@NotNull SimpleColoredComponent ui) {
ui.setIcon(EmptyIcon.create(myServerType.getIcon()));
ui.append(CloudBundle.getText("remote.server.combo.create.new.server"), SimpleTextAttributes.REGULAR_ATTRIBUTES);
ui.append(CloudBundle.message("remote.server.combo.create.new.server"), SimpleTextAttributes.REGULAR_ATTRIBUTES);
}
@Override
@@ -339,7 +339,7 @@ public class RemoteServerCombo<S extends ServerConfiguration> extends ComboboxWi
@Override
public void render(@NotNull SimpleColoredComponent ui) {
ui.setIcon(null);
ui.append(CloudBundle.getText("remote.server.combo.no.servers"), SimpleTextAttributes.ERROR_ATTRIBUTES);
ui.append(CloudBundle.message("remote.server.combo.no.servers"), SimpleTextAttributes.ERROR_ATTRIBUTES);
}
}
}
@@ -127,7 +127,7 @@ public abstract class RemoteServersServiceViewContributor
RemoteServersManager remoteServersManager = RemoteServersManager.getInstance();
RemoteServer<C> server = remoteServersManager.createServer(serverType, name);
SingleRemoteServerConfigurable configurable = new SingleRemoteServerConfigurable(server, null, true);
configurable.setDisplayName(CloudBundle.getText("new.cloud.connection.configurable.title", serverType.getPresentableName()));
configurable.setDisplayName(CloudBundle.message("new.cloud.connection.configurable.title", serverType.getPresentableName()));
Runnable advancedInitialization = () -> {
configurable.setDisplayName(name);
configurable.updateName();
@@ -170,9 +170,9 @@ public class ServersTreeStructure {
}
if (runConfigOrSourceType instanceof SingletonDeploymentSourceType) {
String displayName = ((SingletonDeploymentSourceType)runConfigOrSourceType).getPresentableName();
return CloudBundle.getText("create.new.deployment.configuration.for.singleton.type", displayName);
return CloudBundle.message("create.new.deployment.configuration.for.singleton.type", displayName);
}
return CloudBundle.getText("create.new.deployment.configuration.generic");
return CloudBundle.message("create.new.deployment.configuration.generic");
}
@Override
@@ -43,8 +43,7 @@ public class AddCloudConnectionActionGroup extends ActionGroup {
@Override
public void update(@NotNull AnActionEvent e) {
if (e.getPlace().equals(ActionPlaces.ACTION_SEARCH)) {
e.getPresentation().setText(CloudBundle.getText("new.cloud.connection.configurable.title",
myServerType.getPresentableName()));
e.getPresentation().setText(CloudBundle.message("new.cloud.connection.configurable.title", myServerType.getPresentableName()));
}
else {
e.getPresentation().setText(myServerType.getPresentableName());
@@ -15,37 +15,19 @@
*/
package com.intellij.remoteServer.util;
import com.intellij.CommonBundle;
import com.intellij.DynamicBundle;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey;
import java.lang.ref.Reference;
import java.lang.ref.SoftReference;
import java.util.ResourceBundle;
/**
* @author michael.golubev
*/
public class CloudBundle {
private static Reference<ResourceBundle> ourBundle;
public class CloudBundle extends DynamicBundle {
@NonNls private static final String BUNDLE = "resources.cloud";
private static final CloudBundle INSTANCE = new CloudBundle();
private CloudBundle() {
private CloudBundle() { super(BUNDLE); }
}
public static String getText(@PropertyKey(resourceBundle = BUNDLE) String key, Object... params) {
return CommonBundle.message(getBundle(), key, params);
}
private static ResourceBundle getBundle() {
ResourceBundle bundle = com.intellij.reference.SoftReference.dereference(ourBundle);
if (bundle == null) {
bundle = ResourceBundle.getBundle(BUNDLE);
ourBundle = new SoftReference<>(bundle);
}
return bundle;
@NotNull
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, @NotNull Object... params) {
return INSTANCE.getMessage(key, params);
}
}
@@ -90,9 +90,9 @@ public class CloudGitApplicationRuntime extends CloudApplicationRuntime {
private boolean confirmUndeploy() {
final Ref<Boolean> confirmed = new Ref<>(false);
ApplicationManager.getApplication().invokeAndWait(() -> {
String title = CloudBundle.getText("cloud.undeploy.confirm.title");
String title = CloudBundle.message("cloud.undeploy.confirm.title");
while (true) {
String password = Messages.showPasswordDialog(CloudBundle.getText("cloud.undeploy.confirm.message", getApplicationName()), title);
String password = Messages.showPasswordDialog(CloudBundle.message("cloud.undeploy.confirm.message", getApplicationName()), title);
if (password == null) {
return;
}
@@ -100,7 +100,7 @@ public class CloudGitApplicationRuntime extends CloudApplicationRuntime {
confirmed.set(true);
return;
}
Messages.showErrorDialog(CloudBundle.getText("cloud.undeploy.confirm.password.incorrect"), title);
Messages.showErrorDialog(CloudBundle.message("cloud.undeploy.confirm.password.incorrect"), title);
}
});
return confirmed.get();
@@ -52,6 +52,6 @@ public class CloudRunConfigurationUtil {
private static String generateRunConfigurationName(@NotNull RemoteServer<?> account, Module module) {
String accountName = account.getName();
String moduleName = module.getName();
return CloudBundle.getText("run.configuration.name", accountName, moduleName);
return CloudBundle.message("run.configuration.name", accountName, moduleName);
}
}
@@ -192,7 +192,7 @@ public class CloudGitRemoteDetector implements GitRepositoryChangeListener, Proj
myRepositoryRoot = repository.getRoot();
myCloudName = deploymentDetector.getCloudType().getPresentableName();
String path = FileUtil.toSystemDependentName(myRepositoryRoot.getPath());
myNotification = myNotifier.showMessage(CloudBundle.getText("git.cloud.app.detected", myCloudName, path),
myNotification = myNotifier.showMessage(CloudBundle.message("git.cloud.app.detected", myCloudName, path),
MessageType.INFO,
new NotificationListener() {
@@ -231,7 +231,7 @@ public class CloudGitRemoteDetector implements GitRepositoryChangeListener, Proj
}
else {
final Ref<CloudGitChooseAccountStepBase> chooseAccountStepRef = new Ref<>();
if (!new AbstractProjectWizard(CloudBundle.getText("choose.account.wizzard.title", myCloudName), myProject, (String)null) {
if (!new AbstractProjectWizard(CloudBundle.message("choose.account.wizzard.title", myCloudName), myProject, (String)null) {
final StepSequence myStepSequence;
@@ -316,11 +316,11 @@ public class CloudGitDeploymentRuntime extends CloudDeploymentRuntime {
}
protected void addGitRemote(CloudGitApplication application) throws ServerRuntimeException {
doGitRemote(getRemoteName(), application, "add", CloudBundle.getText("failed.add.remote", getRemoteName()));
doGitRemote(getRemoteName(), application, "add", CloudBundle.message("failed.add.remote", getRemoteName()));
}
protected void resetGitRemote(CloudGitApplication application) throws ServerRuntimeException {
doGitRemote(getRemoteName(), application, "set-url", CloudBundle.getText("failed.reset.remote", getRemoteName()));
doGitRemote(getRemoteName(), application, "set-url", CloudBundle.message("failed.reset.remote", getRemoteName()));
}
protected void doGitRemote(String remoteName,
@@ -386,7 +386,7 @@ public class CloudGitDeploymentRuntime extends CloudDeploymentRuntime {
fetchHandler.setSilent(false);
fetchHandler.addParameters(getRemoteName());
fetchHandler.addLineListener(createGitLineHandlerListener());
performRemoteGitTask(fetchHandler, CloudBundle.getText("fetching.application", getCloudName()));
performRemoteGitTask(fetchHandler, CloudBundle.message("fetching.application", getCloudName()));
repository.update();
}
@@ -530,7 +530,7 @@ public class CloudGitDeploymentRuntime extends CloudDeploymentRuntime {
handler.addParameters("-o");
handler.addParameters(getRemoteName());
handler.addLineListener(createGitLineHandlerListener());
performRemoteGitTask(handler, CloudBundle.getText("cloning.existing.application", getCloudName()));
performRemoteGitTask(handler, CloudBundle.message("cloning.existing.application", getCloudName()));
}
}
}
@@ -46,7 +46,7 @@ public class CloudGitChooseAccountStepBase extends ModuleWizardStep {
myDeploymentDetector = deploymentDetector;
myContext = context;
ServerType<?> cloudType = deploymentDetector.getCloudType();
myTitleLabel.setText(CloudBundle.getText("choose.account.title", cloudType.getPresentableName()));
myTitleLabel.setText(CloudBundle.message("choose.account.title", cloudType.getPresentableName()));
myEditor = new CloudAccountSelectionEditor(Collections.singletonList(cloudType));
myAccountSelectionPanelPlaceHolder.add(myEditor.getMainPanel());
}