실행 바로 가기

org.eclipse.debug.ui.launchShortcuts

이 확장점은 선택사항 감지 실행을 지원합니다. 확장은 Workbench 선택사항이나 조치 편집기를 실행하는 실행 및/또는 디버그 계단식 메뉴에 나타나는 바로 가기를 등록합니다.

<!ELEMENT extension (shortcut*)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED>


<!ELEMENT shortcut (perspective* , contextualLaunch? , enablement?)>

<!ATTLIST shortcut

id            CDATA #REQUIRED

modes         CDATA #REQUIRED

class         CDATA #REQUIRED

label         CDATA #REQUIRED

icon          CDATA #IMPLIED

category      CDATA #IMPLIED

helpContextId CDATA #IMPLIED

path          CDATA #IMPLIED>


<!ELEMENT perspective EMPTY>

<!ATTLIST perspective

id CDATA #REQUIRED>

perspective 요소는 3.1 릴리스에서 폐기되었습니다. 최상위 레벨 실행/디버그/프로파일 계단식 메뉴가 이제 컨텍스트(선택에 민감한) 실행을 지원하며, 클라이언트는 대신 contextualLaunch 요소를 제공해야 합니다.



<!ELEMENT contextualLaunch (contextLabel* , enablement?)>

선택에 민감한 실행/디버그/프로파일 계단식 메뉴에 단축키 추가에 대한 모든 설명을 포함합니다.



<!ELEMENT contextLabel EMPTY>

<!ATTLIST contextLabel

mode  (run|debug|profile)

label CDATA #REQUIRED>

컨텍스트 실행 모드에 레이블을 지정합니다.



다음은 실행 바로 가기 확장점의 예제입니다.

 

<extension point=

"org.eclipse.debug.ui.launchShortcuts"

>

<shortcut id=

"com.example.ExampleLaunchShortcutId"

modes=

"run,debug"

class=

"com.example.ExampleLaunchShortcutImpl"

label=

"Example Launch Shortcut"

icon=

"icons/examples.gif"

>

<perspective id=

"org.eclipse.jdt.ui.JavaPerspective"

/>

<perspective id=

"org.eclipse.debug.ui.DebugPerspective"

/>

</shortcut>

</extension>

위의 예제에서 실행 바로 가기는 JavaPerspective 및 DebugPerspective에서 "Example Launch Shortcut"이라고 레이블이 붙은 실행 및 디버그 계단식 메뉴에 나타납니다.

class 속성 값은 org.eclipse.debug.ui.ILaunchShortcut 인터페이스를 구현하는 Java 클래스의 완전한 이름이어야 합니다.

3.1 이후, 디버그 플랫폼은 각 실행 단축키 및 그의 적용 가능한 모드에 대한 명령 핸들러를 등록하여 클라이언트가 실행 단축키에 대한 키 바인딩을 정의할 수 있게 합니다. 핸들러에 대한 명령 ID는 실행 단축키 ID 속성, 그 뒤에 오는 점과 적용 가능한 실행 모드로서 생성됩니다. 예를 들어 위의 실행 단축키 예제에 대한 명령 ID는 디버그 모드에서 실행의 경우 com.example.ExampleLaunchShortcutId.debug입니다. "ALT-SHIFT-D, E"를 실행 단축키에 바인드하기 위해 다음과 같이 명령 및 키 바인딩을 정의할 수 있습니다.

   

<extension point=

"org.eclipse.ui.commands"

>

<command name=

"Debug Example Launch"

description=

"Debug Example Launch"

categoryId=

"org.eclipse.debug.ui.category.run"

id=

"com.example.ExampleLaunchShortcutId.debug"

>

</command>

<keyBinding keySequence=

"M3+M2+D E"

contextId=

"org.eclipse.ui.globalScope"

commandId=

"com.example.ExampleLaunchShortcutId.debug"

keyConfigurationId=

"org.eclipse.ui.defaultAcceleratorConfiguration"

>

</keyBinding>

</extension>