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


Java ILaunchConfigurationWorkingCopy.setMappedResources方法代码示例

本文整理汇总了Java中org.eclipse.debug.core.ILaunchConfigurationWorkingCopy.setMappedResources方法的典型用法代码示例。如果您正苦于以下问题:Java ILaunchConfigurationWorkingCopy.setMappedResources方法的具体用法?Java ILaunchConfigurationWorkingCopy.setMappedResources怎么用?Java ILaunchConfigurationWorkingCopy.setMappedResources使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.debug.core.ILaunchConfigurationWorkingCopy的用法示例。


在下文中一共展示了ILaunchConfigurationWorkingCopy.setMappedResources方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: performApply

import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; //导入方法依赖的package包/类
@Override
public void performApply(ILaunchConfigurationWorkingCopy configuration) {
	String program = eiffelProgramText.getText().trim();
	if (program.length() == 0)
		program = null;
	
	configuration.setAttribute(Constants.ATTR_LE_PROGRAM, program);
	
	String seFullPath = this.seFullPathText.getText().trim();
	configuration.setAttribute(Constants.ATTR_LEC_FULL_PATH, seFullPath);
	
	//perform resource mapping for contextual launch
	IResource[] resources = null;
	if (program != null) {
		IPath path = new Path(program);
		IResource res = ResourcesPlugin.getWorkspace().getRoot().findMember(path);
		if (res != null) {
			resources = new IResource[]{res};
		}
	}
	configuration.setMappedResources(resources);
}
 
开发者ID:Imhotup,项目名称:LibertyEiffel-Eclipse-Plugin,代码行数:23,代码来源:LibertyEiffelMainTab.java

示例2: createLaunchConfiguration

import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; //导入方法依赖的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

示例3: createCustomConfiguration

import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; //导入方法依赖的package包/类
protected void createCustomConfiguration(IResource resource, Object additionalScope,
		ILaunchConfigurationWorkingCopy wc, String projectName) {
	createProjectNameConfiguration(wc, projectName);
	createTaskConfiguration(wc);

	wc.setMappedResources(new IResource[] { getResourceToMap(resource) });
}
 
开发者ID:de-jcup,项目名称:egradle,代码行数:8,代码来源:EGradleLaunchShortCut.java

示例4: setupLaunchConfiguration

import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; //导入方法依赖的package包/类
@Override
public void setupLaunchConfiguration(ILaunchConfigurationWorkingCopy workingCopy,
    IProgressMonitor monitor) throws CoreException {
  super.setupLaunchConfiguration(workingCopy, monitor);

  // it seems surprising that the Server class doesn't already do this
  Collection<IProject> projects = new ArrayList<>();
  for (IModule module : getServer().getModules()) {
    IProject project = module.getProject();
    if (project != null) {
      projects.add(project);
    }
  }
  workingCopy.setMappedResources(projects.toArray(new IResource[projects.size()]));
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:16,代码来源:LocalAppEngineServerBehaviour.java


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