Bug 1879 - Cannot open breakpoint on external jar (1G8SCA9)
Summary: Cannot open breakpoint on external jar (1G8SCA9)
Status: RESOLVED INVALID
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Kevin Haaland CLA
QA Contact:
URL:
Whiteboard:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2001-10-10 22:21 EDT by Unknown User CLA
Modified: 2005-01-18 16:44 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Unknown User CLA 2001-10-10 22:21:25 EDT
DS - This is a summary of an ongoing marker issue.  If a breakpoint is set in an
external jar there is no way to automatically open an editor for that breakpoint in
the desktop.  In IPerspective.openEditor(IMarker) we query use the marker resource.
Unfortuately, this is not the true target.  It is just the storage location for the marker.
There is currently no way to identify the true target for a marker in an abstract
fashion.

NOTES:

DS (2/7/01 12:09:36 PM)
	I have submitted the following to Jeff M, DJ, and Kevin ..

Support for Non Resource Markers
------------

Problem: A mechanism is needed to map an IMarker to its target.  The target may or may 
not be an IResource.  

Solution: A target attribute of type URL should be stored on IMarker.  If this target is 
defined by a URL it is possible to target a marker at any object: external jars, repositories, 
file system, etc.  The contents of the URL can be accessed by calling URL.openStream().  
The URL delegates the implementation of openStream to a URLStreamHandler.  
One stream handler is registered for each URL scheme (ie, file::, http::, etc).  Core would 
be expected to provide a distinct handler for IResource targets (ie, eclipse::).  Additional 
handlers would be registered for an external jar or repository.

In almost all cases a marker will have a target, so perhaps setTarget and getTarget 
should be added to IMarker to guarantee their existence.

Problem 2: The appropriate editor for a target is currently determined by target type
 (ie, extension or mime type).  There is no 100% foolproof way to determine the target 
type from a URL or an IMarker.

Solution 2: An attribute should be stored on the IMarker to carry the type.  The marker 
creator would be expected to populate this attribute with an appropriate value derived 
from the source data.  This should be feasable.  If the marker creator can traverse 
into a storage area (like a repository or external jar) it can probably determine the type 
of each marker target within.  In IPerspective.openEditor(IMarker) some fallback would 
be taken if target type is absent.  We could popup a dialog asking the user to choose 
an editor.

The target type may be the file extension or mime type.  If mime types are adopted in 
core an extension point can be defined for MimeTypeGenerator's.  These MimeTypeGenerators 
would be used to determine the mime type of a URL if it is not known.   Other plugins 
could also reuse these generators to determine the type for objects outside the workspace,
like an external jar.  A possible interface for MimeGenerator ..

public interface IMimeGenerator {
	public String getMimeType(String fileName, byte [] first256bytes);
}

If mime types are adopted within core a file will have a mime type.  If so I would argue that 
a target is incomplete without a target type.  Perhaps setTargetMime and getTargetMime 
should be added to IMarker to strengthen this coupling.

DS (2/7/01 12:10:38 PM)
	I feel we are exposing the functionality provided by core and have no 
	responsability to do more until core moves on this.  I will log a PR against
	core.


1G8SCJT: ITPCORE:ALL - Cannot open breakpoint in external jar
Comment 1 Kevin Haaland CLA 2002-01-21 19:47:00 EST
Closing. Obsolete. 
Comment 2 Randy Giffen CLA 2002-08-06 15:18:48 EDT
Comment says obsolete but marked as later, reopening to close.
Comment 3 Randy Giffen CLA 2002-08-06 15:19:12 EDT
Obsolete