Closed iloveeclipse closed 9 years ago
Moritz, there is no need to log the error since it is expected that the test might fail. So could you please remove new logging you've added with b3bfc60 - it will pollute the error log exact in the same way as before, with a slightly different stack trace.
The point of this method is to check if the given resource (of any kind and in any state) matches the xpect content type. If the resource is in bad state, it is just supposed to return "BINARY".
We observe test failures with xtext involved. The root cause is that the ContentTypeUtil throws RuntimeExceptions which are propagated to the caller which should not throw any exception.
The code in IDE.overrideDefaultEditorAssociation() do notr expect any runtime exceptions - it is designed in the way that if there is no match for whatever reason, nothing "bad" should happen.
To fix this, the exceptions should be avoided and a "binary" type should be returned.