diff --git a/build/install/fine-plugin-com.fr.plugin.cafe_expand-1.0.0.zip b/build/install/fine-plugin-com.fr.plugin.cafe_expand-1.4.2.zip
similarity index 90%
rename from build/install/fine-plugin-com.fr.plugin.cafe_expand-1.0.0.zip
rename to build/install/fine-plugin-com.fr.plugin.cafe_expand-1.4.2.zip
index 9a56582..03ec41a 100644
Binary files a/build/install/fine-plugin-com.fr.plugin.cafe_expand-1.0.0.zip and b/build/install/fine-plugin-com.fr.plugin.cafe_expand-1.4.2.zip differ
diff --git a/build/libs/fine-plugin-com.fr.plugin.cafe_expand-1.0.0.jar b/build/libs/fine-plugin-com.fr.plugin.cafe_expand-1.4.2.jar
similarity index 84%
rename from build/libs/fine-plugin-com.fr.plugin.cafe_expand-1.0.0.jar
rename to build/libs/fine-plugin-com.fr.plugin.cafe_expand-1.4.2.jar
index e5ad3a0..1560f86 100644
Binary files a/build/libs/fine-plugin-com.fr.plugin.cafe_expand-1.0.0.jar and b/build/libs/fine-plugin-com.fr.plugin.cafe_expand-1.4.2.jar differ
diff --git a/build/temp/plugin/fine-plugin-com.fr.plugin.cafe_expand-1.0.0.jar b/build/temp/plugin/fine-plugin-com.fr.plugin.cafe_expand-1.4.2.jar
similarity index 84%
rename from build/temp/plugin/fine-plugin-com.fr.plugin.cafe_expand-1.0.0.jar
rename to build/temp/plugin/fine-plugin-com.fr.plugin.cafe_expand-1.4.2.jar
index e5ad3a0..1560f86 100644
Binary files a/build/temp/plugin/fine-plugin-com.fr.plugin.cafe_expand-1.0.0.jar and b/build/temp/plugin/fine-plugin-com.fr.plugin.cafe_expand-1.4.2.jar differ
diff --git a/build/temp/plugin/plugin.xml b/build/temp/plugin/plugin.xml
index b6c6327..bd22f1d 100644
--- a/build/temp/plugin/plugin.xml
+++ b/build/temp/plugin/plugin.xml
@@ -4,7 +4,7 @@
yes
no
- 1.0.0
+ 1.4.2
10.0
2020-01-01
crm
diff --git a/plugin.xml b/plugin.xml
index b6c6327..bd22f1d 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -4,7 +4,7 @@
yes
no
- 1.0.0
+ 1.4.2
10.0
2020-01-01
crm
diff --git a/src/main/java/com/fr/plugin/cafe_expand/designerhelp/JumpToAnalysis.java b/src/main/java/com/fr/plugin/cafe_expand/designerhelp/JumpToAnalysis.java
index 8d7b588..b197fcf 100644
--- a/src/main/java/com/fr/plugin/cafe_expand/designerhelp/JumpToAnalysis.java
+++ b/src/main/java/com/fr/plugin/cafe_expand/designerhelp/JumpToAnalysis.java
@@ -11,6 +11,7 @@ import com.fr.design.utils.DesignUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.IOUtils;
import com.fr.locale.InterProviderFactory;
+import com.fr.log.FineLoggerFactory;
import com.fr.plugin.cafe_expand.function.DoExpandFile;
import com.fr.plugin.cafe_expand.function.UnitTools;
import com.fr.record.analyzer.EnableMetrics;
@@ -51,7 +52,7 @@ public class JumpToAnalysis extends AbstractDsinFrameUpButtonProvider {
if( template instanceof JWorkBook){
TemplateElementCase wb=((JWorkBook) template).getEditingElementCase();
- int sheetNum=template.getEditingReportIndex();
+ int sheetNum=template.getEditingReportIndex()+1;
position="sheet:"+sheetNum;
String sheetKind=wb.getClass().toString();
@@ -64,8 +65,6 @@ public class JumpToAnalysis extends AbstractDsinFrameUpButtonProvider {
else if(template instanceof JForm)
position="frm:"+template.getSelectElementCase().getWidgetName();
- //visitTc(filePath,position);
-
JDialog fr = new JDialog();
fr.setSize(400, 250);
GUICoreUtils.centerWindow(fr);
@@ -146,21 +145,25 @@ public class JumpToAnalysis extends AbstractDsinFrameUpButtonProvider {
if(StringUtils.isEmpty(row_num.getText()))
row="";
- if(!StringUtils.isEmpty(row) || !StringUtils.isEmpty(col)) {
- arr[2] = col;
- arr[3] = row;
-
- String result = d.run(arr).toString();
- try {
- DesignerFrameFileDealerPane.getInstance().getSelectedOperation().refresh();
- DesignerFrameFileDealerPane.getInstance().stateChange();
- lable_result.setText(InterProviderFactory.getProvider().getLocText("file_after_change") + result);
- } catch (Exception e1) {
- lable_result.setText(InterProviderFactory.getProvider().getLocText("error_info") + e1.getMessage());
- }
+ //选了扩展多少行,但是没有没有选从哪一行开始扩展
+ if(StringUtils.isEmpty(row_position.getText()) && !StringUtils.isEmpty(row_num.getText()))
+ lable_result.setText(InterProviderFactory.getProvider().getLocText("row_not_select"));
+ else {
+ if (!StringUtils.isEmpty(row) || !StringUtils.isEmpty(col)) {
+ arr[2] = col;
+ arr[3] = row;
+
+ String result = d.run(arr).toString();
+ try {
+ DesignerFrameFileDealerPane.getInstance().getSelectedOperation().refresh();
+ DesignerFrameFileDealerPane.getInstance().stateChange();
+ lable_result.setText(InterProviderFactory.getProvider().getLocText("file_after_change") + result);
+ } catch (Exception e1) {
+ lable_result.setText(InterProviderFactory.getProvider().getLocText("error_info") + e1.getMessage());
+ }
+ } else
+ lable_result.setText(InterProviderFactory.getProvider().getLocText("attention_info"));
}
- else
- lable_result.setText(InterProviderFactory.getProvider().getLocText("attention_info"));
});
Box vBox = Box.createVerticalBox();
diff --git a/src/main/java/com/fr/plugin/cafe_expand/function/DoExpandFile.java b/src/main/java/com/fr/plugin/cafe_expand/function/DoExpandFile.java
index 497c99a..b89ad40 100644
--- a/src/main/java/com/fr/plugin/cafe_expand/function/DoExpandFile.java
+++ b/src/main/java/com/fr/plugin/cafe_expand/function/DoExpandFile.java
@@ -1,6 +1,7 @@
package com.fr.plugin.cafe_expand.function;
import com.fr.general.ComparatorUtils;
+import com.fr.log.FineLoggerFactory;
import com.fr.plugin.transform.FunctionRecorder;
import com.fr.script.AbstractFunction;
import com.fr.stable.StringUtils;
@@ -39,8 +40,8 @@ public class DoExpandFile extends AbstractFunction {
rowExpandMap.put(path, rowMap);
String newPath = getNewPath(path);
- Element ele = start(path, position);
try {
+ Element ele = start(path, position);
FileOutputStream out = new FileOutputStream(newPath, true);
out.write(ele.asXML().getBytes("utf-8"));
out.flush();
@@ -67,7 +68,7 @@ public class DoExpandFile extends AbstractFunction {
String sheetArr[]=position.split(",");
sheetNum=Integer.parseInt(sheetArr[0].split(":")[1]);
- int i=0;
+ int i=1;
List sheetReports = root.elements();
for (Element reportEle : sheetReports) {
String className = reportEle.attributeValue("class");
@@ -331,7 +332,6 @@ public class DoExpandFile extends AbstractFunction {
}
try {
-
//替换后的,转换成新的ele,替换原来的report
Document new_ele = DocumentHelper.parseText(reportRoot.asXML());
elepar.set(index,new_ele.getRootElement());
@@ -414,7 +414,6 @@ public class DoExpandFile extends AbstractFunction {
* */
private static void anaStr(String str,String filePath,Map m)
{
- String tempStr=str;
List cafeList=new ArrayList();
UnitTools.getCellCafe(str,cafeList);
for(int i=0;i beg)
- cafeList.add(strs.substring(beg, end));
+ if (end > beg){
+ String temp_cafe=strs.substring(beg, end);
+ if(!temp_cafe.startsWith("ds") || !strs.contains("dsName"))//如果查出来的cafe是 ds1 这种数据集,要去除
+ cafeList.add(temp_cafe);
+ }
if (!"".equals(cafe)) {
String nextStr = strs.substring(end);
getCellCafe(nextStr, cafeList);
diff --git a/src/main/resources/com/fr/plugin/cafe_expand/config/locale/expand.properties b/src/main/resources/com/fr/plugin/cafe_expand/config/locale/expand.properties
index 4da45c2..00ac757 100644
--- a/src/main/resources/com/fr/plugin/cafe_expand/config/locale/expand.properties
+++ b/src/main/resources/com/fr/plugin/cafe_expand/config/locale/expand.properties
@@ -8,4 +8,5 @@ file_after_change=file_afert_change
error_info=error_info
attention_info=attention:please fill in the expand value
col_expand=col expand at
-row_expand=rol expand at
\ No newline at end of file
+row_expand=rol expand at
+row_not_select=attention:row not select
\ No newline at end of file
diff --git a/src/main/resources/com/fr/plugin/cafe_expand/config/locale/expand_zh_CN.properties b/src/main/resources/com/fr/plugin/cafe_expand/config/locale/expand_zh_CN.properties
index 2900de7..346bce0 100644
--- a/src/main/resources/com/fr/plugin/cafe_expand/config/locale/expand_zh_CN.properties
+++ b/src/main/resources/com/fr/plugin/cafe_expand/config/locale/expand_zh_CN.properties
@@ -8,4 +8,5 @@ file_after_change=\u53d8\u66f4\u540e\u7684\u6a21\u677f\u4e3a\uff1a
error_info=\u9519\u8bef\uff1a
attention_info=\u63d0\u793a\uff1a\u8bf7\u586b\u5199\u9700\u8981\u6269\u5c55\u884c\u5217\u7684\u503c
col_expand=\u6269\u5c55\u5217\uff1a\u5728
-row_expand=\u6269\u5c55\u884c\uff1a\u5728\u7b2c
\ No newline at end of file
+row_expand=\u6269\u5c55\u884c\uff1a\u5728\u7b2c
+row_not_select=\u63d0\u793a\uff1a\u8bf7\u586b\u5199\u9700\u8981\u6269\u5c55\u7684\u884c
\ No newline at end of file