nbz*_*nbz 5 eclipse eclipse-plugin launch
我在线寻找了很多教程,很难找到与推出有关的任何内容.
我正在实现一个IDE插件,它实现了一个自定义透视图,除了Run Last Tool按钮之外,我看不到任何Run或Debug工具栏按钮.每次启动透视图时,我都需要进入Customize Perspective,然后进入Command Group Visibility并激活Launch命令组.
我已经实现了LaunchConfigurationType,我基本上尝试添加LaunchShortcuts.
我在某处读到你需要创建一个ILaunchable适配器来使Run as ...和Debug as ...可见.这是我在plugin.xml中添加的内容,
<extension point="org.eclipse.core.runtime.adapters">
<factory adaptableType="org.eclipse.core.resources.IFile" class=" ">
<adapter type="org.eclipse.debug.ui.actions.ILaunchable">
</adapter>
</factory>
</extension>
Run Code Online (Sandbox Code Playgroud)
我尝试了很多类型的adaptableTypes : IResource, IFile自定义透视图,但没有一个使按钮显示在工具栏上.
您需要使用org.eclipse.ui.perspectiveExtensions扩展点扩展您的透视图.要添加Run和Debug按钮,添加org.eclipse.debug.ui.launchActionSet actionSet如下:
<extension
point="org.eclipse.ui.perspectiveExtensions">
<perspectiveExtension
targetID="your.perspective.id">
<actionSet
id="org.eclipse.debug.ui.launchActionSet">
</actionSet>
</perspectiveExtension>
</extension>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2695 次 |
| 最近记录: |