Skip to content

Commit

Permalink
add more tests and support two options
Browse files Browse the repository at this point in the history
  • Loading branch information
carstenartur committed Nov 11, 2024
1 parent 214b81e commit b408cdb
Show file tree
Hide file tree
Showing 8 changed files with 5,666 additions and 1,883 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2352,7 +2352,7 @@ public class CleanUpConstants {
/**
*
*/
public static final String EXPLICITENCODING_CLEANUP= "org.eclipse.jdt.ui.cleanup.explicit_encoding"; //$NON-NLS-1$
public static final String EXPLICITENCODING_CLEANUP= "cleanup.explicit_encoding"; //$NON-NLS-1$

/**
* Don't change behavior - just replace or insert to make use of platform encoding visible in the code.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ protected String computeCharsetforPreview() {
ENFORCE_UTF8() {
@Override
protected Expression computeCharsetASTNode(final CompilationUnitRewrite cuRewrite, AST ast, String charset) {
Expression callToCharsetDefaultCharset= addCharsetUTF8(cuRewrite, ast, charset);
String charset2= charset==null?"UTF_8":charset; //$NON-NLS-1$
Expression callToCharsetDefaultCharset= addCharsetUTF8(cuRewrite, ast, charset2);
return callToCharsetDefaultCharset;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;

Expand Down Expand Up @@ -123,7 +122,6 @@ enum Day {
assertEqualStringsIgnoreOrder(new String[] { preview }, new String[] { expected });
}

@Ignore("https://github.com/eclipse-jdt/eclipse.jdt.ui/issues/1792")
@Test
public void testSplitSwitchCaseLabelRuleStatement() throws Exception {
fJProject1= JavaProjectHelper.createJavaProject("TestProject1", "bin");
Expand Down
Loading

0 comments on commit b408cdb

Please sign in to comment.