mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

matthew_swift
22.31.2007 b4609c121a530c9d22b2cebe0a92cd6eaf765e16
opends/src/server/org/opends/server/tools/dsconfig/PropertyValueEditor.java
@@ -631,10 +631,8 @@
    @Override
    public <T> MenuResult<Void> visitUnknown(PropertyDefinition<T> d,
        Void p) throws UnknownPropertyDefinitionException {
      PropertyDefinitionUsageBuilder b = new PropertyDefinitionUsageBuilder(
          true);
      app.println();
      app.println(INFO_EDITOR_HEADING_SYNTAX.get(b.getUsage(d)), 4);
      displayPropertySyntax(app, d);
      // Set the new property value(s).
      try {
@@ -1009,10 +1007,8 @@
    @Override
    public <T> MenuResult<Boolean> visitUnknown(final PropertyDefinition<T> d,
        Void p) {
      PropertyDefinitionUsageBuilder b = new PropertyDefinitionUsageBuilder(
          true);
      app.println();
      app.println(INFO_EDITOR_HEADING_SYNTAX.get(b.getUsage(d)), 4);
      displayPropertySyntax(app, d);
      final SortedSet<T> defaultValues = mo.getPropertyDefaultValues(d);
      final SortedSet<T> oldValues = mo.getPropertyValues(d);
@@ -1781,10 +1777,8 @@
    @Override
    public <T> MenuResult<Boolean> visitUnknown(final PropertyDefinition<T> d,
        Void p) {
      PropertyDefinitionUsageBuilder b = new PropertyDefinitionUsageBuilder(
          true);
      app.println();
      app.println(INFO_EDITOR_HEADING_SYNTAX.get(b.getUsage(d)), 4);
      displayPropertySyntax(app, d);
      // Construct a menu of actions.
      MenuBuilder<T> builder = new MenuBuilder<T>(app);
@@ -1961,6 +1955,25 @@
  // Display a property's syntax.
  private static <T> void displayPropertySyntax(ConsoleApplication app,
      PropertyDefinition<T> d) throws IllegalArgumentException {
    PropertyDefinitionUsageBuilder b = new PropertyDefinitionUsageBuilder(true);
    TableBuilder builder = new TableBuilder();
    builder.startRow();
    builder.appendCell(INFO_EDITOR_HEADING_SYNTAX.get());
    builder.appendCell(b.getUsage(d));
    TextTablePrinter printer = new TextTablePrinter(app.getErrorStream());
    printer.setDisplayHeadings(false);
    printer.setIndentWidth(4);
    printer.setColumnWidth(1, 0);
    builder.print(printer);
  }
  // Display a table of property values.
  private static <T> void displayPropertyValues(ConsoleApplication app,
      PropertyDefinition<T> pd, Collection<T> values)