01: /*******************************************************************************
02: * Copyright (c) 2005, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.pde.internal.ui.editor.text;
11:
12: import org.eclipse.core.resources.IMarker;
13: import org.eclipse.core.resources.IResource;
14: import org.eclipse.jface.text.quickassist.IQuickFixableAnnotation;
15: import org.eclipse.ui.texteditor.MarkerAnnotation;
16: import org.eclipse.ui.texteditor.ResourceMarkerAnnotationModel;
17:
18: public class PDEMarkerAnnotationModel extends
19: ResourceMarkerAnnotationModel {
20:
21: class PDEMarkerAnnotation extends MarkerAnnotation implements
22: IQuickFixableAnnotation {
23: boolean quickFixableState;
24: boolean isQuickFixable;
25:
26: public PDEMarkerAnnotation(IMarker marker) {
27: super (marker);
28: }
29:
30: public void setQuickFixable(boolean state) {
31: isQuickFixable = state;
32: quickFixableState = true;
33: }
34:
35: public boolean isQuickFixableStateSet() {
36: return quickFixableState;
37: }
38:
39: public boolean isQuickFixable() {
40: return isQuickFixable;
41: }
42:
43: }
44:
45: public PDEMarkerAnnotationModel(IResource resource) {
46: super (resource);
47: }
48:
49: protected MarkerAnnotation createMarkerAnnotation(IMarker marker) {
50: return new PDEMarkerAnnotation(marker);
51: }
52: }
|