Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuergen Haug2013-12-10 17:14:55 +0000
committerJuergen Haug2013-12-11 16:26:23 +0000
commit560d916180e0ea081ef1228270470f6d355177ab (patch)
tree47a6614f13043a89e94d50e551fa708660439c64 /plugins/org.eclipse.etrice.core.config
parent9e7bc7e8513767a6d5ba506cd0209b09e831a840 (diff)
downloadorg.eclipse.etrice-560d916180e0ea081ef1228270470f6d355177ab.tar.gz
org.eclipse.etrice-560d916180e0ea081ef1228270470f6d355177ab.tar.xz
org.eclipse.etrice-560d916180e0ea081ef1228270470f6d355177ab.zip
[config] added dynamic config for enum + validation + fixes
Diffstat (limited to 'plugins/org.eclipse.etrice.core.config')
-rw-r--r--plugins/org.eclipse.etrice.core.config/src/org/eclipse/etrice/core/validation/ConfigJavaValidator.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/org.eclipse.etrice.core.config/src/org/eclipse/etrice/core/validation/ConfigJavaValidator.java b/plugins/org.eclipse.etrice.core.config/src/org/eclipse/etrice/core/validation/ConfigJavaValidator.java
index 7220cc90a..4d1d7fe69 100644
--- a/plugins/org.eclipse.etrice.core.config/src/org/eclipse/etrice/core/validation/ConfigJavaValidator.java
+++ b/plugins/org.eclipse.etrice.core.config/src/org/eclipse/etrice/core/validation/ConfigJavaValidator.java
@@ -189,12 +189,17 @@ public class ConfigJavaValidator extends AbstractConfigJavaValidator {
return;
DataType type = attr.getType().getType();
-
+
if (type instanceof PrimitiveType) {
PrimitiveType primitive = (PrimitiveType) type;
checkAttrConfigMin(primitive, config);
checkAttrConfigMax(primitive, config);
+ } else {
+ if(config.getMin() != null)
+ error("min is only allowed for numeric types", ConfigPackage.Literals.ATTR_CLASS_CONFIG__MIN);
+ if(config.getMax() != null)
+ error("max is only allowed for numeric types", ConfigPackage.Literals.ATTR_CLASS_CONFIG__MAX);
}
}

Back to the top