Class ExtractRefactoringStatementAnalyzer
- java.lang.Object
-
- com._1c.g5.v8.dt.bsl.ui.refactoring.ExtractRefactoringStatementAnalyzer
-
public class ExtractRefactoringStatementAnalyzer extends Object
Class contains methods for analyze extracting statements in 'Extract Method' refactoring
Also createsExtractRefactoringStatementAnalyzer.ExtractingContentInformation
contains all information for extracting method Instances ofExtractRefactoringStatementAnalyzer
are stateful and are not safe for use by multiple threads.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ExtractRefactoringStatementAnalyzer.ExtractingContentInformation
Class contains all information for creating method in extracting refactoringstatic class
ExtractRefactoringStatementAnalyzer.ParamDescription
Class contains all information of one extracting method parameters
-
Constructor Summary
Constructors Constructor Description ExtractRefactoringStatementAnalyzer(Block block, List<DeclareStatement> allSelectedDeclareStatement, List<Statement> allSelectedStatement, org.eclipse.jface.text.IRegion region, DynamicFeatureAccessComputer typeComputer)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
analyze()
Analyzes extractirng statements and detects parameters of method, type of methodString
getErrorMessage()
Gets validating error messageExtractRefactoringStatementAnalyzer.ExtractingContentInformation
getExtractingContentInformation()
GetsExtractRefactoringStatementAnalyzer.ExtractingContentInformation
for current list ofStatement
andDeclareStatement
boolean
isFunction()
Checks that extract content must be function
-
-
-
Constructor Detail
-
ExtractRefactoringStatementAnalyzer
public ExtractRefactoringStatementAnalyzer(Block block, List<DeclareStatement> allSelectedDeclareStatement, List<Statement> allSelectedStatement, org.eclipse.jface.text.IRegion region, DynamicFeatureAccessComputer typeComputer)
Constructor- Parameters:
block
- actualBlock
for extracting refactoringallSelectedDeclareStatement
- list of all selectedDeclareStatement
, can't benull
allSelectedStatement
- list of all selectedStatement
, can't benull
region
- actual selectedIRegion
, can benull
typeComputer
-DynamicFeatureAccessComputer
for resolvingDynamicFeatureAccess
in extracting statements, can't benull
-
-
Method Detail
-
analyze
public boolean analyze()
Analyzes extractirng statements and detects parameters of method, type of method- Returns:
true
if error wasn't detected,false
otherwise
-
getExtractingContentInformation
public ExtractRefactoringStatementAnalyzer.ExtractingContentInformation getExtractingContentInformation()
GetsExtractRefactoringStatementAnalyzer.ExtractingContentInformation
for current list ofStatement
andDeclareStatement
- Returns:
- actual
ExtractRefactoringStatementAnalyzer.ExtractingContentInformation
for current list ofStatement
andDeclareStatement
, can benull
if errors were detected
-
isFunction
public boolean isFunction()
Checks that extract content must be function- Returns:
true
if extract content must be function,false
otherwise
-
getErrorMessage
public String getErrorMessage()
Gets validating error message- Returns:
- validating error message if error was detected or empty string if no errors. Can't be
null
-
-