mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
inspection view: RefPackage use fully-qualified name everywhere IDEA-152646
This commit is contained in:
+1
-22
@@ -32,26 +32,10 @@ import javax.swing.*;
|
||||
|
||||
|
||||
public class RefPackageImpl extends RefEntityImpl implements RefPackage {
|
||||
private final String myQualifiedName;
|
||||
|
||||
public RefPackageImpl(@NotNull String name, @NotNull RefManager refManager) {
|
||||
super(getPackageSuffix(name), refManager);
|
||||
myQualifiedName = name;
|
||||
super(name, refManager);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String getQualifiedName() {
|
||||
return myQualifiedName;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private static String getPackageSuffix(@NotNull String fullName) {
|
||||
int dotIndex = fullName.lastIndexOf('.');
|
||||
return (dotIndex >= 0) ? fullName.substring(dotIndex + 1) : fullName;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void accept(@NotNull final RefVisitor visitor) {
|
||||
if (visitor instanceof RefJavaVisitor) {
|
||||
@@ -61,11 +45,6 @@ public class RefPackageImpl extends RefEntityImpl implements RefPackage {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getExternalName() {
|
||||
return getQualifiedName();
|
||||
}
|
||||
|
||||
public static RefEntity packageFromFQName(final RefManager manager, final String name) {
|
||||
return manager.getExtension(RefJavaManager.MANAGER).getPackage(name);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user