Skip to content
Closed
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion tests/org.eclipse.ui.tests.navigator/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Require-Bundle: org.eclipse.core.resources,
org.eclipse.ui.navigator.resources,
org.eclipse.ui.tests.harness,
org.eclipse.ui.editors,
org.eclipse.jdt.ui,
org.eclipse.ui.genericeditor
Bundle-Vendor: Eclipse.org
Bundle-RequiredExecutionEnvironment: JavaSE-17
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,20 @@ public PipelineTest() {
@Test
public void testNavigatorResourceJava() throws Exception {

String[] exts = { COMMON_NAVIGATOR_RESOURCE_EXT, COMMON_NAVIGATOR_JAVA_EXT };
assertEquals(
"There should be no visible extensions for the pipeline viewer.",
0, _contentService.getVisibleExtensionIds().length);

_contentService.bindExtensions(new String[] {
COMMON_NAVIGATOR_RESOURCE_EXT, COMMON_NAVIGATOR_JAVA_EXT },
false);
_contentService.bindExtensions(exts, false);

// Note this test will fail showing only one if the JDT stuff
// is not included in the executing bundles (which it normally is)
assertEquals(
"There should be two visible extensions for the pipeline viewer.",
2, _contentService.getVisibleExtensionIds().length);

_contentService.getActivationService().activateExtensions(
new String[] { COMMON_NAVIGATOR_RESOURCE_EXT,
COMMON_NAVIGATOR_JAVA_EXT }, true);
_contentService.getActivationService().activateExtensions(exts, true);

refreshViewer();

Expand Down Expand Up @@ -100,8 +97,7 @@ public void testNavigatorResourceJava() throws Exception {

boolean found = false;
for (int i = 0; i < rootItems.length && !found; i++) {
if (rootItems[i].getData() instanceof IProject) {
IProject newProjectFromTree = (IProject) rootItems[i].getData();
if (rootItems[i].getData() instanceof IProject newProjectFromTree) {
if (newProject.equals(newProjectFromTree))
found = true;
}
Expand All @@ -112,12 +108,9 @@ public void testNavigatorResourceJava() throws Exception {
// Make sure problems in bad extension points are reported well
@Test
public void testInterceptAddThrow() throws Exception {
_contentService.bindExtensions(new String[] {
COMMON_NAVIGATOR_RESOURCE_EXT, TEST_CONTENT_RESOURCE_OVERRIDE},
false);
_contentService.getActivationService().activateExtensions(
new String[] { COMMON_NAVIGATOR_RESOURCE_EXT,
TEST_CONTENT_RESOURCE_OVERRIDE }, true);
String[] exts = { COMMON_NAVIGATOR_RESOURCE_EXT, TEST_CONTENT_RESOURCE_OVERRIDE };
_contentService.bindExtensions(exts, false);
_contentService.getActivationService().activateExtensions(exts, true);

refreshViewer();

Expand All @@ -137,12 +130,9 @@ public void testInterceptAddThrow() throws Exception {

private void testHasNoChildrenOverride(boolean hasChildren) throws Exception {
TestContentProviderNoChildren._hasChildrenTrue = hasChildren;
_contentService.bindExtensions(new String[] {
COMMON_NAVIGATOR_RESOURCE_EXT, TEST_CONTENT_NO_CHILDREN},
false);
_contentService.getActivationService().activateExtensions(
new String[] { COMMON_NAVIGATOR_RESOURCE_EXT,
TEST_CONTENT_NO_CHILDREN }, true);
String[] exts = { COMMON_NAVIGATOR_RESOURCE_EXT, TEST_CONTENT_NO_CHILDREN };
_contentService.bindExtensions(exts, false);
_contentService.getActivationService().activateExtensions(exts, true);

refreshViewer();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,15 @@ public void setUp() {
*/
@Test
public void testJstPipeline() throws Exception {

_contentService.bindExtensions(
new String[] { COMMON_NAVIGATOR_RESOURCE_EXT, COMMON_NAVIGATOR_JAVA_EXT, TEST_CONTENT_JST }, false);
String[] exts = { COMMON_NAVIGATOR_RESOURCE_EXT, COMMON_NAVIGATOR_JAVA_EXT, TEST_CONTENT_JST };
_contentService.bindExtensions(exts, false);

// Note this test will fail showing only one if the JDT stuff
// is not included in the executing bundles (which it normally is)
assertEquals("There should be 3 visible extensions for the pipeline viewer.", 3,
_contentService.getVisibleExtensionIds().length);

_contentService.getActivationService().activateExtensions(
new String[] { COMMON_NAVIGATOR_RESOURCE_EXT, COMMON_NAVIGATOR_JAVA_EXT, TEST_CONTENT_JST }, true);
_contentService.getActivationService().activateExtensions(exts, true);

refreshViewer();

Expand Down
Loading