[jbosstools-issues] [JBoss JIRA] Commented: (JBIDE-2671) opening page fails with "div by zero"

Max Rydahl Andersen (JIRA) jira-events at lists.jboss.org
Thu Aug 21 08:10:39 EDT 2008


    [ https://jira.jboss.org/jira/browse/JBIDE-2671?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12426014#action_12426014 ] 

Max Rydahl Andersen commented on JBIDE-2671:
--------------------------------------------

The WTP XML Editor is extensible allowing us to enable code completions. linking and validaiton into the WTP XML Editor. Thus all the things you can do in the source tab in the Visual Page Editor should also be in WTP XML Editor - if it is not I consider that a bug.

About Alpha - you sounded like you were annoyed about the visual part having a bug in the splitter calculation and wanted it to be removed...to that I sayed: It is an alpha - expect bugs :) We will fix this bug and the VPE should be back in good form - lazy init and all.

> opening page fails with "div by zero"
> -------------------------------------
>
>                 Key: JBIDE-2671
>                 URL: https://jira.jboss.org/jira/browse/JBIDE-2671
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: jsp/jsf/xml source editing
>         Environment: eclipse 3.4, debian/unstable, linux 2.6.24.4, nightgly build JBossTools-200808200816-nightly-ALL-linux-gtk.zip
>            Reporter: arne anka
>            Priority: Blocker
>
> tried to open a generated login.xhtml of seam.
> the source tab stays gray, but after several attempts it opened somehow in the "visual/source" tab with some visual rendering (which i did not select! in perefernces "source" tab is set as default, visual part is set to 0%). 
> "source" and "preview" are still gray and after checking these tabs "visual/source" is as well.
> the log shows
> !ENTRY org.eclipse.ui 4 0 2008-08-20 18:32:15.210
> !MESSAGE Unhandled event loop exception
> !STACK 0
> java.lang.ArithmeticException: / by zero
>         at org.eclipse.swt.custom.SashFormLayout.layout(SashFormLayout.java:175)
>         at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1423)
>         at org.eclipse.swt.widgets.Composite.layout(Composite.java:919)
>         at org.eclipse.swt.widgets.Composite.layout(Composite.java:877)
>         at org.jboss.tools.vpe.editor.xpl.CustomSashForm.layout(CustomSashForm.java:232)
>         at org.eclipse.swt.widgets.Composite.layout(Composite.java:840)
>         at org.jboss.tools.vpe.editor.VpeEditorPart.setVisualMode(VpeEditorPart.java:424)
>         at org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor.pageChange(JSPMultiPageEditor.java:228)
>         at org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditorPart$2.widgetSelected(JSPMultiPageEditorPart.java:106)
>         at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228)
>         at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
>         at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1158)
>         at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1182)
>         at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1167)
>         at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1007)
>         at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:3242)
>         at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:2017)
>         at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:320)
>         at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
>         at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1158)
>         at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3401)
>         at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3033)
>         at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382)
>         at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
>         at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198)
>         at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
>         at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
>         at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488)
>         at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
>         at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
>         at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
>         at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
>         at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
>         at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:382)
>         at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
>         at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
>         at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
>                                                                                         
> to me it seems like the visual editor tries to render the page and fails horribly since parameters are missing.
> if this is true, it poses two questions:
> - why is the ve initialized at all
> - why is it not capable to cope with missing parameters -- it should be the case almost every time anything other than plain html is written.
> i got the same error for the iText testpage from the itext seam example 
> jboss-seam-2.0.1.GA/examples/itext/view/pageSize.xhtml
> further attempts to comment out parts of the page resultet in nothing -- the editor tab that was open by default was in no way predictable, and switching to another tab made any tab plain gray.
> even a completely commented out page was not opened.
> below the code of the page, it is completely generated by seam!
> <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
>                       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <ui:composition xmlns="http://www.w3.org/1999/xhtml"
>                 xmlns:s="http://jboss.com/products/seam/taglib"
>                 xmlns:ui="http://java.sun.com/jsf/facelets"
>                 xmlns:f="http://java.sun.com/jsf/core"
>                 xmlns:h="http://java.sun.com/jsf/html"
>                 xmlns:rich="http://richfaces.org/rich"
>                 template="layout/template.xhtml">
> <ui:define name="body">
>     
>     <h:messages styleClass="message"/>
>     
>     <h:form id="login">
>     
>         <rich:panel>
>             <f:facet name="header">Login</f:facet>
>     
>             <p>Please login here</p>
>         
>             <div class="dialog">
>                 <h:panelGrid columns="2" rowClasses="prop" columnClasses="name,value">
>                     <h:outputLabel for="username">Username</h:outputLabel>
>                     <h:inputText id="username" 
>                               value="#{identity.username}"/>
>                     <h:outputLabel for="password">Password</h:outputLabel>
>                     <h:inputSecret id="password" 
>                                 value="#{identity.password}"/>
>                     <h:outputLabel for="rememberMe">Remember me</h:outputLabel>
>                     <h:selectBooleanCheckbox id="rememberMe" 
>                                           value="#{identity.rememberMe}"/>
>                 </h:panelGrid>
>             </div>
>             
>             <p>
>               <i>Note - </i> Please use demo/password to log in the first time.  After logging in you may then
>               use the User Manager link to manage user accounts.
>             </p>
>                 
>         </rich:panel>
>             
>         <div class="actionButtons">
>             <h:commandButton value="Login" action="#{identity.login}"/>
>         </div>
>           
>     </h:form>
>  </ui:define> 
> </ui:composition>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jbosstools-issues mailing list