public class GosuRefactorUtil extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
GosuRefactorUtil.MoveInstruction |
| Constructor and Description |
|---|
GosuRefactorUtil() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
static GosuRefactorUtil.MoveInstruction |
findElementToMoveToAfter(IParseTree child) |
static IParseTree |
findFirstStatementAtLine(int line,
int position,
List<IParseTree> locations) |
static IParseTree |
findLastStatementAtLine(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 unit
|
static GosuRefactorUtil.MoveInstruction |
getMoveDownInstruction(IParseTree elementToMoveAfter) |
static GosuRefactorUtil.MoveInstruction |
getMoveUpInstruction(IParseTree elementToMoveBefore) |
static boolean |
isClassElement(IParseTree parseTree) |
public static IParsedElement boundingParent(List<IParseTree> locations, int position, Class<? extends IParsedElement>... possibleTypes)
public static IParseTree[] findSpanningLogicalRange(IParseTree start, IParseTree end)
public static GosuRefactorUtil.MoveInstruction getMoveUpInstruction(IParseTree elementToMoveBefore)
public static GosuRefactorUtil.MoveInstruction getMoveDownInstruction(IParseTree elementToMoveAfter)
public static boolean isClassElement(IParseTree parseTree)
public static GosuRefactorUtil.MoveInstruction findElementToMoveToAfter(IParseTree child)
public static IParseTree findFirstStatementAtLine(int line, int position, List<IParseTree> locations)
public static IParseTree findLastStatementAtLine(int line, int position, List<IParseTree> locations)
Copyright © 2022. All rights reserved.