Package net.sourceforge.processdash.util

Examples of net.sourceforge.processdash.util.FileProperties


    try {
      propertyComments.load
        (Settings.class.getResourceAsStream("pspdash.ad-comments"));
    } catch (Exception e0) {}

    settings = fsettings = new FileProperties(defaults, propertyComments);
    fsettings.setDateStamping(false);
    dirty = disableChanges = false;

    // Finally, open the user's settings file and load those properties.  The
    // user settings file is typically called "pspdash.ini" and is located in
View Full Code Here


      long timestamp = srcFile.lastModified();
      if (timestamp == 0 || timestamp == settingsFileTimestamp)
          return;

      Properties nullProps = new Properties();
      FileProperties newProps = new FileProperties(nullProps, nullProps);
      try {
          FileInputStream in = new FileInputStream(srcFile);
          newProps.load(in);
          in.close();
      } catch (Exception e) {
          return;
      }

      Set<String> keysToDelete = new HashSet(fsettings.keySet());
      for (Map.Entry e : newProps.entrySet()) {
          // look at each key in the settings file
          String key = (String) e.getKey();
          keysToDelete.remove(key);

          // do not override values that have been set from a system propery.
View Full Code Here

  private static void tryToMerge(String url) {
      if ("none".equalsIgnoreCase(url))
          return;

      Properties nullProps = new Properties();
      FileProperties propsIn = new FileProperties(nullProps, nullProps);
      try {
          propsIn.load(new URL(url).openStream());
      } catch (Exception e) {}
      if (propsIn.isEmpty())
          return;

      for (Iterator i = propsIn.entrySet().iterator(); i.hasNext();) {
          Map.Entry e = (Map.Entry) i.next();
          String propKey = ((String) e.getKey()).trim();
          if (!propKey.startsWith(MERGE_PROP_PREFIX))
              continue;
View Full Code Here

TOP

Related Classes of net.sourceforge.processdash.util.FileProperties

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.