Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Runtime

org.eclipse.gmf.runtime.common.ui.services.parser
Class ParserService

java.lang.Object
  extended by 

org.eclipse.gmf.runtime.common.core.service.AbstractProvider
      extended by 

org.eclipse.gmf.runtime.common.core.service.Service
          extended by 
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.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.gmf.runtime.common.core.service. Service
Service.ProviderDescriptor
 
Field Summary
 
Fields inherited from class org.eclipse.gmf.runtime.common.core.service. Service
INVALID_ELEMENT_MESSAGE_PATTERN
 
Constructor Summary
ParserService ()
           
 
Method Summary
 boolean canEdit ( IAdaptable hint)
          Determines if element can be edited
 java.lang.String getEditString ( IAdaptable hint, int options)
          Returns the string that is a subject to edit.
static  ParserService getInstance ()
          Retrieves the singleton instance of the parser service.
  IParser getParser ( IAdaptable hint)
          Method getParser.
 java.lang.String getPrintString ( IAdaptable hint)
          Convenience method for getting the print string to display
 java.lang.String getPrintString ( IAdaptable hint, int options)
          Gets the print string to display
 
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 org.eclipse.gmf.runtime.common.core.service. AbstractProvider
addProviderChangeListener, fireProviderChange, removeProviderChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.gmf.runtime.common.core.service. IProvider
addProviderChangeListener, provides, removeProviderChangeListener
 

Constructor Detail

ParserService

public ParserService()
Method Detail

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

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire