mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-09 02:36:01 +02:00
added document field to have access to it if needed
This commit is contained in:
parent
b282976dfa
commit
4531b0f287
1 changed files with 9 additions and 0 deletions
|
@ -20,9 +20,11 @@ import org.eclipse.jface.text.IDocument;
|
||||||
|
|
||||||
public abstract class AbstractAstRewriteQuickFix extends
|
public abstract class AbstractAstRewriteQuickFix extends
|
||||||
AbstractCodanCMarkerResolution {
|
AbstractCodanCMarkerResolution {
|
||||||
|
private IDocument document;
|
||||||
@Override
|
@Override
|
||||||
public void apply(final IMarker marker, IDocument document) {
|
public void apply(final IMarker marker, IDocument document) {
|
||||||
try {
|
try {
|
||||||
|
this.document = document;
|
||||||
openEditor(marker).doSave(new NullProgressMonitor());
|
openEditor(marker).doSave(new NullProgressMonitor());
|
||||||
IIndex index;
|
IIndex index;
|
||||||
try {
|
try {
|
||||||
|
@ -55,4 +57,11 @@ public abstract class AbstractAstRewriteQuickFix extends
|
||||||
* @param r
|
* @param r
|
||||||
*/
|
*/
|
||||||
public abstract void modifyAST(IIndex index, IMarker marker);
|
public abstract void modifyAST(IIndex index, IMarker marker);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the document
|
||||||
|
*/
|
||||||
|
public IDocument getDocument() {
|
||||||
|
return document;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue