CompilationUnit astRoot= JavaPlugin.getDefault().getASTProvider().getAST(inputElement, true, null);
CompilationUnit astRoot= JavaPlugin.getDefault().getASTProvider().getAST(inputElement, ASTProvider.WAIT_ACTIVE_ONLY, null);
	private ClipboardData getClipboardData(IJavaElement inputElement, int offset, int length) {		CompilationUnit astRoot= JavaPlugin.getDefault().getASTProvider().getAST(inputElement, true, null);		if (astRoot == null) {			return null;		}				// do process import if selection spans over import declaration or package		List list= astRoot.imports();		if (!list.isEmpty()) {			if (offset < ((ASTNode) list.get(list.size() - 1)).getStartPosition()) {				return null;			}		} else if (astRoot.getPackage() != null) {			if (offset < ((ASTNode) astRoot.getPackage()).getStartPosition()) {				return null;			}		}				ArrayList res= new ArrayList();		ImportReferencesCollector collector= new ImportReferencesCollector(new Region(offset, length), res);		astRoot.accept(collector);				HashSet namesToImport= new HashSet(res.size());		for (int i= 0; i < res.size(); i++) {			SimpleName curr= (SimpleName) res.get(i);			IBinding binding= curr.resolveBinding();			if (binding != null && binding.getKind() == IBinding.TYPE) {				ITypeBinding typeBinding= (ITypeBinding) binding;				if (typeBinding.isArray()) {					typeBinding= typeBinding.getElementType();				}				if (typeBinding.isMember() || typeBinding.isTopLevel()) {					String name= typeBinding.getQualifiedName();					if (name.length() > 0) {						namesToImport.add(name);					}				}			}		}		if (namesToImport.isEmpty()) {			return null;		}				return new ClipboardData(inputElement, (String[]) namesToImport.toArray(new String[namesToImport.size()]));	}