Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 365925 - No warning generated for member type with invalid separator
Summary: No warning generated for member type with invalid separator
Status: CLOSED WONTFIX
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: PDE-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-07 11:47 EST by Brian Vosburgh CLA
Modified: 2019-07-11 18:39 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Vosburgh CLA 2011-12-07 11:47:32 EST
When I define an adapter factory extension and the adapter type is a member interface (i.e. it is an interface defined inside another type) and the XML element looks like this:

<extension
    point="org.eclipse.core.runtime.adapters">
    <factory
        class="org.eclipse.jpt.jpa.core.internal.ProjectAdapterFactory"
        adaptableType="org.eclipse.core.resources.IProject">
        <adapter type="org.eclipse.jpt.jpa.core.JpaProject.Reference"/>
    </factory>
</extension>

There are no warnings or errors; but the factory will not be invoked because the adapter type name is incorrect. I would expect a warning like the following:

Referenced class 'org.eclipse.jpt.jpa.core.JpaFile.Reference' in attribute 'type' is not on the plug-in classpath

The adapter type name must be changed to look like this:

        <adapter type="org.eclipse.jpt.jpa.core.JpaProject$Reference"/>

Note the member type must be separated from the top-level type with a '$'.
Comment 1 Brian Vosburgh CLA 2011-12-28 16:52:29 EST
Related to this bug:

When editing a plugin.xml file, if the cursor is positioned on the name of a member type and I press F3, the UI will only open an editor on the member type if its name is "incorrectly" entered. That is, F3 only works if the type name uses a '.' separator, as opposed to the '$' separator; but, as mentioned in the original bug description, the '.' separator does not work at runtime so it's pretty much useless.
Comment 2 Eclipse Genie CLA 2019-07-11 18:39:31 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.