org.eclipse.m2m.atl.adt.ui.text.atl
Class AtlModelAnalyser

java.lang.Object
  extended by org.eclipse.m2m.atl.adt.ui.text.atl.AtlModelAnalyser

public class AtlModelAnalyser
extends java.lang.Object

Atl model analyser, used to get information from an incomplete ATL model.


Field Summary
static int DO_CONTEXT
           
static int FROM_CONTEXT
           
static int HELPER_CONTEXT
           
static int MODULE_CONTEXT
           
static int NULL_CONTEXT
          context types
static int RULE_CONTEXT
           
static int TO_CONTEXT
           
static int USING_CONTEXT
           
 
Constructor Summary
AtlModelAnalyser(AtlCompletionHelper fHelper, org.eclipse.emf.ecore.EObject emfRoot, int modelOffset, java.lang.String lastKeyword, int userOffset)
           
 
Method Summary
 int getContext()
           
static java.lang.String getContextName(int id)
           
 org.eclipse.emf.ecore.EObject getLocatedElement(int offset)
          Search the nearest element of the given offset.
 org.eclipse.emf.ecore.EObject getLostType(java.lang.String type)
          Looks for a specific type in the anormal root types
 org.eclipse.emf.ecore.EObject getRootElement()
          Search the root element of the model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NULL_CONTEXT

public static final int NULL_CONTEXT
context types

See Also:
Constant Field Values

MODULE_CONTEXT

public static final int MODULE_CONTEXT
See Also:
Constant Field Values

HELPER_CONTEXT

public static final int HELPER_CONTEXT
See Also:
Constant Field Values

RULE_CONTEXT

public static final int RULE_CONTEXT
See Also:
Constant Field Values

FROM_CONTEXT

public static final int FROM_CONTEXT
See Also:
Constant Field Values

TO_CONTEXT

public static final int TO_CONTEXT
See Also:
Constant Field Values

DO_CONTEXT

public static final int DO_CONTEXT
See Also:
Constant Field Values

USING_CONTEXT

public static final int USING_CONTEXT
See Also:
Constant Field Values
Constructor Detail

AtlModelAnalyser

public AtlModelAnalyser(AtlCompletionHelper fHelper,
                        org.eclipse.emf.ecore.EObject emfRoot,
                        int modelOffset,
                        java.lang.String lastKeyword,
                        int userOffset)
Method Detail

getRootElement

public org.eclipse.emf.ecore.EObject getRootElement()
                                             throws org.eclipse.jface.text.BadLocationException
Search the root element of the model.

Returns:
the element
Throws:
org.eclipse.jface.text.BadLocationException

getLocatedElement

public org.eclipse.emf.ecore.EObject getLocatedElement(int offset)
                                                throws org.eclipse.jface.text.BadLocationException
Search the nearest element of the given offset.

Parameters:
offset -
Returns:
the element
Throws:
org.eclipse.jface.text.BadLocationException

getLostType

public org.eclipse.emf.ecore.EObject getLostType(java.lang.String type)
Looks for a specific type in the anormal root types

Parameters:
type - the name of the searched type
Returns:
the corresponding EMF object if present

getContext

public int getContext()

getContextName

public static java.lang.String getContextName(int id)

Copyright 2007 IBM Corporation and others.
All Rights Reserved.