Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Extending JUnit launch button?(How to extend JUnit launch button?)
Extending JUnit launch button? [message #975122] Wed, 07 November 2012 16:10 Go to next message
Felipe Zanichelli is currently offline Felipe ZanichelliFriend
Messages: 3
Registered: November 2012
Junior Member
Hi everybody,
I'm currently developing a new eclipse plugin that needs to be integrated with the JUnit launch button. Actually I just developed a JUnitListener, and now I need to add it to the default JUnit launcher.
I tried to do this piece of code, but it doesn't do what I want (that is, I don't want to create a new button, I just want to add a new function to an existing button - the JUnit launch button):

JUnitCore junitcore = new JUnitCore();
/*I was hopping that I could get the instance that is called when I click the launcher button*/
junitcore.addListener(myListener);
Re: Extending JUnit launch button? [message #975167 is a reply to message #975122] Wed, 07 November 2012 16:54 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3801
Registered: July 2009
Senior Member
On 07.11.2012 17:26, Felipe Zanichelli wrote:
> Hi everybody,
> I'm currently developing a new eclipse plugin that needs to be
> integrated with the JUnit launch button. Actually I just developed a
> JUnitListener, and now I need to add it to the default JUnit launcher.
> I tried to do this piece of code, but it doesn't do what I want (that
> is, I don't want to create a new button, I just want to add a new
> function to an existing button - the JUnit launch button):
>
> JUnitCore junitcore = new JUnitCore(); /*I was hopping that I could
> get the instance that is called when I click the launcher button*/
> junitcore.addListener(myListener);
>
Take a look at
org.eclipse.jdt.junit.JUnitCore.addTestRunListener(TestRunListener)

Dani
Re: Extending JUnit launch button? [message #975291 is a reply to message #975167] Wed, 07 November 2012 19:18 Go to previous message
Felipe Zanichelli is currently offline Felipe ZanichelliFriend
Messages: 3
Registered: November 2012
Junior Member
Thank you Dani.
That helped me a lot.
Previous Topic:How do I move a GWT workspace (Its not Android Its GWT)
Next Topic:Importing large maven project is hanging on
Goto Forum:
  


Current Time: Fri Nov 28 12:46:28 GMT 2014

Powered by FUDForum. Page generated in 0.02307 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software