本文整理汇总了Java中org.eclipse.debug.ui.DebugUITools.newDebugModelPresentation方法的典型用法代码示例。如果您正苦于以下问题:Java DebugUITools.newDebugModelPresentation方法的具体用法?Java DebugUITools.newDebugModelPresentation怎么用?Java DebugUITools.newDebugModelPresentation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.debug.ui.DebugUITools
的用法示例。
在下文中一共展示了DebugUITools.newDebugModelPresentation方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: chooseConfig
import org.eclipse.debug.ui.DebugUITools; //导入方法依赖的package包/类
/**
* Prompts the user to choose from the list of given launch configurations
* and returns the config the user choose or <code>null</code> if the user
* pressed Cancel or if the given list is empty.
*
* @param configs
* the list of {@link ILaunchConfiguration}s to choose from
* @return the chosen {@link ILaunchConfiguration} or <code>null</code>
*/
public static ILaunchConfiguration chooseConfig(
List<ILaunchConfiguration> configs) {
if (configs.isEmpty()) {
return null;
}
ILabelProvider labelProvider = DebugUITools.newDebugModelPresentation();
ElementListSelectionDialog dialog = new ElementListSelectionDialog(
Display.getDefault().getActiveShell(), labelProvider);
dialog.setElements(configs.toArray(new ILaunchConfiguration[configs
.size()]));
dialog.setTitle(JSBuildFileLaunchConfigurationMessages.AntLaunchShortcut_4);
dialog.setMessage(JSBuildFileLaunchConfigurationMessages.AntLaunchShortcut_5);
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.DebugUITools; //导入方法依赖的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;
}
示例3: chooseConfiguration
import org.eclipse.debug.ui.DebugUITools; //导入方法依赖的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();
}
}
示例4: chooseConfig
import org.eclipse.debug.ui.DebugUITools; //导入方法依赖的package包/类
/**
* COPIED/MODIFIED from AntLaunchShortcut
*/
protected ILaunchConfiguration chooseConfig(List<ILaunchConfiguration> configs) {
if (configs.isEmpty()) {
return null;
}
ILabelProvider labelProvider = DebugUITools.newDebugModelPresentation();
ElementListSelectionDialog dialog = new ElementListSelectionDialog(Display.getDefault().getActiveShell(),
labelProvider);
dialog.setElements(configs.toArray(new ILaunchConfiguration[configs.size()]));
dialog.setTitle("Pick a Python configuration");
dialog.setMessage("Choose a python configuration to run");
dialog.setMultipleSelection(false);
int result = dialog.open();
labelProvider.dispose();
if (result == Window.OK) {
return (ILaunchConfiguration) dialog.getFirstResult();
} else {
return null;
}
}
示例5: chooseConfiguration
import org.eclipse.debug.ui.DebugUITools; //导入方法依赖的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;
}
示例6: chooseConfiguration
import org.eclipse.debug.ui.DebugUITools; //导入方法依赖的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;
}
示例7: chooseConfiguration
import org.eclipse.debug.ui.DebugUITools; //导入方法依赖的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;
}
示例8: chooseConfiguration
import org.eclipse.debug.ui.DebugUITools; //导入方法依赖的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;
}
示例9: chooseConfiguration
import org.eclipse.debug.ui.DebugUITools; //导入方法依赖的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;
}
示例10: chooseConfiguration
import org.eclipse.debug.ui.DebugUITools; //导入方法依赖的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;
}
示例11: LaunchConfigLabelProvider
import org.eclipse.debug.ui.DebugUITools; //导入方法依赖的package包/类
public LaunchConfigLabelProvider( Display display,
DuplicatesDetector duplicatesDetector,
LabelMode labelMode )
{
this.resourceManager = new LocalResourceManager( JFaceResources.getResources( display ) );
this.duplicatesDetector = duplicatesDetector;
this.labelMode = labelMode;
this.debugModelPresentation = DebugUITools.newDebugModelPresentation();
}
示例12: chooseConfiguration
import org.eclipse.debug.ui.DebugUITools; //导入方法依赖的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;
}
示例13: chooseConfiguration
import org.eclipse.debug.ui.DebugUITools; //导入方法依赖的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();
}
}
示例14: chooseConfiguration
import org.eclipse.debug.ui.DebugUITools; //导入方法依赖的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;
}