Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not expand same class twice in (quick) type hierarchy #1954

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fedejeanne
Copy link
Contributor

Fixes #1830

How to test

Expand an interface from here:

class ReproducerRedundantTypeHierarchy {

	interface I0 {}
	interface I1 extends I0 {}
	interface I2 extends I1, I0 {}
	interface I3 extends I2, I1 {}
	interface I4 extends I3, I2 {}
	interface I5 extends I4, I3 {}
	interface I6 extends I5, I4 {}
}

The (Quick) Type Hierarchy should not expand the same interface twice

image


image

Author checklist

@fedejeanne
Copy link
Contributor Author

@jukzi this time without any required changes in AbstractTreeViewer

@fedejeanne
Copy link
Contributor Author

I'll leave it as "Draft" until the tests pass.

Runnable runnable= () -> JavaCore.runReadOnly(() -> getCurrentViewer().updateContent(doExpand));
Runnable runnable= () -> JavaCore.runReadOnly(() -> {
TypeHierarchyViewer viewer= getCurrentViewer();
viewer.preUpdateContent();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its cool that you made it without new API. Wouldn' it be better to overload TypeHierarchyViewer.updateContent() such that you don't need to spread the implementation detail across several files?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Slow (Quick-)Type hierarchy for large trees.
2 participants