KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > debug > ui > snippeteditor > SnippetEditorStorageDocumentProvider


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - Initial implementation
10  *******************************************************************************/

11 package org.eclipse.jdt.internal.debug.ui.snippeteditor;
12
13 import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin;
14 import org.eclipse.jdt.ui.text.IJavaPartitions;
15 import org.eclipse.jdt.ui.text.JavaTextTools;
16 import org.eclipse.jface.text.IDocument;
17 import org.eclipse.ui.editors.text.StorageDocumentProvider;
18
19 /**
20  * @since 3.0
21  */

22 public class SnippetEditorStorageDocumentProvider extends StorageDocumentProvider {
23     
24     /*
25      * @see org.eclipse.ui.editors.text.StorageDocumentProvider#setupDocument(java.lang.Object,
26      * org.eclipse.jface.text.IDocument)
27      */

28     protected void setupDocument(Object JavaDoc element, IDocument document) {
29         if (document != null) {
30             JavaTextTools tools= JDIDebugUIPlugin.getDefault().getJavaTextTools();
31             tools.setupJavaDocumentPartitioner(document, IJavaPartitions.JAVA_PARTITIONING);
32         }
33     }
34 }
35
Popular Tags