@@ -8,14 +8,14 @@ import OpenShiftItem, { clusterRequired } from './openshiftItem';
88import { OpenShiftObject , OpenShiftProject , getInstance as getOdoInstance } from '../odo' ;
99import { Progress } from '../util/progress' ;
1010import { vsCommand , VsCommandError } from '../vscommand' ;
11- import { CommandText } from '../odo/command' ;
11+ import { Command , CommandText } from '../odo/command' ;
1212
1313export class Project extends OpenShiftItem {
1414
1515 @vsCommand ( 'openshift.project.set' , true )
1616 @clusterRequired ( )
1717 static async set ( ) : Promise < string | null > {
18- let message = null ;
18+ let message : string = null ;
1919 const createNewProject = {
2020 label : 'Create new Project' ,
2121 description : 'Create new Project and make it active'
@@ -31,7 +31,7 @@ export class Project extends OpenShiftItem {
3131 await commands . executeCommand ( 'openshift.project.create' ) ;
3232 } else {
3333 const project = selectedItem as OpenShiftObject ;
34- await Project . odo . execute ( new CommandText ( 'odo project set' , project . getName ( ) ) ) ;
34+ await Project . odo . execute ( Command . setActiveProject ( project . getName ( ) ) ) ;
3535 Project . explorer . refresh ( ) ;
3636 message = `Project '${ project . getName ( ) } ' set as active.` ;
3737 }
0 commit comments