Bug 311991 - [Manifest][Editors] Browse for class attribute types fails to filter if only interface given
Summary: [Manifest][Editors] Browse for class attribute types fails to filter if only ...
Status: VERIFIED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6   Edit
Hardware: Other All
: P3 normal (vote)
Target Milestone: 3.7 M1   Edit
Assignee: Curtis Windatt CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2010-05-06 20:09 EDT by Stephan Herrmann CLA
Modified: 2010-08-04 11:53 EDT (History)
2 users (show)

See Also:


Attachments
proposed patch (1016 bytes, patch)
2010-05-06 20:13 EDT, Stephan Herrmann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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