Package com.e1c.g5.v8.dt.bsl.check.qfix
Interface IXtextBslModuleFixFacade
-
public interface IXtextBslModuleFixFacade
Contract for xtext BSL quick fix model
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
createMethod(org.eclipse.xtext.resource.XtextResource state, Method method, String directiveName, String methodKeywordType, String methodName, String methodEndKeywordType)
Creates the method and returns its nameString
createVariable(Method method)
Creates the variable and returns its nameString
getDeclarationKeyword()
Provides the declaration keyword for elementString
getDirectiveName()
Provides the directive nameorg.eclipse.emf.ecore.EObject
getElement()
Provides the element which is used to create a quick fixString
getFormatString(Method method)
Provides the format string for the givenMethod
String
getIndent(Method method)
Gets indent by methodString
getMethodName()
Genearates and returns the method nameint
getOffset(Method method)
Gets offset by methodint
getTotalEndOffset(Method method)
Returns the end offset (exclusive) for the methodString
getTypeEndMethodName(boolean isFunc)
Gets 'EndProcedure' or 'EndFunction'String
getTypeMethodName(boolean isFunc)
Gets 'Procedure' or 'Function'String
getVariableName()
Genearates and returns the variable namevoid
writeMethodToModule(Method method, String methodKeywordType, String directiveName, int totalEndOffset, String func)
Serializes the method to modulevoid
writeVariableToModule(int offset, String declarationKeyWord, String variable)
Serializes the variable to module
-
-
-
Method Detail
-
getElement
org.eclipse.emf.ecore.EObject getElement()
Provides the element which is used to create a quick fix- Returns:
- the element, can be
null
-
getFormatString
String getFormatString(Method method) throws org.eclipse.jface.text.BadLocationException
Provides the format string for the givenMethod
- Parameters:
method
- the method, cannot benull
- Returns:
- format string, never
null
- Throws:
org.eclipse.jface.text.BadLocationException
-
getDeclarationKeyword
String getDeclarationKeyword()
Provides the declaration keyword for element- Returns:
- declaration keyword, never
null
-
getIndent
String getIndent(Method method) throws org.eclipse.jface.text.BadLocationException
Gets indent by method- Returns:
- indent, never
null
- Throws:
org.eclipse.jface.text.BadLocationException
-
getOffset
int getOffset(Method method)
Gets offset by method- Returns:
- offset
-
getTotalEndOffset
int getTotalEndOffset(Method method)
Returns the end offset (exclusive) for the method- Returns:
- the end offset (exclusive)
-
getVariableName
String getVariableName()
Genearates and returns the variable name- Returns:
- the variable name, never
null
-
getMethodName
String getMethodName()
Genearates and returns the method name- Returns:
- the method name, never
null
-
getTypeMethodName
String getTypeMethodName(boolean isFunc)
Gets 'Procedure' or 'Function'- Parameters:
isFunc
- defines what will be return- Returns:
- 'Procedure' if
isFunc == false
, else return 'Function'
-
getTypeEndMethodName
String getTypeEndMethodName(boolean isFunc)
Gets 'EndProcedure' or 'EndFunction'- Parameters:
isFunc
- defines what will be return- Returns:
- 'EndProcedure' if
isFunc == false
, else return 'EndFunction'
-
getDirectiveName
String getDirectiveName()
Provides the directive name- Returns:
- the directive name, never
null
, can be empty
-
createVariable
String createVariable(Method method) throws org.eclipse.jface.text.BadLocationException
Creates the variable and returns its name- Parameters:
method
- the method, cannot benull
- Returns:
- created variable name, never
null
- Throws:
org.eclipse.jface.text.BadLocationException
-
createMethod
String createMethod(org.eclipse.xtext.resource.XtextResource state, Method method, String directiveName, String methodKeywordType, String methodName, String methodEndKeywordType) throws org.eclipse.jface.text.BadLocationException
Creates the method and returns its name- Parameters:
state
- the xtext resource, cannot benull
method
- the method, cannot benull
directiveName
- the directive name, cannot benull
, can be emptymethodKeywordType
- the method keyword type, cannot benull
methodName
- the method name, cannot benull
methodEndKeywordType
- the metod end keyword type, cannot benull
- Returns:
- the method name, cannot be
null
- Throws:
org.eclipse.jface.text.BadLocationException
-
writeVariableToModule
void writeVariableToModule(int offset, String declarationKeyWord, String variable)
Serializes the variable to module- Parameters:
offset
- the offsetdeclarationKeyWord
- the declaration keyword, cannot benull
, can be emptyvariable
- the variable name, cannot benull
-
writeMethodToModule
void writeMethodToModule(Method method, String methodKeywordType, String directiveName, int totalEndOffset, String func) throws org.eclipse.jface.text.BadLocationException
Serializes the method to module- Parameters:
method
- the method, cannot benull
methodKeywordType
- the method keyword type, cannot benull
directiveName
- the directive name, cannot benull
, can be emptytotalEndOffset
- the end offset (exclusive) for the methodfunc
- the method name, cannot benull
- Throws:
org.eclipse.jface.text.BadLocationException
-
-