can be done more easily: org.eclipse.core.runtime.Assert.isLegal(condition)