catch some Error fixed #11

This commit is contained in:
林万程
2022-10-23 14:35:45 +08:00
parent 9adc3775b7
commit b42cf813ed
3 changed files with 10 additions and 2 deletions

View File

@@ -23,8 +23,12 @@ public class CopyReferenceSimple extends CopyReferenceAction {
private static final Pattern QUALIFIED_PATTERN = Pattern.compile("[\\w.]+\\.");
@Override
protected String getQualifiedName(Editor editor, List<PsiElement> elements) {
String qualifiedName = super.getQualifiedName(editor, elements);
if (qualifiedName == null) {
return null;
}
int i = qualifiedName.indexOf("(");
if (i > 0) {
return QUALIFIED_PATTERN.matcher(qualifiedName).replaceAll("").replace('#', '.');