This commit is contained in:
Alexey Kudravtsev
2017-12-14 14:24:02 +03:00
parent 02a852d1ba
commit 08c15d5a85
3 changed files with 4 additions and 4 deletions
@@ -41,7 +41,7 @@ public class CompositeInputFilter implements InputFilter {
@Override
@Nullable
public List<Pair<String, ConsoleViewContentType>> applyFilter(@NotNull final String text, final ConsoleViewContentType contentType) {
public List<Pair<String, ConsoleViewContentType>> applyFilter(@NotNull final String text, @NotNull final ConsoleViewContentType contentType) {
boolean dumb = myDumbService.isDumb();
for (Pair<InputFilter, Boolean> pair : myFilters) {
if (!dumb || pair.second == Boolean.TRUE) {
@@ -66,7 +66,7 @@ public class CompositeInputFilter implements InputFilter {
@Nullable
@Override
public List<Pair<String, ConsoleViewContentType>> applyFilter(@NotNull String text, ConsoleViewContentType contentType) {
public List<Pair<String, ConsoleViewContentType>> applyFilter(@NotNull String text, @NotNull ConsoleViewContentType contentType) {
if (!isBroken) {
try {
return filter.applyFilter(text, contentType);
@@ -30,6 +30,6 @@ public interface InputFilter {
* @return <tt>null</tt>, if there was no match, otherwise, a list of pairs like ('string to use', 'content type to use')
*/
@Nullable
List<Pair<String, ConsoleViewContentType>> applyFilter(@NotNull String text, ConsoleViewContentType contentType);
List<Pair<String, ConsoleViewContentType>> applyFilter(@NotNull String text, @NotNull ConsoleViewContentType contentType);
}
@@ -16,7 +16,7 @@ public class PyEduConsoleInputFilterProvider implements ConsoleInputFilterProvid
public InputFilter[] getDefaultFilters(@NotNull Project project) {
return new InputFilter[]{new InputFilter() {
@Override
public List<Pair<String, ConsoleViewContentType>> applyFilter(@NotNull String text, ConsoleViewContentType outputType) {
public List<Pair<String, ConsoleViewContentType>> applyFilter(@NotNull String text, @NotNull ConsoleViewContentType outputType) {
if (outputType.equals(ConsoleViewContentType.SYSTEM_OUTPUT) && !text.contains("exit code")) {
return Collections.emptyList();
}