ISourceRange range= getNodeRange(node); doTextRemoveAndVisit(range.getOffset(), range.getLength(), node, description); doTextInsert(range.getOffset(), (ASTNode) event.getNewValue(), getIndent(startPos), true, description); return range.getOffset() + range.getLength();
int offset= getExtendedOffset(node); int length= getExtendedLength(node);  doTextRemoveAndVisit(offset, length, node, description); doTextInsert(offset, (ASTNode) event.getNewValue(), getIndent(startPos), true, description); return offset + length;
	private int rewriteOptionalQualifier(ASTNode parent, int property, int startPos) {		RewriteEvent event= getEvent(parent, property);		if (event != null) {			switch (event.getChangeKind()) {				case RewriteEvent.INSERTED: {					ASTNode node= (ASTNode) event.getNewValue();					GroupDescription description= getDescription(event);					doTextInsert(startPos, node, getIndent(startPos), true, description);					doTextInsert(startPos, ".", description); //$NON-NLS-1$					return startPos;				}				case RewriteEvent.REMOVED: {					try {						ASTNode node= (ASTNode) event.getOriginalValue();						GroupDescription description= getDescription(event);						int dotEnd= getScanner().getTokenEndOffset(ITerminalSymbols.TokenNameDOT, node.getStartPosition() + node.getLength());						doTextRemoveAndVisit(startPos, dotEnd - startPos, node, description);						return dotEnd;					} catch (CoreException e) {						JavaPlugin.log(e);					}					break;				}				case RewriteEvent.REPLACED: {					ASTNode node= (ASTNode) event.getOriginalValue();					GroupDescription description= getDescription(event);					ISourceRange range= getNodeRange(node);					doTextRemoveAndVisit(range.getOffset(), range.getLength(), node, description);					doTextInsert(range.getOffset(), (ASTNode) event.getNewValue(), getIndent(startPos), true, description);					return range.getOffset() + range.getLength();				}			}		}		return doVisit(parent, property, startPos);	}	