List of usage examples for org.eclipse.jdt.internal.compiler.env ISourceType getNameSourceEnd
int getNameSourceEnd();
From source file:org.eclipse.ajdt.core.javaelements.ITDAwareSourceTypeInfo.java
License:Open Source License
public ITDAwareSourceTypeInfo(ISourceType toCopy, SourceType type) { this.handle = createITDAwareType(type, this); this.setFlags(toCopy.getModifiers()); this.setSuperclassName(toCopy.getSuperclassName()); this.setSuperInterfaceNames(toCopy.getInterfaceNames()); this.setNameSourceEnd(toCopy.getNameSourceEnd()); this.setNameSourceStart(toCopy.getNameSourceStart()); this.setSourceRangeEnd(toCopy.getDeclarationSourceEnd()); this.setSourceRangeStart(toCopy.getDeclarationSourceStart()); try {// w ww .j a v a 2 s . c o m ITypeParameter[] parameters = type.getTypeParameters(); if (parameters != null) { this.typeParameters = new ITypeParameter[parameters.length]; System.arraycopy(parameters, 0, this.typeParameters, 0, parameters.length); } } catch (JavaModelException e) { } IJavaElement[] children = augmentChildrenAndHierarchy(type); if (children != null) { this.setChildren(children); } try { // this ensures that itd aware content assist // still works when there are large numbers ofannotations Object info = ((JavaElement) handle.getCompilationUnit()).getElementInfo(); if (info != null && info instanceof CompilationUnitElementInfo) { ((CompilationUnitElementInfo) info).annotationNumber = 0; } } catch (JavaModelException e) { } }