0

「実行構成...」ダイアログを起動するボタンを作成したいと思います。これどうやってするの?Active シェル クラスが LaunchConfigurationsDialog であることを Spy で確認しましたが、この情報をどのように使用するかわかりません。

4

2 に答える 2

1

LaunchConfigurationsDialog内部パッケージに含まれているため、直接使用しないでください。

DebugUIPlugin、このダイアログを開くための次のメソッドを提供します。

int openLaunchConfigurationsDialog(Shell shell, IStructuredSelection selection, String groupIdentifier, boolean setDefaults)

Javadoc:

Opens the LaunchConfigurationsDialog on the given selection for the given group. A status can be provided or null and the dialog can initialize the given ILaunchConfiguration to its defaults when opening as well - as long as the specified configuration is an ILaunchConfigurationWorkingCopy.

Parameters:
shell the shell to open the dialog on
selection the non-null selection to show when the dialog opens
groupIdentifier the identifier of the launch group to open the dialog on
setDefaults if the default values should be set on the opened configuration - if there is one
Returns:
the return code from the dialog.open() call

DebugUIPlugin内部パッケージにも入っています。

「実行構成」メニューのコマンド ID は、次のorg.eclipse.debug.ui.commands.OpenRunConfigurationsようなコマンドを使用してそのコマンドを実行できるようにするためのものです。

IHandlerService handlerService = (IHandlerService)getSite().getService(IHandlerService.class);
handlerService.executeCommand("org.eclipse.debug.ui.commands.OpenRunConfigurations", null);
于 2013-10-02T15:54:32.993 に答える