Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Modify the Java Code Template in Wizard "New JUnit Test Case"(Question about how to change the Java code template in the wizard New JUnit Test Case)
Modify the Java Code Template in Wizard "New JUnit Test Case" [message #1822117] Thu, 27 February 2020 09:52 Go to next message
Eclipse UserFriend
Hi all,

today after a JUnit5 meeting I was wondering if it was possible to modify the Java template for the wizard "Java - JUnit - JUnit Test Case"

Since we use a packaged Eclipse archive that is deployed to our developers machines it would be awesome to be able to customize the template or code for the template to suit our needs without having to write a new template / wizard on my own.

Basically I just want to add a custom header and replace the static import for the Assertions with one that uses assertj like I already do in most of our own code templates.

Are there any pointers towards the plugin or package that contains the default Java wizards?

index.php/fa/37471/0/

The eclipse version is 2019-06 (4.12.0) in the packaged Eclipse IDE for Java Developers
Re: Modify the Java Code Template in Wizard "New JUnit Test Case" [message #1826134 is a reply to message #1822117] Mon, 20 April 2020 03:10 Go to previous message
Eclipse UserFriend
You can try to extend "org.eclipse.jdt.junit.wizards.NewTestCaseWizardPageOne" in org.eclipse.jdt.junit plug-in from eclipse.jdt.ui repository for your use case.

Hint: You can press Alt+Shift+F1 (Plug-in Selection Spy) on any Eclipse element e.g. New JUnit Test Case wizard to see its implementation class and other details.
Previous Topic:I have question about "root elements"!
Next Topic:Clickable error messages to console from my program
Goto Forum:
  


Current Time: Sun Aug 31 11:12:26 EDT 2025

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

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

Back to the top