This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 139526 - viewClass property in spring config should be in refactoring scenario
Summary: viewClass property in spring config should be in refactoring scenario
Status: NEW
Alias: None
Product: javaee
Classification: Unclassified
Component: Spring (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Martin Fousek
URL:
Keywords:
Depends on:
Blocks: 173299
  Show dependency tree
 
Reported: 2008-07-10 08:16 UTC by Geertjan Wielenga
Modified: 2012-02-24 09:37 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Geertjan Wielenga 2008-07-10 08:16:38 UTC
<bean id="CustomerView" class="org.springframework.richclient.application.support.DefaultViewDescriptor">
       <property name="viewClass" value="simple.CustomerView" />
       <property name="viewProperties">
           <map>
               <entry key="customerDataStore" value-ref="customerDataStore" />
           </map>
       </property>
</bean>

When I rename the "simple.CustomerView" class, the property above is not changed. If we support this specific scenario,
we will have Spring RCP support, which would be extremely valuable.
Comment 1 Rohan Ranade 2008-07-11 04:24:28 UTC
viewClass property is of the type 'Class' and it seems that there is a convertor behind the scenes which converts the 
FQN string to a Class object. 
IMO, this is too specific a scenario to support in generic Spring refactoring code. I see two possible solutions:
1. Implement this refactoring in the Spring RCP tooling (you will perhaps need to add a friend dep and I will be more 
than happy to help)
2. Enhance the current refactoring + editing code to account for all such properties in beans - a better solution, 
though not possible for 6.5.

Comments?
Comment 2 Geertjan Wielenga 2008-07-11 09:08:42 UTC
Here's another scenario where refactoring support would be valuable. Below, note the "simple.DemoPerspectiveFactory":

<bean id="applicationPageFactory" depends-on="serviceLocator"
class="org.springframework.richclient.application.docking.flexdock.FlexDockApplicationPageFactory">
    <property name="floatingEnabled" value="true" />
    <property name="defaultPerspective" value="defaultPerspective" />
    <property name="perspectiveFactory">
        <bean class="simple.DemoPerspectiveFactory">
            <property name="dockableIds">
                <list>
                    <value>NewSpringView</value>
                    <value>NewSpringView1</value>
                    <value>NewSpringView2</value>
                    <value>NewSpringView3</value>
                </list>
            </property>
        </bean>
    </property>
</bean>
Comment 3 Geertjan Wielenga 2008-07-11 09:11:11 UTC
About your solutions, 2 is preferable, I agree, so we should leave this issue open for that. But 1 is interesting, would
be cool to know how it is done. Tell me what to do?