How do you contribute a command to an editor context menu in Eclipse

前端 未结 2 1856
自闭症患者
自闭症患者 2021-01-06 11:33

I want to contribute a command to the context menu of any text editor when text is selected. In \"the old days\", I would have done this using objectContribution and a neste

2条回答
  •  生来不讨喜
    2021-01-06 12:02

    I read more about the variables available in command expressions, and I came close to figuring it out on my own, but failed. I then asked a similar question on the eclipse newsgroup and was led in the right direction. Here's an example of how to do mostly what I was looking for:

     
        
           
              
           
        
    

提交回复
热议问题