Interface IPlacementContext
-
public interface IPlacementContext
Provides additional information for creatingApplyResult
forIGlobalVariable
.IPlacementContext
created before any template pattern parts will be inserted toIDocument
IGlobalVariable
provides 2 part for inserting to document:- usual part - inserted in place where template with global variable is applied
- global part - inserted anywhere in document after usual part
IPlacementContext
determinates offset of the insert position of global part (seegetPlacementOffset()
).shiftPlacementOffset(int, IDocument)
called after inserting usual part for recompute offset if the insert position of global part if needed
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getPlacementOffset()
Gets offset of inserting global content part ofIGlobalVariable
.void
shiftPlacementOffset(int shift, org.eclipse.jface.text.IDocument document)
Shifts placement offset after usual part of template will be applied to document, before inserting global content part
-
-
-
Method Detail
-
getPlacementOffset
int getPlacementOffset()
Gets offset of inserting global content part ofIGlobalVariable
. Global content part - part of template which should be placed not in whereITemplate
apply- Returns:
- offset of inserting global content part of
IGlobalVariable
-
shiftPlacementOffset
void shiftPlacementOffset(int shift, org.eclipse.jface.text.IDocument document)
Shifts placement offset after usual part of template will be applied to document, before inserting global content part- Parameters:
shift
-document
-
-
-