Package org.tmatesoft.hg.internal

Examples of org.tmatesoft.hg.internal.ConfigFileParser.change()


        switch (op.kind) {
        case AddValue: {
          String separator = ", "; // XXX shall parse and find out separator kind in use
          String newValue = oldValue + separator + op.value;
          if (sect.containsKey(op.key)) {
            cfgWrite.change(op.section, op.key, newValue);
          } else {
            cfgWrite.add(op.section, op.key, newValue);
          }
          break;
        }
View Full Code Here


          } else {
            // found no separator, just remove the value
            // extra whitespaces (if space, not a comma is a separator) won't hurt
            newValue = oldValue.substring(0, start) + oldValue.substring(start + op.value.length());
          }
          cfgWrite.change(op.section, op.key, newValue);
          break;
        }
        case SetValue: {
          if (sect.containsKey(op.key)) {
            cfgWrite.change(op.section, op.key, op.value);
View Full Code Here

          cfgWrite.change(op.section, op.key, newValue);
          break;
        }
        case SetValue: {
          if (sect.containsKey(op.key)) {
            cfgWrite.change(op.section, op.key, op.value);
          } else {
            cfgWrite.add(op.section, op.key, op.value);
          }
          break;
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.