} else if (element instanceof IClassFile) { final IClassFile classFile = (IClassFile) element; final org.eclipse.jdt.core.IType eclipseType = classFile.findPrimaryType(); if (eclipseType != null) { final String qualifiedName = eclipseType.getFullyQualifiedName();
public IResource getBreakpointResource(IEditorInput input) throws CoreException { Object adapter = input.getAdapter(IResource.class); if (adapter != null) return (IResource) adapter; if (input instanceof IStorageEditorInput) { IStorage storage = ((IStorageEditorInput) input).getStorage(); if (storage instanceof IResource) return (IResource) storage; if (storage instanceof IJarEntryResource) { IResource underlyingResource = ((IJarEntryResource) storage).getPackageFragmentRoot().getUnderlyingResource(); if (underlyingResource != null) return underlyingResource; } } else if (input instanceof IClassFileEditorInput) { IClassFile classFile = ((IClassFileEditorInput) input).getClassFile(); return getBreakpointResource(classFile.findPrimaryType()); } return ResourcesPlugin.getWorkspace().getRoot(); }
final IPackageFragment packageFragment = (IPackageFragment) javaElement; for (final IClassFile classFile : packageFragment.getClassFiles()) { final org.eclipse.jdt.core.IType eclipseType = classFile.findPrimaryType(); final String fullyQualifiedName = eclipseType.getFullyQualifiedName(); if (Objects.equals(type.getPath().getIdentifier(), fullyQualifiedName)) {
classType = ((IClassFile)types[i]).findPrimaryType();