Bug 537272 - Offer "Create local variable" based on compiler errors

This patch introduces an additional message pattern for the
CreateLocalVariable QuickFix that matches GCC's C++ error message for
undefined entities.

Change-Id: I44d6579d41d9c93dc23366907fa52caf1c6f3b21
Signed-off-by: Felix Morgner <fmorgner@hsr.ch>
diff --git a/codan/org.eclipse.cdt.codan.checkers.ui/OSGI-INF/l10n/bundle.properties b/codan/org.eclipse.cdt.codan.checkers.ui/OSGI-INF/l10n/bundle.properties
index 22dbaa3..2d70354 100644
--- a/codan/org.eclipse.cdt.codan.checkers.ui/OSGI-INF/l10n/bundle.properties
+++ b/codan/org.eclipse.cdt.codan.checkers.ui/OSGI-INF/l10n/bundle.properties
@@ -17,3 +17,4 @@
 GCCFixitNoPointerOperator.errormsg=\u2018(.*)\u2019 is a pointer(.*)did you mean to use \u2018->\u2019.*
 GCCFixitInvalidPtrTypeCPP=base operand of \u2018->\u2019 has non-pointer type \u2018(.*)\u2019.*
 GCCFixitInvalidPtrStruct.errormsg=invalid type argument of \u2018->\u2019.*have \u2018struct (.*)\u2019.*
+GCCNotDeclaredInThisScope.errormsg=\u2018(.*)\u2019 was not declared in this scope
\ No newline at end of file
diff --git a/codan/org.eclipse.cdt.codan.checkers.ui/plugin.xml b/codan/org.eclipse.cdt.codan.checkers.ui/plugin.xml
index 8be4554..073956a 100644
--- a/codan/org.eclipse.cdt.codan.checkers.ui/plugin.xml
+++ b/codan/org.eclipse.cdt.codan.checkers.ui/plugin.xml
@@ -82,5 +82,9 @@
        <universalResolution
              class="org.eclipse.cdt.codan.internal.checkers.ui.quickfix.QuickFixSuppressProblem">
        </universalResolution>
+       <resolution
+             class="org.eclipse.cdt.codan.internal.checkers.ui.quickfix.QuickFixCreateLocalVariable"
+             messagePattern="%GCCNotDeclaredInThisScope.errormsg">
+       </resolution>
     </extension>
 </plugin>