Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.eclipse.ui.internal.decorators.DecorationResult;
import org.eclipse.ui.internal.decorators.DecoratorManager;
import org.eclipse.ui.internal.decorators.LightweightDecoratorManager;
import org.eclipse.ui.tests.harness.util.UITestUtil;
import org.eclipse.ui.tests.menus.ObjectContributionClasses;
import org.junit.After;
import org.junit.Before;
Expand Down Expand Up @@ -63,6 +64,10 @@ public void doSetUp() throws Exception {
PlatformUI.getWorkbench().getDecoratorManager().setEnabled(TestUnadaptableDecoratorContributor.ID, true);
PlatformUI.getWorkbench().getDecoratorManager().setEnabled(TestResourceDecoratorContributor.ID, true);
PlatformUI.getWorkbench().getDecoratorManager().setEnabled(TestResourceMappingDecoratorContributor.ID, true);

// Process all pending UI events to ensure decorator enablement has completed
// This prevents race conditions where decorators may not be fully registered yet
UITestUtil.processEvents();
}

@After
Expand All @@ -71,6 +76,9 @@ public void doTearDown() throws Exception {
PlatformUI.getWorkbench().getDecoratorManager().setEnabled(TestUnadaptableDecoratorContributor.ID, false);
PlatformUI.getWorkbench().getDecoratorManager().setEnabled(TestResourceDecoratorContributor.ID, false);
PlatformUI.getWorkbench().getDecoratorManager().setEnabled(TestResourceMappingDecoratorContributor.ID, false);

// Process all pending UI events to ensure clean state for next test
UITestUtil.processEvents();
}

/**
Expand Down
Loading