Package gw.util
Class GosuRefactorUtil
- java.lang.Object
-
- gw.util.GosuRefactorUtil
-
public class GosuRefactorUtil extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGosuRefactorUtil.MoveInstruction
-
Constructor Summary
Constructors Constructor Description GosuRefactorUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IParsedElementboundingParent(List<IParseTree> locations, int position, Class<? extends IParsedElement>... possibleTypes)Finds a bounding parent of any of the possible types passed in from the list of locations, starting at the position given.static GosuRefactorUtil.MoveInstructionfindElementToMoveToAfter(IParseTree child)static IParseTreefindFirstStatementAtLine(int line, int position, List<IParseTree> locations)static IParseTreefindLastStatementAtLine(int line, int position, List<IParseTree> locations)static IParseTree[]findSpanningLogicalRange(IParseTree start, IParseTree end)Given two parse tree positions, find the bounding pair that captures the start and end in one logical unitstatic GosuRefactorUtil.MoveInstructiongetMoveDownInstruction(IParseTree elementToMoveAfter)static GosuRefactorUtil.MoveInstructiongetMoveUpInstruction(IParseTree elementToMoveBefore)static booleanisClassElement(IParseTree parseTree)
-
-
-
Method Detail
-
boundingParent
public static IParsedElement boundingParent(List<IParseTree> locations, int position, Class<? extends IParsedElement>... possibleTypes)
Finds a bounding parent of any of the possible types passed in from the list of locations, starting at the position given.
-
findSpanningLogicalRange
public static IParseTree[] findSpanningLogicalRange(IParseTree start, IParseTree end)
Given two parse tree positions, find the bounding pair that captures the start and end in one logical unit
-
getMoveUpInstruction
public static GosuRefactorUtil.MoveInstruction getMoveUpInstruction(IParseTree elementToMoveBefore)
-
getMoveDownInstruction
public static GosuRefactorUtil.MoveInstruction getMoveDownInstruction(IParseTree elementToMoveAfter)
-
isClassElement
public static boolean isClassElement(IParseTree parseTree)
-
findElementToMoveToAfter
public static GosuRefactorUtil.MoveInstruction findElementToMoveToAfter(IParseTree child)
-
findFirstStatementAtLine
public static IParseTree findFirstStatementAtLine(int line, int position, List<IParseTree> locations)
-
findLastStatementAtLine
public static IParseTree findLastStatementAtLine(int line, int position, List<IParseTree> locations)
-
-