Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 213786 | Differences between
and this patch

Collapse All | Expand All

(-)plugin.xml (-1 / +34 lines)
Lines 487-491 Link Here
487
         <!-- END : do we need these? -->
487
         <!-- END : do we need these? -->
488
      </kind>
488
      </kind>
489
   </extension>
489
   </extension>
490
   
490
491
   <extension
492
         point="org.eclipse.ui.editors">
493
      <editor
494
            default="false"
495
            id="org.eclipse.jdt.junit.JUnitResultEditor"
496
            launcher="org.eclipse.jdt.internal.junit.ui.JUnitViewEditorLauncher"
497
            name="JUnit View">
498
         <contentTypeBinding
499
               contentTypeId="org.eclipse.jdt.junit.JUnitResult">
500
         </contentTypeBinding>
501
      </editor>
502
   </extension>
503
   <extension
504
         point="org.eclipse.core.runtime.contentTypes">
505
      <content-type
506
            base-type="org.eclipse.core.runtime.xml"
507
            file-extensions="xml"
508
            id="JUnitResult"
509
            name="JUnit Test Result"
510
            priority="high">
511
         <describer
512
               class="org.eclipse.core.runtime.content.XMLRootElementContentDescriber2">
513
            <parameter
514
                  name="element"
515
                  value="testrun">
516
            </parameter>
517
            <parameter
518
                  name="element"
519
                  value="testsuite">
520
            </parameter>
521
         </describer>
522
      </content-type>
523
   </extension>   
491
</plugin>
524
</plugin>
(-)src/org/eclipse/jdt/internal/junit/ui/JUnitViewEditorLauncher.java (+22 lines)
Added Link Here
1
package org.eclipse.jdt.internal.junit.ui;
2
3
import org.eclipse.core.runtime.CoreException;
4
import org.eclipse.core.runtime.IPath;
5
6
import org.eclipse.ui.IEditorLauncher;
7
import org.eclipse.ui.PlatformUI;
8
9
import org.eclipse.jdt.internal.junit.model.JUnitModel;
10
11
public class JUnitViewEditorLauncher implements IEditorLauncher {
12
13
	public void open(IPath file) {
14
		try {
15
			PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(TestRunnerViewPart.NAME);
16
			JUnitModel.importTestRunSession(file.toFile());
17
		} catch (CoreException e) {
18
			JUnitPlugin.log(e.getStatus());
19
		}
20
	}
21
22
}

Return to bug 213786