use of com.intellij.dvcs.DvcsRememberedInputs in project intellij-community by JetBrains.
the class CloneDvcsDialog method rememberSettings.
public void rememberSettings() {
final DvcsRememberedInputs rememberedInputs = getRememberedInputs();
rememberedInputs.addUrl(getSourceRepositoryURL());
rememberedInputs.setCloneParentDir(getParentDirectory());
}
use of com.intellij.dvcs.DvcsRememberedInputs 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();
}
});
}
Aggregations