Skip to content

Commit

Permalink
further cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Cattlesquat committed Mar 29, 2023
1 parent 20fa3db commit 873d447
Showing 1 changed file with 8 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import VASSAL.script.expression.Expression;
import VASSAL.tools.FormattedString;
import VASSAL.tools.LaunchButton;
import org.apache.commons.lang3.ArrayUtils;

import java.awt.Component;
import java.util.ArrayList;
Expand Down Expand Up @@ -118,30 +117,23 @@ public String[] getAttributeDescriptions() {
Arrays.stream(super.getAttributeDescriptions()).forEach(b::add);
b.add(Resources.getString("Editor.report_format"))
.add(Resources.getString("Editor.ChangePropertyButton.options"));

return b.build().toArray(String[]::new);
}

@Override
public Class<?>[] getAttributeTypes() {
Class<?>[] types = { String.class };
for (final Class<?> c : super.getAttributeTypes()) {
types = ArrayUtils.add(types, c);
}
types = ArrayUtils.add(types, ReportFormatConfig.class);
types = ArrayUtils.add(types, PropChangerOptions.class);
return types;
final Stream.Builder<Object> b = Stream.builder().add(String.class);
Arrays.stream(super.getAttributeTypes()).forEach(b::add);
b.add(ReportFormatConfig.class).add(PropChangerOptions.class);
return b.build().toArray(Class<?>[]::new);
}

@Override
public String[] getAttributeNames() {
String[] names = { DESCRIPTION };
for (final String s : super.getAttributeNames()) {
names = ArrayUtils.add(names, s);
}
names = ArrayUtils.add(names, REPORT_FORMAT);
names = ArrayUtils.add(names, PROPERTY_CHANGER);
return names;
final Stream.Builder<Object> b = Stream.builder().add(DESCRIPTION);
Arrays.stream(super.getAttributeNames()).forEach(b::add);
b.add(REPORT_FORMAT).add(PROPERTY_CHANGER);
return b.build().toArray(String[]::new);
}

@Override
Expand Down

0 comments on commit 873d447

Please sign in to comment.