1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 06:32:10 +02:00
Commit graph

103 commits

Author SHA1 Message Date
Marco Stornelli
90358f5374 Bug 355174 - Improved tests and code for quickfix
Change-Id: I032040e6c4d3c9342ebdbf72b3ba75114810a31f
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-05-30 17:41:05 +02:00
Marco Stornelli
1c147d87ce Bug 545699 - Added quickfix for C style cast
Change-Id: Icc1152c013363c5c1b8c2606e3ad0ceb2aa18aa5
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-05-30 01:09:45 -04:00
Marco Stornelli
3890eec7b7 Bug 355174 - Added quickfix for miss cases/default
Change-Id: I4c815bd55e55d81456efa796453dd2f69a7c876a
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2019-05-28 19:48:59 +02:00
Jonah Graham
37ed2c406d Bug 540373: Update the compiler warnings/ignores
The previous alignment of all the warnings/ignores
led to too many warnings that weren't there before. This
commit relaxes them a bit.

The core/org.eclipse.cdt.core/.settings/org.eclipse.jdt.core.prefs
is still the "master" copy, with
releng/scripts/check_code_cleanliness.sh containing the
exceptions that apply to test plug-ins.

Change-Id: Ibd4e31ade0b42b31e7cbe5a94f06c6fc15183a56
2018-11-24 10:55:06 +00:00
Jonah Graham
aa1040a21a Bug 540373: Remove '(non-Javadoc)' comments
These were inserted in the past automatically by Eclipse but
newer tooling makes them redundant.

These were removed by doing a global find/replace on *.java files
using the following regular expression:
\t/\*\n\t \* \(non-Javadoc\)[^/]*/\n

Change-Id: I59d3248020f10934fde1dda5b5a31e20bb188e19
2018-11-22 22:00:29 +00:00
Jonah Graham
caf2292768 Bug 540373: Cleanup: Remove redundant type arguments
This was done by selecting all projects in Eclipse then
Source -> Clean Up... -> choosing:
- Remove redundant type arguments
and completing the wizard

Change-Id: Iaecc7010f097b4b1fabd29ccaa34ccb23a716fbf
2018-11-22 21:55:36 +00:00
Jonah Graham
8985c7b63f Bug 540373: Cleanup: Add missing annotations
This was done by selecting all projects in Eclipse then
Source -> Clean Up... -> choosing:
- Add missing Annotations - and selecting all three types:
 - @Override
 - @Override on interface methods
 - @Deprecated
and completing the wizard

Change-Id: I5d367dacb04327107f25e147edc08efc4eb1c2fe
2018-11-22 21:51:31 +00:00
Jonah Graham
170e654b47 Bug 540373: Cleanup: Format & Remove trailing whitespace
This was done by selecting all projects in Eclipse then
Source -> Clean Up... -> choosing:
- Format source code
- Remove trailing white spaces on all lines
and completing the wizard

Change-Id: I63685372c6bcc67719bcf145123bcb72e5b00394
2018-11-22 21:47:02 +00:00
Jonah Graham
35996a5c5c Bug 540373: Standard .settings auto applied
The releng/scripts/apply_jdt_prefs_to_all_projects.sh was run to
copy standard settings to all other projects.

Change-Id: I4436c947d7f0142f56b709e661379c3eb54f666b
2018-11-22 21:47:02 +00:00
Jonah Graham
f70a8b35c1 Bug 540371: Update to EPLv2 using releng/scripts/change_to_eplv2.sh
Change-Id: Ifbb1d5af2a00bd5634dea200320e8c4303ffca6c
2018-11-22 20:31:51 +00:00
Jonah Graham
48d2271a58 Bug 540373: Normalize newlines with .gitattributes
There is also a new script to verify completeness of .gitattributes:
releng/scripts/verify_gitattributes.sh

Change-Id: I2ce270852ab54b66b6c474a6ec94203fe5bba78b
2018-11-20 21:20:39 +00:00
Karsten Thoms
652602febd Bug 540610 - Add Automatic-Module-Name header
Change-Id: Ia990b24469751050dd9ec8f9b5550804816308b3
Signed-off-by: Karsten Thoms <karsten.thoms@itemis.de>
2018-10-30 15:49:15 +01:00
William Riley
f3ca365140 Bug 540367 - Increment version numbers
Change-Id: I4a355170a7075f0a98ba3c1a5131c235c89b07d2
2018-10-23 11:20:31 -04:00
Nathan Ridge
45a30f5967 Bug 539145 - Avoid NPE in CaseBreakQuickFixFallthroughAttribute.validPositionForFallthrough()
Change-Id: I8a53691f91411bf88f95112d99c1967b1238515a
2018-09-27 13:31:34 -04:00
Nathan Ridge
acca2b3b6e Bug 539145 - Avoid opening an editor during CaseBreakQuickFixFallthroughAttribute.isApplicable()
Change-Id: I82c5b345cfb017680d06f3caeff0c9839780ee68
2018-09-27 13:31:26 -04:00
Nathan Ridge
4549e7f39a Bug 538266 - NPE in QuickFixCreateNewClass.isApplicable()
Change-Id: If20b46da95f58e93ba46ea6f4386e841609f4159
2018-09-15 19:42:08 -04:00
Felix Morgner
52fab3d8af 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>
2018-07-25 11:24:24 -04:00
Felix Morgner
5ec251a791 Bug 532120: Catch by const reference ignores const placement setting
The original implementation used plain-text string manipulation of the
IDocument. This changeset changes the implementation to make use of the
ASTRewrite infrastructure, which automatically honors the const
placement setting.

Change-Id: Ib5ae9381b93ca8ab4d1ad3e16b1c3c8b1ec62d78
Signed-off-by: Felix Morgner <fmorgner@hsr.ch>
2018-06-03 06:37:37 -04:00
Felix Morgner
47ceed3cbe Bug 525250: "Create local variable" offered outside of local scopes
When invoked from within 'isApplicable(IMarker)', 'isCodanProblem()' did
not work as expected, since it used a cached value that was only updated
in 'run(IMarker)'. The old API 'isCodanProblem()' has been marked as
deprecated and is replaced by 'isCodanProblem(IMarker)', which works
directly on the marker, instead of using a cached result.

Additionally, two new APIs in 'QuickFixTestCase', called
'calculateQuickFixApplicability()' and
'assertIsApplicableForAllMarkers(boolean)', are introduced. The former
can be used to record the applicability of the QuickFix under test for
every marker in the test code, while the latter provides a way to assert
on the applicability. For finer grained assertions,
'calculateQuickFixApplicability()' returns the calculated map.

Change-Id: I7c53fd26afefa37ff086559acea75a7a33ecd5d7
Signed-off-by: Felix Morgner <fmorgner@hsr.ch>
2018-03-14 09:30:42 +01:00
Nathan Ridge
3171322555 Bug 529383 - NPE in CheckersRegistry.getResourceProfile()
Change-Id: I376cbf44c1fd237bd75a98ffc9e1daf60f5924ec
2018-02-10 15:40:15 -05:00
Nathan Ridge
345f37874c Bug 530481 - NPE in QuickFixSuppressProblem.prepareFor()
Change-Id: Id83ce8e4cabf644b89d18a6e1c3f1199ec23396e
2018-02-05 22:51:32 -05:00
Nathan Ridge
49f1411c7b Bug 529338 - NPE in QuickFixUseDotOperator.apply()
Change-Id: I195f804e64abb77b5540d5abf0249d4de7816024
2018-01-10 00:05:03 -05:00
Felix Morgner
d47cb6c4ea Bug 495842: Add a quick fix for codan problems that ignores them by adding a @suppress comment
Change-Id: I760d2d435010f219bdb94273a6450e4163fe472e
Signed-off-by: Felix Morgner <fmorgner@hsr.ch>
2017-10-04 11:13:54 -04:00
Thomas Corbat
7376388a94 Bug 517405 - Marker refresh causes editor to open
Changed isApplicable to not retrieve the TU from the editor if it is not
open. Applying the quick fix will still open the editor.

Change-Id: Ib328ffa2054145eda8b2e72fe646fca2e7fc7905
Signed-off-by: Thomas Corbat <tcorbat@hsr.ch>
2017-05-30 09:29:48 +02:00
Jeff Johnston
aab8c277ac Fix Codan quick-fixes
- remove plugin.properties
- move fix-it regexes to bundle.properties

Change-Id: I6d389a12348e35d98c25ae18ca4026e03ea3e41d
2017-05-26 16:35:27 -04:00
Rolf Bislin
a583190f52 Bug 514685 - codan: handle fallthrough attribute
and provide quickfix for adding fallthrough attribute
and add JUnit Tests
and add StandardAttributes class

Change-Id: I8cf0238771dc92bd1784b9dfb35a680d078b1db6
Depends-On: Ic09aa96f896b0a5dd998156e05930704775f695b
Signed-off-by: Rolf Bislin <romibi@bluewin.ch>
Signed-off-by: Thomas Corbat <tcorbat@hsr.ch>
2017-05-08 13:25:15 -04:00
Jeff Johnston
795a90288b Bug 497670 - Support compiler provided "fix-it" hints
- add new FixitErrorParser that extends RegexErrorParser and is
  used to replace the error parser for GNUCErrorParser
- add new FixManager class to bind a fixit message with its
  problem marker
- modify ProblemMarkerFilterManager to register the last
  accepted ProblemMarkerInfo for a particular resource so
  the FixitErrorParser can find the last error marker for
  the file that precedes the fixit message
- FixitErrorParser looks for fix-it messages and binds them
  via FixitManager to the last error marker for the file
- add new Fixit class to contain the details of a gcc fix-it
- add new QuickFixForFixit which applies the gcc fix-it for the
  file
- add new (.*) regex in codan.ui.checkers patterns that will
  trigger before any other error and will look for the
  fix-it message format
- change cdt.core to expose cdt.internal.errorparsers to
  codan.checkers.ui
- change codan.core to expose codan.internal.core.model to
  codan.checkers.ui
- fix CDocumentProvider.setOverlay method to not overlay
  a CMarkerAnnotation that has a quick fix
- when deleting all C problem markers, also make a call
  to FixManager.deleteAllMarkers() so markers aren't
  left referenced

Change-Id: Ibf8ff7d8addb1bf092dc4ef35de0d92de0309589
2017-04-17 20:01:27 -04:00
Marc-Andre Laperle
0046099052 releng: Make use of Tycho POM-less functionality
This removes a lot of pom.xml from the source tree. This is using the
"POM-less" Tycho functionality.
See
https://wiki.eclipse.org/Tycho/Release_Notes/0.24#POM-less_Tycho_builds

One advantage of this is that you do not need to update the version in
the pom.xml when you change it in the MANIFEST.MF because the pom.xml is
automatically generated. This also reduces a lot of the duplicated
information and pom.xml repetition.

- Maven 3.3 and up is required.
- Only eclipse-plugins and eclipse-features can be pom-less.
Repositories, target and others still have pom.xml.
- New parent poms are added because a parent is necessary directly one
level above the plug-in/feature that will have its pom generated
- Some test plug-ins had to be renamed .test -> .tests because it's
required so that it detects that it's a test plug-in
- Some suites were renamed so that they all use the same consistent name
"AutomatedIntegrationSuite"
- Profiles were added for the more common test configurations. They are
activated by the presence of simple .properties files that only serve to
activate the correct profile. The profiles:
  - One for UI tests (UI present and start in UI thread)
  - One for SWTBot tests (UI present and do not start in UI thread)
Other test plug-ins that are too different are kept intact and still
have
a pom.xml
- Fragments are kept intact since they all have different target
platform configurations

Change-Id: I9d73380eb766f547830c552daf08053a30b1845c
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
2017-02-13 23:19:56 -04:00
Jeff Johnston
7d0117d24e Bug 511229 - RFE: Add quick fixes for some basic gcc errors
- change codanMarkerResolution schema to support translatable
  regex statements for matching
- bump cdt.codan.ui version
- add additional codanMarkerResolution extensions to codan.checkers.ui
  to handle some basic gcc error messages with quick fixes
- add QuickFixAddSemicolon, QuickFixRenameMember,
  QuickFixUseDotOperator, and QuickFixUsePointer classes
- add new QuickFixMessages
- add plugin.properties to cdt.codan.checkers.ui to allow the quick
  fix regex matchers to be translated in the future
- change the generic error message for gcc error parser so that the
  column is reported as the problem variable (useful for certain
  quick fix resolutions)
- bump up cdt.core

Change-Id: Ibb24c1a79c4d91ead3fc629ea3d4e7425b4e7f23
2017-02-06 12:33:34 -05:00
Marc Khouzam
8cf5ed53f2 Update version to 9.3.0
Change-Id: Ic953ccc5d38ff3661ca44de21ed8c4b7dad5b246
2016-11-15 20:32:51 -05:00
Marc Khouzam
334777eb6e Update version to 9.2.0
Change-Id: I36ad4218b20b8ea70584c89f5be45c757bf4c714
2016-11-14 23:50:05 -05:00
Dominic Scharfe
56c496ba5a Bug 507148. Fixed opening/switching to editor.
- Reuse the TU from the open editor if present, otherwise load it from
workspace
- Added test plugin org.eclipse.cdt.codan.checkers.ui.test

Change-Id: I725b7b8e462ffba39dd6c9a828ab72dd58f86b1f
Signed-off-by: Dominic Scharfe <dominic.scharfe@coseda-tech.com>
2016-11-11 11:18:55 +01:00
Marc Khouzam
cd559dafaf Update version to 9.1.0
This commit used the script releng/scripts/ChangeFeaturesVersion.sh

Change-Id: I8274a6e8dd5c0f1e450f07952e138b265a441a62
2016-08-17 10:11:57 -04:00
Marc Khouzam
9e1e981b4d Move the rest of the CDT plugins to java 8
This change was generated using the script:
releng/scripts/ChangeJavaVersion.sh

Change-Id: I2ad96dc682a5acb8529c3edec40de279c331b5a4
2016-06-22 14:51:43 -04:00
Marc Khouzam
b745736775 Incremented CDT features version to 9.0.0
This includes bumping the standalone debugger to 9.0.0

Change-Id: I55fae1cec995b5f6865a5b174c004ed1b76e9bea
2016-01-18 16:37:47 -05:00
Alena Laskavaia
d3e933501e Bug 411579 - Add a "Create new class" Quick fix.
Change-Id: I57dc46f079357de7d5c281d016a25baa3f2154a6
2016-01-07 20:35:31 -05:00
Marc Khouzam
f3ff649041 Fix copyright of all CDT plugins using the copyright tool from platform.
This commit does not add missing copyrights, just updates the date on
the existing ones.

Change-Id: I646f5afd533a1fcc539bdf2e0686b22f406ecf65
2016-01-03 20:38:31 -05:00
Marc Khouzam
bb61124897 Incremented CDT feature version to 8.8.0
Change-Id: Ib1189a08a5f0225fd676b682dc8a10477ad3acc5
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
2015-06-10 09:33:49 -04:00
Marc Khouzam
e820f872ad Incremented CDT feature version to 8.7.0
Change-Id: Ife0feaaa9263d2b7797e31d628250bd26caff1b5
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
2015-05-04 21:07:13 -04:00
Sergey Prigogin
252eaf4c0f Incremented CDT feature version to 8.6.0.
Change-Id: Ic90c8e6a68d21e5b90ec3fac997da6a95a29bedf
Signed-off-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Reviewed-on: https://git.eclipse.org/r/39066
Tested-by: Hudson CI
2015-01-06 19:40:38 -05:00
Sergey Prigogin
d8154bd340 Inremented branding plugin version to 8.5 2014-07-21 17:39:01 -07:00
Sergey Prigogin
5d7a19fa6c Enabled JDK 1.7.
Change-Id: Ic2a161ea3c318dc1e8ba01c271c936bf5ed8763d
Reviewed-on: https://git.eclipse.org/r/21020
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2014-01-24 13:38:55 -05:00
Sergey Prigogin
1d166260a8 Bumped up CDT version to 8.4.
Change-Id: I1229344feaaed4a3551ceb7b1ef1410545048b55
Reviewed-on: https://git.eclipse.org/r/20908
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2014-01-21 17:35:29 -05:00
Andrew Gvozdev
652ce4748e Fixed parent pom version to reference 2013-08-27 15:16:24 -04:00
Nathan Ridge
156990d03e Bug 352267 - Assignment in condition checker matches the whole
expression

Change-Id: I7aea1c5d404a8d374020e34c997e6e890fcdb3d6
Signed-off-by: Nathan Ridge <zeratul976@hotmail.com>
Reviewed-on: https://git.eclipse.org/r/14764
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2013-07-24 20:47:38 -04:00
Nathan Ridge
82d19e7096 Bug 363884 - NPE using 'Add break statement' quick fix
Change-Id: I240b196d04b5f032bfaa9666db595b788b7a1d02
Signed-off-by: Nathan Ridge <zeratul976@hotmail.com>
Reviewed-on: https://git.eclipse.org/r/14640
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
2013-07-18 13:18:19 -04:00
Sergey Prigogin
63b523f9be Added missing copyright comments and cleaned up localizable messages. 2013-07-14 19:00:11 -07:00
Sergey Prigogin
95a6d00a08 Normalized dependencies. 2013-07-14 18:58:54 -07:00
Sergey Prigogin
3be412111c Bumped up feature versions for Kepler. 2012-06-28 11:08:11 -07:00
Sergey Prigogin
ada23a9a2f Bug 372551. Removed the external tool checker support until all design
issues are resolved.
2012-03-13 18:42:16 -07:00