JavaPlugin.getDefault().getJavaTextTools().setupJavaDocumentPartitioner(doc);
JavaPlugin.getDefault().getJavaTextTools().setupJavaDocumentPartitioner(doc, IJavaPartitions.JAVA_PARTITIONING);
	protected Object computeInput(Object input) {		if (fViewer == null || !(input instanceof ISourceReference))			return null;		ISourceReference sourceRef= (ISourceReference)input;		if (fLastOpenedElement != null && input instanceof IJavaElement && ((IJavaElement)input).getHandleIdentifier().equals(fLastOpenedElement.getHandleIdentifier())) {			fLastOpenedElement= null;			return null;		} else {			fLastOpenedElement= null;		}		String source;		try {			source= sourceRef.getSource();		} catch (JavaModelException ex) {			return ""; //$NON-NLS-1$		}		if (source == null)			return ""; //$NON-NLS-1$		source= removeLeadingComments(source);		String delim= StubUtility.getLineDelimiterUsed((IJavaElement) input);		String[] sourceLines= Strings.convertIntoLines(source);		if (sourceLines == null || sourceLines.length == 0)			return ""; //$NON-NLS-1$		String firstLine= sourceLines[0];		boolean firstCharNotWhitespace= firstLine != null && firstLine.length() > 0 && !Character.isWhitespace(firstLine.charAt(0));		if (firstCharNotWhitespace)			sourceLines[0]= ""; //$NON-NLS-1$		IJavaProject project;		if (input instanceof IJavaElement)			project= ((IJavaElement) input).getJavaProject();		else			project= null;		Strings.trimIndentation(sourceLines, project);		if (firstCharNotWhitespace)			sourceLines[0]= firstLine;		source= Strings.concatenate(sourceLines, delim);		IDocument doc= new Document(source);		JavaPlugin.getDefault().getJavaTextTools().setupJavaDocumentPartitioner(doc);		return doc;	}