command.offset= previousLine.getOffset() + previousLine.getLength();
command.offset= start;
	private boolean indentLine(IDocument document, int line, int caret, JavaIndenter indenter, JavaHeuristicScanner scanner) throws BadLocationException {		IRegion currentLine= document.getLineInformation(line);		int offset= currentLine.getOffset();				String indent= null;		if (offset < document.getLength()) {			ITypedRegion partition= TextUtilities.getPartition(document, IJavaPartitions.JAVA_PARTITIONING, offset);			String type= partition.getType();			if (partition.getOffset() < offset					&& type.equals(IJavaPartitions.JAVA_DOC)					|| type.equals(IJavaPartitions.JAVA_MULTI_LINE_COMMENT)) {								// TODO this is a hack				// what I want to do//				new JavaDocAutoIndentStrategy().indentLineAtOffset(document, offset);//				return;								IRegion previousLine= document.getLineInformation(line - 1);								DocumentCommand command= new DocumentCommand() {				};				command.text= "\n"; //$NON-NLS-1$				command.offset= previousLine.getOffset() + previousLine.getLength();				new JavaDocAutoIndentStrategy(IJavaPartitions.JAVA_PARTITIONING).customizeDocumentCommand(document, command);				int i= command.text.indexOf('*');				if (i != -1)					indent= command.text.substring(1, i);				else					indent= command.text.substring(1);			}		} 				// standard java indentation		if (indent == null)			indent= indenter.computeIndentation(offset);				// default is no indentation		if (indent == null)			indent= new String();				// change document:		// get current white space		int lineLength= currentLine.getLength();		int end= scanner.findNonWhitespaceForwardInAnyPartition(offset, offset + lineLength);		if (end == JavaHeuristicScanner.NOT_FOUND)			end= offset + lineLength;		int length= end - offset;		String currentIndent= document.get(offset, length);				// if we are right before the text start / line end, and already after the insertion point		// then just insert a tab.		if (fIsTabAction && caret == end && whiteSpaceLength(currentIndent) >= whiteSpaceLength(indent)) {			String tab= getTabEquivalent();			document.replace(caret, 0, tab);			fCaretOffset= caret + tab.length();			return true;		}				// set the caret offset so it can be used when setting the selection		if (caret >= offset && caret <= end)			fCaretOffset= offset + indent.length();		else			fCaretOffset= -1;				// only change the document if it is a real change		if (!indent.equals(currentIndent)) {			document.replace(offset, length, indent);			return true;		} else			return false;	}