String (@NotNull GroovyFile groovyFile) { if (groovyFile.isScript()) { for (ScriptPositionManagerHelper helper : ScriptPositionManagerHelper.EP_NAME.getExtensions()) { if (helper.isAppropriateScriptFile(groovyFile)) { String runtimeScriptName = helper.getRuntimeScriptName(groovyFile); if (runtimeScriptName != null) return runtimeScriptName; } } } VirtualFile vFile = groovyFile.getVirtualFile(); assert vFile != null; return vFile.getNameWithoutExtension(); }