/** Set the token text for this node */ @Override public void setText(String text_) { text = TextCache.getManager().getString(text_); }
@Override public CharSequence getString(CharSequence text) { if (text == null) { throw new NullPointerException("null string is illegal to share"); // NOI18N } text = CharSequences.create(text); return instance.getString(text); }
public void fixFolder(CharSequence path){ if (path != null) { projectRoots.put(FilePathCache.getManager().getString(path), Integer.MAX_VALUE / 2); } }
protected ClassEnumBase(CharSequence name, CharSequence qName, CsmFile file, int startOffset, int endOffset) { super(file, startOffset, endOffset); enclosingElements = Collections.synchronizedList(new ArrayList<CsmUID<CsmOffsetableDeclaration>>(0)); this.name = NameCache.getManager().getString(name); this.qualifiedName = QualifiedNameCache.getManager().getString(qName); }
@Override public CharSequence getString(CharSequence text) { if (text == null) { throw new NullPointerException("null string is illegal to share"); // NOI18N } text = CharSequences.create(text); return instance.getString(text); }
public static List<CharSequence> asList(Collection<? extends CharSequence> paths) { List<CharSequence> out = new ArrayList<CharSequence>(paths.size()); for (CharSequence path : paths) { out.add(FilePathCache.getManager().getString(path)); } return out; }
/** 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; }
private SubroutineImpl(String name, CsmFile file, int startOffset, int endOffset, CsmType type, CsmScope scope, DummyParametersListImpl parameterList) { super(file, startOffset, endOffset); this.name = QualifiedNameCache.getManager().getString(name); rawName = this.name; this.parameterList = parameterList; try { _setScope(scope); } catch (AstRendererException ex) { Exceptions.printStackTrace(ex); } }
public static CharSequence getRepositoryUnitName(FileSystem fs, CharSequence projectSourceRoot) { Parameters.notNull("FileSystem", fs); //NOI18N String result = projectSourceRoot.toString() + "/N/"; // NOI18N return ProjectNameCache.getManager().getString(result); }
public StartEntry(FileSystem fs, String startFile, Key startFileProject) { Parameters.notNull("startFileProject", startFileProject); //NOI18N this.fileSystem = fs; this.startFile = FilePathCache.getManager().getString(startFile); this.startFileProject = startFileProject; }
public static CharSequence readFileNameIndex(RepositoryDataInput aStream, APTStringManager manager, int unitId) throws IOException { CharSequence path = readFileNameIndex(aStream, unitId); if (path != null) { CharSequence res = manager.getString(path); assert CharSequences.isCompact(res); return res; } return null; }
private EnumeratorImpl(EnumImpl enumeration, CharSequence name, CsmFile file, int startOffset, int endOffset) { super(file, startOffset, endOffset); assert enumeration != null; this.name = NameCache.getManager().getString(name); // set parent enum, do it in constructor to have final fields this.enumerationUID = UIDCsmConverter.declarationToUID((CsmEnum)enumeration); assert this.enumerationUID != null; this.enumerationRef = null; }
public static CharSequence readFileNameIndex(RepositoryDataInput aStream, APTStringManager manager, int unitId) throws IOException { int id = aStream.readInt(); CharSequence path = KeyUtilities.getFileNameById(unitId, id); CharSequence res = manager.getString(path); assert CharSequences.isCompact(res); return res; }
@Override public CharSequence getSignature() { if( signature == null ) { signature = QualifiedNameCache.getManager().getString(createSignature(getName(), getParameters(), getOwnTemplateParameters(), isConst())); } assert !signature.toString().startsWith(UID_SIGNATURE_PREFIX) : "Signature requested when object is not fully constructed!"; // NOI18N return signature; }
protected AbstractFileBuffer(FileObject fileObject) { this.absPath = FilePathCache.getManager().getString(CndFileUtils.normalizePath(fileObject)); assert this.absPath != null : "no path for " + fileObject; this.fileSystem = getFileSystem(fileObject); this.fileObject = new WeakReference<>(fileObject); this.bufType = MIMENames.isCppOrCOrFortran(fileObject.getMIMEType()) ? APTFileBuffer.BufferType.START_FILE : APTFileBuffer.BufferType.INCLUDED; // remote link file objects are just lightweight delegating wrappers, so they have multiple instances // if (CndUtils.isDebugMode()) { // FileObject fo2 = fileSystem.findResource(absPath.toString()); // CndUtils.assertTrue(fileObject == fo2, "File objects differ: " + fileObject + " vs " + fo2); //NOI18N // } }
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(); } }
protected OffsetableKey(KeyDataPresentation presentation) { super(presentation); this.startOffset = presentation.getStartPresentation(); this.endOffset = presentation.getEndPresentation(); this.name = NameCache.getManager().getString(presentation.getNamePresentation()); }
protected EnumForwardDeclarationImpl(AST ast, CsmFile file, boolean global) { super(file, getEnumForwardStartOffset(ast), getEnumForwardEndOffset(ast)); AST qid = AstUtil.findChildOfType(ast, CPPTokenTypes.IDENT); if (qid == null) { qid = AstUtil.findChildOfType(ast, CPPTokenTypes.CSM_QUALIFIED_ID); } assert qid != null; assert !AstRenderer.isScopedId(qid) : qid; name = QualifiedNameCache.getManager().getString(AstUtil.getText(qid)); nameParts = new CharSequence[] {name}; this.templateDescriptor = TemplateDescriptor.createIfNeeded(ast, file, null, global); }