return path != null && path.segmentCount() > 1 && path.toFile().exists();
}
private static String[] createPluginClassPath(IJavaProject javaProject) throws CoreException {
String[] javaClassPath = createJavaClasspath(javaProject);
IPluginModelBase model = PluginRegistry.findModel(javaProject.getProject());
if (model == null || model.getPluginBase().getId() == null) {
return javaClassPath;
}
List<String> pdeClassPath = new ArrayList<String>();
pdeClassPath.addAll(Arrays.asList(javaClassPath));
BundleDescription target = model.getBundleDescription();
Set<BundleDescription> bundles = new HashSet<BundleDescription>();
// target is null if plugin uses non OSGI format
if (target != null) {
addDependentBundles(target, bundles);