We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a6fca32 commit ee5044cCopy full SHA for ee5044c
tests/org.eclipse.ui.genericeditor.tests/src/org/eclipse/ui/genericeditor/tests/ContextInfoTest.java
@@ -126,11 +126,11 @@ private String getInfoText(final Shell shell) {
126
assertTrue(shell.isVisible());
127
Control[] children= shell.getChildren();
128
for (Control child : children) {
129
- if (child instanceof Text) {
130
- return ((Text) child).getText();
+ if (child instanceof Text text) {
+ return text.getText();
131
}
132
- if (child instanceof StyledText) {
133
- return ((StyledText) child).getText();
+ if (child instanceof StyledText styled) {
+ return styled.getText();
134
135
136
return null;
0 commit comments