WangJi92 / arthas-idea-plugin

arthas idea plugin 更简单的使用arthas的IDEA 插件,方便的构建各种arthas 命令,复制到剪切板 然后到服务器上启动arthas 执行命令。
https://plugins.jetbrains.com/plugin/13581-arthas-idea
Apache License 2.0
605 stars 98 forks source link

ProjectTaskNotification deprecated #120

Closed WangJi92 closed 7 months ago

WangJi92 commented 7 months ago

Deprecated interface ProjectTaskNotification is referenced in ClassCompileCompatibleUtils.lambda$compile$0(...). This interface will be removed in a future release Deprecated interface ProjectTaskNotification is referenced in ClassCompileCompatibleUtils$1. This interface will be removed in a future release

WangJi92 commented 7 months ago

Deprecated class ProjectTaskResult is referenced in ClassCompileCompatibleUtils$1.finished(...). This class will be removed in a future release

WangJi92 commented 7 months ago

Deprecated field PsiType.BOOLEAN is accessed in OgnlPsUtils.getDefaultString(PsiType, Project). This field will be removed in a future release

WangJi92 commented 7 months ago

Deprecated class ServiceManager is referenced in AppSettingsState.getInstance(Project)

WangJi92 commented 7 months ago

IDE restart may be unnecessary to enable or disable arthas idea 2.44 because the plugin satisfies the requirements for dynamic plugins. Yet the unloading may be restricted if the plugin's class loader cannot be unloaded dynamically or if the plugin has complex dependencies. Please check manually that the IDE allows to install and uninstall arthas idea 2.44 without restart. Feel free to issue a corresponding ticket in YouTrack.

WangJi92 commented 7 months ago

Deprecated field PsiType.BOOLEAN is accessed in OgnlPsUtils.getDefaultString(PsiType, Project). This field will be removed in a future release

PsiType.BOOLEAN boolean PsiType.LONG long PsiType.DOUBLE double PsiType.FLOAT float PsiType.INT boolean PsiType.BYTE byte PsiType.SHORT short

if ("boolean".equals(canonicalText)) {
    result = "true";
    return result;
}
WangJi92 commented 7 months ago

ServiceManager

是的,IntelliJ IDEA已经把com.intellij.openapi.components.ServiceManager#getService(com.intellij.openapi.project.Project, java.lang.Class)标记为已弃用,取而代之的方法是在你的Project对象上调用getService(Class)方法。

以下是如何替换你的代码:

原来的方法(已弃用):

MyService myService = ServiceManager.getService(MyService.class); 新的方法:

MyService myService = project.getService(MyService.class); 这样就可以替换过时的ServiceManager#getService方法,让你的代码更符合更新版本的IntelliJ IDEA。