|
|
@ -2,16 +2,11 @@ package com.fr.solution.plugin.design.formula.compat; |
|
|
|
|
|
|
|
|
|
|
|
import com.fanruan.api.function.FunctionKit; |
|
|
|
import com.fanruan.api.function.FunctionKit; |
|
|
|
import com.fanruan.api.macro.EncodeConstants; |
|
|
|
import com.fanruan.api.macro.EncodeConstants; |
|
|
|
import com.fanruan.api.macro.OperatingSystem; |
|
|
|
|
|
|
|
import com.fanruan.api.util.GeneralKit; |
|
|
|
import com.fanruan.api.util.GeneralKit; |
|
|
|
|
|
|
|
import com.fanruan.api.util.OperatingKit; |
|
|
|
import com.fanruan.api.util.StringKit; |
|
|
|
import com.fanruan.api.util.StringKit; |
|
|
|
import com.fanruan.api.util.TypeKit; |
|
|
|
import com.fanruan.api.util.TypeKit; |
|
|
|
|
|
|
|
|
|
|
|
import com.fr.plugin.ExtraClassManager; |
|
|
|
|
|
|
|
import com.fr.stable.script.Function; |
|
|
|
|
|
|
|
import com.fr.stable.fun.FunctionDefContainer; |
|
|
|
|
|
|
|
import com.fr.design.formula.FunctionGroup; |
|
|
|
import com.fr.design.formula.FunctionGroup; |
|
|
|
import com.fr.stable.fun.mark.Mutable; |
|
|
|
|
|
|
|
import com.fr.design.formula.NameAndDescription; |
|
|
|
import com.fr.design.formula.NameAndDescription; |
|
|
|
import com.fr.function.AVERAGE; |
|
|
|
import com.fr.function.AVERAGE; |
|
|
|
import com.fr.function.CHAR; |
|
|
|
import com.fr.function.CHAR; |
|
|
@ -22,11 +17,11 @@ import com.fr.function.MIN; |
|
|
|
import com.fr.function.RANGE; |
|
|
|
import com.fr.function.RANGE; |
|
|
|
import com.fr.function.SUM; |
|
|
|
import com.fr.function.SUM; |
|
|
|
import com.fr.function.TIME; |
|
|
|
import com.fr.function.TIME; |
|
|
|
|
|
|
|
|
|
|
|
//先不改
|
|
|
|
|
|
|
|
import com.fr.general.FRLogger; |
|
|
|
import com.fr.general.FRLogger; |
|
|
|
|
|
|
|
import com.fr.plugin.ExtraClassManager; |
|
|
|
//有问题
|
|
|
|
import com.fr.stable.fun.FunctionDefContainer; |
|
|
|
|
|
|
|
import com.fr.stable.fun.mark.Mutable; |
|
|
|
|
|
|
|
import com.fr.stable.script.Function; |
|
|
|
import com.fr.stable.script.FunctionDef; |
|
|
|
import com.fr.stable.script.FunctionDef; |
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.*; |
|
|
|
import javax.swing.*; |
|
|
@ -45,6 +40,9 @@ import java.util.Set; |
|
|
|
import java.util.zip.ZipEntry; |
|
|
|
import java.util.zip.ZipEntry; |
|
|
|
import java.util.zip.ZipFile; |
|
|
|
import java.util.zip.ZipFile; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//先不改
|
|
|
|
|
|
|
|
//有问题
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @author richie |
|
|
|
* @author richie |
|
|
|
* @version 10.0 |
|
|
|
* @version 10.0 |
|
|
@ -169,18 +167,15 @@ public final class FunctionConstants { |
|
|
|
|
|
|
|
|
|
|
|
private static String[] findClassNamesUnderFilePath(String filePath) { |
|
|
|
private static String[] findClassNamesUnderFilePath(String filePath) { |
|
|
|
java.util.List<String> classNameList = new ArrayList<String>(); |
|
|
|
java.util.List<String> classNameList = new ArrayList<String>(); |
|
|
|
/* |
|
|
|
|
|
|
|
* alex:如果是jar包中的class文件 |
|
|
|
|
|
|
|
* file:/D:/opt/FineReport6.5/WebReport/WEB-INF/lib/fr-server-6.5.jar!/com/fr/rpt/script/function |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
if (isJarPath(filePath)) { |
|
|
|
if (isJarPath(filePath)) { |
|
|
|
String[] arr = filePath.split("!/"); |
|
|
|
String[] arr = filePath.split("!/"); |
|
|
|
String jarPath = arr[0].substring(6); // alex:substring(6)去掉前面的file:/这六个字符
|
|
|
|
String jarPath = arr[0].substring(6); |
|
|
|
String classPath = arr[1]; |
|
|
|
String classPath = arr[1]; |
|
|
|
if(classPath.endsWith("/")){ |
|
|
|
if(classPath.endsWith("/")){ |
|
|
|
classPath = classPath.substring(0, classPath.length() - 1); |
|
|
|
classPath = classPath.substring(0, classPath.length() - 1); |
|
|
|
} |
|
|
|
} |
|
|
|
if (!OperatingSystem.isWindows()){ |
|
|
|
if (!OperatingKit.isWindows()){ |
|
|
|
//windows里substring后是d:\123\456, mac下substring后是Application/123/456
|
|
|
|
//windows里substring后是d:\123\456, mac下substring后是Application/123/456
|
|
|
|
jarPath = StringKit.perfectStart(jarPath, "/"); |
|
|
|
jarPath = StringKit.perfectStart(jarPath, "/"); |
|
|
|
} |
|
|
|
} |
|
|
|