Skip to content

Commit

Permalink
Automatically Expand Paths of single children #1063
Browse files Browse the repository at this point in the history
In these cases, I expect all folders to open recursively
when clicking on com.wittmaxi.plugin

com.wittmaxi.plugin
 └─src
    └─org.foo.com
       └─Bar.java

A new feature in SWT allows for this feature, this PR enables that
feature in the Package Explorer.

Implements
eclipse-platform/eclipse.platform.ui#1063
  • Loading branch information
Maximilian Wittmer authored and Maximilian Wittmer committed Mar 21, 2024
1 parent c7ecdca commit 469907f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ private class PackageExplorerProblemTreeViewer extends ProblemTreeViewer {
public PackageExplorerProblemTreeViewer(Composite parent, int style) {
super(parent, style);
fPendingRefreshes= Collections.synchronizedList(new ArrayList<>());
setAutoExpandOnSingleChildLevels(ALL_LEVELS);
}
@Override
public void add(Object parentElement, Object... childElements) {
Expand Down Expand Up @@ -576,7 +577,7 @@ private void initFrameActions() {
}

private ProblemTreeViewer createViewer(Composite composite) {
return new PackageExplorerProblemTreeViewer(composite, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
new PackageExplorerProblemTreeViewer(composite, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
}

/**
Expand Down

0 comments on commit 469907f

Please sign in to comment.