@finos/legend-application-pure-ide
Version:
Legend Pure IDE application core
167 lines (154 loc) • 5.67 kB
text/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 { CommandConfigData } from '@finos/legend-application';
export enum LEGEND_PURE_IDE_COMMAND_KEY {
SEARCH_FILE = 'editor.search.file',
SEARCH_TEXT = 'editor.search.text',
GO_TO_FILE = 'editor.go-to-file',
TOGGLE_TERMINAL_PANEL = 'editor.toggle-terminal-panel',
EXECUTE = 'editor.execute',
FULL_RECOMPILE = 'editor.full-compile',
FULL_RECOMPILE_WITH_FULL_INIT = 'editor.full-compile.with-init',
RUN_ALL_TESTS = 'editor.run-all-tests',
RUN_RELAVANT_TESTS = 'editor.run-relavant-tests',
}
export const LEGEND_PURE_IDE_COMMAND_CONFIG: CommandConfigData = {
[]: {
title: 'Search for file',
defaultKeyboardShortcut: 'Control+Shift+KeyN',
additionalKeyboardShortcuts: ['Control+KeyP', 'Meta+KeyP'],
},
[]: {
title: 'Search text',
defaultKeyboardShortcut: 'Control+Shift+KeyF',
additionalKeyboardShortcuts: ['Meta+Shift+KeyF'],
},
[]: {
title: 'Go to file',
defaultKeyboardShortcut: 'Control+F1',
},
[]: {
title: 'Toggle terminal',
defaultKeyboardShortcut: 'Control+Backquote',
},
[]: {
title: 'Execute',
defaultKeyboardShortcut: 'F9',
},
[]: {
title: 'Run full re-compilation',
defaultKeyboardShortcut: 'F11',
},
[]: {
title: 'Run full re-compilation',
defaultKeyboardShortcut: 'Shift+F11',
},
[]: {
title: 'Run all tests',
defaultKeyboardShortcut: 'F10',
},
[]: {
title: 'Run relavant tests',
defaultKeyboardShortcut: 'Shift+F10',
},
};
export enum LEGEND_PURE_IDE_DIAGRAM_EDITOR_COMMAND_KEY {
RECENTER = 'editor.diagram-editor.recenter',
USE_ZOOM_TOOL = 'editor.diagram-editor.use-zoom-tool',
USE_VIEW_TOOL = 'editor.diagram-editor.use-view-tool',
USE_PAN_TOOL = 'editor.diagram-editor.use-pan-tool',
}
export const LEGEND_PURE_IDE_DIAGRAM_EDITOR_COMMAND_CONFIG: CommandConfigData =
{
[]: {
title: 'Diagram Editor: Recenter',
defaultKeyboardShortcut: 'KeyR',
},
[]: {
title: 'Diagram Editor: Use zoom tool',
defaultKeyboardShortcut: 'KeyZ',
},
[]: {
title: 'Diagram Editor: Use view tool',
defaultKeyboardShortcut: 'KeyV',
},
[]: {
title: 'Diagram Editor: Use pan tool',
defaultKeyboardShortcut: 'KeyM',
},
};
export enum LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_KEY {
TOGGLE_TEXT_WRAP = 'editor.file-editor.toggle-text-wrap',
REVEAL_CONCEPT_IN_TREE = 'editor.file-editor.reveal-concept-in-tree',
GO_TO_DEFINITION = 'editor.file-editor.go-to-definition',
GO_BACK = 'editor.file-editor.go-back',
FIND_USAGES = 'editor.file-editor.find-usage',
RENAME_CONCEPT = 'editor.file-editor.rename-concept',
GO_TO_LINE = 'editor.file-editor.go-to-line',
DELETE_LINE = 'editor.file-editor.delete-line',
}
export const LEGEND_PURE_IDE_PURE_FILE_EDITOR_COMMAND_CONFIG: CommandConfigData =
{
[]: {
title: 'Toggle Text-wrap (File)',
defaultKeyboardShortcut: 'Alt+KeyZ',
},
[]: {
title: 'Reveal Concept in Tree (File)',
defaultKeyboardShortcut: 'Control+Shift+KeyB',
},
[]: {
title: 'Go to Definition (File)',
defaultKeyboardShortcut: 'Control+KeyB',
},
[]: {
title: 'Go Back (File)',
defaultKeyboardShortcut: 'Control+Alt+KeyB',
},
[]: {
title: 'Find Usages (File)',
defaultKeyboardShortcut: 'Alt+F7',
},
[]: {
title: 'Rename Concept (File)',
defaultKeyboardShortcut: 'F2',
},
[]: {
title: 'Go to Line (File)',
defaultKeyboardShortcut: 'Control+KeyG',
},
[]: {
title: 'Delete Line (File)',
defaultKeyboardShortcut: 'Control+KeyD',
},
};
export enum LEGEND_PURE_IDE_TERMINAL_COMMAND {
GO = 'go',
TEST = 'test',
REMOVE = 'rm',
MOVE = 'mv',
NEW_DIRECTORY = 'mkdir',
NEW_FILE = 'touch',
OPEN_FILE = 'open',
OPEN_DIRECTORY = 'cd',
LIST_DIRECTORY = 'ls',
WELCOME = 'welcome',
ECHO = 'echo',
CLEAR = 'clear',
ANSI = 'ansi',
HELP = 'help',
DEBUG = 'debug',
}