Community
Participate
Working Groups
I have a problem with getFullyQualifiedName() method on binary types (class files) The returned value does not have any package information. It is simply the type name. Eclipse 2.0
This is the source for the method: String packageName = getPackageFragment().getElementName(); if (packageName.equals(IPackageFragment.DEFAULT_PACKAGE_NAME)) return getTypeQualifiedName(enclosingTypeSeparator); return packageName + '.' + getTypeQualifiedName(enclosingTypeSeparator); Are you see this for every binary type or just a few? Are they from different packages?
the problems is with the getPackageFragment().getElementName() method. it always returns the default package. I should have noted, that I work with classes from the output folder. Genady
The output folder isn't part of the JavaModel, which rather accounts for the elements reachable from the classpath description. You cannot navigate from a Java project to elements inside the output folder, though you can manually create handles onto them (as you can on units outside the classpath as well), but then little is operational on these. Why are you manipulating classfiles inside the output folder, rather than their corresponding sources ?
Units outside the classpath are all rooted in a fake package fragment root accounting for their immediate container, and inside a default package. This minimalistic approach is only here to allow to open a Java editor on such files, but nothing more than that. Clearly, these elements do not belong to the JavaModel, and if it wasn't for the Java editor, they should not even be created.
Ok to close ?
ok
Closing, working as designed.