Skip to content

Commit

Permalink
CSS Spy: fix NPE in WidgetTreeProvider eclipse-pde#1381
Browse files Browse the repository at this point in the history
for items that can not be styled with CSS

eclipse-pde#1381
  • Loading branch information
EcljpseB0T authored and jukzi committed Sep 5, 2024
1 parent 6506ee6 commit d8e6716
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion features/org.eclipse.pde.spies-feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<feature
id="org.eclipse.pde.spies"
label="%featureName"
version="1.0.400.qualifier"
version="1.0.500.qualifier"
provider-name="%providerName"
license-feature="org.eclipse.license"
license-feature-version="0.0.0">
Expand Down
2 changes: 1 addition & 1 deletion ui/org.eclipse.pde.spy.css/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %name
Bundle-SymbolicName: org.eclipse.pde.spy.css;singleton:=true
Bundle-Version: 0.13.400.qualifier
Bundle-Version: 0.13.500.qualifier
Automatic-Module-Name: org.eclipse.pde.spy.css
Bundle-RequiredExecutionEnvironment: JavaSE-17
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.29.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ public Object[] getChildren(Object parentElement) {
NodeList kids = element.getChildNodes();
ArrayList<Object> children = new ArrayList<>(kids.getLength());
for (int i = 0; i < kids.getLength(); i++) {
children.add(((CSSStylableElement) kids.item(i)).getNativeWidget());
if (kids.item(i) instanceof CSSStylableElement kid) {
children.add(kid.getNativeWidget());
}
}
return children.toArray();
}
Expand Down

0 comments on commit d8e6716

Please sign in to comment.