Add ability to open class files even when they don't have a package

This commit is contained in:
Cody 2024-10-05 17:48:36 -06:00
parent 336d60ba06
commit 29d29e14ac

AI 샘플 코드 생성 중입니다

Loading...

View File

@ -211,7 +211,9 @@ public class GoToAction extends AbstractAction
if (packagePath.startsWith("java") || packagePath.startsWith("javax") || packagePath.startsWith("com.sun"))
return null;
String resourceName = packagePath + "/" + classMethodLocation.owner;
String resourceName = classMethodLocation.owner;
if (!packagePath.isEmpty())
resourceName = packagePath + "/" + classMethodLocation.owner;
if (resourceContainer.resourceClasses.containsKey(resourceName))
{
@ -229,7 +231,11 @@ public class GoToAction extends AbstractAction
if (packagePath.startsWith("java") || packagePath.startsWith("javax") || packagePath.startsWith("com.sun"))
return null;
String resourceName = packagePath + "/" + lexeme;
String resourceName = lexeme;
if (!packagePath.isEmpty())
{
resourceName = packagePath + "/" + lexeme;
}
if (resourceContainer.resourceClasses.containsKey(resourceName))
{