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

Key: IDEADEV-15928
Type: Cosmetics Cosmetics
Status: Open Open
Priority: Normal Normal
Assignee: Dmitry Avdeev
Reporter: Taras Tielkes
Votes: 1
Watchers: 2
Operations

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

Create property QuickFix does not shorten FQNs

Created: 03 Apr 07 10:15   Updated: 08 Oct 07 01:54
Component/s: J2EE.Spring
Fix Version/s: None

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

Build: 6,791


 Description  « Hide
public class MapBean {
}
<bean class="foo.bar.MapBean">
  <property name="someMap">
    <map>
    </map>
  </property>
</bean>

QuickFix "create new property 'someMap'" creates:

public class MapBean {
    public void setSomeMap(java.util.Map someMap) {
    }
}


 All   Comments   Work Log   Change History      Sort Order:
Dmitry Avdeev - 04 Apr 07 13:07
but what do you expect?

Taras Tielkes - 04 Apr 07 13:39
I think I expect CodeStyleManager#shortenClassReferences call?

Dmitry Avdeev - 04 Apr 07 13:46
so you expect

public class MapBean {
public void setSomeMap(java.util.Map map) {
}
}

instead?


Taras Tielkes - 04 Apr 07 13:56
Dmitry, your example is the same as mine (except for variable name)

What I would expect is:

import java.util.Map;

public class MapBean {
    public void setSomeMap(Map someMap) {
    }
}

I think regular 'create missing method' QuickFix in Java editor adds unambiguous imports automatically. So I think when I invoke a similar QuickFix from spring xml it should do the same thing.


Dmitry Avdeev - 04 Apr 07 15:32
i see now

Taras Tielkes - 08 Oct 07 01:54
This is still present in #7330. I assume the fix is relatively simple?