Package org.eclipse.debug.core

Examples of org.eclipse.debug.core.ILaunchConfigurationType.newInstance()


  protected ILaunchConfiguration createConfiguration(IType type, IFile file) {
    ILaunchConfiguration config = null;
    ILaunchConfigurationWorkingCopy wc = null;
    try {
      ILaunchConfigurationType configType = getConfigurationType();
      wc = configType.newInstance(null, getLaunchManager()
          .generateUniqueLaunchConfigurationNameFrom(file.getName()));
      wc.setAttribute(
          IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, type
              .getFullyQualifiedName());
      wc.setAttribute(
View Full Code Here


      if (configurations[i].getName().equals(name))
        configurations[i].delete();
    }
    // else create a new one
    if (config == null) {
      ILaunchConfigurationWorkingCopy wc = type.newInstance(null, name);
      wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME,
        proj.getProject().getName());
      // current directory should be the project root
      wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY,
        proj.getProject().getLocation().toString());
View Full Code Here

        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);
        wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_STOP_IN_MAIN, false);
View Full Code Here

    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);
    workingCopy.setAttribute(DebugPlugin.ATTR_PROCESS_FACTORY_ID, REMOTE_ANT_PROCESS_FACTORY_ID);
View Full Code Here

  protected ILaunchConfiguration createConfiguration(IType type) {
    ILaunchConfiguration config = null;
    ILaunchConfigurationWorkingCopy wc = null;
    try {
      ILaunchConfigurationType configType = getConfigurationType();
      wc = configType.newInstance(null, getLaunchManager().generateUniqueLaunchConfigurationNameFrom("ERXMainRunner: " + type.getJavaProject().getProject().getName() + "/" + type.getElementName()));
      wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, "er.extensions.ERXMainRunner");
      wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, type.getJavaProject().getElementName());
      wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, type.getJavaProject().getElementName());
      wc.setMappedResources(new IResource[] { type.getJavaProject().getProject() });
      WOJavaLocalApplicationLaunchConfigurationDelegate.initConfiguration(wc);
View Full Code Here

  protected ILaunchConfiguration createConfiguration(IType type) {
    ILaunchConfiguration config = null;
    ILaunchConfigurationWorkingCopy wc = null;
    try {
      ILaunchConfigurationType configType = getConfigurationType();
      wc = configType.newInstance(null, getLaunchManager().generateLaunchConfigurationName(type.getTypeQualifiedName('.')));
      wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, type.getFullyQualifiedName());
      wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, type.getJavaProject().getElementName());
      wc.setMappedResources(new IResource[] {type.getUnderlyingResource()});
      WOJavaLocalApplicationLaunchConfigurationDelegate.initConfiguration(wc);
      config = wc.doSave();
View Full Code Here

   */
  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

    }
   
    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 {
View Full Code Here

        .getLaunchConfigurationType(LAUNCH_CONFIGURATION_TYPE_ID);
   
    if (type == null)
      return;
   
    ILaunchConfigurationWorkingCopy workingCopy = type.newInstance(null, CONFIG_NAME);
    workingCopy.setAttribute("debug_host", "localhost");
    if (nodeDebugPort==0) { //this would only happen if user sets default part value to empty, i.e. 0
      IPreferenceStore preferenceStore = Activator.getDefault().getPreferenceStore();   
      nodeDebugPort = preferenceStore.getInt(PreferenceConstants.NODE_DEBUG_PORT);
      if (nodeDebugPort==0) nodeDebugPort=5858;
View Full Code Here

    private static ILaunchConfigurationWorkingCopy createWorkingCopy(final String namespace, IJavaProject project)throws CoreException {
      DebugPlugin debugPlugin = DebugPlugin.getDefault();
    ILaunchManager launchManager = debugPlugin.getLaunchManager();
    ILaunchConfigurationType launchConfigurationType = launchManager.getLaunchConfigurationType(namespace);
    ILaunchConfigurationWorkingCopy launchConfiguration = launchConfigurationType.newInstance(null, defaultName(project));
      if(launchConfiguration == null){
        throw new RuntimeException("LaunchConfigurationTypes not found. namespace:" + namespace); //$NON-NLS-1$
      }
      launchConfiguration.setContainer(project.getProject());
      launchConfiguration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, project.getElementName());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.