Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of #1251 create multiple types at once #1652

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,16 @@ public void setError(String errorMessage) {
fSeverity= IStatus.ERROR;
}

/**
* Sets the status to ERROR and answers this instance.
* @param errorMessage The error message (can be empty, but not null)
* @return This instance
*/
public StatusInfo withError(String errorMessage) {
setError(errorMessage);
return this;
}

/**
* Sets the status to WARNING.
* @param warningMessage The warning message (can be empty, but not null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
* </p>
*
* @since 3.1
*/

Check warning on line 85 in org.eclipse.jdt.junit/src/org/eclipse/jdt/junit/wizards/NewTestSuiteWizardPage.java

View check run for this annotation

Jenkins - Eclipse JDT / Compiler and API Tools

Other

ERROR: The method org.eclipse.jdt.junit.wizards.NewTestSuiteWizardPage.constructCUContent(ICompilationUnit, String, String) has been removed
public class NewTestSuiteWizardPage extends NewTypeWizardPage {

private static final String ALL_TESTS= "AllTests"; //$NON-NLS-1$
Expand Down Expand Up @@ -758,14 +758,16 @@
}

@Override
protected String constructCUContent(ICompilationUnit cu, String typeContent, String lineDelimiter) throws CoreException {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you must not change the Signature of methods that are API. or you get
The method org.eclipse.jdt.junit.wizards.NewTestSuiteWizardPage.constructCUContent(ICompilationUnit, String, String) has been removed
You can however add and additional method and make sure that the old API still works.

protected String constructCUContent(String typeName, ICompilationUnit cu, String typeContent, String lineDelimiter)
throws CoreException {

if (isJUnit4()) {
typeContent= appendAnnotations(typeContent, lineDelimiter);
} else if (isJUnit5()) {
typeContent= appendAnnotations5(typeContent, lineDelimiter);
}

return super.constructCUContent(cu, typeContent, lineDelimiter);
return super.constructCUContent(typeName, cu, typeContent, lineDelimiter);
}

private String appendAnnotations(String typeContent, String lineDelimiter) {
Expand Down
Loading
Loading