@finos/legend-studio
Version:
44 lines • 2.63 kB
TypeScript
/**
* Copyright (c) 2020-present, Goldman Sachs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type { EditorStore } from '../EditorStore.js';
import type { TreeData } from '@finos/legend-art';
import { type GenerationTreeNodeData, type GenerationFile, type GenerationOutputResult, GenerationDirectory } from '../shared/FileGenerationTreeUtil.js';
import { type GeneratorFn } from '@finos/legend-shared';
import { type FileGenerationSpecification, type GenerationOutput, type GenerationProperty, PackageableElement, PackageableElementReference } from '@finos/legend-graph';
export declare class FileGenerationState {
editorStore: EditorStore;
fileGeneration: FileGenerationSpecification;
isGenerating: boolean;
root: GenerationDirectory;
directoryTreeData?: TreeData<GenerationTreeNodeData> | undefined;
selectedNode?: GenerationTreeNodeData | undefined;
filesIndex: Map<string, GenerationFile>;
constructor(editorStore: EditorStore, fileGeneration: FileGenerationSpecification);
resetFileGeneration(): void;
setIsGeneration(isGenerating: boolean): void;
setDirectoryTreeData(directoryTreeData: TreeData<GenerationTreeNodeData>): void;
getOrCreateDirectory: (directoryName: string) => GenerationDirectory;
generate(): GeneratorFn<void>;
processGenerationResult(output: GenerationOutput[]): void;
reprocessNodeTree(generationResult: GenerationOutputResult[], treeData: TreeData<GenerationTreeNodeData>, openedNodeIds: string[]): void;
setSelectedNode(node?: GenerationTreeNodeData): void;
onTreeNodeSelect(node: GenerationTreeNodeData, treeData: TreeData<GenerationTreeNodeData>): void;
getScopeElement(element: PackageableElement | string): PackageableElementReference<PackageableElement> | string | undefined;
addScopeElement(element: PackageableElement | string): void;
deleteScopeElement(element: PackageableElement | string): void;
updateFileGenerationParameters(fileGeneration: FileGenerationSpecification, generationProperty: GenerationProperty, newValue: unknown): void;
}
//# sourceMappingURL=FileGenerationState.d.ts.map