taskConfiguration.ts ×22

Frontier kind: Code frontier

unlabeled · c_b20e5a57aa81

35 tests · 20941 LOC · 80 files · introduces 0 tests · 53 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
24 ranges53 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
2357 ranges20941 lines · 80 files · Browse complete extent
All tests (intent)
35 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

2 files ranked by introduced lines: 53 introduced LOC across 24 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/workbench/contrib/tasks/common/taskConfiguration.ts 48 introduced LOC · 22 ranges

Open complete file

729 const properties: IMetaData<Tasks.IRunOptions, void>[] = [{ property: 'reevaluateOnRerun' }, { property: 'runOn' }, { property: 'instanceLimit' }, { property: 'instancePolicy' }];
730 export function fromConfiguration(value: IRunOptionsConfig | undefined): Tasks.IRunOptions {
731 > return { taskConfiguration.ts
732 > reevaluateOnRerun: value ? value.reevaluateOnRerun : true,
733 > runOn: value ? RunOnOptions.fromString(value.runOn) : Tasks.RunOnOptions.default,
734 > instanceLimit: value?.instanceLimit ? Math.max(value.instanceLimit, 1) : 1,
735 > instancePolicy: value ? InstancePolicy.fromString(value.instancePolicy) : Tasks.InstancePolicy.prompt
736 > };
737 > }
738
739 export function assignProperties(target: Tasks.IRunOptions, source: Tasks.IRunOptions | undefined): Tasks.IRunOptions {
1211
1212 export function fromWithOsConfig(this: void, external: IConfigurationProperties & { [key: string]: unknown }, context: IParseContext): TaskConfigurationValueWithErrors<ProblemMatcher[]> {
1213 > let result: TaskConfigurationValueWithErrors<ProblemMatcher[]> = {}; taskConfiguration.ts
1214 > const osExternal = external as unknown as { windows?: { problemMatcher?: ProblemMatcherConfig.ProblemMatcherType }; osx?: { problemMatcher?: ProblemMatcherConfig.ProblemMatcherType }; linux?: { problemMatcher?: ProblemMatcherConfig.ProblemMatcherType } };
1215 > if (osExternal.windows?.problemMatcher && context.platform === Platform.Windows) {
1216 result = from(osExternal.windows.problemMatcher, context);
1217 > } else if (osExternal.osx?.problemMatcher && context.platform === Platform.Mac) { taskConfiguration.ts
1218 result = from(osExternal.osx.problemMatcher, context);
1219 > } else if (osExternal.linux?.problemMatcher && context.platform === Platform.Linux) { taskConfiguration.ts
1220 result = from(osExternal.linux.problemMatcher, context);
1221 > } else if (external.problemMatcher) { taskConfiguration.ts
1222 result = from(external.problemMatcher, context);
1223 }
1224 > return result; taskConfiguration.ts
1225 > }
1226
1227 export function from(this: void, config: ProblemMatcherConfig.ProblemMatcherType | undefined, context: IParseContext): TaskConfigurationValueWithErrors<ProblemMatcher[]> {
1347 namespace DependsOrder {
1348 export function from(order: string | undefined): Tasks.DependsOrder {
1349 > switch (order) { taskConfiguration.ts
1350 > case Tasks.DependsOrder.sequence:
1351 return Tasks.DependsOrder.sequence;
1352 > case Tasks.DependsOrder.parallel: taskConfiguration.ts
1353 > default:
1354 > return Tasks.DependsOrder.parallel;
1355 > }
1356 > }
1357 }
1358
1376
1377 export function from(this: void, external: IConfigurationProperties & { [key: string]: unknown }, context: IParseContext,
1378 > includeCommandOptions: boolean, source: TaskConfigSource, properties?: IJSONSchemaMap): TaskConfigurationValueWithErrors<Tasks.IConfigurationProperties> { taskConfiguration.ts
1379 > if (!external) {
1380 return {};
1381 }
1382 > const result: Tasks.IConfigurationProperties & { [key: string]: unknown } = {}; taskConfiguration.ts
1383 >
1384 > if (properties) {
1385 for (const propertyName of Object.keys(properties)) {
1386 if (external[propertyName] !== undefined) {
1389 }
1390 }
1392 > if (Types.isString(external.taskName)) {
1393 result.name = external.taskName;
1394 }
1395 > if (Types.isString(external.label) && context.schemaVersion === Tasks.JsonSchemaVersion.V2_0_0) { taskConfiguration.ts
1396 result.name = external.label;
1397 }
1398 > if (Types.isString(external.identifier)) { taskConfiguration.ts
1399 result.identifier = external.identifier;
1400 }
1401 > result.icon = external.icon; taskConfiguration.ts
1402 > result.hide = external.hide;
1403 > result.inAgents = external.inAgents;
1404 > if (external.isBackground !== undefined) {
1405 result.isBackground = !!external.isBackground;
1406 }
1407 > if (external.promptOnClose !== undefined) { taskConfiguration.ts
1408 result.promptOnClose = !!external.promptOnClose;
1409 }
1410 > result.group = GroupKind.from(external.group); taskConfiguration.ts
1411 > if (external.dependsOn !== undefined) {
1412 if (Array.isArray(external.dependsOn)) {
1413 result.dependsOn = external.dependsOn.reduce((dependencies: Tasks.ITaskDependency[], item): Tasks.ITaskDependency[] => {
1423 }
1424 }
1425 > result.dependsOrder = DependsOrder.from(external.dependsOrder); taskConfiguration.ts
1426 > if (includeCommandOptions && (external.presentation !== undefined || (external as ILegacyCommandProperties).terminal !== undefined)) {
1427 result.presentation = CommandConfiguration.PresentationOptions.from(external, context);
1428 }
1429 > if (includeCommandOptions && (external.options !== undefined)) { taskConfiguration.ts
1430 result.options = CommandOptions.from(external.options, context);
1431 }
1432 > const configProblemMatcher = ProblemMatcherConverter.fromWithOsConfig(external, context); taskConfiguration.ts
1433 > if (configProblemMatcher.value !== undefined) {
1434 result.problemMatchers = configProblemMatcher.value;
1435 }
1436 > if (external.detail) { taskConfiguration.ts
1437 result.detail = external.detail;
1438 }
1439 > return isEmpty(result) ? {} : { value: result, errors: configProblemMatcher.errors }; taskConfiguration.ts
1440 > }
1441
1442 export function isEmpty(this: void, value: Tasks.IConfigurationProperties): boolean {
1443 > return _isEmpty(value, properties); taskConfiguration.ts
1444 > }
1445 }
1446 const label = 'Workspace';
src/vs/workbench/contrib/tasks/common/tasks.ts 5 introduced LOC · 2 ranges

Open complete file

717
718 public addTaskLoadMessages(messages: string[] | undefined) {
719 > if (this._taskLoadMessages === undefined) { tasks.ts
720 > this._taskLoadMessages = [];
721 > }
722 > if (messages) {
723 this._taskLoadMessages = this._taskLoadMessages.concat(messages);
724 }
725 > } tasks.ts
726
727 get taskLoadMessages(): string[] | undefined {