Closed istvanrath closed 11 years ago
I think this is not an issue if #362 is fixed. Of course, if the query explorer displays an error on the element, but it is still an ObservablePatternMatcher object, then it's a problem. I'm not sure that having a "Matcher" object which is not actually connected to an engine is a good idea, but I'll put in the extra check to be sure.
A better solution would be (but that needs at least an rewrite of Query Explorer as it does not maintain this information...) to disable the contribution if the pattern is erroneous.
Cherry pick it into maintenance and then we can close it.
Sorry, I was wrong, the fix doesn't work at all. It can still be reproduced giving the following stack trace:
java.lang.NullPointerException
at org.eclipse.viatra2.emf.incquery.testing.ui.handlers.SaveSnapshotHandler.saveSnapshot(SaveSnapshotHandler.java:82)
at org.eclipse.viatra2.emf.incquery.testing.ui.handlers.SaveSnapshotHandler.execute(SaveSnapshotHandler.java:65)
Note the NPE is at a different line now.
Please try again, I'll cherry pick it if the fix works correctly.
Ok, works correctly, cherry pick and close.
Done, closing.
When activated on an erroneous pattern, the following NPE is thrown: