|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.m2m.atl.common.AtlNbCharFile
public class AtlNbCharFile
This class is used by a stackframe to compute char position in a file With the file name and project name, this structure build a list for each line the position of its first char and the position of the tabs.
| Constructor Summary | |
|---|---|
AtlNbCharFile(java.io.InputStream in)
The AtlNbCharFile constructor. |
|
| Method Summary | |
|---|---|
int |
getIndex(java.lang.String cursorPosition)
Returns computes the char start position from the string "cursorLine:cursorColumn" given by Eclipse (tabs are 4 chars long by default, but it is user-configurable). |
int[] |
getIndexChar(java.lang.String sourceLocation)
Returns the index char in the source location. |
int[] |
getIndexChar(java.lang.String sourceLocation,
int tabWidth)
Returns an array of int: first element is startChar, second element is endChar |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AtlNbCharFile(java.io.InputStream in)
in - the input stream| Method Detail |
|---|
public int[] getIndexChar(java.lang.String sourceLocation)
sourceLocation - the source
public int[] getIndexChar(java.lang.String sourceLocation,
int tabWidth)
sourceLocation - the string representing "startLine:startColumn-endLine:endColumn" the location given by
antlr (tabs are 8 chars long)tabWidth - the width of the tab
public int getIndex(java.lang.String cursorPosition)
cursorPosition - the string representing the cursor position
|
Copyright 2007 IBM Corporation and others. All Rights Reserved. |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||