@@ -21,12 +21,12 @@ import { FileItemBuilder } from './solution-outline-file-item';
2121import { COutlineItem } from './solution-outline-item' ;
2222import * as manifest from '../../../manifest' ;
2323import { CSolution } from '../../../solutions/csolution' ;
24- import { getMapFilePath , getStatusTooltip , setDocContext , setHeaderContext , setLinkerContext } from './solution-outline-utils' ;
24+ import { getMapFilePath , setDocContext , setHeaderContext , setLinkerContext } from './solution-outline-utils' ;
2525import { CProjectYamlFile } from '../../../solutions/files/cproject-yaml-file' ;
2626import { SolutionOutlineItemBuilder } from './solution-outline-item-builder' ;
2727
2828export class ProjectItemsBuilder extends SolutionOutlineItemBuilder {
29- private _lastPrioritizedComponentList : COutlineItem [ ] = [ ] ;
29+ private readonly _lastPrioritizedComponentList : COutlineItem [ ] = [ ] ;
3030
3131 public get lastPrioritizedComponentList ( ) : COutlineItem [ ] {
3232 return this . _lastPrioritizedComponentList ;
@@ -222,58 +222,9 @@ export class ProjectItemsBuilder extends SolutionOutlineItemBuilder {
222222 }
223223
224224 this . addComponentOptions ( componentNodes ) ;
225-
226- // add merge description
227- const components = Array . from ( componentNodes . values ( ) ) ;
228- const fileStatus = this . getMergeDescriptionAtParentComponentLevel ( components ) ;
229- if ( fileStatus ) {
230- // assign tooltip with component ids
231- const prioritizedList = this . _lastPrioritizedComponentList ;
232- let newTooltip = 'Components with updated configuration files:' ;
233- for ( const comp of prioritizedList ) {
234- const compId = comp . getAttribute ( 'label' ) ;
235- const compStatus = comp . getAttribute ( 'status' ) ;
236- if ( compId && compStatus ) {
237- newTooltip += `\n- ${ compId } : ${ compStatus } ` ;
238- }
239- }
240- componentsItem . setAttribute ( 'tooltip' , newTooltip ) ;
241- }
242225 return true ; // do have components to edit
243226 }
244227
245- private getMergeDescriptionAtParentComponentLevel ( components : COutlineItem [ ] ) : string | undefined {
246- let result : string | undefined = undefined ;
247- const updateRequired : COutlineItem [ ] = [ ] ;
248- const updateRecommended : COutlineItem [ ] = [ ] ;
249- const updateSuggested : COutlineItem [ ] = [ ] ;
250-
251- for ( const component of components ) {
252- const status = component . getAttribute ( 'status' ) ;
253- if ( ! status ) {
254- continue ;
255- }
256- if ( status == 'update required' ) {
257- updateRequired . push ( component ) ;
258- } else if ( status == 'update recommended' ) {
259- updateRecommended . push ( component ) ;
260- } else if ( status == 'update suggested' ) {
261- updateSuggested . push ( component ) ;
262- }
263- }
264-
265- const prioritizedList = [ ...updateRequired , ...updateRecommended , ...updateSuggested ] ;
266- this . _lastPrioritizedComponentList = prioritizedList ;
267- const prioritizedFile = prioritizedList [ 0 ] ;
268-
269- const fileStatus = prioritizedFile ?. getAttribute ( 'status' ) ;
270- if ( fileStatus ) {
271- result = fileStatus ;
272- }
273-
274- return result ;
275- }
276-
277228 private addComponentOptions ( componentNodes : Map < string , COutlineItem > ) {
278229 const components = componentNodes . values ( ) ;
279230
@@ -433,25 +384,6 @@ export class ProjectItemsBuilder extends SolutionOutlineItemBuilder {
433384
434385 // set status at component level
435386 node . setAttribute ( 'status' , fileStatus ) ;
436-
437- // set tooltip
438- const prevTooltip = node . getValue ( 'tooltip' ) ;
439- let newTooltip : string = '' ;
440- for ( const file of prioritizedList ) {
441- const fileLabel = file . getValue ( 'file' ) ;
442- const fileStatus = file . getValue ( 'status' ) ;
443- if ( fileLabel && fileStatus ) {
444- const tooltip = getStatusTooltip ( fileLabel , fileStatus ) ;
445- newTooltip += `\n ${ tooltip } ` ;
446- }
447- }
448-
449- if ( prevTooltip ) {
450- node . setAttribute ( 'tooltip' , prevTooltip + '\n' + newTooltip ) ;
451- } else {
452- node . setAttribute ( 'tooltip' , newTooltip ) ;
453- }
454-
455387 }
456388
457389 private getPrioritizedMergeFile ( files : ITreeItem < CTreeItem > [ ] ) : ITreeItem < CTreeItem > [ ] {
0 commit comments