boolean () { if (myModules != null){ for (Module module : myModules) { if (module.isDisposed()) return false; } return true; } if (myModule != null) return !myModule.isDisposed(); if (myElement != null) { return myElement.isValid(); } return myType == VIRTUAL_FILES || myType == CUSTOM || myType == PROJECT; }