Browse Source

Pull request #9163: REPORT-73262 & REPORT-73403 & REPORT-73335

Merge in DESIGN/design from ~HARRISON/design:feature/x to feature/x

* commit 'c54effde51d1a2aef3f55939493fc16d59679b70':
  REPORT-73335【设计器环境监测】手动检测完成后,交互文字提示丢失 修一下 UI 界面图
  REPORT-73335【设计器环境监测】手动检测完成后,交互文字提示丢失 修一下交互上的名称
  REPORT-73403【设计器环境监测】jar异常弹窗,%FR_HOME%\lib和\WEB-INF\lib下的jar需要区分显示 Jar 异常部分处理一下。
  REPORT-73262【设计器环境监测】右下角弹窗文字显示不全 rt, 使用 scrollPanel 的时候需要计算宽度
feature/x
Harrison 2 years ago
parent
commit
156639f7d0
  1. 5
      designer-base/src/main/java/com/fr/design/components/notification/NotificationDialog.java
  2. 28
      designer-base/src/main/java/com/fr/env/detect/impl/converter/ClassConflictConvertor.java
  3. 8
      designer-base/src/main/java/com/fr/env/detect/ui/EnvDetectorDialog.java

5
designer-base/src/main/java/com/fr/design/components/notification/NotificationDialog.java

@ -184,7 +184,10 @@ public class NotificationDialog extends JDialog {
int widthUnit = messageComponents.stream()
.map((component) -> {
Dimension preferredSize = component.getPreferredSize();
return preferredSize.getHeight();
double width = preferredSize.getWidth();
double widthFactor = Math.ceil(width / CONTENT_WIDTH);
// 这里的高度是没有限制宽度的,如果限制宽度,高度会变更,所以这里需要加上宽度的影响
return preferredSize.getHeight() + widthFactor * SIGN_LABEL_DIMENSION.getHeight();
})
.reduce(Double::sum)
.map(calStandardWidth)

28
designer-base/src/main/java/com/fr/env/detect/impl/converter/ClassConflictConvertor.java vendored

@ -9,12 +9,15 @@ import com.fr.env.detect.bean.ExceptionLog;
import com.fr.env.detect.bean.ExceptionSolution;
import com.fr.env.detect.bean.ExceptionTips;
import com.fr.env.detect.thowable.ThrowableConverter;
import com.fr.stable.EncodeConstants;
import com.fr.stable.resource.ResourceLoader;
import org.jetbrains.annotations.NotNull;
import javax.el.MethodNotFoundException;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.net.URLDecoder;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Enumeration;
@ -42,6 +45,9 @@ public class ClassConflictConvertor implements ThrowableConverter {
private static final Pattern JAR_NAME_PATTERN = Pattern.compile("([\\w+-\\.]*\\.jar)");
private static final String WEB_INF_STRING = "WEB-INF";
private static final String JAR_URL_SUFFIX = ".jar!";
private static final String JAR_FILE_SUFFIX = ".jar";
private static final String FILE_URL_PREFIX = "file:";
private final Map<Class<?>, ClassNameConverter> throwableMap = new HashMap<>();
@ -101,17 +107,19 @@ public class ClassConflictConvertor implements ThrowableConverter {
}
for (URL url : urlList) {
String file = url.getFile();
Matcher matcher = JAR_NAME_PATTERN.matcher(url.getFile());
if (matcher.find()) {
String jar = matcher.group();
List<String> libPath = null;
if (file.contains(WEB_INF_STRING)) {
libPath = libMap.get(DetectorConstants.WEB_LIB_PATH);
} else {
libPath = libMap.get(DetectorConstants.FR_HOME_LIB);
String decodeFileStr = URLDecoder.decode(file, EncodeConstants.ENCODING_UTF_8);
if (decodeFileStr.contains(JAR_URL_SUFFIX)) {
String jarPath = decodeFileStr.substring(FILE_URL_PREFIX.length(), decodeFileStr.indexOf(JAR_URL_SUFFIX) + JAR_FILE_SUFFIX.length());
String jar = new File(jarPath).getName();
if (allPath.add(jar)) {
List<String> libPath;
if (file.contains(WEB_INF_STRING)) {
libPath = libMap.get(DetectorConstants.WEB_LIB_PATH);
} else {
libPath = libMap.get(DetectorConstants.FR_HOME_LIB);
}
libPath.add(jar);
}
libPath.add(jar);
allPath.add(jar);
}
}
} catch (IOException ignore) {

8
designer-base/src/main/java/com/fr/env/detect/ui/EnvDetectorDialog.java vendored

@ -52,7 +52,9 @@ import java.util.stream.Stream;
public class EnvDetectorDialog extends JDialog {
private static final ImageIcon LOADING_ICON = getLoadingIcon();
public static final int TIMEOUT = 1000;
private static final int TIMEOUT = 1000;
private static final Color SUCCESS_COLOR = new Color(22, 193, 83);
private final JPanel body;
@ -273,10 +275,10 @@ public class EnvDetectorDialog extends JDialog {
if (success) {
resultSummaryPane.add(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Detect_Result_Label")), BorderLayout.WEST);
UILabel successLabel = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Detect_Result_Success"));
successLabel.setForeground(Color.GREEN);
successLabel.setForeground(SUCCESS_COLOR);
resultSummaryPane.add(successLabel, BorderLayout.CENTER);
} else {
resultSummaryPane.add(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Exception")), BorderLayout.WEST);
resultSummaryPane.add(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Detect_Result_Label")), BorderLayout.WEST);
UILabel resultLabel = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Detect_Result_Error"));
resultLabel.setForeground(Color.RED);
resultSummaryPane.add(resultLabel, BorderLayout.CENTER);

Loading…
Cancel
Save