• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java ILaunchGroup类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.eclipse.debug.ui.ILaunchGroup的典型用法代码示例。如果您正苦于以下问题:Java ILaunchGroup类的具体用法?Java ILaunchGroup怎么用?Java ILaunchGroup使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ILaunchGroup类属于org.eclipse.debug.ui包,在下文中一共展示了ILaunchGroup类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: createLaunchConfig

import org.eclipse.debug.ui.ILaunchGroup; //导入依赖的package包/类
protected void createLaunchConfig(IProject project) throws CoreException {
  // If the default SDK is GWT 2.7 or greater, turn on GWT super dev mode by default.
  boolean turnOnGwtSuperDevMode = GwtVersionUtil.isGwtVersionGreaterOrEqualTo27(JavaCore.create(project));

  ILaunchConfigurationWorkingCopy wc = WebAppLaunchUtil.createLaunchConfigWorkingCopy(project.getName(), project,
      WebAppLaunchUtil.determineStartupURL(project, false), false, turnOnGwtSuperDevMode);
  ILaunchGroup[] groups = DebugUITools.getLaunchGroups();

  ArrayList<String> groupsNames = new ArrayList<String>();
  for (ILaunchGroup group : groups) {
    if (IDebugUIConstants.ID_DEBUG_LAUNCH_GROUP.equals(group.getIdentifier())
        || IDebugUIConstants.ID_RUN_LAUNCH_GROUP.equals(group.getIdentifier())) {
      groupsNames.add(group.getIdentifier());
    }
  }

  wc.setAttribute(IDebugUIConstants.ATTR_FAVORITE_GROUPS, groupsNames);
  wc.doSave();
}
 
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:20,代码来源:WebAppProjectCreator.java


示例2: launch

import org.eclipse.debug.ui.ILaunchGroup; //导入依赖的package包/类
/**
 * Launch a resource. Try to launch using a launch configuration. Used for contextual launches
 * 
 * @param file
 *            source file
 * @param firstInstruction
 *            the first {@link EObject instruction}
 * @param mode
 *            launch mode
 */
public void launch(final IResource file, EObject firstInstruction, final String mode) {

	if (file instanceof IFile) {
		prepareLaunch(file, firstInstruction, mode);

		try {
			ILaunchConfiguration[] configurations = getLaunchConfigurations(file);
			if (configurations.length == 0) {
				// try to create a launch configuration
				configurations = createLaunchConfiguration(file, firstInstruction, mode);
			}

			// launch
			if (configurations.length == 1) {
				configurations[0].launch(mode, new NullProgressMonitor());
			} else {
				// more than one configuration applies
				// open launch dialog for selection
				final ILaunchGroup group = DebugUITools.getLaunchGroup(configurations[0], mode);
				DebugUITools.openLaunchConfigurationDialogOnGroup(PlatformUI.getWorkbench()
						.getActiveWorkbenchWindow().getShell(),
						new StructuredSelection(configurations[0]), group.getIdentifier(), null);
			}

		} catch (CoreException e) {
			// could not create launch configuration, run file directly
			// try {
			// launch(firstInstruction, null, mode, null, new NullProgressMonitor());
			// } catch (CoreException e1) {
			Activator.getDefault().error(e);
			// }
		}
	}
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:45,代码来源:AbstractDSLLaunchConfigurationDelegateUI.java


示例3: createLaunchConfiguration

import org.eclipse.debug.ui.ILaunchGroup; //导入依赖的package包/类
/**
 * Creates a {@link ILaunchConfiguration}. If the <code>firstInstruction</code> is <code>null</code> the
 * launch configuration dialog is opened.
 * 
 * @param file
 *            the selected model {@link IFile}
 * @param firstInstruction
 *            the first {@link EObject instruction} or <code>null</code> for interactive selection
 * @param mode
 *            the {@link ILaunchConfiguration#getModes() mode}
 * @return an array of possible {@link ILaunchConfiguration}, can be empty but not <code>null</code>
 * @throws CoreException
 *             if {@link ILaunchConfiguration} initialization fails of models can't be loaded
 */
protected ILaunchConfiguration[] createLaunchConfiguration(final IResource file,
		EObject firstInstruction, final String mode) throws CoreException {
	final ILaunchConfiguration[] res;

	ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
	ILaunchConfigurationType type = manager.getLaunchConfigurationType(getLaunchConfigurationTypeID());

	ILaunchConfigurationWorkingCopy configuration = type.newInstance(null, file.getName());
	configuration.setMappedResources(new IResource[] {file, });
	configuration.setAttribute(AbstractDSLLaunchConfigurationDelegate.RESOURCE_URI, file.getFullPath()
			.toString());
	if (firstInstruction == null) {
		// open configuration for further editing
		final ILaunchGroup group = DebugUITools.getLaunchGroup(configuration, mode);
		if (group != null) {
			configuration.doSave();
			DebugUITools.openLaunchConfigurationDialog(PlatformUI.getWorkbench()
					.getActiveWorkbenchWindow().getShell(), configuration, group.getIdentifier(), null);
		}
		res = new ILaunchConfiguration[] {};
	} else {
		configuration.setAttribute(AbstractDSLLaunchConfigurationDelegate.FIRST_INSTRUCTION_URI,
				EcoreUtil.getURI(firstInstruction).toString());
		// save and return new configuration
		configuration.doSave();
		res = new ILaunchConfiguration[] {configuration, };
	}
	return res;
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:44,代码来源:AbstractDSLLaunchConfigurationDelegateUI.java


示例4: createLaunchConfiguration

import org.eclipse.debug.ui.ILaunchGroup; //导入依赖的package包/类
@Override
protected final ILaunchConfiguration[] createLaunchConfiguration(IResource file, EObject firstInstruction, String mode)
		throws CoreException {
	ILaunchConfiguration[] launchConfigs = super.createLaunchConfiguration(file, firstInstruction, mode);

	if (launchConfigs.length == 1) {
		// open configuration for further editing
		if (launchConfigs[0] instanceof ILaunchConfigurationWorkingCopy) {
			ILaunchConfigurationWorkingCopy configuration = (ILaunchConfigurationWorkingCopy) launchConfigs[0];

			String selectedLanguage = configuration.getAttribute(RunConfiguration.LAUNCH_SELECTED_LANGUAGE, "");
			if (selectedLanguage.equals("")) {

				// TODO try to infer possible language and other attribute
				// from project content and environment
				setDefaultsLaunchConfiguration(configuration);

				final ILaunchGroup group = DebugUITools.getLaunchGroup(configuration, mode);
				if (group != null) {
					ILaunchConfiguration savedLaunchConfig = configuration.doSave();
					// open configuration for user validation and inputs
					DebugUITools.openLaunchConfigurationDialogOnGroup(PlatformUI.getWorkbench()
							.getActiveWorkbenchWindow().getShell(), new StructuredSelection(savedLaunchConfig),
							group.getIdentifier(), null);
					// DebugUITools.openLaunchConfigurationDialog(PlatformUI.getWorkbench()
					// .getActiveWorkbenchWindow().getShell(),
					// savedLaunchConfig, group.getIdentifier(), null);
				}
			}
		}
	}
	return launchConfigs;

}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:35,代码来源:AbstractSequentialGemocLauncher.java


示例5: remove

import org.eclipse.debug.ui.ILaunchGroup; //导入依赖的package包/类
@Override
public synchronized boolean remove( Object element ) {
  boolean removed = false;
  if( contains( element ) ) {
    for( ILaunchGroup launchGroup : DebugUITools.getLaunchGroups() ) {
      LaunchHistory launchHistory = getLaunchHistory( launchGroup );
      if( launchHistory != null ) {
        launchHistory.removeFromHistory( ( ILaunchConfiguration )element );
      }
    }
    removed = true;
    launchConfigHistory = null;
  }
  return removed;
}
 
开发者ID:rherrmann,项目名称:eclipse-extras,代码行数:16,代码来源:LaunchConfigSelectionHistory.java


示例6: getLaunchHistory

import org.eclipse.debug.ui.ILaunchGroup; //导入依赖的package包/类
private static LaunchHistory getLaunchHistory( ILaunchGroup launchGroup ) {
  LaunchHistoryAction launchHistoryAction = new LaunchHistoryAction( launchGroup );
  try {
    return launchHistoryAction.getLaunchHistory();
  } finally {
    launchHistoryAction.dispose();
  }
}
 
开发者ID:rherrmann,项目名称:eclipse-extras,代码行数:9,代码来源:LaunchConfigSelectionHistory.java


示例7: collect

import org.eclipse.debug.ui.ILaunchGroup; //导入依赖的package包/类
private void collect( ILaunchGroup launchGroup ) {
  LaunchHistoryAction launchHistoryAction = new LaunchHistoryAction( launchGroup );
  try {
    if( launchHistoryAction.getLastLaunch() != null ) {
      addAll( launchConfigHistory, launchHistoryAction.getFavorites() );
      addAll( launchConfigHistory, launchHistoryAction.getHistory() );
    }
  } finally {
    launchHistoryAction.dispose();
  }
}
 
开发者ID:rherrmann,项目名称:eclipse-extras,代码行数:12,代码来源:LaunchConfigSelectionHistory.java


示例8: computeLaunchGroup

import org.eclipse.debug.ui.ILaunchGroup; //导入依赖的package包/类
public ILaunchGroup computeLaunchGroup() {
  ILaunchGroup result = null;
  ILaunchMode launchMode = computeLaunchMode();
  if( launchMode != null ) {
    result = DebugUITools.getLaunchGroup( launchConfig, launchMode.getIdentifier() );
  }
  return result;
}
 
开发者ID:rherrmann,项目名称:eclipse-extras,代码行数:9,代码来源:LaunchModeComputer.java


示例9: getLastLaunchConfig

import org.eclipse.debug.ui.ILaunchGroup; //导入依赖的package包/类
private ILaunchConfiguration getLastLaunchConfig( ILaunchConfiguration launchConfig ) {
  ILaunchConfiguration result = null;
  if( launchMode != null ) {
    ILaunchGroup launchGroup = DebugUITools.getLaunchGroup( launchConfig, launchMode.getIdentifier() );
    if( launchGroup != null ) {
      result = DebugUITools.getLastLaunch( launchGroup.getIdentifier() );
    }
  }
  return result;
}
 
开发者ID:rherrmann,项目名称:eclipse-extras,代码行数:11,代码来源:LaunchConfigComparator.java


示例10: testComputeLaunchGroupWithSupportedMode

import org.eclipse.debug.ui.ILaunchGroup; //导入依赖的package包/类
@Test
public void testComputeLaunchGroupWithSupportedMode() {
  ILaunchMode supportedMode = getSupportedMode();

  ILaunchGroup launchMode = computeLaunchGroup( supportedMode );

  assertThat( launchMode.getMode() ).isEqualTo( supportedMode.getIdentifier() );
}
 
开发者ID:rherrmann,项目名称:eclipse-extras,代码行数:9,代码来源:LaunchModeComputerPDETest.java


示例11: testComputeLaunchGroupWithUnsupportedMode

import org.eclipse.debug.ui.ILaunchGroup; //导入依赖的package包/类
@Test
public void testComputeLaunchGroupWithUnsupportedMode() {
  ILaunchMode unsupportedMode = getUnsupportedMode();

  ILaunchGroup launchMode = computeLaunchGroup( unsupportedMode );

  assertThat( launchMode.getMode() ).isEqualTo( getSupportedMode().getIdentifier() );
}
 
开发者ID:rherrmann,项目名称:eclipse-extras,代码行数:9,代码来源:LaunchModeComputerPDETest.java


示例12: testComputeLaunchGroupWithDeletedLaunchConfig

import org.eclipse.debug.ui.ILaunchGroup; //导入依赖的package包/类
@Test
public void testComputeLaunchGroupWithDeletedLaunchConfig() throws CoreException {
  ILaunchMode supportedMode = getSupportedMode();
  ILaunchConfiguration deletedLaunchConfig = launchConfig.doSave();
  deletedLaunchConfig.delete();

  ILaunchGroup launchGroup = new LaunchModeComputer( deletedLaunchConfig, supportedMode ).computeLaunchGroup();

  assertThat( launchGroup ).isNull();
}
 
开发者ID:rherrmann,项目名称:eclipse-extras,代码行数:11,代码来源:LaunchModeComputerPDETest.java


示例13: reopenLaunchConfig

import org.eclipse.debug.ui.ILaunchGroup; //导入依赖的package包/类
/**
    * Re-open config window with the specified launch config
    * @param configuration
    * @param mode
    */
   @VisibleForTesting
public void reopenLaunchConfig(final ILaunchConfiguration configuration, final String mode) {
	if (Utils.isNotEmpty(configuration) && Utils.isNotEmpty(mode)) {
		Display display = getDisplay();
		display.asyncExec(new Runnable() {
			@Override
			public void run() {
				IWorkbenchWindow aww = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
				ILaunchGroup launchGroup = DebugUITools.getLaunchGroup(configuration, mode);
				DebugUITools.openLaunchConfigurationDialog(aww.getShell(), configuration, launchGroup.getIdentifier(), null);
			}
		});
	}
}
 
开发者ID:forcedotcom,项目名称:idecore,代码行数:20,代码来源:RunTestsLaunchConfigurationDelegate.java


示例14: getLaunchGroupId

import org.eclipse.debug.ui.ILaunchGroup; //导入依赖的package包/类
private String getLaunchGroupId( ILaunchConfiguration launchConfig ) {
  ILaunchMode preferredLaunchMode = launchSelectionDialog.getLaunchMode();
  LaunchModeComputer launchModeComputer = new LaunchModeComputer( launchConfig, preferredLaunchMode );
  ILaunchGroup launchGroup = launchModeComputer.computeLaunchGroup();
  return launchGroup == null ? null : launchGroup.getIdentifier();
}
 
开发者ID:rherrmann,项目名称:eclipse-extras,代码行数:7,代码来源:EditLaunchConfigAction.java


示例15: LaunchHistoryAction

import org.eclipse.debug.ui.ILaunchGroup; //导入依赖的package包/类
LaunchHistoryAction( ILaunchGroup launchGroup ) {
  super( launchGroup.getIdentifier() );
}
 
开发者ID:rherrmann,项目名称:eclipse-extras,代码行数:4,代码来源:LaunchConfigSelectionHistory.java


示例16: testComputeLaunchGroupWithNullLaunchMode

import org.eclipse.debug.ui.ILaunchGroup; //导入依赖的package包/类
@Test
public void testComputeLaunchGroupWithNullLaunchMode() {
  ILaunchGroup launchGroup = computeLaunchGroup( null );

  assertThat( launchGroup.getMode() ).isEqualTo( getSupportedMode().getIdentifier() );
}
 
开发者ID:rherrmann,项目名称:eclipse-extras,代码行数:7,代码来源:LaunchModeComputerPDETest.java


示例17: computeLaunchGroup

import org.eclipse.debug.ui.ILaunchGroup; //导入依赖的package包/类
private ILaunchGroup computeLaunchGroup( ILaunchMode preferredLaunchMode ) {
  return new LaunchModeComputer( launchConfig, preferredLaunchMode ).computeLaunchGroup();
}
 
开发者ID:rherrmann,项目名称:eclipse-extras,代码行数:4,代码来源:LaunchModeComputerPDETest.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java GeometrySnapper类代码示例发布时间:2022-05-22
下一篇:
Java TopologyGraph类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap