mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EA-48802 - assert: JavaFileManagerBase.findClass
This commit is contained in:
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -111,7 +111,7 @@ public class ApplicationConfiguration extends ModuleBasedConfiguration<JavaRunCo
|
||||
if (MAIN_CLASS_NAME == null) {
|
||||
return null;
|
||||
}
|
||||
return JavaExecutionUtil.getPresentableClassName(MAIN_CLASS_NAME, getConfigurationModule());
|
||||
return JavaExecutionUtil.getPresentableClassName(MAIN_CLASS_NAME);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -140,13 +140,18 @@ public class JavaExecutionUtil {
|
||||
return ClassUtil.getJVMClassName(aClass);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static String getPresentableClassName(final String rtClassName) {
|
||||
return getPresentableClassName(rtClassName, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@link JavaExecutionUtil#getPresentableClassName(java.lang.String)}
|
||||
*/
|
||||
@Deprecated
|
||||
@Nullable
|
||||
public static String getPresentableClassName(final String rtClassName, final JavaRunConfigurationModule configurationModule) {
|
||||
if (StringUtil.isEmpty(rtClassName)) return null;
|
||||
final PsiClass psiClass = configurationModule.findClass(rtClassName);
|
||||
if (psiClass != null) {
|
||||
return psiClass.getName();
|
||||
}
|
||||
final int lastDot = rtClassName.lastIndexOf('.');
|
||||
if (lastDot == -1 || lastDot == rtClassName.length() - 1) {
|
||||
return rtClassName;
|
||||
|
||||
Reference in New Issue
Block a user