use of com.intellij.cvsSupport2.cvsBrowser.CvsElement in project intellij-community by JetBrains.
the class CheckoutAction method collectCheckoutPaths.
private String[] collectCheckoutPaths() {
String[] checkoutPaths = new String[mySelectedElements.length];
for (int i = 0; i < mySelectedElements.length; i++) {
CvsElement selectedElement = mySelectedElements[i];
checkoutPaths[i] = selectedElement.getCheckoutPath();
}
return checkoutPaths;
}
use of com.intellij.cvsSupport2.cvsBrowser.CvsElement in project intellij-community by JetBrains.
the class BrowserPanel method getCvsVirtualFile.
@Nullable
private VirtualFile getCvsVirtualFile() {
CvsElement[] currentSelection = myTree.getCurrentSelection();
if (currentSelection.length != 1)
return null;
VirtualFile file = currentSelection[0].getVirtualFile();
if (file == null)
return null;
if (file.isDirectory())
return null;
return file;
}
use of com.intellij.cvsSupport2.cvsBrowser.CvsElement in project intellij-community by JetBrains.
the class ModuleChooser method getSelectedModules.
public CvsModule[] getSelectedModules() {
CvsRepository repository = getSelectedRepository();
CvsElement[] selectedCvsElement = mySelectCvsElementStep.getSelectedCvsElements();
ArrayList<CvsModule> result = new ArrayList<>();
for (CvsElement cvsElement : selectedCvsElement) {
result.add(new CvsModule(repository, cvsElement.getElementPath(), cvsElement instanceof CvsFile));
}
return result.toArray(new CvsModule[result.size()]);
}
use of com.intellij.cvsSupport2.cvsBrowser.CvsElement in project intellij-community by JetBrains.
the class ChooseCheckoutMode method getSelectedFiles.
private Collection<File> getSelectedFiles() {
final Collection<File> allFiles = new HashSet<>();
final CvsElement[] selection = getWizard().getSelectedElements();
if (selection == null)
return allFiles;
for (CvsElement cvsElement : selection) {
allFiles.add(new File(cvsElement.getCheckoutPath()));
}
final ArrayList<File> result = new ArrayList<>();
for (File file : allFiles) {
if (!hasParentIn(allFiles, file))
result.add(file);
}
Collections.sort(result, (file, file1) -> file.getPath().compareTo(file1.getPath()));
return result;
}
use of com.intellij.cvsSupport2.cvsBrowser.CvsElement in project intellij-community by JetBrains.
the class ImportWizard method createImportDetails.
@Nullable
public ImportDetails createImportDetails() {
final CvsElement module = mySelectCvsElementStep.getSelectedCvsElement();
final String moduleName = mySettingsStep.getModuleName();
final String importModuleName = module.getElementPath().equals(".") ? moduleName : module.getElementPath() + "/" + moduleName;
final File selectedFile = mySelectImportLocationStep.getSelectedFile();
if (selectedFile == null) {
return null;
}
return new ImportDetails(selectedFile, mySettingsStep.getVendor(), mySettingsStep.getReleaseTag(), mySettingsStep.getLogMessage(), importModuleName, mySelectCVSConfigurationStep.getSelectedConfiguration(), mySettingsStep.getFileExtensions(), mySelectImportLocationStep.getIgnoreFileFilter());
}
Aggregations