private static Set<String> getVariableNames() { Set<String> names = new HashSet<String>(); for (String v : PropertyUtils.getGlobalProperties().keySet()) { if (!v.startsWith("var.")) { // NOI18N continue; } names.add(v.substring(4)); } return names; }
public void run () { try { recoverDefaultPlatform (); EditableProperties ep = PropertyUtils.getGlobalProperties(); boolean save = updateSourceLevel(ep); save |= updateBuildProperties (ep); if (save) { PropertyUtils.putGlobalProperties (ep); } } catch (IOException ioe) { Exceptions.printStackTrace(ioe); } } });
/** * Load global properties defined by the IDE in the user directory. * Currently loads ${netbeans.user}/build.properties if it exists. * <p> * Acquires read access. * <p> * @return user properties (empty if missing or malformed) */ @NonNull public static EditableProperties getGlobalProperties() { return PropertyUtils.getGlobalProperties(); } }
private List<Variable> readVariables() { List<Variable> vs = new ArrayList<Variable>(); EditableProperties ep = PropertyUtils.getGlobalProperties(); for (Map.Entry<String, String> entry : ep.entrySet()) { if (entry.getKey().startsWith(VARIABLE_PREFIX)) { vs.add(new Variable(entry.getKey().substring(VARIABLE_PREFIX.length()), FileUtil.normalizeFile(new File(entry.getValue())))); } } return vs; }
public void setPhpGlobalIncludePath(String phpGlobalIncludePath) { getPreferences().put(PHP_GLOBAL_INCLUDE_PATH, phpGlobalIncludePath); // update global ant properties as well (global include path can be used in project's include path) EditableProperties globalProperties = PropertyUtils.getGlobalProperties(); globalProperties.setProperty(PhpProjectProperties.GLOBAL_INCLUDE_PATH, phpGlobalIncludePath); try { PropertyUtils.putGlobalProperties(globalProperties); } catch (IOException ex) { Exceptions.printStackTrace(ex); } }
/** * Ensure that the php.global.include.path is written in build.properties so Ant can see it. */ public void ensurePhpGlobalIncludePath() { if (phpGlobalIncludePathEnsured) { return; } phpGlobalIncludePathEnsured = true; String phpGlobalIncludePath = getPhpGlobalIncludePath(); if (!phpGlobalIncludePath.equals(PropertyUtils.getGlobalProperties().getProperty(PhpProjectProperties.GLOBAL_INCLUDE_PATH))) { setPhpGlobalIncludePath(phpGlobalIncludePath); } }
public void run () { try { EditableProperties props = PropertyUtils.getGlobalProperties(); boolean save = addLibraryIntoBuild(libraryImpl, props); if (save) { PropertyUtils.putGlobalProperties(props); } } catch (IOException ioe) { ErrorManager.getDefault().notify(ioe); } } }
public void run () { try { EditableProperties props = PropertyUtils.getGlobalProperties(); boolean save = addLibraryIntoBuild(libraryImpl,props); if (save) { PropertyUtils.putGlobalProperties (props); } } catch (IOException ioe) { ErrorManager.getDefault().notify (ioe); } } }
public void run () { try { EditableProperties props = PropertyUtils.getGlobalProperties(); boolean save = addLibraryIntoBuild(libraryImpl,props); if (save) { PropertyUtils.putGlobalProperties (props); } } catch (IOException ioe) { ErrorManager.getDefault().notify (ioe); } } }
public void run () { try { EditableProperties props = PropertyUtils.getGlobalProperties(); boolean save = addLibraryIntoBuild(libraryImpl,props); if (save) { PropertyUtils.putGlobalProperties (props); } } catch (IOException ioe) { ErrorManager.getDefault().notify (ioe); } } }
EditableProperties globalProperties = PropertyUtils.getGlobalProperties(); if(globalProperties.getProperty(WSCOMPILE_TOOLS_CLASSPATH) == null) { globalProperties.setProperty(WSCOMPILE_TOOLS_CLASSPATH, "${java.home}\\..\\lib\\tools.jar"); // NOI18N
final EditableProperties projectProps = antProjectHelper.getProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH); final EditableProperties privateProps = antProjectHelper.getProperties(AntProjectHelper.PRIVATE_PROPERTIES_PATH); final EditableProperties globalProps = PropertyUtils.getGlobalProperties(); final Collection<SourceLevelQuery.Result> newSlResults = new ArrayDeque<SourceLevelQuery.Result>(); for (String cpId : classPathProperties) {
EditableProperties globalProperties = PropertyUtils.getGlobalProperties(); if(globalProperties.getProperty(WSCOMPILE_TOOLS_CLASSPATH) == null) { globalProperties.setProperty(WSCOMPILE_TOOLS_CLASSPATH, "${java.home}\\..\\lib\\tools.jar"); // NOI18N
EditableProperties globalProperties = PropertyUtils.getGlobalProperties(); if(globalProperties.getProperty(WSCOMPILE_TOOLS_CLASSPATH) == null) { globalProperties.setProperty(WSCOMPILE_TOOLS_CLASSPATH, "${java.home}\\..\\lib\\tools.jar"); // NOI18N
public void run() { try { EditableProperties props = PropertyUtils.getGlobalProperties(); for (int i=0; i < VOLUME_TYPES.length; i++) { String property = LIB_PREFIX + libraryImpl.getName() + '.' + VOLUME_TYPES[i]; //NOI18N props.remove(property); } PropertyUtils.putGlobalProperties(props); } catch (IOException ioe) { ErrorManager.getDefault().notify (ioe); } } });
EditableProperties globalProperties = PropertyUtils.getGlobalProperties(); if(globalProperties.getProperty(WSCOMPILE_TOOLS_CLASSPATH) == null) { globalProperties.setProperty(WSCOMPILE_TOOLS_CLASSPATH, "${java.home}\\..\\lib\\tools.jar");
public void run() { try { EditableProperties props = PropertyUtils.getGlobalProperties(); for (int i=0; i < VOLUME_TYPES.length; i++) { String property = LIB_PREFIX + libraryImpl.getName() + '.' + VOLUME_TYPES[i]; //NOI18N props.remove(property); } PropertyUtils.putGlobalProperties(props); } catch (IOException ioe) { ErrorManager.getDefault().notify (ioe); } } });
public void run() { try { EditableProperties props = PropertyUtils.getGlobalProperties(); for (int i=0; i < VOLUME_TYPES.length; i++) { String property = LIB_PREFIX + libraryImpl.getName() + '.' + VOLUME_TYPES[i]; //NOI18N props.remove(property); } PropertyUtils.putGlobalProperties(props); } catch (IOException ioe) { ErrorManager.getDefault().notify (ioe); } } });
public void run() { EditableProperties ep = PropertyUtils.getGlobalProperties(); boolean change = false; List<Variable> old = readVariables(); for (Variable var : vars) { Variable oldVar = find(var.getName(), old); if (oldVar == null || !oldVar.getValue().equals(var.getValue())) { ep.put(VARIABLE_PREFIX+var.getName(), var.getValue().getAbsolutePath()); change = true; } if (oldVar != null) { old.remove(oldVar); } } for (Variable v : old) { ep.remove(VARIABLE_PREFIX+v.getName()); change = true; } if (change) { try { PropertyUtils.putGlobalProperties(ep); } catch (IOException ex) { Exceptions.printStackTrace(ex); } } } });
public void run() { try { EditableProperties props = PropertyUtils.getGlobalProperties(); for (int i = 0; i < VOLUME_TYPES.length; i++) { String property = LIB_PREFIX + libraryImpl.getName() + '.' + VOLUME_TYPES[i]; //NOI18N props.remove(property); } PropertyUtils.putGlobalProperties(props); } catch (IOException ioe) { ErrorManager.getDefault().notify(ioe); } } });