* @return what it is
*/
String description() default "";
+
+ /**
+ * This item should be hidden from the user (she will still be able to
+ * modify it if she opens the file manually).
+ * <p>
+ * Defaults to FALSE (visible).
+ *
+ * @return TRUE if it should stay hidden
+ */
+ boolean hidden() default false;
/**
* This item is only used as a group, not as an option.
private List<Runnable> saveListeners = new ArrayList<Runnable>();
private String name;
+ private boolean hidden;
private String description;
private boolean dirty;
}
this.name = name;
+ this.hidden = meta.hidden();
this.description = description;
reload();
public String getName() {
return name;
}
+
+ /**
+ * This item should be hidden from the user (she will still be able to
+ * modify it if she opens the file manually).
+ *
+ * @return TRUE if it should stay hidden
+ */
+ public boolean isHidden() {
+ return hidden;
+ }
/**
* A description for this item: what it is or does, how to explain that item
List<MetaInfo<E>> shadow = new ArrayList<MetaInfo<E>>();
for (E id : type.getEnumConstants()) {
MetaInfo<E> info = new MetaInfo<E>(type, bundle, id);
- list.add(info);
- shadow.add(info);
+ if (!info.hidden) {
+ list.add(info);
+ shadow.add(info);
+ }
}
for (int i = 0; i < list.size(); i++) {