Skip to content

Commit 42dc611

Browse files
HeikoKlarejukzi
authored andcommitted
Asynchronously decorate quick outline view via DecorationManager eclipse-jdt#1922
The Quick Outline View currently applies (i.e., calculates and draws) decorations for override indicators synchronously. In case the calculation of the indicator takes long, it blocks the UI. The ordinary Outline View defers the responsibility of calculating and applying decorations to the DecorationManager. This ensures that (1) that task is performed asynchronously via a dedicated job and (2) that the decoration manager takes care of the current user configuration (i.e., whether those indicators shall be shown or not), which the Quick Outline View currently replicates. With this change, the Quick Outline View uses the same label decorator as the ordinary Outline View, which makes the DecorationManager process the override label decorator asynchronously instead of applying it synchronously. Contributes to eclipse-jdt#1922
1 parent 0f60ce5 commit 42dc611

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/JavaOutlineInformationControl.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
import org.eclipse.jface.viewers.Viewer;
5353
import org.eclipse.jface.viewers.ViewerFilter;
5454

55-
import org.eclipse.ui.IDecoratorManager;
5655
import org.eclipse.ui.IEditorPart;
5756
import org.eclipse.ui.IWorkbenchPage;
5857
import org.eclipse.ui.PlatformUI;
@@ -73,7 +72,6 @@
7372
import org.eclipse.jdt.internal.corext.util.SuperTypeHierarchyCache;
7473

7574
import org.eclipse.jdt.ui.JavaElementLabels;
76-
import org.eclipse.jdt.ui.OverrideIndicatorLabelDecorator;
7775
import org.eclipse.jdt.ui.ProblemsLabelDecorator;
7876
import org.eclipse.jdt.ui.StandardJavaElementContentProvider;
7977

@@ -85,7 +83,7 @@
8583
import org.eclipse.jdt.internal.ui.typehierarchy.AbstractHierarchyViewerSorter;
8684
import org.eclipse.jdt.internal.ui.viewsupport.AppearanceAwareLabelProvider;
8785
import org.eclipse.jdt.internal.ui.viewsupport.ColoredViewersManager;
88-
import org.eclipse.jdt.internal.ui.viewsupport.ColoringLabelProvider;
86+
import org.eclipse.jdt.internal.ui.viewsupport.DecoratingJavaLabelProvider;
8987
import org.eclipse.jdt.internal.ui.viewsupport.FocusDescriptor;
9088
import org.eclipse.jdt.internal.ui.viewsupport.MemberFilter;
9189

@@ -584,11 +582,7 @@ protected TreeViewer createTreeViewer(Composite parent, int style) {
584582

585583
fInnerLabelProvider= new OutlineLabelProvider();
586584
fInnerLabelProvider.addLabelDecorator(new ProblemsLabelDecorator(null));
587-
IDecoratorManager decoratorMgr= PlatformUI.getWorkbench().getDecoratorManager();
588-
if (decoratorMgr.getEnabled("org.eclipse.jdt.ui.override.decorator")) //$NON-NLS-1$
589-
fInnerLabelProvider.addLabelDecorator(new OverrideIndicatorLabelDecorator(null));
590-
591-
treeViewer.setLabelProvider(new ColoringLabelProvider(fInnerLabelProvider));
585+
treeViewer.setLabelProvider(new DecoratingJavaLabelProvider(fInnerLabelProvider));
592586

593587
fLexicalSortingAction= new LexicalSortingAction(treeViewer);
594588
fSortByDefiningTypeAction= new SortByDefiningTypeAction(treeViewer);

0 commit comments

Comments
 (0)