From 2eadb020d02ab7b751d55793e9a02e4626c3b638 Mon Sep 17 00:00:00 2001 From: Heiko Klare Date: Thu, 30 Nov 2023 15:58:01 +0100 Subject: [PATCH] Move plugin constants from ResourceTest to utility class #903 This change moves the constants and related methods referring to extensions of resources test plugin from the ResourceTest class to a separate utility class. It prepares for removing the JUnit 3 inheritance hierarchy of ResourceTest to migrate to JUnit 4. Contributes to https://github.com/eclipse-platform/eclipse.platform/issues/903 --- .../internal/builders/BuilderNatureTest.java | 3 +- .../builders/ParallelBuildChainTest.java | 1 + .../filesystem/wrapper/WrapperFileSystem.java | 5 +- .../properties/PropertyManagerTest.java | 1 + .../core/tests/resources/IProjectTest.java | 3 + .../IResourceChangeListenerTest.java | 2 + .../tests/resources/ISynchronizerTest.java | 1 + .../core/tests/resources/IWorkspaceTest.java | 13 +++ .../tests/resources/LinkedDotProjectTest.java | 4 +- .../tests/resources/LinkedResourceTest.java | 1 + .../core/tests/resources/NatureTest.java | 8 ++ .../core/tests/resources/ResourceTest.java | 61 +------------- .../ResourceTestPluginConstants.java | 81 +++++++++++++++++++ .../perf/PropertyManagerPerformanceTest.java | 2 + .../resources/regression/Bug_029116.java | 2 + .../resources/regression/Bug_297635.java | 1 + .../resources/regression/Bug_378156.java | 2 + .../tests/resources/session/Bug_266907.java | 1 + .../tests/resources/session/TestBug93473.java | 2 + .../resources/session/TestMissingBuilder.java | 3 + 20 files changed, 133 insertions(+), 64 deletions(-) create mode 100644 resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/ResourceTestPluginConstants.java diff --git a/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/internal/builders/BuilderNatureTest.java b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/internal/builders/BuilderNatureTest.java index 0401e0460a4..c8a244593e6 100644 --- a/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/internal/builders/BuilderNatureTest.java +++ b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/internal/builders/BuilderNatureTest.java @@ -13,7 +13,8 @@ *******************************************************************************/ package org.eclipse.core.tests.internal.builders; - +import static org.eclipse.core.tests.resources.ResourceTestPluginConstants.NATURE_SNOW; +import static org.eclipse.core.tests.resources.ResourceTestPluginConstants.NATURE_WATER; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.not; diff --git a/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/internal/builders/ParallelBuildChainTest.java b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/internal/builders/ParallelBuildChainTest.java index 17efee6a985..6c671c36a91 100644 --- a/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/internal/builders/ParallelBuildChainTest.java +++ b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/internal/builders/ParallelBuildChainTest.java @@ -13,6 +13,7 @@ *******************************************************************************/ package org.eclipse.core.tests.internal.builders; +import static org.eclipse.core.tests.resources.ResourceTestPluginConstants.PI_RESOURCES_TESTS; import static org.eclipse.core.tests.resources.TestUtil.waitForCondition; import static org.hamcrest.CoreMatchers.not; import static org.hamcrest.MatcherAssert.assertThat; diff --git a/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/internal/filesystem/wrapper/WrapperFileSystem.java b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/internal/filesystem/wrapper/WrapperFileSystem.java index 518869515d9..7dcc9aa037d 100644 --- a/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/internal/filesystem/wrapper/WrapperFileSystem.java +++ b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/internal/filesystem/wrapper/WrapperFileSystem.java @@ -14,6 +14,8 @@ *******************************************************************************/ package org.eclipse.core.tests.internal.filesystem.wrapper; +import static org.eclipse.core.tests.resources.ResourceTestPluginConstants.PI_RESOURCES_TESTS; + import java.net.URI; import java.net.URISyntaxException; import org.eclipse.core.filesystem.EFS; @@ -23,7 +25,6 @@ import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.core.tests.harness.CoreTest; -import org.eclipse.core.tests.resources.ResourceTest; /** * A simple file system implementation that acts as a wrapper around the @@ -92,7 +93,7 @@ public IFileStore getStore(URI uri) { try { baseStore = EFS.getStore(getBasicURI(uri)); } catch (CoreException e) { - CoreTest.log(ResourceTest.PI_RESOURCES_TESTS, e); + CoreTest.log(PI_RESOURCES_TESTS, e); return NULL_ROOT; } return WrapperFileStore.newInstance(customFS, baseStore); diff --git a/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/internal/properties/PropertyManagerTest.java b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/internal/properties/PropertyManagerTest.java index b0f06e23e2d..0ddba8a4dc7 100644 --- a/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/internal/properties/PropertyManagerTest.java +++ b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/internal/properties/PropertyManagerTest.java @@ -14,6 +14,7 @@ *******************************************************************************/ package org.eclipse.core.tests.internal.properties; +import static org.eclipse.core.tests.resources.ResourceTestPluginConstants.PI_RESOURCES_TESTS; import static org.junit.Assert.assertNotEquals; import java.nio.charset.StandardCharsets; diff --git a/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/IProjectTest.java b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/IProjectTest.java index 500f0c4c70f..6955ae80df5 100644 --- a/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/IProjectTest.java +++ b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/IProjectTest.java @@ -14,6 +14,9 @@ *******************************************************************************/ package org.eclipse.core.tests.resources; +import static org.eclipse.core.tests.resources.ResourceTestPluginConstants.NATURE_EARTH; +import static org.eclipse.core.tests.resources.ResourceTestPluginConstants.NATURE_MISSING; +import static org.eclipse.core.tests.resources.ResourceTestPluginConstants.NATURE_SIMPLE; import static org.junit.Assert.assertThrows; import java.io.ByteArrayInputStream; diff --git a/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/IResourceChangeListenerTest.java b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/IResourceChangeListenerTest.java index f55529f9540..ff50adc4ef9 100644 --- a/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/IResourceChangeListenerTest.java +++ b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/IResourceChangeListenerTest.java @@ -14,6 +14,8 @@ ******************************************************************************/ package org.eclipse.core.tests.resources; +import static org.eclipse.core.tests.resources.ResourceTestPluginConstants.NATURE_SIMPLE; + import java.io.ByteArrayInputStream; import java.io.IOException; import java.util.Dictionary; diff --git a/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/ISynchronizerTest.java b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/ISynchronizerTest.java index 2fe83fe40b1..36f972f2840 100644 --- a/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/ISynchronizerTest.java +++ b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/ISynchronizerTest.java @@ -14,6 +14,7 @@ *******************************************************************************/ package org.eclipse.core.tests.resources; +import static org.eclipse.core.tests.resources.ResourceTestPluginConstants.PI_RESOURCES_TESTS; import static org.junit.Assert.assertThrows; import java.io.DataInputStream; diff --git a/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/IWorkspaceTest.java b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/IWorkspaceTest.java index c001998fd88..42df72926b6 100644 --- a/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/IWorkspaceTest.java +++ b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/IWorkspaceTest.java @@ -14,6 +14,19 @@ *******************************************************************************/ package org.eclipse.core.tests.resources; +import static org.eclipse.core.tests.resources.ResourceTestPluginConstants.NATURE_CYCLE1; +import static org.eclipse.core.tests.resources.ResourceTestPluginConstants.NATURE_CYCLE2; +import static org.eclipse.core.tests.resources.ResourceTestPluginConstants.NATURE_CYCLE3; +import static org.eclipse.core.tests.resources.ResourceTestPluginConstants.NATURE_EARTH; +import static org.eclipse.core.tests.resources.ResourceTestPluginConstants.NATURE_INVALID; +import static org.eclipse.core.tests.resources.ResourceTestPluginConstants.NATURE_MUD; +import static org.eclipse.core.tests.resources.ResourceTestPluginConstants.NATURE_SIMPLE; +import static org.eclipse.core.tests.resources.ResourceTestPluginConstants.NATURE_SNOW; +import static org.eclipse.core.tests.resources.ResourceTestPluginConstants.NATURE_WATER; +import static org.eclipse.core.tests.resources.ResourceTestPluginConstants.SET_OTHER; +import static org.eclipse.core.tests.resources.ResourceTestPluginConstants.SET_STATE; +import static org.eclipse.core.tests.resources.ResourceTestPluginConstants.getInvalidNatureSets; +import static org.eclipse.core.tests.resources.ResourceTestPluginConstants.getValidNatureSets; import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertThrows; diff --git a/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/LinkedDotProjectTest.java b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/LinkedDotProjectTest.java index 1ddb0c832d9..7bf95bc2329 100644 --- a/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/LinkedDotProjectTest.java +++ b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/LinkedDotProjectTest.java @@ -10,12 +10,14 @@ ******************************************************************************/ package org.eclipse.core.tests.resources; +import static org.eclipse.core.tests.resources.ResourceTestPluginConstants.NATURE_EARTH; +import static org.eclipse.core.tests.resources.ResourceTestPluginConstants.NATURE_MISSING; +import static org.eclipse.core.tests.resources.ResourceTestPluginConstants.NATURE_SIMPLE; import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertThrows; import java.io.File; import java.nio.file.Files; - import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProjectDescription; diff --git a/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/LinkedResourceTest.java b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/LinkedResourceTest.java index 910854e163f..6a3a30130e0 100644 --- a/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/LinkedResourceTest.java +++ b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/LinkedResourceTest.java @@ -14,6 +14,7 @@ *******************************************************************************/ package org.eclipse.core.tests.resources; +import static org.eclipse.core.tests.resources.ResourceTestPluginConstants.NATURE_SIMPLE; import static org.junit.Assert.assertThrows; import java.io.BufferedInputStream; diff --git a/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/NatureTest.java b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/NatureTest.java index d1aac349f72..1086f3d2f6d 100644 --- a/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/NatureTest.java +++ b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/NatureTest.java @@ -13,6 +13,14 @@ *******************************************************************************/ package org.eclipse.core.tests.resources; +import static org.eclipse.core.tests.resources.ResourceTestPluginConstants.NATURE_127562; +import static org.eclipse.core.tests.resources.ResourceTestPluginConstants.NATURE_EARTH; +import static org.eclipse.core.tests.resources.ResourceTestPluginConstants.NATURE_MISSING; +import static org.eclipse.core.tests.resources.ResourceTestPluginConstants.NATURE_SIMPLE; +import static org.eclipse.core.tests.resources.ResourceTestPluginConstants.NATURE_SNOW; +import static org.eclipse.core.tests.resources.ResourceTestPluginConstants.NATURE_WATER; +import static org.eclipse.core.tests.resources.ResourceTestPluginConstants.getInvalidNatureSets; +import static org.eclipse.core.tests.resources.ResourceTestPluginConstants.getValidNatureSets; import static org.junit.Assert.assertThrows; import java.io.ByteArrayInputStream; diff --git a/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/ResourceTest.java b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/ResourceTest.java index 2227ccaad93..67d38b385c4 100644 --- a/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/ResourceTest.java +++ b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/ResourceTest.java @@ -14,6 +14,7 @@ *******************************************************************************/ package org.eclipse.core.tests.resources; +import static org.eclipse.core.tests.resources.ResourceTestPluginConstants.PI_RESOURCES_TESTS; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.not; @@ -73,40 +74,6 @@ * Superclass for tests that use the Eclipse Platform workspace. */ public abstract class ResourceTest extends CoreTest { - //nature that installs and runs a builder (regression test for bug 29116) - protected static final String NATURE_29116 = "org.eclipse.core.tests.resources.nature29116"; - - //cycle1 requires: cycle2 - protected static final String NATURE_CYCLE1 = "org.eclipse.core.tests.resources.cycle1"; - //cycle2 requires: cycle3 - protected static final String NATURE_CYCLE2 = "org.eclipse.core.tests.resources.cycle2"; - - //constants for nature ids - - //cycle3 requires: cycle1 - protected static final String NATURE_CYCLE3 = "org.eclipse.core.tests.resources.cycle3"; - //earthNature, one-of: stateSet - protected static final String NATURE_EARTH = "org.eclipse.core.tests.resources.earthNature"; - //invalidNature - protected static final String NATURE_INVALID = "org.eclipse.core.tests.resources.invalidNature"; - //missing nature - protected static final String NATURE_MISSING = "no.such.nature.Missing"; - //missing pre-req nature - protected static final String NATURE_MISSING_PREREQ = "org.eclipse.core.tests.resources.missingPrerequisiteNature"; - //mudNature, requires: waterNature, earthNature, one-of: otherSet - protected static final String NATURE_MUD = "org.eclipse.core.tests.resources.mudNature"; - //simpleNature - protected static final String NATURE_SIMPLE = "org.eclipse.core.tests.resources.simpleNature"; - //nature for regression tests of bug 127562 - protected static final String NATURE_127562 = "org.eclipse.core.tests.resources.bug127562Nature"; - //snowNature, requires: waterNature, one-of: otherSet - protected static final String NATURE_SNOW = "org.eclipse.core.tests.resources.snowNature"; - //waterNature, one-of: stateSet - protected static final String NATURE_WATER = "org.eclipse.core.tests.resources.waterNature"; - public static final String PI_RESOURCES_TESTS = "org.eclipse.core.tests.resources"; //$NON-NLS-1$ - protected static final String SET_OTHER = "org.eclipse.core.tests.resources.otherSet"; - //constants for nature sets - protected static final String SET_STATE = "org.eclipse.core.tests.resources.stateSet"; /** * For retrieving the test name when executing test class with JUnit 4. @@ -834,25 +801,6 @@ protected String getClassName() { return fullClassName.substring(fullClassName.lastIndexOf('.') + 1); } - /** - * Returns invalid sets of natures - */ - protected String[][] getInvalidNatureSets() { - return new String[][] {{NATURE_SNOW}, //missing water pre-req - {NATURE_WATER, NATURE_EARTH}, //duplicates from state-set - {NATURE_WATER, NATURE_MUD}, //missing earth pre-req - {NATURE_WATER, NATURE_EARTH, NATURE_MUD}, //duplicates from state-set - {NATURE_SIMPLE, NATURE_SNOW, NATURE_WATER, NATURE_MUD}, //duplicates from other-set, missing pre-req - {NATURE_MISSING}, //doesn't exist - {NATURE_SIMPLE, NATURE_MISSING}, //missing doesn't exist - {NATURE_MISSING_PREREQ}, //requires nature that doesn't exist - {NATURE_SIMPLE, NATURE_MISSING_PREREQ}, //requires nature that doesn't exist - {NATURE_CYCLE1}, //missing pre-req - {NATURE_CYCLE2, NATURE_CYCLE3}, //missing pre-req - {NATURE_CYCLE1, NATURE_SIMPLE, NATURE_CYCLE2, NATURE_CYCLE3}, //cycle - }; - } - protected String getLineSeparatorFromFile(IFile file) { if (file.exists()) { InputStream input = null; @@ -919,13 +867,6 @@ public String getUniqueString() { return new UniversalUniqueIdentifier().toString(); } - /** - * Returns valid sets of natures - */ - protected String[][] getValidNatureSets() { - return new String[][] {{}, {NATURE_SIMPLE}, {NATURE_SNOW, NATURE_WATER}, {NATURE_EARTH}, {NATURE_WATER, NATURE_SIMPLE, NATURE_SNOW},}; - } - /** * Checks whether the local file system supports accessing and modifying * the given attribute. diff --git a/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/ResourceTestPluginConstants.java b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/ResourceTestPluginConstants.java new file mode 100644 index 00000000000..b7329c0c944 --- /dev/null +++ b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/ResourceTestPluginConstants.java @@ -0,0 +1,81 @@ +/******************************************************************************* + * Copyright (c) 2023 Vector Informatik GmbH and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + *******************************************************************************/ +package org.eclipse.core.tests.resources; + +/** + * A utility class representing information about the extensions defined in this + * test project. + */ +public final class ResourceTestPluginConstants { + public static final String PI_RESOURCES_TESTS = "org.eclipse.core.tests.resources"; //$NON-NLS-1$ + + // nature that installs and runs a builder (regression test for bug 29116) + public static final String NATURE_29116 = "org.eclipse.core.tests.resources.nature29116"; + // cycle1 requires: cycle2 + public static final String NATURE_CYCLE1 = "org.eclipse.core.tests.resources.cycle1"; + // cycle2 requires: cycle3 + public static final String NATURE_CYCLE2 = "org.eclipse.core.tests.resources.cycle2"; + // cycle3 requires: cycle1 + public static final String NATURE_CYCLE3 = "org.eclipse.core.tests.resources.cycle3"; + // earthNature, one-of: stateSet + public static final String NATURE_EARTH = "org.eclipse.core.tests.resources.earthNature"; + // invalidNature + public static final String NATURE_INVALID = "org.eclipse.core.tests.resources.invalidNature"; + // missing nature + public static final String NATURE_MISSING = "no.such.nature.Missing"; + // missing pre-req nature + public static final String NATURE_MISSING_PREREQ = "org.eclipse.core.tests.resources.missingPrerequisiteNature"; + // mudNature, requires: waterNature, earthNature, one-of: otherSet + public static final String NATURE_MUD = "org.eclipse.core.tests.resources.mudNature"; + // simpleNature + public static final String NATURE_SIMPLE = "org.eclipse.core.tests.resources.simpleNature"; + // nature for regression tests of bug 127562 + public static final String NATURE_127562 = "org.eclipse.core.tests.resources.bug127562Nature"; + // snowNature, requires: waterNature, one-of: otherSet + public static final String NATURE_SNOW = "org.eclipse.core.tests.resources.snowNature"; + // waterNature, one-of: stateSet + public static final String NATURE_WATER = "org.eclipse.core.tests.resources.waterNature"; + public static final String SET_OTHER = "org.eclipse.core.tests.resources.otherSet"; + // constants for nature sets + public static final String SET_STATE = "org.eclipse.core.tests.resources.stateSet"; + + private ResourceTestPluginConstants() { + } + + /** + * Returns valid sets of natures + */ + public static String[][] getValidNatureSets() { + return new String[][] { {}, { NATURE_SIMPLE }, { NATURE_SNOW, NATURE_WATER }, { NATURE_EARTH }, + { NATURE_WATER, NATURE_SIMPLE, NATURE_SNOW }, }; + } + + /** + * Returns invalid sets of natures + */ + public static String[][] getInvalidNatureSets() { + return new String[][] { { NATURE_SNOW }, // missing water pre-req + { NATURE_WATER, NATURE_EARTH }, // duplicates from state-set + { NATURE_WATER, NATURE_MUD }, // missing earth pre-req + { NATURE_WATER, NATURE_EARTH, NATURE_MUD }, // duplicates from state-set + { NATURE_SIMPLE, NATURE_SNOW, NATURE_WATER, NATURE_MUD }, // duplicates from other-set, missing pre-req + { NATURE_MISSING }, // doesn't exist + { NATURE_SIMPLE, NATURE_MISSING }, // missing doesn't exist + { NATURE_MISSING_PREREQ }, // requires nature that doesn't exist + { NATURE_SIMPLE, NATURE_MISSING_PREREQ }, // requires nature that doesn't exist + { NATURE_CYCLE1 }, // missing pre-req + { NATURE_CYCLE2, NATURE_CYCLE3 }, // missing pre-req + { NATURE_CYCLE1, NATURE_SIMPLE, NATURE_CYCLE2, NATURE_CYCLE3 }, // cycle + }; + } + +} diff --git a/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/perf/PropertyManagerPerformanceTest.java b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/perf/PropertyManagerPerformanceTest.java index 1207d3acf64..7a0f8eb5486 100644 --- a/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/perf/PropertyManagerPerformanceTest.java +++ b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/perf/PropertyManagerPerformanceTest.java @@ -14,6 +14,8 @@ *******************************************************************************/ package org.eclipse.core.tests.resources.perf; +import static org.eclipse.core.tests.resources.ResourceTestPluginConstants.PI_RESOURCES_TESTS; + import java.util.ArrayList; import java.util.Arrays; import java.util.List; diff --git a/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/regression/Bug_029116.java b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/regression/Bug_029116.java index 8f997736dbd..7ed91f86d3d 100644 --- a/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/regression/Bug_029116.java +++ b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/regression/Bug_029116.java @@ -13,6 +13,8 @@ *******************************************************************************/ package org.eclipse.core.tests.resources.regression; +import static org.eclipse.core.tests.resources.ResourceTestPluginConstants.NATURE_29116; + import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProjectDescription; import org.eclipse.core.runtime.CoreException; diff --git a/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/regression/Bug_297635.java b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/regression/Bug_297635.java index b7a497eb239..b94a06e44f9 100644 --- a/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/regression/Bug_297635.java +++ b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/regression/Bug_297635.java @@ -14,6 +14,7 @@ *******************************************************************************/ package org.eclipse.core.tests.resources.regression; +import static org.eclipse.core.tests.resources.ResourceTestPluginConstants.PI_RESOURCES_TESTS; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.verify; diff --git a/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/regression/Bug_378156.java b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/regression/Bug_378156.java index 3da3c6d55eb..b6b7aee524c 100644 --- a/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/regression/Bug_378156.java +++ b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/regression/Bug_378156.java @@ -13,6 +13,8 @@ *******************************************************************************/ package org.eclipse.core.tests.resources.regression; +import static org.eclipse.core.tests.resources.ResourceTestPluginConstants.PI_RESOURCES_TESTS; + import java.util.concurrent.Semaphore; import org.eclipse.core.resources.ICommand; import org.eclipse.core.resources.IFile; diff --git a/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/session/Bug_266907.java b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/session/Bug_266907.java index 17a45155792..6396b92d0f6 100644 --- a/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/session/Bug_266907.java +++ b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/session/Bug_266907.java @@ -13,6 +13,7 @@ *******************************************************************************/ package org.eclipse.core.tests.resources.session; +import static org.eclipse.core.tests.resources.ResourceTestPluginConstants.PI_RESOURCES_TESTS; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.MatcherAssert.assertThat; diff --git a/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/session/TestBug93473.java b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/session/TestBug93473.java index a465477084a..794ff3798c5 100644 --- a/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/session/TestBug93473.java +++ b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/session/TestBug93473.java @@ -13,6 +13,8 @@ *******************************************************************************/ package org.eclipse.core.tests.resources.session; +import static org.eclipse.core.tests.resources.ResourceTestPluginConstants.PI_RESOURCES_TESTS; + import junit.framework.Test; import org.eclipse.core.internal.resources.ContentDescriptionManager; import org.eclipse.core.internal.resources.Workspace; diff --git a/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/session/TestMissingBuilder.java b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/session/TestMissingBuilder.java index 7f641666733..f3026351f4e 100644 --- a/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/session/TestMissingBuilder.java +++ b/resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/session/TestMissingBuilder.java @@ -13,6 +13,9 @@ *******************************************************************************/ package org.eclipse.core.tests.resources.session; +import static org.eclipse.core.tests.resources.ResourceTestPluginConstants.NATURE_SNOW; +import static org.eclipse.core.tests.resources.ResourceTestPluginConstants.NATURE_WATER; + import java.io.ByteArrayInputStream; import java.io.InputStream; import junit.framework.Test;