Skip to content

Commit

Permalink
Implementation of #1251 (create multiple types at once).
Browse files Browse the repository at this point in the history
  • Loading branch information
nettozahler committed Sep 17, 2024
1 parent 7881cea commit 7b12f4c
Show file tree
Hide file tree
Showing 6 changed files with 1,774 additions and 1,361 deletions.
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 @@ -758,14 +758,16 @@ private void internalSetJUnit4(boolean isJUnit4) {
}

@Override
protected String constructCUContent(ICompilationUnit cu, String typeContent, String lineDelimiter) throws CoreException {
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

0 comments on commit 7b12f4c

Please sign in to comment.