Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 311991

Summary: [Manifest][Editors] Browse for class attribute types fails to filter if only interface given
Product: [Eclipse Project] PDE Reporter: Stephan Herrmann <stephan.herrmann>
Component: UIAssignee: Curtis Windatt <curtis.windatt.public>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: caniszczyk, curtis.windatt.public
Version: 3.6Keywords: contributed
Target Milestone: 3.7 M1   
Hardware: Other   
OS: All   
Whiteboard:
Attachments:
Description Flags
proposed patch none

Description Stephan Herrmann CLA 2010-05-06 20:09:07 EDT
This is a follow-up of my favorite bug 61185 :)

If an extension point specifies only an interface for basedOn,
the browse dialog fails to filter subtypes of this interface.

The current implementation only handles "Class" and "Class:Interface"
but not ":Interface" specifications for basedOn.
This case was already mentioned in bug 61185 comment 23 but
unfortunately got forgotten afterwards.
Comment 1 Stephan Herrmann CLA 2010-05-06 20:13:42 EDT
Created attachment 167420 [details]
proposed patch

This tiny patch ensures that ":MyInterface" is interpreted properly
(by stripping off the initial colon).
Comment 2 Stephan Herrmann CLA 2010-07-07 13:25:02 EDT
Would now be a good time to apply & commit this patch? 
:)
Comment 3 Curtis Windatt CLA 2010-07-07 14:27:51 EDT
Patch looks reasonable.  Ankur, please review this patch when you have a chance.
Comment 4 Curtis Windatt CLA 2010-07-12 14:54:14 EDT
Patch works great, applied to HEAD.

For reference, to reproduce, create a new extension point (or modify an existing one).  Create an attribute of type 'Java'.  You'll be able to specify what the attribute must Extend or Implement (or both).  If you look at the source for the schema the attribute will use the notation <extend>:<interface>, leaving either attribute blank if one wasn't specified.

When you create an extension for this extension point, there will be an option to browse for a java file that satisfies the requirements.  Just extends works (will only show you subclasses), and the combination works (will only show you subclasses that implement an interface), but it fails for just implements (it will list all classes).  The patch fixes this.
Comment 5 Stephan Herrmann CLA 2010-07-13 11:32:16 EDT
(In reply to comment #4)
> Patch works great, applied to HEAD.

Thanks, Curtis!
Comment 6 Curtis Windatt CLA 2010-08-03 14:58:31 EDT
Verified in I20100802-1800