我目前正在尝试将“ RunConfigurations ...”窗口的红色部分(请参见img 1.1)放入TitleAreaDialog(请参见img 1.2)中。最终结果应如下所示:(请参见img 1.3)
img 1.3
使用插件“ Spy”,我发现了一些有用的信息:在“ LaunchConfigurationsDialog”类中创建了“运行配置...”窗口(img 1.1),该类具有“ LaunchConfigurationView”作为属性(注意:此属性是一个班级)。在此私有属性中,您可以找到“ LaunchConfigurationFilteredTree”属性(注意:另一个类)。
I think, that this last attribute is what I'm looking for. But I can't figure out which methods I have to override to be able to show this FilteredTreeList with all Launch Configurations in my CustomTitleAreaDialog.
Thanks in advance for your help!
All the classes you have found are in internal packages and are therefore not part of the Eclipse API (see Eclipse API Rules of Engagement). These classes may be changed at any time breaking your plug-in.
The core of the view does use official APIs.
First it gets the ILaunchManager
:
ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
The root elements of the tree are the ILaunchConfigurationType
entries:
ILaunchConfigurationType [] allTypes = manager.getLaunchConfigurationTypes();
The children of ILaunchConfigurationType
are the actual ILaunchConfiguration
launch configuration objects:
ILaunchConfiguration [] configs = manager.getLaunchConfigurations(configType);
If you build a TreeViewer
using these methods you will be OK.
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句