diff --git a/designer-base/src/main/java/com/fr/common/detect/CommonPortDetector.java b/designer-base/src/main/java/com/fr/common/detect/CommonPortDetector.java
new file mode 100644
index 0000000000..310e75dce0
--- /dev/null
+++ b/designer-base/src/main/java/com/fr/common/detect/CommonPortDetector.java
@@ -0,0 +1,59 @@
+package com.fr.common.detect;
+
+import com.fr.concurrent.NamedThreadFactory;
+import com.fr.design.DesignerEnvManager;
+import com.fr.log.FineLoggerFactory;
+import com.fr.module.ModuleContext;
+import com.fr.web.WebSocketConfig;
+
+import java.net.Socket;
+import java.util.concurrent.ExecutorService;
+
+/**
+ * @author hades
+ * @version 10.0
+ * Created by hades on 2020/3/10
+ */
+public class CommonPortDetector {
+
+ private static final CommonPortDetector INSTANCE = new CommonPortDetector();
+ private ExecutorService service = ModuleContext.getExecutor().newSingleThreadExecutor(new NamedThreadFactory("CommonPortDetector"));
+
+ public static CommonPortDetector getInstance() {
+ return INSTANCE;
+ }
+
+ public void execute() {
+ service.submit(new Runnable() {
+ @Override
+ public void run() {
+ detectTomcatPort();
+ detectWebSocketPort();
+ }
+ });
+ }
+
+ private void detectTomcatPort() {
+ int port = DesignerEnvManager.getEnvManager().getEmbedServerPort();
+ if (checkPort(port)) {
+ FineLoggerFactory.getLogger().error("EmbedTomcat Port: {} is not available, maybe occupied by other programs, please check it!", port);
+ }
+ }
+
+ private void detectWebSocketPort() {
+ Integer[] ports = WebSocketConfig.getInstance().getPort();
+ for (int port : ports) {
+ if (checkPort(port)) {
+ FineLoggerFactory.getLogger().error("WebSocKet Port: {} is not available, maybe occupied by other programs, please check it!", port);
+ }
+ }
+ }
+
+ private boolean checkPort(int port) {
+ try (Socket socket = new Socket("localhost", port)) {
+ return true;
+ } catch (Exception e) {
+ return false;
+ }
+ }
+}
diff --git a/designer-base/src/main/java/com/fr/common/report/ReportState.java b/designer-base/src/main/java/com/fr/common/report/ReportState.java
new file mode 100644
index 0000000000..cc32e439cf
--- /dev/null
+++ b/designer-base/src/main/java/com/fr/common/report/ReportState.java
@@ -0,0 +1,21 @@
+package com.fr.common.report;
+
+/**
+ * @author hades
+ * @version 10.0
+ * Created by hades on 2020/3/27
+ */
+public enum ReportState {
+
+ STOP("stop"), ACTIVE("active");
+
+ private String value;
+
+ ReportState(String value) {
+ this.value = value;
+ }
+
+ public String getValue() {
+ return this.value;
+ }
+}
\ No newline at end of file
diff --git a/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java b/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java
index 6ebd349cbb..77c779ce3e 100644
--- a/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java
+++ b/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java
@@ -8,17 +8,21 @@ import com.fr.base.Utils;
import com.fr.design.actions.help.alphafine.AlphaFineConfigManager;
import com.fr.design.constants.UIConstants;
import com.fr.design.data.DesignTableDataManager;
+import com.fr.design.dialog.ErrorDialog;
import com.fr.design.env.DesignerWorkspaceGenerator;
import com.fr.design.env.DesignerWorkspaceInfo;
import com.fr.design.env.DesignerWorkspaceType;
import com.fr.design.env.LocalDesignerWorkspaceInfo;
import com.fr.design.env.RemoteDesignerWorkspaceInfo;
import com.fr.design.file.HistoryTemplateListPane;
+import com.fr.design.i18n.Toolkit;
import com.fr.design.locale.impl.ProductImproveMark;
import com.fr.design.mainframe.vcs.VcsConfigManager;
import com.fr.design.update.push.DesignerPushUpdateConfigManager;
import com.fr.design.style.color.ColorSelectConfigManager;
import com.fr.design.utils.DesignUtils;
+import com.fr.design.utils.DesignerPort;
+import com.fr.exit.DesignerExiter;
import com.fr.file.FILEFactory;
import com.fr.general.ComparatorUtils;
import com.fr.general.FRLogFormatter;
@@ -81,6 +85,10 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
private static final String VERSION_80 = "80";
private static final int CACHINGTEMPLATE_LIMIT = 5;
private static final String WEB_NAME = "webapps";
+ /**
+ * 指定默认工作空间
+ */
+ public static final String DEFAULT_WORKSPACE_PATH = "fr.designer.workspace.default";
private static DesignerEnvManager designerEnvManager; // gui.
private String activationKey = null;
@@ -194,6 +202,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
XMLTools.readFileXML(designerEnvManager, designerEnvManager.getDesignerEnvFile());
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
+ XmlHandler.Self.handle(e);
}
// james:如果没有env定义,要设置一个默认的
@@ -340,6 +349,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
} catch (IOException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
+ XmlHandler.Self.handle(e);
} finally {
if (null != fileWriter) {
try {
@@ -554,6 +564,10 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
private String getDefaultenvPath(String installHome) {
+ String defaultWorkspacePath = System.getProperty(DEFAULT_WORKSPACE_PATH);
+ if (defaultWorkspacePath != null) {
+ return defaultWorkspacePath;
+ }
//这里需要转成反斜杠和生成默认路径一致
return new File(StableUtils.pathJoin(installHome, WEB_NAME, ProjectConstants.WEBAPP_NAME, ProjectConstants.WEBINF_NAME)).getPath();
}
@@ -1396,6 +1410,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
/**
* 对国际化进行校验
* 非简繁英日韩的默认环境 设计器全部默认为英文版本
+ *
* @param locale
* @return
*/
@@ -1545,6 +1560,8 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
readDesignerPushUpdateAttr(reader);
} else if (name.equals(vcsConfigManager.XML_TAG)) {
readVcsAttr(reader);
+ } else if (DesignerPort.XML_TAG.equals(name)) {
+ readDesignerPort(reader);
} else {
readLayout(reader, name);
}
@@ -1736,6 +1753,10 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
reader.readXMLObject(vcsConfigManager);
}
+ public void readDesignerPort(XMLableReader reader) {
+ reader.readXMLObject(DesignerPort.getInstance());
+ }
+
/**
* Write XML.
* The method will be invoked when save data to XML file.
@@ -1761,6 +1782,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
writeOpenDebug(writer);
writeDesignerPushUpdateAttr(writer);
writeVcsAttr(writer);
+ writeDesignerPort(writer);
writer.end();
}
@@ -2010,6 +2032,10 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
this.vcsConfigManager.writeXML(writer);
}
+ private void writeDesignerPort(XMLPrintWriter writer) {
+ DesignerPort.getInstance().writeXML(writer);
+ }
+
public VcsConfigManager getVcsConfigManager() {
return vcsConfigManager;
@@ -2018,4 +2044,28 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
public void setVcsConfigManager(VcsConfigManager vcsConfigManager) {
this.vcsConfigManager = vcsConfigManager;
}
+
+ enum XmlHandler {
+ Self;
+ public void handle(Throwable throwable) {
+ ErrorDialog dialog = new ErrorDialog(null,
+ Toolkit.i18nText("Fine-Design_Error_Start_Apology_Message"),
+ Toolkit.i18nText("Fine-Design_Error_Start_Report"),
+ throwable.getMessage()) {
+ @Override
+ protected void okEvent() {
+ dispose();
+ DesignerExiter.getInstance().execute();
+ }
+
+ @Override
+ protected void restartEvent() {
+ dispose();
+ RestartHelper.restart();
+ }
+ };
+ dialog.setVisible(true);
+ DesignerExiter.getInstance().execute();
+ }
+ };
}
diff --git a/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java b/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java
index 1dd438e2d4..81e62239b4 100644
--- a/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java
+++ b/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java
@@ -1,5 +1,6 @@
package com.fr.design;
+import com.fr.common.report.ReportState;
import com.fr.design.data.DesignTableDataManager;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionAdapter;
@@ -7,32 +8,55 @@ import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.env.DesignerWorkspaceGenerator;
import com.fr.design.env.DesignerWorkspaceInfo;
import com.fr.design.env.DesignerWorkspaceType;
+import com.fr.design.env.RemoteWorkspace;
import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.file.TemplateTreePane;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.utils.DesignUtils;
+import com.fr.env.CheckServiceDialog;
import com.fr.env.EnvListPane;
+import com.fr.exit.DesignerExiter;
import com.fr.general.GeneralContext;
+import com.fr.general.GeneralUtils;
+import com.fr.invoke.Reflect;
+import com.fr.json.JSONArray;
import com.fr.license.exception.RegistEditionException;
+import com.fr.locale.InterProviderFactory;
import com.fr.log.FineLoggerFactory;
+import com.fr.process.ProcessEventPipe;
+import com.fr.process.engine.core.CarryMessageEvent;
+import com.fr.process.engine.core.FineProcessContext;
+import com.fr.rpc.Result;
import com.fr.stable.AssistUtils;
import com.fr.stable.EnvChangedListener;
+import com.fr.stable.StringUtils;
import com.fr.start.server.ServerTray;
import com.fr.workspace.WorkContext;
import com.fr.workspace.WorkContextCallback;
import com.fr.workspace.Workspace;
+import com.fr.workspace.base.WorkspaceAPI;
import com.fr.workspace.connect.WorkspaceConnectionInfo;
+import com.fr.workspace.engine.base.FineObjectPool;
import com.fr.workspace.engine.channel.http.FunctionalHttpRequest;
import com.fr.workspace.engine.exception.WorkspaceAuthException;
+import com.fr.workspace.engine.exception.WorkspaceConnectionException;
+import com.fr.workspace.engine.rpc.WorkspaceProxyPool;
import javax.swing.JOptionPane;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
+import java.lang.reflect.Method;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
import java.util.HashMap;
import java.util.List;
+import java.util.Set;
+import java.util.HashSet;
import static javax.swing.JOptionPane.ERROR_MESSAGE;
import static javax.swing.JOptionPane.QUESTION_MESSAGE;
@@ -84,6 +108,7 @@ public class EnvChangeEntrance {
private boolean switch2Env(final String envName, PopTipStrategy strategy) {
DesignerEnvManager envManager = DesignerEnvManager.getEnvManager();
DesignerWorkspaceInfo selectedEnv = envManager.getWorkspaceInfo(envName);
+ WorkspaceConnectionInfo connectionInfo = selectedEnv.getConnection();
try {
Workspace workspace = DesignerWorkspaceGenerator.generate(selectedEnv);
@@ -98,12 +123,7 @@ public class EnvChangeEntrance {
});
return false;
}
- // 如果版本不一致,且确认 不继续 连接,这里返回 false.
- if (!versionCheckAndConfirm(selectedEnv)) {
- return false;
- }
-
WorkContext.switchTo(workspace, new WorkContextCallback() {
@Override
public void done() {
@@ -116,12 +136,17 @@ public class EnvChangeEntrance {
}
}
});
+ // REPORT-25688如果是war包部署的服务器,给与提示
+ if (WorkContext.getCurrent().isWarDeploy()) {
+ FineJOptionPane.showMessageDialog(null, Toolkit.i18nText("Fine-Design_Basic_War_Deploy_Tip"),
+ Toolkit.i18nText("Fine-Design_Basic_Message"), JOptionPane.INFORMATION_MESSAGE);
+ }
//REPORT-13810如果只是添加了工作目录,没有切换,这里ToolArea也是要显示新建的工作目录
JTemplate template = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate();
if (template != null) {
template.refreshToolArea();
}
-
+ showServiceDialog(selectedEnv);
} catch (WorkspaceAuthException | RegistEditionException e) {
// String title = Toolkit.i18nText("Fine-Design_Basic_Remote_Connect_Auth_Failed");
// String title = Toolkit.i18nText("Fine-Design_Basic_Lic_Does_Not_Support_Remote");
@@ -154,6 +179,7 @@ public class EnvChangeEntrance {
}
/**
+ * 这个功能留着,可能会加回来,先做注释处理
* 切换远程环境之前,进行版本检测,当版本不一致的时候,提示。
* 当用户确认选择 ok 时,才继续。
*
@@ -197,6 +223,148 @@ public class EnvChangeEntrance {
return true;
}
+ /**
+ * 对选择的环境做服务检测
+ * @param selectedEnv 选择的工作环境
+ */
+ public void showServiceDialog(DesignerWorkspaceInfo selectedEnv) throws Exception {
+ //是否需要做服务校验
+ if(needCheckBranch(selectedEnv)) {
+ String localBranch;
+ String remoteBranch;
+ WorkspaceConnectionInfo connectionInfo = selectedEnv.getConnection();
+ localBranch = GeneralUtils.readFullBuildNO();
+ try {
+ remoteBranch = new FunctionalHttpRequest(connectionInfo).getServerBranch();
+ } catch (WorkspaceConnectionException e) {
+ remoteBranch = Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Branch_Is_Old") + formatBranch(localBranch);
+ }
+ //通过是否包含#来避免当前版本为非安装版本(主要是内部开发版本)
+ if (localBranch.contains("#") && localBranch.equals(remoteBranch)) {
+ //说明版本一致,仅做日志记录
+ FineLoggerFactory.getLogger().info("Remote Designer version consistency");
+ } else {
+ localBranch = formatBranch(localBranch);
+ remoteBranch = formatBranch(remoteBranch);
+ Set noExistServiceSet = getNoExistServiceSet(connectionInfo);
+ StringBuilder textBuilder = new StringBuilder();
+ for (Class clazz : noExistServiceSet) {
+ WorkspaceAPI workspaceAPI = (WorkspaceAPI) clazz.getAnnotation(WorkspaceAPI.class);
+ if(workspaceAPI == null){
+ FineLoggerFactory.getLogger().info("workspace service {} get annotation failed", clazz);
+ continue;
+ }
+ if(workspaceAPI.ignore()){
+ continue;
+ }
+ String descriptionOfCN = InterProviderFactory.getProvider().getLocText(workspaceAPI.description());
+ textBuilder.append(descriptionOfCN).append("\n");
+ }
+ String areaText = textBuilder.toString();
+ if(StringUtils.isEmpty(areaText)){
+ return;
+ }
+ CheckServiceDialog dialog = new CheckServiceDialog(DesignerContext.getDesignerFrame(), areaText, localBranch, remoteBranch);
+ dialog.setVisible(true);
+ }
+ }
+ }
+
+ /**
+ * 判断是否需要做版本验证,判断依据为
+ * 1、选择的环境为远程环境
+ * 2、一个月内不弹出是否勾选
+ * @param selectedEnv 选择的环境
+ * @return
+ */
+ private boolean needCheckBranch(DesignerWorkspaceInfo selectedEnv){
+ if(selectedEnv.getType() == DesignerWorkspaceType.Remote){
+ try {
+ SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
+ Calendar calendar = Calendar.getInstance();
+ if(StringUtils.isEmpty(selectedEnv.getRemindTime())){
+ return true;
+ }
+ //获取记录的时间
+ Date remindTime = format.parse(selectedEnv.getRemindTime());
+ calendar.setTime(remindTime);
+ //获取一个月后的时间
+ calendar.add(Calendar.MONTH,1);
+ //与当前时间作对比,然后判断是否提示
+ if(new Date().after(calendar.getTime())){
+ return true;
+ }
+ } catch (ParseException e) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * 获取不存在的服务列表
+ * @param info 环境连接信息
+ * @return 以Set形式返回不存在的服务
+ */
+ public Set getNoExistServiceSet(WorkspaceConnectionInfo info){
+ Set noExistServiceSet = new HashSet();
+ Set remoteServiceSet = new HashSet();
+ Set localServiceSet = FineObjectPool.getInstance().getServerPool().keySet();
+
+ try {
+ JSONArray serviceArray = new FunctionalHttpRequest(info).getServiceList();
+ for(int i = 0; i < serviceArray.size(); i++){
+ try{
+ Class clazz = Class.forName((String) serviceArray.get(i));
+ remoteServiceSet.add(clazz);
+ } catch (Exception e){
+ continue;
+ }
+ }
+ noExistServiceSet.addAll(localServiceSet);
+ noExistServiceSet.removeAll(remoteServiceSet);
+ return noExistServiceSet;
+ } catch (WorkspaceConnectionException e) {
+ FineLoggerFactory.getLogger().info(e.getMessage());
+ //根据本地的服务列表做逐一检测
+ for(Class clazz : localServiceSet) {
+ Method testMethod = Reflect.on(Method.class).create(clazz, "connectTest", new Class[0], String.class, new Class[0], 1025, 8, null, null, null, null).get();
+ WorkspaceProxyPool proxyPool = (WorkspaceProxyPool) (((RemoteWorkspace) WorkContext.getCurrent()).getClient()).getPool();
+ Result result = proxyPool.testInvoker(testMethod);
+ Exception invokeException = (Exception) result.getException();
+ if(invokeException != null){
+ Exception cause = (Exception) invokeException.getCause();
+ //获取被包装最底层的异常
+ while (cause != null) {
+ invokeException = cause;
+ cause = (Exception) invokeException.getCause();
+ }
+ //该异常表示服务不存在
+ if(invokeException instanceof ClassNotFoundException){
+ noExistServiceSet.add(clazz);
+ }
+ }
+ }
+ return noExistServiceSet;
+ } catch (Exception e){
+ FineLoggerFactory.getLogger().error(e.getMessage(),e);
+ return noExistServiceSet;
+ }
+ }
+
+ /**
+ * 格式化分支版本号
+ * @param branch 初始的分支版本号
+ * @return 格式化后的版本号
+ */
+ private String formatBranch(String branch){
+ if(branch.contains("#")){
+ return branch.substring(branch.lastIndexOf("#") + 1, branch.length() - 13);
+ }
+ return branch;
+ }
+
+
/**
* 编辑items
*
@@ -243,14 +411,18 @@ public class EnvChangeEntrance {
@Override
public void doOk() {
+ ProcessEventPipe pipe = FineProcessContext.getParentPipe();
+ if (FineProcessContext.getParentPipe() != null) {
+ pipe.fire(new CarryMessageEvent(ReportState.ACTIVE.getValue()));
+ }
if (!envListOkAction(envListPane, PopTipStrategy.NOW)) {
- System.exit(0);
+ DesignerExiter.getInstance().execute();
}
}
@Override
public void doCancel() {
- System.exit(0);
+ DesignerExiter.getInstance().execute();
}
});
envListDialog.setVisible(true);
diff --git a/designer-base/src/main/java/com/fr/design/RestartHelper.java b/designer-base/src/main/java/com/fr/design/RestartHelper.java
index cdb4fc532e..64fdda7baa 100644
--- a/designer-base/src/main/java/com/fr/design/RestartHelper.java
+++ b/designer-base/src/main/java/com/fr/design/RestartHelper.java
@@ -2,6 +2,7 @@ package com.fr.design;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.os.impl.RestartAction;
+import com.fr.exit.DesignerExiter;
import com.fr.general.ComparatorUtils;
import com.fr.general.GeneralUtils;
import com.fr.log.FineLoggerFactory;
@@ -152,7 +153,14 @@ public class RestartHelper {
} finally {
WorkContext.getCurrent().close();
frame.dispose();
- System.exit(0);
+ try {
+ // 更新升级过渡用 供当前测试 后面可删除
+ Class.forName("com.fr.exit.DesignerExiter");
+ DesignerExiter.getInstance().execute();
+ } catch (Exception ignore) {
+ } finally {
+ System.exit(0);
+ }
}
}
@@ -194,7 +202,11 @@ public class RestartHelper {
} catch (IOException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
- DesignerContext.getDesignerFrame().exit();
+ if (DesignerContext.getDesignerFrame() != null) {
+ DesignerContext.getDesignerFrame().exit();
+ } else {
+ DesignerExiter.getInstance().execute();
+ }
}
}
}
\ No newline at end of file
diff --git a/designer-base/src/main/java/com/fr/design/actions/core/ActionFactory.java b/designer-base/src/main/java/com/fr/design/actions/core/ActionFactory.java
index 83aeaefe3d..574195470b 100644
--- a/designer-base/src/main/java/com/fr/design/actions/core/ActionFactory.java
+++ b/designer-base/src/main/java/com/fr/design/actions/core/ActionFactory.java
@@ -260,6 +260,13 @@ public class ActionFactory {
}
}
+ public static void referCellInsertActionClass(Class>[] cls) {
+ if (cls != null) {
+ actionClasses.clear();
+ Collections.addAll(actionClasses, cls);
+ }
+ }
+
/**
* 生成单元格插入相关的Action
* 表单中报表块编辑需要屏蔽掉"插入子报表"
@@ -318,6 +325,13 @@ public class ActionFactory {
}
}
+ public static void referFloatInsertActionClass(Class>[] cls) {
+ if (cls != null) {
+ floatActionClasses.clear();
+ Collections.addAll(floatActionClasses, cls);
+ }
+ }
+
/**
* 生成悬浮元素插入相关的Action
*
diff --git a/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java b/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java
index 55ccfce636..3fc03f438f 100644
--- a/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java
+++ b/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java
@@ -38,6 +38,7 @@ import com.fr.general.log.Log4jConfig;
import com.fr.locale.InterProviderFactory;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.Constants;
+import com.fr.stable.os.OperatingSystem;
import com.fr.third.apache.log4j.Level;
import com.fr.transaction.Configurations;
import com.fr.transaction.Worker;
@@ -218,22 +219,23 @@ public class PreferencePane extends BasicPane {
oracleSpace = new UICheckBox(i18nText("Fine-Design_Basic_Show_All_Oracle_Tables"));
oraclePane.add(oracleSpace);
- JPanel upmSelectorPane = FRGUIPaneFactory.createTitledBorderPane(i18nText("Fine-Design_Basic_Update_Plugin_Manager"));
- useOptimizedUPMCheckbox = new UICheckBox(i18nText("Fine-Design_Basic_Use_New_Update_Plugin_Manager"));
- upmSelectorPane.add(useOptimizedUPMCheckbox);
- advancePane.add(upmSelectorPane);
+ if (!OperatingSystem.isLinux()) {
+ JPanel upmSelectorPane = FRGUIPaneFactory.createTitledBorderPane(i18nText("Fine-Design_Basic_Update_Plugin_Manager"));
+ useOptimizedUPMCheckbox = new UICheckBox(i18nText("Fine-Design_Basic_Use_New_Update_Plugin_Manager"));
+ upmSelectorPane.add(useOptimizedUPMCheckbox);
+ advancePane.add(upmSelectorPane);
+ }
- //REPORT-23578 先屏蔽掉
- //JPanel dbmSelectorPane = FRGUIPaneFactory.createTitledBorderPane(i18nText("Fine-Design_Basic_Database_Manager"));
- //useUniverseDBMCheckbox = new UICheckBox(i18nText("Fine-Design_Basic_Use_Universe_Database_Manager"));
- //dbmSelectorPane.add(useUniverseDBMCheckbox);
- //advancePane.add(dbmSelectorPane);
+ JPanel dbmSelectorPane = FRGUIPaneFactory.createTitledBorderPane(i18nText("Fine-Design_Basic_Database_Manager"));
+ useUniverseDBMCheckbox = new UICheckBox(i18nText("Fine-Design_Basic_Use_Universe_Database_Manager"));
+ dbmSelectorPane.add(useUniverseDBMCheckbox);
+ advancePane.add(dbmSelectorPane);
JPanel improvePane = FRGUIPaneFactory.createVerticalTitledBorderPane(i18nText("Fine-Design_Basic_Product_Improve"));
joinProductImproveCheckBox = new UICheckBox(i18nText("Fine-Design_Basic_Join_Product_Improve"));
improvePane.add(joinProductImproveCheckBox);
- if(SupportOSImpl.AUTOPUSHUPDATE.support()){
+ if (SupportOSImpl.AUTOPUSHUPDATE.support()) {
autoPushUpdateCheckBox = new UICheckBox(i18nText("Fine-Design_Automatic_Push_Update"));
improvePane.add(autoPushUpdateCheckBox);
}
@@ -511,23 +513,8 @@ public class PreferencePane extends BasicPane {
JPanel logLevelPane = FRGUIPaneFactory.createTitledBorderPane("log" + i18nText("Fine-Design_Basic_Level_Setting"));
logPane.add(logLevelPane);
logLevelComboBox = new UIComboBox(LOG);
+ logLevelComboBox.setEnabled(WorkContext.getCurrent().isLocal());
logLevelPane.add(logLevelComboBox);
- logLevelComboBox.addActionListener(new ActionListener() {
- @Override
- public void actionPerformed(ActionEvent e) {
- Configurations.update(new Worker() {
- @Override
- public void run() {
- Log4jConfig.getInstance().setRootLevel((Level) logLevelComboBox.getSelectedItem());
- }
-
- @Override
- public Class extends Configuration>[] targets() {
- return new Class[]{Log4jConfig.class};
- }
- });
- }
- });
}
private void createLanPane(JPanel generalPane) {
@@ -555,8 +542,8 @@ public class PreferencePane extends BasicPane {
});
UILabel noticeLabel = new UILabel(i18nText("Fine-Design_Basic_Work_After_Restart_Designer"));//sail:提示重启后生效
double p = TableLayout.PREFERRED;
- double rowSize[] = {p};
- double columnSize[] = {p, p, p};
+ double[] rowSize = {p};
+ double[] columnSize = {p, p, p};
Component[][] components = {
{languageLabel, languageComboBox, noticeLabel},
};
@@ -596,7 +583,7 @@ public class PreferencePane extends BasicPane {
private void createLengthPane(JPanel advancePane) {
double p = TableLayout.PREFERRED;
- double rowSize[] = {p};
+ double[] rowSize = {p};
// 长度单位选择
JPanel lengthPane = FRGUIPaneFactory.createTitledBorderPane(i18nText("Fine-Design_Basic_Setting_Ruler_Units"));
@@ -618,8 +605,8 @@ public class PreferencePane extends BasicPane {
private void createServerPane(JPanel advancePane) {
double p = TableLayout.PREFERRED;
- double rowSize[] = {p};
- double columnSize[] = {p, p, p};
+ double[] rowSize = {p};
+ double[] columnSize = {p, p, p};
JPanel serverPortPane = FRGUIPaneFactory.createTitledBorderPane(i18nText("Fine-Design_Basic_Web_Preview_Port_Setting"));
advancePane.add(serverPortPane);
@@ -658,7 +645,7 @@ public class PreferencePane extends BasicPane {
/**
* The method of populate.
*
- * @param designerEnvManager
+ * @param designerEnvManager 设计器环境管理器
*/
public void populate(DesignerEnvManager designerEnvManager) {
if (designerEnvManager == null) {
@@ -687,7 +674,7 @@ public class PreferencePane extends BasicPane {
defaultStringToFormulaBox.setSelected(false);
}
VcsConfigManager vcsConfigManager = designerEnvManager.getVcsConfigManager();
- if (WorkContext.getCurrent().isCluster()) {
+ if (WorkContext.getCurrent().isCluster()){
vcsEnableCheckBox.setEnabled(false);
gcEnableCheckBox.setEnabled(false);
}
@@ -727,9 +714,11 @@ public class PreferencePane extends BasicPane {
this.portEditor.setValue(new Integer(designerEnvManager.getEmbedServerPort()));
- useOptimizedUPMCheckbox.setSelected(ServerPreferenceConfig.getInstance().isUseOptimizedUPM());
+ if (useOptimizedUPMCheckbox != null) {
+ useOptimizedUPMCheckbox.setSelected(ServerPreferenceConfig.getInstance().isUseOptimizedUPM());
+ }
- //useUniverseDBMCheckbox.setSelected(ServerPreferenceConfig.getInstance().isUseUniverseDBM());
+ useUniverseDBMCheckbox.setSelected(ServerPreferenceConfig.getInstance().isUseUniverseDBM());
this.oracleSpace.setSelected(designerEnvManager.isOracleSystemSpace());
this.cachingTemplateSpinner.setValue(designerEnvManager.getCachingTemplateLimit());
@@ -826,23 +815,32 @@ public class PreferencePane extends BasicPane {
designerEnvManager.setUndoLimit(MAX_UNDO_LIMIT_50);
}
- Configurations.update(new Worker() {
- @Override
- public void run() {
- Log4jConfig.getInstance().setRootLevel(((Level) logLevelComboBox.getSelectedItem()));
- }
+ if (WorkContext.getCurrent().isLocal()) {
+ Configurations.update(new Worker() {
+ @Override
+ public void run() {
+ Level level = (Level) logLevelComboBox.getSelectedItem();
+ if (level != null) {
+ Log4jConfig.getInstance().setRootLevel(level);
+ }
+ }
- @Override
- public Class extends Configuration>[] targets() {
- return new Class[]{Log4jConfig.class};
- }
- });
+ @Override
+ public Class extends Configuration>[] targets() {
+ @SuppressWarnings("unchecked")
+ Class extends Configuration>[] classes = new Class[]{Log4jConfig.class};
+ return classes;
+ }
+ });
+ }
Configurations.update(new Worker() {
@Override
public void run() {
- ServerPreferenceConfig.getInstance().setUseOptimizedUPM(useOptimizedUPMCheckbox.isSelected());
- //ServerPreferenceConfig.getInstance().setUseUniverseDBM(useUniverseDBMCheckbox.isSelected());
+ if (useOptimizedUPMCheckbox != null) {
+ ServerPreferenceConfig.getInstance().setUseOptimizedUPM(useOptimizedUPMCheckbox.isSelected());
+ }
+ ServerPreferenceConfig.getInstance().setUseUniverseDBM(useUniverseDBMCheckbox.isSelected());
}
@Override
diff --git a/designer-base/src/main/java/com/fr/design/actions/help/FineUIAction.java b/designer-base/src/main/java/com/fr/design/actions/help/FineUIAction.java
index 4b09de8562..0839c14767 100644
--- a/designer-base/src/main/java/com/fr/design/actions/help/FineUIAction.java
+++ b/designer-base/src/main/java/com/fr/design/actions/help/FineUIAction.java
@@ -51,7 +51,7 @@ public class FineUIAction extends UpdateAction {
BasicDialog dialog = pane.showLargeWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() {
@Override
public void doOk() {
-
+ // Do nothing
}
});
dialog.setVisible(true);
diff --git a/designer-base/src/main/java/com/fr/design/actions/help/alphafine/RemindDialog.java b/designer-base/src/main/java/com/fr/design/actions/help/alphafine/RemindDialog.java
index fe894437d7..e2d7b63c9f 100644
--- a/designer-base/src/main/java/com/fr/design/actions/help/alphafine/RemindDialog.java
+++ b/designer-base/src/main/java/com/fr/design/actions/help/alphafine/RemindDialog.java
@@ -31,7 +31,7 @@ public class RemindDialog extends UIDialog {
@Override
public void checkValid() throws Exception {
-
+ // Do nothing
}
public RemindPane getRemindPane() {
diff --git a/designer-base/src/main/java/com/fr/design/actions/help/alphafine/RemindPane.java b/designer-base/src/main/java/com/fr/design/actions/help/alphafine/RemindPane.java
index 7591c2af3d..1d8d99266e 100644
--- a/designer-base/src/main/java/com/fr/design/actions/help/alphafine/RemindPane.java
+++ b/designer-base/src/main/java/com/fr/design/actions/help/alphafine/RemindPane.java
@@ -114,6 +114,7 @@ public class RemindPane extends JPanel {
@Override
public void removeLayoutComponent(Component comp) {
+ // Do nothing
}
@Override
@@ -139,6 +140,7 @@ public class RemindPane extends JPanel {
@Override
public void addLayoutComponent(String name, Component comp) {
+ // Do nothing
}
};
}
diff --git a/designer-base/src/main/java/com/fr/design/actions/server/ConnectionListAction.java b/designer-base/src/main/java/com/fr/design/actions/server/ConnectionListAction.java
index 15c6cb705c..50ecd0ea6d 100644
--- a/designer-base/src/main/java/com/fr/design/actions/server/ConnectionListAction.java
+++ b/designer-base/src/main/java/com/fr/design/actions/server/ConnectionListAction.java
@@ -57,49 +57,6 @@ public class ConnectionListAction extends UpdateAction {
osBasedAction.execute();
}
- /* private void openDesignDatabaseManager() {
- DesignerFrame designerFrame = DesignerContext.getDesignerFrame();
- final ConnectionConfig datasourceManager = ConnectionConfig.getInstance();
- final ConnectionManagerPane databaseManagerPane = new ConnectionManagerPane() {
- public void complete() {
- ConnectionConfig connectionConfig = datasourceManager.mirror();
- populate(connectionConfig);
- }
-
- protected void renameConnection(String oldName, String newName) {
- datasourceManager.renameConnection(oldName, newName);
- }
- };
- final BasicDialog databaseListDialog = databaseManagerPane.showLargeWindow(designerFrame, null);
- databaseListDialog.addDialogActionListener(new DialogActionAdapter() {
- public void doOk() {
- if (!databaseManagerPane.isNamePermitted()) {
- databaseListDialog.setDoOKSucceed(false);
- return;
- }
- Configurations.modify(new WorkerFacade(ConnectionConfig.class) {
- @Override
- public void run() {
- databaseManagerPane.update(datasourceManager);
- }
- }.addCallBack(new CallBackAdaptor() {
- @Override
- public boolean beforeCommit() {
- //如果更新失败,则不关闭对话框,也不写xml文件,并且将对话框定位在请重命名的那个对象页面
- return doWithDatasourceManager(datasourceManager, databaseManagerPane, databaseListDialog);
- }
-
- @Override
- public void afterCommit() {
- DesignerContext.getDesignerBean("databasename").refreshBeanElement();
- }
- }));
- }
- });
- databaseListDialog.setVisible(true);
- }
-*/
-
/**
* 更新datasourceManager
*
diff --git a/designer-base/src/main/java/com/fr/design/actions/server/PluginManagerAction.java b/designer-base/src/main/java/com/fr/design/actions/server/PluginManagerAction.java
index 7b41f6fd81..d000dbbbb0 100644
--- a/designer-base/src/main/java/com/fr/design/actions/server/PluginManagerAction.java
+++ b/designer-base/src/main/java/com/fr/design/actions/server/PluginManagerAction.java
@@ -16,7 +16,6 @@ import java.awt.event.ActionEvent;
* @since 8.0
*/
public class PluginManagerAction extends UpdateAction {
- private static String PLUGIN_MANAGER_ROUTE = "#management/plugin";
public PluginManagerAction() {
this.setMenuKeySet(PLUGIN_MANAGER);
this.setName(getMenuKeySet().getMenuKeySetName());
diff --git a/designer-base/src/main/java/com/fr/design/condition/ContinuousTreeSelectionModel.java b/designer-base/src/main/java/com/fr/design/condition/ContinuousTreeSelectionModel.java
index 69d3a51aa8..8e83255cf3 100644
--- a/designer-base/src/main/java/com/fr/design/condition/ContinuousTreeSelectionModel.java
+++ b/designer-base/src/main/java/com/fr/design/condition/ContinuousTreeSelectionModel.java
@@ -16,8 +16,6 @@ import com.fr.design.utils.gui.GUICoreUtils;
* 一个层次连续节点.
*/
public class ContinuousTreeSelectionModel extends DefaultTreeSelectionModel {
- public ContinuousTreeSelectionModel() {
- }
public void addSelectionPaths(TreePath[] paths) {
if (paths == null || paths.length == 0) {
diff --git a/designer-base/src/main/java/com/fr/design/constants/UIConstants.java b/designer-base/src/main/java/com/fr/design/constants/UIConstants.java
index 1e119d27ed..15a7c87c08 100644
--- a/designer-base/src/main/java/com/fr/design/constants/UIConstants.java
+++ b/designer-base/src/main/java/com/fr/design/constants/UIConstants.java
@@ -145,7 +145,6 @@ public interface UIConstants {
public static final Color LIST_ITEM_SPLIT_LINE = new Color(0xf0f0f3);
-
public static final BufferedImage DRAG_BAR = IOUtils.readImage("com/fr/design/images/control/bar.png");
public static final BufferedImage DRAG_BAR_LIGHT = IOUtils.readImage("com/fr/design/images/control/bar-light.png");
public static final BufferedImage ARROW_NORTH = IOUtils.readImage("com/fr/design/images/control/up_arrow.png");
@@ -196,6 +195,7 @@ public interface UIConstants {
public static final Icon ANA_SMALL_ICON = IOUtils.readIcon("com/fr/design/images/buttonicon/anas.png");
public static final Icon REFRESH_ICON = IOUtils.readIcon("com/fr/design/images/buttonicon/refresh.png");
public static final Icon FONT_ICON = IOUtils.readIcon("/com/fr/design/images/gui/color/foreground.png");
+ public static final Icon AUTO_FONT_ICON = IOUtils.readIcon("/com/fr/design/images/gui/color/autoForeground.png");
public static final Icon HISTORY_ICON = IOUtils.readIcon("com/fr/design/images/buttonicon/history.png");
public static final Icon DELETE_ICON = IOUtils.readIcon("com/fr/design/images/m_file/close.png");
public static final Icon EDIT_ICON = IOUtils.readIcon("com/fr/design/images/m_file/edit.png");
diff --git a/designer-base/src/main/java/com/fr/design/data/BasicTableDataTreePane.java b/designer-base/src/main/java/com/fr/design/data/BasicTableDataTreePane.java
index 313ca0e2f7..45b3ac6a2a 100644
--- a/designer-base/src/main/java/com/fr/design/data/BasicTableDataTreePane.java
+++ b/designer-base/src/main/java/com/fr/design/data/BasicTableDataTreePane.java
@@ -272,10 +272,12 @@ public abstract class BasicTableDataTreePane extends DockingView implements Resp
*/
@Override
public void editingCanceled(ChangeEvent e) {
+ // Do nothing
}
@Override
public void editingStopped(ChangeEvent e) {
+ // Do nothing
}
}
diff --git a/designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java b/designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java
index a84e1337b7..dc7002fa85 100644
--- a/designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java
+++ b/designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java
@@ -248,6 +248,15 @@ public abstract class DesignTableDataManager {
}
}
+ public static String[] getDsColumnNames(String dsName) {
+ TableDataSource dataSource = getEditingTableDataSource();
+ Map map = columnCache.get(dataSource);
+ if (map == null) {
+ return new String[0];
+ }
+ return map.get(dsName);
+ }
+
/**
* august:返回当前正在编辑的具有报表数据源的模板(基本报表、聚合报表) 包括 : 图表模板
*
diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java b/designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java
index b734968b36..eda6414671 100644
--- a/designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java
+++ b/designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java
@@ -104,10 +104,12 @@ public class ChoosePane extends BasicBeanPane implements Refresha
@Override
public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
+ // Do nothing
}
@Override
public void popupMenuCanceled(PopupMenuEvent e) {
+ // Do nothing
}
};
@@ -115,10 +117,12 @@ public class ChoosePane extends BasicBeanPane implements Refresha
private PopupMenuListener listener = new PopupMenuListener() {
@Override
public void popupMenuCanceled(PopupMenuEvent e) {
+ // Do nothing
}
@Override
public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
+ // Do nothing
}
@Override
@@ -200,6 +204,7 @@ public class ChoosePane extends BasicBeanPane implements Refresha
}
protected void addFocusListener() {
+ // Do nothing
}
@SuppressWarnings("unchecked")
@@ -493,6 +498,7 @@ public class ChoosePane extends BasicBeanPane implements Refresha
}
protected void failedToFindTable() {
+ // Do nothing
}
protected String getTableName() {
diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/ChoosePaneSupportFormula.java b/designer-base/src/main/java/com/fr/design/data/datapane/ChoosePaneSupportFormula.java
index 0ca42c0f92..14d0431e25 100644
--- a/designer-base/src/main/java/com/fr/design/data/datapane/ChoosePaneSupportFormula.java
+++ b/designer-base/src/main/java/com/fr/design/data/datapane/ChoosePaneSupportFormula.java
@@ -75,6 +75,7 @@ public class ChoosePaneSupportFormula extends ChoosePane {
}
protected void addFocusListener() {
+ // Do nothing
}
/**
diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataPaneListPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataPaneListPane.java
index c3fd5065df..d2fdc32291 100644
--- a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataPaneListPane.java
+++ b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataPaneListPane.java
@@ -69,7 +69,7 @@ public class TableDataPaneListPane extends JListControlPane implements TableData
}
if (nameableList.getSelectedValue() instanceof ListModelElement) {
Nameable selected = ((ListModelElement) nameableList.getSelectedValue()).wrapper;
- if (!ComparatorUtils.equals(tempName, selected.getName())) {
+ if (!ComparatorUtils.equals(tempName, selected.getName()) && !isNameRepeated(new List[]{Arrays.asList(allDSNames), Arrays.asList(allListNames)}, tempName)) {
rename(selected.getName(), tempName);
}
@@ -256,6 +256,7 @@ public class TableDataPaneListPane extends JListControlPane implements TableData
}
protected void checkRepeatedDSName(List exsitTableDataNameList) {
+ // Do nothing
}
/**
diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionTableProcedurePane.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionTableProcedurePane.java
index f6f258285d..4b4d668666 100644
--- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionTableProcedurePane.java
+++ b/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionTableProcedurePane.java
@@ -98,7 +98,7 @@ public class ConnectionTableProcedurePane extends BasicPane {
}
protected void addKeyMonitor() {
-
+ //do nothing
}
protected JPanel createCheckBoxgroupPane() {
@@ -137,7 +137,7 @@ public class ConnectionTableProcedurePane extends BasicPane {
/**
* 给 itemComboBox 加上 itemListener
- *
+ *
* @param itemListener
*/
public void addItemListener(ItemListener itemListener) {
@@ -214,7 +214,7 @@ public class ConnectionTableProcedurePane extends BasicPane {
public static interface DoubleClickSelectedNodeOnTreeListener {
/**
* 处理双击事件
- *
+ *
* @param target
*/
public void actionPerformed(TableProcedure target);
diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTableModel.java b/designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTableModel.java
index 6be5657bbd..575ba43f5b 100644
--- a/designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTableModel.java
+++ b/designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTableModel.java
@@ -140,8 +140,6 @@ public class PreviewTableModel extends AbstractTableModel {
* 就是由于预览的JTable在不停的getRowCount来显示数据.
*/
private static class ErrorResultSet extends AbstractDataModel {
- public ErrorResultSet() {
- }
public int getRowCount() {
return 0;
@@ -160,6 +158,7 @@ public class PreviewTableModel extends AbstractTableModel {
}
public void release() throws Exception {
+ // Do nothing
}
}
diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/AutoStoreProcedureTableModel.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/AutoStoreProcedureTableModel.java
index a3248ba1d8..3336596591 100644
--- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/AutoStoreProcedureTableModel.java
+++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/AutoStoreProcedureTableModel.java
@@ -38,6 +38,7 @@ public class AutoStoreProcedureTableModel extends StoreProcedureTableModel {
this.setDefaultEditor(ParameterTableModel.ParameterEditor.class, new ParameterTableModel().new ParameterEditor());
this.setDefaultRenderer(StoreProcedureParameterValueEditor.class, new ProcedureParameterValueRenderer());
}
+ @Override
public boolean isCellEditable(int row, int col) {
if (ComparatorUtils.equals(getValueAt(row, col -1), "OUT")) {
return false;
@@ -48,6 +49,7 @@ public class AutoStoreProcedureTableModel extends StoreProcedureTableModel {
return false;
}
+ @Override
public boolean shouldResponseDoubleClickAction () {
return false;
}
@@ -60,7 +62,7 @@ public class AutoStoreProcedureTableModel extends StoreProcedureTableModel {
editor = ValueEditorPaneFactory.createStoreProcedValueEditorPane();
editor.getMenu().addPopupMenuListener(new PopupMenuListener() {
public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
-
+ // Do nothing
}
public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
@@ -77,15 +79,16 @@ public class AutoStoreProcedureTableModel extends StoreProcedureTableModel {
}, 100);
}
+ @Override
public void popupMenuCanceled(PopupMenuEvent e) {
-
+ //do nothing
}
});
this.addCellEditorListener(new CellEditorListener() {
@Override
public void editingCanceled(ChangeEvent e) {
-
+ //do nothing
}
@Override
@@ -147,6 +150,7 @@ public class AutoStoreProcedureTableModel extends StoreProcedureTableModel {
editor = ValueEditorPaneFactory.createStoreProcedValueEditorPane();
}
+ @Override
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
editor.setCurrentEditor(0);
editor.populate(value);
diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ClassTableDataPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ClassTableDataPane.java
index 7cd8dec3e8..b454ddd89f 100644
--- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ClassTableDataPane.java
+++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/ClassTableDataPane.java
@@ -57,8 +57,10 @@ public class ClassTableDataPane extends AbstractTableDataPane {
(Dialog) SwingUtilities.getWindowAncestor(ClassTableDataPane.this),
new DialogActionAdapter() {
public void doOk() {
- classNameTextField.setText(bPane.getClassPath());
- }
+ String classPath = bPane.getClassPath();
+ ClassTableData tableData = new ClassTableData(classPath);
+ populateBean(tableData);
+ }
});
dlg.setVisible(true);
}
@@ -124,6 +126,7 @@ public class ClassTableDataPane extends AbstractTableDataPane {
this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/buttonicon/add.png"));
}
+ @Override
public void actionPerformed(ActionEvent e) {
java.util.List oldParas = editorPane.update();
oldParas.add(new Parameter());
@@ -132,6 +135,7 @@ public class ClassTableDataPane extends AbstractTableDataPane {
@Override
public void checkEnabled() {
+ //do nothing
}
}
private class RemoveParaAction extends UITableEditAction {
@@ -149,6 +153,7 @@ public class ClassTableDataPane extends AbstractTableDataPane {
@Override
public void checkEnabled() {
+ //do nothing
}
}
diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/CustomDictModel.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/CustomDictModel.java
index fdf44df23e..3d9fbad2ad 100644
--- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/CustomDictModel.java
+++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/CustomDictModel.java
@@ -1,22 +1,21 @@
package com.fr.design.data.tabledata.tabledatapane;
-import java.awt.Component;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.util.ArrayList;
-import java.util.List;
+import com.fr.design.gui.itableeditorpane.ActionStyle;
+import com.fr.design.gui.itableeditorpane.UIArrayTableModel;
+import com.fr.design.gui.itableeditorpane.UITableEditAction;
+import com.fr.design.gui.itableeditorpane.UITableModelAdapter;
+import com.fr.design.gui.itextfield.UITextField;
import javax.swing.AbstractCellEditor;
import javax.swing.JTable;
import javax.swing.event.CellEditorListener;
import javax.swing.event.ChangeEvent;
import javax.swing.table.TableCellEditor;
-
-import com.fr.design.gui.itableeditorpane.ActionStyle;
-import com.fr.design.gui.itableeditorpane.UIArrayTableModel;
-import com.fr.design.gui.itableeditorpane.UITableEditAction;
-import com.fr.design.gui.itableeditorpane.UITableModelAdapter;
-import com.fr.design.gui.itextfield.UITextField;
+import java.awt.Component;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.ArrayList;
+import java.util.List;
public class CustomDictModel extends UITableModelAdapter