david_williams | 282b8f4 | 2005-02-14 07:00:56 +0000 | [diff] [blame] | 1 | /******************************************************************************* |
| 2 | * Copyright (c) 2004 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 API and implementation |
| 10 | * |
| 11 | *******************************************************************************/ |
| 12 | |
| 13 | package org.eclipse.wst.xml.core.contenttype; |
| 14 | |
| 15 | /** |
| 16 | * This class, with its one field, is a convience to provide compile-time |
| 17 | * safety when refering to a contentType ID. The value of the contenttype id |
| 18 | * field must match what is specified in plugin.xml file. |
| 19 | */ |
| 20 | |
| 21 | public class ContentTypeIdForXML { |
| 22 | /** |
| 23 | * This content type is actually supplied by base Eclipse. Its given here |
| 24 | * just as documentation for WTP based clients. Typically, clients should |
| 25 | * use the values/constants supplied by base Eclipse. |
| 26 | */ |
david_williams | 935a3c3 | 2005-03-16 14:08:18 +0000 | [diff] [blame^] | 27 | public final static String ContentTypeID_XML = getConstantString2(); |
david_williams | 282b8f4 | 2005-02-14 07:00:56 +0000 | [diff] [blame] | 28 | /** |
| 29 | * This value is public only for testing and special infrastructure The |
| 30 | * constant nor is value should not be referenced by clients. |
| 31 | * |
| 32 | * The value of the contenttype id field must match what is specified in |
david_williams | 935a3c3 | 2005-03-16 14:08:18 +0000 | [diff] [blame^] | 33 | * plugin.xml file. Note: this value is intentially set with default |
| 34 | * protected method so it will not be inlined. |
david_williams | 282b8f4 | 2005-02-14 07:00:56 +0000 | [diff] [blame] | 35 | */ |
david_williams | 935a3c3 | 2005-03-16 14:08:18 +0000 | [diff] [blame^] | 36 | public final static String ContentTypeID_SSEXML = getConstantString(); |
| 37 | |
| 38 | /** |
| 39 | * Don't allow instantiation. |
| 40 | */ |
| 41 | private ContentTypeIdForXML() { |
| 42 | super(); |
| 43 | } |
| 44 | |
| 45 | static String getConstantString() { |
| 46 | return "org.eclipse.wst.xml.core.xmlsource"; //$NON-NLS-1$ |
| 47 | } |
| 48 | |
| 49 | static String getConstantString2() { |
| 50 | return "org.eclipse.core.runtime.xml"; //$NON-NLS-1$ |
| 51 | } |
david_williams | 282b8f4 | 2005-02-14 07:00:56 +0000 | [diff] [blame] | 52 | |
| 53 | } |