{
String className = jsClass.getName() + "Mediator.as";
PsiDirectory directory = jsFile.getContainingDirectory();
//This works, but throws "Assertion failed: Write access is allowed inside write-action only (see com.intellij.openapi.application.Application.runWriteAction()) "?
PsiFile file = directory.createFile(className);
//TODO: How do a I create a psi from scratch? Or should I just use a template?
}
else
{
//Can I hide the action from the menu instead of showing the message?