Package org.eclipse.debug.core

Examples of org.eclipse.debug.core.ILaunchManager


          + " webapp-local";
      Utilities.RunExtCommand(cmdString);
    }

    try {
      ILaunchManager manager = DebugPlugin.getDefault()
          .getLaunchManager();
      ILaunchConfigurationType type = manager
          .getLaunchConfigurationType(ID_JAVA_APPLICATION);
      ILaunchConfigurationWorkingCopy workingCopy = type.newInstance(
          null, "Start Jetty");

      // find the JRE used to start
View Full Code Here


  private static ManifestElement[] getElements(String bundleName) throws BundleException {
    String requires = (String)Platform.getBundle(bundleName).getHeaders().get(Constants.BUNDLE_CLASSPATH);
    return ManifestElement.parseHeader(Constants.BUNDLE_CLASSPATH, requires);
  }
  protected static ILaunch launch(IProject proj, String name, String mainClass, String args, String vmargs, String app) throws CoreException
    ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
 
    ILaunchConfigurationType type=null;
    if(app.equalsIgnoreCase(CommonNames.START_DERBY_SERVER)){
      //type= manager.getLaunchConfigurationType("org.apache.derby.ui.startDerbyServerLaunchConfigurationType");
      type= manager.getLaunchConfigurationType(CommonNames.START_SERVER_LAUNCH_CONFIG_TYPE);
    }else if(app.equalsIgnoreCase(CommonNames.SHUTDOWN_DERBY_SERVER)){
      //type= manager.getLaunchConfigurationType("org.apache.derby.ui.stopDerbyServerLaunchConfigurationType");
      type= manager.getLaunchConfigurationType(CommonNames.STOP_SERVER_LAUNCH_CONFIG_TYPE);
    }else if(app.equalsIgnoreCase(CommonNames.IJ)){
      //type= manager.getLaunchConfigurationType("org.apache.derby.ui.ijDerbyLaunchConfigurationType");
      type= manager.getLaunchConfigurationType(CommonNames.IJ_LAUNCH_CONFIG_TYPE);
    }else if(app.equalsIgnoreCase(CommonNames.SYSINFO)){
      //type= manager.getLaunchConfigurationType("org.apache.derby.ui.sysinfoDerbyLaunchConfigurationType");
      type= manager.getLaunchConfigurationType(CommonNames.SYSINFO_LAUNCH_CONFIG_TYPE);
    }else{
      type = manager.getLaunchConfigurationType(IJavaLaunchConfigurationConstants.ID_JAVA_APPLICATION);
    }
    ILaunchConfiguration config = null;
    // if the configuration already exists, delete it
    ILaunchConfiguration[] configurations = manager.getLaunchConfigurations(type);
    for (int i = 0; i < configurations.length; i++) {
      if (configurations[i].getName().equals(name))
        configurations[i].delete();
    }
    // else create a new one
View Full Code Here

 
  @Override
  protected void internalExecute(final Command cmd) throws Exception {
    final ExternalToolsCommand c = (ExternalToolsCommand) cmd;
   
    final ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
   
    final String requestedCfgName = c.getConfigurationName();
   
    for(final ILaunchConfiguration cfg : manager.getLaunchConfigurations()){
      final String cfgName = cfg.getName();
     
      if(!requestedCfgName.equals(cfgName)) continue;

      cfg.launch(new RunModeMapper().getRunMode(c.getRunMode()), null);
View Full Code Here

  public ILaunchConfiguration createConfiguration() {
    try {
      ILaunchConfiguration _xblockexpression = null;
      {
        DebugPlugin _default = DebugPlugin.getDefault();
        final ILaunchManager launchManager = _default.getLaunchManager();
        final ILaunchConfigurationType configType = launchManager.getLaunchConfigurationType("org.xtext.builddsl.ui.BuildLaunchConfigurationType");
        String _name = this.getName();
        String _generateUniqueLaunchConfigurationNameFrom = launchManager.generateUniqueLaunchConfigurationNameFrom(_name);
        final ILaunchConfigurationWorkingCopy wc = configType.newInstance(null, _generateUniqueLaunchConfigurationNameFrom);
        String _project = this.getProject();
        wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, _project);
        String _clazz = this.getClazz();
        wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, _clazz);
View Full Code Here

        if (_isNullOrEmpty_2) {
          MessageDialog.openError(null, "Launch Error", "Could not determine the project that should be executed.");
        } else {
          try {
            DebugPlugin _default = DebugPlugin.getDefault();
            ILaunchManager _launchManager = _default.getLaunchManager();
            final ILaunchConfiguration[] configs = _launchManager.getLaunchConfigurations();
            ILaunchConfiguration _elvis = null;
            final Function1<ILaunchConfiguration, Boolean> _function = new Function1<ILaunchConfiguration, Boolean>() {
              public Boolean apply(final ILaunchConfiguration it) {
                return Boolean.valueOf(info.configEquals(it));
              }
View Full Code Here

    ILaunchConfigurationWorkingCopy workingCopy = null;
    try {
      workingCopy = DefaultAntlauncher.createDefaultLaunchConfiguration(buildFile, captureOutput, targets);
      ILaunch launch = workingCopy.launch(ILaunchManager.RUN_MODE, new SubProgressMonitor(monitor, 1));
      if (!captureOutput) {
        ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
        manager.removeLaunch(launch);
      }
    } finally {
      workingCopy = null;
    }
  }
View Full Code Here

   * @param targets
   * @return default launch configuration
   * @throws CoreException
   */
  private static ILaunchConfigurationWorkingCopy createDefaultLaunchConfiguration(IFile file, boolean captureOutput, String targets) throws CoreException {
    ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
    ILaunchConfigurationType type = manager.getLaunchConfigurationType(ID_ANT_LAUNCH_CONFIGURATION_TYPE);
    StringBuffer buffer = new StringBuffer(file.getProject().getName());
    buffer.append(' ');
    buffer.append(file.getName());
    buffer.append(" (WOLips)");
    String name = buffer.toString().trim();
    name = manager.generateUniqueLaunchConfigurationNameFrom(name);
    ILaunchConfigurationWorkingCopy workingCopy = type.newInstance(null, name);
    workingCopy.setAttribute(ATTR_LOCATION, VariablesPlugin.getDefault().getStringVariableManager().generateVariableExpression("workspace_loc", file.getFullPath().toString())); //$NON-NLS-1$
    workingCopy.setAttribute("org.eclipse.jdt.launching.WORKING_DIRECTORY", file.getProject().getLocation().toOSString());
    workingCopy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_CLASSPATH_PROVIDER, "org.eclipse.ant.ui.AntClasspathProvider"); //$NON-NLS-1$
    workingCopy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, MAIN_TYPE_NAME);
View Full Code Here

   *
   * @param javaProject the java project to generate a classpath for
   * @return a list of classpath URLs for the given project
   */
  public static List<URL> createClasspathURLsForProject(IJavaProject javaProject) throws CoreException, MalformedURLException {
    ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
    ILaunchConfigurationWorkingCopy wc = null;
    ILaunchConfigurationType launchConfigurationType = launchManager.getLaunchConfigurationType(WOJavaLocalApplicationLaunchConfigurationDelegate.WOJavaLocalApplicationID);
    wc = launchConfigurationType.newInstance(null, launchManager.generateUniqueLaunchConfigurationNameFrom("Entity Modeler SQL Generation"));
    // wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME,
    // type.getFullyQualifiedName());
    wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, javaProject.getElementName());
    wc.setMappedResources(new IResource[] { javaProject.getProject() });
    WOJavaLocalApplicationLaunchConfigurationDelegate.initConfiguration(wc);
View Full Code Here

      }
    }
  }
 
  private ILaunchConfiguration getLaunchConfiguration(IFile file) throws CoreException {
    ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
   
    ILaunchConfiguration[] configs = manager.getLaunchConfigurations();
    String fullPath = file.getLocation().toFile().getAbsolutePath();
   
    for(int i=0;i<configs.length;i++){
      String value = configs[i].getAttribute(JavaScriptLaunchConstants.ATTR_JAVASCRIPT_FILE, "");
      if(value.equals(fullPath)){
        return configs[i];
      }
    }
   
    ILaunchConfigurationType type = manager.getLaunchConfigurationType(
        "tk.eclipse.plugin.jseditor.launch.JavaScriptLaunchConfigurationType");
   
    ILaunchConfigurationWorkingCopy wc = type.newInstance(null,
        manager.generateUniqueLaunchConfigurationNameFrom(file.getName()));
   
    wc.setAttribute(JavaScriptLaunchConstants.ATTR_JAVASCRIPT_FILE, fullPath);
   
    try {
      HTMLProjectParams params = new HTMLProjectParams(file.getProject());
View Full Code Here

    GrammarResource grammarResource = createMock(GrammarResource.class);
    URI resourceURI = createMock(URI.class);
    IFile file = createMock(IFile.class);
    ToolOptionsProvider optionsProvider = createMock(ToolOptionsProvider.class);
    ToolOptions options = createMock(ToolOptions.class);
    ILaunchManager launchManager = createMock(ILaunchManager.class);
    IPath fileFullPath = createMock(IPath.class);
    ILaunchConfigurationType configType = createMock(ILaunchConfigurationType.class);
    CodeGeneratorListener listener = createMock(CodeGeneratorListener.class);
    Set<CodeGeneratorListener> listeners = newHashSet(listener);
    ToolRunner toolRunner = createMock(ToolRunner.class);
View Full Code Here

TOP

Related Classes of org.eclipse.debug.core.ILaunchManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.