1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-01 12:24:14 +01:00

Abbreviate Theme name to max 40 characters

This commit is contained in:
Martino Facchin 2018-04-17 14:53:38 +02:00 committed by Cristian Maglie
parent 794ef806f1
commit 260e0c284c

View File

@ -64,6 +64,7 @@ import org.apache.batik.transcoder.TranscoderInput;
import org.apache.batik.transcoder.TranscoderOutput; import org.apache.batik.transcoder.TranscoderOutput;
import org.apache.batik.transcoder.image.PNGTranscoder; import org.apache.batik.transcoder.image.PNGTranscoder;
import org.apache.commons.compress.utils.IOUtils; import org.apache.commons.compress.utils.IOUtils;
import org.apache.commons.lang3.StringUtils;
import processing.app.helpers.OSUtils; import processing.app.helpers.OSUtils;
import processing.app.helpers.PreferencesHelper; import processing.app.helpers.PreferencesHelper;
import processing.app.helpers.PreferencesMap; import processing.app.helpers.PreferencesMap;
@ -267,7 +268,8 @@ public class Theme {
} }
public String toString() { public String toString() {
return String.format("%s %s (%s)", this.getName(), this.getVersion(), this.file.getName()); String description = String.format("%s %s (%s)", this.getName(), this.getVersion(), this.file.getName());
return StringUtils.abbreviate(description, 40);
} }
/** /**