Browse Source

check

master
hzzz 7 years ago
parent
commit
3838b06108
  1. 2
      designer-base/src/com/fr/design/DesignerEnvManager.java
  2. 18
      designer-base/src/com/fr/design/actions/file/SwitchExistEnv.java
  3. 41
      designer-base/src/com/fr/design/mainframe/TemplatePane.java
  4. 2
      designer-base/src/com/fr/env/EnvListPane.java
  5. 8
      designer-base/src/com/fr/start/server/FRTomcat.java
  6. 6
      designer-realize/src/com/fr/start/Designer4Debug.java

2
designer-base/src/com/fr/design/DesignerEnvManager.java

@ -10,10 +10,8 @@ import com.fr.base.env.resource.EnvConfigUtils;
import com.fr.base.env.resource.LocalEnvConfig;
import com.fr.base.env.resource.RemoteEnvConfig;
import com.fr.core.env.EnvConfig;
import com.fr.dav.LocalEnv;
import com.fr.design.actions.help.alphafine.AlphaFineConfigManager;
import com.fr.design.constants.UIConstants;
import com.fr.env.RemoteEnv;
import com.fr.env.SignIn;
import com.fr.file.FILEFactory;
import com.fr.general.ComparatorUtils;

18
designer-base/src/com/fr/design/actions/file/SwitchExistEnv.java

@ -1,17 +1,14 @@
package com.fr.design.actions.file;
import com.fr.base.BaseUtils;
import com.fr.base.Env;
import com.fr.base.FRContext;
import com.fr.base.env.resource.LocalEnvConfig;
import com.fr.base.env.resource.RemoteEnvConfig;
import com.fr.core.env.EnvConfig;
import com.fr.dav.LocalEnv;
import com.fr.design.DesignerEnvManager;
import com.fr.design.actions.UpdateAction;
import com.fr.design.data.DesignTableDataManager;
import com.fr.design.data.tabledata.ResponseDataSourceChange;
import com.fr.design.dialog.InformationWarnPane;
import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.JTemplate;
@ -21,20 +18,15 @@ import com.fr.design.menu.MenuDef;
import com.fr.design.menu.SeparatorDef;
import com.fr.env.RemoteEnv;
import com.fr.env.SignIn;
import com.fr.general.ComparatorUtils;
import com.fr.general.FRLogger;
import com.fr.general.GeneralContext;
import com.fr.general.Inter;
import com.fr.stable.EnvChangedListener;
import com.fr.stable.ProductConstants;
import com.fr.stable.StringUtils;
import javax.swing.*;
import javax.swing.JOptionPane;
import java.awt.event.ActionEvent;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.logging.Level;
public class SwitchExistEnv extends MenuDef {
@ -111,14 +103,6 @@ public class SwitchExistEnv extends MenuDef {
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText(new String[]{"M-SwitchWorkspace", "Failed"}));
return;
}
// String remoteVersion = selectedEnv.getDesignerVersion();
// if (StringUtils.isBlank(remoteVersion) || ComparatorUtils.compare(remoteVersion, ProductConstants.DESIGNER_VERSION) < 0) {
// String infor = Inter.getLocText("Server-version-tip");
// String moreInfo = Inter.getLocText("Server-version-tip-moreInfo");
// FRLogger.getLogger().log(Level.WARNING, infor);
// new InformationWarnPane(infor, moreInfo, Inter.getLocText("Tooltips")).show();
// return;
// }
SignIn.signIn(selectedEnv);
HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().refreshToolArea();
fireDSChanged();

41
designer-base/src/com/fr/design/mainframe/TemplatePane.java

@ -1,7 +1,6 @@
package com.fr.design.mainframe;
import com.fr.base.BaseUtils;
import com.fr.base.Env;
import com.fr.core.env.EnvConfig;
import com.fr.dav.LocalEnv;
import com.fr.design.DesignModelAdapter;
@ -23,8 +22,19 @@ import com.fr.stable.EnvChangedListener;
import com.fr.stable.ProductConstants;
import com.fr.stable.StringUtils;
import javax.swing.*;
import java.awt.*;
import javax.swing.BorderFactory;
import javax.swing.Icon;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Cursor;
import java.awt.Dimension;
import java.awt.GradientPaint;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Point;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseEvent;
@ -98,6 +108,7 @@ public class TemplatePane extends JPanel implements MouseListener {
/**
* 是否可扩展
*
* @return 同上
*/
public boolean IsExpanded() {
@ -121,13 +132,13 @@ public class TemplatePane extends JPanel implements MouseListener {
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText(new String[]{"M-SwitchWorkspace", "Failed"}));
return false;
} else {
// String remoteVersion = selectedEnv.getDesignerVersion();
// if (StringUtils.isBlank(remoteVersion) || ComparatorUtils.compare(remoteVersion, ProductConstants.DESIGNER_VERSION) < 0) {
// String infor = Inter.getLocText("Server-version-tip");
// String moreInfo = Inter.getLocText("Server-version-tip-moreInfo");
// new InformationWarnPane(infor, moreInfo, Inter.getLocText("Tooltips")).show();
// return false;
// }
String remoteVersion = getDesignerVersion(selectedEnv);
if (StringUtils.isBlank(remoteVersion) || ComparatorUtils.compare(remoteVersion, ProductConstants.DESIGNER_VERSION) < 0) {
String infor = Inter.getLocText("Server-version-tip");
String moreInfo = Inter.getLocText("Server-version-tip-moreInfo");
new InformationWarnPane(infor, moreInfo, Inter.getLocText("Tooltips")).show();
return false;
}
}
}
SignIn.signIn(selectedEnv);
@ -148,6 +159,11 @@ public class TemplatePane extends JPanel implements MouseListener {
return true;
}
private String getDesignerVersion(EnvConfig selectedEnv) {
// return selectedEnv.getDesignerVersion();
throw new UnsupportedOperationException("unsupport now");
}
/**
* 编辑items
*/
@ -210,6 +226,7 @@ public class TemplatePane extends JPanel implements MouseListener {
/**
* 鼠标点击
*
* @param e 事件
*/
@Override
@ -218,6 +235,7 @@ public class TemplatePane extends JPanel implements MouseListener {
/**
* 鼠标按下
*
* @param e 事件
*/
@Override
@ -232,6 +250,7 @@ public class TemplatePane extends JPanel implements MouseListener {
/**
* 鼠标放开
*
* @param e 事件
*/
@Override
@ -240,6 +259,7 @@ public class TemplatePane extends JPanel implements MouseListener {
/**
* 鼠标进入
*
* @param e 事件
*/
@Override
@ -248,6 +268,7 @@ public class TemplatePane extends JPanel implements MouseListener {
/**
* 鼠标离开
*
* @param e 事件
*/
@Override

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

@ -1,10 +1,8 @@
package com.fr.env;
import com.fr.base.Env;
import com.fr.base.env.resource.LocalEnvConfig;
import com.fr.base.env.resource.RemoteEnvConfig;
import com.fr.core.env.EnvConfig;
import com.fr.dav.LocalEnv;
import com.fr.design.DesignerEnvManager;
import com.fr.design.gui.controlpane.JListControlPane;
import com.fr.design.gui.controlpane.NameObjectCreator;

8
designer-base/src/com/fr/start/server/FRTomcat.java

@ -20,9 +20,9 @@ public class FRTomcat extends Tomcat{
public Context addWebapp(String contextPath, String docBase) throws ServletException {
silence(getHost(), contextPath);
silence(host, contextPath);
Context ctx = createContext(getHost(), contextPath);
Context ctx = createContext(host, contextPath);
if (ctx instanceof StandardContext) {
((StandardContext)ctx).setDelegate(true);
}
@ -37,10 +37,10 @@ public class FRTomcat extends Tomcat{
ctxCfg.setDefaultWebXml(noDefaultWebXmlPath());
if (getHost() == null) {
if (host == null) {
getHost().addChild(ctx);
} else {
getHost().addChild(ctx);
host.addChild(ctx);
}
return ctx;

6
designer-realize/src/com/fr/start/Designer4Debug.java

@ -5,7 +5,7 @@ package com.fr.start;
*/
public class Designer4Debug {
// public static void main(String... args) {
// org.swingexplorer.Launcher.main(new String[]{"com.fr.start.Designer"});
// }
public static void main(String... args) {
org.swingexplorer.Launcher.main(new String[]{"com.fr.start.Designer"});
}
}

Loading…
Cancel
Save