mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-20 15:35:24 +02:00
Bug 309603 - Improve quick fixes to be more like JDT in the editor UI
This commit is contained in:
parent
ba16e750fa
commit
b71382f1af
3 changed files with 23 additions and 5 deletions
|
@ -35,9 +35,6 @@
|
||||||
<super type="org.eclipse.core.resources.problemmarker"/>
|
<super type="org.eclipse.core.resources.problemmarker"/>
|
||||||
<super type="org.eclipse.core.resources.textmarker"/>
|
<super type="org.eclipse.core.resources.textmarker"/>
|
||||||
|
|
||||||
<super
|
|
||||||
type="org.eclipse.cdt.core.problem">
|
|
||||||
</super>
|
|
||||||
<attribute
|
<attribute
|
||||||
name="category">
|
name="category">
|
||||||
</attribute>
|
</attribute>
|
||||||
|
|
|
@ -100,7 +100,6 @@ public class CodanProblemMarker implements ICodanProblemMarker {
|
||||||
marker.setAttribute(ID, problem.getId());
|
marker.setAttribute(ID, problem.getId());
|
||||||
marker.setAttribute(IMarker.CHAR_END, loc.getEndingChar());
|
marker.setAttribute(IMarker.CHAR_END, loc.getEndingChar());
|
||||||
marker.setAttribute(IMarker.CHAR_START, loc.getStartingChar());
|
marker.setAttribute(IMarker.CHAR_START, loc.getStartingChar());
|
||||||
marker.setAttribute("org.eclipse.cdt.core.problem", 42); //$NON-NLS-1$
|
|
||||||
String propArgs = serializeArgs(args);
|
String propArgs = serializeArgs(args);
|
||||||
marker.setAttribute(PROBLEM_ARGS, propArgs);
|
marker.setAttribute(PROBLEM_ARGS, propArgs);
|
||||||
IProblemCategory[] cats = CodanProblemCategory.findProblemCategories(
|
IProblemCategory[] cats = CodanProblemCategory.findProblemCategories(
|
||||||
|
@ -247,7 +246,8 @@ public class CodanProblemMarker implements ICodanProblemMarker {
|
||||||
return null;
|
return null;
|
||||||
IResource resource = marker.getResource();
|
IResource resource = marker.getResource();
|
||||||
IProblemProfile profile = getProfile(resource);
|
IProblemProfile profile = getProfile(resource);
|
||||||
CodanProblem problem = (CodanProblem) ((CodanProblem) profile.findProblem(id)).clone();
|
CodanProblem problem = (CodanProblem) ((CodanProblem) profile
|
||||||
|
.findProblem(id)).clone();
|
||||||
CodanSeverity sev = getSeverity(marker);
|
CodanSeverity sev = getSeverity(marker);
|
||||||
problem.setSeverity(sev);
|
problem.setSeverity(sev);
|
||||||
return problem;
|
return problem;
|
||||||
|
|
|
@ -170,4 +170,25 @@
|
||||||
priority="80">
|
priority="80">
|
||||||
</markerGroupingEntry>
|
</markerGroupingEntry>
|
||||||
</extension>
|
</extension>
|
||||||
|
<extension
|
||||||
|
point="org.eclipse.ui.editors.annotationTypes">
|
||||||
|
<type
|
||||||
|
markerSeverity="2"
|
||||||
|
markerType="org.eclipse.cdt.codan.core.codanProblem"
|
||||||
|
name="org.eclipse.cdt.codan.ui.annotation.error"
|
||||||
|
super="org.eclipse.ui.workbench.texteditor.error">
|
||||||
|
</type>
|
||||||
|
<type
|
||||||
|
markerSeverity="1"
|
||||||
|
markerType="org.eclipse.cdt.codan.core.codanProblem"
|
||||||
|
name="org.eclipse.cdt.codan.ui.annotation.warning"
|
||||||
|
super="org.eclipse.ui.workbench.texteditor.warning">
|
||||||
|
</type>
|
||||||
|
<type
|
||||||
|
markerSeverity="0"
|
||||||
|
markerType="org.eclipse.cdt.codan.core.codanProblem"
|
||||||
|
name="org.eclipse.cdt.codan.ui.annotation.info"
|
||||||
|
super="org.eclipse.ui.workbench.texteditor.info">
|
||||||
|
</type>
|
||||||
|
</extension>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
Loading…
Add table
Reference in a new issue