Browse Source

Merge branch 'release/9.0' of http://cloud.finedevelop.com:2015/scm/~neil/design into release/9.0

master
neil 7 years ago
parent
commit
68de8fe783
  1. 36
      designer/src/com/fr/design/module/DesignerModule.java
  2. 91
      designer_base/src/com/fr/design/actions/core/ActionFactory.java
  3. BIN
      designer_base/src/com/fr/design/images/edit/format.png
  4. 333
      designer_base/src/com/fr/design/javascript/JSContentPane.java
  5. 1
      designer_base/src/com/fr/design/locale/designer.properties
  6. 1
      designer_base/src/com/fr/design/locale/designer_en_US.properties
  7. 1
      designer_base/src/com/fr/design/locale/designer_ja_JP.properties
  8. 1
      designer_base/src/com/fr/design/locale/designer_ko_KR.properties
  9. 1
      designer_base/src/com/fr/design/locale/designer_zh_CN.properties
  10. 1
      designer_base/src/com/fr/design/locale/designer_zh_TW.properties
  11. 2
      designer_base/src/com/fr/design/mainframe/DesignerFrame.java
  12. 7
      designer_base/src/com/fr/design/mainframe/JTemplate.java

36
designer/src/com/fr/design/module/DesignerModule.java

@ -141,22 +141,22 @@ public class DesignerModule extends DesignModule {
*/ */
private void registerCellEditor() { private void registerCellEditor() {
ActionFactory.registerCellEditor(String.class, new CellStringQuickEditor()); ActionFactory.registerCellEditorClass(String.class, CellStringQuickEditor.class);
ActionFactory.registerCellEditor(Number.class, new CellStringQuickEditor()); ActionFactory.registerCellEditorClass(Number.class, CellStringQuickEditor.class);
ActionFactory.registerCellEditor(BaseFormula.class, new CellFormulaQuickEditor()); ActionFactory.registerCellEditorClass(BaseFormula.class, CellFormulaQuickEditor.class);
ActionFactory.registerCellEditor(SubReport.class, new CellSubReportEditor()); ActionFactory.registerCellEditorClass(SubReport.class, CellSubReportEditor.class);
ActionFactory.registerCellEditor(RichText.class, new CellRichTextEditor()); ActionFactory.registerCellEditorClass(RichText.class, CellRichTextEditor.class);
ActionFactory.registerCellEditor(DSColumn.class, new CellDSColumnEditor()); ActionFactory.registerCellEditorClass(DSColumn.class, CellDSColumnEditor.class);
ActionFactory.registerCellEditor(Image.class, new CellImageQuickEditor()); ActionFactory.registerCellEditorClass(Image.class, CellImageQuickEditor.class);
ActionFactory.registerCellEditor(BiasTextPainter.class, new CellBiasTextPainterEditor()); ActionFactory.registerCellEditorClass(BiasTextPainter.class, CellBiasTextPainterEditor.class);
ActionFactory.registerCellEditor(BufferedImage.class, new CellImageQuickEditor()); ActionFactory.registerCellEditorClass(BufferedImage.class, CellImageQuickEditor.class);
ActionFactory.registerChartCellEditorInEditor(new BasicChartQuickEditor()); ActionFactory.registerChartCellEditorInEditor(BasicChartQuickEditor.class);
Set<ElementUIProvider> providers = ExtraDesignClassManager.getInstance().getArray(ElementUIProvider.MARK_STRING); Set<ElementUIProvider> providers = ExtraDesignClassManager.getInstance().getArray(ElementUIProvider.MARK_STRING);
for (ElementUIProvider provider : providers) { for (ElementUIProvider provider : providers) {
try { try {
ActionFactory.registerCellEditor(provider.targetObjectClass(), provider.quickEditor().newInstance()); ActionFactory.registerCellEditorClass(provider.targetObjectClass(), provider.quickEditor());
} catch (Exception e) { } catch (Exception e) {
FRLogger.getLogger().error(e.getMessage(), e); FRLogger.getLogger().error(e.getMessage(), e);
} }
@ -173,13 +173,13 @@ public class DesignerModule extends DesignModule {
* kunnat: 注册悬浮选中Editor * kunnat: 注册悬浮选中Editor
*/ */
private void registerFloatEditor() { private void registerFloatEditor() {
ActionFactory.registerFloatEditor(String.class, new FloatStringQuickEditor());
ActionFactory.registerFloatEditor(Formula.class, new FloatStringQuickEditor());
ActionFactory.registerFloatEditor(Image.class, new FloatImageQuickEditor());
ActionFactory.registerFloatEditor(BufferedImage.class, new FloatImageQuickEditor());
ActionFactory.registerChartFloatEditorInEditor(new FloatChartQuickEditor()); ActionFactory.registerFloatEditorClass(String.class, FloatStringQuickEditor.class);
ActionFactory.registerFloatEditorClass(Formula.class, FloatStringQuickEditor.class);
ActionFactory.registerFloatEditorClass(Image.class, FloatImageQuickEditor.class);
ActionFactory.registerFloatEditorClass(BufferedImage.class, FloatImageQuickEditor.class);
ActionFactory.registerChartFloatEditorInEditor(FloatChartQuickEditor.class);
} }
/** /**

91
designer_base/src/com/fr/design/actions/core/ActionFactory.java

@ -30,15 +30,25 @@ import java.util.concurrent.ConcurrentMap;
public class ActionFactory { public class ActionFactory {
private static LinkedHashSet<Class<?>> actionClasses = new LinkedHashSet<>(); private static LinkedHashSet<Class<?>> actionClasses = new LinkedHashSet<>();
private static LinkedHashSet<Class<?>> floatActionClasses = new LinkedHashSet<>(); private static LinkedHashSet<Class<?>> floatActionClasses = new LinkedHashSet<>();
private static Class chartCollectionClass = null;
/** /**
* 悬浮元素编辑器 * 无需每次实例化的悬浮元素编辑器
*/ */
private static ConcurrentMap<Class, QuickEditor> floatEditor = new ConcurrentHashMap<>(); private static ConcurrentMap<Class, QuickEditor> floatEditor = new ConcurrentHashMap<>();
private static Class chartCollectionClass = null;
/** /**
* 单元格元素编辑器 * 无需每次实例化的单元格元素编辑器
*/ */
private static ConcurrentMap<Class, QuickEditor> cellEditor = new ConcurrentHashMap<>(); private static ConcurrentMap<Class, QuickEditor> cellEditor = new ConcurrentHashMap<>();
/**
* 需要每次实例化的悬浮元素编辑器
*/
private static ConcurrentMap<Class, Class<? extends QuickEditor>> floatEditorClass = new ConcurrentHashMap<>();
/**
* 需要每次实例化的单元格元素编辑器
*/
private static ConcurrentMap<Class, Class<? extends QuickEditor>> cellEditorClass = new ConcurrentHashMap<>();
private static UpdateAction chartPreStyleAction = null; private static UpdateAction chartPreStyleAction = null;
private static UpdateAction chartMapEditorAction = null; private static UpdateAction chartMapEditorAction = null;
@ -46,7 +56,7 @@ public class ActionFactory {
} }
/** /**
* 注册单元格编辑器 * 注册无需每次实例化的单元格元素编辑器
* *
* @param clazz 单元格属性类型 * @param clazz 单元格属性类型
* @param editor 单元格编辑器实例 * @param editor 单元格编辑器实例
@ -57,7 +67,7 @@ public class ActionFactory {
/** /**
* 注册悬浮元素编辑器 * 注册无需每次实例化的悬浮元素编辑器
* *
* @param clazz 悬浮元素类型 * @param clazz 悬浮元素类型
* @param editor 悬浮元素编辑器实例 * @param editor 悬浮元素编辑器实例
@ -66,6 +76,28 @@ public class ActionFactory {
floatEditor.put(clazz, editor); floatEditor.put(clazz, editor);
} }
/**
* 注册需要每次实例化的单元格元素编辑器
*
* @param clazz 单元格属性类型
* @param editorClass 单元格编辑器类
*/
public static void registerCellEditorClass(Class clazz, Class<? extends QuickEditor> editorClass) {
cellEditorClass.put(clazz, editorClass);
}
/**
* 注册需要每次实例化的悬浮元素编辑器
*
* @param clazz 悬浮元素类型
* @param editorClass 悬浮元素编辑器类
*/
public static void registerFloatEditorClass(Class clazz, Class<? extends QuickEditor> editorClass) {
floatEditorClass.put(clazz, editorClass);
}
/** /**
* kunsnat: 图表注册 悬浮元素编辑器 , 因为ChartCollecion和ChartQuickEditor一个在Chart,一个在Designer, 所以分开注册. * kunsnat: 图表注册 悬浮元素编辑器 , 因为ChartCollecion和ChartQuickEditor一个在Chart,一个在Designer, 所以分开注册.
* *
@ -97,22 +129,22 @@ public class ActionFactory {
/** /**
* kunsnat: 图表注册 悬浮元素编辑器 , 因为ChartCollection和ChartQuickEditor一个在Chart,一个在Designer, 所以分开注册. * kunsnat: 图表注册 悬浮元素编辑器 , 因为ChartCollection和ChartQuickEditor一个在Chart,一个在Designer, 所以分开注册.
* *
* @param editor 待说明 * @param editorClass 悬浮元素图表编辑器类
*/ */
public static void registerChartFloatEditorInEditor(QuickEditor editor) { public static void registerChartFloatEditorInEditor(Class<? extends QuickEditor> editorClass) {
if (chartCollectionClass != null) { if (chartCollectionClass != null) {
floatEditor.put(chartCollectionClass, editor); registerFloatEditorClass(chartCollectionClass, editorClass);
} }
} }
/** /**
* kunsnat: 图表注册 悬浮元素编辑器 , 因为ChartCollecion和ChartQuickEditor一个在Chart,一个在Designer, 所以分开注册. * kunsnat: 图表注册 单元格元素编辑器 , 因为ChartCollecion和ChartQuickEditor一个在Chart,一个在Designer, 所以分开注册.
* *
* @param editor 待说明 * @param editorClass 单元格元素图表编辑器类
*/ */
public static void registerChartCellEditorInEditor(QuickEditor editor) { public static void registerChartCellEditorInEditor(Class<? extends QuickEditor> editorClass) {
if (chartCollectionClass != null) { if (chartCollectionClass != null) {
cellEditor.put(chartCollectionClass, editor); registerCellEditorClass(chartCollectionClass, editorClass);
} }
} }
@ -153,7 +185,7 @@ public class ActionFactory {
* @return 编辑器实例 * @return 编辑器实例
*/ */
public static QuickEditor getFloatEditor(Class clazz) { public static QuickEditor getFloatEditor(Class clazz) {
return createEditor(clazz, floatEditor); return createEditor(clazz, floatEditor, floatEditorClass);
} }
/** /**
@ -163,7 +195,7 @@ public class ActionFactory {
* @return 编辑器实例 * @return 编辑器实例
*/ */
public static QuickEditor getCellEditor(Class clazz) { public static QuickEditor getCellEditor(Class clazz) {
return createEditor(clazz, cellEditor); return createEditor(clazz, cellEditor, cellEditorClass);
} }
public static UpdateAction createAction(Class clazz) { public static UpdateAction createAction(Class clazz) {
@ -299,17 +331,40 @@ public class ActionFactory {
return actions.toArray(new UpdateAction[actions.size()]); return actions.toArray(new UpdateAction[actions.size()]);
} }
private static QuickEditor createEditor(Class clazz, Map<Class, QuickEditor> editorMap) { private static QuickEditor createEditor(Class clazz, Map<Class, QuickEditor> editorMap, Map<Class, Class<? extends QuickEditor>> editorClassMap) {
QuickEditor c = findQuickEditorClass(clazz, editorMap); QuickEditor c = findQuickEditor(clazz, editorMap);
if (c == null) { if (c == null) {
FRLogger.getLogger().error("No Such Editor"); Class<? extends QuickEditor> cClazz = findQuickEditorClass(clazz, editorClassMap);
if (cClazz == null) {
FRLogger.getLogger().error("No Such Editor");
return null;
}
try {
Constructor<? extends QuickEditor> constructor = cClazz.getDeclaredConstructor();
constructor.setAccessible(true);
return constructor.newInstance();
} catch (Exception e) {
FRContext.getLogger().error(e.getMessage(), e);
}
return null; return null;
} }
return c; return c;
} }
private static QuickEditor findQuickEditorClass(Class clazz, Map<Class, QuickEditor> editorMap) { private static QuickEditor findQuickEditor(Class clazz, Map<Class, QuickEditor> editorMap) {
QuickEditor c = editorMap.get(clazz); QuickEditor c = editorMap.get(clazz);
if (c == null) {
Class superClazz = clazz.getSuperclass();
if (superClazz == null) {
return null;
}
return findQuickEditor(superClazz, editorMap);
}
return c;
}
private static Class<? extends QuickEditor> findQuickEditorClass(Class clazz, Map<Class, Class<? extends QuickEditor>> editorMap) {
Class<? extends QuickEditor> c = editorMap.get(clazz);
if (c == null) { if (c == null) {
Class superClazz = clazz.getSuperclass(); Class superClazz = clazz.getSuperclass();
if (superClazz == null) { if (superClazz == null) {

BIN
designer_base/src/com/fr/design/images/edit/format.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 463 B

333
designer_base/src/com/fr/design/javascript/JSContentPane.java

@ -1,148 +1,187 @@
package com.fr.design.javascript; package com.fr.design.javascript;
import com.fr.design.constants.KeyWords; import com.fr.design.DesignerEnvManager;
import com.fr.design.DesignerEnvManager; import com.fr.design.constants.KeyWords;
import com.fr.design.gui.autocomplete.*; import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.autocomplete.AutoCompletion;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.autocomplete.BasicCompletion;
import com.fr.design.gui.syntax.ui.rsyntaxtextarea.RSyntaxTextArea; import com.fr.design.gui.autocomplete.CompletionProvider;
import com.fr.design.gui.syntax.ui.rsyntaxtextarea.SyntaxConstants; import com.fr.design.gui.autocomplete.DefaultCompletionProvider;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.gui.autocomplete.ShorthandCompletion;
import com.fr.design.dialog.BasicPane; import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilable.UILabel;
import javax.swing.*; import com.fr.design.gui.syntax.ui.rsyntaxtextarea.RSyntaxTextArea;
import java.awt.*; import com.fr.design.gui.syntax.ui.rsyntaxtextarea.SyntaxConstants;
import java.util.ArrayList; import com.fr.design.javascript.beautify.JavaScriptFormatHelper;
import com.fr.design.layout.FRGUIPaneFactory;
public class JSContentPane extends BasicPane { import com.fr.design.utils.gui.GUICoreUtils;
private RSyntaxTextArea contentTextArea; import com.fr.general.IOUtils;
private UILabel funNameLabel; import com.fr.general.Inter;
private int titleWidth = 180; import javax.swing.*;
import java.awt.*;
public JSContentPane(String[] args) { import java.awt.event.MouseAdapter;
this.setLayout(FRGUIPaneFactory.createBorderLayout()); import java.awt.event.MouseEvent;
funNameLabel = new UILabel(); import java.util.ArrayList;
this.setFunctionTitle(args);
this.add(funNameLabel, BorderLayout.NORTH); public class JSContentPane extends BasicPane {
private RSyntaxTextArea contentTextArea;
contentTextArea = new RSyntaxTextArea(); private UILabel funNameLabel;
contentTextArea.setCloseCurlyBraces(true);
contentTextArea.setLineWrap(true); private int titleWidth = 180;
contentTextArea.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_JAVASCRIPT);
contentTextArea.setCodeFoldingEnabled(true); public JSContentPane(String[] args) {
contentTextArea.setAntiAliasingEnabled(true); this.setLayout(FRGUIPaneFactory.createBorderLayout());
funNameLabel = new UILabel();
CompletionProvider provider = createCompletionProvider(); this.setFunctionTitle(args);
AutoCompletion ac = new AutoCompletion(provider); UILabel label = new UILabel(Inter.getLocText("FR-Designer_Format_JavaScript"), IOUtils.readIcon("com/fr/design/images/edit/format.png"), SwingConstants.LEFT);
String shortCuts = DesignerEnvManager.getEnvManager().getAutoCompleteShortcuts(); label.setCursor(new Cursor(Cursor.HAND_CURSOR));
label.setToolTipText(Inter.getLocText("FR-Designer_Format_JavaScript"));
ac.setTriggerKey(convert2KeyStroke(shortCuts)); label.addMouseListener(new MouseAdapter() {
ac.install(contentTextArea); @Override
public void mouseReleased(MouseEvent e) {
UIScrollPane sp = new UIScrollPane(contentTextArea); new SwingWorker<String, Void>() {
this.add(sp, BorderLayout.CENTER); @Override
protected String doInBackground() throws Exception {
UILabel funNameLabel2 = new UILabel(); return JavaScriptFormatHelper.beautify(contentTextArea.getText());
funNameLabel2.setText("}"); }
this.add(funNameLabel2, BorderLayout.SOUTH);
} @Override
protected void done() {
private KeyStroke convert2KeyStroke(String ks) { try {
return KeyStroke.getKeyStroke(ks.replace("+", "pressed")); String text = get();
} contentTextArea.setText(text);
} catch (Exception ignore) {
@Override
protected String title4PopupWindow() { }
return "JS"; }
} }.execute();
}
public void populate(String js) { });
this.contentTextArea.setText(js);
} this.add(GUICoreUtils.createBorderLayoutPane(
funNameLabel, BorderLayout.WEST,
public String update() { label, BorderLayout.EAST
return this.contentTextArea.getText(); ), BorderLayout.NORTH);
}
contentTextArea = new RSyntaxTextArea();
public void setFunctionTitle(String[] args) { contentTextArea.setCloseCurlyBraces(true);
funNameLabel.setText(createFunctionTitle(args)); contentTextArea.setLineWrap(true);
} contentTextArea.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_JAVASCRIPT);
contentTextArea.setCodeFoldingEnabled(true);
public void setFunctionTitle(String[] args, String[] defaultArgs) { contentTextArea.setAntiAliasingEnabled(true);
String[] titles;
if (defaultArgs == null) { CompletionProvider provider = createCompletionProvider();
titles = args;
} else if (args == null) { AutoCompletion ac = new AutoCompletion(provider);
titles = defaultArgs; String shortCuts = DesignerEnvManager.getEnvManager().getAutoCompleteShortcuts();
} else {
ArrayList list = new ArrayList(); ac.setTriggerKey(convert2KeyStroke(shortCuts));
for (String s : defaultArgs) { ac.install(contentTextArea);
list.add(s);
} UIScrollPane sp = new UIScrollPane(contentTextArea);
for (String s : args) { this.add(sp, BorderLayout.CENTER);
list.add(s);
} UILabel funNameLabel2 = new UILabel();
titles = (String[])list.toArray(new String[list.size()]); funNameLabel2.setText("}");
} this.add(funNameLabel2, BorderLayout.SOUTH);
setFunctionTitle(titles); }
}
private KeyStroke convert2KeyStroke(String ks) {
/** return KeyStroke.getKeyStroke(ks.replace("+", "pressed"));
* 用html方便换行 }
*
* @param args @Override
* @return protected String title4PopupWindow() {
*/ return "JS";
private String createFunctionTitle(String[] args) { }
StringBuffer sb = new StringBuffer();
sb.append("<html> <body> <div style='height:16px'>function("); public void populate(String js) {
int width = titleWidth; this.contentTextArea.setText(js);
FontMetrics cellFM = this.getFontMetrics(this.getFont()); }
int tempwidth = 0;
if (args != null) { public String update() {
for (int i = 0; i < args.length; i++) { return this.contentTextArea.getText();
if (args[i] == null) { }
continue;
} public void setFunctionTitle(String[] args) {
if (cellFM.stringWidth(args[i]) < width) { funNameLabel.setText(createFunctionTitle(args));
tempwidth = tempwidth + cellFM.stringWidth(args[i]); }
if (tempwidth < width) {
sb.append(args[i]); public void setFunctionTitle(String[] args, String[] defaultArgs) {
if (i != args.length - 1) { String[] titles;
sb.append(","); if (defaultArgs == null) {
} titles = args;
} else { } else if (args == null) {
tempwidth = 0; titles = defaultArgs;
i = i - 1;// 后退一步 } else {
sb.append("</p><p>&nbsp&nbsp&nbsp&nbsp&nbsp;"); ArrayList list = new ArrayList();
} for (String s : defaultArgs) {
} else { list.add(s);
sb.append("</p><p>&nbsp&nbsp&nbsp&nbsp&nbsp;"); }
sb.append(args[i]); for (String s : args) {
sb.append("</p>"); list.add(s);
} }
} titles = (String[]) list.toArray(new String[list.size()]);
} }
sb.append("){</div><body> </html>"); setFunctionTitle(titles);
return sb.toString(); }
}
/**
private CompletionProvider createCompletionProvider() { * 用html方便换行
*
DefaultCompletionProvider provider = new DefaultCompletionProvider(); * @param args
* @return
for (String key : KeyWords.JAVASCRIPT) { */
provider.addCompletion(new BasicCompletion(provider, key)); private String createFunctionTitle(String[] args) {
} StringBuffer sb = new StringBuffer();
sb.append("<html> <body> <div style='height:16px'>function(");
for (String[] key : KeyWords.JAVASCRIPT_SHORT) { int width = titleWidth;
provider.addCompletion(new ShorthandCompletion(provider, key[0], FontMetrics cellFM = this.getFontMetrics(this.getFont());
key[1], key[1])); int tempwidth = 0;
} if (args != null) {
for (int i = 0; i < args.length; i++) {
return provider; if (args[i] == null) {
continue;
} }
if (cellFM.stringWidth(args[i]) < width) {
tempwidth = tempwidth + cellFM.stringWidth(args[i]);
if (tempwidth < width) {
sb.append(args[i]);
if (i != args.length - 1) {
sb.append(",");
}
} else {
tempwidth = 0;
i = i - 1;// 后退一步
sb.append("</p><p>&nbsp&nbsp&nbsp&nbsp&nbsp;");
}
} else {
sb.append("</p><p>&nbsp&nbsp&nbsp&nbsp&nbsp;");
sb.append(args[i]);
sb.append("</p>");
}
}
}
sb.append("){</div><body> </html>");
return sb.toString();
}
private CompletionProvider createCompletionProvider() {
DefaultCompletionProvider provider = new DefaultCompletionProvider();
for (String key : KeyWords.JAVASCRIPT) {
provider.addCompletion(new BasicCompletion(provider, key));
}
for (String[] key : KeyWords.JAVASCRIPT_SHORT) {
provider.addCompletion(new ShorthandCompletion(provider, key[0],
key[1], key[1]));
}
return provider;
}
} }

1
designer_base/src/com/fr/design/locale/designer.properties

@ -2148,3 +2148,4 @@ FR-Designer_Sheet_Label_Page_Display_Position=
FR-Designer_Provide_Choose_All= FR-Designer_Provide_Choose_All=
FR-Designer_Decimal_Places= FR-Designer_Decimal_Places=
FR-Designer_Env_Des_Https=If HTTPS is enabled or the HTTPS configuration (certificate path, HTTPS key) is modified, you must restart the designer to take effect. FR-Designer_Env_Des_Https=If HTTPS is enabled or the HTTPS configuration (certificate path, HTTPS key) is modified, you must restart the designer to take effect.
FR-Designer_Format_JavaScript=Format Code

1
designer_base/src/com/fr/design/locale/designer_en_US.properties

@ -2147,3 +2147,4 @@ FR-Designer_Sheet_Label_Page_Display_Position=
FR-Designer_Provide_Choose_All= FR-Designer_Provide_Choose_All=
FR-Designer_Decimal_Places= FR-Designer_Decimal_Places=
FR-Designer_Env_Des_Https=If HTTPS is enabled or the HTTPS configuration (certificate path, HTTPS key) is modified, you must restart the designer to take effect. FR-Designer_Env_Des_Https=If HTTPS is enabled or the HTTPS configuration (certificate path, HTTPS key) is modified, you must restart the designer to take effect.
FR-Designer_Format_JavaScript=Format Code

1
designer_base/src/com/fr/design/locale/designer_ja_JP.properties

@ -2148,3 +2148,4 @@ FR-Designer_Provide_Choose_All=\u5168\u9078\u629E\u53EF\u80FD
FR-Designer_Decimal_Places=\u5C0F\u6570\u67A0\u6570: FR-Designer_Decimal_Places=\u5C0F\u6570\u67A0\u6570:
FR-Base-Load_Resource_File=\u8A2D\u5B9A\u30D5\u30A1\u30A4\u30EB\u30ED\u30FC\u30C9 FR-Base-Load_Resource_File=\u8A2D\u5B9A\u30D5\u30A1\u30A4\u30EB\u30ED\u30FC\u30C9
FR-Designer_Env_Des_Https= FR-Designer_Env_Des_Https=
FR-Designer_Format_JavaScript=Format Code

1
designer_base/src/com/fr/design/locale/designer_ko_KR.properties

@ -2148,3 +2148,4 @@ FR-Base-Load_Resource_File=\uB85C\uB529\uAD6C\uC131\uD30C\uC77C
FR-Designer_Export_Background= FR-Designer_Export_Background=
FR-Designer_Print_Background= FR-Designer_Print_Background=
FR-Designer_Env_Des_Https= FR-Designer_Env_Des_Https=
FR-Designer_Format_JavaScript=Format Code

1
designer_base/src/com/fr/design/locale/designer_zh_CN.properties

@ -2148,3 +2148,4 @@ FR-Designer_Sheet_Label_Page_Display_Position=
FR-Designer_Provide_Choose_All= FR-Designer_Provide_Choose_All=
FR-Designer_Decimal_Places= FR-Designer_Decimal_Places=
FR-Designer_Env_Des_Https=\u82E5\u542F\u7528https\u6216\u4FEE\u6539https\u914D\u7F6E\uFF08\u8BC1\u4E66\u8DEF\u5F84\u3001https\u79D8\u94A5\uFF09\uFF0C\u5FC5\u987B\u91CD\u542F\u8BBE\u8BA1\u5668\u624D\u80FD\u751F\u6548\u3002 FR-Designer_Env_Des_Https=\u82E5\u542F\u7528https\u6216\u4FEE\u6539https\u914D\u7F6E\uFF08\u8BC1\u4E66\u8DEF\u5F84\u3001https\u79D8\u94A5\uFF09\uFF0C\u5FC5\u987B\u91CD\u542F\u8BBE\u8BA1\u5668\u624D\u80FD\u751F\u6548\u3002
FR-Designer_Format_JavaScript=\u683C\u5F0F\u5316\u4EE3\u7801

1
designer_base/src/com/fr/design/locale/designer_zh_TW.properties

@ -2147,3 +2147,4 @@ FR-Designer_Sheet_Label_Page_Display_Position=
FR-Designer_Provide_Choose_All= FR-Designer_Provide_Choose_All=
FR-Designer_Decimal_Places= FR-Designer_Decimal_Places=
FR-Designer_Env_Des_Https=\u82E5\u555F\u7528https\u6216\u4FEE\u6539https\u914D\u7F6E\uFF08\u8B49\u66F8\u8DEF\u5F91\u3001https\u7955\u9470\uFF09\uFF0C\u5FC5\u9808\u91CD\u555F\u8A2D\u8A08\u5668\u624D\u80FD\u751F\u6548\u3002 FR-Designer_Env_Des_Https=\u82E5\u555F\u7528https\u6216\u4FEE\u6539https\u914D\u7F6E\uFF08\u8B49\u66F8\u8DEF\u5F91\u3001https\u7955\u9470\uFF09\uFF0C\u5FC5\u9808\u91CD\u555F\u8A2D\u8A08\u5668\u624D\u80FD\u751F\u6548\u3002
FR-Designer_Format_JavaScript=Format Code

2
designer_base/src/com/fr/design/mainframe/DesignerFrame.java

@ -918,7 +918,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
if (tplFile instanceof FileFILE) { if (tplFile instanceof FileFILE) {
fullName = tplFile.getPath(); fullName = tplFile.getPath();
} }
fullName = fullName.replaceAll("/", "\\\\"); fullName = OperatingSystem.isWindows() ? fullName.replaceAll("/", "\\\\") : fullName.replaceAll("\\\\", "/");
int index = HistoryTemplateListPane.getInstance().contains(fullName); int index = HistoryTemplateListPane.getInstance().contains(fullName);
if (index != -1) { if (index != -1) {
this.activateJTemplate(HistoryTemplateListPane.getInstance().getHistoryList().get(index)); this.activateJTemplate(HistoryTemplateListPane.getInstance().getHistoryList().get(index));

7
designer_base/src/com/fr/design/mainframe/JTemplate.java

@ -45,6 +45,7 @@ import com.fr.general.ComparatorUtils;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.OperatingSystem;
import com.fr.stable.ProductConstants; import com.fr.stable.ProductConstants;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.stable.core.UUID; import com.fr.stable.core.UUID;
@ -196,7 +197,11 @@ public abstract class JTemplate<T extends IOFile, U extends BaseUndoState<?>> ex
if (editingFileName.startsWith(ProjectConstants.REPORTLETS_NAME)) { if (editingFileName.startsWith(ProjectConstants.REPORTLETS_NAME)) {
editingFileName = ((FileNodeFILE) getEditingFILE()).getEnvPath() + File.separator + editingFileName; editingFileName = ((FileNodeFILE) getEditingFILE()).getEnvPath() + File.separator + editingFileName;
} }
return editingFileName.replaceAll("/", "\\\\"); if (OperatingSystem.isWindows()) {
return editingFileName.replaceAll("/", "\\\\");
} else {
return editingFileName.replaceAll("\\\\", "/");
}
} }
protected abstract JComponent createCenterPane(); protected abstract JComponent createCenterPane();

Loading…
Cancel
Save