blob: 142bd4f67d549390c605fa64c42b5e9bb20d8053 [file] [log] [blame]
david_williamscfdb2cd2004-11-11 08:37:49 +00001/*******************************************************************************
amywuecebb042007-04-10 20:07:35 +00002 * Copyright (c) 2001, 2006 IBM Corporation and others.
david_williamscfdb2cd2004-11-11 08:37:49 +00003 * 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
amywuecebb042007-04-10 20:07:35 +00007 *
david_williamscfdb2cd2004-11-11 08:37:49 +00008 * Contributors:
9 * IBM Corporation - initial API and implementation
10 * Jens Lukowski/Innoopract - initial renaming/restructuring
11 *
12 *******************************************************************************/
paveryf918eb22005-03-29 18:26:53 +000013package org.eclipse.wst.dtd.core.internal.text;
david_williamscfdb2cd2004-11-11 08:37:49 +000014
nitindbbdc6b52009-07-22 17:45:05 +000015import org.eclipse.jface.text.IDocumentPartitioner;
paveryb0f98c52006-02-13 20:19:39 +000016import org.eclipse.wst.dtd.core.text.IDTDPartitions;
paveryf918eb22005-03-29 18:26:53 +000017import org.eclipse.wst.sse.core.internal.text.rules.StructuredTextPartitioner;
paveryb0f98c52006-02-13 20:19:39 +000018import org.eclipse.wst.sse.core.text.IStructuredPartitions;
david_williamscfdb2cd2004-11-11 08:37:49 +000019
20public class StructuredTextPartitionerForDTD extends StructuredTextPartitioner {
21
david_williamscfdb2cd2004-11-11 08:37:49 +000022 public StructuredTextPartitionerForDTD() {
23 super();
24 }
25
26 /*
27 * (non-Javadoc)
28 *
29 * @see org.eclipse.wst.sse.core.text.rules.StructuredTextPartitioner#getDefault()
30 */
pavery40dd89e2005-04-01 21:09:29 +000031 public String getDefaultPartitionType() {
paveryb0f98c52006-02-13 20:19:39 +000032 return IDTDPartitions.DTD_DEFAULT;
david_williamscfdb2cd2004-11-11 08:37:49 +000033 }
34
35 /*
36 * (non-Javadoc)
37 *
38 * @see org.eclipse.wst.sse.core.text.rules.StructuredTextPartitioner#initLegalContentTypes()
39 */
40 protected void initLegalContentTypes() {
paveryb0f98c52006-02-13 20:19:39 +000041 fSupportedTypes = new String[]{IDTDPartitions.DTD_DEFAULT, IStructuredPartitions.UNKNOWN_PARTITION};
david_williamscfdb2cd2004-11-11 08:37:49 +000042 }
nitindbbdc6b52009-07-22 17:45:05 +000043
44 /* (non-Javadoc)
45 * @see org.eclipse.wst.sse.core.internal.text.rules.StructuredTextPartitioner#newInstance()
46 */
47 public IDocumentPartitioner newInstance() {
48 return new StructuredTextPartitionerForDTD();
49 }
david_williamscfdb2cd2004-11-11 08:37:49 +000050}