01: /*******************************************************************************
02: * Copyright (c) 2007 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.core.text.toc;
11:
12: import org.eclipse.jface.text.IDocument;
13: import org.eclipse.pde.internal.core.text.IDocumentElementNode;
14: import org.eclipse.pde.internal.core.text.NodeDocumentHandler;
15:
16: /**
17: * TocDocumentHandler
18: *
19: */
20: public class TocDocumentHandler extends NodeDocumentHandler {
21:
22: private TocModel fModel;
23:
24: /**
25: * @param reconciling
26: */
27: public TocDocumentHandler(TocModel model, boolean reconciling) {
28: super (reconciling, model.getFactory());
29: fModel = model;
30: }
31:
32: /* (non-Javadoc)
33: * @see org.eclipse.pde.internal.core.text.DocumentHandler#getDocument()
34: */
35: protected IDocument getDocument() {
36: return fModel.getDocument();
37: }
38:
39: /* (non-Javadoc)
40: * @see org.eclipse.pde.internal.core.text.NodeDocumentHandler#getRootNode()
41: */
42: protected IDocumentElementNode getRootNode() {
43: return (IDocumentElementNode) fModel.getToc();
44: }
45:
46: }
|