@@ -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 , setMergeDescription , setMergeUpdate } 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,62 +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 description
231- setMergeDescription ( componentsItem , fileStatus ) ;
232-
233- // assign tooltip with component ids
234- const prioritizedList = this . _lastPrioritizedComponentList ;
235- let newTooltip = 'Components with updated configuration files:' ;
236- for ( const comp of prioritizedList ) {
237- const compId = comp . getAttribute ( 'label' ) ;
238- const compStatus = comp . getAttribute ( 'status' ) ;
239- if ( compId && compStatus ) {
240- const update = comp . getAttribute ( 'update' ) ;
241- newTooltip += `\n- ${ update } ${ compId } : ${ compStatus } ` ;
242- }
243- }
244- componentsItem . setAttribute ( 'tooltip' , newTooltip ) ;
245- }
246225 return true ; // do have components to edit
247226 }
248227
249- private getMergeDescriptionAtParentComponentLevel ( components : COutlineItem [ ] ) : string | undefined {
250- let result : string | undefined = undefined ;
251- const updateRequired : COutlineItem [ ] = [ ] ;
252- const updateRecommended : COutlineItem [ ] = [ ] ;
253- const updateSuggested : COutlineItem [ ] = [ ] ;
254-
255- for ( const component of components ) {
256- const status = component . getAttribute ( 'status' ) ;
257- if ( ! status ) {
258- continue ;
259- }
260- if ( status == 'update required' ) {
261- updateRequired . push ( component ) ;
262- } else if ( status == 'update recommended' ) {
263- updateRecommended . push ( component ) ;
264- } else if ( status == 'update suggested' ) {
265- updateSuggested . push ( component ) ;
266- }
267- }
268-
269- const prioritizedList = [ ...updateRequired , ...updateRecommended , ...updateSuggested ] ;
270- this . _lastPrioritizedComponentList = prioritizedList ;
271- const prioritizedFile = prioritizedList [ 0 ] ;
272-
273- const fileStatus = prioritizedFile ?. getAttribute ( 'status' ) ;
274- if ( fileStatus ) {
275- result = fileStatus ;
276- }
277-
278- return result ;
279- }
280-
281228 private addComponentOptions ( componentNodes : Map < string , COutlineItem > ) {
282229 const components = componentNodes . values ( ) ;
283230
@@ -437,31 +384,6 @@ export class ProjectItemsBuilder extends SolutionOutlineItemBuilder {
437384
438385 // set status at component level
439386 node . setAttribute ( 'status' , fileStatus ) ;
440-
441- // assign description
442- setMergeDescription ( node , fileStatus ) ;
443-
444- // assign status symbol for merge update action
445- setMergeUpdate ( node , fileStatus ) ;
446-
447- // set tooltip
448- const prevTooltip = node . getValue ( 'tooltip' ) ;
449- let newTooltip : string = '' ;
450- for ( const file of prioritizedList ) {
451- const fileLabel = file . getValue ( 'file' ) ;
452- const fileStatus = file . getValue ( 'status' ) ;
453- if ( fileLabel && fileStatus ) {
454- const tooltip = getStatusTooltip ( fileLabel , fileStatus ) ;
455- newTooltip += `\n ${ tooltip } ` ;
456- }
457- }
458-
459- if ( prevTooltip ) {
460- node . setAttribute ( 'tooltip' , prevTooltip + '\n' + newTooltip ) ;
461- } else {
462- node . setAttribute ( 'tooltip' , newTooltip ) ;
463- }
464-
465387 }
466388
467389 private getPrioritizedMergeFile ( files : ITreeItem < CTreeItem > [ ] ) : ITreeItem < CTreeItem > [ ] {
0 commit comments