Uploaded image for project: 'Spring Tool Suite'
  1. Spring Tool Suite
  2. STS-509

Quick fix and as-you-type validation don't understand class and method names and bean references in namespace elements

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Sprint 9, 2.3.1.RELEASE
    • Component/s: None
    • Labels:

      Activity

      Hide
      thon Terry Denney added a comment -

      Christian, can you provide an example of that? Do you mean that quick fix does not work when beans is not the default namespace?

      Show
      thon Terry Denney added a comment - Christian, can you provide an example of that? Do you mean that quick fix does not work when beans is not the default namespace?
      Hide
      cdupuis Christian Dupuis added a comment -

      Yes. there is a new class in Spring IDE now: NamespaceElementsRule and also a test with some sample xml. Interestingly this class operates on Xml Elements so we might be able to resue it from the validate as-you-type infrastructure.

      <?xml version="1.0" encoding="UTF-8" standalone="no"?>
      <beans xmlns="http://www.springframework.org/schema/beans"
      	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      	xmlns:util="http://www.springframework.org/schema/util"
      	xmlns:task="http://www.springframework.org/schema/task"
      	xmlns:osgi="http://www.springframework.org/schema/osgi"
      	xsi:schemaLocation="http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd
      		http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd
      		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
      		http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
       
      	<bean id="target1" class="java.lang.String" />
       
          <util:list id="test1" list-class="java.lang.String" />
          <util:list id="test2" list-class="java.lang.NoSuchClass" />
          <util:list id="test3" list-class="java.util.ArrayList" />
        
      	 	
       	<task:scheduled-tasks>  
       		<task:scheduled ref="target1" method="toString" fixed-rate="1"/>
       		<task:scheduled ref="target1" method="nosuchmethod" fixed-rate="1"/>
       		<task:scheduled ref="target2" method="toString" fixed-rate="1"/>
       	</task:scheduled-tasks>
      	
      	
      	<osgi:reference id="test4" > 
      		<osgi:interfaces>
      			<value>java.util.List</value>	
      			<value>java.lang.NoSuchClass</value>	
      			<value>java.util.ArrayList</value>	
      		</osgi:interfaces>
      	</osgi:reference>   
      	 
      	<util:constant static-field="org.springframework.core.Ordered.HIGHEST_PRECEDENCE"/> 
      	<util:constant static-field="org.springframework.core.Ordered.NO_SUCH_FIELD"/> 
      	<util:constant static-field="org.springframework.core.NoSuchClass.NO_SUCH_FIELD"/> 
      	
      </beans>
       

      Show
      cdupuis Christian Dupuis added a comment - Yes. there is a new class in Spring IDE now: NamespaceElementsRule and also a test with some sample xml. Interestingly this class operates on Xml Elements so we might be able to resue it from the validate as-you-type infrastructure. <?xml version="1.0" encoding="UTF-8" standalone="no"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util" xmlns:task="http://www.springframework.org/schema/task" xmlns:osgi="http://www.springframework.org/schema/osgi" xsi:schemaLocation="http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">   <bean id="target1" class="java.lang.String" /> <util:list id="test1" list-class="java.lang.String" /> <util:list id="test2" list-class="java.lang.NoSuchClass" /> <util:list id="test3" list-class="java.util.ArrayList" /> <task:scheduled-tasks> <task:scheduled ref="target1" method="toString" fixed-rate="1"/> <task:scheduled ref="target1" method="nosuchmethod" fixed-rate="1"/> <task:scheduled ref="target2" method="toString" fixed-rate="1"/> </task:scheduled-tasks> <osgi:reference id="test4" > <osgi:interfaces> <value>java.util.List</value> <value>java.lang.NoSuchClass</value> <value>java.util.ArrayList</value> </osgi:interfaces> </osgi:reference> <util:constant static-field="org.springframework.core.Ordered.HIGHEST_PRECEDENCE"/> <util:constant static-field="org.springframework.core.Ordered.NO_SUCH_FIELD"/> <util:constant static-field="org.springframework.core.NoSuchClass.NO_SUCH_FIELD"/> </beans>  

        People

        • Assignee:
          Unassigned
          Reporter:
          cdupuis Christian Dupuis
        • Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved:

            Time Tracking

            Estimated:
            Original Estimate - 0d
            0d
            Remaining:
            Remaining Estimate - 0d
            0d
            Logged:
            Time Spent - 1.4d
            1.4d