本文整理汇总了Java中org.eclipse.debug.core.ILaunchManager.generateLaunchConfigurationName方法的典型用法代码示例。如果您正苦于以下问题:Java ILaunchManager.generateLaunchConfigurationName方法的具体用法?Java ILaunchManager.generateLaunchConfigurationName怎么用?Java ILaunchManager.generateLaunchConfigurationName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.debug.core.ILaunchManager
的用法示例。
在下文中一共展示了ILaunchManager.generateLaunchConfigurationName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: launchNew
import org.eclipse.debug.core.ILaunchManager; //导入方法依赖的package包/类
private void launchNew(LaunchableResource resource, String mode) {
try {
ILaunchManager launchManager = getLaunchManager();
String launchConfigurationName =
launchManager.generateLaunchConfigurationName(resource.getLaunchName());
ILaunchConfigurationType configurationType =
getDataflowLaunchConfigurationType(launchManager);
ILaunchConfigurationWorkingCopy configuration =
configurationType.newInstance(null, launchConfigurationName);
configuration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME,
resource.getProjectName());
IMethod mainMethod = resource.getMainMethod();
if (mainMethod != null && mainMethod.exists()) {
configuration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME,
mainMethod.getDeclaringType().getFullyQualifiedName());
}
String groupIdentifier =
mode.equals(ILaunchManager.RUN_MODE) ? IDebugUIConstants.ID_RUN_LAUNCH_GROUP
: IDebugUIConstants.ID_DEBUG_LAUNCH_GROUP;
int returnStatus =
DebugUITools.openLaunchConfigurationDialog(DataflowUiPlugin.getActiveWindowShell(),
configuration, groupIdentifier, null);
if (returnStatus == Window.OK) {
configuration.doSave();
}
} catch (CoreException e) {
// TODO: Handle
DataflowUiPlugin.logError(e, "Error while launching new Launch Configuration for project %s",
resource.getProjectName());
}
}
示例2: createNewLaunchConfiguration
import org.eclipse.debug.core.ILaunchManager; //导入方法依赖的package包/类
/**
* Create a new launch configuration.
*
* @param isGwtSuperDevModeEnabled
* is used to turn on GWT super dev mode.
*/
protected ILaunchConfiguration createNewLaunchConfiguration(IResource resource, String startupUrl, boolean isExternal,
boolean isGwtSuperDevModeEnabled) throws CoreException, OperationCanceledException {
String initialName = calculateLaunchConfigName(startupUrl, isExternal, resource);
ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
String launchConfigName = manager.generateLaunchConfigurationName(initialName);
IProject project = resource.getProject();
ILaunchConfigurationWorkingCopy wc = WebAppLaunchUtil.createLaunchConfigWorkingCopy(launchConfigName, project,
startupUrl, isExternal, isGwtSuperDevModeEnabled);
ILaunchConfiguration toReturn = wc.doSave();
return toReturn;
}
示例3: createNewLaunchConfiguration
import org.eclipse.debug.core.ILaunchManager; //导入方法依赖的package包/类
private ILaunchConfiguration createNewLaunchConfiguration(IResource resource)
throws CoreException, OperationCanceledException {
String initialName = resource.getProject().getName();
ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
String launchConfigName = manager.generateLaunchConfigurationName(initialName);
IProject project = resource.getProject();
ILaunchConfigurationWorkingCopy wc = createLaunchConfigWorkingCopy(launchConfigName, project);
ILaunchConfiguration toReturn = wc.doSave();
return toReturn;
}
示例4: createLaunchWorkingCopy
import org.eclipse.debug.core.ILaunchManager; //导入方法依赖的package包/类
private ILaunchConfigurationWorkingCopy createLaunchWorkingCopy() throws CoreException {
ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
ILaunchConfigurationType configType = manager.getLaunchConfigurationType(getLauncherTypeId());
String launchConfigName = manager.generateLaunchConfigurationName(getLauncherName());
return configType.newInstance(null, launchConfigName);
}