Closed OszkarSemerath closed 11 years ago
I suspect this is a derived feature issue.
PatternBody.variables
is a derived containment edge, registered as well-behaving. Still, somehow the containment traversal skips this branch, and therefore local variables will be unavailable in IQBase (is pre-initialization required here?). Their incoming VariableReference.variable
edge, however, is traversed correctly, and therefore the first pattern finds the match. The reason of discrepancy between the matchers is the following: the second pattern would re-assert the type as "Variable", but only the pattern parameters are visible to IQBase, local variables aren't, so this rejects the match of the first pattern.
I will try to look into the internal workings of these derived edges in the absence of @ujhelyiz - it seems that PatternBody.variables
is not even visible to eContents()
!
In fact, the reference in question is not supposed to be well-behaving. @abelhegedus has committed a fix that will stop the registry from misreporting this: 658a059bd05d4ba97fcb596e354ae6b05427d026.
Now the patterns have no matches. TODO:
update: now the problem is solved temporarily, so we can finally reproduce Oszkár's problem... I guess.
I could reproduce this phenomenon with the Query Explorer, but I believe it is not a bug.
PatternModel
as model rootclass
, so the extra filter in ClassConstrainInDirectBodyByEntities2 and ClassConstrainInDirectBodyByEntities4 will eliminate it.So far, everything works according to design. The question is whether we could make it a little bit more predictable for the user. Any suggestions on better handling of the boundary of the matcher scope?
Decisions:
@szabta89 Please, ensure decision 1.
Load ResourceSet is the default behaviour (00755bfa7b65e10e8939b0054b5f25ae1db2025a and f7a85d4d39fe4a9b73fd56da2bb38a97353247cc)
Moved to Eclipse: https://bugs.eclipse.org/bugs/show_bug.cgi?id=398907
In some cases the type definitions in the parameter list doesn't work correctly.
For example there is a pattern that finds the classifier constrains in another pattern. The source files are here: https://gist.github.com/3225406
The target pattern is:
Here is the pattern to find the constraints (the body isn't interesting):
This pattern correctly finds the one match.
I have made the following pattern where the declaration is the same as in ClassConstrainInDirectBodyByEntities, and calls the first:
This should give the same match as in the first case, but it doesn't have any.
So I deleted the EClassifier type of the parameter class, like this:
And the pattern works correctly.
I tried it with the EObject type and that doesn't work either.
Patterns with similar features worked for me before 26 of July.