-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Register quickfixes via extension point
* Remove old quickfixprovider extension point. It's entirely useless to register an OSGi plugin as extender of another plugin. OSGi will deal with that kind of class loading anyway. * Instead have a new quickfix extension point, which registers a class implementing the quickfix related interface and the module that can be fixed this way. * Completely avoids loading Checkstyle metadata for looking up quickfixes of existing problem markers. * Fix ExplicitInitializationQuickfix throwing exceptions during the check whether it's applicable. Fixes #315. Fixes #561.
- Loading branch information
1 parent
4b64836
commit e1c5bf5
Showing
17 changed files
with
362 additions
and
215 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 0 additions & 26 deletions
26
net.sf.eclipsecs.ui/schema/checkstyleQuickfixProvider.exsd
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<!-- Schema file written by PDE --> | ||
<schema targetNamespace="net.sf.eclipsecs.ui" xmlns="http://www.w3.org/2001/XMLSchema"> | ||
<annotation> | ||
<appinfo> | ||
<meta.schema plugin="net.sf.eclipsecs.ui" id="quickfix" name="Checkstyle violation quickfix"/> | ||
</appinfo> | ||
<documentation> | ||
Use this extension point to register quickfix classes for specific Checkstyle violations. | ||
</documentation> | ||
</annotation> | ||
|
||
<element name="extension"> | ||
<annotation> | ||
<appinfo> | ||
<meta.element /> | ||
</appinfo> | ||
</annotation> | ||
<complexType> | ||
<sequence minOccurs="1" maxOccurs="unbounded"> | ||
<element ref="quickfix"/> | ||
</sequence> | ||
<attribute name="point" type="string" use="required"> | ||
<annotation> | ||
<documentation> | ||
|
||
</documentation> | ||
</annotation> | ||
</attribute> | ||
<attribute name="id" type="string"> | ||
<annotation> | ||
<documentation> | ||
|
||
</documentation> | ||
</annotation> | ||
</attribute> | ||
<attribute name="name" type="string"> | ||
<annotation> | ||
<documentation> | ||
|
||
</documentation> | ||
<appinfo> | ||
<meta.attribute translatable="true"/> | ||
</appinfo> | ||
</annotation> | ||
</attribute> | ||
</complexType> | ||
</element> | ||
|
||
<element name="quickfix"> | ||
<complexType> | ||
<attribute name="module" type="string" use="required"> | ||
<annotation> | ||
<documentation> | ||
fully qualified name of the Checkstyle module that this quickfix can fix | ||
</documentation> | ||
</annotation> | ||
</attribute> | ||
<attribute name="class" type="string" use="required"> | ||
<annotation> | ||
<documentation> | ||
Class implementing net.sf.eclipsecs.ui.quickfixes.ICheckstyleMarkerResolution | ||
</documentation> | ||
<appinfo> | ||
<meta.attribute kind="java" basedOn=":net.sf.eclipsecs.ui.quickfixes.ICheckstyleMarkerResolution"/> | ||
</appinfo> | ||
</annotation> | ||
</attribute> | ||
</complexType> | ||
</element> | ||
|
||
<annotation> | ||
<appinfo> | ||
<meta.section type="since"/> | ||
</appinfo> | ||
<documentation> | ||
10.9.3 | ||
</documentation> | ||
</annotation> | ||
|
||
<annotation> | ||
<appinfo> | ||
<meta.section type="examples"/> | ||
</appinfo> | ||
<documentation> | ||
The following is an example for registering a quickfix. | ||
|
||
<extension point="net.sf.eclipsecs.ui.quickfix"> | ||
<quickfix | ||
module="com.puppycrawl.tools.checkstyle.checks.blocks.NeedBracesCheck" | ||
class="net.sf.eclipsecs.ui.quickfixes.blocks.NeedBracesQuickfix"></quickfix> | ||
</extension> | ||
</documentation> | ||
</annotation> | ||
|
||
|
||
|
||
|
||
</schema> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.