visibleWhen for command to appear in context menu

前端 未结 3 1898
攒了一身酷
攒了一身酷 2021-02-15 18:09

I am trying configure visibility of a command within the context menu using \'visibleWhen\' expression within a menuContribution. What I am trying to do is make the command vis

3条回答
  •  不要未来只要你来
    2021-02-15 18:34

    @blissfool, I would suggest a slight restructuring. You can put your basic test (which is correct) in a org.eclipse.core.expressions.definitions block:

    
       
          
             
                 
                 
                 
                 
             
          
       
    
    

    Then in your visibleWhen move the activeEditorInput test up to the top:

    
       
          
             
               
             
          
          
            
          
       
    
    

提交回复
热议问题