Skip to content

Commit dde6c0e

Browse files
committed
Use IPath type instead of o.e.core.runtime.Path where suitable
1 parent d5616ec commit dde6c0e

File tree

59 files changed

+134
-127
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+134
-127
lines changed

apitools/org.eclipse.pde.api.tools.tests/META-INF/MANIFEST.MF

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
22
Bundle-ManifestVersion: 2
33
Bundle-Name: %Bundle-Name
44
Bundle-SymbolicName: org.eclipse.pde.api.tools.tests
5-
Bundle-Version: 1.3.100.qualifier
5+
Bundle-Version: 1.3.200.qualifier
66
Bundle-Vendor: %Bundle-Vendor
77
Require-Bundle: org.eclipse.core.runtime,
88
org.junit,

apitools/org.eclipse.pde.api.tools.tests/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
are made available under the terms of the Eclipse Distribution License v1.0
66
which accompanies this distribution, and is available at
77
http://www.eclipse.org/org/documents/edl-v10.php
8-
8+
99
Contributors:
1010
Igor Fedorenko - initial implementation
1111
-->
@@ -18,7 +18,7 @@
1818
<relativePath>../../</relativePath>
1919
</parent>
2020
<artifactId>org.eclipse.pde.api.tools.tests</artifactId>
21-
<version>1.3.100-SNAPSHOT</version>
21+
<version>1.3.200-SNAPSHOT</version>
2222
<packaging>eclipse-test-plugin</packaging>
2323
<properties>
2424
<code.ignoredWarnings>-warn:-discouraged</code.ignoredWarnings>

apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/builder/tests/ApiTestingEnvironment.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
import org.eclipse.core.runtime.CoreException;
3131
import org.eclipse.core.runtime.IPath;
3232
import org.eclipse.core.runtime.NullProgressMonitor;
33-
import org.eclipse.core.runtime.Path;
3433
import org.eclipse.jdt.core.IJavaModelMarker;
3534
import org.eclipse.jdt.core.IJavaProject;
3635
import org.eclipse.jdt.core.JavaCore;
@@ -92,7 +91,7 @@ public IPath addProject(String projectName, String compliance) throws Unsupporte
9291
if (compliance != null) {
9392
setProjectCompliance(javaProject, compliance);
9493
}
95-
return project != null ? project.getFullPath() : Path.EMPTY;
94+
return project != null ? project.getFullPath() : IPath.EMPTY;
9695
}
9796

9897
/**

apitools/org.eclipse.pde.api.tools.tests/src/org/eclipse/pde/api/tools/model/tests/TagScannerTests.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424

2525
import org.eclipse.core.runtime.CoreException;
2626
import org.eclipse.core.runtime.IPath;
27-
import org.eclipse.core.runtime.Path;
2827
import org.eclipse.jdt.core.JavaCore;
2928
import org.eclipse.pde.api.tools.internal.ApiDescription;
3029
import org.eclipse.pde.api.tools.internal.CompilationUnit;
@@ -84,7 +83,7 @@ protected IApiTypeContainer newArchiveClassFileContainer(IPath path) {
8483
* @return a new compilation unit
8584
*/
8685
private CompilationUnit getCompilationUnit(String name) {
87-
Path path = (Path) SRC_LOC.append(name);
86+
IPath path = SRC_LOC.append(name);
8887
return new CompilationUnit(path.toOSString(), IApiCoreConstants.UTF_8);
8988
}
9089

@@ -495,7 +494,7 @@ public void testMultiInnerInterfaceDefaultPackage() {
495494

496495
// Bug 402393 - The description returned is for the parent element
497496
// and is expected because the root type has a restricted sub-type
498-
//Bug 539513 - Incorrect warning on nested interface
497+
//Bug 539513 - Incorrect warning on nested interface
499498
// Api description of inner nested interface should contain the relevant restrictions
500499
// only when there is no restriction, then parent's restriction should be used
501500
assertNotNull("the description for TestInterface4$Inner2 should exist", description); //$NON-NLS-1$
@@ -526,7 +525,7 @@ public void testMultiInnerInterfaceAnnotations() {
526525

527526
// Bug 402393 - The description returned is for the parent element
528527
// and is expected because the root type has a restricted sub-type
529-
//Bug 539513 - Incorrect warning on nested interface
528+
//Bug 539513 - Incorrect warning on nested interface
530529
// Api description of inner nested interface should contain the relevant restrictions
531530
// only when there is no restriction, then parent's restriction should be used
532531
assertNotNull("the description for TestInterface5$Inner2 should exist", description); //$NON-NLS-1$

apitools/org.eclipse.pde.api.tools.ui/src/org/eclipse/pde/api/tools/ui/internal/wizards/DirectoryBasedApiBaselineWizardPage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ private String getUpdatedLocationForMacOS(String newPath) {
218218
// On Mac OS, if user selects *.app, then location
219219
// should be reset to *.app/Contents/Eclipse if that exists
220220
if (System.getProperty("os.name").startsWith("Mac")) {//$NON-NLS-1$ //$NON-NLS-2$
221-
Path nPath = new Path(newPath);
221+
IPath nPath = new Path(newPath);
222222
if (nPath.lastSegment() == null) {
223223
return newLoc;
224224
}

apitools/org.eclipse.pde.api.tools/META-INF/MANIFEST.MF

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Bundle-SymbolicName: org.eclipse.pde.api.tools;singleton:=true
55
Bundle-Version: 1.3.100.qualifier
66
Bundle-Vendor: %providerName
77
Bundle-Localization: plugin
8-
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.25.0,4.0.0)",
8+
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.27.0,4.0.0)",
99
org.eclipse.pde.core;bundle-version="[3.3.102,4.0.0)",
1010
org.eclipse.jdt.core;bundle-version="[3.22.0,4.0.0)",
1111
org.eclipse.jdt.launching;bundle-version="[3.6.100,4.0.0)",

apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/ApiAnalysisBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,7 @@ boolean hasFatalProblems(IProject project) throws CoreException {
844844
if (hasFatalProblem) {
845845
task = () -> {
846846
cleanupMarkers(project);
847-
IApiProblem problem = ApiProblemFactory.newFatalProblem(Path.EMPTY.toString(), new String[] { project.getName() }, IApiProblem.FATAL_JDT_BUILDPATH_PROBLEM);
847+
IApiProblem problem = ApiProblemFactory.newFatalProblem("", new String[] { project.getName() }, IApiProblem.FATAL_JDT_BUILDPATH_PROBLEM); //$NON-NLS-1$
848848
createMarkerForProblem(IApiProblem.CATEGORY_FATAL_PROBLEM, IApiMarkerConstants.FATAL_PROBLEM_MARKER, problem);
849849
};
850850
} else {
@@ -1262,7 +1262,7 @@ IPluginModelBase getCurrentModel() {
12621262
loop: for (int i = 0, max = workspaceModels.length; i < max; i++) {
12631263
desc = workspaceModels[i].getBundleDescription();
12641264
if (desc != null) {
1265-
Path path = new Path(desc.getLocation());
1265+
IPath path = new Path(desc.getLocation());
12661266
if (path.equals(location)) {
12671267
currentModel = workspaceModels[i];
12681268
break loop;

apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/builder/BaseApiAnalyzer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ private boolean checkIfNested(IApiComponent component) {
320320
IWorkspace workspace = ResourcesPlugin.getWorkspace();
321321
IWorkspaceRoot root = workspace.getRoot();
322322
IProject[] projects = root.getProjects();
323-
Path componentLocation = new Path(component.getLocation());
323+
IPath componentLocation = new Path(component.getLocation());
324324
for (IProject project : projects) {
325325
IPath projectLocation = project.getLocation();
326326
if (projectLocation != null && projectLocation.isPrefixOf(componentLocation)) {
@@ -1913,7 +1913,7 @@ private IApiProblem createCompatibilityProblem(final IDelta delta, final IApiCom
19131913
* @return a new API component resolution problem or <code>null</code>
19141914
*/
19151915
private void createApiComponentResolutionProblem(final IApiComponent component, final String message) {
1916-
IApiProblem problem = ApiProblemFactory.newApiComponentResolutionProblem(Path.EMPTY.toString(), new String[] {
1916+
IApiProblem problem = ApiProblemFactory.newApiComponentResolutionProblem("", new String[] { //$NON-NLS-1$
19171917
component.getSymbolicName(), message }, new String[] { IApiMarkerConstants.API_MARKER_ATTR_ID }, new Object[] { Integer.valueOf(IApiMarkerConstants.API_COMPONENT_RESOLUTION_MARKER_ID) }, IElementDescriptor.RESOURCE, IApiProblem.API_COMPONENT_RESOLUTION);
19181918
addProblem(problem);
19191919
}

apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/ApiModelFactory.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -340,8 +340,7 @@ public static IApiBaseline newApiBaselineFromTarget(String name, ITargetDefiniti
340340
/**
341341
* Create predictable location description for a target definition. Form is
342342
* <code>target:/targetSeq/definitionLocation</code>. A location must be
343-
* compatible with
344-
* {@link org.eclipse.core.runtime.Path#fromPortableString(String)}.
343+
* compatible with {@link IPath#fromPortableString(String)}.
345344
*
346345
* @param definition the target platform definition
347346
* @return an encoded location
@@ -364,7 +363,7 @@ private static String generateTargetLocation(ITargetDefinition definition) {
364363
*
365364
* @param definition
366365
* @return a stable identifier, in portable OS format as per
367-
* {@link org.eclipse.core.runtime.Path#fromPortableString(String)}.
366+
* {@link IPath#fromPortableString(String)}.
368367
*/
369368
private static String getDefinitionIdentifier(ITargetDefinition definition) {
370369
ITargetHandle targetHandle = definition.getHandle();

build/org.eclipse.pde.build/META-INF/MANIFEST.MF

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
22
Bundle-ManifestVersion: 2
33
Bundle-Name: %pluginName
44
Bundle-SymbolicName: org.eclipse.pde.build;singleton:=true
5-
Bundle-Version: 3.12.0.qualifier
5+
Bundle-Version: 3.12.100.qualifier
66
Bundle-ClassPath: pdebuild.jar
77
Bundle-Activator: org.eclipse.pde.internal.build.BuildActivator
88
Bundle-Vendor: %providerName
@@ -18,7 +18,7 @@ Export-Package: org.eclipse.pde.build,
1818
org.eclipse.pde.internal.build.site;x-friends:="org.eclipse.pde.core,org.eclipse.pde.ui",
1919
org.eclipse.pde.internal.build.site.compatibility;x-internal:=true,
2020
org.eclipse.pde.internal.build.tasks;x-internal:=true
21-
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.25.0,4.0.0)",
21+
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.27.0,4.0.0)",
2222
org.eclipse.ant.core;bundle-version="[3.1.100,4.0.0)",
2323
org.eclipse.equinox.p2.jarprocessor;bundle-version="[1.0.1,2.0.0)",
2424
org.eclipse.equinox.p2.publisher;bundle-version="1.1.0",

0 commit comments

Comments
 (0)