Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
56,800
PsiReference[] (XmlElement element, @NotNull String text) { return !text.startsWith("${") && !FxmlConstants.isNullValue(text) ? super.getValueReferences(element, text) : PsiReference.EMPTY_ARRAY; } @Override public String getName(PsiElement context) { return getName(); } @Override public String getName() { return myNam...
getValueReferences
56,801
String (PsiElement context) { return getName(); }
getName
56,802
String () { return myName; }
getName
56,803
void (PsiElement element) { }
init
56,804
String () { return (myPsiClass != null ? myPsiClass.getName() + "#" : "?#") + myName; }
toString
56,805
PsiClass () { return myPsiClass; }
getPsiClass
56,806
String () { return myPsiClass != null ? "<" + myPsiClass.getName() + ">" : "<" + getName() + "?>"; }
toString
56,807
String () { final PsiClass psiClass = getPsiClass(); return psiClass != null ? psiClass.getQualifiedName() : getName(); }
getQualifiedName
56,808
String () { return getName(); }
getDefaultName
56,809
XmlElementDescriptor[] (XmlTag context) { if (context != null) { final PsiClass psiClass = getPsiClass(); if (psiClass != null) { final List<XmlElementDescriptor> children = new ArrayList<>(); collectWritableProperties(children, member -> new JavaFxPropertyTagDescriptor(psiClass, PropertyUtilBase.getPropertyName(member...
getElementsDescriptors
56,810
JavaFxPropertyTagDescriptor () { final PsiClass psiClass = getPsiClass(); final PsiAnnotation defaultProperty = AnnotationUtil .findAnnotationInHierarchy(psiClass, Collections.singleton(JavaFxCommonNames.JAVAFX_BEANS_DEFAULT_PROPERTY)); if (defaultProperty != null) { final PsiAnnotationMemberValue defaultPropertyAttrib...
getDefaultPropertyDescriptor
56,811
void (@Nullable XmlTag context, List<? super XmlAttributeDescriptor> simpleAttrs) { if (context == null) return; collectParentStaticProperties(context.getParentTag(), simpleAttrs, method -> new JavaFxSetterAttributeDescriptor(method, method.getContainingClass())); }
collectStaticAttributesDescriptors
56,812
void (XmlTag context, List<? super XmlElementDescriptor> children) { collectParentStaticProperties(context, children, method -> { final PsiClass aClass = method.getContainingClass(); return new JavaFxPropertyTagDescriptor(aClass, PropertyUtilBase.getPropertyName(method.getName()), true); }); }
collectStaticElementDescriptors
56,813
XmlAttributeDescriptor[] (@Nullable XmlTag context) { if (context != null) { final String name = context.getName(); if (Objects.equals(name, getName())) { final PsiClass psiClass = getPsiClass(); if (psiClass != null) { final List<XmlAttributeDescriptor> descriptors = new ArrayList<>(); collectInstanceProperties(descri...
getAttributesDescriptors
56,814
void (List<XmlAttributeDescriptor> simpleAttrs) { final PsiClass psiClass = getPsiClass(); final Set<String> propertyNames = collectWritableProperties( simpleAttrs, member -> new JavaFxPropertyAttributeDescriptor(PropertyUtilBase.getPropertyName(member), psiClass)); for (String name : JavaFxPsiUtil.getConstructorNamedA...
collectInstanceProperties
56,815
XmlNSDescriptor () { return null; }
getNSDescriptor
56,816
int () { return CONTENT_TYPE_UNKNOWN; }
getContentType
56,817
PsiElement () { return getPsiClass(); }
getDeclaration
56,818
String (PsiElement context) { return getName(); }
getName
56,819
String () { return myName; }
getName
56,820
void (PsiElement element) { }
init
56,821
void (@NotNull XmlTag context, @NotNull ValidationHost host) { final XmlTag parentTag = context.getParentTag(); if (parentTag != null) { final XmlAttribute attribute = context.getAttribute(FxmlConstants.FX_CONTROLLER); if (attribute != null) { host.addMessage(attribute.getNameElement(), JavaFXBundle.message("inspection...
validate
56,822
boolean (String attributeName) { final PsiClass psiClass = getPsiClass(); return psiClass != null && !JavaFxPsiUtil.getWritableProperties(psiClass).containsKey(attributeName) && !JavaFxPsiUtil.getConstructorNamedArgProperties(psiClass).contains(attributeName); }
isReadOnlyAttribute
56,823
XmlElementDescriptor (XmlTag xmlTag) { final String name = xmlTag.getName(); if (FxmlConstants.FX_BUILT_IN_TAGS.contains(name)) { return new JavaFxBuiltInTagDescriptor(name, xmlTag); } if (FxmlConstants.FX_ROOT.equals(name)) { return new JavaFxRootTagDescriptor(xmlTag); } return new JavaFxClassTagDescriptor(name, xmlTa...
createTagDescriptor
56,824
String () { return getName(); }
getQualifiedName
56,825
String () { return getName(); }
getDefaultName
56,826
XmlElementDescriptor[] (XmlTag context) { return XmlElementDescriptor.EMPTY_ARRAY; }
getElementsDescriptors
56,827
XmlAttributeDescriptor[] (@Nullable XmlTag context) { final List<XmlAttributeDescriptor> descriptors = new ArrayList<>(); final List<String> builtInAttributeNames = FxmlConstants.FX_BUILT_IN_TAG_SUPPORTED_ATTRIBUTES.get(getName()); if (builtInAttributeNames != null) { for (String attrName : builtInAttributeNames) { des...
getAttributesDescriptors
56,828
XmlTag (XmlTag context) { if (context == null) return null; final XmlAttribute xmlAttribute = context.getAttribute(FxmlConstants.SOURCE); if (xmlAttribute != null) { final XmlAttributeValue valueElement = xmlAttribute.getValueElement(); if (valueElement != null) { final PsiReference reference = valueElement.getReferenc...
getIncludedRoot
56,829
XmlNSDescriptor () { return null; }
getNSDescriptor
56,830
int () { return CONTENT_TYPE_UNKNOWN; }
getContentType
56,831
PsiElement () { return myXmlTag; }
getDeclaration
56,832
String (PsiElement context) { return getName(); }
getName
56,833
String () { return myName; }
getName
56,834
void (PsiElement element) { }
init
56,835
void (@NotNull XmlTag context, @NotNull ValidationHost host) { final XmlTag referencedTag = getReferencedTag(context); if (referencedTag != null) { final XmlElementDescriptor descriptor = referencedTag.getDescriptor(); if (descriptor != null) { final PsiElement declaration = descriptor.getDeclaration(); if (declaration...
validate
56,836
String () { final String source = myXmlTag != null ? myXmlTag.getAttributeValue(FxmlConstants.SOURCE) : null; return "<" + myName + (source != null ? " -> " + source : "") + ">"; }
toString
56,837
JavaFxBuiltInAttributeDescriptor (String name, PsiClass psiClass) { if (FxmlConstants.FX_ID.equals(name)) return new FxIdAttributeDescriptor(psiClass); if (FxmlConstants.FX_VALUE.equals(name)) return new FxValueAttributeDescriptor(psiClass); if (FxmlConstants.FX_CONSTANT.equals(name)) return new FxConstantAttributeDesc...
create
56,838
JavaFxBuiltInAttributeDescriptor (String name, String parentTagName) { if (FxmlConstants.FX_ID.equals(name)) return new FxIdAttributeDescriptor(parentTagName); if (FxmlConstants.FX_VALUE.equals(name)) return new FxValueAttributeDescriptor(parentTagName); if (FxmlConstants.FX_CONSTANT.equals(name)) return new FxConstant...
create
56,839
boolean () { return false; }
isEnumerated
56,840
boolean () { if (myParentTagName == null) return super.isRequired(); final List<String> requiredAttrs = FxmlConstants.FX_BUILT_IN_TAG_REQUIRED_ATTRIBUTES.get(myParentTagName); return requiredAttrs != null && requiredAttrs.contains(getName()); }
isRequired
56,841
String () { return myParentTagName != null ? myParentTagName + "#" + getName() : super.toString(); }
toString
56,842
boolean () { return true; }
hasIdType
56,843
boolean () { final PsiClass psiClass = getPsiClass(); return psiClass != null && psiClass.isEnum(); }
isEnumerated
56,844
PsiClass () { final PsiClass psiClass = getPsiClass(); return psiClass.isEnum() ? psiClass : null; }
getEnum
56,845
boolean () { return getPsiClass() != null; }
isEnumerated
56,846
PsiClass () { return getPsiClass(); }
getEnum
56,847
boolean (PsiField field) { return field.hasModifierProperty(PsiModifier.STATIC) && field.hasModifierProperty(PsiModifier.FINAL) && field.hasModifierProperty(PsiModifier.PUBLIC); }
isConstant
56,848
PsiType () { if (myStaticMethod != null) { final PsiParameter[] parameters = myStaticMethod.getParameterList().getParameters(); if (parameters.length == 2) { return parameters[1].getType(); } } return null; }
getType
56,849
String () { return myPropertyName; }
getPropertyName
56,850
boolean (final @NotNull ReferencesSearch.SearchParameters queryParameters, final @NotNull Processor<? super PsiReference> consumer) { final PsiElement elementToSearch = queryParameters.getElementToSearch(); if (elementToSearch instanceof PsiField field) { final PsiClass containingClass = ReadAction.compute(() -> field....
execute
56,851
void (final @NotNull XmlAttributeValue value) { final PsiReference reference = value.getReference(); if (reference != null) { final PsiElement resolve = reference.resolve(); if (resolve instanceof XmlAttributeValue) { final PsiElement parent = resolve.getParent(); if (parent instanceof XmlAttribute attribute) { if (Fxm...
visitXmlAttributeValue
56,852
boolean (PsiField field) { return !field.hasModifierProperty(PsiModifier.PUBLIC) && AnnotationUtil.isAnnotated(field, JavaFxCommonNames.JAVAFX_FXML_ANNOTATION, 0); }
needToEnlargeFieldScope
56,853
boolean (PsiMethod method) { final boolean isStatic = method.hasModifierProperty(PsiModifier.STATIC); return isStatic && method.getParameterList().getParametersCount() == 2 && PropertyUtilBase.hasAccessorName(method) && InheritanceUtil.isInheritor(method.getParameterList().getParameters()[0].getType(), JavaFxCommonName...
needToEnlargeMethodScope
56,854
boolean (@NotNull VirtualFile file) { return JavaFxFileTypeFactory.isFxml(file) && super.contains(file); }
contains
56,855
void (final @NotNull PsiElement element, @NotNull AnnotationHolder holder) { final PsiFile containingFile = holder.getCurrentAnnotationSession().getFile(); if (!JavaFxFileTypeFactory.isFxml(containingFile)) return; if (element instanceof XmlAttributeValue) { final String value = ((XmlAttributeValue)element).getValue();...
annotate
56,856
void (final PsiElement element, AnnotationHolder holder, String attributeValueText) { try { Color color = null; if (attributeValueText.startsWith("#")) { color = ColorUtil.fromHex(attributeValueText.substring(1)); } else { final String hexCode = ColorMap.getHexCodeForColorName(StringUtil.toLowerCase(attributeValueText)...
attachColorIcon
56,857
Icon () { return myIcon; }
getIcon
56,858
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; ColorIconRenderer renderer = (ColorIconRenderer)o; if (myElement != null ? !myElement.equals(renderer.myElement) : renderer.myElement != null) return false; return true; }
equals
56,859
int () { return myElement.hashCode(); }
hashCode
56,860
AnAction () { return new AnAction() { @Override public void actionPerformed(@NotNull AnActionEvent e) { final Editor editor = e.getData(CommonDataKeys.EDITOR); if (editor != null) { XmlChooseColorIntentionAction.chooseColor(editor.getComponent(), myElement); } } }; }
getClickAction
56,861
void (@NotNull AnActionEvent e) { final Editor editor = e.getData(CommonDataKeys.EDITOR); if (editor != null) { XmlChooseColorIntentionAction.chooseColor(editor.getComponent(), myElement); } }
actionPerformed
56,862
TextRange () { final TextRange rangeInElement = super.getRangeInElement(); final XmlTag tagElement = getTagElement(); if (tagElement != null) { final String tagElementName = tagElement.getName(); final int dotIdx = tagElementName.indexOf("."); final int startOffset = rangeInElement.getStartOffset(); if (dotIdx > -1 && ...
getRangeInElement
56,863
void (@NotNull JavaFxTagNameReference ref, @NotNull QuickFixActionRegistrar registrar) { XmlTag element = ref.getTagElement(); if (element != null) { registrar.register(new JavaFxImportClassFix(ref, element) { @Override XmlTag getTagElement(@NotNull JavaFxTagNameReference ref) { return ref.getTagElement(); } }); } }
registerFixes
56,864
Class<JavaFxTagNameReference> () { return JavaFxTagNameReference.class; }
getReferenceClass
56,865
void (@NotNull PsiReferenceRegistrar registrar) { final XmlAttributeValuePattern attributeValueInFxml = XmlPatterns.xmlAttributeValue().inVirtualFile( virtualFile().withExtension(JavaFxFileTypeFactory.FXML_EXTENSION)); registrar.registerReferenceProvider(XmlPatterns.xmlAttributeValue().withParent(XmlPatterns.xmlAttribu...
registerReferenceProviders
56,866
PsiElement () { return myReference.getElement(); }
getElement
56,867
TextRange () { return myReference.getRangeInElement(); }
getRangeInElement
56,868
PsiElement () { if (myPosition instanceof XmlTag) { final XmlElementDescriptor descriptor = ((XmlTag)myPosition).getDescriptor(); if (descriptor != null) { final PsiElement declaration = descriptor.getDeclaration(); if (declaration instanceof PsiMethod && ((PsiMethod)declaration).hasModifierProperty(PsiModifier.STATIC)...
getReferencedClass
56,869
String () { return myReference.getCanonicalText(); }
getCanonicalText
56,870
PsiElement (String newText) { if (myPosition instanceof XmlTag) { return ((XmlTag)myPosition).setName(newText); } else { final XmlElementFactory xmlElementFactory = XmlElementFactory.getInstance(myPosition.getProject()); final XmlAttribute xmlAttribute = xmlElementFactory.createXmlAttribute("attributeName", newText); f...
setNewName
56,871
String () { return myPosition instanceof XmlTag ? ((XmlTag)myPosition).getName() : ((XmlAttributeValue)myPosition).getValue(); }
getOldName
56,872
boolean (@NotNull PsiElement element) { return myReference.isReferenceTo(element) || getReferencedClass() == element; }
isReferenceTo
56,873
boolean () { return true; }
isSoft
56,874
boolean () { return true; }
isSoft
56,875
boolean (PsiMethod method) { return method.hasModifierProperty(PsiModifier.STATIC) && method.getParameterList().isEmpty() && !PsiTypes.voidType().equals(method.getReturnType()); }
isFactoryMethod
56,876
String (String value) { return value; }
preprocessValue
56,877
PsiReference[] (@NotNull PsiElement element, String value, final String acceptedExtension) { final PsiDirectory directory = element.getContainingFile().getOriginalFile().getParent(); if (directory == null) return PsiReference.EMPTY_ARRAY; final boolean startsWithSlash = value.startsWith("/"); final FileReferenceSet fil...
getReferences
56,878
Collection<PsiFileSystemItem> () { if (startsWithSlash || !directory.isValid()) { return super.getDefaultContexts(); } return Collections.singletonList(directory); }
getDefaultContexts
56,879
Condition<PsiFileSystemItem> () { return item -> { if (item instanceof PsiDirectory) return true; final VirtualFile virtualFile = PsiUtilCore.getVirtualFile(item); return virtualFile != null && acceptedExtension.equals(virtualFile.getExtension()); }; }
getReferenceCompletionFilter
56,880
boolean (final @NotNull ReferencesSearch.SearchParameters queryParameters, final @NotNull Processor<? super PsiReference> consumer) { final PsiElement elementToSearch = queryParameters.getElementToSearch(); if (elementToSearch instanceof PsiMethod) { searchMethod((PsiMethod)elementToSearch, queryParameters, consumer); ...
execute
56,881
void (@NotNull PsiMethod psiMethod, @NotNull ReferencesSearch.SearchParameters queryParameters, @NotNull Processor<? super PsiReference> consumer) { final Project project = PsiUtilCore.getProjectInReadAction(psiMethod); final SearchScope scope = ReadAction.compute(queryParameters::getEffectiveSearchScope); if (scope in...
searchMethod
56,882
boolean (@NotNull PsiMethod psiMethod, @NotNull PsiFile file, @NotNull Processor<? super PsiReference> consumer) { final Ref<Boolean> stopped = new Ref<>(false); file.accept(new XmlRecursiveElementVisitor() { @Override public void visitXmlElement(@NotNull XmlElement element) { if (stopped.get()) return; super.visitXmlE...
searchMethodInFile
56,883
void (@NotNull XmlElement element) { if (stopped.get()) return; super.visitXmlElement(element); }
visitXmlElement
56,884
void (@NotNull XmlAttribute attribute) { if (stopped.get()) return; final PsiReference[] references = attribute.getReferences(); for (PsiReference reference : references) { if ((reference instanceof JavaFxStaticPropertyReference || reference instanceof JavaFxEventHandlerReference) && reference.isReferenceTo(psiMethod))...
visitXmlAttribute
56,885
boolean (@NotNull PsiMethod psiMethod, @NotNull PsiClass controllerClass) { final PsiClass containingClass = psiMethod.getContainingClass(); if (containingClass != null && CommonClassNames.JAVA_LANG_OBJECT.equals(containingClass.getQualifiedName())) return false; if (!psiMethod.hasModifierProperty(PsiModifier.STATIC)) ...
isHandlerMethodSignature
56,886
TextRange () { final TextRange range = super.getRangeInElement(); return new TextRange(range.getStartOffset() + 1, range.getEndOffset()); }
getRangeInElement
56,887
PsiElement (@NotNull JavaFxTagNameReference reference) { final XmlTag tagElement = getTagElement(reference); return tagElement != null ? tagElement.getNavigationElement() : null; }
getReferenceNameElement
56,888
void (@NotNull PsiReference reference, @NotNull PsiClass targetClass) { final PsiFile file = reference.getElement().getContainingFile(); super.bindReference(reference, targetClass); final String qualifiedName = targetClass.getQualifiedName(); if (qualifiedName != null) { final String shortName = StringUtil.getShortName...
bindReference
56,889
boolean (@NotNull JavaFxTagNameReference reference) { return false; }
hasTypeParameters
56,890
boolean (@NotNull PsiMember member, @NotNull XmlTag referenceElement) { return member instanceof PsiClass && JavaFxPsiUtil.isClassAcceptable(referenceElement.getParentTag(), (PsiClass)member); }
isAccessible
56,891
String (@NotNull XmlTag referenceElement) { final XmlElementDescriptor descriptor = referenceElement.getDescriptor(); return descriptor != null ? descriptor.getQualifiedName() : referenceElement.getName(); }
getQualifiedName
56,892
boolean (@NotNull JavaFxTagNameReference reference) { return false; }
isQualified
56,893
boolean (@NotNull PsiFile psiFile, @NotNull String name) { return false; //todo }
hasUnresolvedImportWhichCanImport
56,894
int (@NotNull XmlTag element, @NotNull JavaFxTagNameReference ref) { return element.getTextOffset() + ref.getRangeInElement().getStartOffset(); }
getStartOffset
56,895
int (@NotNull XmlTag element, @NotNull JavaFxTagNameReference ref) { return element.getTextOffset() + ref.getRangeInElement().getEndOffset(); }
getEndOffset
56,896
boolean (Object element, PsiElement context) { final PsiExpression psiExpression = getParentElement((PsiLiteralExpression)context); if (psiExpression != null) { final PsiType psiType = psiExpression.getType(); return psiType != null && psiType.equalsToText(JavaFxCommonNames.JAVA_FX_PARENT); } return false; }
isAcceptable
56,897
boolean (Class hintClass) { return true; }
isClassAcceptable
56,898
PsiExpression (PsiLiteralExpression context) { PsiMethodCallExpression methodCallExpression = PsiTreeUtil.getParentOfType(context, PsiMethodCallExpression.class); final Object value = context.getValue(); if (value instanceof String && ((String)value).endsWith(".bss")) { final PsiExpressionList addArgumentsList = PsiTre...
getParentElement
56,899
boolean (Object element, PsiElement context) { final PsiLiteralExpression literalExpression = (PsiLiteralExpression)context; PsiMethodCallExpression callExpression = PsiTreeUtil.getParentOfType(literalExpression, PsiMethodCallExpression.class); final PsiCallExpression superCall = PsiTreeUtil.getParentOfType(callExpress...
isAcceptable