Examples of ILaunchConfigurationType


Examples of org.eclipse.debug.core.ILaunchConfigurationType

            final DebuggerTraceView debuggerTraceView) {
        if (target == null) {
            return;
        }
        try {
            final ILaunchConfigurationType lcType = DebugPlugin
                    .getDefault()
                    .getLaunchManager()
                    .getLaunchConfigurationType(
                            "org.erlide.runtime.debug.launchDebugTrace");
            final String name = target.toString();
            final ILaunchConfigurationWorkingCopy wc = lcType.newInstance(null, name);
            final Set<String> modes = new HashSet<String>();
            modes.add(ILaunchManager.DEBUG_MODE);
            final ILaunchDelegate[] delegates = lcType.getDelegates(modes);
            final ILaunchConfigurationDelegate delegate = delegates[0].getDelegate();
            if (!(delegate instanceof DebugTraceLaunchConfigurationDelegate)) {
                return;
            }
            final DebugTraceLaunchConfigurationDelegate ldtlcd = (DebugTraceLaunchConfigurationDelegate) delegate;
View Full Code Here

Examples of org.eclipse.debug.core.ILaunchConfigurationType

    assertThat(provider.getImage(mode), notNullValue());
  }

  @Test
  public void getImageShouldReturnAnImageForAValidLaunchConfigurationType() {
    ILaunchConfigurationType type = manager.getLaunchConfigurationTypes()[0];
    assertThat(provider.getImage(type), notNullValue());
  }
View Full Code Here

Examples of org.eclipse.debug.core.ILaunchConfigurationType

  @Test
  public void getTextShouldReturnTheNameOfALaunchConfigurationType() {
    String expectedName = "HelloWorld";

    ILaunchConfigurationType type = mock(ILaunchConfigurationType.class);
    given(type.getName()).willReturn(expectedName);

    assertThat(provider.getText(type), equalTo(expectedName));
  }
View Full Code Here

Examples of org.eclipse.debug.core.ILaunchConfigurationType

  @Test
  public void getForegroundShouldReturnDarkGrayForAnInvalidLaunchConfigurationType() {
    Color expectedColor = PlatformUI.getWorkbench().getDisplay()
        .getSystemColor(SWT.COLOR_DARK_GRAY);

    ILaunchConfigurationType type = mock(ILaunchConfigurationType.class);
    given(type.getIdentifier()).willReturn("noSuchId");

    assertThat(provider.getForeground(type), equalTo(expectedColor));
  }
View Full Code Here

Examples of org.eclipse.debug.core.ILaunchConfigurationType

  @Override
  protected LaunchEvent createEvent(DateTime dateTime) {
    long duration = 19823;
   
    ILaunchConfigurationType type = mock(ILaunchConfigurationType.class);
    given(type.getIdentifier()).willReturn("typeId1");
   
    ILaunchConfiguration config = mock(ILaunchConfiguration.class);
    given(config.getName()).willReturn("configName1");
   
    ILaunch launch = mock(ILaunch.class);
View Full Code Here

Examples of org.eclipse.debug.core.ILaunchConfigurationType

  @Override
  protected LaunchEvent createEventDiff(DateTime dateTime) {
    long duration = 119823;
   
    ILaunchConfigurationType type = mock(ILaunchConfigurationType.class);
    given(type.getIdentifier()).willReturn("typeId2");
   
    ILaunchConfiguration config = mock(ILaunchConfiguration.class);
    given(config.getName()).willReturn("configName2");
   
    ILaunch launch = mock(ILaunch.class);
View Full Code Here

Examples of org.eclipse.debug.core.ILaunchConfigurationType

  public void testConvert() throws Exception {
    DateTime time = new DateTime();
    long duration = 9823;

    String configTypeId = "configTypeId";
    ILaunchConfigurationType configType = mock(ILaunchConfigurationType.class);
    given(configType.getIdentifier()).willReturn(configTypeId);

    String configName = "configName";
    ILaunchConfiguration config = mock(ILaunchConfiguration.class);
    given(config.getName()).willReturn(configName);
View Full Code Here

Examples of org.eclipse.debug.core.ILaunchConfigurationType

    assertTrue(event.getFilePaths().contains(unit2.getResource().getFullPath()));
  }

  @Override
  protected LaunchEvent createEvent() {
    ILaunchConfigurationType type = mock(ILaunchConfigurationType.class);
    given(type.getIdentifier()).willReturn("typeId");
    ILaunchConfiguration config = mock(ILaunchConfiguration.class);
    given(config.getName()).willReturn("name");
    ILaunch launch = mock(ILaunch.class);
    given(launch.getLaunchMode()).willReturn("run");
    return new LaunchEvent(new Interval(0, 1), launch, config, type,
View Full Code Here

Examples of org.eclipse.debug.core.ILaunchConfigurationType

   * @see ILaunchManager#DEBUG_MODE
   */
  private ILaunchConfiguration launch(String configName, String projectName,
      String typeName, String mode) throws CoreException {
    ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
    ILaunchConfigurationType type = manager
        .getLaunchConfigurationType(IJavaLaunchConfigurationConstants.ID_JAVA_APPLICATION);
    ILaunchConfigurationWorkingCopy copy = type.newInstance(null, configName);
    copy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME,
        projectName);
    copy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME,
        typeName);
    ILaunchConfiguration config = copy.doSave();
View Full Code Here

Examples of org.eclipse.debug.core.ILaunchConfigurationType

    {
        // Getting the default VM installation
        IVMInstall vmInstall = JavaRuntime.getDefaultVMInstall();

        // Creating a new editable launch configuration
        ILaunchConfigurationType type = DebugPlugin.getDefault().getLaunchManager()
            .getLaunchConfigurationType( IJavaLaunchConfigurationConstants.ID_JAVA_APPLICATION );
        ILaunchConfigurationWorkingCopy workingCopy = type.newInstance( null,
            NLS.bind( Messages.getString( "ApacheDS200LdapServerAdapter.Starting" ), new String[] //$NON-NLS-1$
                { server.getName() } ) );

        // Setting the JRE container path attribute
        workingCopy.setAttribute( IJavaLaunchConfigurationConstants.ATTR_JRE_CONTAINER_PATH, vmInstall
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.