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


Java ILaunchManager.generateLaunchConfigurationName方法代码示例

本文整理汇总了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());
  }
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:35,代码来源:LaunchPipelineShortcut.java

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

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

示例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);
}
 
开发者ID:fmoraes74,项目名称:eclipseforces,代码行数:7,代码来源:AbstractLauncher.java


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