Closed abelhegedus closed 11 years ago
It would be nice to also have a parser test case for this issue. Added the corresponding tag.
The following query definition should produce the error but it seems that the issue only occurs with eiqgen referenced metamodels and not installed ones.
import "http://www.eclipse.org/viatra2/patternlanguage/core/PatternLanguage"
pattern inconsistentDataType(PM, P) {
Pattern.name(P, Name);
PatternModel.packageName(PM, Name);
PatternModel.patterns(PM, P);
}
The problem occurs when for some obscure reason (e.g. using Ecore.ecore elements in anothe ecore) there are two instances of EString in the resourceSet. In this case it happened when some features used the nsUri to refer to their type and others used the platformURI to Ecore.
According to @ujhelyiz we don't want to handle such extremeties, although we could add a last check to see if the two data types are semi-equal and return a different error message (e.g. "duplicate EDataType definition for EString")
@abelhegedus could you please check whether the new validation message is better?
Yes, the updated message is more helpful.
The editor places an error in the Id variable in the following pattern definition: