private void createUIComponents() { myRepositoryURL = new EditorComboBox(""); final DvcsRememberedInputs rememberedInputs = getRememberedInputs(); List<String> urls = new ArrayList<String>(rememberedInputs.getVisitedUrls()); if (myDefaultRepoUrl != null) { urls.add(0, myDefaultRepoUrl); } myRepositoryURL.setHistory(ArrayUtil.toObjectArray(urls, String.class)); myRepositoryURL.addDocumentListener(new com.intellij.openapi.editor.event.DocumentAdapter() { @Override public void documentChanged(com.intellij.openapi.editor.event.DocumentEvent e) { // enable test button only if something is entered in repository URL final String url = getCurrentUrlText(); myTestButton.setEnabled(url.length() != 0); if (myDefaultDirectoryName.equals(myDirectoryName.getText()) || myDirectoryName.getText().length() == 0) { // modify field if it was unmodified or blank myDefaultDirectoryName = defaultDirectoryName(url, myVcsDirectoryName); myDirectoryName.setText(myDefaultDirectoryName); } updateButtons(); } }); }
private void createUIComponents() { myRepositoryURL = new EditorComboBox(""); final GitRememberedInputs rememberedInputs = GitRememberedInputs.getInstance(); myRepositoryURL.setHistory(ArrayUtil.toObjectArray(rememberedInputs.getVisitedUrls(), String.class)); myRepositoryURL.addDocumentListener(new com.intellij.openapi.editor.event.DocumentAdapter() { @Override public void documentChanged(com.intellij.openapi.editor.event.DocumentEvent e) { // enable test button only if something is entered in repository URL final String url = getCurrentUrlText(); myTestButton.setEnabled(url.length() != 0); if (myDefaultDirectoryName.equals(myDirectoryName.getText()) || myDirectoryName.getText().length() == 0) { // modify field if it was unmodified or blank myDefaultDirectoryName = defaultDirectoryName(url); myDirectoryName.setText(myDefaultDirectoryName); } updateButtons(); } }); }
private void createUIComponents() { myRepositoryURL = new EditorComboBox(""); final DvcsRememberedInputs rememberedInputs = getRememberedInputs(); List<String> urls = new ArrayList<>(rememberedInputs.getVisitedUrls()); if (myDefaultRepoUrl != null) { urls.add(0, myDefaultRepoUrl); } myRepositoryURL.setHistory(ArrayUtil.toObjectArray(urls, String.class)); myRepositoryURL.addDocumentListener(new com.intellij.openapi.editor.event.DocumentAdapter() { @Override public void documentChanged(com.intellij.openapi.editor.event.DocumentEvent e) { // enable test button only if something is entered in repository URL final String url = getCurrentUrlText(); myTestButton.setEnabled(url.length() != 0); if (myDefaultDirectoryName.equals(myDirectoryName.getText()) || myDirectoryName.getText().length() == 0) { // modify field if it was unmodified or blank myDefaultDirectoryName = defaultDirectoryName(url, myVcsDirectoryName); myDirectoryName.setText(myDefaultDirectoryName); } updateButtons(); } }); }
protected ComponentWithBrowseButton<EditorComboBox> createPackageNameField() { String name = ""; PsiFile file = mySourceClass.getContainingFile(); if (file instanceof PsiJavaFile) { name = ((PsiJavaFile)file).getPackageName(); } return new PackageNameReferenceEditorCombo(name, myProject, DESTINATION_PACKAGE_RECENT_KEY, RefactoringBundle.message("choose.destination.package")); }
public void createUIComponents() { myRepositoryURL = new EditorComboBox(""); myRepositoryURL.addDocumentListener(new DocumentAdapter() { @Override public void documentChanged(DocumentEvent e) { onChangePullSource(); } }); }
public void createUIComponents() { myRepositoryURL = new EditorComboBox(""); final HgRememberedInputs rememberedInputs = HgRememberedInputs.getInstance(project); myRepositoryURL.setHistory(ArrayUtil.toObjectArray(rememberedInputs.getRepositoryUrls(), String.class)); myRepositoryURL.addDocumentListener(new DocumentAdapter() { @Override public void documentChanged(DocumentEvent e) { onChangePullSource(); } }); }
public void createUIComponents() { myRepositoryURL = new EditorComboBox(""); final HgRememberedInputs rememberedInputs = HgRememberedInputs.getInstance(myProject); myRepositoryURL.setHistory(ArrayUtil.toObjectArray(rememberedInputs.getRepositoryUrls(), String.class)); myRepositoryURL.addDocumentListener(new DocumentAdapter() { @Override public void documentChanged(com.intellij.openapi.editor.event.DocumentEvent e) { myCurrentRepositoryUrl = myRepositoryURL.getText(); setOKActionEnabled(!StringUtil.isEmptyOrSpaces(myRepositoryURL.getText())); } }); }