You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.4 KiB
41 lines
1.4 KiB
package com.fr.design.os.impl; |
|
|
|
import com.fr.config.ServerPreferenceConfig; |
|
import com.fr.design.DesignerEnvManager; |
|
import com.fr.design.extra.WebViewDlgHelper; |
|
import com.fr.design.jdk.JdkVersion; |
|
import com.fr.design.upm.UpmFinder; |
|
import com.fr.design.utils.DesignUtils; |
|
import com.fr.stable.StableUtils; |
|
import com.fr.stable.os.Arch; |
|
import com.fr.stable.os.OperatingSystem; |
|
import com.fr.stable.os.support.OSBasedAction; |
|
|
|
/** |
|
* 插件管理窗口 |
|
* @author pengda |
|
* @date 2019/10/9 |
|
*/ |
|
public class PMDialogAction implements OSBasedAction { |
|
private static String PLUGIN_MANAGER_ROUTE = "#management/plugin"; |
|
@Override |
|
public void execute(Object... objects) { |
|
if(Arch.getArch() == Arch.ARM || OperatingSystem.isLinux() || SupportOSImpl.MACOS_WEB_PLUGIN_MANAGEMENT.support()){ |
|
DesignUtils.visitEnvServerByParameters( PLUGIN_MANAGER_ROUTE,null,null); |
|
return; |
|
} |
|
if (checkUPMSupport()) { |
|
UpmFinder.showUPMDialog(); |
|
} else { |
|
WebViewDlgHelper.createPluginDialog(); |
|
} |
|
} |
|
|
|
private boolean checkUPMSupport() { |
|
return ServerPreferenceConfig.getInstance().isUseOptimizedUPM() |
|
|| SupportOSImpl.MACOS_NEW_PLUGIN_MANAGEMENT.support() |
|
|| DesignerEnvManager.getEnvManager().isUseOptimizedUPM4Adapter() |
|
//默认开启 |
|
|| DesignerEnvManager.getEnvManager().isUseNewPluginFirst(); |
|
} |
|
}
|
|
|