File tree Expand file tree Collapse file tree 3 files changed +6
-19
lines changed Expand file tree Collapse file tree 3 files changed +6
-19
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ import { languageServerOptions } from '../shared/options';
1010import { ServerState } from './serverStateChange' ;
1111import { getCSharpDevKit } from '../utils/getCSharpDevKit' ;
1212import { RazorLanguage } from '../razor/src/razorLanguage' ;
13- import { VSWorkspaceKind } from './roslynProtocol' ;
1413
1514let currentServerState : ServerState = ServerState . Stopped ;
1615
@@ -87,10 +86,9 @@ class ProjectContextStatus {
8786 // Show a warning when the active file is part of the Miscellaneous File workspace and
8887 // project initialization is complete.
8988 if ( currentServerState === ServerState . ProjectInitializationComplete ) {
90- item . severity =
91- e . context . _vs_workspace_kind === VSWorkspaceKind . MiscellaneousFiles
92- ? vscode . LanguageStatusSeverity . Warning
93- : vscode . LanguageStatusSeverity . Information ;
89+ item . severity = e . context . _vs_is_miscellaneous
90+ ? vscode . LanguageStatusSeverity . Warning
91+ : vscode . LanguageStatusSeverity . Information ;
9492 } else {
9593 item . severity = vscode . LanguageStatusSeverity . Information ;
9694 }
Original file line number Diff line number Diff line change @@ -13,17 +13,11 @@ export interface VSProjectContextList {
1313 _vs_defaultIndex : number ;
1414}
1515
16- export enum VSWorkspaceKind {
17- Unknown = 0 ,
18- Host = 1 ,
19- MiscellaneousFiles = 2 ,
20- }
21-
2216export interface VSProjectContext {
2317 _vs_label : string ;
2418 _vs_id : string ;
2519 _vs_kind : string ;
26- _vs_workspace_kind : VSWorkspaceKind ;
20+ _vs_is_miscellaneous : boolean ;
2721}
2822
2923export interface VSTextDocumentIdentifier extends lsp . TextDocumentIdentifier {
Original file line number Diff line number Diff line change 55
66import * as vscode from 'vscode' ;
77import { RoslynLanguageServer } from '../roslynLanguageServer' ;
8- import {
9- VSGetProjectContextsRequest ,
10- VSProjectContext ,
11- VSProjectContextList ,
12- VSWorkspaceKind ,
13- } from '../roslynProtocol' ;
8+ import { VSGetProjectContextsRequest , VSProjectContext , VSProjectContextList } from '../roslynProtocol' ;
149import { TextDocumentIdentifier } from 'vscode-languageserver-protocol' ;
1510import { UriConverter } from '../uriConverter' ;
1611import { LanguageServerEvents } from '../languageServerEvents' ;
@@ -31,7 +26,7 @@ export class ProjectContextService {
3126 _vs_id : '' ,
3227 _vs_kind : '' ,
3328 _vs_label : '' ,
34- _vs_workspace_kind : VSWorkspaceKind . Unknown ,
29+ _vs_is_miscellaneous : false ,
3530 } ;
3631
3732 constructor ( private _languageServer : RoslynLanguageServer , _languageServerEvents : LanguageServerEvents ) {
You can’t perform that action at this time.
0 commit comments