RunAnythingRunProfile () { RunProfile runProfile = getEnvironment().getRunProfile(); if (!(runProfile instanceof RunAnythingRunProfile)) { throw new IllegalStateException("Got " + runProfile + " instead of RunAnything profile"); } return (RunAnythingRunProfile)runProfile; }