david_williams | cfdb2cd | 2004-11-11 08:37:49 +0000 | [diff] [blame] | 1 | /******************************************************************************* |
amywu | ecebb04 | 2007-04-10 20:07:35 +0000 | [diff] [blame] | 2 | * Copyright (c) 2001, 2006 IBM Corporation and others. |
david_williams | cfdb2cd | 2004-11-11 08:37:49 +0000 | [diff] [blame] | 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 |
amywu | ecebb04 | 2007-04-10 20:07:35 +0000 | [diff] [blame] | 7 | * |
david_williams | cfdb2cd | 2004-11-11 08:37:49 +0000 | [diff] [blame] | 8 | * Contributors: |
| 9 | * IBM Corporation - initial API and implementation |
| 10 | * Jens Lukowski/Innoopract - initial renaming/restructuring |
| 11 | * |
| 12 | *******************************************************************************/ |
pavery | f918eb2 | 2005-03-29 18:26:53 +0000 | [diff] [blame] | 13 | package org.eclipse.wst.dtd.core.internal.text; |
david_williams | cfdb2cd | 2004-11-11 08:37:49 +0000 | [diff] [blame] | 14 | |
nitind | bbdc6b5 | 2009-07-22 17:45:05 +0000 | [diff] [blame] | 15 | import org.eclipse.jface.text.IDocumentPartitioner; |
pavery | b0f98c5 | 2006-02-13 20:19:39 +0000 | [diff] [blame] | 16 | import org.eclipse.wst.dtd.core.text.IDTDPartitions; |
pavery | f918eb2 | 2005-03-29 18:26:53 +0000 | [diff] [blame] | 17 | import org.eclipse.wst.sse.core.internal.text.rules.StructuredTextPartitioner; |
pavery | b0f98c5 | 2006-02-13 20:19:39 +0000 | [diff] [blame] | 18 | import org.eclipse.wst.sse.core.text.IStructuredPartitions; |
david_williams | cfdb2cd | 2004-11-11 08:37:49 +0000 | [diff] [blame] | 19 | |
| 20 | public class StructuredTextPartitionerForDTD extends StructuredTextPartitioner { |
| 21 | |
david_williams | cfdb2cd | 2004-11-11 08:37:49 +0000 | [diff] [blame] | 22 | public StructuredTextPartitionerForDTD() { |
| 23 | super(); |
| 24 | } |
| 25 | |
| 26 | /* |
| 27 | * (non-Javadoc) |
| 28 | * |
| 29 | * @see org.eclipse.wst.sse.core.text.rules.StructuredTextPartitioner#getDefault() |
| 30 | */ |
pavery | 40dd89e | 2005-04-01 21:09:29 +0000 | [diff] [blame] | 31 | public String getDefaultPartitionType() { |
pavery | b0f98c5 | 2006-02-13 20:19:39 +0000 | [diff] [blame] | 32 | return IDTDPartitions.DTD_DEFAULT; |
david_williams | cfdb2cd | 2004-11-11 08:37:49 +0000 | [diff] [blame] | 33 | } |
| 34 | |
| 35 | /* |
| 36 | * (non-Javadoc) |
| 37 | * |
| 38 | * @see org.eclipse.wst.sse.core.text.rules.StructuredTextPartitioner#initLegalContentTypes() |
| 39 | */ |
| 40 | protected void initLegalContentTypes() { |
pavery | b0f98c5 | 2006-02-13 20:19:39 +0000 | [diff] [blame] | 41 | fSupportedTypes = new String[]{IDTDPartitions.DTD_DEFAULT, IStructuredPartitions.UNKNOWN_PARTITION}; |
david_williams | cfdb2cd | 2004-11-11 08:37:49 +0000 | [diff] [blame] | 42 | } |
nitind | bbdc6b5 | 2009-07-22 17:45:05 +0000 | [diff] [blame] | 43 | |
| 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_williams | cfdb2cd | 2004-11-11 08:37:49 +0000 | [diff] [blame] | 50 | } |