diff options
Diffstat (limited to 'plugins/ant/src')
-rw-r--r-- | plugins/ant/src/com/intellij/lang/ant/AntIntrospector.java | 7 | ||||
-rw-r--r-- | plugins/ant/src/com/intellij/lang/ant/config/execution/OutputParser.java | 11 |
2 files changed, 13 insertions, 5 deletions
diff --git a/plugins/ant/src/com/intellij/lang/ant/AntIntrospector.java b/plugins/ant/src/com/intellij/lang/ant/AntIntrospector.java index 234a734b08ec..ef0fa80192b1 100644 --- a/plugins/ant/src/com/intellij/lang/ant/AntIntrospector.java +++ b/plugins/ant/src/com/intellij/lang/ant/AntIntrospector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2014 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,12 +17,12 @@ package com.intellij.lang.ant; import com.intellij.openapi.diagnostic.Logger; import com.intellij.util.Alarm; +import com.intellij.util.ReflectionUtil; import org.apache.tools.ant.IntrospectionHelper; import org.apache.tools.ant.TaskContainer; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.Nullable; -import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.*; @@ -231,8 +231,7 @@ public final class AntIntrospector { catch (Throwable e) { try { // assume it is older version of ant - final Field helpersField = helperClass.getDeclaredField("helpers"); - final Map helpersCollection = (Map)helpersField.get(null); + Map helpersCollection = ReflectionUtil.getField(helperClass, null, null, "helpers"); helpersCollection.clear(); } catch (Throwable _e) { diff --git a/plugins/ant/src/com/intellij/lang/ant/config/execution/OutputParser.java b/plugins/ant/src/com/intellij/lang/ant/config/execution/OutputParser.java index 6f2fb8549eb8..3af6d25c5c82 100644 --- a/plugins/ant/src/com/intellij/lang/ant/config/execution/OutputParser.java +++ b/plugins/ant/src/com/intellij/lang/ant/config/execution/OutputParser.java @@ -25,6 +25,8 @@ import com.intellij.openapi.progress.ProgressIndicator; import com.intellij.openapi.project.Project; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.openapi.vfs.VirtualFileManager; +import com.intellij.problems.Problem; +import com.intellij.problems.WolfTheProblemSolver; import com.intellij.rt.ant.execution.IdeaAntLogger2; import com.intellij.util.text.StringTokenizer; import org.jetbrains.annotations.NonNls; @@ -32,6 +34,7 @@ import org.jetbrains.annotations.Nullable; import java.lang.ref.WeakReference; import java.util.ArrayList; +import java.util.Collections; import java.util.List; public class OutputParser{ @@ -193,7 +196,7 @@ public class OutputParser{ return -1; } - private static void processJavacMessages(final List<String> javacMessages, final AntBuildMessageView messageView, Project project) { + private static void processJavacMessages(final List<String> javacMessages, final AntBuildMessageView messageView, final Project project) { if (javacMessages == null) { return; } @@ -241,6 +244,12 @@ public class OutputParser{ public void run() { VirtualFile file = url == null ? null : VirtualFileManager.getInstance().findFileByUrl(url); messageView.outputJavacMessage(convertCategory(category), strings, file, url, lineNum, columnNum); + + if (file != null && category == CompilerMessageCategory.ERROR) { + final WolfTheProblemSolver wolf = WolfTheProblemSolver.getInstance(project); + final Problem problem = wolf.convertToProblem(file, lineNum, columnNum, strings); + wolf.weHaveGotNonIgnorableProblems(file, Collections.singletonList(problem)); + } } }); } |