use of com.intellij.ui.EditorComboBox in project intellij-community by JetBrains.
the class CloneDvcsDialog method createUIComponents.
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();
}
});
}
use of com.intellij.ui.EditorComboBox in project intellij-community by JetBrains.
the class HgPullDialog method createUIComponents.
public void createUIComponents() {
myRepositoryURL = new EditorComboBox("");
myRepositoryURL.addDocumentListener(new DocumentAdapter() {
@Override
public void documentChanged(DocumentEvent e) {
onChangePullSource();
}
});
}
use of com.intellij.ui.EditorComboBox in project android by JetBrains.
the class PackageComboProvider method createComponent.
@NotNull
@Override
protected EditorComboBox createComponent(@NotNull Parameter parameter) {
Document doc = JavaReferenceEditorUtil.createDocument(myInitialPackage, myProject, false, JavaCodeFragment.VisibilityChecker.PROJECT_SCOPE_VISIBLE);
assert doc != null;
final EditorComboBox classComboBox = new EditorComboBox(doc, myProject, StdFileTypes.JAVA);
// Make sure our suggested package is in the recents list and at the top
RecentsManager.getInstance(myProject).registerRecentEntry(myRecentsKey, myInitialPackage);
List<String> recents = RecentsManager.getInstance(myProject).getRecentEntries(myRecentsKey);
// We just added at least one entry!
assert recents != null;
classComboBox.setHistory(Iterables.toArray(recents, String.class));
return classComboBox;
}
Aggregations