private boolean matchPrefix(CharSequence text, String prefix, boolean caseSensitive) { if (CharSequenceUtils.startsWith(text, prefix)) { return true; } if (!caseSensitive) { return CharSequenceUtils.startsWithIgnoreCase(text, prefix); } return false; }
CharSequence getDestinationFilePath(CharSequence sourceFilePath) { Set<CharSequence> keySet = sourceRoots.keySet(); for (CharSequence sourceRoot : keySet) { //if (sourceFilePath.toString().startsWith(sourceRoot.toString())) { if(CharSequenceUtils.startsWith(sourceFilePath, sourceRoot)) { //return sourceFilePath.toString().replace(sourceRoot, destRoot); StringBuilder sb = new StringBuilder(sourceRoots.get(sourceRoot)); sb.append(sourceFilePath.subSequence(sourceRoot.length(), sourceFilePath.length())); return sb; } } return sourceFilePath; }
private boolean matchPrefix(CsmImplementsMethodCompletionItem itm, String prefix) { return CharSequenceUtils.startsWith(itm.getSortText(), prefix); } }
private boolean matchPrefix(CsmOverrideMethodCompletionItem itm, String prefix) { return CharSequenceUtils.startsWith(itm.getSortText(), prefix); } }
private List<CharSequence> getPathToFolder(CharSequence folder, CharSequence path) { List<CharSequence> res = new ArrayList<>(3); res.add(folder); if (CharSequenceUtils.startsWith(path, folder)) { while (true) { CharSequence dir = getDirName(path); if (dir == null || (CharSequences.comparator().compare(folder, dir) == 0) || !CharSequenceUtils.startsWith(dir, folder)) { break; } res.add(dir); if (res.size() == 3) { break; } path = dir; } } return res; } private static CharSequence getDirName(CharSequence path) {
protected FunctionImpl(CharSequence name, CharSequence rawName, CsmScope scope, boolean _static, boolean _const, CsmFile file, int startOffset, int endOffset, boolean global) { super(file, startOffset, endOffset); this.name = name; this.rawName = rawName; setFlags(FLAGS_STATIC, _static); _setScope(scope); setFlags(FLAGS_CONST, _const); if (CharSequenceUtils.startsWith(name, OPERATOR) && (name.length() > OPERATOR.length()) && !Character.isJavaIdentifierPart(name.charAt(OPERATOR.length()))) { // NOI18N setFlags(FLAGS_OPERATOR, true); } }
boolean check = false; for(Map.Entry<CharSequence,Integer> entry : projectRoots.entrySet()) { if (CharSequenceUtils.startsWith(includePath, entry.getKey())) { if (includePath.length() == entry.getKey().length()) { return true;
CsmClassifier classifier = resolveType.getClassifier(); if (classifier != null) { if (classifier.getKind() == CsmDeclaration.Kind.STRUCT && !CharSequenceUtils.startsWith(typeText, "struct")) { //NOI18N typeText = "struct "+typeText; //NOI18N