Skip to content

Commit

Permalink
issue for MISSING_SYNCHRONIZED in Xbase
Browse files Browse the repository at this point in the history
  • Loading branch information
LorenzoBettini committed Feb 5, 2024
1 parent f3877a1 commit 76ea264
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ private IssueCodes() {
public static final String XBASE_LIB_NOT_ON_CLASSPATH = ISSUE_CODE_PREFIX + "xbase_lib_not_on_classpath";
public static final String JDK_NOT_ON_CLASSPATH = ISSUE_CODE_PREFIX + "jdk_not_on_classpath";

public static final String MISSING_SYNCHRONIZED = ISSUE_CODE_PREFIX + "missing_synchronized";
public static final String INCOMPATIBLE_THROWS_CLAUSE = ISSUE_CODE_PREFIX + "incompatible_throws_clause";

public static final String UNUSED_PRIVATE_MEMBER = ISSUE_CODE_PREFIX + "unused_private_member";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public void obsoletCast() {

@Test
public void missingSynchronized() {
this.builder.setSeverity(org.eclipse.xtend.core.validation.IssueCodes.MISSING_SYNCHRONIZED, "warning");
this.builder.setSeverity(IssueCodes.MISSING_SYNCHRONIZED, "warning");
StringConcatenation _builder = new StringConcatenation();
_builder.append("class Bar {");
_builder.newLine();
Expand Down Expand Up @@ -168,7 +168,7 @@ public void missingSynchronized() {
_builder.newLine();
_builder.append("}");
_builder.newLine();
QuickfixTestBuilder _assertResolutionLabels = this.builder.create("XXX.xtend", _builder.toString()).assertIssueCodes(org.eclipse.xtend.core.validation.IssueCodes.MISSING_SYNCHRONIZED).assertResolutionLabels("Mark operation as synchronized");
QuickfixTestBuilder _assertResolutionLabels = this.builder.create("XXX.xtend", _builder.toString()).assertIssueCodes(IssueCodes.MISSING_SYNCHRONIZED).assertResolutionLabels("Mark operation as synchronized");
StringConcatenation _builder_1 = new StringConcatenation();
_builder_1.append("class Bar {");
_builder_1.newLine();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ public void apply(IModificationContext context) throws Exception {
});
}

@Fix(IssueCodes.MISSING_SYNCHRONIZED)
@Fix(org.eclipse.xtext.xbase.validation.IssueCodes.MISSING_SYNCHRONIZED)
public void fixMissingSynchronizedKeyword(final Issue issue, IssueResolutionAcceptor acceptor) {
acceptor.accept(issue, "Mark operation as synchronized", "Marks this operation as synchronized", "fix_indent.gif", new ISemanticModification() {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,10 @@ public class IssueCodes extends org.eclipse.xtext.validation.IssueCodes {
* @since 2.34
*/
public static final String OVERRIDE_REDUCES_VISIBILITY = ISSUE_CODE_PREFIX + "override_reduces_visibility";
/**
* @since 2.34
*/
public static final String MISSING_SYNCHRONIZED = ISSUE_CODE_PREFIX + "missing_synchronized";

private IssueCodes() {
}
Expand Down

0 comments on commit 76ea264

Please sign in to comment.