diff --git a/build.dev.gradle b/build.dev.gradle index c5cc1b92da..1efdd55cc8 100644 --- a/build.dev.gradle +++ b/build.dev.gradle @@ -13,7 +13,7 @@ def branchName=buildDir.substring(buildDir.lastIndexOf ("\\")+1) task appletJar<<{ ant{ - mkdir(dir:"${libDir}/tmp-${branchName}") + mkdir(dir:"./tmp") mkdir(dir:"build/classes/") copy(todir:"build/classes/"){ fileset(dir:"${basicDir}/finereport-core-stable/${branchName}/build/classes/main") @@ -27,8 +27,8 @@ task appletJar<<{ fileset(dir:"${basicDir}/finereport-performance-stable/${branchName}/build/classes/main") } - unjar(src:"${libDir}/${branchName}/3rd.jar",dest:"${libDir}/tmp-${branchName}") - unjar(src:"${libDir}/${branchName}/servlet-api.jar",dest:"${libDir}/tmp-${branchName}") + unjar(src:"${libDir}/${branchName}/3rd.jar",dest:"./tmp") + unjar(src:"${libDir}/${branchName}/servlet-api.jar",dest:"./tmp") jar(jarfile:"build/libs/fr-applet-8.0.jar"){ fileset(dir:"build/classes"){ exclude(name:"*.*") @@ -44,7 +44,7 @@ task appletJar<<{ exclude(name:"com/fr/start/**") exclude(name:"com/fr/process/**") } - fileset(dir:"${libDir}/tmp-${branchName}"){ + fileset(dir:"./tmp"){ include(name:"javax/mail/**") include(name:"javax/servlet/**") include(name:"org/freehep/**") @@ -60,7 +60,7 @@ task appletJar<<{ include(name:"com/fr/web/attr/*.class") } } - delete(dir:"${libDir}/tmp-${branchName}") + delete(dir:"./tmp") def jdk6home= "D:/FineReport/develop/java/jdk1.6u35" def keystore="frapplet.store" def keycert="fr.cert" diff --git a/build.dev.gradle.bak b/build.dev.gradle.bak index cc3bea2327..c5cc1b92da 100644 --- a/build.dev.gradle.bak +++ b/build.dev.gradle.bak @@ -27,8 +27,8 @@ task appletJar<<{ fileset(dir:"${basicDir}/finereport-performance-stable/${branchName}/build/classes/main") } - unjar(src:"${libDir}/3rd.jar",dest:"${libDir}/tmp-${branchName}") - unjar(src:"${libDir}/servlet-api.jar",dest:"${libDir}/tmp-${branchName}") + unjar(src:"${libDir}/${branchName}/3rd.jar",dest:"${libDir}/tmp-${branchName}") + unjar(src:"${libDir}/${branchName}/servlet-api.jar",dest:"${libDir}/tmp-${branchName}") jar(jarfile:"build/libs/fr-applet-8.0.jar"){ fileset(dir:"build/classes"){ exclude(name:"*.*") diff --git a/build.master.gradle b/build.master.gradle index c5cc1b92da..1efdd55cc8 100644 --- a/build.master.gradle +++ b/build.master.gradle @@ -13,7 +13,7 @@ def branchName=buildDir.substring(buildDir.lastIndexOf ("\\")+1) task appletJar<<{ ant{ - mkdir(dir:"${libDir}/tmp-${branchName}") + mkdir(dir:"./tmp") mkdir(dir:"build/classes/") copy(todir:"build/classes/"){ fileset(dir:"${basicDir}/finereport-core-stable/${branchName}/build/classes/main") @@ -27,8 +27,8 @@ task appletJar<<{ fileset(dir:"${basicDir}/finereport-performance-stable/${branchName}/build/classes/main") } - unjar(src:"${libDir}/${branchName}/3rd.jar",dest:"${libDir}/tmp-${branchName}") - unjar(src:"${libDir}/${branchName}/servlet-api.jar",dest:"${libDir}/tmp-${branchName}") + unjar(src:"${libDir}/${branchName}/3rd.jar",dest:"./tmp") + unjar(src:"${libDir}/${branchName}/servlet-api.jar",dest:"./tmp") jar(jarfile:"build/libs/fr-applet-8.0.jar"){ fileset(dir:"build/classes"){ exclude(name:"*.*") @@ -44,7 +44,7 @@ task appletJar<<{ exclude(name:"com/fr/start/**") exclude(name:"com/fr/process/**") } - fileset(dir:"${libDir}/tmp-${branchName}"){ + fileset(dir:"./tmp"){ include(name:"javax/mail/**") include(name:"javax/servlet/**") include(name:"org/freehep/**") @@ -60,7 +60,7 @@ task appletJar<<{ include(name:"com/fr/web/attr/*.class") } } - delete(dir:"${libDir}/tmp-${branchName}") + delete(dir:"./tmp") def jdk6home= "D:/FineReport/develop/java/jdk1.6u35" def keystore="frapplet.store" def keycert="fr.cert" diff --git a/build.master.gradle.bak b/build.master.gradle.bak new file mode 100644 index 0000000000..c5cc1b92da --- /dev/null +++ b/build.master.gradle.bak @@ -0,0 +1,86 @@ +apply plugin: "java" +tasks.withType(JavaCompile){ + options.encoding = "UTF-8" +} + +def basicDir="../../" +def libDir="${basicDir}/finereport-lib-stable" +//获取什么分支名 +FileTree files =fileTree(dir:"./",include:"build.*.gradle") +def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ("\\")) +def branchName=buildDir.substring(buildDir.lastIndexOf ("\\")+1) + +task appletJar<<{ + + ant{ + mkdir(dir:"${libDir}/tmp-${branchName}") + mkdir(dir:"build/classes/") + copy(todir:"build/classes/"){ + fileset(dir:"${basicDir}/finereport-core-stable/${branchName}/build/classes/main") + + fileset(dir:"${basicDir}/finereport-chart-stable/${branchName}/build/classes/main") + + fileset(dir:"${basicDir}/finereport-report-stable/${branchName}/build/classes/main") + + fileset(dir:"${basicDir}/finereport-platform-stable/${branchName}/build/classes/main") + + fileset(dir:"${basicDir}/finereport-performance-stable/${branchName}/build/classes/main") + + } + unjar(src:"${libDir}/${branchName}/3rd.jar",dest:"${libDir}/tmp-${branchName}") + unjar(src:"${libDir}/${branchName}/servlet-api.jar",dest:"${libDir}/tmp-${branchName}") + jar(jarfile:"build/libs/fr-applet-8.0.jar"){ + fileset(dir:"build/classes"){ + exclude(name:"*.*") + exclude(name:"bin/*.*") + exclude(name:"classes/**") + exclude(name:"com/fr/schedule/**") + exclude(name:"com/fr/cell/**") + exclude(name:"com/fr/dialog/**") + exclude(name:"com/fr/view/**") + exclude(name:"com/fr/web/**") + exclude(name:"com/fr/fs/**") + exclude(name:"com/fr/design/**") + exclude(name:"com/fr/start/**") + exclude(name:"com/fr/process/**") + } + fileset(dir:"${libDir}/tmp-${branchName}"){ + include(name:"javax/mail/**") + include(name:"javax/servlet/**") + include(name:"org/freehep/**") + include(name:"com/fr/third/JAI/**") + include(name:"com/fr/third/antlr/**") + include(name:"com/fr/third/javax/**") + include(name:"com/sun/xml/**") + include(name:"javax/xml/**") + + } + fileset(dir:"build/classes"){ + include(name:"com/fr/web/*.class") + include(name:"com/fr/web/attr/*.class") + } + } + delete(dir:"${libDir}/tmp-${branchName}") + def jdk6home= "D:/FineReport/develop/java/jdk1.6u35" + def keystore="frapplet.store" + def keycert="fr.cert" + def keypassword="123456" + def keyalias="fr" + + exec(executable:"${jdk6home}/bin/keytool"){ + arg(line:"-genkey -dname "CN=FineReport L=NanJing C=China" -keystore ${keystore} -alias ${keyalias} -validity 3650 -storepass ${keypassword}") + } + exec(executable:"${jdk6home}/bin/keytool"){ + arg(line:"-export -keystore ${keystore} -alias ${keyalias} -file ${keycert} -storepass ${keypassword}") + } + + exec(executable:"${jdk6home}/bin/jarsigner"){ + arg(line:"-keystore ${keystore} -storepass ${keypassword} 'build/libs/fr-applet-8.0.jar' ${keyalias}") + } + delete(file:"${keystore}") + delete(file:"${keycert}") + delete(dir:"build/classes") + + } + +} \ No newline at end of file diff --git a/build.release.gradle b/build.release.gradle index 44aacadb4d..1c00529e68 100644 --- a/build.release.gradle +++ b/build.release.gradle @@ -12,7 +12,7 @@ def branchName=buildDir.substring(buildDir.lastIndexOf ("\\")+1) task appletJar<<{ ant{ - mkdir(dir:"${libDir}/tmp-${branchName}") + mkdir(dir:"./tmp") mkdir(dir:"build/classes/") copy(todir:"build/classes/"){ fileset(dir:"${basicDir}/finereport-core-stable/${branchName}/build/classes/main") @@ -26,8 +26,8 @@ task appletJar<<{ fileset(dir:"${basicDir}/finereport-performance-stable/${branchName}/build/classes/main") } - unjar(src:"${libDir}/3rd.jar",dest:"${libDir}/tmp-${branchName}") - unjar(src:"${libDir}/servlet-api.jar",dest:"${libDir}/tmp-${branchName}") + unjar(src:"${libDir}/3rd.jar",dest:"./tmp") + unjar(src:"${libDir}/servlet-api.jar",dest:"./tmp") jar(jarfile:"build/libs/fr-applet-8.0.jar"){ fileset(dir:"build/classes"){ exclude(name:"*.*") @@ -43,7 +43,7 @@ task appletJar<<{ exclude(name:"com/fr/start/**") exclude(name:"com/fr/process/**") } - fileset(dir:"${libDir}/tmp-${branchName}"){ + fileset(dir:"./tmp"){ include(name:"javax/mail/**") include(name:"javax/servlet/**") include(name:"org/freehep/**") @@ -59,7 +59,7 @@ task appletJar<<{ include(name:"com/fr/web/attr/*.class") } } - delete(dir:"${libDir}/tmp-${branchName}") + delete(dir:"./tmp") def jdk6home= "D:/FineReport/develop/java/jdk1.6u35" def keystore="frapplet.store" def keycert="fr.cert" diff --git a/build.release.gradle.bak b/build.release.gradle.bak new file mode 100644 index 0000000000..44aacadb4d --- /dev/null +++ b/build.release.gradle.bak @@ -0,0 +1,85 @@ +apply plugin: "java" +tasks.withType(JavaCompile){ + options.encoding = "UTF-8" +} +def basicDir="../../" +def libDir="${basicDir}/finereport-lib-stable/master" +//获取什么分支名 +FileTree files =fileTree(dir:"./",include:"build.*.gradle") +def buildDir=files[0].path.substring(0,files[0].path.lastIndexOf ("\\")) +def branchName=buildDir.substring(buildDir.lastIndexOf ("\\")+1) + +task appletJar<<{ + + ant{ + mkdir(dir:"${libDir}/tmp-${branchName}") + mkdir(dir:"build/classes/") + copy(todir:"build/classes/"){ + fileset(dir:"${basicDir}/finereport-core-stable/${branchName}/build/classes/main") + + fileset(dir:"${basicDir}/finereport-chart-stable/${branchName}/build/classes/main") + + fileset(dir:"${basicDir}/finereport-report-stable/${branchName}/build/classes/main") + + fileset(dir:"${basicDir}/finereport-platform-stable/${branchName}/build/classes/main") + + fileset(dir:"${basicDir}/finereport-performance-stable/${branchName}/build/classes/main") + + } + unjar(src:"${libDir}/3rd.jar",dest:"${libDir}/tmp-${branchName}") + unjar(src:"${libDir}/servlet-api.jar",dest:"${libDir}/tmp-${branchName}") + jar(jarfile:"build/libs/fr-applet-8.0.jar"){ + fileset(dir:"build/classes"){ + exclude(name:"*.*") + exclude(name:"bin/*.*") + exclude(name:"classes/**") + exclude(name:"com/fr/schedule/**") + exclude(name:"com/fr/cell/**") + exclude(name:"com/fr/dialog/**") + exclude(name:"com/fr/view/**") + exclude(name:"com/fr/web/**") + exclude(name:"com/fr/fs/**") + exclude(name:"com/fr/design/**") + exclude(name:"com/fr/start/**") + exclude(name:"com/fr/process/**") + } + fileset(dir:"${libDir}/tmp-${branchName}"){ + include(name:"javax/mail/**") + include(name:"javax/servlet/**") + include(name:"org/freehep/**") + include(name:"com/fr/third/JAI/**") + include(name:"com/fr/third/antlr/**") + include(name:"com/fr/third/javax/**") + include(name:"com/sun/xml/**") + include(name:"javax/xml/**") + + } + fileset(dir:"build/classes"){ + include(name:"com/fr/web/*.class") + include(name:"com/fr/web/attr/*.class") + } + } + delete(dir:"${libDir}/tmp-${branchName}") + def jdk6home= "D:/FineReport/develop/java/jdk1.6u35" + def keystore="frapplet.store" + def keycert="fr.cert" + def keypassword="123456" + def keyalias="fr" + + exec(executable:"${jdk6home}/bin/keytool"){ + arg(line:"-genkey -dname "CN=FineReport L=NanJing C=China" -keystore ${keystore} -alias ${keyalias} -validity 3650 -storepass ${keypassword}") + } + exec(executable:"${jdk6home}/bin/keytool"){ + arg(line:"-export -keystore ${keystore} -alias ${keyalias} -file ${keycert} -storepass ${keypassword}") + } + + exec(executable:"${jdk6home}/bin/jarsigner"){ + arg(line:"-keystore ${keystore} -storepass ${keypassword} 'build/libs/fr-applet-8.0.jar' ${keyalias}") + } + delete(file:"${keystore}") + delete(file:"${keycert}") + delete(dir:"build/classes") + + } + +} \ No newline at end of file diff --git a/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java b/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java index 8df23d70d9..3e862cf288 100644 --- a/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java +++ b/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java @@ -133,7 +133,9 @@ public abstract class ToolBarMenuDock { menuList.addAll(Arrays.asList(menuDefs)); // 添加服务器菜单 - menuList.add(createServerMenuDef(plus)); + if (FRContext.getCurrentEnv() != null && FRContext.getCurrentEnv().isRoot()) { + menuList.add(createServerMenuDef(plus)); + } // 添加帮助菜单 menuList.add(createHelpMenuDef()); @@ -245,11 +247,6 @@ public abstract class ToolBarMenuDock { protected MenuDef createServerMenuDef(ToolBarMenuDockPlus plus) { MenuDef menuDef = new MenuDef(Inter.getLocText("FR-Designer_M-Server"), 'S'); - if (FRContext.getCurrentEnv() == null || !FRContext.getCurrentEnv().isRoot()) { - menuDef.addShortCut(new ConnectionListAction()); - return menuDef; - } - if (!BaseUtils.isAuthorityEditing()) { menuDef.addShortCut( new ConnectionListAction(), diff --git a/designer_base/src/com/fr/design/module/DesignModule.java b/designer_base/src/com/fr/design/module/DesignModule.java index 7dca3803ff..14ed20aea8 100644 --- a/designer_base/src/com/fr/design/module/DesignModule.java +++ b/designer_base/src/com/fr/design/module/DesignModule.java @@ -62,7 +62,7 @@ public abstract class DesignModule extends TopModule { * @return 国际化文件路径 */ public String[] getLocaleFile() { - return ArrayUtils.EMPTY_STRING_ARRAY; + return new String[]{"com/fr/design/locale/designer"}; } public Class[] actionsForInsertCellElement() { diff --git a/designer_form/src/com/fr/design/mainframe/FormCreatorDropTarget.java b/designer_form/src/com/fr/design/mainframe/FormCreatorDropTarget.java index 18ad2ab71c..6390b64f89 100644 --- a/designer_form/src/com/fr/design/mainframe/FormCreatorDropTarget.java +++ b/designer_form/src/com/fr/design/mainframe/FormCreatorDropTarget.java @@ -15,6 +15,7 @@ import com.fr.design.icon.IconPathConstants; import com.fr.design.utils.ComponentUtils; import com.fr.form.share.ShareLoader; import com.fr.form.ui.ElCaseBindInfo; +import com.fr.form.ui.ElementCaseEditor; import com.fr.form.ui.SharableElementCaseEditor; import com.fr.form.ui.Widget; import com.fr.general.Inter; @@ -79,6 +80,7 @@ public class FormCreatorDropTarget extends DropTarget { //SetSelection时要确保选中的是最顶层的布局 //tab布局添加的时候是初始化了XWCardLayout,实际上最顶层的布局是XWCardMainBorderLayout XCreator addingXCreator = addingModel.getXCreator(); + Widget widget = (addingXCreator.getTopLayout() != null) ? (addingXCreator.getTopLayout().toData()) : addingXCreator.toData(); if (addingXCreator.isShared()) { String shareId = addingXCreator.getShareId(); SharableElementCaseEditor sharableEditor = ShareLoader.getLoader().getSharedElCaseEditorById(shareId); @@ -86,10 +88,11 @@ public class FormCreatorDropTarget extends DropTarget { if (sharableEditor != null && bindInfo != null) { Map tdNameMap = TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()).addTableData(bindInfo.getName(), sharableEditor.getTableDataSource()); //合并数据集之后,可能会有数据集名称变化,做一下联动 - sharableEditor.batchRenameTdName(tdNameMap); + //共享的组件拿的时候都是克隆的,这边改拖拽中克隆的对象而非新克隆对象,上面这个新克隆的对象只是为了拿数据集 + ElementCaseEditor elementCaseEditor = (ElementCaseEditor) widget; + elementCaseEditor.batchRenameTdName(tdNameMap); } } - Widget widget = (addingXCreator.getTopLayout() != null) ? (addingXCreator.getTopLayout().toData()) : addingXCreator.toData(); designer.getSelectionModel().setSelectedCreators( FormSelectionUtils.rebuildSelection(xCreator, new Widget[]{widget})); designer.getEditListenerTable().fireCreatorModified(addingModel.getXCreator(), DesignerEvent.CREATOR_ADDED);