Skip to content

Commit

Permalink
Removing task provider. (microsoft/vscode#33523)
Browse files Browse the repository at this point in the history
  • Loading branch information
joelday committed Mar 18, 2019
1 parent 8c7d3ee commit 6cf3556
Show file tree
Hide file tree
Showing 8 changed files with 134 additions and 557 deletions.
3 changes: 0 additions & 3 deletions package-lock.json

This file was deleted.

183 changes: 2 additions & 181 deletions src/papyrus-lang-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"onLanguage:papyrus",
"onLanguage:papyrus-project",
"workspaceContains:**/*.psc",
"workspaceContains:**/*.ppj"
"workspaceContains:**/*.ppj",
"onCommand:workbench.action.tasks.runTask"
],
"author": {
"email": "joelday@gmail.com",
Expand All @@ -17,186 +18,6 @@
"Programming Languages"
],
"contributes": {
"taskDefinitions": [
{
"type": "papyrus",
"properties": {
"papyrus": {
"properties": {
"game": {
"enum": [
"fallout4",
"skyrim",
"skyrimSpecialEdition"
],
"description": "Which compiler to use."
},
"imports": {
"type": "array",
"items": [
{
"type": "string"
}
],
"uniqueItems": true,
"description": "The compiler's import directories."
},
"flags": {
"type": "string",
"description": "The file to use for user-defined flags."
},
"optimize": {
"type": "boolean",
"description": "Turns on optimization of scripts."
},
"emitCompiledScripts": {
"type": "boolean",
"description": "Generate compiled script (.pex) files."
},
"emitAssemblyFiles": {
"type": "boolean",
"description": "Generate assembly (.pas) files."
},
"debugOutput": {
"type": "boolean",
"description": "Turns on compiler debugging, outputting dev information to the screen."
},
"output": {
"type": "string",
"description": "The compiler's output directory."
}
},
"anyOf": [
{
"properties": {
"game": {
"enum": [
"fallout4"
]
},
"final": {
"type": "boolean",
"default": false,
"description": "Turns on final-mode processing, removing beta code from the script."
},
"release": {
"type": "boolean",
"default": false,
"description": "Turns on release-mode processing, removing debug code from the script."
}
},
"anyOf": [
{
"properties": {
"project": {
"type": "string",
"description": "A Papyrus project file (.ppj) to use for compilation."
}
},
"required": [
"project"
]
},
{
"properties": {
"scripts": {
"oneOf": [
{
"properties": {
"folder": {
"type": "string"
},
"noRecurse": {
"type": "boolean",
"default": false,
"description": "Tells the compiler not to recurse into subdirectories."
}
},
"required": [
"folder"
],
"additionalProperties": false
},
{
"properties": {
"file": {
"type": "string"
}
},
"required": [
"file"
],
"additionalProperties": false
}
]
}
},
"required": [
"scripts"
]
}
]
},
{
"properties": {
"game": {
"enum": [
"skyrim",
"skyrimSpecialEdition"
]
},
"scripts": {
"oneOf": [
{
"properties": {
"folder": {
"type": "string"
}
},
"required": [
"folder"
],
"additionalProperties": false
},
{
"properties": {
"file": {
"type": "string"
}
},
"required": [
"file"
],
"additionalProperties": false
}
]
}
},
"required": [
"scripts"
],
"not": {
"properties": {
"project": {
"type": "string"
}
},
"required": [
"project"
]
}
}
],
"required": [
"game"
]
}
},
"required": [
"papyrus"
]
}
],
"configuration": {
"properties": {
"papyrus.fallout4.enabled": {
Expand Down
8 changes: 4 additions & 4 deletions src/papyrus-lang-vscode/src/PapyrusExtension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { LanguageClientManager, ILanguageClientManager } from './server/Language
import { LanguageServiceStatusItems } from './features/LanguageServiceStatusItems';
import { LanguageConfigurations } from './features/LanguageConfigurations';
import { getInstance } from './common/Ioc';
import { CompilerTaskProvider } from './features/CompilerTaskProvider';
// import { CompilerTaskProvider } from './features/CompilerTaskProvider';
import { ICreationKitInfoProvider, CreationKitInfoProvider } from './CreationKitInfoProvider';
import { ScriptStatusCodeLensProvider } from './features/ScriptStatusCodeLensProvider';

Expand All @@ -17,7 +17,7 @@ class PapyrusExtension implements Disposable {
private readonly _clientManager: ILanguageClientManager;
private readonly _statusItems: LanguageServiceStatusItems;
private readonly _languageConfigurations: LanguageConfigurations;
private readonly _taskProvider: CompilerTaskProvider;
// private readonly _taskProvider: CompilerTaskProvider;
private readonly _scriptStatusCodeLensProvider: ScriptStatusCodeLensProvider;

constructor(context: ExtensionContext) {
Expand All @@ -36,13 +36,13 @@ class PapyrusExtension implements Disposable {
this._clientManager = getInstance(this._serviceCollection, ILanguageClientManager);

this._statusItems = this._instantiationService.createInstance(LanguageServiceStatusItems);
this._taskProvider = this._instantiationService.createInstance(CompilerTaskProvider);
// this._taskProvider = this._instantiationService.createInstance(CompilerTaskProvider);
this._scriptStatusCodeLensProvider = this._instantiationService.createInstance(ScriptStatusCodeLensProvider);
}

dispose() {
this._scriptStatusCodeLensProvider.dispose();
this._taskProvider.dispose();
// this._taskProvider.dispose();
this._statusItems.dispose();
this._clientManager.dispose();
this._configProvider.dispose();
Expand Down
4 changes: 4 additions & 0 deletions src/papyrus-lang-vscode/src/Utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,7 @@ export async function resolveInstallPath(game: PapyrusGame, installPath: string)

return null;
}

export function getDefaultFlagsFileNameForGame(game: PapyrusGame) {
return game === PapyrusGame.fallout4 ? 'Institute_Papyrus_Flags.flg' : 'TESV_Papyrus_Flags.flg';
}
Loading

0 comments on commit 6cf3556

Please sign in to comment.