@Override public Map<String, File> getBinaryFiles(ExecutionEnvironment env) { Map<String, File> result = new HashMap<String, File>(); if (relativePath != null && localAbsPath != null) { result.put(relativePath, CndFileUtils.createLocalFile(localAbsPath)); // NOI18N } return result; }
public static String getValidProjectName(String projectFolder, String name) { int baseCount = 0; String projectName = null; while (true) { if (baseCount == 0) { projectName = name; } else { projectName = name + baseCount; } File projectNameFile = CndFileUtils.createLocalFile(projectFolder, projectName); if (!projectNameFile.exists()) { break; } baseCount++; } return projectName; }
private static ValidationResult isValidLocalProjectNameAndLocation(String projectNameTextField, String projectLocationTextField, String createdFolderTextField) { if (!isValidProjectName(projectNameTextField)) { return new ValidationResult(Boolean.FALSE, NbBundle.getMessage(PanelProjectLocationVisual.class, "MSG_IllegalProjectName")); // Display name not specified } if (!CndPathUtilities.isPathAbsolute(projectLocationTextField)) { // empty field imcluded String message = NbBundle.getMessage(PanelProjectLocationVisual.class, "MSG_IllegalProjectLocation"); // NOI18N return new ValidationResult(Boolean.FALSE, message); } File f = CndFileUtils.createLocalFile(projectLocationTextField).getAbsoluteFile(); if (getCanonicalFile(f) == null) { String message = NbBundle.getMessage(PanelProjectLocationVisual.class, "MSG_IllegalProjectLocation"); // NOI18N return new ValidationResult(Boolean.FALSE, message); } final File destFolder = getCanonicalFile(CndFileUtils.createLocalFile(createdFolderTextField).getAbsoluteFile()); // project folder always local if (destFolder == null) { String message = NbBundle.getMessage(PanelProjectLocationVisual.class, "MSG_IllegalProjectName"); // NOI18N return new ValidationResult(Boolean.FALSE, message); } return new ValidationResult(Boolean.TRUE, null); }
if (flavors.isEmpty() && CndFileUtils.createLocalFile(path).exists()) { CompilerFlavor flavor = CompilerFlavor.getUnknown(csm.getPlatform()); if (flavor != null) {
if (flavors.isEmpty() && CndFileUtils.createLocalFile(path).exists()) { CompilerFlavor flavor = CompilerFlavor.getUnknown(csm.getPlatform()); if (flavor != null) {
if (CndPathUtilities.isPathAbsolute(projectLocationTextField.getText())) { if (env.isLocal()) { File projectsDir = CndFileUtils.createLocalFile(projectLocationTextField.getText()); if (projectsDir.isDirectory()) { ProjectChooser.setProjectsFolder(projectsDir);
file = CndFileUtils.createLocalFile(executable + ".exe"); // NOI18N
ProjectGenerator.ProjectParameters prjParams = new ProjectGenerator.ProjectParameters(projectName, CndFileUtils.createLocalFile(projectParentFolder, projectName)); prjParams.setOpenFlag(open).setConfiguration(seed.conf); seed.project = ProjectGenerator.createBlankProject(prjParams);