blob: 891788ea38d2e3e73ed77250f72d1445fc915d86 [file] [log] [blame]
david_williams282b8f42005-02-14 07:00:56 +00001/*******************************************************************************
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
13package 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
21public 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_williams935a3c32005-03-16 14:08:18 +000027 public final static String ContentTypeID_XML = getConstantString2();
david_williams282b8f42005-02-14 07:00:56 +000028 /**
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_williams935a3c32005-03-16 14:08:18 +000033 * plugin.xml file. Note: this value is intentially set with default
34 * protected method so it will not be inlined.
david_williams282b8f42005-02-14 07:00:56 +000035 */
david_williams935a3c32005-03-16 14:08:18 +000036 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_williams282b8f42005-02-14 07:00:56 +000052
53}