private CSTypeDeclaration mapAuxillaryTypeDeclaration(AbstractTypeDeclaration node) { if (!(node instanceof TypeDeclaration) && !(node instanceof EnumDeclaration)) { unsupportedConstruct(node, "Cannot map auxillary type declaration for node."); } CSTypeDeclaration type = auxillaryTypeDeclarationFor(node); if (type == null) { return null; } type.startPosition(node.getStartPosition()); type.sourceLength(node.getLength()); return type; }
buf.append(";\n"); //$NON-NLS-1$ fillWithTypeStubs(bufBefore, bufAfter, focalPosition, decl.bodyDeclarations()); buf= decl.getStartPosition() + decl.getLength() < focalPosition ? bufBefore : bufAfter; buf.append("}\n"); //$NON-NLS-1$
private CSTypeDeclaration mapTypeDeclaration(AbstractTypeDeclaration node) { if (!(node instanceof TypeDeclaration) && !(node instanceof EnumDeclaration)) { unsupportedConstruct(node, "Cannot map type declaration for node."); } CSTypeDeclaration type = typeDeclarationFor(node); type.startPosition(node.getStartPosition()); type.sourceLength(node.getLength()); if (node instanceof TypeDeclaration) { mapTypeParameters(((TypeDeclaration)node).typeParameters(), type); } return checkForMainType(node, type); }
buf.append(";\n"); //$NON-NLS-1$ fillWithTypeStubs(bufBefore, bufAfter, focalPosition, decl.bodyDeclarations()); buf= decl.getStartPosition() + decl.getLength() < focalPosition ? bufBefore : bufAfter; buf.append("}\n"); //$NON-NLS-1$
buf.append(";\n"); //$NON-NLS-1$ fillWithTypeStubs(bufBefore, bufAfter, focalPosition, decl.bodyDeclarations()); buf= decl.getStartPosition() + decl.getLength() < focalPosition ? bufBefore : bufAfter; buf.append("}\n"); //$NON-NLS-1$
AbstractTypeDeclaration typeNode= (AbstractTypeDeclaration) astRoot.types().get(0); int start= ((ASTNode) typeNode.modifiers().get(0)).getStartPosition(); int end= typeNode.getStartPosition() + typeNode.getLength(); buffer.replace(start, end - start, typeContent); } else {
AbstractTypeDeclaration typeNode= (AbstractTypeDeclaration) astRoot.types().get(0); int start= ((ASTNode) typeNode.modifiers().get(0)).getStartPosition(); int end= typeNode.getStartPosition() + typeNode.getLength(); buffer.replace(start, end - start, typeContent); } else {
AbstractTypeDeclaration typeNode= (AbstractTypeDeclaration) astRoot.types().get(0); int start= ((ASTNode) typeNode.modifiers().get(0)).getStartPosition(); int end= typeNode.getStartPosition() + typeNode.getLength(); buffer.replace(start, end - start, typeContent); } else {
int end= typeNode.getStartPosition() + typeNode.getLength();
default : AbstractTypeDeclaration typeDeclAST3 = typeDeclarationStatement.getDeclaration(); typeDeclarationStatement.setSourceRange(typeDeclAST3.getStartPosition(), typeDeclAST3.getLength()); break;
default : AbstractTypeDeclaration typeDeclAST3 = typeDeclarationStatement.getDeclaration(); typeDeclarationStatement.setSourceRange(typeDeclAST3.getStartPosition(), typeDeclAST3.getLength()); break;
case AST.JLS3 : AbstractTypeDeclaration typeDeclAST3 = typeDeclarationStatement.getDeclaration(); typeDeclarationStatement.setSourceRange(typeDeclAST3.getStartPosition(), typeDeclAST3.getLength()); break;
default : AbstractTypeDeclaration typeDeclAST3 = typeDeclarationStatement.getDeclaration(); typeDeclarationStatement.setSourceRange(typeDeclAST3.getStartPosition(), typeDeclAST3.getLength()); break;
default : AbstractTypeDeclaration typeDeclAST3 = typeDeclarationStatement.getDeclaration(); typeDeclarationStatement.setSourceRange(typeDeclAST3.getStartPosition(), typeDeclAST3.getLength()); break;
default : AbstractTypeDeclaration typeDeclAST3 = typeDeclarationStatement.getDeclaration(); typeDeclarationStatement.setSourceRange(typeDeclAST3.getStartPosition(), typeDeclAST3.getLength()); break;