History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEADEV-20109
Type: Usability Problem Usability Problem
Status: Open Open
Priority: Normal Normal
Assignee: Dmitry Avdeev
Reporter: Taras Tielkes
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
IDEA: Development

'Create new bean ...' quickfix should be aware of interfaces

Created: 01 Jun 07 11:12   Updated: 10 Aug 07 12:57
Component/s: J2EE.Spring
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Build: 6,981
Severity: Low


 Description  « Hide
<bean class="foo.bar.Baz">
  <property name="something" ref="foo"/>
</bean>

Property "something" is of type interface Something.
Reference "foo" is unresolved.

Invoking the "Create new bean 'foo'" quickfix produces:

<bean id="foo" class="foo.bar.Something"/>

...which gets immediately marked as an error ("Interface not allowed").

This is a minor thing, but I think for properties of interface type quickfix should leave "class" blank.
Alternatively, a 'live template' could run, and present a list of concrete implementations.



 All   Comments   Work Log   Change History      Sort Order:
Dmitry Avdeev - 10 Aug 07 12:15
Live template would be the best solution

Taras Tielkes - 10 Aug 07 12:57
Perhaps just leaving "class" attribute empty when the property is an interface type would be good enough