@finos/legend-studio
Version:
43 lines • 2.04 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 { ELEMENT_NATIVE_VIEW_MODE } from '../../EditorConfig.js';
import { EditorState } from '../../editor-state/EditorState.js';
import { type GeneratorFn } from '@finos/legend-shared';
import { type CompilationError, type PackageableElement } from '@finos/legend-graph';
export declare abstract class ElementEditorState extends EditorState {
element: PackageableElement;
editMode: ELEMENT_NATIVE_VIEW_MODE;
generationViewMode?: string | undefined;
textContent: string;
isReadOnly: boolean;
constructor(editorStore: EditorStore, element: PackageableElement);
get headerName(): string;
setTextContent(text: string): void;
setEditMode(mode: ELEMENT_NATIVE_VIEW_MODE): void;
setGenerationViewMode(mode: string | undefined): void;
generateElementProtocol(): void;
generateElementGrammar(): GeneratorFn<void>;
/**
* Takes the compilation and based on its source information, attempts to reveal the error
* in the editor. The return values indicates if the editor has revealed the error successfully or not.
*/
revealCompilationError(compilationError: CompilationError): boolean;
get hasCompilationError(): boolean;
clearCompilationError(): void;
abstract reprocess(newElement: PackageableElement, editorStore: EditorStore): ElementEditorState;
}
//# sourceMappingURL=ElementEditorState.d.ts.map