e += name.length();
@Override protected String className(ClassType t, boolean longform, Locale locale) { Symbol sym = t.tsym; if (sym.name.length() == 0 || !getConfiguration().isEnabled(RichFormatterFeature.SIMPLE_NAMES)) { return super.className(t, longform, locale); } else if (longform) return nameSimplifier.simplify(sym).toString(); else return sym.name.toString(); }
@Override protected String className(ClassType t, boolean longform, Locale locale) { Symbol sym = t.tsym; if (sym.name.length() == 0 || !getConfiguration().isEnabled(RichFormatterFeature.SIMPLE_NAMES)) { return super.className(t, longform, locale); } else if (longform) return nameSimplifier.simplify(sym).toString(); else return sym.name.toString(); }
if (bound.getKind() == TypeKind.DECLARED) { ClassSymbol boundSymbol = (ClassSymbol) ((DeclaredType) bound).asElement(); if (boundSymbol.getSimpleName().length() == 0 && (boundSymbol.flags() & Flags.COMPOUND) != 0) { bounds.add((ExpressionTree) make.Type(boundSymbol.getSuperclass())); for (Type iface : boundSymbol.getInterfaces()) {
} else { simpleNameStart = className.length() - sym.getSimpleName().length();
protected int diffLabelled(JCLabeledStatement oldT, JCLabeledStatement newT, int[] bounds) { int localPointer = bounds[0]; if (nameChanged(oldT.label, newT.label)) { copyTo(localPointer, localPointer = getOldPos(oldT)); printer.print(newT.label); localPointer += oldT.label.length(); } int[] bodyBounds = getBounds(oldT.body); copyTo(localPointer, bodyBounds[0]); localPointer = diffTree(oldT.body, newT.body, bodyBounds); copyTo(localPointer, bounds[1]); return bounds[1]; }
DCIdentifier ident = (DCIdentifier) tree; return dcComment.comment.getSourcePos(ident.pos + (ident.name != names.error ? ident.name.length() : 0)); case PARAM: DCParam param = (DCParam) tree;
DCIdentifier ident = (DCIdentifier) tree; return dcComment.comment.getSourcePos(ident.pos + (ident.name != names.error ? ident.name.length() : 0)); case PARAM: DCParam param = (DCParam) tree;
protected int diffTypeParameter(JCTypeParameter oldT, JCTypeParameter newT, int[] bounds) { int localPointer = bounds[0]; copyTo(localPointer, getOldPos(oldT)); if (nameChanged(oldT.name, newT.name)) { printer.print(newT.name); localPointer += oldT.name.length(); } if (!listsMatch(oldT.bounds, newT.bounds)) { // todo (#pf): match it for rename only, other matching will be // finished later. PositionEstimator est = EstimatorFactory.implementz(oldT.getBounds(), newT.getBounds(), diffContext); int pos = oldT.bounds.nonEmpty() ? getOldPos(oldT.bounds.head) : -1; if (pos > -1) { copyTo(localPointer, pos); localPointer = diffList2(oldT.bounds, newT.bounds, pos, est); } } copyTo(localPointer, bounds[1]); return bounds[1]; }
printer.print(newT.name); diffInfo.put(oldT.pos, NbBundle.getMessage(CasualDiff.class,"TXT_RenameVariable",oldT.name)); localPointer = oldT.pos + oldT.name.length();
printer.print(newT.name); diffInfo.put(localPointer, NbBundle.getMessage(CasualDiff.class,"TXT_UpdateReferenceTo",oldT.name)); localPointer = localPointer + oldT.name.length();
localPointer = nameSpan[1]; } else { localPointer = localPointer + oldT.name.length();
case WRAP_IF_LONG: int rm = cs.getRightMargin(); int estWidth = left.name.length(); if (tree.typeargs.nonEmpty()) estWidth += widthEstimator.estimateWidth(tree.typeargs, rm - out.col - estWidth) + 2;