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

Key: IDEABKL-5222
Type: New Feature New Feature
Status: Open Open
Priority: Normal Normal
Assignee: Maxim Mossienko
Reporter: Konstantin Solomatov
Votes: 0
Watchers: 1
Available Workflow Actions

Mark as Stalled
Operations

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

Mark XML elements which can't be nested in a tag under cursor with different color

Created: 01 Sep 07 20:03   Updated: 03 Sep 07 12:03
Component/s: XML editing
Affects Version/s: None
Fix Version/s: None

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

Build: 7,118
Severity: High


 Description  « Hide
For example spring has a description tag. It is available in completion inside bean tag but if I complete it after <property element it will be reported as error (see example in the comment below)

 All   Comments   Work Log   Change History      Sort Order:
Taras Tielkes - 01 Sep 07 20:21
This code is green for me:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
  <bean>
    <description></description>
  </bean>
</beans>

Konstantin Solomatov - 01 Sep 07 21:33
If you try this, it will be red because description should be before properties

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean>
<property name="xxx" value="yyy" />
<description></description>
</bean>
</beans>


Taras Tielkes - 01 Sep 07 22:16
I see (although DTD validation seems flakey in #7255).

You're talking about adding a feature to code completion, correct? Would it not make more sense if completion simply did not suggest elements which are not allowed at current location?


Maxim Mossienko - 01 Sep 07 22:17
From IDEA point of view 'description' tag is allowed and there is no easy way to do what you requested (red coloring comes from external validator on current document)