Skip to content

Commit

Permalink
AnnotateAssistTest1d8 test failed
Browse files Browse the repository at this point in the history
Assert that the java element is child of a classfile

debugging eclipse-jdt#736
  • Loading branch information
stephan-herrmann committed Jul 9, 2024
1 parent 4a918e9 commit cdf4e78
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import static org.eclipse.jdt.core.IClasspathAttribute.EXTERNAL_ANNOTATION_PATH;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;

import java.io.ByteArrayOutputStream;
import java.io.File;
Expand Down Expand Up @@ -97,6 +98,7 @@ static JavaEditor openInClassfileEditor(IJavaElement element, boolean activate,
if (!(element instanceof ISourceReference)) {
return null;
}
assertNotNull("Should be child of a classfile: "+element, element.getAncestor(IJavaElement.CLASS_FILE));
IEditorPart part= EditorUtility.openInSpecificEditor(element, JavaUI.ID_CF_EDITOR, activate);
if (reveal && part != null) {
EditorUtility.revealInEditor(part, element);
Expand Down

0 comments on commit cdf4e78

Please sign in to comment.