udm-rules-vue 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +550 -22
- package/dist/EventBus.d.ts +2 -0
- package/dist/FileDeployPackageBuilder.d.ts +4 -1
- package/dist/FileUtils.d.ts +95 -14
- package/dist/OutputChannelManager.d.ts +102 -0
- package/dist/assets/builtin/StaticMethod.bom +0 -3
- package/dist/assets/builtin/StaticMethod_zh_CN.voc +0 -3
- package/dist/assets/css/index.css +1 -1
- package/dist/bom/BomEditor.vue.d.ts +67 -3
- package/dist/bom/ClassEditor.vue.d.ts +1 -0
- package/dist/bom/FieldEditor.vue.d.ts +1 -0
- package/dist/bom/MethodEditor.vue.d.ts +1 -0
- package/dist/bom/PureWebBomEditor.vue.d.ts +74 -4
- package/dist/bom/bomSerialize.d.ts +1 -1
- package/dist/bom/model.d.ts +2 -0
- package/dist/brl/PureWebRuleEditor.vue.d.ts +17 -7
- package/dist/brl/RuleDocument.d.ts +3 -2
- package/dist/brl/RuleEditor.vue.d.ts +6 -3
- package/dist/brl/RuleEditorComponent.vue.d.ts +12 -6
- package/dist/command/CompileRuleFilesCommand.d.ts +4 -4
- package/dist/compile/DecisionTableCompiler.d.ts +13 -4
- package/dist/compile/FileCompiler.d.ts +2 -1
- package/dist/compile/FlowCompiler.d.ts +3 -2
- package/dist/compile/PureWebCompiler.d.ts +1 -1
- package/dist/compile/RuleCompiler.d.ts +1 -1
- package/dist/components/datatype/DatatypeSelectUtils.d.ts +9 -0
- package/dist/components/process/Connection.d.ts +30 -104
- package/dist/components/process/OrthogonalPath.d.ts +225 -0
- package/dist/components/process/Process.d.ts +3 -0
- package/dist/components/select/Select.vue.d.ts +1 -0
- package/dist/components/splitter/HoizontalSplitter.vue.d.ts +2 -3
- package/dist/components/splitter/VerticalSplitter.vue.d.ts +4 -14
- package/dist/components/tree/TreeNode.vue.d.ts +3 -15
- package/dist/dta/DecisionTableComponent.vue.d.ts +12 -6
- package/dist/dta/DecisionTableEditor.vue.d.ts +6 -3
- package/dist/dta/DynamicEditableController.d.ts +3 -0
- package/dist/dta/PureWebDecisionTableEditor.vue.d.ts +16 -7
- package/dist/dta/component/DecisionTable.d.ts +1 -0
- package/dist/dta/webview/DecisionTableDocument.d.ts +3 -2
- package/dist/dtr/DecisionTreeComponent.vue.d.ts +12 -6
- package/dist/dtr/DecisionTreeEditor.vue.d.ts +6 -3
- package/dist/dtr/PureWebDecisionTreeEditor.vue.d.ts +16 -7
- package/dist/dtr/designer/PlaceholderEditableController.d.ts +3 -0
- package/dist/dtr/designer/TreeDesigner.d.ts +2 -1
- package/dist/dtr/designer/TreeNode.d.ts +1 -0
- package/dist/dtr/webview/DecisionTreeDocument.d.ts +3 -2
- package/dist/index.d.ts +0 -4
- package/dist/index.js +34981 -33087
- package/dist/index.umd.js +316 -323
- package/dist/model/NavigationTree.d.ts +2 -0
- package/dist/model/WebViewBomFilesReader.d.ts +1 -0
- package/dist/monaco/ExpressionFinder.d.ts +4 -2
- package/dist/monaco/MonacoHoverProvider.d.ts +3 -0
- package/dist/monaco/parseTargetPartRuleScript.d.ts +2 -1
- package/dist/projectprops/Category.vue.d.ts +5 -1
- package/dist/projectprops/Parameter.vue.d.ts +5 -1
- package/dist/projectprops/ProjectProperties.d.ts +1 -0
- package/dist/projectprops/ProjectPropertiesEditor.vue.d.ts +52 -3
- package/dist/projectprops/PureWebProjectPropertiesEditor.vue.d.ts +59 -4
- package/dist/quicktest/QuickTestDialog.vue.d.ts +3 -1
- package/dist/refactor/ClassFileRefRefactor.d.ts +5 -0
- package/dist/refactor/FileRefactor.d.ts +10 -1
- package/dist/rfl/FlowProcess.d.ts +29 -0
- package/dist/rfl/config/Enums.d.ts +1 -1
- package/dist/rfl/data/RuleFile.d.ts +1 -1
- package/dist/rfl/definition/JsonUtils.d.ts +3 -7
- package/dist/rfl/definition/ProcessDef.d.ts +12 -0
- package/dist/rfl/definition/node/ActionTaskNodeDef.d.ts +1 -1
- package/dist/rfl/definition/node/FlowConnectionDef.d.ts +16 -12
- package/dist/rfl/designer/Designer.vue.d.ts +24 -13
- package/dist/rfl/designer/DesignerComponent.vue.d.ts +30 -16
- package/dist/rfl/designer/PureWebFlowEditor.vue.d.ts +34 -17
- package/dist/rfl/designer/editor/ConnectionEditor.vue.d.ts +2 -0
- package/dist/rfl/designer/editor/FlowEditor.vue.d.ts +1 -1
- package/dist/rfl/designer/editor/ProcessEditor.vue.d.ts +10 -5
- package/dist/rfl/node/FlowConnection.d.ts +7 -0
- package/dist/rfl/props/ActionNodeProperty.vue.d.ts +2 -0
- package/dist/rfl/props/BranchNodeProperty.vue.d.ts +2 -0
- package/dist/rfl/props/ConnectionProperty.vue.d.ts +8 -1
- package/dist/rfl/props/ForkNodeProperty.vue.d.ts +2 -0
- package/dist/rfl/props/JoinNodeProperty.vue.d.ts +2 -0
- package/dist/rfl/props/RuleNodeProperty.vue.d.ts +2 -0
- package/dist/rfl/props/StartNodeProperty.vue.d.ts +2 -0
- package/dist/rfl/props/StopNodeProperty.vue.d.ts +2 -0
- package/dist/rfl/props/SubflowNodeProperty.vue.d.ts +2 -0
- package/dist/rfl/utils/Utils.d.ts +1 -0
- package/dist/rfl/webview/RuleFlowDocument.d.ts +3 -2
- package/dist/sca/webview/ScoreCardDocument.d.ts +3 -2
- package/dist/sync/ProjectSyncEditorProvider.d.ts +0 -1
- package/dist/sync/ProjectSyncEntryBuilder.d.ts +23 -1
- package/dist/sync/SyncFileUitls.d.ts +2 -4
- package/dist/tst/PureWebTstEditor.vue.d.ts +12 -3
- package/dist/tst/TstEditor.vue.d.ts +4 -1
- package/dist/var/PureWebVariableEditor.vue.d.ts +12 -3
- package/dist/var/VariableEditor.vue.d.ts +4 -1
- package/dist/webviewFilesOperator.d.ts +1 -0
- package/package.json +3 -2
- package/dist/components/form/TagInput.vue.d.ts +0 -13
- package/dist/server/TestBomFilesLoader.d.ts +0 -13
- package/dist/server/TestFlowFileLoader.d.ts +0 -22
- package/dist/server/server.d.ts +0 -1
package/dist/FileUtils.d.ts
CHANGED
|
@@ -1,45 +1,60 @@
|
|
|
1
1
|
import { FileInfo } from './rfl/data/RuleFile';
|
|
2
2
|
import * as vscode from "vscode";
|
|
3
3
|
export declare class FileUtils {
|
|
4
|
+
static SCAN_FILE_FINISHED: boolean;
|
|
5
|
+
static readonly WORKSPACE_STATE_FILES_INFO = "filesInfo";
|
|
6
|
+
static readonly WORKSPACE_STATE_PATHS_INFO = "pathsInfo";
|
|
7
|
+
static readonly WORKSPACE_STATE_ALL_PATHS_INFO = "allPathsInfo";
|
|
4
8
|
private static filesInfo;
|
|
5
9
|
private static pathsInfo;
|
|
6
10
|
private static allPathsInfo;
|
|
7
|
-
private static
|
|
11
|
+
private static ruleFileContentCache;
|
|
12
|
+
private static uuidMap;
|
|
8
13
|
static getTargetFolder(): string;
|
|
9
14
|
private static getIrlFiles;
|
|
10
15
|
static getFileInfo(uuid: string): FileInfo | null;
|
|
11
16
|
static replaceStringInTextDocument(uri: vscode.Uri, searchString: string, replaceString: string): Promise<void>;
|
|
12
|
-
static validateFileName(
|
|
17
|
+
static validateFileName(filename: string): string | null;
|
|
13
18
|
static getFileInfoByPath(filePath: string): FileInfo | null;
|
|
14
|
-
private static
|
|
19
|
+
private static findFileInfoByPath;
|
|
15
20
|
private static findFileInfo;
|
|
16
|
-
static parseFlowFileInfos(xmlData: any): FileInfo[]
|
|
21
|
+
static parseFlowFileInfos(xmlData: any): Promise<FileInfo[]>;
|
|
17
22
|
private static parseFlowPackageFileInfos;
|
|
18
|
-
static getProjectInfos(): Promise<{
|
|
23
|
+
static getProjectInfos(clearCache?: boolean): Promise<{
|
|
19
24
|
filesInfo: FileInfo[];
|
|
20
25
|
pathsInfo: FileInfo[];
|
|
21
26
|
allPathsInfo: FileInfo[];
|
|
22
|
-
irlFilesInfo: FileInfo[];
|
|
23
27
|
}>;
|
|
24
|
-
|
|
25
|
-
|
|
28
|
+
/**
|
|
29
|
+
* 检查文件是否为规则文件
|
|
30
|
+
* @param filename 文件名
|
|
31
|
+
* @returns 是否为规则文件
|
|
32
|
+
*/
|
|
26
33
|
static isRuleFile(filename: string): boolean;
|
|
27
|
-
static
|
|
34
|
+
static supportCompile(filename: string): boolean;
|
|
35
|
+
/**
|
|
36
|
+
* 获取编译后的文件fullpath
|
|
37
|
+
* @param filepath 文件路径
|
|
38
|
+
* @returns 编译后的文件fullpath
|
|
39
|
+
*/
|
|
40
|
+
static getCompiledFilePath(filepath: string): string;
|
|
41
|
+
private static checkUuidDuplicate;
|
|
42
|
+
static isCompiledUdmFile(filename: string): boolean;
|
|
28
43
|
static isUDMFile(filename: string): boolean;
|
|
29
44
|
static isXmlFile(filename: string): boolean;
|
|
30
45
|
static getFilePath(fullPath: string): string;
|
|
31
46
|
private static readDirectory;
|
|
32
|
-
static getFileUuid(filename: string, filepath: string, dir: boolean): string | null
|
|
47
|
+
static getFileUuid(filename: string, filepath: string, dir: boolean): Promise<string | null>;
|
|
33
48
|
private static getTypeByFileName;
|
|
49
|
+
static getFileType(filename: string): string;
|
|
34
50
|
private static parse;
|
|
35
|
-
static parseUUID(filePath: string, key?: string): string
|
|
36
|
-
static parseTxtUUID(filePath: string, prefix: string): string
|
|
51
|
+
static parseUUID(filePath: string, key?: string): Promise<string>;
|
|
52
|
+
static parseTxtUUID(filePath: string, prefix: string): Promise<string>;
|
|
37
53
|
private static loadProjectProperties;
|
|
38
54
|
static getProjectUuid: () => Promise<string>;
|
|
39
55
|
static getProjectSourceFolder: () => Promise<string>;
|
|
40
56
|
/**
|
|
41
|
-
* 替换决策流中RuleNode
|
|
42
|
-
* @param filePath 文件路径
|
|
57
|
+
* 替换决策流中RuleNode下的包名,替换FileInfo中的path和name
|
|
43
58
|
* @param oldPath 旧包名
|
|
44
59
|
* @param newPath 新包名
|
|
45
60
|
*/
|
|
@@ -47,5 +62,71 @@ export declare class FileUtils {
|
|
|
47
62
|
private static doRefactorPackageName;
|
|
48
63
|
private static replacePackageName;
|
|
49
64
|
private static escapeRegExp;
|
|
65
|
+
static getCachedFileContent(path: string): string | null;
|
|
66
|
+
static clearFileContentCache(): void;
|
|
67
|
+
static getFilesInfo(): {
|
|
68
|
+
filesInfo: FileInfo[];
|
|
69
|
+
pathsInfo: FileInfo[];
|
|
70
|
+
allPathsInfo: FileInfo[];
|
|
71
|
+
};
|
|
72
|
+
static addFileInfo(filePath: string, fileName: string, uuid: string, type: string): void;
|
|
73
|
+
/**
|
|
74
|
+
* 创建文件信息对象
|
|
75
|
+
*/
|
|
76
|
+
private static createFileInfo;
|
|
77
|
+
/**
|
|
78
|
+
* 将文件信息添加到树形结构中
|
|
79
|
+
* 如果根据uuid判断文件已存在,则更新其name和path;不存在则添加
|
|
80
|
+
*/
|
|
81
|
+
static addFileInfoToTree(fileInfo: FileInfo): void;
|
|
82
|
+
/**
|
|
83
|
+
* 解析相对路径,返回路径部分数组
|
|
84
|
+
*/
|
|
85
|
+
private static parseRelativePath;
|
|
86
|
+
/**
|
|
87
|
+
* 查找父目录节点(不创建)
|
|
88
|
+
* @param pathParts 路径部分数组
|
|
89
|
+
* @returns 查找结果对象,包含父目录节点、已存在的路径和最后的已存在节点
|
|
90
|
+
*/
|
|
91
|
+
private static findParentDirectory;
|
|
92
|
+
/**
|
|
93
|
+
* 在指定节点列表中查找目录节点
|
|
94
|
+
* @param nodes 节点列表
|
|
95
|
+
* @param dirName 目录名称
|
|
96
|
+
* @returns 目录节点,如果不存在则返回null
|
|
97
|
+
*/
|
|
98
|
+
private static findDirectory;
|
|
99
|
+
/**
|
|
100
|
+
* 在树形结构中根据uuid查找文件信息
|
|
101
|
+
* @param uuid 文件uuid
|
|
102
|
+
* @returns 文件信息对象,如果不存在则返回null
|
|
103
|
+
*/
|
|
104
|
+
private static findFileInfoInTree;
|
|
105
|
+
/**
|
|
106
|
+
* 将文件信息添加到其他集合(pathsInfo、allPathsInfo)
|
|
107
|
+
*/
|
|
108
|
+
private static addFileInfoToCollections;
|
|
109
|
+
/**
|
|
110
|
+
* 检查UUID是否重复
|
|
111
|
+
*/
|
|
112
|
+
private static checkDuplicateUuid;
|
|
113
|
+
static removeFileInfo(filePath: string): void;
|
|
114
|
+
private static removeChildrenRecursive;
|
|
115
|
+
private static removeCompiledFiles;
|
|
116
|
+
private static removeFileInfoFromTree;
|
|
117
|
+
static doRemoveFileInfo(fileInfo: FileInfo): void;
|
|
118
|
+
static updateFileUuid(filePath: string, oldUuid: string, newUuid: string): void;
|
|
119
|
+
private static doUpdateFileUuidByPath;
|
|
120
|
+
static updateFileContentCache(filePath: string, content: string): void;
|
|
121
|
+
static writeFileWithCache(uri: vscode.Uri, content: string | Uint8Array): Promise<void>;
|
|
122
|
+
static checkCacheConsistency(filePath: string): Promise<boolean>;
|
|
123
|
+
static validateAndUpdateCache(filePath: string): Promise<boolean>;
|
|
124
|
+
static validateAndBatchUpdateCache(filePaths: string[]): Promise<{
|
|
125
|
+
updated: number;
|
|
126
|
+
failed: number;
|
|
127
|
+
}>;
|
|
128
|
+
static uriPathToFilePath(uri: vscode.Uri): string;
|
|
129
|
+
static getFileInfoFullPath(path: string): string;
|
|
130
|
+
static updateFilesInfo: (context: vscode.ExtensionContext) => Promise<void>;
|
|
50
131
|
}
|
|
51
132
|
export { FileInfo };
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import * as vscode from "vscode";
|
|
2
|
+
/**
|
|
3
|
+
* 预定义的输出通道类型
|
|
4
|
+
*/
|
|
5
|
+
export declare enum OutputChannelType {
|
|
6
|
+
REFACTOR = "UDM Refactor",
|
|
7
|
+
OPERATIONS = "UDM Operations",
|
|
8
|
+
SYNC = "UDM Sync",
|
|
9
|
+
COMPILE = "UDM Compile",
|
|
10
|
+
DEBUG = "UDM Debug"
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* 全局单例的 OutputChannel 管理类
|
|
14
|
+
* 用于统一管理所有操作的日志输出
|
|
15
|
+
* 支持多个独立的输出通道
|
|
16
|
+
*/
|
|
17
|
+
export declare class OutputChannelManager {
|
|
18
|
+
private static instance;
|
|
19
|
+
private channels;
|
|
20
|
+
private constructor();
|
|
21
|
+
/**
|
|
22
|
+
* 获取单例实例
|
|
23
|
+
*/
|
|
24
|
+
static getInstance(): OutputChannelManager;
|
|
25
|
+
/**
|
|
26
|
+
* 获取指定名称的 OutputChannel 实例
|
|
27
|
+
* 如果不存在则创建
|
|
28
|
+
* @param channelName 通道名称或类型
|
|
29
|
+
*/
|
|
30
|
+
getOutputChannel(channelName: string | OutputChannelType): vscode.OutputChannel;
|
|
31
|
+
/**
|
|
32
|
+
* 获取通道名称
|
|
33
|
+
* @param channelName 通道名称或类型
|
|
34
|
+
*/
|
|
35
|
+
private getChannelName;
|
|
36
|
+
/**
|
|
37
|
+
* 显示指定通道的输出面板
|
|
38
|
+
* @param channelName 通道名称或类型,默认为 OPERATIONS
|
|
39
|
+
* @param preserveFocus 是否保持当前焦点
|
|
40
|
+
*/
|
|
41
|
+
show(channelName?: string | OutputChannelType, preserveFocus?: boolean): void;
|
|
42
|
+
/**
|
|
43
|
+
* 在指定通道添加一行日志
|
|
44
|
+
* @param message 日志消息
|
|
45
|
+
* @param channelName 通道名称或类型,默认为 OPERATIONS
|
|
46
|
+
*/
|
|
47
|
+
appendLine(message: string, channelName?: string | OutputChannelType): void;
|
|
48
|
+
/**
|
|
49
|
+
* 在指定通道添加分隔线
|
|
50
|
+
* @param channelName 通道名称或类型,默认为 OPERATIONS
|
|
51
|
+
*/
|
|
52
|
+
appendSeparator(channelName?: string | OutputChannelType): void;
|
|
53
|
+
/**
|
|
54
|
+
* 在指定通道添加带时间戳的日志
|
|
55
|
+
* @param message 日志消息
|
|
56
|
+
* @param channelName 通道名称或类型,默认为 OPERATIONS
|
|
57
|
+
*/
|
|
58
|
+
appendLog(message: string, channelName?: string | OutputChannelType): void;
|
|
59
|
+
/**
|
|
60
|
+
* 在指定通道添加成功消息
|
|
61
|
+
* @param message 消息内容
|
|
62
|
+
* @param channelName 通道名称或类型,默认为 OPERATIONS
|
|
63
|
+
*/
|
|
64
|
+
appendSuccess(message: string, channelName?: string | OutputChannelType): void;
|
|
65
|
+
/**
|
|
66
|
+
* 在指定通道添加错误消息
|
|
67
|
+
* @param message 消息内容
|
|
68
|
+
* @param channelName 通道名称或类型,默认为 OPERATIONS
|
|
69
|
+
*/
|
|
70
|
+
appendError(message: string, channelName?: string | OutputChannelType): void;
|
|
71
|
+
/**
|
|
72
|
+
* 在指定通道添加警告消息
|
|
73
|
+
* @param message 消息内容
|
|
74
|
+
* @param channelName 通道名称或类型,默认为 OPERATIONS
|
|
75
|
+
*/
|
|
76
|
+
appendWarning(message: string, channelName?: string | OutputChannelType): void;
|
|
77
|
+
/**
|
|
78
|
+
* 在指定通道添加信息消息
|
|
79
|
+
* @param message 消息内容
|
|
80
|
+
* @param channelName 通道名称或类型,默认为 OPERATIONS
|
|
81
|
+
*/
|
|
82
|
+
appendInfo(message: string, channelName?: string | OutputChannelType): void;
|
|
83
|
+
/**
|
|
84
|
+
* 清空指定通道的输出面板
|
|
85
|
+
* @param channelName 通道名称或类型,默认为 OPERATIONS
|
|
86
|
+
*/
|
|
87
|
+
clear(channelName?: string | OutputChannelType): void;
|
|
88
|
+
/**
|
|
89
|
+
* 释放指定通道的资源
|
|
90
|
+
* @param channelName 通道名称或类型
|
|
91
|
+
*/
|
|
92
|
+
disposeChannel(channelName: string | OutputChannelType): void;
|
|
93
|
+
/**
|
|
94
|
+
* 释放所有通道的资源
|
|
95
|
+
*/
|
|
96
|
+
dispose(): void;
|
|
97
|
+
/**
|
|
98
|
+
* 格式化 UUID 显示
|
|
99
|
+
* @param uuid UUID 字符串
|
|
100
|
+
*/
|
|
101
|
+
formatUuid(uuid: string): string;
|
|
102
|
+
}
|
|
@@ -112,7 +112,4 @@ public class ActionUtils
|
|
|
112
112
|
public ActionUtils();
|
|
113
113
|
public static java.lang.Object print(java.lang.Object arg1);
|
|
114
114
|
public static void variableAssign(umd.OnlyVariable arg1,java.lang.Object arg2);
|
|
115
|
-
public static void insert(java.lang.Object arg1);
|
|
116
|
-
public static void update(java.lang.Object arg1);
|
|
117
|
-
public static void delete(java.lang.Object arg1);
|
|
118
115
|
}
|
|
@@ -170,7 +170,4 @@ udm.CompareUtils.dateEqualsMoreAndEqualsLess(java.util.Date,java.util.Date,java.
|
|
|
170
170
|
|
|
171
171
|
udm.ActionUtils#concept.label = _ActionUtils
|
|
172
172
|
udm.ActionUtils.print(java.lang.Object)#phrase.action = 打印{0}
|
|
173
|
-
udm.ActionUtils.insert(java.lang.Object)#phrase.action = 向工作区中插入对象{0}
|
|
174
|
-
udm.ActionUtils.update(java.lang.Object)#phrase.action = 更新工作区中对象{0}
|
|
175
|
-
udm.ActionUtils.delete(java.lang.Object)#phrase.action = 删除工作区中对象{0}
|
|
176
173
|
udm.ActionUtils.variableAssign(umd.OnlyVariable,java.lang.Object)#phrase.action = 设置{0}为{1}
|