EGF Engine
Release 0.1.0

org.eclipse.egf.pattern.ui.internal.editor.page.implementation
Class MethodPatternCodeViewer.MethodPatternCodeContentHandler

java.lang.Object
  extended by org.eclipse.egf.pattern.ui.internal.editor.page.DefaultContentHandler
      extended by org.eclipse.egf.pattern.ui.internal.editor.page.implementation.MethodPatternCodeViewer.MethodPatternCodeContentHandler
All Implemented Interfaces:
IContentHandler
Enclosing class:
MethodPatternCodeViewer

protected class MethodPatternCodeViewer.MethodPatternCodeContentHandler
extends DefaultContentHandler

Method pattern code content handler.


Constructor Summary
protected MethodPatternCodeViewer.MethodPatternCodeContentHandler()
          Constructor.
 
Method Summary
 Object createNewElement()
          Create a new element.
protected  List<MethodActionHandler> getActions()
          Get handled method pattern code actions.
protected  List<MethodActionHandler> getHandlersFor(EOperation method_p)
          Get handlers using with given method.
protected  boolean isHandlerFor(EOperation method_p)
          Is given method handled by this handler ?
protected  void notifyModification()
          A modification that requires a save occurred.
protected  List<MethodActionHandler> removeActionsUsing(EOperation method_p)
          Given method has been removed, remove actions that are referencing it.
 void removeElement(Object element_p)
          Remove given element from handled ones.
protected  void resolvePointedElement(MethodActionHandler methodHandler_p)
          Resolve current method handler pointed model element, if any.
protected  void savePatternCodeAnnotation()
          Save pattern code annotation, according to current actions list state.
protected  void setMethod(EOperation method_p)
          Set method.
protected  void swapElements(int firstIndex_p, int secondIndex_p)
          Swap elements in the actions list.
 
Methods inherited from class org.eclipse.egf.pattern.ui.internal.editor.page.DefaultContentHandler
addPropertyChangeListener, getPage, getPattern, getPatternData, removePropertyChangeListener, setPatternData, setPatternPage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodPatternCodeViewer.MethodPatternCodeContentHandler

protected MethodPatternCodeViewer.MethodPatternCodeContentHandler()
Constructor.

Method Detail

isHandlerFor

protected boolean isHandlerFor(EOperation method_p)
Is given method handled by this handler ?

Parameters:
method_p -
Returns:

getHandlersFor

protected List<MethodActionHandler> getHandlersFor(EOperation method_p)
Get handlers using with given method.

Parameters:
method_p -
Returns:

setMethod

protected void setMethod(EOperation method_p)
Set method.

Parameters:
method_p -

getActions

protected List<MethodActionHandler> getActions()
Get handled method pattern code actions.

Returns:
List of actions as defined by MethodActionHandler.

resolvePointedElement

protected void resolvePointedElement(MethodActionHandler methodHandler_p)
Resolve current method handler pointed model element, if any.
Should such model element be resolved, then the given handler is modified accordingly (ie is pointing to the resolved element).
If none, the given handler is left unmodified.

Parameters:
methodHandler_p - A not null method handler, that is to contain the action couple at least (should be so, by construction).

savePatternCodeAnnotation

protected void savePatternCodeAnnotation()
Save pattern code annotation, according to current actions list state.


notifyModification

protected void notifyModification()
Description copied from class: DefaultContentHandler
A modification that requires a save occurred.
Set page as dirty.

Overrides:
notifyModification in class DefaultContentHandler
See Also:
DefaultContentHandler.notifyModification()

removeActionsUsing

protected List<MethodActionHandler> removeActionsUsing(EOperation method_p)
Given method has been removed, remove actions that are referencing it.

Parameters:
parameterName_p -

createNewElement

public Object createNewElement()
Description copied from interface: IContentHandler
Create a new element.

Specified by:
createNewElement in interface IContentHandler
Overrides:
createNewElement in class DefaultContentHandler
Returns:
See Also:
IContentHandler.createNewElement()

removeElement

public void removeElement(Object element_p)
Description copied from interface: IContentHandler
Remove given element from handled ones.

Specified by:
removeElement in interface IContentHandler
Overrides:
removeElement in class DefaultContentHandler
See Also:
IContentHandler.removeElement(java.lang.Object)

swapElements

protected void swapElements(int firstIndex_p,
                            int secondIndex_p)
Swap elements in the actions list.

Parameters:
firstIndex_p -
secondIndex_p -

EGF Engine
Release 0.1.0

Copyright (c) Thales Corporate Services S.A.S, 2009.

This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.