2010-08-12 8 views

답변

25

는 이클립스 (기본 구성과 다른 설정) 키를 단축키에 관한 지역 설정을 닫으면 다음과 같은 그루비 스크립트를 사용하여 바인딩을 추출 할 수 있습니다

</path/to/workspace>\.metadata\.plugins\org.eclipse.core.runtime\.settings\ 
org.eclipse.ui.workbench.prefs 
+0

생명의 은인 - 고마워요! –

0

에 저장됩니다. 나는 그루비 개발자가 아니므로 내 해킹을 용서해주십시오.

그루비 스크립트 사용 (워크 벤치 XMI 파일에 대한 올바른 경로에서 대체) :

workbench = new XmlSlurper().parse("<path to eclipse>/workspace/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi") 

List bindingTables 
workbench.bindingTables.each 
{ it-> 
//println "\tContributorURI: ${[email protected]} | \tElementID : [email protected]"; 

def command = "command"; 
def commandName = "commandname"; 
def description = "description"; 
def category; 
def name = "name"; 
def keys = "keys"; 
it.bindings.each 
{bindingIt-> 
    //loop through every binding entry 
    command = [email protected]; 
    keys = [email protected]; 
    workbench.commands.each 
    {commandIt-> 
     def thisCommand = commandIt.attributes()['{http://www.omg.org/XMI}id']; 
     if(thisCommand.equals(command.toString())) 
     { 
      commandName = [email protected]; 
      description = [email protected]; 
      category = [email protected]; 
      workbench.categories.each 
      {workbenchIt-> 
       if(workbenchIt.attributes()['{http://www.omg.org/XMI}id'].equals(category.toString())) 
       { 
        name = [email protected]; 
       } 
      } 
     } 
    } 
    println "\t\tKeys: ${keys}\tCommand: ${commandName}"+ 
      "\tDescription: "+description+"\tName: "+name; 
} 
} 
0

당신은 실제로 단지로 시작하는 org.eclipse.ui.workbech.prefs 파일의 전체 라인을 복사 할 수 있습니다 : org.eclipse.ui.commands= 과에 붙여 넣습니다 업데이트 할 다른 Eclipse 작업 공간 환경 설정 파일 - 적어도 Eclipse Neon에서는 한꺼번에 가져올 수 있습니다.

관련 문제