Browse Source

服务检测弹窗出现时间做修改

feature/big-screen
Maksim 5 years ago
parent
commit
168627526d
  1. 13
      designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java
  2. 12
      designer-base/src/main/java/com/fr/design/gui/controlpane/JControlUpdatePane.java
  3. 14
      designer-base/src/main/java/com/fr/design/write/submit/CheckServiceDialog.java
  4. 3
      designer-base/src/main/java/com/fr/env/EnvListPane.java

13
designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java

@ -245,11 +245,18 @@ public class EnvChangeEntrance {
Set<Class> noExistServiceSet = getNoExistServiceSet(connectionInfo);
StringBuilder textBuilder = new StringBuilder();
for (Class clazz : noExistServiceSet) {
WorkspaceAPI workspaceAPI = (WorkspaceAPI) clazz.getAnnotation(WorkspaceAPI.class);
String descriptionOfCN = InterProviderFactory.getProvider().getLocText(workspaceAPI.description());
textBuilder.append(descriptionOfCN).append("\n");
try {
WorkspaceAPI workspaceAPI = (WorkspaceAPI) clazz.getAnnotation(WorkspaceAPI.class);
String descriptionOfCN = InterProviderFactory.getProvider().getLocText(workspaceAPI.description());
textBuilder.append(descriptionOfCN).append("\n");
}catch (Exception e){
FineLoggerFactory.getLogger().info("workspace service {} get annotation failed", clazz);
}
}
String areaText = textBuilder.toString();
if(StringUtils.isEmpty(areaText)){
return;
}
CheckServiceDialog dialog = new CheckServiceDialog(DesignerContext.getDesignerFrame(), areaText, localBranch, remoteBranch);
dialog.setVisible(true);
}

12
designer-base/src/main/java/com/fr/design/gui/controlpane/JControlUpdatePane.java

@ -1,10 +1,13 @@
package com.fr.design.gui.controlpane;
import com.fr.design.DesignerEnvManager;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.data.tabledata.tabledatapane.GlobalMultiTDTableDataPane;
import com.fr.design.data.tabledata.tabledatapane.GlobalTreeTableDataPane;
import com.fr.design.data.tabledata.tabledatapane.MultiTDTableDataPane;
import com.fr.design.data.tabledata.tabledatapane.TreeTableDataPane;
import com.fr.design.env.DesignerWorkspaceInfo;
import com.fr.design.env.RemoteDesignerWorkspaceInfo;
import com.fr.design.gui.ilist.ListModelElement;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.ComparatorUtils;
@ -99,6 +102,15 @@ class JControlUpdatePane extends JPanel {
if (pane != null && pane.isVisible()) {
Object bean = pane.updateBean();
try {
if (bean instanceof RemoteDesignerWorkspaceInfo) {
DesignerWorkspaceInfo info = DesignerEnvManager.getEnvManager().getWorkspaceInfo(elEditing.wrapper.getName());
String remindTime = info.getRemindTime();
((RemoteDesignerWorkspaceInfo) bean).setRemindTime(remindTime);
}
}catch (Exception e){
FineLoggerFactory.getLogger().info("remindTime is not exist");
}
if (i < creators.length) {
creators[i].saveUpdatedBean(elEditing, bean);
}

14
designer-base/src/main/java/com/fr/design/write/submit/CheckServiceDialog.java

@ -17,6 +17,7 @@ import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextArea;
import javax.swing.JTextPane;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Frame;
@ -55,15 +56,20 @@ public class CheckServiceDialog extends JDialog implements ActionListener {
JLabel label = new JLabel(Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Branch_Inconsistency"));
label.setFont(font);
label.setPreferredSize(new Dimension(650,30));
String delimiter = GeneralContext.getLocale().equals(Locale.US)? "<br>":"/";
JLabel label2 = new JLabel("<html>"+Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Local_Designer")
+ localBranch + "/" + Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Remote_Server") + remoteBranch+"</html>");
+ localBranch + delimiter + Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Remote_Server") + remoteBranch+"</html>");
label2.setPreferredSize(new Dimension(600,30));
JLabel label3 = new JLabel(Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Branch_Need_Update"));
label3.setPreferredSize(new Dimension(500,30));
JTextPane tipsPane = new JTextPane();
tipsPane.setEditable(false);
tipsPane.setBackground(verticalPanel.getBackground());
tipsPane.setPreferredSize(new Dimension(500,30));
tipsPane.setText(Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Branch_Need_Update"));
verticalPanel.add(label);
verticalPanel.add(label2);
verticalPanel.add(label3);
verticalPanel.add(tipsPane);
topPanel.add(imagePanel,BorderLayout.WEST);
topPanel.add(verticalPanel,BorderLayout.CENTER);

3
designer-base/src/main/java/com/fr/env/EnvListPane.java vendored

@ -96,8 +96,9 @@ public class EnvListPane extends JListControlPane {
*/
public String updateEnvManager() {
DesignerEnvManager mgr = DesignerEnvManager.getEnvManager();
mgr.clearAllEnv();
//这里代码时序换一下,因为update中需要借助mgr来获取提醒时间,已确认mgr对res无依赖
Nameable[] res = this.update();
mgr.clearAllEnv();
for (Nameable re : res) {
NameObject nameObject = (NameObject) re;
mgr.putEnv(nameObject.getName(), (DesignerWorkspaceInfo) nameObject.getObject());

Loading…
Cancel
Save