From fad4cbb90143c616acfe78ed57448060605bf9c7 Mon Sep 17 00:00:00 2001 From: hades Date: Thu, 19 Nov 2020 17:06:26 +0800 Subject: [PATCH 1/3] =?UTF-8?q?REPORT-43814=20=E7=BB=84=E4=BB=B6=E5=A4=8D?= =?UTF-8?q?=E7=94=A8=E6=8F=92=E4=BB=B6=E5=9C=A8=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E5=90=AF=E5=8A=A8=E7=9A=84=E6=97=B6=E5=80=99=E4=BC=9A=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=8C=96=E4=B8=A4=E9=81=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/mainframe/JTemplate.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 73d5d0bb1..94271ace9 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 @@ -145,7 +145,11 @@ public abstract class JTemplate> } private void initAndStartPlugin() { - initPluginPane(); + // 启动设计器的时候不加载插件内容,插件引擎监听会加载一次 + boolean init = (DesignerContext.getDesignerFrame() != null && DesignerContext.getDesignerFrame().isDesignerOpened()) || DesignerEnvManager.getEnvManager().isEmbedServerLazyStartup(); + if (init) { + initPluginPane(); + } startListenPlugin(); } From 0de544a588455af588e45f702fcd2785b1521f59 Mon Sep 17 00:00:00 2001 From: hades Date: Wed, 2 Dec 2020 19:16:19 +0800 Subject: [PATCH 2/3] =?UTF-8?q?REPORT-43795=20=E8=A1=A8=E5=8D=95=E6=8B=96?= =?UTF-8?q?=E6=8B=BD=E7=BB=84=E4=BB=B6=E6=9C=89=E9=97=AE=E9=A2=98=EF=BC=8C?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E5=9D=97=E5=8F=AF=E4=BB=A5=E9=80=9A=E8=BF=87?= =?UTF-8?q?body=E6=8B=96=E5=85=A5=E5=8F=82=E6=95=B0=E9=9D=A2=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/mainframe/JTemplate.java | 6 +----- .../com/fr/design/designer/beans/models/StateModel.java | 9 +++++++++ 2 files changed, 10 insertions(+), 5 deletions(-) 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 d05200592..6c6de287e 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 @@ -145,11 +145,7 @@ public abstract class JTemplate> } private void initAndStartPlugin() { - // 启动设计器的时候不加载插件内容,插件引擎监听会加载一次 - boolean init = (DesignerContext.getDesignerFrame() != null && DesignerContext.getDesignerFrame().isDesignerOpened()) || DesignerEnvManager.getEnvManager().isEmbedServerLazyStartup(); - if (init) { - initPluginPane(); - } + initPluginPane(); startListenPlugin(); } diff --git a/designer-form/src/main/java/com/fr/design/designer/beans/models/StateModel.java b/designer-form/src/main/java/com/fr/design/designer/beans/models/StateModel.java index 5045e1387..85a328032 100644 --- a/designer-form/src/main/java/com/fr/design/designer/beans/models/StateModel.java +++ b/designer-form/src/main/java/com/fr/design/designer/beans/models/StateModel.java @@ -4,6 +4,7 @@ import com.fr.design.beans.location.Absorptionline; import com.fr.design.designer.beans.AdapterBus; import com.fr.design.designer.beans.HoverPainter; import com.fr.design.designer.beans.LayoutAdapter; +import com.fr.design.designer.beans.adapters.layout.FRParameterLayoutAdapter; import com.fr.design.designer.beans.events.DesignerEvent; import com.fr.design.designer.beans.location.Direction; import com.fr.design.designer.beans.location.Location; @@ -136,6 +137,14 @@ public class StateModel { private boolean addBean(XLayoutContainer container, int mouseX, int mouseY) { LayoutAdapter adapter = container.getLayoutAdapter(); Rectangle rectangleContainer = ComponentUtils.getRelativeBounds(container); + // 判断是否能把控件从表单布局中拖拽到参数面板中 + if (adapter instanceof FRParameterLayoutAdapter) { + for (XCreator xCreator : selectionModel.getSelection().getSelectedCreators()) { + if (!xCreator.canEnterIntoParaPane()) { + return false; + } + } + } if (selectionModel.getSelection().size() == 1) { return adapter.addBean(selectionModel.getSelection().getSelectedCreator(), mouseX + designer.getArea().getHorizontalValue() - rectangleContainer.x, From 9717e6af3b6548bce6c36af64b0d7c936f74400f Mon Sep 17 00:00:00 2001 From: Yvan Date: Thu, 3 Dec 2020 10:20:49 +0800 Subject: [PATCH 3/3] =?UTF-8?q?REPORT-44390=20alpha-fine=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E5=B8=AE=E5=8A=A9=E6=96=87=E6=A1=A3=EF=BC=8C=E5=8F=B3=E4=BE=A7?= =?UTF-8?q?=E4=B8=8D=E5=B1=95=E7=A4=BA=E8=AF=A6=E7=BB=86=E5=86=85=E5=AE=B9?= =?UTF-8?q?=EF=BC=8C=E5=8F=AA=E6=98=BE=E7=A4=BA=E6=96=87=E6=A1=A3=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=20=E3=80=90=E9=97=AE=E9=A2=98=E5=8E=9F=E5=9B=A0?= =?UTF-8?q?=E3=80=91=E4=B9=8B=E5=89=8D=E7=9A=84=E6=90=9C=E7=B4=A2=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E6=9C=89=E5=8F=98=E5=8C=96=EF=BC=8C=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E7=BB=93=E6=9E=9C=E9=87=8C=E8=A1=A8=E7=A4=BA?= =?UTF-8?q?=E6=96=87=E6=A1=A3=E8=AF=A6=E6=83=85=E7=9A=84key=E5=80=BC?= =?UTF-8?q?=E4=B9=9F=E5=8F=98=E5=8C=96=E4=BA=86(summary=20=E2=86=92=20cont?= =?UTF-8?q?ent)=EF=BC=8C=E7=84=B6=E5=90=8E=E4=BF=AE=E6=94=B9=E8=BF=87?= =?UTF-8?q?=E7=A8=8B=E4=B8=AD=E5=8F=91=E7=8E=B0"=E6=9C=AC=E5=9C=B0?= =?UTF-8?q?=E5=B8=B8=E7=94=A8"=E4=B9=9F=E4=B8=8D=E4=BC=9A=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=96=87=E6=A1=A3=E8=AF=A6=E6=83=85=EF=BC=8C=E5=9B=A0?= =?UTF-8?q?=E4=B8=BA=E4=BF=9D=E5=AD=98=E5=88=B0=E6=9C=AC=E5=9C=B0=E7=9A=84?= =?UTF-8?q?=E6=97=B6=E5=80=99=E8=BD=ACjson=E7=9A=84key=E5=80=BC=E9=94=99?= =?UTF-8?q?=E4=BA=86=20=E3=80=90=E6=94=B9=E5=8A=A8=E6=80=9D=E8=B7=AF?= =?UTF-8?q?=E3=80=91=E5=B0=86key=E4=BF=AE=E6=94=B9=E4=B8=BA=E7=8E=B0?= =?UTF-8?q?=E5=9C=A8=E4=BD=BF=E7=94=A8=E7=9A=84"content"=EF=BC=8C=E7=84=B6?= =?UTF-8?q?=E5=90=8E=E4=B8=BA=E4=BA=86=E8=AE=A9=E8=AF=BB=E5=92=8C=E5=86=99?= =?UTF-8?q?=E7=9A=84key=E4=BF=9D=E6=8C=81=E4=B8=80=E8=87=B4=EF=BC=8C?= =?UTF-8?q?=E7=BB=9F=E4=B8=80=E7=94=A8DocumentModel=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E5=AD=97=E7=AC=A6=E4=B8=B2=E5=B8=B8=E9=87=8F=E8=A1=A8=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/alphafine/cell/model/DocumentModel.java | 7 ++++++- .../search/manager/impl/DocumentSearchManager.java | 8 ++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/model/DocumentModel.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/model/DocumentModel.java index 2c608537c..e83b4be76 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/model/DocumentModel.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/model/DocumentModel.java @@ -19,6 +19,11 @@ public class DocumentModel extends AlphaCellModel { private String informationUrl; private int documentId; + public static final String TITLE = "title"; + public static final String CONTENT = "content"; + public static final String DID = "did"; + public static final String SEARCHCOUNT = "searchcount"; + public DocumentModel(String name, String content, int documentId) { super(name, content, CellType.DOCUMENT); this.documentId = documentId; @@ -43,7 +48,7 @@ public class DocumentModel extends AlphaCellModel { public JSONObject modelToJson() { JSONObject object = JSONObject.create(); JSONObject modelObject = JSONObject.create(); - modelObject.put("title", getName()).put("summary", getContent()).put("did", getDocumentId()).put("searchCount", getSearchCount()); + modelObject.put(TITLE, getName()).put(CONTENT, getContent()).put(DID, getDocumentId()).put(SEARCHCOUNT, getSearchCount()); object.put("result", modelObject).put("cellType", getType().getTypeValue()); return object; } diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/DocumentSearchManager.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/DocumentSearchManager.java index be3ac4f1b..0b4953083 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/DocumentSearchManager.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/DocumentSearchManager.java @@ -43,10 +43,10 @@ public class DocumentSearchManager implements AlphaFineSearchProvider { * @return */ public static DocumentModel getModelFromCloud(JSONObject object) { - String name = object.optString("title"); - String content = object.optString("summary"); - int documentId = object.optInt("did"); - int searchCount = object.optInt("searchCount"); + String name = object.optString(DocumentModel.TITLE); + String content = object.optString(DocumentModel.CONTENT); + int documentId = object.optInt(DocumentModel.DID); + int searchCount = object.optInt(DocumentModel.SEARCHCOUNT); return new DocumentModel(name, content, documentId, searchCount); }