protected void introduceCurrentOccurrence(GoExpr current) throws GoRefactoringException {
introduceAllOccurrence(current, new GoExpr[]{current});
}
private void appendConstToLastImportOrPackage(RangeMarker[] exprMarkers, String declaration) {
GoPsiElement lastElement;
GoImportDeclarations[] imports = file.getImportDeclarations();
if (imports.length != 0) {
lastElement = imports[imports.length - 1];
} else {
lastElement = file.getPackage();
}
int offset = lastElement.getTextRange().getEndOffset();
String stmt = "\n\nconst $" + VARIABLE + "$ = " + declaration;
startRenaming(editor, exprMarkers, offset, stmt, null);
}