Skip to content

Commit

Permalink
Merge pull request sebastianbenz#136 from SebastianPoetzsch/jump_from…
Browse files Browse the repository at this point in the history
…_junitview

Jump to test from JUnit view for Feature steps and facts.
  • Loading branch information
sebastianbenz committed Jul 29, 2014
2 parents 7e617af + e4eaa01 commit 344050a
Show file tree
Hide file tree
Showing 17 changed files with 582 additions and 350 deletions.
171 changes: 89 additions & 82 deletions features/org.jnario.ui-feature/feature.xml
Original file line number Diff line number Diff line change
@@ -1,88 +1,95 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature
id="org.jnario.ui"
label="%featureName"
version="1.1.0.qualifier"
provider-name="%providerName">

<description>
%description
</description>

<copyright>
Copyright (c) 2012 BMW Car IT (http://www.bmw-carit.de) and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License
v1.0 which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html Description here.
</copyright>

<license url="http://www.eclipse.org/legal/epl-v10.html">
%license
</license>

<requires>
<?xml version="1.0" encoding="UTF-8"?>
<feature
id="org.jnario.ui"
label="%featureName"
version="1.1.0.qualifier"
provider-name="%providerName">

<description>
%description
</description>

<copyright>
Copyright (c) 2012 BMW Car IT (http://www.bmw-carit.de) and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License
v1.0 which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html Description here.
</copyright>

<license url="http://www.eclipse.org/legal/epl-v10.html">
%license
</license>

<requires>
<import plugin="org.eclipse.xtext.ui" version="2.6.2" match="greaterOrEqual"/>
<import plugin="org.eclipse.ui.editors"/>
<import plugin="org.eclipse.ui.ide"/>
<import plugin="org.eclipse.xtext.ui.shared"/>
<import plugin="org.eclipse.ui"/>
<import plugin="org.eclipse.ui.editors"/>
<import plugin="org.eclipse.ui.ide"/>
<import plugin="org.eclipse.xtext.ui.shared"/>
<import plugin="org.eclipse.ui"/>
<import plugin="org.eclipse.xtext.builder" version="2.6.2" match="greaterOrEqual"/>
<import plugin="org.antlr.runtime"/>
<import plugin="org.antlr.runtime"/>
<import plugin="org.eclipse.xtext.common.types.ui" version="2.6.2" match="greaterOrEqual"/>
<import plugin="org.eclipse.xtext.ui.codetemplates.ui"/>
<import plugin="org.eclipse.compare"/>
<import plugin="org.eclipse.xtext.ui.codetemplates.ui"/>
<import plugin="org.eclipse.compare"/>
<import plugin="org.eclipse.xtext.xbase.ui" version="2.6.2" match="greaterOrEqual"/>
<import plugin="org.eclipse.jdt.junit"/>
<import plugin="org.eclipse.pde.ui"/>
<import plugin="org.jnario" version="1.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.debug.core" match="greaterOrEqual"/>
<import plugin="org.eclipse.debug.ui" match="greaterOrEqual"/>
<import plugin="org.jnario.feature" version="1.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.jdt.junit"/>
<import plugin="org.eclipse.pde.ui"/>
<import plugin="org.jnario" version="1.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.debug.core" match="greaterOrEqual"/>
<import plugin="org.eclipse.debug.ui" match="greaterOrEqual"/>
<import plugin="org.jnario.feature" version="1.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.xtext.xbase.lib" version="2.6.2" match="greaterOrEqual"/>
<import plugin="org.eclipse.jdt.ui"/>
<import plugin="org.eclipse.jdt.core"/>
<import plugin="org.apache.commons.logging"/>
<import plugin="org.apache.log4j" version="1.2.15" match="greaterOrEqual"/>
<import plugin="org.eclipse.xtend.core"/>
<import plugin="org.jnario.spec"/>
<import plugin="org.eclipse.ui.editors" version="3.5.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.ui.ide" version="3.5.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.jdt.ui"/>
<import plugin="org.eclipse.jdt.core"/>
<import plugin="org.apache.commons.logging"/>
<import plugin="org.apache.log4j" version="1.2.15" match="greaterOrEqual"/>
<import plugin="org.eclipse.xtend.core"/>
<import plugin="org.jnario.spec"/>
<import plugin="org.eclipse.ui.editors" version="3.5.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.ui.ide" version="3.5.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.xtend.ide" version="2.6.2" match="greaterOrEqual"/>
<import plugin="com.ibm.icu"/>
<import plugin="org.eclipse.core.resources"/>
<import plugin="org.eclipse.core.runtime"/>
<import plugin="org.jnario.lib" version="1.0.0" match="greaterOrEqual"/>
<import plugin="org.jnario.suite"/>
<import plugin="com.google.guava"/>
</requires>

<plugin
id="org.jnario.feature.ui"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>

<plugin
id="org.jnario.spec.ui"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>

<plugin
id="org.jnario.ui"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>

<plugin
id="org.jnario.suite.ui"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>

</feature>
<import plugin="com.ibm.icu"/>
<import plugin="org.eclipse.core.resources"/>
<import plugin="org.eclipse.core.runtime"/>
<import plugin="org.jnario.lib" version="1.0.0" match="greaterOrEqual"/>
<import plugin="org.jnario.suite"/>
<import plugin="com.google.guava"/>
</requires>

<plugin
id="org.jnario.feature.ui"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>

<plugin
id="org.jnario.spec.ui"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>

<plugin
id="org.jnario.ui"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>

<plugin
id="org.jnario.suite.ui"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>

<plugin
id="org.eclipse.jdt.junit.runners"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>

</feature>
2 changes: 1 addition & 1 deletion plugins/jnario-maven-report-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
</dependency>
<dependency>
<groupId>org.jnario</groupId>
<artifactId>org.jnario.standalone.maven</artifactId>
<artifactId>org.jnario.standalone</artifactId>
<version>${project.version}</version>
</dependency>

Expand Down
3 changes: 2 additions & 1 deletion plugins/org.jnario.feature.ui/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ Require-Bundle: org.eclipse.xtext.ui;bundle-version="[2.6.2,2.7.0)",
org.eclipse.jdt.ui,
org.eclipse.jdt.core,
org.eclipse.xtend.ide;bundle-version="2.3.1",
org.jnario.lib;bundle-version="1.0.0"
org.jnario.lib;bundle-version="1.0.0",
org.eclipse.jdt.junit.runners;bundle-version="0.1.0";resolution:=optional
Import-Package: org.apache.commons.logging,
org.apache.log4j,
org.eclipse.jdt.core,
Expand Down
7 changes: 7 additions & 0 deletions plugins/org.jnario.feature.ui/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1063,4 +1063,11 @@
sequence="M1+M2+F">
</key>
</extension>
<extension
point="org.eclipse.jdt.junit.runners.junitRunnerUI">
<junitRunnerUIHandler
handlerClass="org.jnario.feature.ui.handler.FeatureRunnerUIHandler"
runnerClass="org.jnario.runner.FeatureRunner">
</junitRunnerUIHandler>
</extension>
</plugin>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package org.jnario.feature.ui.handler;

import org.eclipse.jdt.internal.junit.model.TestCaseElement;
import org.eclipse.jdt.internal.junit.ui.TestRunnerViewPart;
import org.eclipse.jdt.junit.model.ITestElement;
import org.eclipse.jface.action.Action;
import org.eclipse.ui.part.ViewPart;
import org.jnario.ui.handler.AbstractJnarioRunnerUIHandler;

public class FeatureRunnerUIHandler extends AbstractJnarioRunnerUIHandler {

protected Action getAction(ViewPart part, ITestElement element) {
return new OpenTestFeatureAction((TestRunnerViewPart) part, (TestCaseElement) element);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package org.jnario.feature.ui.handler;

import org.eclipse.jdt.internal.junit.model.TestCaseElement;
import org.eclipse.jdt.internal.junit.ui.TestRunnerViewPart;
import org.jnario.ui.handler.AbstractJnarioOpenTestAction;

public class OpenTestFeatureAction extends AbstractJnarioOpenTestAction {

public OpenTestFeatureAction(TestRunnerViewPart testRunnerPart, TestCaseElement testCase) {
super(testRunnerPart, testCase);
setText("Go to Feature");
}
}
9 changes: 6 additions & 3 deletions plugins/org.jnario.spec.ui/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,16 @@ Require-Bundle: org.jnario.spec;visibility:=reexport,
org.eclipse.jdt.ui,
com.ibm.icu,
org.jnario.ui;bundle-version="1.0.0",
org.eclipse.xtext.xbase.lib;bundle-version="[2.6.2,2.7.0)"
org.eclipse.xtext.xbase.lib;bundle-version="[2.6.2,2.7.0)",
org.jnario.lib;bundle-version="1.0.0",
org.eclipse.jdt.junit.runners;bundle-version="0.1.0";resolution:=optional
Import-Package: org.apache.log4j,
org.apache.commons.logging
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Export-Package: org.jnario.spec.ui.contentassist,
org.jnario.spec.ui.contentassist.antlr,
org.jnario.spec.ui.handler,
org.jnario.spec.ui.internal,
org.jnario.spec.ui.wizards,
org.jnario.spec.ui.quickfix
org.jnario.spec.ui.quickfix,
org.jnario.spec.ui.wizards
Bundle-Activator: org.jnario.spec.ui.internal.SpecActivatorImpl
7 changes: 7 additions & 0 deletions plugins/org.jnario.spec.ui/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1036,4 +1036,11 @@
</enablement>
</consolePatternMatchListener>
</extension>
<extension
point="org.eclipse.jdt.junit.runners.junitRunnerUI">
<junitRunnerUIHandler
handlerClass="org.jnario.spec.ui.handler.ExampleGroupRunnerUIHandler"
runnerClass="org.jnario.runner.ExampleGroupRunner">
</junitRunnerUIHandler>
</extension>
</plugin>
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package org.jnario.spec.ui.handler;

import org.eclipse.jdt.internal.junit.model.TestCaseElement;
import org.eclipse.jdt.internal.junit.ui.TestRunnerViewPart;
import org.eclipse.jdt.junit.model.ITestElement;
import org.eclipse.jface.action.Action;
import org.eclipse.ui.part.ViewPart;
import org.jnario.ui.handler.AbstractJnarioRunnerUIHandler;

@SuppressWarnings("restriction")
public class ExampleGroupRunnerUIHandler extends AbstractJnarioRunnerUIHandler {

protected Action getAction(ViewPart part, ITestElement element) {
return new OpenTestExampleGroupAction((TestRunnerViewPart) part, (TestCaseElement) element);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package org.jnario.spec.ui.handler;

import org.eclipse.jdt.internal.junit.model.TestCaseElement;
import org.eclipse.jdt.internal.junit.ui.TestRunnerViewPart;
import org.jnario.ui.handler.AbstractJnarioOpenTestAction;

@SuppressWarnings("restriction")
public class OpenTestExampleGroupAction extends AbstractJnarioOpenTestAction {

public OpenTestExampleGroupAction(TestRunnerViewPart testRunnerPart, TestCaseElement testCase) {
super(testRunnerPart, testCase);
setText("Go to Spec");
}
}
Loading

0 comments on commit 344050a

Please sign in to comment.