55import { localize } from "../util/i18nUtil" ;
66
77// ---------------------------------------------------------------------------
8- // New contextValue scheme: libertyProject:{tool}[:{container|aggregator}]
9- // Use the helpers below (isMaven, isGradle, isContainer, isAggregator) instead
10- // of direct string comparisons throughout the codebase .
8+ // Project Context Values
9+ // contextValue scheme: libertyProject:{tool}[:{container|aggregator}]
10+ // Use the helpers below instead of direct string comparisons.
1111// ---------------------------------------------------------------------------
12- export const LIBERTY_PROJECT_MAVEN = "libertyProject:maven" ;
13- export const LIBERTY_PROJECT_GRADLE = "libertyProject:gradle" ;
14- export const LIBERTY_PROJECT_MAVEN_CONTAINER = "libertyProject:maven:container" ;
15- export const LIBERTY_PROJECT_GRADLE_CONTAINER = "libertyProject:gradle:container" ;
16- export const LIBERTY_PROJECT_MAVEN_AGGREGATOR = "libertyProject:maven:aggregator" ;
12+ export const LIBERTY_PROJECT_MAVEN = "libertyProject:maven" ;
13+ export const LIBERTY_PROJECT_GRADLE = "libertyProject:gradle" ;
14+ export const LIBERTY_PROJECT_MAVEN_CONTAINER = "libertyProject:maven:container" ;
15+ export const LIBERTY_PROJECT_GRADLE_CONTAINER = "libertyProject:gradle:container" ;
16+ export const LIBERTY_PROJECT_MAVEN_AGGREGATOR = "libertyProject:maven:aggregator" ;
1717export const LIBERTY_PROJECT_GRADLE_AGGREGATOR = "libertyProject:gradle:aggregator" ;
1818
1919/** Returns true for any libertyProject contextValue (maven or gradle, any variant). */
@@ -37,36 +37,64 @@ export function isAggregator(contextValue: string): boolean {
3737 return / ^ l i b e r t y P r o j e c t .* : a g g r e g a t o r / . test ( contextValue ) ;
3838}
3939
40- export const TEST_REPORT_STRING = "Test Summary" ;
41- export const LIBERTY_DASHBOARD_WORKSPACE_STORAGE_KEY = "liberty.dashboard.data" ;
42- export const LIBERTY_MAVEN_PLUGIN_CONTAINER_VERSION = "3.3.0" ;
43- export const LIBERTY_GRADLE_PLUGIN_CONTAINER_VERSION = "3.1.0" ;
44- export const LIBERTY_SERVER_ENV_PORT_REGEX = / ^ W L P _ D E B U G _ A D D R E S S = ( [ \d ] + ) $ / ;
45-
46- export const MAVEN_GOAL_DEV = "io.openliberty.tools:liberty-maven-plugin:dev" ;
40+ // ---------------------------------------------------------------------------
41+ // Dev Mode
42+ // Maven goals are passed to the Maven executable (mvn/mvnw) via terminal.
43+ // Gradle tasks are passed to the Gradle executable (gradle/gradlew) via terminal.
44+ // Container version thresholds gate whether devc is available for a project.
45+ // ---------------------------------------------------------------------------
46+ export const MAVEN_GOAL_DEV = "io.openliberty.tools:liberty-maven-plugin:dev" ;
4747export const MAVEN_GOAL_DEVC = "io.openliberty.tools:liberty-maven-plugin:devc" ;
4848
49- export const GRADLE_TASK_DEV = "libertyDev" ;
49+ export const GRADLE_TASK_DEV = "libertyDev" ;
5050export const GRADLE_TASK_DEVC = "libertyDevc" ;
5151
52- export const EXCLUDED_DIR_PATTERN = "**/{bin,classes,target,build}/**" ;
53- export const COMMAND_TITLES = new Map ( ) ;
54- export const UNTITLED_WORKSPACE = "Untitled (Workspace)" ;
55- COMMAND_TITLES . set ( localize ( "hotkey.commands.title.refresh" ) , "liberty.explorer.refresh" ) ;
56-
57- COMMAND_TITLES . set ( localize ( "hotkey.commands.title.start" ) , "liberty.dev.start" ) ;
58- COMMAND_TITLES . set ( localize ( "hotkey.commands.title.start.custom" ) , "liberty.dev.custom" ) ;
59- COMMAND_TITLES . set ( localize ( "hotkey.commands.title.start.in.container" ) , "liberty.dev.start.container" ) ;
52+ export const LIBERTY_MAVEN_PLUGIN_CONTAINER_VERSION = "3.3.0" ;
53+ export const LIBERTY_GRADLE_PLUGIN_CONTAINER_VERSION = "3.1.0" ;
6054
61- COMMAND_TITLES . set ( localize ( "hotkey.commands.title.debug" ) , "liberty.dev.debug" ) ;
55+ // ---------------------------------------------------------------------------
56+ // VS Code Commands
57+ // Must match package.json contributes.commands[].command declarations.
58+ // ---------------------------------------------------------------------------
59+ export const CMD_EXPLORER_REFRESH = "liberty.explorer.refresh" ;
60+ export const CMD_SHOW_COMMANDS = "liberty.dev.show.commands" ;
61+ export const CMD_OPEN_BUILD_FILE = "liberty.dev.open.build.file" ;
62+ export const CMD_START = "liberty.dev.start" ;
63+ export const CMD_DEBUG = "liberty.dev.debug" ;
64+ export const CMD_STOP = "liberty.dev.stop" ;
65+ export const CMD_CUSTOM = "liberty.dev.custom" ;
66+ export const CMD_START_CONTAINER = "liberty.dev.start.container" ;
67+ export const CMD_RUN_TESTS = "liberty.dev.run.tests" ;
68+ export const CMD_OPEN_FAILSAFE_REPORT = "liberty.dev.open.failsafe.report" ;
69+ export const CMD_OPEN_SUREFIRE_REPORT = "liberty.dev.open.surefire.report" ;
70+ export const CMD_OPEN_GRADLE_TEST_REPORT = "liberty.dev.open.gradle.test.report" ;
71+ export const CMD_ADD_PROJECT = "liberty.dev.add.project" ;
72+ export const CMD_REMOVE_PROJECT = "liberty.dev.remove.project" ;
6273
63- COMMAND_TITLES . set ( localize ( "hotkey.commands.title.stop" ) , "liberty.dev.stop" ) ;
74+ export const COMMAND_TITLES = new Map ( ) ;
75+ COMMAND_TITLES . set ( localize ( "hotkey.commands.title.refresh" ) , CMD_EXPLORER_REFRESH ) ;
76+ COMMAND_TITLES . set ( localize ( "hotkey.commands.title.start" ) , CMD_START ) ;
77+ COMMAND_TITLES . set ( localize ( "hotkey.commands.title.start.custom" ) , CMD_CUSTOM ) ;
78+ COMMAND_TITLES . set ( localize ( "hotkey.commands.title.start.in.container" ) , CMD_START_CONTAINER ) ;
79+ COMMAND_TITLES . set ( localize ( "hotkey.commands.title.debug" ) , CMD_DEBUG ) ;
80+ COMMAND_TITLES . set ( localize ( "hotkey.commands.title.stop" ) , CMD_STOP ) ;
81+ COMMAND_TITLES . set ( localize ( "hotkey.commands.title.run.tests" ) , CMD_RUN_TESTS ) ;
82+ COMMAND_TITLES . set ( localize ( "hotkey.commands.title.view.integration.test.report" ) , CMD_OPEN_FAILSAFE_REPORT ) ;
83+ COMMAND_TITLES . set ( localize ( "hotkey.commands.title.view.unit.test.report" ) , CMD_OPEN_SUREFIRE_REPORT ) ;
84+ COMMAND_TITLES . set ( localize ( "hotkey.commands.title.view.test.report" ) , CMD_OPEN_GRADLE_TEST_REPORT ) ;
85+ COMMAND_TITLES . set ( localize ( "hotkey.commands.title.add.project" ) , CMD_ADD_PROJECT ) ;
86+ COMMAND_TITLES . set ( localize ( "hotkey.commands.title.remove.project" ) , CMD_REMOVE_PROJECT ) ;
87+ COMMAND_TITLES . set ( localize ( "hotkey.commands.title.open.build.file" ) , CMD_OPEN_BUILD_FILE ) ;
6488
65- COMMAND_TITLES . set ( localize ( "hotkey.commands.title.run.tests" ) , "liberty.dev.run.tests" ) ;
66- COMMAND_TITLES . set ( localize ( "hotkey.commands.title.view.integration.test.report" ) , "liberty.dev.open.failsafe.report" ) ;
67- COMMAND_TITLES . set ( localize ( "hotkey.commands.title.view.unit.test.report" ) , "liberty.dev.open.surefire.report" ) ;
68- COMMAND_TITLES . set ( localize ( "hotkey.commands.title.view.test.report" ) , "liberty.dev.open.gradle.test.report" ) ;
89+ // ---------------------------------------------------------------------------
90+ // Project Discovery
91+ // ---------------------------------------------------------------------------
92+ export const EXCLUDED_DIR_PATTERN = "**/{bin,classes,target,build}/**" ;
6993
70- COMMAND_TITLES . set ( localize ( "hotkey.commands.title.add.project" ) , "liberty.dev.add.project" ) ;
71- COMMAND_TITLES . set ( localize ( "hotkey.commands.title.remove.project" ) , "liberty.dev.remove.project" ) ;
72- COMMAND_TITLES . set ( localize ( "hotkey.commands.title.open.build.file" ) , "liberty.dev.open.build.file" ) ;
94+ // ---------------------------------------------------------------------------
95+ // Runtime
96+ // ---------------------------------------------------------------------------
97+ export const LIBERTY_SERVER_ENV_PORT_REGEX = / ^ W L P _ D E B U G _ A D D R E S S = ( [ \d ] + ) $ / ;
98+ export const LIBERTY_DASHBOARD_WORKSPACE_STORAGE_KEY = "liberty.dashboard.data" ;
99+ export const TEST_REPORT_STRING = "Test Summary" ;
100+ export const UNTITLED_WORKSPACE = "Untitled (Workspace)" ;
0 commit comments