if (resource == null) continue;
	protected int countSelectedElements() {		int count= 0;		int n= fJarPackage.getElements().length;		for (int i= 0; i < n; i++) {			Object element= fJarPackage.getElements()[i];			IResource resource= null;			if (element instanceof IJavaElement) {				IJavaElement je= (IJavaElement)element;				try {					resource= je.getUnderlyingResource();				} catch (JavaModelException ex) {					continue;				}			}			else				resource= (IResource)element;			if (resource.getType() == IResource.FILE)				count++;			else				count += getTotalChildCount((IContainer)resource);		}		return count;	}