Mylyn WikiText

org.eclipse.mylyn.wikitext.core
Class WikiText

java.lang.Object
  extended by org.eclipse.mylyn.wikitext.core.WikiText

public class WikiText
extends Object

A utility class for accessing markup languages and validation. Use only in an Eclipse runtime environment. Programs should use the ServiceLocator instead of this class if possible. Stand-alone programs (that is, those programs that do not run in an Eclipse runtime) must not use this class.

Since:
1.0
Author:
David Green
See Also:
ServiceLocator

Field Summary
static String CONTENT_TYPE
          the content type id of wikitext files.
 
Method Summary
static Set<String> getMarkupFileExtensions()
          Get the file extensions that are registered for markup languages.
static MarkupLanguage getMarkupLanguage(String name)
          Get a markup language by name.
static MarkupLanguage getMarkupLanguageForFilename(String name)
          Get a markup language for a file.
static String getMarkupLanguageNameForFilename(String name)
          Get a markup language name for a file.
static Set<String> getMarkupLanguageNames()
          Get the names of all known markup languages
static MarkupValidator getMarkupValidator(String name)
          Get a markup validator by language name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTENT_TYPE

public static final String CONTENT_TYPE
the content type id of wikitext files.

See Also:
Constant Field Values
Method Detail

getMarkupFileExtensions

public static Set<String> getMarkupFileExtensions()
Get the file extensions that are registered for markup languages. File extensions are specified without the leading dot.


getMarkupLanguage

public static MarkupLanguage getMarkupLanguage(String name)
Get a markup language by name.

Parameters:
name - the name of the markup language to retrieve
Returns:
the markup language or null if there is no markup language known by the given name
See Also:
getMarkupLanguageNames()

getMarkupLanguageForFilename

public static MarkupLanguage getMarkupLanguageForFilename(String name)
Get a markup language for a file. A markup language is selected based on the registered languages and their expected file extensions.

Parameters:
name - the name of the file for which a markup language is desired
Returns:
the markup language, or null if no markup language is registered for the specified file name
See Also:
getMarkupLanguageForFilename(String)

getMarkupLanguageNameForFilename

public static String getMarkupLanguageNameForFilename(String name)
Get a markup language name for a file. A markup language is selected based on the registered languages and their expected file extensions.

Parameters:
name - the name of the file for which a markup language is desired
Returns:
the markup language name, or null if no markup language is registered for the specified file name
See Also:
getMarkupLanguageForFilename(String)

getMarkupLanguageNames

public static Set<String> getMarkupLanguageNames()
Get the names of all known markup languages

See Also:
getMarkupLanguage(String)

getMarkupValidator

public static MarkupValidator getMarkupValidator(String name)
Get a markup validator by language name.

Parameters:
name - the name of the markup language for which a validator is desired
Returns:
the markup validator
See Also:
getMarkupLanguageNames()

Mylyn WikiText

Copyright © 2007, 2009 David Green and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html