* Returns a corresponding instance of <code>IPropertySource</code> for
* the given <code>IModelElement</code> or null.
*/
public static IPropertySource getPropertySource(IModelElement element) {
if (element instanceof IBeansProject) {
return new ResourcePropertySource(((IBeansProject) element)
.getProject());
}
else if (element instanceof IBeansConfig) {
IFile file = (IFile) ((IBeansConfig) element).getElementResource();
if (file != null && file.exists()) {