Community
Participate
Working Groups
20060209 Similar to core.resources on IResource, should java.core offer propertyTesters on IJavaElement core resources offers: <extension point="org.eclipse.core.expressions.propertyTesters"> <propertyTester id="org.eclipse.core.resources.resourcePropertyTester" class="org.eclipse.core.internal.propertytester.ResourcePropertyTester" namespace="org.eclipse.core.resources" properties="name,path,extension,readOnly,projectNature, persistentProperty,projectPersistentProperty,sessionProperty, projectSessionProperty" type="org.eclipse.core.resources.IResource"/> </extension> Suggestions for properties to test on all IJavaElement: 'name', 'onBuildPath', 'inArchive', 'inSourceFolder', 'projectNatures', 'projectSetting' (= project.getOption, allows to test for source compliance) This also could be split up on elements. But it is more convenient if you can also ask parent properties, e.g. ask a compilation unit on projectNatures IMember isPublic isStatic IType isClass isInterface isEnum isAnnotation isInner isLocal isAnonyomous qualifiedName
I volunteer to provide the implementation. It would be clean if the provider of the propertyTester is in the same plugin as where the elements are defined. But it would also be possible to implement this in core.manipulation.
I released org.eclipse.jdt.internal.core.manipulation.JavaElementPropertyTester to jdt.core.manipulations. For now it is offering the following properties: - name - isOnClasspath - inSourceFolder - inArchive - inExternalArchive - projectOption I still think it would make sense to move this jdt.core, that's where users would look for it.
Should be moved down to JavaElementPropertyTester as properties are not available when plugin is not loaded. org.eclipse.jdt.internal.core.manipulation isn't necessary loaded when Java elements are available -> better provide the properties in jdt.core.