summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Morgner2018-07-24 03:39:51 -0400
committerNathan Ridge2018-07-25 11:24:24 -0400
commit52fab3d8afa819a16c7f34c95a2ca3ccc4ee671e (patch)
treed41f9d7b197a6da680bd67b01f9fb2a9fab76a87
parent9853ba09d9ac96dc098635756496d7f0c9718f71 (diff)
downloadorg.eclipse.cdt-52fab3d8afa819a16c7f34c95a2ca3ccc4ee671e.tar.gz
org.eclipse.cdt-52fab3d8afa819a16c7f34c95a2ca3ccc4ee671e.tar.xz
org.eclipse.cdt-52fab3d8afa819a16c7f34c95a2ca3ccc4ee671e.zip
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>
-rw-r--r--codan/org.eclipse.cdt.codan.checkers.ui/OSGI-INF/l10n/bundle.properties1
-rw-r--r--codan/org.eclipse.cdt.codan.checkers.ui/plugin.xml4
2 files changed, 5 insertions, 0 deletions
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 22dbaa3c82..2d7035477a 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 @@ GCCFixitNoPointerOpCPP=request for member \u2018.*\u2019 in \u2018(.*)\u2019, wh
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 8be4554c32..073956ab06 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>