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
Interface IParser

All Known Subinterfaces:
ISemanticParser

public interface IParser

The interface for all parsers


Method Summary
  IContentAssistProcessor getCompletionProcessor ( IAdaptable element)
          Returns the parser's content assist processor
 java.lang.String getEditString ( IAdaptable element, int flags)
          Gets the string that is a subject to edit.
  ICommand getParseCommand ( IAdaptable element, java.lang.String newString, int flags)
          Gets the command that applies the new edit string
 java.lang.String getPrintString ( IAdaptable element, int flags)
          Returns a string intended for display.
 boolean isAffectingEvent (java.lang.Object event, int flags)
          Determines if the event requires action from the parser point of view.
  IParserEditStatus isValidEditString ( IAdaptable element, java.lang.String editString)
          Tests if the user-entered string is in a valid form that can be parsed
 

Method Detail

getEditString

java.lang.String getEditString(
IAdaptable element,
                               int flags)
Gets the string that is a subject to edit.

Parameters:
element - the element for which the edit string is requested
flags - the bitflag of parser options
Returns:
String current contents of the edit string

isValidEditString

IParserEditStatus isValidEditString(
IAdaptable element,
                                    java.lang.String editString)
Tests if the user-entered string is in a valid form that can be parsed

Parameters:
element - the element for which the edit string is applied to
editString - the user-entered string
Returns:
IParserEditStatus EDITABLE_STATUS if the edit string is valid, otherwise a status that includes information describing why it is an invalid edit string.

getParseCommand

ICommand getParseCommand(
IAdaptable element,
                         java.lang.String newString,
                         int flags)
Gets the command that applies the new edit string

Parameters:
element - the element for which the parse command is requested
newString - to be set by the command
flags - the bitflag of parser options
Returns:
ICommand command that when executed will result in setting the newString

getPrintString

java.lang.String getPrintString(
IAdaptable element,
                                int flags)
Returns a string intended for display. That might be a different string that the one returned by getEditString. E.g., for stereotypes, the print string will be adorned with <<>> brackets while edit string will not be adorned.

Parameters:
element - the element for which the print string is requested
flags - the bitflag of parser options
Returns:
String the print string

isAffectingEvent

boolean isAffectingEvent(java.lang.Object event,
                         int flags)
Determines if the event requires action from the parser point of view. The action usually involves some visual refreshment.

Parameters:
event - the event, an instance of IElementEvent
flags - the bitflag of parser options
Returns:
boolean true if the event affects the parser, otherwise false.

getCompletionProcessor

IContentAssistProcessor getCompletionProcessor(
IAdaptable element)
Returns the parser's content assist processor

Parameters:
element - the element
Returns:
the content assist processor

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