UNPKG

@finos/legend-application-pure-ide

Version:
132 lines 7.33 kB
/** * 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 { PANEL_MODE } from './PureIDEConfig.js'; import { FileCoordinate } from '../server/models/File.js'; import { DirectoryTreeState } from './DirectoryTreeState.js'; import { ConceptTreeState } from './ConceptTreeState.js'; import { type InitializationActivity } from '../server/models/Initialization.js'; import { type CandidateWithPackageNotImported, type ExecutionResult } from '../server/models/Execution.js'; import { TestRunnerState } from './TestRunnerState.js'; import { type ConceptInfo, Usage } from '../server/models/Usage.js'; import { type CommandResult } from '../server/models/Command.js'; import { type CommandRegistrar } from '@finos/legend-application'; import { type GeneratorFn, type PlainObject, ActionState } from '@finos/legend-shared'; import { PureServerClient as PureServerClient } from '../server/PureServerClient.js'; import { PanelDisplayState } from '@finos/legend-art'; import type { LegendPureIDEApplicationStore } from './LegendPureIDEBaseStore.js'; import { FileSearchCommandState } from './FileSearchCommandState.js'; import { PureIDETabManagerState } from './PureIDETabManagerState.js'; import { type CodeFixSuggestion } from './CodeFixSuggestion.js'; import { ReferenceUsageResult } from './ReferenceUsageResult.js'; import { TextSearchState } from './TextSearchState.js'; import { PCTAdapter } from '../server/models/Test.js'; export declare class PureIDEStore implements CommandRegistrar { readonly applicationStore: LegendPureIDEApplicationStore; readonly initState: ActionState; readonly directoryTreeState: DirectoryTreeState; readonly conceptTreeState: ConceptTreeState; readonly client: PureServerClient; activePanelMode: PANEL_MODE; readonly panelGroupDisplayState: PanelDisplayState; activeActivity?: string; readonly sideBarDisplayState: PanelDisplayState; readonly tabManagerState: PureIDETabManagerState; readonly executionState: ActionState; navigationStack: FileCoordinate[]; readonly fileSearchCommandLoadState: ActionState; readonly fileSearchCommandState: FileSearchCommandState; openFileSearchCommand: boolean; fileSearchCommandResults: string[]; codeFixSuggestion?: CodeFixSuggestion | undefined; readonly referenceUsageLoadState: ActionState; referenceUsageResult?: ReferenceUsageResult | undefined; readonly textSearchState: TextSearchState; readonly testRunState: ActionState; testRunnerState?: TestRunnerState | undefined; PCTAdapters: PCTAdapter[]; selectedPCTAdapter?: PCTAdapter | undefined; PCTRunPath?: string | undefined; constructor(applicationStore: LegendPureIDEApplicationStore); setOpenFileSearchCommand(val: boolean): void; setSelectedPCTAdapter(val: PCTAdapter | undefined): void; setPCTRunPath(val: string | undefined): void; setActivePanelMode(val: PANEL_MODE): void; setCodeFixSuggestion(val: CodeFixSuggestion | undefined): void; setReferenceUsageResult(val: ReferenceUsageResult | undefined): void; setTestRunnerState(val: TestRunnerState | undefined): void; cleanUp(): void; /** * This is the entry of the app logic where initialization of editor states happens * Here, we ensure the order of calls after checking existence of current project and workspace * If either of them does not exist, we cannot proceed. */ initialize(fullInit: boolean, func: (() => Promise<void>) | undefined, mode: string | undefined, fastCompile: string | undefined): GeneratorFn<void>; checkIfSessionWakingUp(message?: string): GeneratorFn<void>; pullInitializationActivity(fn?: (activity: InitializationActivity) => void): Promise<void>; registerCommands(): void; deregisterCommands(): void; setActiveActivity(activity: string, options?: { keepShowingIfMatchedCurrent?: boolean; }): void; loadDiagram(filePath: string, diagramPath: string, line: number, column: number): GeneratorFn<void>; loadFile(filePath: string, coordinate?: FileCoordinate): GeneratorFn<void>; reloadFile(filePath: string): Promise<void>; execute(url: string, extraParams: Record<PropertyKey, unknown>, checkExecutionStatus: boolean, manageResult: (result: ExecutionResult, potentiallyAffectedFiles: string[]) => Promise<void>, command: string | undefined, options?: { /** * Some execution, such as find concept produces no output * so we should not reset the console text in that case */ silentTerminalOnSuccess?: boolean; clearTerminal?: boolean; }): GeneratorFn<void>; pullExecutionStatus(): Promise<void>; executeGo(): GeneratorFn<void>; runDebugger(command: { args: string[]; }): GeneratorFn<void>; manageExecuteGoResult(result: ExecutionResult, potentiallyAffectedFiles: string[]): GeneratorFn<void>; executeTests(path: string, relevantTestsOnly?: boolean | undefined, pctAdapter?: string | undefined): GeneratorFn<void>; executeFullTestSuite(relevantTestsOnly?: boolean): GeneratorFn<void>; executeNavigation(coordinate: FileCoordinate): GeneratorFn<void>; navigateBack(): GeneratorFn<void>; fullReCompile(fullInit: boolean): GeneratorFn<void>; resetChangeDetection(files: string[]): void; refreshTrees(): Promise<void>; revealConceptInTree(coordinate: FileCoordinate): Promise<void>; command(fn: () => Promise<PlainObject<CommandResult>>, command: string): GeneratorFn<boolean>; getConceptInfo(coordinate: FileCoordinate, options?: { silent?: boolean | undefined; }): Promise<ConceptInfo | undefined>; findConceptUsages(func: string, param: string[]): Promise<Usage[]>; findUsagesFromCoordinate(coordinate: FileCoordinate): GeneratorFn<void>; findUsages(concept: ConceptInfo): GeneratorFn<void>; renameConcept(oldName: string, newName: string, pureType: string, usages: Usage[]): GeneratorFn<void>; movePackageableElements(inputs: { pureName: string; pureType: string; sourcePackage: string; destinationPackage: string; usages: Usage[]; }[]): GeneratorFn<void>; updateFileUsingSuggestionCandidate(candidate: CandidateWithPackageNotImported): GeneratorFn<void>; updateFile(path: string, line: number, column: number, add: boolean, message: string): GeneratorFn<void>; searchFile(): GeneratorFn<void>; createNewDirectory(path: string): GeneratorFn<void>; createNewFile(path: string): GeneratorFn<void>; renameFile(oldPath: string, newPath: string): GeneratorFn<void>; deleteDirectoryOrFile(path: string, isDirectory: boolean | undefined, hasChildContent: boolean | undefined): GeneratorFn<void>; } //# sourceMappingURL=PureIDEStore.d.ts.map