@Override protected void initRawPackageInfo(HashtableOfArrayToObject rawPackageInfo, String entryName, boolean isDirectory, String compliance) { char[] name = entryName.toCharArray(); if (CharOperation.prefixEquals(ClasspathJMod.CLASSES_FOLDER, name)) { name = CharOperation.subarray(name, ClasspathJMod.CLASSES_FOLDER.length, name.length); } super.initRawPackageInfo(rawPackageInfo, new String(name), isDirectory, compliance); } }
protected void initRawPackageInfo(HashtableOfArrayToObject rawPackageInfo, String entryName, boolean isDirectory, String compliance) { char[] name = entryName.toCharArray(); if (CharOperation.prefixEquals(ClasspathJMod.CLASSES_FOLDER, name)) { name = CharOperation.subarray(name, ClasspathJMod.CLASSES_FOLDER.length, name.length); } super.initRawPackageInfo(rawPackageInfo, new String(name), isDirectory, compliance); } }
public void generateSyntheticFinalFieldInitialization(CodeStream codeStream) { if (this.synthetics == null || this.synthetics[SourceTypeBinding.FIELD_EMUL] == null) return; Collection<FieldBinding> syntheticFields = this.synthetics[SourceTypeBinding.FIELD_EMUL].values(); for (FieldBinding field : syntheticFields) { if (CharOperation.prefixEquals(TypeConstants.SYNTHETIC_SWITCH_ENUM_TABLE, field.name)) { MethodBinding[] accessors = (MethodBinding[]) this.synthetics[SourceTypeBinding.METHOD_EMUL].get(new String(field.name)); if (accessors == null || accessors[0] == null) // not a field for switch enum continue; codeStream.invoke(Opcodes.OPC_invokestatic, accessors[0], null /* default declaringClass */); codeStream.fieldAccess(Opcodes.OPC_putstatic, field, null /* default declaringClass */); } } } /* Answer the synthetic field for <actualOuterLocalVariable>
public void generateSyntheticFinalFieldInitialization(CodeStream codeStream) { if (this.synthetics == null || this.synthetics[SourceTypeBinding.FIELD_EMUL] == null) return; Collection<FieldBinding> syntheticFields = this.synthetics[SourceTypeBinding.FIELD_EMUL].values(); for (FieldBinding field : syntheticFields) { if (CharOperation.prefixEquals(TypeConstants.SYNTHETIC_SWITCH_ENUM_TABLE, field.name)) { MethodBinding[] accessors = (MethodBinding[]) this.synthetics[SourceTypeBinding.METHOD_EMUL].get(new String(field.name)); if (accessors == null || accessors[0] == null) // not a field for switch enum continue; codeStream.invoke(Opcodes.OPC_invokestatic, accessors[0], null /* default declaringClass */); codeStream.fieldAccess(Opcodes.OPC_putstatic, field, null /* default declaringClass */); } } } /* Answer the synthetic field for <actualOuterLocalVariable>
int computeRelevanceForCaseMatching(char[] token, char[] proposalName){ if(CharOperation.equals(token, proposalName, true)) { return R_EXACT_NAME + R_CASE; } else if(CharOperation.equals(token, proposalName, false)) { return R_EXACT_NAME; } else if (CharOperation.prefixEquals(token, proposalName, false)) { if (CharOperation.prefixEquals(token, proposalName, true)) return R_CASE; } else if (this.options.camelCaseMatch && CharOperation.camelCaseMatch(token, proposalName)){ return R_CAMEL_CASE; } else if (this.options.substringMatch && CharOperation.substringMatch(token, proposalName)) { return R_SUBSTRING; } return 0; }
int computeRelevanceForCaseMatching(char[] token, char[] proposalName){ if(CharOperation.equals(token, proposalName, true)) { return R_EXACT_NAME + R_CASE; } else if(CharOperation.equals(token, proposalName, false)) { return R_EXACT_NAME; } else if (CharOperation.prefixEquals(token, proposalName, false)) { if (CharOperation.prefixEquals(token, proposalName, true)) return R_CASE; } else if (this.options.camelCaseMatch && CharOperation.camelCaseMatch(token, proposalName)){ return R_CAMEL_CASE; } else if (this.options.substringMatch && CharOperation.substringMatch(token, proposalName)) { return R_SUBSTRING; } return 0; }
int computeRelevanceForCaseMatching(char[] token, char[] proposalName){ if(CharOperation.equals(token, proposalName, true)) { return R_EXACT_NAME + R_CASE; } else if(CharOperation.equals(token, proposalName, false)) { return R_EXACT_NAME; } else if (CharOperation.prefixEquals(token, proposalName, false)) { if (CharOperation.prefixEquals(token, proposalName, true)) return R_CASE; } else if (this.options.camelCaseMatch && CharOperation.camelCaseMatch(token, proposalName)){ return R_CAMEL_CASE; } else if (this.options.substringMatch && CharOperation.substringMatch(token, proposalName)) { return R_SUBSTRING; } return 0; }
private TypeBinding safeType(TypeBinding type) { if (type != null && type.isLocalType()) { MethodBinding enclosingMethod = ((LocalTypeBinding) type.original()).enclosingMethod; if (enclosingMethod != null && CharOperation.prefixEquals(TypeConstants.ANONYMOUS_METHOD, enclosingMethod.selector)) return type.superclass(); // don't use local class inside lambda: lambda is copied, type will be re-created and thus is unmatchable } return type; }
private TypeBinding safeType(TypeBinding type) { if (type != null && type.isLocalType()) { MethodBinding enclosingMethod = ((LocalTypeBinding) type.original()).enclosingMethod; if (enclosingMethod != null && CharOperation.prefixEquals(TypeConstants.ANONYMOUS_METHOD, enclosingMethod.selector)) return type.superclass(); // don't use local class inside lambda: lambda is copied, type will be re-created and thus is unmatchable } return type; }
private TypeBinding safeType(TypeBinding type) { if (type != null && type.isLocalType()) { MethodBinding enclosingMethod = ((LocalTypeBinding) type.original()).enclosingMethod; if (enclosingMethod != null && CharOperation.prefixEquals(TypeConstants.ANONYMOUS_METHOD, enclosingMethod.selector)) return type.superclass(); // don't use local class inside lambda: lambda is copied, type will be re-created and thus is unmatchable } return type; }
private TypeBinding safeType(TypeBinding type) { if (type != null && type.isLocalType()) { MethodBinding enclosingMethod = ((LocalTypeBinding) type.original()).enclosingMethod; if (enclosingMethod != null && CharOperation.prefixEquals(TypeConstants.ANONYMOUS_METHOD, enclosingMethod.selector)) return type.superclass(); // don't use local class inside lambda: lambda is copied, type will be re-created and thus is unmatchable } return type; }
private TypeBinding safeType(TypeBinding type) { if (type != null && type.isLocalType()) { MethodBinding enclosingMethod = ((LocalTypeBinding) type.original()).enclosingMethod; if (enclosingMethod != null && CharOperation.prefixEquals(TypeConstants.ANONYMOUS_METHOD, enclosingMethod.selector)) return type.superclass(); // don't use local class inside lambda: lambda is copied, type will be re-created and thus is unmatchable } return type; }
private TypeBinding safeType(TypeBinding type) { if (type != null && type.isLocalType()) { MethodBinding enclosingMethod = ((LocalTypeBinding) type.original()).enclosingMethod; if (enclosingMethod != null && CharOperation.prefixEquals(TypeConstants.ANONYMOUS_METHOD, enclosingMethod.selector)) return type.superclass(); // don't use local class inside lambda: lambda is copied, type will be re-created and thus is unmatchable } return type; }
private void acceptName(char[] name) { // the null check is added to fix bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=166570 if (name == null) return; if (!CharOperation.prefixEquals(this.completionEngine.completionToken, name, false /* ignore case */) && !(this.completionEngine.options.camelCaseMatch && CharOperation.camelCaseMatch(this.completionEngine.completionToken, name))) return; if (this.acceptedNames.includes(name)) return; this.acceptedNames.add(name); // accept result this.requestor.acceptName(name); }
private void acceptName(char[] name) { // the null check is added to fix bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=166570 if (name == null) return; if (!CharOperation.prefixEquals(this.completionEngine.completionToken, name, false /* ignore case */) && !(this.completionEngine.options.camelCaseMatch && CharOperation.camelCaseMatch(this.completionEngine.completionToken, name))) return; if (this.acceptedNames.includes(name)) return; this.acceptedNames.add(name); // accept result this.requestor.acceptName(name); }
private void acceptName(char[] name) { // the null check is added to fix bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=166570 if (name == null) return; if (!CharOperation.prefixEquals(this.completionEngine.completionToken, name, false /* ignore case */) && !(this.completionEngine.options.camelCaseMatch && CharOperation.camelCaseMatch(this.completionEngine.completionToken, name))) return; if (this.acceptedNames.includes(name)) return; this.acceptedNames.add(name); // accept result this.requestor.acceptName(name); }
private void acceptName(char[] name) { // the null check is added to fix bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=166570 if (name == null) return; if (!CharOperation.prefixEquals(this.completionEngine.completionToken, name, false /* ignore case */) && !(this.completionEngine.options.camelCaseMatch && CharOperation.camelCaseMatch(this.completionEngine.completionToken, name))) return; if (this.acceptedNames.includes(name)) return; this.acceptedNames.add(name); // accept result this.requestor.acceptName(name); }
private void acceptName(char[] name) { // the null check is added to fix bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=166570 if (name == null) return; if (!CharOperation.prefixEquals(this.completionEngine.completionToken, name, false /* ignore case */) && !(this.completionEngine.options.camelCaseMatch && CharOperation.camelCaseMatch(this.completionEngine.completionToken, name))) return; if (this.acceptedNames.includes(name)) return; this.acceptedNames.add(name); // accept result this.requestor.acceptName(name); }
private void acceptName(char[] name) { // the null check is added to fix bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=166570 if (name == null) return; if (!CharOperation.prefixEquals(this.completionEngine.completionToken, name, false /* ignore case */) && !(this.completionEngine.options.camelCaseMatch && CharOperation.camelCaseMatch(this.completionEngine.completionToken, name))) return; if (this.acceptedNames.includes(name)) return; this.acceptedNames.add(name); // accept result this.requestor.acceptName(name); }
private TypeBinding safeType(TypeBinding type) { if (type != null && type.isLocalType()) { MethodBinding enclosingMethod = ((LocalTypeBinding) type.original()).enclosingMethod; if (enclosingMethod != null && CharOperation.prefixEquals(TypeConstants.ANONYMOUS_METHOD, enclosingMethod.selector)) { // don't use local class inside lambda: lambda is copied, type will be re-created and thus is unmatchable if (type.superclass().id == TypeIds.T_JavaLangObject && type.superInterfaces().length > 0) return type.superInterfaces()[0]; return type.superclass(); } } return type; }