This commit is contained in:
Bane Stojkovic
2026-09-03 18:59:27 +02:00
parent 9ee44125db
commit c8ead57679
2 changed files with 2 additions and 20 deletions
@@ -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;