当前位置: 首页>>代码示例>>Java>>正文


Java DebugUITools.newDebugModelPresentation方法代码示例

本文整理汇总了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;
}
 
开发者ID:angelozerr,项目名称:jsbuild-eclipse,代码行数:30,代码来源:JSBuildFileLaunchShortcut.java

示例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;            
}
 
开发者ID:scribble,项目名称:scribble-eclipse,代码行数:27,代码来源:SimulationLauncherShortcut.java

示例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();
  }
}
 
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:30,代码来源:LaunchConfigurationUtilities.java

示例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;
    }
}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:23,代码来源:AbstractLaunchShortcut.java

示例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;
}
 
开发者ID:de-jcup,项目名称:egradle,代码行数:26,代码来源:EGradleLaunchShortCut.java

示例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;
}
 
开发者ID:turnus,项目名称:turnus.orcc,代码行数:15,代码来源:OrccCodeAnalysisLaunchShortcut.java

示例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;
}
 
开发者ID:turnus,项目名称:turnus.orcc,代码行数:15,代码来源:OrccNumaExecutionLaunchShortcut.java

示例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;
}
 
开发者ID:turnus,项目名称:turnus.orcc,代码行数:15,代码来源:TabuSearchPerformanceEstimationLaunchShortcut.java

示例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;
}
 
开发者ID:turnus,项目名称:turnus.orcc,代码行数:15,代码来源:OrccDynamicExecutionLaunchShortcut.java

示例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;
}
 
开发者ID:turnus,项目名称:turnus.orcc,代码行数:15,代码来源:OrccDynamicInterpreterLaunchShortcut.java

示例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();
}
 
开发者ID:rherrmann,项目名称:eclipse-extras,代码行数:10,代码来源:LaunchConfigLabelProvider.java

示例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;            
}
 
开发者ID:robovm,项目名称:robovm-eclipse,代码行数:15,代码来源:AbstractProjectLaunchShortcut.java

示例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();
	}
}
 
开发者ID:GoClipse,项目名称:goclipse,代码行数:15,代码来源:BaseLaunchShortcut.java

示例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;
}
 
开发者ID:mulesoft,项目名称:mule-tooling-incubator,代码行数:19,代码来源:MavenLaunchShortcut.java


注:本文中的org.eclipse.debug.ui.DebugUITools.newDebugModelPresentation方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。