mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 09:25:31 +02:00
Bug 307078 - CStorageDocumentProvider should provide annotation model
Patch from Adam Neal (IBM)
This commit is contained in:
parent
ea688d344d
commit
5e8566888d
1 changed files with 12 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2002, 2008 QNX Software Systems and others.
|
||||
* Copyright (c) 2002, 2010 QNX Software Systems and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -14,7 +14,10 @@ import org.eclipse.cdt.ui.CUIPlugin;
|
|||
|
||||
import org.eclipse.cdt.internal.ui.text.CTextTools;
|
||||
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.jface.text.IDocument;
|
||||
import org.eclipse.jface.text.source.AnnotationModel;
|
||||
import org.eclipse.jface.text.source.IAnnotationModel;
|
||||
import org.eclipse.ui.editors.text.StorageDocumentProvider;
|
||||
|
||||
/**
|
||||
|
@ -29,6 +32,14 @@ public class CStorageDocumentProvider extends StorageDocumentProvider {
|
|||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected IAnnotationModel createAnnotationModel(Object element) throws CoreException {
|
||||
IAnnotationModel m = super.createAnnotationModel(element);
|
||||
if (m == null)
|
||||
m = new AnnotationModel();
|
||||
return m;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see org.eclipse.ui.editors.text.StorageDocumentProvider#setupDocument(java.lang.Object, org.eclipse.jface.text.IDocument)
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue