Bug 59355 - core resources API dependency on core.runtime.compatibility
Summary: core resources API dependency on core.runtime.compatibility
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P1 normal (vote)
Target Milestone: 3.0 M9   Edit
Assignee: DJ Houghton CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-20 17:45 EDT by Jim des Rivieres CLA
Modified: 2004-04-26 10:35 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jim des Rivieres CLA 2004-04-20 17:45:56 EDT
Build I20040420

IProject
	public IPath getPluginWorkingLocation(IPluginDescriptor plugin);

This method is an API dependency on old core runtime API.
IPluginDescriptor is defined in org.eclipse.core.runtime itself, but its
only implementation is in org.eclipse.core.runtime.compatibility.
This means that a client will only be able to access this functionality in a 
world where org.eclipse.core.runtime.compatibility is present.
This seems too harsh.

This project could be addressed by adding to IProject:
	public IPath getPluginWorkingLocation(String pluginId);
and the old method marked similiar to IPluginDescriptor.

More generally, the core.resource API should be reviewed for any other places 
where old core runtime stuff shows up in the API.
Comment 1 DJ Houghton CLA 2004-04-20 18:16:38 EDT
Is this something that we should be targeting for 3.0?
Comment 2 Jim des Rivieres CLA 2004-04-20 19:07:15 EDT
Yes.
Comment 3 Jim des Rivieres CLA 2004-04-23 17:38:59 EDT
This requires an API change. I've upped it to P1. Can it be addressed for the 
Tuesday April 27 I-build?
Comment 4 DJ Houghton CLA 2004-04-26 09:59:19 EDT
I've deprecated it and replaced it with the following. Does that sound ok? The
comment is essentially the same as the deprecated method. Let me know and I will
release to HEAD.

/**
 * Returns the location in the local file system of the project-specific
 * working data area for use by the given bundle or <code>null</code>
 * if the project does not exist.
 * <p>
 * The content, structure, and management of this area is 
 * the responsibility of the plug-in.  This area is deleted when the
 * project is deleted.
 * </p><p>
 * This project needs to exist but does not need to be open.
 * </p>
 * @param bundle the bundle
 * @return a local file system path
 * @since 3.0
 */
public IPath getWorkingLocation(Bundle bundle);
Comment 5 Jim des Rivieres CLA 2004-04-26 10:11:59 EDT
The replacement method should take a String plug-in id, rather than a Bundle. 
This has the advantage of allowing the working area to be computed without 
forcing the client to look up the bundle.
Comment 6 DJ Houghton CLA 2004-04-26 10:35:34 EDT
Agreed. Released to HEAD.