JavaIndenter indenter= new JavaIndenter(document, scanner);
JavaIndenter indenter= new JavaIndenter(document, scanner, getJavaProject());
				public void run() {					IRewriteTarget target= (IRewriteTarget)getTextEditor().getAdapter(IRewriteTarget.class);					if (target != null) {						target.beginCompoundChange();						target.setRedraw(false);					}										try {						JavaHeuristicScanner scanner= new JavaHeuristicScanner(document);						JavaIndenter indenter= new JavaIndenter(document, scanner);						boolean hasChanged= false;						for (int i= 0; i < nLines; i++) {							hasChanged |= indentLine(document, firstLine + i, offset, indenter, scanner);						}												// update caret position: move to new position when indenting just one line						// keep selection when indenting multiple						int newOffset, newLength;						if (fIsTabAction) {							newOffset= fCaretOffset;							newLength= 0;						} else if (nLines > 1) {							newOffset= offset;							newLength= end.getOffset() - offset;						} else {							newOffset= fCaretOffset;							newLength= 0;						}												// always reset the selection if anything was replaced						// but not when we had a singleline nontab invocation						if (newOffset != -1 && (hasChanged || newOffset != offset || newLength != length))							selectAndReveal(newOffset, newLength);												document.removePosition(end);					} catch (BadLocationException e) {						// will only happen on concurrent modification						JavaPlugin.log(new Status(IStatus.ERROR, JavaPlugin.getPluginId(), IStatus.OK, "ConcurrentModification in IndentAction", e)); //$NON-NLS-1$											} finally {												if (target != null) {							target.endCompoundChange();							target.setRedraw(true);						}					}				}