1
0
Fork 0
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:
Alena Laskavaia 2010-08-16 02:20:34 +00:00
parent ba16e750fa
commit b71382f1af
3 changed files with 23 additions and 5 deletions

View file

@ -35,9 +35,6 @@
<super type="org.eclipse.core.resources.problemmarker"/>
<super type="org.eclipse.core.resources.textmarker"/>
<super
type="org.eclipse.cdt.core.problem">
</super>
<attribute
name="category">
</attribute>

View file

@ -100,7 +100,6 @@ public class CodanProblemMarker implements ICodanProblemMarker {
marker.setAttribute(ID, problem.getId());
marker.setAttribute(IMarker.CHAR_END, loc.getEndingChar());
marker.setAttribute(IMarker.CHAR_START, loc.getStartingChar());
marker.setAttribute("org.eclipse.cdt.core.problem", 42); //$NON-NLS-1$
String propArgs = serializeArgs(args);
marker.setAttribute(PROBLEM_ARGS, propArgs);
IProblemCategory[] cats = CodanProblemCategory.findProblemCategories(
@ -247,7 +246,8 @@ public class CodanProblemMarker implements ICodanProblemMarker {
return null;
IResource resource = marker.getResource();
IProblemProfile profile = getProfile(resource);
CodanProblem problem = (CodanProblem) ((CodanProblem) profile.findProblem(id)).clone();
CodanProblem problem = (CodanProblem) ((CodanProblem) profile
.findProblem(id)).clone();
CodanSeverity sev = getSeverity(marker);
problem.setSeverity(sev);
return problem;

View file

@ -170,4 +170,25 @@
priority="80">
</markerGroupingEntry>
</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>