Community
Participate
Working Groups
isBinary in org.eclipse.jdt.internal.core.Initializer is always false, regardless of whether the type in which it is declared is a SourceType or BinaryType. This fact can cause problems elsewhere if it's necessary to determine whether an IJavaElement can be manipulated (even though it's not binary (as of isBinary) it returns null from getCompilationUnit).
Initializers (instance or static) do not exist in classfiles, these are artifacts declared in source, and then inlined into constructors or clinit method. What are you looking for exactly ? Initializers should be able to find their defining compilation unit though. Is this what you are arguing about ?
I see your point. My concrete problem is a problem with JDT UI. org.eclipse.jdt.internal.ui.reorg.SourceReferenceAction.isDeletedFromEditor(ISourceReference) fails when the IJavaElement is an initializer from a class file. I will file a bug report against JDT UI instead. Thanks for your comments.