@Override protected void resetEditorFrom(@NotNull GoAppEngineRunConfiguration configuration) { myHostField.setText(StringUtil.notNullize(configuration.getHost())); myPortField.setText(StringUtil.notNullize(configuration.getPort())); myAdminPortField.setText(StringUtil.notNullize(configuration.getAdminPort())); myConfigFileField.getChildComponent().setText(StringUtil.notNullize(configuration.getConfigFile())); myCommonSettingsPanel.resetEditorFrom(configuration); }
public void setHost(final String host) { hostTextField.setText(host); }
public void setHost(final String host) { hostTextField.setText(host); }
public void setText(@Nullable String text) { textField.setText(text); }
@Nullable @Override protected JComponent createCenterPanel() { if (dataSourceToEdit != null) { Map<String, String> conf = dataSourceToEdit.getConfiguration(); String host = conf.get(Neo4jBoltConfiguration.HOST); String port = conf.get(Neo4jBoltConfiguration.PORT); String user = conf.get(Neo4jBoltConfiguration.USER); String password = conf.get(Neo4jBoltConfiguration.PASSWORD); dataSourceNameField.setText(dataSourceToEdit.getName()); hostField.setText(host); portField.setText(port); userField.setText(user); passwordField.setText(password); } return content; }
public void load(Collection<SonarQubeServer> servers, boolean enabled, @Nullable String selectedServerId, @Nullable String selectedProjectKey) { ApplicationManager.getApplication().assertIsDispatchThread(); this.bindEnable.setSelected(enabled); serverComboBox.removeAllItems(); setServerList(servers, selectedServerId); if (selectedProjectKey != null) { projectKeyTextField.setText(selectedProjectKey); } }
public void setExclusion(@Nullable ExclusionItem item) { setTitle("Edit SonarLint File Exclusion"); if (item != null) { switch (item.type()) { case DIRECTORY: directoryTextField.setText(item.item()); directoryRadioButton.setSelected(true); break; case FILE: fileTextField.setText(item.item()); fileRadioButton.setSelected(true); break; case GLOB: globTextField.setText(item.item()); globRadioButton.setSelected(true); break; } updateControls(); } }
@Override public void actionPerformed(ActionEvent e) { Map<String, RemoteProject> map = downloadProjectList(); if (map != null) { SearchProjectKeyDialog dialog = new SearchProjectKeyDialog(rootPanel, projectKeyTextField.getText(), map); if (dialog.showAndGet()) { projectKeyTextField.setText(dialog.getSelectedProjectKey() != null ? dialog.getSelectedProjectKey() : ""); } } } });
@Override protected void resetEditorFrom(@NotNull AppEngineDeploymentConfiguration configuration) { commonConfig.resetEditorFrom(configuration); if (!StringUtils.isEmpty(configuration.getModuleName())) { appYamlCombobox.setSelectedItem( AppEngineFlexibleFacet.getFacetByModuleName(configuration.getModuleName(), project)); } else { appYamlCombobox.setSelectedIndex(-1); } archiveSelector.setText(configuration.getUserSpecifiedArtifactPath()); if (configuration.isStagedArtifactNameLegacy()) { File artifact = deploymentSource.getFile(); if (artifact != null) { AppEngineFlexibleDeploymentArtifactType type = AppEngineFlexibleDeploymentArtifactType.typeForPath(artifact.toPath()); configuration.setStagedArtifactName(StagedArtifactNameLegacySupport.getTargetName(type)); configuration.setStagedArtifactNameLegacy(false); } } if (StringUtils.isNotBlank(configuration.getStagedArtifactName())) { stagedArtifactNameTextField.setText(configuration.getStagedArtifactName()); } }
/** * Shared implementation of {@link * com.intellij.openapi.options.SettingsEditor#resetEditorFrom(Object)}. To be invoked by users of * this panel in the overriden method. */ public void resetEditorFrom(@NotNull AppEngineDeploymentConfiguration configuration) { promoteCheckbox.setSelected(configuration.isPromote()); versionIdField.setText(configuration.getVersion()); stopPreviousVersionCheckbox.setSelected(configuration.isStopPreviousVersion()); deployAllConfigsCheckbox.setSelected(configuration.isDeployAllConfigs()); if (configuration.getEnvironment() != null) { environmentLabel.setText(configuration.getEnvironment().localizedLabel()); } // TODO(ivanporty) add project name to configuration and then use separate project ID field. if (configuration.getCloudProjectName() != null && configuration.getGoogleUsername() != null) { CloudProject cloudProject = CloudProject.create( configuration.getCloudProjectName(), configuration.getCloudProjectName(), configuration.getGoogleUsername()); projectSelector.setSelectedProject(cloudProject); } else { // unset project, load default active cloud project (if available for this IDE project) projectSelector.loadActiveCloudProject(); } refreshApplicationInfoPanel(projectSelector.getSelectedProject()); }
@Test public void applyEditorTo_withStagedArtifactName_doesSetStagedArtifactName() { String stagedArtifactName = "some-artifact.war"; editor.getStagedArtifactNameTextField().setText(stagedArtifactName); editor.applyEditorTo(configuration); assertThat(configuration.getStagedArtifactName()).isEqualTo(stagedArtifactName); }
@Test public void applyEditorTo_doesSetVersion() throws Exception { String version = "some-version"; editor.getCommonConfig().getVersionIdField().setText(version); editor.applyEditorTo(configuration); assertThat(configuration.getVersion()).isEqualTo(version); }
@Test public void applyEditorTo_doesSetVersion() throws Exception { String version = "some-version"; editor.getCommonConfig().getVersionIdField().setText(version); editor.applyEditorTo(configuration); assertThat(configuration.getVersion()).isEqualTo(version); }
if (matcher.find()){ String group = matcher.group(1); connectDbSetting.getTablePrefixInput().setText(group); connectDbSetting.getDaoInput().setText(daoPath.getPath()); VirtualFile finalDaoPath = daoPath; daoPanel.addActionListener(e -> { connectDbSetting.getDaoInput().setText(path); }); connectDbSetting.getMapperInput().setText(mapperPath.getPath()); VirtualFile finalMapperPath = mapperPath; mapperButton.addActionListener(e->{ connectDbSetting.getMapperInput().setText(path); }); connectDbSetting.getPoInput().setText(modelPath.getPath()); connectDbSetting.getPoButton().addActionListener(e->{ VirtualFile vf = uiComponentFacade.showSingleFolderSelectionDialog("请选择实体层存放目录", finalModelPath, baseDir); connectDbSetting.getPoInput().setText(path); }); connectDbSetting.getServiceInput().setText(servicePath.getPath()); connectDbSetting.getServiceButton().addActionListener(e->{ VirtualFile vf = uiComponentFacade.showSingleFolderSelectionDialog("请选择Service层存放目录", finalServicePath, baseDir);