當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。