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


Java ILaunchManager.getLaunches方法代码示例

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


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

示例1: getRunningLaunchConfiguration

import org.eclipse.debug.core.ILaunchManager; //导入方法依赖的package包/类
private ILaunchConfiguration getRunningLaunchConfiguration() {
	Set<IProject> projects = new HashSet<IProject>(
			Arrays.asList(ProjectUtil.getProjects(repository)));

	ILaunchManager launchManager = DebugPlugin.getDefault()
			.getLaunchManager();
	ILaunch[] launches = launchManager.getLaunches();
	for (ILaunch launch : launches) {
		if (launch.isTerminated())
			continue;
		ISourceLocator locator = launch.getSourceLocator();
		if (locator instanceof ISourceLookupDirector) {
			ISourceLookupDirector director = (ISourceLookupDirector) locator;
			ISourceContainer[] containers = director.getSourceContainers();
			if (isAnyProjectInSourceContainers(containers, projects))
				return launch.getLaunchConfiguration();
		}
	}
	return null;
}
 
开发者ID:Genuitec,项目名称:gerrit-tools,代码行数:21,代码来源:BranchOperationUI.java

示例2: terminateAllLaunchConfigs

import org.eclipse.debug.core.ILaunchManager; //导入方法依赖的package包/类
public static void terminateAllLaunchConfigs(SWTBot bot) {
  SwtBotUtils.print("Terminating Launches");

  ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
  ILaunch[] launches = manager.getLaunches();
  if (launches == null || launches.length == 0) {
    SwtBotUtils.print("No Launches to terminate");
  }

  for (ILaunch launch : launches) {
    if (!launch.isTerminated()) {
      try {
        launch.terminate();
      } catch (DebugException e) {
        SwtBotUtils.printError("Could not terminate launch." + e.getMessage());
      }
    }
  }

  SwtBotWorkbenchActions.waitForIdle(bot);

  SwtBotUtils.print("Terminated Launches");
}
 
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:24,代码来源:SwtBotLaunchManagerActions.java

示例3: isRunning

import org.eclipse.debug.core.ILaunchManager; //导入方法依赖的package包/类
public boolean isRunning() {
	final ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
	final ILaunch[] launches = launchManager.getLaunches();
	for (int i = 0; i < launches.length; i++) {
		final ILaunch launch = launches[i];
		if (launch.getLaunchConfiguration() != null
				&& launch.getLaunchConfiguration().contentsEqual(this.launchConfig)) {
			if (!launch.isTerminated()) {
				return true;
			}
		}
	}
	return false;
}
 
开发者ID:tlaplus,项目名称:tlaplus,代码行数:15,代码来源:Model.java

示例4: processInitialize

import org.eclipse.debug.core.ILaunchManager; //导入方法依赖的package包/类
private Response processInitialize(Initialize initialize) {
  String clientId = initialize.getClientId();
  assert (clientId != null);

  ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
  ILaunch[] launches = launchManager.getLaunches();
  ILaunch launch = null;
  for (int i = 0; launch == null && i < launches.length; ++i) {
    IProcess[] processes = launches[i].getProcesses();
    for (IProcess iProcess : processes) {
      String commandLine = iProcess.getAttribute(IProcess.ATTR_CMDLINE);
      if (commandLine != null && commandLine.indexOf(clientId) != -1) {
        launch = launches[i];
        break;
      }
    }
  }

  WebAppDebugModel model = WebAppDebugModel.getInstance();
  LaunchConfiguration lc = model.addOrReturnExistingLaunchConfiguration(launch, clientId, null);
  lc.setLaunchUrls(initialize.getStartupURLsList());
  setLaunchConfiguration(lc);
  DevModeServiceClient devModeServiceClient = new DevModeServiceClient(getTransport());
  DevModeServiceClientManager.getInstance().putClient(getLaunchConfiguration(),
      devModeServiceClient);
  performDevModeServiceCapabilityExchange(devModeServiceClient);

  return buildResponse(null);
}
 
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:30,代码来源:ViewerServiceServer.java

示例5: ThreadColorManager

import org.eclipse.debug.core.ILaunchManager; //导入方法依赖的package包/类
ThreadColorManager()
{
  updateList = new LinkedList<IThreadColorListener>();
  threadColors = new ArrayList<Color>();
  targetToThreadColorsMap = new HashMap<IJiveDebugTarget, TargetThreadColors>();
  final IPreferenceStore store = PreferencesPlugin.getDefault().getPreferenceStore();
  store.addPropertyChangeListener(this);
  final ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
  for (final ILaunch launch : manager.getLaunches())
  {
    launchChanged(launch);
  }
  manager.addLaunchListener(this);
}
 
开发者ID:UBPL,项目名称:jive,代码行数:15,代码来源:ThreadColorManager.java

示例6: waitForLaunchAvailable

import org.eclipse.debug.core.ILaunchManager; //导入方法依赖的package包/类
/**
 * Waits until a launch becomes available 
 * @return the launch that was found
 */
public ILaunch waitForLaunchAvailable() throws Throwable {
    final ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
    waitForCondition(new ICallback() {

        @Override
        public Object call(Object args) throws Exception {
            ILaunch[] launches = launchManager.getLaunches();
            return launches.length > 0;
        }
    }, "waitForLaunchAvailable");
    return launchManager.getLaunches()[0];
}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:17,代码来源:DebuggerTestUtils.java

示例7: clearToLaunch

import org.eclipse.debug.core.ILaunchManager; //导入方法依赖的package包/类
/**
 * Checks whether a dLabPro process of the extended type <code>sExtProcType</code>
 * can be launched. If other processes of the same type are running and dLabPro
 * console recycling is enabled (see
 * {@link de.tudresden.ias.eclipse.dlabpro.run.actions.common#ReuseConsoleViewActionDelegate
 * ReuseConsoleViewActionDelegate}) the method will display a dialog which will
 * prompt the user for terminating concurrent processes.
 * 
 * @param sExtProcType the extended process type
 * @return <code>true</code> if a new dLabPro process can be launched
 */
private static boolean clearToLaunch(String sExtProcType)
{
  ILaunchManager iLm = DebugPlugin.getDefault().getLaunchManager();
  ILaunch[] aiLn = iLm.getLaunches();
  if (ReuseConsoleViewActionDelegate.isEnabled() && aiLn.length > 0)
    for (int i=0; i<aiLn.length; i++)
     {
      if (aiLn[i].getProcesses().length==0) continue;
      IProcess iIpr = aiLn[i].getProcesses()[0];
      if (iIpr.isTerminated()) continue;
      if (!iIpr
          .getAttribute(ATTR_PROCESS_EXTTYPE).equals(sExtProcType))
        continue;
      String sTitle = sExtProcType+" - Confirm Termination";
      String sMsg = "This will terminate the running "+sExtProcType+" session.";
      sMsg += "\n\nUncheck the \"Recycle Console\" button in the console toolbar if you";
      sMsg += " want to run multiple "+sExtProcType+" sessions at the same time.";
      if (UIUtil.openConfirmDialog(sTitle,sMsg))
      {
        try
        {
          aiLn[i].terminate();
        }
        catch (DebugException e)
        {
          return false;
        }
      }
      else return false;
    }
  return true;
}
 
开发者ID:matthias-wolff,项目名称:dLabPro-Plugin,代码行数:44,代码来源:LaunchUtil.java

示例8: closeOutputDocument

import org.eclipse.debug.core.ILaunchManager; //导入方法依赖的package包/类
/**
    * Closes the target output document using the DDE command from the
    * default viewer, or the most recently launched preview. This method
    * is probably fragile since the process and launches handling in
    * Texlipse is too weak to always know what documents are locked and
    * needs closing.  
    * 
    * @throws CoreException
    */
   public static void closeOutputDocument() throws CoreException {
	
       ViewerAttributeRegistry registry = new ViewerAttributeRegistry();
	
   	// Check to see if we have a running launch configuration which should
       // override the DDE close command
 	ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
    ILaunch[] launches = manager.getLaunches();
    
    for (int i = 0; i < launches.length; i++) {
    	ILaunch l = launches[i];
    	ILaunchConfiguration configuration = l.getLaunchConfiguration();
    	if (configuration != null && configuration.exists() && configuration.getType().getIdentifier().equals(
    			TexLaunchConfigurationDelegate.CONFIGURATION_ID)) {
    		Map regMap = configuration.getAttributes();
	        registry.setValues(regMap);
	        break;
    	}
	}
    
   	ViewerManager mgr = new ViewerManager(registry, null);    	
	
	 if (!mgr.initialize()) {
         return;
     }
	
	// Can only close documents opened by DDE commands themselves
	Process process = mgr.getExisting();        
	if (process != null) {       
		mgr.sendDDECloseCommand();
           
		try {
               Thread.sleep(500); // A small delay required
           } catch (InterruptedException e) {
               // swallow
           }

           returnFocusToEclipse(false);
	}
}
 
开发者ID:eclipse,项目名称:texlipse,代码行数:50,代码来源:ViewerManager.java


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