mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-07 12:24:58 +10:00
cleanup
This commit is contained in:
@@ -56,7 +56,6 @@ public class ComponentType implements Serializable {
|
||||
private boolean enableCache;
|
||||
private List<String[]> datasheet;
|
||||
private int datasheetCreationStepCount;
|
||||
private boolean hiddenInPalette;
|
||||
|
||||
public ComponentType() {
|
||||
}
|
||||
@@ -66,16 +65,6 @@ public class ComponentType implements Serializable {
|
||||
boolean flexibleZOrder, BomPolicy bomPolicy, boolean autoEdit, IComponentTransformer transformer,
|
||||
KeywordPolicy keywordPolicy, String keywordTag, boolean enableCache, List<String[]> datasheet,
|
||||
int datasheetCreationStepCount) {
|
||||
this(name, description, creationMethod, category, namePrefix, author, icon, instanceClass, zOrder,
|
||||
flexibleZOrder, bomPolicy, autoEdit, transformer, keywordPolicy, keywordTag, enableCache, datasheet,
|
||||
datasheetCreationStepCount, false);
|
||||
}
|
||||
|
||||
public ComponentType(String name, String description, CreationMethod creationMethod, String category,
|
||||
String namePrefix, String author, Icon icon, Class<? extends IDIYComponent<?>> instanceClass, double zOrder,
|
||||
boolean flexibleZOrder, BomPolicy bomPolicy, boolean autoEdit, IComponentTransformer transformer,
|
||||
KeywordPolicy keywordPolicy, String keywordTag, boolean enableCache, List<String[]> datasheet,
|
||||
int datasheetCreationStepCount, boolean hiddenInPalette) {
|
||||
super();
|
||||
this.name = name;
|
||||
this.description = description;
|
||||
@@ -95,7 +84,6 @@ public class ComponentType implements Serializable {
|
||||
this.enableCache = enableCache;
|
||||
this.datasheet = datasheet;
|
||||
this.datasheetCreationStepCount = datasheetCreationStepCount;
|
||||
this.hiddenInPalette = hiddenInPalette;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
@@ -170,10 +158,6 @@ public class ComponentType implements Serializable {
|
||||
return datasheetCreationStepCount;
|
||||
}
|
||||
|
||||
public boolean isHiddenInPalette() {
|
||||
return hiddenInPalette;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return name;
|
||||
|
||||
@@ -114,7 +114,6 @@ public class ComponentProcessor {
|
||||
String keywordTag;
|
||||
List<String[]> datasheet = null;
|
||||
int datasheetCreationStepCount = 0;
|
||||
boolean hiddenInPalette;
|
||||
|
||||
if (clazz.isAnnotationPresent(ComponentDescriptor.class)) {
|
||||
ComponentDescriptor annotation = clazz.getAnnotation(ComponentDescriptor.class);
|
||||
@@ -132,7 +131,6 @@ public class ComponentProcessor {
|
||||
keywordPolicy = annotation.keywordPolicy();
|
||||
keywordTag = annotation.keywordTag();
|
||||
cacheDrawing = annotation.enableCache();
|
||||
hiddenInPalette = annotation.hiddenInPalette();
|
||||
if (annotation.enableDatasheet()) {
|
||||
datasheet = DatasheetService.getInstance().loadDatasheet(clazz);
|
||||
datasheetCreationStepCount = annotation.datasheetCreationStepCount();
|
||||
@@ -163,7 +161,7 @@ public class ComponentProcessor {
|
||||
ComponentType componentType =
|
||||
new ComponentType(name, description, creationMethod, category, namePrefix, author, icon, clazz, zOrder,
|
||||
flexibleZOrder, bomPolicy, autoEdit, transformer, keywordPolicy, keywordTag, cacheDrawing, datasheet,
|
||||
datasheetCreationStepCount, hiddenInPalette);
|
||||
datasheetCreationStepCount);
|
||||
componentTypeMap.put(clazz.getName(), componentType);
|
||||
return componentType;
|
||||
}
|
||||
@@ -278,7 +276,7 @@ public class ComponentProcessor {
|
||||
|
||||
// types created only programmatically (e.g. CompositeComponent) don't belong in the
|
||||
// palette, but still need to go through extractProperties() above so the cache is warm
|
||||
if (componentType.isHiddenInPalette())
|
||||
if (clazz.getAnnotation(ComponentDescriptor.class).hiddenInPalette())
|
||||
continue;
|
||||
|
||||
List<ComponentType> nestedList;
|
||||
|
||||
Reference in New Issue
Block a user