private List<FileObject> resolveRelativePathToFileObjects(String path) { ArrayList<FileObject> res = new ArrayList<FileObject>(); if (path == null) return res; String paths[] = PropertyUtils.tokenizePath(path); for (String pth : paths ) { FileObject fo = resolveRelativePathToFileObject(pth.trim()); if (fo != null) res.add(fo); } return res; }
/** * Get the global PHP include path as array of strings. * @return the global PHP include path as array or an empty array of strings if no folders are defined. * @see #getPhpGlobalIncludePath() * @since 2.7 */ public String[] getPhpGlobalIncludePathAsArray() { return PropertyUtils.tokenizePath(getPhpGlobalIncludePath()); }
private List<FileObject> resolveRelativePathToFileObjects(final String path) { final ArrayList<FileObject> res = new ArrayList<FileObject>(); if (path == null) return new ArrayList<FileObject>(); final String paths[] = PropertyUtils.tokenizePath(path); for (int a = 0; a < paths.length; a ++) { final FileObject fo = resolveRelativePathToFileObject(paths[a].trim()); if (fo != null) res.add(fo); } return res; }
public String sortClasspath(final String classpath) { final HashSet<String> path = new HashSet<String>(Arrays.asList(PropertyUtils.tokenizePath(classpath))); final StringBuffer newPath = new StringBuffer(); for (int i=0; i<pathOrder.length; i++) { if (path.remove(pathOrder[i])) { if (newPath.length() > 0) newPath.append(':'); newPath.append(pathOrder[i]); } } for (String str : path) { if (newPath.length() > 0) newPath.append(':'); newPath.append(str); } return newPath.toString(); }
public List<Item> itemsList(String propertyValue) { return itemsList(PropertyUtils.tokenizePath(propertyValue == null ? "" : propertyValue)); // NOI18N }
public String[] getPhpGlobalIncludePathAsArray() { return PropertyUtils.tokenizePath(getPhpGlobalIncludePath()); }
protected static String filterProbe (String v, final String probePath) { if (v != null) { final String[] pes = PropertyUtils.tokenizePath(v); final StringBuilder sb = new StringBuilder (); for (String pe : pes) { if (probePath != null ? probePath.equals(pe) : (pe != null && pe.endsWith("org-netbeans-modules-scala-stdplatform-probe.jar"))) { //NOI18N //Skeep } else { if (sb.length() > 0) { sb.append(File.pathSeparatorChar); } sb.append(pe); } } v = sb.toString(); } return v; }
for (String token : PropertyUtils.tokenizePath(debugClassPath)) {
private PhpModuleProperties setIncludePath(PhpModuleProperties properties) { String includePath = ProjectPropertiesSupport.getPropertyEvaluator(phpProject).getProperty(PhpProjectProperties.INCLUDE_PATH); List<String> paths; if (includePath == null) { paths = Collections.emptyList(); } else { paths = Arrays.asList(PropertyUtils.tokenizePath(includePath)); } properties = properties.setIncludePath(paths); return properties; }
public static String[] getJ2eeClasspathEntries(Project project) { WebPropertyEvaluator webPropertyEvaluator = (WebPropertyEvaluator)project.getLookup().lookup(WebPropertyEvaluator.class); if(webPropertyEvaluator != null) { String property = webPropertyEvaluator.evaluator().getProperty("j2ee.platform.classpath"); //NOI18N if (property != null) { return PropertyUtils.tokenizePath(property); } } return new String[0]; } }
private List<FileObject> getDirs(String propname) { List<FileObject> dirs = dirCache.get(propname); if (!checkDirs(dirs)) { // #217861 - it is ok if directories are counted more times... String prop = evaluator.getProperty(propname); if (prop == null) { return Collections.<FileObject>emptyList(); } String[] paths = PropertyUtils.tokenizePath(prop); dirs = new ArrayList<>(paths.length); for (String path : paths) { FileObject resolvedFile = helper.resolveFileObject(path); if (resolvedFile != null) { dirs.add(resolvedFile); } } dirCache.put(propname, dirs); } return dirs; }
private List<PathResourceImplementation> getPath() { List<PathResourceImplementation> result = new ArrayList<>(); for (String p : propertyNames) { String prop = evaluator.getProperty(p); if (prop != null) { for (String piece : PropertyUtils.tokenizePath(prop)) { File f = PropertyUtils.resolveFile(projectFolder, piece); URL entry = FileUtil.urlForArchiveOrDir(f); if (entry != null) { result.add(ClassPathSupport.createResource(entry)); } else { Logger.getLogger(ProjectClassPathImplementation.class.getName()).log(Level.WARNING, "{0} does not look like a valid archive file", f); } } } } return Collections.unmodifiableList(result); } }
private void remove(@NonNull final AntProjectHelper helper) { final EditableProperties props = helper.getProperties (AntProjectHelper.PROJECT_PROPERTIES_PATH); String rawPath = props.getProperty (classPathId); if (rawPath != null) { final String[] pathElements = PropertyUtils.tokenizePath(rawPath); final List<String> result = new ArrayList<String>(pathElements.length); boolean changed = false; for (String pathElement : pathElements) { if (rawId.equals(pathElement)) { changed = true; continue; } result.add(pathElement + PATH_SEPARATOR_CHAR); } if (!result.isEmpty()) { final String last = result.get(result.size()-1); result.set(result.size()-1, last.substring(0, last.length()-1)); } if (changed) { props.setProperty(classPathId, result.toArray(new String[result.size()])); helper.putProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH, props); } } }
/** * Removes the path entry from path. * @param path to remove the netry from * @param toRemove the entry to be rmeoved from the path * @return new path with removed entry */ @NonNull public static String removeFromPath(@NonNull final String path, @NonNull final String toRemove) { Parameters.notNull("path", path); //NOI18N Parameters.notNull("toRemove", toRemove); //NOI18N final StringBuilder sb = new StringBuilder(); for (String entry : PropertyUtils.tokenizePath(path)) { if (toRemove.equals(entry)) { continue; } sb.append(entry); sb.append(':'); //NOI18N } return sb.length() == 0 ? sb.toString() : sb.substring(0, sb.length()-1); }
for (int i=0; i<paths.length; i++) { paths[i] = new HashSet<String>(); String s[] = PropertyUtils.tokenizePath(profiles[i].getClassPath()); for (int j=0; j<s.length; j++) { paths[i].add(s[j]);
/** * Returns existing value of a path property, null if it does not exist * @param ep EditableProperties * @return collection of artifacts or null */ @CheckForNull public static Set<String> getExistingProperty(@NonNull final EditableProperties ep, @NonNull String propName) { // existing String currentPropVal = ep.getProperty(propName); if(currentPropVal != null) { return Collections.unmodifiableSet(getPaths(PropertyUtils.tokenizePath(currentPropVal))); } return null; }
String wscClientClasspath = projectProperties.getProperty(WSCOMPILE_CLASSPATH); if(wscClientClasspath != null) { String [] libs = PropertyUtils.tokenizePath(wscClientClasspath); for(int i = 0; i < libs.length; i++) { wscJars.add(libs[i]);
String wscClientClasspath = projectProperties.getProperty(WSCOMPILE_CLASSPATH); if(wscClientClasspath != null) { String [] libs = PropertyUtils.tokenizePath(wscClientClasspath); for(int i = 0; i < libs.length; i++) { wscJars.add(libs[i]);
String wscClientClasspath = projectProperties.getProperty(WSCOMPILE_CLASSPATH); if(wscClientClasspath != null) { String[] libs = PropertyUtils.tokenizePath(wscClientClasspath); for(int i = 0; i < libs.length; i++) { wscJars.add(libs[i]);
String[] cpElements = PropertyUtils.tokenizePath(endorsedCp); List<String> updatedEndorsedCpList = new ArrayList<String>(); for (String element : cpElements) {