本文整理汇总了Java中org.eclipse.debug.ui.IDebugModelPresentation.dispose方法的典型用法代码示例。如果您正苦于以下问题:Java IDebugModelPresentation.dispose方法的具体用法?Java IDebugModelPresentation.dispose怎么用?Java IDebugModelPresentation.dispose使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.debug.ui.IDebugModelPresentation
的用法示例。
在下文中一共展示了IDebugModelPresentation.dispose方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: chooseConfiguration
import org.eclipse.debug.ui.IDebugModelPresentation; //导入方法依赖的package包/类
/**
* Returns a configuration from the given collection of configurations that should be launched,
* or <code>null</code> to cancel.
*
* @param configList list of configurations to choose from
* @return configuration to launch or <code>null</code> to cancel
*/
private ILaunchConfiguration chooseConfiguration(List<ILaunchConfiguration> configList) {
if (configList.size() == 1) {
return (ILaunchConfiguration) configList.get(0);
}
IDebugModelPresentation labelProvider = DebugUITools.newDebugModelPresentation();
ElementListSelectionDialog dialog= new ElementListSelectionDialog(Display.getCurrent().getActiveShell(),
labelProvider);
dialog.setElements(configList.toArray());
dialog.setTitle("Select Configuraiton"); //$NON-NLS-1$
dialog.setMessage("&Select an existing configuration:"); //$NON-NLS-1$
dialog.setMultipleSelection(false);
int result = dialog.open();
labelProvider.dispose();
if (result == Window.OK) {
return (ILaunchConfiguration) dialog.getFirstResult();
}
return null;
}
示例2: chooseConfiguration
import org.eclipse.debug.ui.IDebugModelPresentation; //导入方法依赖的package包/类
/**
* Returns a configuration from the given collection of configurations that
* should be launched, or <code>null</code> to cancel. Default implementation
* opens a selection dialog that allows the user to choose one of the
* specified launch configurations. Returns the chosen configuration, or
* <code>null</code> if the user cancels.
*
* @param configList list of configurations to choose from
* @return configuration to launch or <code>null</code> to cancel
*/
public static ILaunchConfiguration chooseConfiguration(
List<ILaunchConfiguration> configList, Shell shell) {
IDebugModelPresentation labelProvider = DebugUITools.newDebugModelPresentation();
try {
ElementListSelectionDialog dialog = new ElementListSelectionDialog(shell,
labelProvider);
dialog.setElements(configList.toArray());
dialog.setTitle("Choose a launch configuration:");
dialog.setMessage("More than one launch configuration is applicable; please choose one:");
dialog.setMultipleSelection(false);
int result = dialog.open();
if (result == Window.OK) {
return (ILaunchConfiguration) dialog.getFirstResult();
}
return null;
} finally {
labelProvider.dispose();
}
}
示例3: chooseConfiguration
import org.eclipse.debug.ui.IDebugModelPresentation; //导入方法依赖的package包/类
/**
* Returns a configuration from the given collection of configurations that
* should be launched, or <code>null</code> to cancel. Default
* implementation opens a selection dialog that allows the user to choose
* one of the specified launch configurations. Returns the chosen
* configuration, or <code>null</code> if the user cancels.
*
* @param configList
* list of configurations to choose from
* @return configuration to launch or <code>null</code> to cancel
*/
protected ILaunchConfiguration chooseConfiguration(List<ILaunchConfiguration> configList) {
IDebugModelPresentation labelProvider = DebugUITools.newDebugModelPresentation();
ElementListSelectionDialog dialog = new ElementListSelectionDialog(getShell(), labelProvider);
dialog.setElements(configList.toArray());
dialog.setTitle(getTypeSelectionTitle());
dialog.setMessage(getChooseConfigurationTitle());
dialog.setMultipleSelection(false);
int result = dialog.open();
labelProvider.dispose();
if (result == Window.OK) {
return (ILaunchConfiguration) dialog.getFirstResult();
}
return null;
}
示例4: chooseConfiguration
import org.eclipse.debug.ui.IDebugModelPresentation; //导入方法依赖的package包/类
private ILaunchConfiguration chooseConfiguration(ILaunchConfiguration[] configs) {
IDebugModelPresentation labelProvider = DebugUITools.newDebugModelPresentation();
ElementListSelectionDialog dialog = new ElementListSelectionDialog(getShell(), labelProvider);
dialog.setElements(configs);
dialog.setTitle("Select TURNUS code anylsis configuration");
dialog.setMessage("&Select existing configuration:");
dialog.setMultipleSelection(false);
int result = dialog.open();
labelProvider.dispose();
if (result == Window.OK) {
return (ILaunchConfiguration) dialog.getFirstResult();
}
return null;
}
示例5: chooseConfiguration
import org.eclipse.debug.ui.IDebugModelPresentation; //导入方法依赖的package包/类
private ILaunchConfiguration chooseConfiguration(ILaunchConfiguration[] configs) {
IDebugModelPresentation labelProvider = DebugUITools.newDebugModelPresentation();
ElementListSelectionDialog dialog = new ElementListSelectionDialog(getShell(), labelProvider);
dialog.setElements(configs);
dialog.setTitle("Select TURNUS dynamic numa analysis configuration");
dialog.setMessage("&Select existing configuration:");
dialog.setMultipleSelection(false);
int result = dialog.open();
labelProvider.dispose();
if (result == Window.OK) {
return (ILaunchConfiguration) dialog.getFirstResult();
}
return null;
}
示例6: chooseConfiguration
import org.eclipse.debug.ui.IDebugModelPresentation; //导入方法依赖的package包/类
private ILaunchConfiguration chooseConfiguration(ILaunchConfiguration[] configs) {
IDebugModelPresentation labelProvider = DebugUITools.newDebugModelPresentation();
ElementListSelectionDialog dialog = new ElementListSelectionDialog(getShell(), labelProvider);
dialog.setElements(configs);
dialog.setTitle("Select TURNUS tabu search (NUMA + performance estimation)");
dialog.setMessage("&Select existing configuration:");
dialog.setMultipleSelection(false);
int result = dialog.open();
labelProvider.dispose();
if (result == Window.OK) {
return (ILaunchConfiguration) dialog.getFirstResult();
}
return null;
}
示例7: chooseConfiguration
import org.eclipse.debug.ui.IDebugModelPresentation; //导入方法依赖的package包/类
private ILaunchConfiguration chooseConfiguration(ILaunchConfiguration[] configs) {
IDebugModelPresentation labelProvider = DebugUITools.newDebugModelPresentation();
ElementListSelectionDialog dialog = new ElementListSelectionDialog(getShell(), labelProvider);
dialog.setElements(configs);
dialog.setTitle("Select TURNUS dynamic anylsis configuration");
dialog.setMessage("&Select existing configuration:");
dialog.setMultipleSelection(false);
int result = dialog.open();
labelProvider.dispose();
if (result == Window.OK) {
return (ILaunchConfiguration) dialog.getFirstResult();
}
return null;
}
示例8: chooseConfiguration
import org.eclipse.debug.ui.IDebugModelPresentation; //导入方法依赖的package包/类
private ILaunchConfiguration chooseConfiguration(ILaunchConfiguration[] configs) {
IDebugModelPresentation labelProvider = DebugUITools.newDebugModelPresentation();
ElementListSelectionDialog dialog = new ElementListSelectionDialog(getShell(), labelProvider);
dialog.setElements(configs);
dialog.setTitle("Select TURNUS dynamic interpretation anylsis configuration");
dialog.setMessage("&Select existing configuration:");
dialog.setMultipleSelection(false);
int result = dialog.open();
labelProvider.dispose();
if (result == Window.OK) {
return (ILaunchConfiguration) dialog.getFirstResult();
}
return null;
}
示例9: chooseConfiguration
import org.eclipse.debug.ui.IDebugModelPresentation; //导入方法依赖的package包/类
private ILaunchConfiguration chooseConfiguration(List<ILaunchConfiguration> configList) {
IDebugModelPresentation labelProvider = DebugUITools.newDebugModelPresentation();
ElementListSelectionDialog dialog= new ElementListSelectionDialog(RoboVMPlugin.getShell(), labelProvider);
dialog.setElements(configList.toArray());
dialog.setTitle("");
dialog.setMessage("");
dialog.setMultipleSelection(false);
int result = dialog.open();
labelProvider.dispose();
if (result == Window.OK) {
return (ILaunchConfiguration) dialog.getFirstResult();
}
return null;
}
示例10: chooseConfiguration
import org.eclipse.debug.ui.IDebugModelPresentation; //导入方法依赖的package包/类
protected ILaunchConfiguration chooseConfiguration(Indexable<ILaunchConfiguration> configs)
throws OperationCancellation {
IDebugModelPresentation labelProvider = DebugUITools.newDebugModelPresentation();
try {
ElementListSelectionDialog dialog = new ElementListSelectionDialog(getActiveShell(), labelProvider);
dialog.setTitle(LangUIMessages.LaunchShortcut_selectLaunch_title);
dialog.setMessage(LangUIMessages.LaunchShortcut_selectLaunch_message);
dialog.setMultipleSelection(false);
return ControlUtils.setElementsAndOpenDialog(dialog, configs);
} finally {
labelProvider.dispose();
}
}
示例11: chooseConfiguration
import org.eclipse.debug.ui.IDebugModelPresentation; //导入方法依赖的package包/类
/**
* Show a selection dialog that allows the user to choose one of the specified launch configurations. Return the chosen config, or <code>null</code> if the user canceled the
* dialog.
*/
protected ILaunchConfiguration chooseConfiguration(List<?> configList) {
IDebugModelPresentation labelProvider = DebugUITools.newDebugModelPresentation();
ElementListSelectionDialog dialog = new ElementListSelectionDialog(getShell(), labelProvider);
dialog.setElements(configList.toArray());
dialog.setTitle("Select Launch Configuration");
dialog.setMessage("Selection the launch configuration you wish to use.");
dialog.setMultipleSelection(false);
int result = dialog.open();
labelProvider.dispose();
if (result == Window.OK) {
return (ILaunchConfiguration) dialog.getFirstResult();
}
return null;
}