Browse Source

Merge pull request #10845 in DESIGN/design from bugfix/11.0 to feature/x

* commit '0f6254d38712cf40605cbc630d3f2bae15907b5f':
  REPORT-84965 插件-插件管理-插件id里有下划线,安装之后无法删除 【问题原因】后端解析'_'时,仅考虑有一个'_' 【改动思路】使用最后出现的'_'分隔id和version 【review建议】无
  REPORT-85960 起始页,点击最近打开的fvs模板,模板打开失败--更改一下工具类
  REPORT-86023 起始页先进入本地目录,再进入次管远程目录,会有服务器选项 默认是不会刷新工具栏的。这里刷新一下。 (吐槽一下:权限管理有点太散了
  REPORT-85960 起始页,点击最近打开的fvs模板,模板打开失败
  REPORT-85960 起始页,点击最近打开的fvs模板,模板打开失败 模板助手打开模板时会获取 path, 如果当前是使用空页面打开,则会 npe, 在主JAR兼容一下
feature/x
superman 2 years ago
parent
commit
0342532b32
  1. 3
      designer-base/src/main/java/com/fr/design/carton/EventDispatchThreadHangMonitor.java
  2. 11
      designer-base/src/main/java/com/fr/design/extra/PluginUtils.java
  3. 10
      designer-base/src/main/java/com/fr/design/mainframe/JNullTemplate.java

3
designer-base/src/main/java/com/fr/design/carton/EventDispatchThreadHangMonitor.java

@ -1,6 +1,7 @@
package com.fr.design.carton; package com.fr.design.carton;
import com.fr.concurrent.FineExecutors; import com.fr.concurrent.FineExecutors;
import com.fr.design.ui.util.UIUtil;
import com.fr.json.JSONObject; import com.fr.json.JSONObject;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
@ -314,7 +315,7 @@ public final class EventDispatchThreadHangMonitor extends EventQueue {
* 将swing中默认的EventQueue换成自己的 * 将swing中默认的EventQueue换成自己的
*/ */
public static void initMonitoring() { public static void initMonitoring() {
Toolkit.getDefaultToolkit().getSystemEventQueue().push(INSTANCE); UIUtil.invokeLaterIfNeeded(() -> Toolkit.getDefaultToolkit().getSystemEventQueue().push(INSTANCE));
} }
/** /**

11
designer-base/src/main/java/com/fr/design/extra/PluginUtils.java

@ -10,8 +10,8 @@ import com.fr.json.JSONObject;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.plugin.PluginVerifyException; import com.fr.plugin.PluginVerifyException;
import com.fr.plugin.basic.version.Version; import com.fr.plugin.basic.version.Version;
import com.fr.plugin.basic.version.VersionIntervalType;
import com.fr.plugin.basic.version.VersionIntervalFactory; import com.fr.plugin.basic.version.VersionIntervalFactory;
import com.fr.plugin.basic.version.VersionIntervalType;
import com.fr.plugin.context.PluginContext; import com.fr.plugin.context.PluginContext;
import com.fr.plugin.context.PluginMarker; import com.fr.plugin.context.PluginMarker;
import com.fr.plugin.error.PluginBaseErrorCode; import com.fr.plugin.error.PluginBaseErrorCode;
@ -23,7 +23,7 @@ import com.fr.stable.ProductConstants;
import com.fr.stable.StableUtils; import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.JOptionPane;
import java.io.File; import java.io.File;
import java.io.FileOutputStream; import java.io.FileOutputStream;
import java.io.IOException; import java.io.IOException;
@ -47,9 +47,10 @@ public class PluginUtils {
public static PluginMarker createPluginMarker(String pluginInfo) { public static PluginMarker createPluginMarker(String pluginInfo) {
//todo 判空 int splitIndex = pluginInfo.lastIndexOf("_");
String[] plugin = pluginInfo.split("_"); String pluginID = pluginInfo.substring(0, splitIndex);
return PluginMarker.create(plugin[0], plugin[1]); String version = pluginInfo.substring(splitIndex + 1);
return PluginMarker.create(pluginID, version);
} }
public static JSONObject getLatestPluginInfo(String pluginID) throws Exception { public static JSONObject getLatestPluginInfo(String pluginID) throws Exception {

10
designer-base/src/main/java/com/fr/design/mainframe/JNullTemplate.java

@ -204,4 +204,14 @@ public class JNullTemplate extends JTemplate {
public int getToolBarHeight() { public int getToolBarHeight() {
return 0; return 0;
} }
@Override
public String getPath() {
return null;
}
@Override
public void refreshToolArea() {
DesignerContext.getDesignerFrame().resetToolkitByPlus(this);
}
} }

Loading…
Cancel
Save