-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IMessageCheck now returns an IMessageCheckResult instead of a boolean
- Loading branch information
1 parent
049775e
commit 86b5280
Showing
15 changed files
with
165 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
org.eclipse.babel.core/src/org/eclipse/babel/core/message/checks/IMessageCheckResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package org.eclipse.babel.core.message.checks; | ||
|
||
public interface IMessageCheckResult { | ||
String getText(); | ||
IMessageCheck getMessageCheck(); | ||
} |
25 changes: 25 additions & 0 deletions
25
org.eclipse.babel.core/src/org/eclipse/babel/core/message/checks/MessageCheckResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package org.eclipse.babel.core.message.checks; | ||
|
||
public class MessageCheckResult implements IMessageCheckResult { | ||
|
||
public static final IMessageCheckResult OK = new MessageCheckResult("", null);//$NON-NLS-1$ | ||
|
||
private String text; | ||
private IMessageCheck messageCheck; | ||
|
||
public MessageCheckResult(String text, IMessageCheck messageCheck) { | ||
this.text = text; | ||
this.messageCheck = messageCheck; | ||
} | ||
|
||
@Override | ||
public String getText() { | ||
return this.text; | ||
} | ||
|
||
@Override | ||
public IMessageCheck getMessageCheck() { | ||
return this.messageCheck; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
.../src/org/eclipse/babel/core/message/checks/internal/DuplicateValueMessageCheckResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package org.eclipse.babel.core.message.checks.internal; | ||
|
||
import org.eclipse.babel.core.message.checks.IMessageCheck; | ||
import org.eclipse.babel.core.message.checks.MessageCheckResult; | ||
|
||
public class DuplicateValueMessageCheckResult extends MessageCheckResult { | ||
|
||
private String[] duplicateKeys; | ||
|
||
public DuplicateValueMessageCheckResult(String[] duplicateKeys, IMessageCheck messageCheck) { | ||
super("", messageCheck); | ||
this.duplicateKeys = duplicateKeys; | ||
} | ||
|
||
public String[] getDuplicateKeys() { | ||
return this.duplicateKeys; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
...abel.core/src/org/eclipse/babel/core/message/checks/internal/MissingValueCheckResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package org.eclipse.babel.core.message.checks.internal; | ||
|
||
import org.eclipse.babel.core.message.checks.IMessageCheck; | ||
import org.eclipse.babel.core.message.checks.MessageCheckResult; | ||
|
||
public class MissingValueCheckResult extends MessageCheckResult { | ||
|
||
public MissingValueCheckResult(IMessageCheck messageCheck) { | ||
super("", messageCheck); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...re/src/org/eclipse/babel/core/message/checks/internal/SimilarValueMessageCheckResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package org.eclipse.babel.core.message.checks.internal; | ||
|
||
import org.eclipse.babel.core.message.checks.IMessageCheck; | ||
import org.eclipse.babel.core.message.checks.MessageCheckResult; | ||
|
||
public class SimilarValueMessageCheckResult extends MessageCheckResult { | ||
|
||
private String[] similarValueKeys; | ||
|
||
public SimilarValueMessageCheckResult(String[] similarValueKeys, IMessageCheck messageCheck) { | ||
super("", messageCheck); | ||
this.similarValueKeys = similarValueKeys; | ||
} | ||
|
||
public String[] getSimilarMessageKeys() { | ||
return similarValueKeys; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.