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 f8703275f8..64e59dfff0 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 @@ -40,19 +40,17 @@ import com.fr.design.mainframe.vcs.ui.UIPositiveIntEditor; import com.fr.design.mainframe.vcs.ui.VcsMovePanel; import com.fr.design.os.impl.SupportOSImpl; import com.fr.design.unit.UnitConvertUtil; +import com.fr.design.utils.DesignUtils; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.widget.FRWidgetFactory; import com.fr.general.ComparatorUtils; import com.fr.general.FRFont; -import com.fr.general.GeneralContext; import com.fr.general.IOUtils; import com.fr.general.Inter; import com.fr.general.log.Log4jConfig; import com.fr.io.attr.ImageExportAttr; -import com.fr.locale.InterProviderFactory; import com.fr.log.FineLoggerFactory; import com.fr.report.ReportConfigManager; -import com.fr.scheduler.tool.FineScheduler; import com.fr.stable.Constants; import com.fr.stable.os.OperatingSystem; import com.fr.third.apache.logging.log4j.Level; @@ -76,7 +74,6 @@ import javax.swing.ButtonGroup; import javax.swing.JComponent; import javax.swing.JDialog; import javax.swing.JFileChooser; -import javax.swing.JLabel; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JProgressBar; @@ -89,7 +86,15 @@ import javax.swing.UIManager; import javax.swing.border.EmptyBorder; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; -import java.awt.*; +import java.awt.BorderLayout; +import java.awt.CardLayout; +import java.awt.Color; +import java.awt.Component; +import java.awt.Dialog; +import java.awt.Dimension; +import java.awt.FlowLayout; +import java.awt.Font; +import java.awt.Window; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyAdapter; @@ -816,7 +821,7 @@ public class PreferencePane extends BasicPane { } private UIDictionaryComboBox createLanguageComboBox() { - Map map = InterProviderFactory.getProvider().getSupportLocaleMap(); + Map map = DesignUtils.getAvailableLanguages(); int size = map.size(); Locale[] keys = new Locale[size]; String[] values = new String[size]; diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java index 6bfd0a37f0..3cfdc04458 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java @@ -8,6 +8,7 @@ import com.fr.data.impl.JDBCDatabaseConnection; import com.fr.data.impl.JNDIDatabaseConnection; import com.fr.data.metric.utils.DatabaseConnectionMetricHandler; import com.fr.data.operator.DataOperator; +import com.fr.decision.webservice.exception.security.SecurityRestrictionException; import com.fr.design.ExtraDesignClassManager; import com.fr.general.MapCompareUtils; import com.fr.design.dialog.BasicDialog; @@ -25,6 +26,7 @@ import com.fr.license.database.DBTypes; import com.fr.license.database.DataBaseTypePointManager; import com.fr.license.exception.DataBaseNotSupportedException; import com.fr.log.FineLoggerFactory; +import com.fr.security.SecurityConfig; import com.fr.stable.ArrayUtils; import com.fr.stable.Nameable; import com.fr.stable.StringUtils; @@ -233,6 +235,10 @@ public class ConnectionListPane extends JListControlPane implements ConnectionSh if (connection instanceof JDBCDatabaseConnection) { DatabaseConnectionMetricHandler.handleSaveConnection((JDBCDatabaseConnection) connection, null); } + // JNDI禁用提示 + if (connection instanceof JNDIDatabaseConnection && SecurityConfig.getInstance().isDisableJNDI()) { + throw new SecurityRestrictionException(Toolkit.i18nText("Fine-Design_Basic_Database_Connection_JNDI_Disabled")); + } default: break; } diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java index 11c3f64d64..922a9e0c34 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java @@ -14,6 +14,7 @@ import com.fr.data.solution.entity.DriverPage; import com.fr.data.solution.processor.ClassNotFoundExceptionSolutionProcessor; import com.fr.data.solution.processor.SolutionProcessor; import com.fr.design.beans.BasicBeanPane; +import com.fr.design.dialog.FineJOptionPane; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icontainer.UIScrollPane; @@ -25,6 +26,7 @@ import com.fr.design.utils.gui.GUICoreUtils; import com.fr.log.FineLoggerFactory; import com.fr.rpc.ExceptionHandler; import com.fr.rpc.RPCInvokerExceptionInfo; +import com.fr.security.SecurityConfig; import com.fr.stable.ArrayUtils; import com.fr.stable.EncodeConstants; import com.fr.stable.StringUtils; @@ -42,6 +44,7 @@ import javax.swing.SwingConstants; import javax.swing.SwingUtilities; import javax.swing.SwingWorker; import javax.swing.UIManager; +import javax.swing.JOptionPane; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import java.awt.BorderLayout; @@ -95,7 +98,11 @@ public abstract class DatabaseConnectionPane connectionThread = new TestConnectionWorker(); midPane.setVisible(false); @@ -493,7 +500,7 @@ public abstract class DatabaseConnectionPane> extendDesignLocales = Holders.map(new HashMap<>(), String.class, String.class); + + public Map getExtendedDesignLocales() { + return Collections.unmodifiableMap(extendDesignLocales.get()); + } + + public void setExtendedDesignLocales(Map map) { + extendDesignLocales.set(map); + } + + @Override + public Object clone() throws CloneNotSupportedException { + DesignExtendLanguageConfig cloned = (DesignExtendLanguageConfig) super.clone(); + cloned.extendDesignLocales = ( MapConf>) extendDesignLocales.clone(); + return cloned; + } + +} diff --git a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java index 9697113e27..def6cc51fa 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java @@ -268,9 +268,14 @@ public abstract class JTemplate> TemplateTheme usingTheme = getTemplateTheme(); boolean isUsingThemeChanged = StringUtils.equals(event.themName, usingTheme.getName()); - if (isUsingThemeChanged && (event.action == TemplateThemeConfig.ThemeConfigAction.REMOVE || - event.action == TemplateThemeConfig.ThemeConfigAction.UPDATE)) { - checkAndResetTheme(); + if (event.action == TemplateThemeConfig.ThemeConfigAction.REMOVE || + event.action == TemplateThemeConfig.ThemeConfigAction.UPDATE) { + if (isUsingThemeChanged) { + checkAndResetTheme(); + } else { + // 修改主题配置,但是没有修改主题名称 , 需要重新保存文件 + fireSuperTargetModified(); + } } } }; @@ -470,6 +475,7 @@ public abstract class JTemplate> /** * 用于 切换工作目录 时的模板资源暂存 + * * @return */ public FILE templateToStashFile4Envchange() { @@ -545,6 +551,7 @@ public abstract class JTemplate> /** * 刷新 模板资源 和 EditingFILE * 仅在切换工作目录,reload模板时使用 + * * @param file */ public void refreshResourceAndEditingFILE(FILE file) { @@ -1785,7 +1792,6 @@ public abstract class JTemplate> } - private CallbackSaveWorker saveAs(boolean showLoc) { FILE editingFILE = this.getEditingFILE(); if (editingFILE == null) { @@ -1975,7 +1981,6 @@ public abstract class JTemplate> } - @Override public void saveDirectly() { if (isSaving()) { @@ -2125,17 +2130,19 @@ public abstract class JTemplate> /** * 获取此模板所使用的tab栏操作类型 + * * @return */ - public String getTemplateTabOperatorType(){ + public String getTemplateTabOperatorType() { return DEFAULT_TAB_OPERATOR; } /** * 当前模板是否可以被保存 + * * @return 是/否 */ - public boolean canBeSaved(){ + public boolean canBeSaved() { return true; } @@ -2144,15 +2151,16 @@ public abstract class JTemplate> * * @return 是/否 */ - public boolean supportCache(){ + public boolean supportCache() { return true; } /** * 获取此模板在tab栏中显示的名称 + * * @return */ - public String getTabShowName(JTemplate jTemplate){ + public String getTabShowName(JTemplate jTemplate) { String name = TemplateUtils.createLockeTemplatedName(jTemplate, jTemplate.getTemplateName()); if (!jTemplate.isSaved() && !name.endsWith(" *")) { name += " *"; @@ -2162,9 +2170,10 @@ public abstract class JTemplate> /** * 切换环境之前是否需要保存 + * * @return */ - public boolean needSaveBeforeSwitchEnv(){ + public boolean needSaveBeforeSwitchEnv() { return false; } diff --git a/designer-base/src/main/java/com/fr/design/utils/DesignUtils.java b/designer-base/src/main/java/com/fr/design/utils/DesignUtils.java index e8c528ade2..52059552b6 100644 --- a/designer-base/src/main/java/com/fr/design/utils/DesignUtils.java +++ b/designer-base/src/main/java/com/fr/design/utils/DesignUtils.java @@ -11,6 +11,7 @@ import com.fr.design.dialog.FineJOptionPane; import com.fr.design.fun.DefaultValueAdjustProvider; import com.fr.design.fun.DesignerEnvProcessor; import com.fr.design.gui.UILookAndFeel; +import com.fr.design.i18n.DesignExtendLanguageConfig; import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.DesignerContext; import com.fr.design.ui.util.UIUtil; @@ -19,10 +20,12 @@ import com.fr.file.FileFILE; import com.fr.general.ComparatorUtils; import com.fr.general.FRFont; import com.fr.general.GeneralContext; +import com.fr.general.SupportLocale; import com.fr.log.FineLoggerFactory; import com.fr.plugin.injectable.PluginModule; import com.fr.stable.ArrayUtils; import com.fr.stable.CommonCodeUtils; +import com.fr.stable.CommonUtils; import com.fr.stable.StableUtils; import com.fr.stable.StringUtils; import com.fr.stable.bridge.ObjectHolder; @@ -50,8 +53,11 @@ import java.net.ServerSocket; import java.net.Socket; import java.net.URI; import java.nio.charset.StandardCharsets; +import java.util.Collections; import java.util.Enumeration; +import java.util.LinkedHashMap; import java.util.Locale; +import java.util.Map; import java.util.Set; import java.util.concurrent.Callable; import java.util.concurrent.ExecutorService; @@ -496,4 +502,15 @@ public class DesignUtils { return Utils.getAvailableFontFamilyNames4Report(); } + /** + * 获取设计器可用的开放的语言配置,包括默认开放的五种语言和finedb扩展项 + * @return Locale和翻译对应的key + */ + public static Map getAvailableLanguages() { + Map map = new LinkedHashMap<>(SupportLocale.getInstance().getLocaleMap()); + for (Map.Entry entry : DesignExtendLanguageConfig.getInstance().getExtendedDesignLocales().entrySet()) { + map.put(CommonUtils.stringToLocale(entry.getKey()), entry.getValue()); + } + return Collections.unmodifiableMap(map); + } } diff --git a/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/GisLayerPane.java b/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/GisLayerPane.java index 37f178e196..bc224ac922 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/GisLayerPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/map/designer/type/GisLayerPane.java @@ -254,6 +254,7 @@ public class GisLayerPane extends JPanel implements UIObserver { } public void populate(GisLayer layer) { + layer.convertMapboxLayer(); switch (layer.getGisLayerType()) { case AUTO: gisButton.setSelectedIndex(0); diff --git a/designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/FormulaReplaceObject.java b/designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/FormulaReplaceObject.java index a58ae83d11..f80601fa25 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/FormulaReplaceObject.java +++ b/designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/FormulaReplaceObject.java @@ -4,27 +4,24 @@ import com.fr.base.BaseFormula; import com.fr.base.Formula; import com.fr.base.Parameter; import com.fr.base.StoreProcedureParameter; -import com.fr.base.core.KV; import com.fr.base.iofile.attr.WatermarkAttr; import com.fr.base.present.FormulaPresent; -import com.fr.base.present.Present; import com.fr.data.condition.FormulaCondition; import com.fr.data.core.Compare; import com.fr.design.actions.replace.info.DealWithInfoValue; import com.fr.design.actions.replace.info.Info; import com.fr.design.actions.replace.utils.ShowValueUtils; import com.fr.design.file.HistoryTemplateListCache; -import com.fr.form.main.Form; -import com.fr.function.IF; import com.fr.general.GeneralUtils; +import com.fr.js.NameJavaScript; import com.fr.js.SingleJavaScript; import com.fr.main.impl.WorkBook; import com.fr.report.cell.cellattr.CellInsertPolicyAttr; -import com.fr.report.cell.cellattr.core.RichChar; import com.fr.report.cell.cellattr.core.group.DSColumn; import com.fr.report.core.sort.sortexpression.FormulaSortExpression; import com.fr.stable.FormulaProvider; import com.fr.stable.ParameterProvider; +import com.fr.stable.StableUtils; import com.fr.stable.StringUtils; import com.fr.stable.collections.combination.Pair; import org.jetbrains.annotations.Nullable; @@ -545,6 +542,40 @@ public enum FormulaReplaceObject implements DealWithInfoValue { } return false; } + }, + + /** + * 超链名字 + */ + NAMEJAVASCRIPT("NameJavaScript") { + @Override + public Map getValue(Object... o) { + HashMap map = new HashMap<>(); + if (StringUtils.isNotEmpty(((NameJavaScript) o[0]).getName())) { + map.put("content", ((NameJavaScript) o[0]).getName()); + } + return map; + } + + @Override + public void setValue(Info info, String findStr, String replaceStr, List> operatorArray) { + Object replaceObject = info.getContent().getReplaceObject(); + info.updateOldStr(((NameJavaScript)replaceObject).getName(), findStr); + String str = ((NameJavaScript)replaceObject).getName(); + ShowValueUtils.updateAfterReplaceStr(info, str, findStr, replaceStr); + ((NameJavaScript)replaceObject).setName(ShowValueUtils.replaceAll(str, findStr, replaceStr)); + } + + @Override + public boolean check(Info info) { + if (info.getContent().getReplaceObject() instanceof NameJavaScript) { + NameJavaScript nameJavaScript = (NameJavaScript) info.getContent().getReplaceObject(); + if (StableUtils.canBeFormula(nameJavaScript.getName())) { + return StringUtils.equals(nameJavaScript.getName(), info.getContent().getOldShowStr()); + } + } + return false; + } }; diff --git a/designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/FormulaTag.java b/designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/FormulaTag.java index be35a76671..210bd3dc86 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/FormulaTag.java +++ b/designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/FormulaTag.java @@ -1,12 +1,12 @@ package com.fr.design.actions.replace.action.content.formula; -import com.fr.chart.chartdata.MeterReportDefinition; import com.fr.data.VerifyItem; import com.fr.data.impl.FormulaDictionary; import com.fr.design.actions.replace.info.DealWithInfoValue; import com.fr.design.actions.replace.info.Info; import com.fr.design.actions.replace.info.base.SearchTag; import com.fr.design.actions.replace.utils.ShowValueUtils; +import com.fr.form.ui.Widget; import com.fr.general.GeneralUtils; import com.fr.main.impl.WorkBook; import com.fr.plugin.chart.map.data.VanMapReportDefinition; @@ -173,6 +173,17 @@ public enum FormulaTag implements DealWithInfoValue { dictionary.setProduceFormula(ShowValueUtils.replaceAll(str, findStr, replaceStr)); } } + }, + WIDGET_LABEL(SearchTag.WIDGET_LABEL) { + @Override + public void setValue(Info info, String findStr, String replaceStr, List> operatorArray) { + if (info.getContent().getHoldObject() instanceof Widget) { + Widget widget = (Widget) info.getContent().getHoldObject(); + String str = widget.getLabelName(); + ShowValueUtils.updateAfterReplaceStr(info, str, findStr, replaceStr); + widget.setLabelName(ShowValueUtils.replaceAll(str, findStr, replaceStr)); + } + } }; int index; diff --git a/designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/cell/SearchCellFormulaAction.java b/designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/cell/SearchCellFormulaAction.java index 39ccf32585..45a85d697a 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/cell/SearchCellFormulaAction.java +++ b/designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/cell/SearchCellFormulaAction.java @@ -6,13 +6,13 @@ import com.fr.base.present.FormulaPresent; import com.fr.chart.chartattr.ChartCollection; import com.fr.design.actions.replace.action.content.cell.SearchCellAction; import com.fr.design.actions.replace.action.content.formula.chart.SearchChartCollectionFormulaAction; -import com.fr.design.actions.replace.action.content.formula.highlight.condition.*; import com.fr.design.actions.replace.action.content.formula.highlight.SearchHighlightFormulaAction; +import com.fr.design.actions.replace.action.content.formula.highlight.condition.SearchConditionFormula; +import com.fr.design.actions.replace.action.content.formula.highlight.condition.SearchConditionManager; import com.fr.design.actions.replace.action.content.formula.highlight.javascript.SearchJSHighlightAction; import com.fr.design.actions.replace.action.content.formula.widget.DictionaryType; import com.fr.design.actions.replace.info.CellInfo; import com.fr.design.actions.replace.info.FormulaInfo; - import com.fr.design.actions.replace.info.base.ITContent; import com.fr.design.actions.replace.info.base.SearchTag; import com.fr.design.i18n.Toolkit; @@ -29,7 +29,7 @@ import com.fr.report.core.sort.common.CellSortAttr; import com.fr.report.core.sort.sortexpression.FormulaSortExpression; import com.fr.report.core.sort.sortexpression.SortExpression; import com.fr.stable.CommonUtils; - +import com.fr.stable.StableUtils; import java.util.List; import java.util.Map; @@ -119,7 +119,14 @@ public class SearchCellFormulaAction implements SearchCellFormula { for (int i = 0; i < nameJavaScriptGroup.size(); i++) { SearchJSHighlightAction action = SearchJSHighlightAction.getInstance(); ITContent content = ITContent.copy(cellInfo.getContent()); - content.addOtherPos(nameJavaScriptGroup.getNameHyperlink(i).getName()); + String name = nameJavaScriptGroup.getNameHyperlink(i).getName(); + if(StableUtils.canBeFormula(name)){ + ITContent newContent = ITContent.copy(content); + newContent.setReplaceObject(nameJavaScriptGroup.getNameHyperlink(i)); + newContent.addOtherPos(Toolkit.i18nText("Fine-Design_Report_Hyperlink")); + formulaInfos.add(new FormulaInfo(newContent)); + } + content.addOtherPos(name); action.searchJSFormulaFromOther(formulaInfos, content, nameJavaScriptGroup.getNameHyperlink(i).getJavaScript()); } } diff --git a/designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/widget/AbstractSearchWidgetFormulaAction.java b/designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/widget/AbstractSearchWidgetFormulaAction.java index d8ff30f79e..5cb8aca91a 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/widget/AbstractSearchWidgetFormulaAction.java +++ b/designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/widget/AbstractSearchWidgetFormulaAction.java @@ -4,12 +4,14 @@ import com.fr.base.Formula; import com.fr.design.actions.replace.action.content.formula.highlight.javascript.SearchJSHighlightAction; import com.fr.design.actions.replace.info.FormulaInfo; import com.fr.design.actions.replace.info.base.ITContent; +import com.fr.design.actions.replace.info.base.SearchTag; import com.fr.design.i18n.Toolkit; import com.fr.form.event.Listener; import com.fr.form.ui.DataControl; import com.fr.form.ui.Widget; import com.fr.form.ui.container.WScaleLayout; import com.fr.form.ui.widget.CRBoundsWidget; +import com.fr.stable.StableUtils; import java.util.List; @@ -33,12 +35,13 @@ public abstract class AbstractSearchWidgetFormulaAction implements SearchWidgetF Widget widget = (Widget) content.getReplaceObject(); //控件值中的公式 searchFormulaFromWidgetValue(content, formulaInfos); + searchFormulaFromWidgetLabel(content, formulaInfos); for (int i = 0; i < widget.getListenerSize(); i++) { Listener listener = widget.getListener(i); ITContent newContent = ITContent.copy(content); //控件的事件可以使用的JS有五种,这边统一交给Highlight那边判断超级链接并进行处理 SearchJSHighlightAction jsHighlightAction = SearchJSHighlightAction.getInstance(); - newContent.addOtherPos(Toolkit.i18nText("Fine-Design_Report_Event"),listener.getName()); + newContent.addOtherPos(Toolkit.i18nText("Fine-Design_Report_Event"), listener.getName()); jsHighlightAction.searchJSFormulaFromOther(formulaInfos, newContent, listener.getAction()); } @@ -53,8 +56,8 @@ public abstract class AbstractSearchWidgetFormulaAction implements SearchWidgetF @Override public void searchFormulaFromWidgetValue(ITContent content, List formulaInfos) { Widget widget = (Widget) content.getReplaceObject(); - if (widget instanceof WScaleLayout){ - widget = ((CRBoundsWidget)((WScaleLayout)widget).getWidget(0)).getWidget(); + if (widget instanceof WScaleLayout) { + widget = ((CRBoundsWidget) ((WScaleLayout) widget).getWidget(0)).getWidget(); } if (widget instanceof DataControl) { if (isWidgetValueValid(((DataControl) widget))) { @@ -66,7 +69,23 @@ public abstract class AbstractSearchWidgetFormulaAction implements SearchWidgetF } } - private boolean isWidgetValueValid(DataControl control){ + public void searchFormulaFromWidgetLabel(ITContent content, List formulaInfos) { + Widget widget = (Widget) content.getReplaceObject(); + if (widget instanceof WScaleLayout) { + widget = ((CRBoundsWidget) ((WScaleLayout) widget).getWidget(0)).getWidget(); + } + if (StableUtils.canBeFormula(widget.getLabelName())) { + ITContent newContent = ITContent.copy(content); + newContent.addOtherPos(Toolkit.i18nText("Fine-Design_Form_Label_Name")); + newContent.setHoldObject(widget); + newContent.setReplaceObject(widget.getLabelName()); + newContent.setTag(SearchTag.WIDGET_LABEL); + formulaInfos.add(new FormulaInfo(newContent)); + } + } + + + private boolean isWidgetValueValid(DataControl control) { return control.getWidgetValue() != null && control.getWidgetValue().getValue() instanceof Formula; } diff --git a/designer-realize/src/main/java/com/fr/design/actions/replace/info/base/SearchTag.java b/designer-realize/src/main/java/com/fr/design/actions/replace/info/base/SearchTag.java index b5e202bcb1..4664d3b2c7 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/replace/info/base/SearchTag.java +++ b/designer-realize/src/main/java/com/fr/design/actions/replace/info/base/SearchTag.java @@ -56,6 +56,10 @@ public class SearchTag { * 引用JS */ public static final int IMPORT_JS = 11; + /** + * 控件-标签名称 + */ + public static final int WIDGET_LABEL = 12;