Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-9209

Mouse click on error icon in the vertical ruler positioned on the left of the XML/JSP/XHTML editor should show list of quick fixes for that problem

XMLWordPrintable

    • Documentation (Ref Guide, User Guide, etc.)
    • A new feature has been added that allows a user to select from a list of quick fixes for issues shown when using the XML, JSP or XHTML editors. This feature is similar to the existing feature available for the Java editor.
    • Documented as Feature Request

      Mouse click on error icon in the vertical ruler positioned on the left of the Java editor shows list of quick fixes for that problem.
      We need to modify our XML/JSP/XHTML editor in order to implement the same feature.

      Test case 1:
      EXECUTE:
      1. Create Seam Web War Project
      2. Create Java class:

      package org.domain.testseam.session;
      
      import javax.ejb.Remove;
      import javax.ejb.Stateful;
      
      import org.jboss.seam.ScopeType;
      import org.jboss.seam.annotations.Destroy;
      import org.jboss.seam.annotations.Logger;
      import org.jboss.seam.annotations.Name;
      import org.jboss.seam.annotations.Scope;
      import org.jboss.seam.log.Log;
      
      @Name("component1")
      
      @Stateful
      @Scope(ScopeType.APPLICATION)
      public class Component {
      
          @Logger private Log log;
      	
          
          public String statefulComponent()
          {
              return "success";
          }
      	
          @Destroy
      	public void destroyMethod(){
      		
      	}
      
          
          @Remove
          public void removeMethod(){
          	
          }
      
      }
      

      3. Insert next lines to components.xml:

      <component class="org.domain.testseam.session.Component" scope="application">
        <property name="abc">value1</property>
      </component>
      

      4. Open components.xml in JBOSS Tools XML Editor
      ASSERT: There is problem marker in "<property name="abc">value1</property>" line
      EXECUTE: Click mouse on error icon on left editor's ruler
      ASSERT: Window with list of quick fixes appears:

      Test case 2:
      EXECUTE:
      1. Open home.xhtml in JBOSS Tools HTML Editor
      2. Delete "xmlns:h="http://java.sun.com/jsf/html"" line
      ASSERT: There is problem marker in "<h:panelGrid columns="2">" line
      EXECUTE: Click mouse on error icon on left editor's ruler
      ASSERT: Window with list of quick fixes appears

      Test case 3:
      EXECUTE:
      1. Create hello.jsp page file:

      <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
      
      <f:loadBundle var="Message" basename="demo.Messages" />
      
      <html>
      	<head>
      		<title>Hello!</title>
      	</head>
      
      	<body>
      		<f:view>
      			<h3>
      				<h:outputText value="#{Message.hello_message}" />,
      				<h:outputText value="#{user.name}" />!
      			</h3>
      		</f:view>
      	</body>
      
      </html>
      

      2. Open hello.jsp in JBOSS Tools JSP Editor
      ASSERT: There is problem marker in "<h:outputText value="#

      {Message.hello_message}

      " />," line
      EXECUTE: Click mouse on error icon on left editor's ruler
      ASSERT: Window with list of quick fixes appears

        1. QuickFixesInHTML.png
          QuickFixesInHTML.png
          36 kB
        2. QuickFixesInJSP.png
          QuickFixesInJSP.png
          36 kB
        3. QuickFixesInXML.png
          QuickFixesInXML.png
          60 kB

            dazarov_jira Daniel Azarov (Inactive)
            dazarov_jira Daniel Azarov (Inactive)
            Isaac Rooskov Isaac Rooskov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: