|
org.eclipse.gmf.runtime.common.ui.services.parser
Class ParserService
java.lang.Object
org.eclipse.gmf.runtime.common.core.service.AbstractProvider
org.eclipse.gmf.runtime.common.core.service.Service
org.eclipse.gmf.runtime.common.ui.services.parser.ParserService
-
All Implemented Interfaces:
- java.util.EventListener,
IProvider,
IProviderChangeListener,
IParserProvider
-
public class ParserService
- extends
Service
- implements
IParserProvider
The parser service which returns a parser for an IAdaptable.
Also includes methods to obtain the strings for the IAdaptable and to
determine whether editing is possible.
Methods inherited from class org.eclipse.gmf.runtime.common.core.service.
Service
|
addProvider,
clearCache,
configureProviders,
configureProviders,
createPriorityCache,
execute,
executeUnique,
getAllProviders,
getCachingKey,
getPriority,
getProviders,
isOptimistic,
isOptimized,
newProviderDescriptor,
providerChanged,
provides,
provides,
removeProvider
|
Methods inherited from class java.lang.Object
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
|
ParserService
public ParserService()
getInstance
public static
ParserService getInstance()
- Retrieves the singleton instance of the parser service.
-
-
-
Returns:
- The editor service singleton.
getParser
public
IParser getParser(
IAdaptable hint)
-
Description copied from interface:
IParserProvider
- Method getParser.
-
-
Specified by:
-
getParser
in interface
IParserProvider
-
-
Parameters:
-
hint - IAdaptable hint used to determine the parser to return
-
Returns:
- IParser corresponding to the IAdaptable hint
-
See Also:
-
IParserProvider.getParser(IAdaptable)
getEditString
public java.lang.String getEditString(
IAdaptable hint,
int options)
- Returns the string that is a subject to edit.
-
-
-
Parameters:
-
hint - - hint adaptable to IElement -
options - - parser options
-
Returns:
- String - current contents of the edit string
getPrintString
public java.lang.String getPrintString(
IAdaptable hint,
int options)
- Gets the print string to display
-
-
-
Parameters:
-
hint - - hint adaptable to IElement -
options - - parser options
-
Returns:
- String - the print string
getPrintString
public java.lang.String getPrintString(
IAdaptable hint)
- Convenience method for getting the print string to display
-
-
-
Parameters:
-
hint - - hint adaptable to element
-
Returns:
- String - the print string
canEdit
public boolean canEdit(
IAdaptable hint)
- Determines if element can be edited
-
-
-
Parameters:
-
hint - - hint adaptable to element to check
-
Returns:
- boolean
true if element is editable, otherwise false
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.
|
|