@@ -13,7 +13,6 @@ import { Schemas } from 'vs/base/common/network';
13
13
import { registerSingleton } from 'vs/platform/instantiation/common/extensions' ;
14
14
import { IWorkspaceTagsService , Tags } from 'vs/workbench/contrib/tags/common/workspaceTags' ;
15
15
import { getHashedRemotesFromConfig } from 'vs/workbench/contrib/tags/electron-sandbox/workspaceTags' ;
16
- import { IProductService } from 'vs/platform/product/common/productService' ;
17
16
import { splitLines } from 'vs/base/common/strings' ;
18
17
import { MavenArtifactIdRegex , MavenDependenciesRegex , MavenDependencyRegex , GradleDependencyCompactRegex , GradleDependencyLooseRegex , MavenGroupIdRegex , JavaLibrariesToLookFor } from 'vs/workbench/contrib/tags/common/javaWorkspaceTags' ;
19
18
@@ -253,7 +252,6 @@ export class WorkspaceTagsService implements IWorkspaceTagsService {
253
252
@IFileService private readonly fileService : IFileService ,
254
253
@IWorkspaceContextService private readonly contextService : IWorkspaceContextService ,
255
254
@IWorkbenchEnvironmentService private readonly environmentService : IWorkbenchEnvironmentService ,
256
- @IProductService private readonly productService : IProductService ,
257
255
@ITextFileService private readonly textFileService : ITextFileService
258
256
) { }
259
257
@@ -582,7 +580,7 @@ export class WorkspaceTagsService implements IWorkspaceTagsService {
582
580
tags [ 'workspace.roots' ] = isEmpty ? 0 : workspace . folders . length ;
583
581
tags [ 'workspace.empty' ] = isEmpty ;
584
582
585
- const folders = ! isEmpty ? workspace . folders . map ( folder => folder . uri ) : this . productService . quality !== 'stable' && this . findFolders ( ) ;
583
+ const folders = ! isEmpty ? workspace . folders . map ( folder => folder . uri ) : undefined ;
586
584
if ( ! folders || ! folders . length ) {
587
585
return Promise . resolve ( tags ) ;
588
586
}
@@ -809,32 +807,6 @@ export class WorkspaceTagsService implements IWorkspaceTagsService {
809
807
}
810
808
}
811
809
812
- private findFolders ( ) : URI [ ] | undefined {
813
- const folder = this . findFolder ( ) ;
814
- return folder && [ folder ] ;
815
- }
816
-
817
- private findFolder ( ) : URI | undefined {
818
- const { filesToOpenOrCreate, filesToDiff, filesToMerge } = this . environmentService ;
819
- if ( filesToOpenOrCreate && filesToOpenOrCreate . length ) {
820
- return this . parentURI ( filesToOpenOrCreate [ 0 ] . fileUri ) ;
821
- } else if ( filesToDiff && filesToDiff . length ) {
822
- return this . parentURI ( filesToDiff [ 0 ] . fileUri ) ;
823
- } else if ( filesToMerge && filesToMerge . length === 4 ) {
824
- return this . parentURI ( filesToMerge [ 3 ] . fileUri ) /* [3] is the resulting merge file */ ;
825
- }
826
- return undefined ;
827
- }
828
-
829
- private parentURI ( uri : URI | undefined ) : URI | undefined {
830
- if ( ! uri ) {
831
- return undefined ;
832
- }
833
- const path = uri . path ;
834
- const i = path . lastIndexOf ( '/' ) ;
835
- return i !== - 1 ? uri . with ( { path : path . substr ( 0 , i ) } ) : undefined ;
836
- }
837
-
838
810
private searchArray ( arr : string [ ] , regEx : RegExp ) : boolean | undefined {
839
811
return arr . some ( v => v . search ( regEx ) > - 1 ) || undefined ;
840
812
}
0 commit comments