Browse Source

Merging in latest from upstream (DESIGN/design:refs/heads/release/10.0)

* commit '157b12d0b9f298b7c265563b56e8314e2665cd15':
  REPORT-9113 设计器菜单栏-文件-远程服务器配置界面需要增加默认值 REPORT-9082 设计器菜单栏-文件-远程设计下增加新的远程服务器,配置界面显示已存在的配置信息
  REPORT-9845 & REPORT-9849 & REPORT-9883
  REPORT-9845 & REPORT-9849 & REPORT-9883
  REPORT-9843 【10.0二轮回归】ie9及以上版本,预览添加css样式的模板,样式不加载
  CORE-113 功能点监控,全部使用注解 @Focus来实现
  。
  REPORT-9856【10.0二轮回归】远程设计用户名密码错误时提示不明确
  .
  REPORT-9565 部署集成-远程-设计器上方路径显示异常
master
zheng 7 years ago
parent
commit
12029ce842
  1. 2
      designer-base/src/main/java/com/fr/design/actions/file/SwitchExistEnv.java
  2. 5
      designer-base/src/main/java/com/fr/design/file/HistoryTemplateListPane.java
  3. 27
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java
  4. 2
      designer-base/src/main/java/com/fr/design/mainframe/TemplatePane.java
  5. 13
      designer-base/src/main/java/com/fr/env/RemoteEnvPane.java
  6. 17
      designer-base/src/main/java/com/fr/start/server/FineEmbedServerActivator.java
  7. 16
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java
  8. 9
      designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/DrillMapDataPane.java
  9. 9
      designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/EachLayerDataDefinitionPane.java
  10. 20
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ChartEditorDefinePane.java
  11. 5
      designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java
  12. 6
      designer-realize/src/main/java/com/fr/grid/selection/FloatSelection.java
  13. 7
      designer-realize/src/main/java/com/fr/quickeditor/floatquick/FloatStringQuickEditor.java

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

@ -125,7 +125,7 @@ public class SwitchExistEnv extends MenuDef {
}
});
} catch (AuthException exception) {
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText(new String[]{"Fine-Designer_Basic_Remote_Connect_Auth_Failed", "Failed"}),
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("Fine-Designer_Basic_Remote_Connect_Auth_Failed"),
null, 0, UIManager.getIcon("OptionPane.errorIcon"));
}
}

5
designer-base/src/main/java/com/fr/design/file/HistoryTemplateListPane.java

@ -246,8 +246,9 @@ public class HistoryTemplateListPane extends JPanel implements FileOperations, C
*/
public int contains(String filename) {
for (int i = 0; i < historyList.size(); i++) {
String historyPath = historyList.get(i).getPath();
if (ComparatorUtils.equals(historyPath, filename)) {
String historyPath = historyList.get(i).getPath().replaceAll("/", "\\\\");
//文件路径是全路径,历史路径是reportlets/模板名
if (filename.endsWith(historyPath)) {
return i;
}
}

27
designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java

@ -51,14 +51,30 @@ import com.fr.stable.CoreConstants;
import com.fr.stable.OperatingSystem;
import com.fr.stable.ProductConstants;
import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils;
import com.fr.stable.image4j.codec.ico.ICODecoder;
import com.fr.stable.project.ProjectConstants;
import com.fr.workspace.WorkContext;
import com.fr.workspace.Workspace;
import javax.swing.*;
import com.fr.workspace.connect.WorkspaceConnection;
import javax.swing.Icon;
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JLayeredPane;
import javax.swing.JMenuBar;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.WindowConstants;
import javax.swing.border.MatteBorder;
import java.awt.*;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Graphics;
import java.awt.Insets;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.Toolkit;
import java.awt.datatransfer.DataFlavor;
import java.awt.datatransfer.Transferable;
import java.awt.dnd.DnDConstants;
@ -721,8 +737,9 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
DesignerWorkspaceInfo info = DesignerEnvManager.getEnvManager().getWorkspaceInfo(envName);
String username = null;
if (info != null){
username = info.getName();
if (info != null) {
WorkspaceConnection connection = info.getConnection();
username = connection == null ? StringUtils.EMPTY : connection.getUserName();
}
defaultTitleSB.append(username).append("@").append(envName).append("[").append(workspace.getDescription()).append("]");
if (editingTemplate != null) {

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

@ -153,7 +153,7 @@ public class TemplatePane extends JPanel implements MouseListener {
}
setJLabel(selectedName);
} catch (AuthException e) {
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText(new String[]{"Fine-Designer_Basic_Remote_Connect_Auth_Failed", "Failed"}),
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("Fine-Designer_Basic_Remote_Connect_Auth_Failed"),
null, 0, UIManager.getIcon("OptionPane.errorIcon"));
return false;
}

13
designer-base/src/main/java/com/fr/env/RemoteEnvPane.java vendored

@ -16,12 +16,14 @@ import com.fr.general.Inter;
import com.fr.stable.StringUtils;
import com.fr.third.guava.base.Strings;
import com.fr.workspace.WorkContext;
import com.fr.workspace.connect.AuthException;
import com.fr.workspace.connect.WorkspaceConnection;
import javax.swing.BorderFactory;
import javax.swing.BoxLayout;
import javax.swing.JDialog;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTextPane;
import javax.swing.SwingConstants;
@ -277,6 +279,10 @@ public class RemoteEnvPane extends BasicBeanPane<RemoteDesignerWorkspaceInfo> {
this.certPathInput.setText(certPath);
this.certSecretKeyInput.setText(certSecretKey);
} else {
this.remoteEnvURL = RemoteEnvURL.createDefaultURL();
this.usernameInput.setText(StringUtils.EMPTY);
this.passwordInput.setText(StringUtils.EMPTY);
}
fillRemoteEnvURLField();
@ -488,8 +494,13 @@ public class RemoteEnvPane extends BasicBeanPane<RemoteDesignerWorkspaceInfo> {
WorkspaceConnection connection = remoteEnv.getConnection();
DesignerEnvManager.getEnvManager().setCertificatePath(connection.getCertPath());
DesignerEnvManager.getEnvManager().setCertificatePass(connection.getCertSecretKey());
try {
return WorkContext.getConnector().testConnection(connection);
} catch (AuthException e) {
message.setText(Inter.getLocText("Fine-Designer_Basic_Remote_Connect_Auth_Failed"));
uiLabel.setIcon(UIManager.getIcon("OptionPane.errorIcon"));
return null;
}
}
@Override

17
designer-base/src/main/java/com/fr/start/server/FineEmbedServerActivator.java

@ -12,8 +12,6 @@ import com.fr.third.springframework.web.context.support.AnnotationConfigWebAppli
import com.fr.workspace.WorkContext;
import org.apache.catalina.Context;
import org.apache.catalina.LifecycleException;
import org.apache.catalina.Wrapper;
import org.apache.catalina.loader.WebappLoader;
import org.apache.catalina.startup.Tomcat;
@ -62,7 +60,7 @@ public class FineEmbedServerActivator extends Activator {
String docBase = new File(WorkContext.getCurrent().getPath()).getParent();
String appName = "/" + FRContext.getCommonOperator().getAppName();
Context context = tomcat.addContext(appName, docBase);
addDefaultServlet(context);
Tomcat.initWebappDefaults(context);
//覆盖tomcat的WebAppClassLoader
context.setLoader(new FRTomcatLoader());
@ -73,19 +71,6 @@ public class FineEmbedServerActivator extends Activator {
context.addServletContainerInitializer(initializer, classes);
}
private void addDefaultServlet(Context context) {
Wrapper defaultServlet = context.createWrapper();
defaultServlet.setName("default");
defaultServlet.setServletClass("org.apache.catalina.servlets.DefaultServlet");
defaultServlet.addInitParameter("debug", "0");
defaultServlet.addInitParameter("listings", "false");
defaultServlet.setLoadOnStartup(1);
defaultServlet.setOverridable(true);
context.addChild(defaultServlet);
context.addServletMapping("/","default");
}
private void stopServerActivator() {

16
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java

@ -18,21 +18,12 @@ import com.fr.design.gui.imenutable.UIMenuNameableCreator;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.mainframe.chart.gui.ChartTypePane.ComboBoxPane;
import com.fr.general.ComparatorUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.general.Inter;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
import javax.swing.BorderFactory;
import javax.swing.BoxLayout;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Graphics;
import java.awt.GridLayout;
import java.awt.Image;
import java.awt.Rectangle;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.FocusEvent;
@ -140,7 +131,6 @@ public class ChartTypeButtonPane extends BasicBeanPane<ChartCollection> implemen
try {
Chart newChart = (Chart) chart.clone();
editingCollection.addNamedChart(name, newChart);
editingCollection.addFunctionRecord(newChart);
} catch (CloneNotSupportedException e1) {
FineLoggerFactory.getLogger().error("Error in Clone");
}

9
designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/DrillMapDataPane.java

@ -1,6 +1,5 @@
package com.fr.van.chart.drillmap.designer.data.comp;
import com.fr.base.chart.BaseChart;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.beans.BasicBeanPane;
@ -13,7 +12,7 @@ import com.fr.plugin.chart.drillmap.data.DrillMapDefinition;
import com.fr.plugin.chart.type.MapType;
import com.fr.van.chart.map.designer.data.MapDataPaneHelper;
import java.awt.BorderLayout;
import java.awt.*;
import java.util.ArrayList;
import java.util.List;
@ -102,11 +101,7 @@ public class DrillMapDataPane extends BasicBeanPane<ChartCollection> {
}
if(dataDefinitionType.getSelectedIndex() == 0){
drillMapDefinition.setFromBottomData(true);
ChartCollection temp = new ChartCollection(new Chart()){
@Override
public void addFunctionRecord(BaseChart chart) {
}
};
ChartCollection temp = new ChartCollection(new Chart());
bottomDataDefinitionPane.updateBean(temp);
drillMapDefinition.setBottomDataDefinition(temp.getSelectedChart().getFilterDefinition());
} else {

9
designer-chart/src/main/java/com/fr/van/chart/drillmap/designer/data/comp/EachLayerDataDefinitionPane.java

@ -1,6 +1,5 @@
package com.fr.van.chart.drillmap.designer.data.comp;
import com.fr.base.chart.BaseChart;
import com.fr.base.chart.chartdata.TopDefinitionProvider;
import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.ChartCollection;
@ -18,7 +17,7 @@ import com.fr.plugin.chart.type.MapType;
import com.fr.van.chart.map.designer.data.MapDataPaneHelper;
import javax.swing.tree.DefaultMutableTreeNode;
import java.awt.CardLayout;
import java.awt.*;
import java.util.ArrayList;
import java.util.List;
@ -116,11 +115,7 @@ public class EachLayerDataDefinitionPane extends MultiTabPane<ChartCollection> {
List<TopDefinitionProvider> eachLayerDataDefinitionList = new ArrayList<TopDefinitionProvider>();
for(BasicPane basicPane : paneList){
if(basicPane instanceof SingleLayerDataDefinitionPane){
ChartCollection temp = new ChartCollection(new Chart()){
@Override
public void addFunctionRecord(BaseChart chart) {
}
};
ChartCollection temp = new ChartCollection(new Chart());
((SingleLayerDataDefinitionPane) basicPane).updateBean(temp);
eachLayerDataDefinitionList.add(temp.getSelectedChart().getFilterDefinition());
}

20
designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ChartEditorDefinePane.java

@ -18,20 +18,12 @@ import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.FormDesigner;
import com.fr.design.mainframe.WidgetPropertyPane;
import com.fr.form.FormFunctionProcessor;
import com.fr.form.ui.BaseChartEditor;
import com.fr.form.ui.container.WFitLayout;
import com.fr.general.Inter;
import com.fr.plugin.ExtraClassManager;
import com.fr.stable.fun.FunctionProcessor;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Container;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
@ -175,11 +167,7 @@ public class ChartEditorDefinePane extends MobileWidgetDefinePane {
updateTipLabel();
ChartMobileFitAttrState selectedAttr = (ChartMobileFitAttrState)((Item)e.getItem()).getValue();
if (selectedAttr.getState() != ChartMobileFitAttrState.AUTO.getState()) {
// 功能埋点
FunctionProcessor processor = ExtraClassManager.getInstance().getFunctionProcessor();
if (processor != null) {
processor.recordFunction(FormFunctionProcessor.MOBILE_CHART_ADAPTIVITY);
}
}
}
});

5
designer-realize/src/main/java/com/fr/design/mainframe/socketio/DesignerSocketIO.java

@ -3,6 +3,7 @@ package com.fr.design.mainframe.socketio;
import com.fr.config.RemoteConfigEvent;
import com.fr.decision.webservice.utils.DecisionServiceConstants;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.TemplatePane;
import com.fr.design.mainframe.loghandler.DesignerLogHandler;
import com.fr.event.EventDispatcher;
import com.fr.general.Inter;
@ -14,6 +15,7 @@ import com.fr.third.guava.base.Optional;
import com.fr.workspace.WorkContext;
import com.fr.workspace.Workspace;
import com.fr.workspace.base.WorkspaceConstants;
import com.fr.workspace.engine.connector.FineWorkspaceConnector;
import com.fr.workspace.engine.server.rpc.netty.RemoteCallClient;
import com.fr.workspace.server.socket.SocketInfoOperator;
import io.socket.client.IO;
@ -79,8 +81,9 @@ public class DesignerSocketIO {
@Override
public void call(Object... objects) {
if (status != Status.Disconnecting) {
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText(new String[]{"Fine-Designer_Basic_Remote_Disconnected"}),
JOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Inter.getLocText("Fine-Designer_Basic_Remote_Disconnected"),
null, 0, UIManager.getIcon("OptionPane.errorIcon"));
TemplatePane.getInstance().editItems();
}
status = Status.Disconnected;
}

6
designer-realize/src/main/java/com/fr/grid/selection/FloatSelection.java

@ -235,7 +235,11 @@ public class FloatSelection extends Selection {
public QuickEditor getQuickEditor(TargetComponent tc) {
ElementCasePane ePane = (ElementCasePane) tc;
FloatElement selectedFloat = ePane.getEditingElementCase().getFloatElement(selectedFloatName);
Object value = selectedFloat.getValue();
Object value = null;
//处理撤销时npe
if(selectedFloat != null) {
value = selectedFloat.getValue();
}
value = value == null ? "" : value;
value = value instanceof Number ? value.toString() : value;
QuickEditor editor = ActionFactory.getFloatEditor(value.getClass());

7
designer-realize/src/main/java/com/fr/quickeditor/floatquick/FloatStringQuickEditor.java

@ -90,7 +90,12 @@ public class FloatStringQuickEditor extends FloatQuickEditor {
@Override
protected void refreshDetails() {
String str;
Object value = floatElement.getValue();
Object value = null;
//处理撤销时npe
if (floatElement != null){
value = floatElement.getValue();
}
if (value == null) {
str = StringUtils.EMPTY;
} else if (value instanceof BaseFormula) {

Loading…
Cancel
Save