@Override public final void setTextID(CharSequence textID) { this.text = TextCache.getManager().getString(textID); }
/** Set the token text for this node */ @Override public void setText(String text_) { text = TextCache.getManager().getString(text_); }
@Override public final void setText(String t) { text = TextCache.getManager().getString(t); }
@Override public final void setTextID(CharSequence textID) { this.text = TextCache.getManager().getString(textID); }
@Override public final void setText(String t) { text = TextCache.getManager().getString(t); }
/**package*/void setGuard(CharSequence guard) { this.guard = TextCache.getManager().getString(guard); }
@Override public CharSequence getText() { CharSequence cs = token.text(); if (cs == null) { // Token.text() can return null if the token has been removed. // We want to avoid NPE (see IZ#143591). return ""; // NOI18N } else { return TextCache.getManager().getString(cs); } }
private SystemMacroImpl(CharSequence macroName, CharSequence macroBody, List<CharSequence> macroParams, CsmFile containingFile, Kind macroKind) { this.macroName = NameCache.getManager().getString(macroName); this.macroBody = TextCache.getManager().getString(macroBody); this.macroKind = macroKind; if (macroParams != null) { this.params = Collections.unmodifiableList(macroParams); } else { this.params = null; } assert containingFile instanceof Unresolved.UnresolvedFile; this.containingFile = containingFile; this.uid = UIDProviderIml.createSelfUID((CsmMacro)this); }
final CharSequence initClassifierText(AST node) { if( node == null ) { CsmClassifier classifier = _getClassifier(); return classifier == null ? "" : classifier.getName(); } else { StringBuilder sb = new StringBuilder(); addText(sb, AstRenderer.getFirstSiblingSkipQualifiers(node)); return TextCache.getManager().getString(sb); // return sb.toString(); } }
/** Creates a new instance of APTFileNode */ public APTFileNode(FileSystem fileSystem, CharSequence path) { Parameters.notNull("null fileSystem", fileSystem); //NOI18N this.fileSystem = fileSystem; this.path = FilePathCache.getManager().getString(path); this.guard = TextCache.getManager().getString(guard); tokenized = true; }
public static CharSequence getQualifiedName(AST qid) { if (qid != null && (qid.getType() == CPPTokenTypes.CSM_QUALIFIED_ID || qid.getType() == CPPTokenTypes.CSM_TYPE_COMPOUND)) { if (qid.getFirstChild() != null) { StringBuilder sb = new StringBuilder(); for (AST namePart = qid.getFirstChild(); namePart != null; namePart = namePart.getNextSibling()) { // TODO: update this assert it should accept names like: allocator<char, typename A> // if( ! ( namePart.getType() == CPPTokenTypes.ID || namePart.getType() == CPPTokenTypes.SCOPE || // namePart.getType() == CPPTokenTypes.LESSTHAN || namePart.getType() == CPPTokenTypes.GREATERTHAN || // namePart.getType() == CPPTokenTypes.CSM_TYPE_BUILTIN || namePart.getType() == CPPTokenTypes.CSM_TYPE_COMPOUND || // namePart.getType() == CPPTokenTypes.COMMA) ) { // new Exception("Unexpected token type " + namePart).printStackTrace(System.err); // } if (namePart.getType() == CPPTokenTypes.CSM_TYPE_BUILTIN || namePart.getType() == CPPTokenTypes.CSM_TYPE_COMPOUND) { AST builtInType = namePart.getFirstChild(); if (builtInType != null) { sb.append(AstUtil.getText(builtInType)); } } else { sb.append(AstUtil.getText(namePart)); } } return TextCache.getManager().getString(sb); } } return ""; }
private void cleanCaches() { TextCache.getManager().dispose(); FilePathCache.getManager().dispose(); QualifiedNameCache.getManager().dispose(); NameCache.getManager().dispose(); UniqueNameCache.getManager().dispose(); FileNameCache.getManager().dispose(); ProjectNameCache.getManager().dispose(); APTDriver.close(); APTFileCacheManager.close(); UIDManager.instance().dispose(); KeyManager.instance().dispose(); CndFileUtils.clearFileExistenceCache(); APTFileCacheManager.invalidateAll(); APTSystemStorage.dispose(); }