Browse Source

Merge pull request #1591 in DESIGN/design from ~HADES/design:release/10.0 to release/10.0

* commit '8c5a90411bf7be01e666d008270e61bb174ac60d':
  REPORT-29958 一个类漏交
  fix 去掉调试信息
  REPORT-29704 && REPORT-29960 && REPORT-29958 && REPORT-29752
feature/big-screen
Hades 5 years ago
parent
commit
cd1a0b34ac
  1. 5
      designer-base/src/main/java/com/fr/design/mainframe/loghandler/LogMessageBar.java
  2. 8
      designer-base/src/main/java/com/fr/design/os/impl/SupportOSImpl.java
  3. 9
      designer-base/src/main/java/com/fr/design/utils/DesignerPort.java
  4. 12
      designer-realize/src/main/java/com/fr/design/mainframe/SheetAuthorityEditPane.java
  5. 34
      designer-realize/src/main/java/com/fr/start/DesignerJavaRuntime.java

5
designer-base/src/main/java/com/fr/design/mainframe/loghandler/LogMessageBar.java

@ -12,6 +12,9 @@ import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
public class LogMessageBar extends JPanel { public class LogMessageBar extends JPanel {
private static final String LOG_MARK = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Log");
private UILabel messageLabel; private UILabel messageLabel;
private int width = 600; private int width = 600;
private static volatile LogMessageBar THIS; private static volatile LogMessageBar THIS;
@ -56,7 +59,7 @@ public class LogMessageBar extends JPanel {
if (message == null) { if (message == null) {
return; return;
} }
messageLabel.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Log") + " | " + message); messageLabel.setText(LOG_MARK + " | " + message);
repaint(); repaint();
} }

8
designer-base/src/main/java/com/fr/design/os/impl/SupportOSImpl.java

@ -97,6 +97,14 @@ public enum SupportOSImpl implements SupportOS {
public boolean support() { public boolean support() {
return OperatingSystem.isMacos(); return OperatingSystem.isMacos();
} }
},
VM_OPTIONS_ADAPTER {
@Override
public boolean support() {
return OperatingSystem.isWindows();
}
} }
} }

9
designer-base/src/main/java/com/fr/design/utils/DesignerPort.java

@ -1,5 +1,6 @@
package com.fr.design.utils; package com.fr.design.utils;
import com.fr.common.report.ReportState;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.RestartHelper; import com.fr.design.RestartHelper;
import com.fr.design.dialog.TipDialog; import com.fr.design.dialog.TipDialog;
@ -12,6 +13,9 @@ import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.exit.DesignerExiter; import com.fr.exit.DesignerExiter;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.IOUtils; import com.fr.general.IOUtils;
import com.fr.process.ProcessEventPipe;
import com.fr.process.engine.core.CarryMessageEvent;
import com.fr.process.engine.core.FineProcessContext;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.stable.xml.XMLPrintWriter; import com.fr.stable.xml.XMLPrintWriter;
import com.fr.stable.xml.XMLReadable; import com.fr.stable.xml.XMLReadable;
@ -86,7 +90,10 @@ public class DesignerPort implements XMLReadable, XMLWriter {
} }
public void resetPort() { public void resetPort() {
ProcessEventPipe eventPipe = FineProcessContext.getParentPipe();
if (eventPipe != null) {
eventPipe.fire(new CarryMessageEvent(ReportState.STOP.getValue()));
}
TipDialog dialog = new TipDialog(null, TipDialog dialog = new TipDialog(null,
StringUtils.EMPTY, StringUtils.EMPTY,
Toolkit.i18nText("Fine-Design_Port_Found_Port_Conflict"), Toolkit.i18nText("Fine-Design_Port_Found_Port_Conflict"),

12
designer-realize/src/main/java/com/fr/design/mainframe/SheetAuthorityEditPane.java

@ -8,6 +8,7 @@ import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.roleAuthority.ReportAndFSManagePane; import com.fr.design.roleAuthority.ReportAndFSManagePane;
import com.fr.design.roleAuthority.RolesAlreadyEditedPane; import com.fr.design.roleAuthority.RolesAlreadyEditedPane;
import com.fr.design.ui.util.UIUtil;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.main.impl.WorkBook; import com.fr.main.impl.WorkBook;
@ -119,9 +120,14 @@ public class SheetAuthorityEditPane extends AuthorityEditPane {
if (StringUtils.isEmpty(name.getText())){ if (StringUtils.isEmpty(name.getText())){
return; return;
} }
checkPane.add(populateCheckPane(), BorderLayout.CENTER); UIUtil.invokeLaterIfNeeded(new Runnable() {
checkPane.setBorder(BorderFactory.createEmptyBorder(0, LEFT_CHECKPANE, 0, 0)); @Override
checkVisibleCheckBoxes(); public void run() {
checkPane.add(populateCheckPane(), BorderLayout.CENTER);
checkPane.setBorder(BorderFactory.createEmptyBorder(0, LEFT_CHECKPANE, 0, 0));
checkVisibleCheckBoxes();
}
});
} }
/** /**

34
designer-realize/src/main/java/com/fr/start/DesignerJavaRuntime.java

@ -2,15 +2,25 @@ package com.fr.start;
import com.fr.design.os.impl.SupportOSImpl; import com.fr.design.os.impl.SupportOSImpl;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.GeneralContext;
import com.fr.general.GeneralUtils;
import com.fr.general.IOUtils; import com.fr.general.IOUtils;
import com.fr.locale.InterProviderFactory;
import com.fr.log.FineLoggerFactory;
import com.fr.process.engine.core.AbstractJavaRuntime; import com.fr.process.engine.core.AbstractJavaRuntime;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.StableUtils; import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.stable.os.OperatingSystem; import com.fr.stable.os.OperatingSystem;
import java.io.BufferedReader;
import java.io.File; import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/** /**
@ -32,11 +42,14 @@ public class DesignerJavaRuntime extends AbstractJavaRuntime {
private static final String LOGO_PATH = StableUtils.pathJoin(BIN_HOME, "logo.png"); private static final String LOGO_PATH = StableUtils.pathJoin(BIN_HOME, "logo.png");
private static final String DOCK_OPTIONS = "-Xdock:icon=" + LOGO_PATH; private static final String DOCK_OPTIONS = "-Xdock:icon=" + LOGO_PATH;
private static final String DOCK_NAME_OPTIONS = "-Xdock:name=" + FineDesigner.class.getSimpleName(); private static final String DOCK_NAME_OPTIONS = "-Xdock:name=" + FineDesigner.class.getSimpleName();
private static final String WIN_VM_OPTIONS_PATH = StableUtils.pathJoin(BIN_HOME, "designer.vmoptions");
private static final String[] DEBUG_OPTIONS = new String[]{"-Dfile.encoding=UTF-8", "-Xmx2048m"}; private static final String[] DEBUG_OPTIONS = new String[]{"-Dfile.encoding=UTF-8", "-Xmx2048m"};
static { static {
try { try {
IOUtils.copy(DesignerJavaRuntime.class.getResourceAsStream("/com/fr/design/icon/logo.png"), "logo.png", new File(BIN_HOME)); if (SupportOSImpl.DOCK_ICON.support()) {
IOUtils.copy(DesignerJavaRuntime.class.getResourceAsStream("/com/fr/design/icon/logo.png"), "logo.png", new File(BIN_HOME));
}
} catch (IOException ignore) { } catch (IOException ignore) {
} }
} }
@ -82,7 +95,7 @@ public class DesignerJavaRuntime extends AbstractJavaRuntime {
} }
private boolean isInstallVersion() { private boolean isInstallVersion() {
return !ComparatorUtils.equals(StableUtils.getInstallHome(), DOT); return !ComparatorUtils.equals(GeneralUtils.readFullBuildNO(), InterProviderFactory.getProvider().getLocText("Fine-Core_Basic_About_No_Build"));
} }
@ -96,9 +109,26 @@ public class DesignerJavaRuntime extends AbstractJavaRuntime {
public String[] getJvmOptions() { public String[] getJvmOptions() {
if (isInstallVersion()) { if (isInstallVersion()) {
String[] options = super.getJvmOptions(); String[] options = super.getJvmOptions();
// win下环境变量 存在错误的设置会导致问题 直接读vmoptions
if (SupportOSImpl.VM_OPTIONS_ADAPTER.support()) {
List<String> optionList = new ArrayList<>();
try (BufferedReader reader = new BufferedReader(new FileReader(new File(WIN_VM_OPTIONS_PATH)))) {
String option = null;
while ((option = reader.readLine()) != null) {
optionList.add(option.trim());
}
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
return DEBUG_OPTIONS;
}
if (!optionList.isEmpty()) {
return optionList.toArray(new String[0]);
}
}
if (SupportOSImpl.DOCK_ICON.support()) { if (SupportOSImpl.DOCK_ICON.support()) {
options = ArrayUtils.addAll(options, DOCK_OPTIONS, DOCK_NAME_OPTIONS); options = ArrayUtils.addAll(options, DOCK_OPTIONS, DOCK_NAME_OPTIONS);
} }
FineLoggerFactory.getLogger().debug("Vm Options: " + Arrays.toString(options));
return options; return options;
} else { } else {
return DEBUG_OPTIONS; return DEBUG_OPTIONS;

Loading…
Cancel
Save