@finos/legend-application-studio
Version:
Legend Studio application core
77 lines • 3.9 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 PackageableElement, type TextCompilationResult, type GraphManagerOperationReport, type GraphTextInputOption } from '@finos/legend-graph';
import { type GeneratorFn } from '@finos/legend-shared';
import type { Entity } from '@finos/legend-storage';
import { GrammarTextEditorState } from './editor-state/GrammarTextEditorState.js';
import type { EditorStore } from './EditorStore.js';
import { type Problem } from './EditorGraphState.js';
import { GRAPH_EDITOR_MODE } from './EditorConfig.js';
import { GraphEditorMode } from './GraphEditorMode.js';
import type { FileSystem_File } from './utils/FileSystemTreeUtils.js';
export declare enum GRAMMAR_MODE_EDITOR_ACTION {
GO_TO_ELEMENT_DEFINITION = "go-to-element-definition"
}
export declare class GraphEditGrammarModeState extends GraphEditorMode {
grammarTextEditorState: GrammarTextEditorState;
generatedFile: FileSystem_File | undefined;
constructor(editorStore: EditorStore);
get headerLabel(): string;
setGeneratedFile(val: FileSystem_File | undefined): void;
initialize(isFallback?: {
isCompilationFailure?: boolean;
isGraphBuildFailure?: boolean;
useStoredEntities?: boolean;
}): GeneratorFn<void>;
goToElement(elementPath: string): GeneratorFn<void>;
compileText(options?: {
onError?: () => void;
}, report?: GraphManagerOperationReport): GeneratorFn<TextCompilationResult>;
getCurrentGraphHash(): string;
getUnknownPackageableElementsAsEntities(): Entity[];
addElement(element: PackageableElement, packagePath: string | undefined, openAfterCreate: boolean): GeneratorFn<void>;
deleteElement(element: PackageableElement): GeneratorFn<void>;
renameElement(element: PackageableElement, newPath: string): GeneratorFn<void>;
getGraphTextInputOption(): GraphTextInputOption | undefined;
get mode(): GRAPH_EDITOR_MODE;
/**
* Creates a new explorer tree state when compiling in text mode. It resets the explorer state properly
* after the new graph is built. It tries to maintain the explorer state similar to what it was before compilation.
* To achieve that we store node ids of the opened nodes before creating a new explorer state. After creating a
* new state we open the nodes which were opened before so that user see the same explorer state as before.
*/
reprocessExplorerTreeInTextMode(): void;
updateGraphAndApplication(entities: Entity[]): GeneratorFn<void>;
globalCompile(options?: {
ignoreBlocking?: boolean | undefined;
suppressCompilationFailureMessage?: boolean | undefined;
disableNotificationOnSuccess?: boolean | undefined;
openConsole?: boolean;
}): GeneratorFn<void>;
goToProblem(problem: Problem): void;
onLeave(fallbackOptions?: {
isCompilationFailure?: boolean;
isGraphBuildFailure?: boolean;
}): GeneratorFn<void>;
handleCleanupFailure(error: unknown): GeneratorFn<void>;
cleanupBeforeEntering(fallbackOptions?: {
isCompilationFailure?: boolean;
isGraphBuildFailure?: boolean;
}): GeneratorFn<void>;
openFileSystem_File(file: FileSystem_File): void;
openElement(element: PackageableElement): void;
}
//# sourceMappingURL=GraphEditGrammarModeState.d.ts.map