1 /*******************************************************************************
2 * Copyright (c) 2000, 2004 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Common Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/cpl-v10.html
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
12 package net.sourceforge.phpdt.internal.ui.text;
14 import org.eclipse.jface.text.IDocument;
15 import org.eclipse.jface.text.IRegion;
16 import org.eclipse.jface.text.TextPresentation;
17 import org.eclipse.jface.text.presentation.PresentationReconciler;
20 * Presentation reconciler, adding functionality for operation without a viewer.
24 public class JavaPresentationReconciler extends PresentationReconciler {
26 /** Last used document */
27 private IDocument fLastDocument;
30 * Constructs a "repair description" for the given damage and returns this
31 * description as a text presentation.
33 * NOTE: Should not be used if this reconciler is installed on a viewer.
37 * the damage to be repaired
39 * the document whose presentation must be repaired
40 * @return the presentation repair description as text presentation
42 public TextPresentation createRepairDescription(IRegion damage,
44 if (document != fLastDocument) {
45 setDocumentToDamagers(document);
46 setDocumentToRepairers(document);
48 return createPresentation(damage, document);