use of com.google.cloud.tools.intellij.project.ProjectSelector in project google-cloud-intellij by GoogleCloudPlatform.
the class AppEngineDeploymentConfigurationPanel method createUIComponents.
private void createUIComponents() {
hiddenValidationTrigger = new JBCheckBox();
hiddenValidationTrigger.setVisible(false);
projectSelector = new ProjectSelector(ideProject);
}
use of com.google.cloud.tools.intellij.project.ProjectSelector in project google-cloud-intellij by GoogleCloudPlatform.
the class CloudDebugRunConfigurationPanel method createUIComponents.
private void createUIComponents() {
hiddenValidationTrigger = new JBCheckBox();
hiddenValidationTrigger.setVisible(false);
projectSelector = new ProjectSelector(ideProject);
projectSelector.addProjectSelectionListener((selectedProject) -> {
// settings editor does not see all the changes by default, use explicit notification.
triggerValidation();
});
}
use of com.google.cloud.tools.intellij.project.ProjectSelector in project google-cloud-intellij by GoogleCloudPlatform.
the class GoogleCloudApiSelectorPanelTest method getManagementUI_withLibraryAndProjectSelected_isEnabled.
@Test
public void getManagementUI_withLibraryAndProjectSelected_isEnabled() {
CloudLibrary library = LIBRARY_1.toCloudLibrary();
GoogleCloudApiSelectorPanel panel = new GoogleCloudApiSelectorPanel(ImmutableList.of(library), testFixture.getProject());
JTable table = panel.getCloudLibrariesTable();
checkAddLibraryCheckbox(table, 0);
panel.getDetailsPanel().setCloudLibrary(library, BOM_VERSION, panel.getApiManagementMap().get(library));
CloudProject cloudProject = CloudProject.create("name", "id", "user");
ProjectSelector projectSelector = panel.getProjectSelector();
projectSelector.setSelectedProject(cloudProject);
projectSelector.getProjectSelectionListeners().forEach(listener -> listener.projectSelected(cloudProject));
assertThat(panel.getDetailsPanel().getEnableApiCheckbox().isEnabled()).isTrue();
assertThat(panel.getDetailsPanel().getManagementInfoPanel().isVisible()).isFalse();
}
use of com.google.cloud.tools.intellij.project.ProjectSelector in project google-cloud-intellij by GoogleCloudPlatform.
the class GoogleCloudApiSelectorPanel method createUIComponents.
/**
* Initializes some UI components in this panel that require special set-up.
*
* <p>This is automatically called by the IDEA SDK and should not be directly invoked.
*/
private void createUIComponents() {
modulesComboBox = new ModulesComboBox();
modulesComboBox.fillModules(project);
ApplicationManager.getApplication().runReadAction(() -> {
Module[] modules = ModuleManager.getInstance(project).getSortedModules();
if (modules.length > 0) {
// Defaults to the first, top-level module in this project.
modulesComboBox.setSelectedModule(modules[0]);
}
});
cloudLibrariesTable = new CloudLibraryTable(libraries);
cloudLibrariesTable.setTableHeader(null);
cloudLibrariesTable.getSelectionModel().addListSelectionListener(this::onClientLibrarySelection);
addTableModelListener(e -> updateManagementUI());
projectSelector = new ProjectSelector(project);
projectSelector.addProjectSelectionListener(cloudProject -> updateManagementUI());
}
use of com.google.cloud.tools.intellij.project.ProjectSelector in project google-cloud-intellij by GoogleCloudPlatform.
the class SetupCloudRepositoryDialog method createUIComponents.
private void createUIComponents() {
projectSelector = new ProjectSelector(ideProject);
projectSelector.setMinimumSize(new Dimension(400, 0));
repositorySelector = new RepositorySelector(projectSelector.getSelectedProject(), true);
remoteNameSelector = new RepositoryRemotePanel(gitRepository);
projectSelector.addProjectSelectionListener(this::updateRepositorySelector);
repositorySelector.getDocument().addDocumentListener(new DocumentAdapter() {
@Override
protected void textChanged(DocumentEvent event) {
remoteNameSelector.update(repositorySelector.getSelectedRepository());
updateButtons();
}
});
remoteNameSelector.getRemoteNameField().getDocument().addDocumentListener(new DocumentAdapter() {
@Override
protected void textChanged(DocumentEvent event) {
updateButtons();
}
});
}
Aggregations