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

VPE throws java.lang.NullPointerException, while editing font-family

    Details

      Description

      STEPS TO REPRODUCE:
      1. Create new HTML file and open it in VPE.
      2. Enter the following line in the file:
      <button style='FONT-FAMILY: "serif"'>bla bla</button>
      3. Delete quote symbol (') after "serif".

      RESULT:
      java.lang.NullPointerException is thrown:

      java.lang.NullPointerException
      at org.jboss.tools.vpe.editor.toolbar.format.FontNameFormatController.setToolbarItemEnabled(FontNameFormatController.java:92)
      at org.jboss.tools.vpe.editor.toolbar.format.FormatControllerManager.selectionChanged(FormatControllerManager.java:153)
      at org.jboss.tools.vpe.editor.toolbar.format.FormatControllerManager.selectionChanged(FormatControllerManager.java:106)
      at org.jboss.tools.vpe.editor.VpeController.selectionChanged(VpeController.java:2661)
      at org.eclipse.wst.sse.ui.StructuredTextEditor$5.run(StructuredTextEditor.java:627)
      at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      at org.eclipse.wst.sse.ui.StructuredTextEditor$StructuredSelectionProvider.fireSelectionChanged(StructuredTextEditor.java:625)
      at org.eclipse.wst.sse.ui.StructuredTextEditor$StructuredSelectionProvider.handleSelectionChanged(StructuredTextEditor.java:717)
      at org.eclipse.wst.sse.ui.StructuredTextEditor$3.selectionChanged(StructuredTextEditor.java:593)
      at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162)
      at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      at org.eclipse.core.runtime.Platform.run(Platform.java:888)
      at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48)
      at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
      at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:160)
      at org.eclipse.jface.text.TextViewer.fireSelectionChanged(TextViewer.java:2714)
      at org.eclipse.jface.text.TextViewer.selectionChanged(TextViewer.java:2693)
      at org.eclipse.jface.text.TextViewer$4.widgetSelected(TextViewer.java:1818)
      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:1003)
      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1027)
      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1012)
      at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:770)
      at org.eclipse.swt.custom.StyledText.sendSelectionEvent(StyledText.java:7486)
      at org.eclipse.swt.custom.StyledText.clearSelection(StyledText.java:1706)
      at org.eclipse.swt.custom.StyledText.setSelection(StyledText.java:8834)
      at org.eclipse.swt.custom.StyledText.updateSelection(StyledText.java:9472)
      at org.eclipse.swt.custom.StyledText.handleTextChanged(StyledText.java:6095)
      at org.eclipse.swt.custom.StyledText$6.textChanged(StyledText.java:5522)
      at org.eclipse.jface.text.DefaultDocumentAdapter.fireTextChanged(DefaultDocumentAdapter.java:347)
      at org.eclipse.jface.text.DefaultDocumentAdapter.documentChanged(DefaultDocumentAdapter.java:291)
      at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument._fireDocumentChanged(BasicStructuredDocument.java:456)
      at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.fireStructuredDocumentEvent(BasicStructuredDocument.java:1178)
      at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.internalReplaceText(BasicStructuredDocument.java:1960)
      at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.replaceText(BasicStructuredDocument.java:2415)
      at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.replaceText(BasicStructuredDocument.java:2400)
      at org.eclipse.wst.sse.core.internal.text.JobSafeStructuredDocument.access$2(JobSafeStructuredDocument.java:1)
      at org.eclipse.wst.sse.core.internal.text.JobSafeStructuredDocument$3.run(JobSafeStructuredDocument.java:137)
      at org.eclipse.wst.sse.ui.EditorExecutionContext.execute(EditorExecutionContext.java:147)
      at org.eclipse.wst.sse.core.internal.text.JobSafeStructuredDocument.replaceText(JobSafeStructuredDocument.java:144)
      at org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument.replace(BasicStructuredDocument.java:2360)
      at org.eclipse.wst.sse.core.internal.text.JobSafeStructuredDocument.access$0(JobSafeStructuredDocument.java:1)
      at org.eclipse.wst.sse.core.internal.text.JobSafeStructuredDocument$1.run(JobSafeStructuredDocument.java:88)
      at org.eclipse.wst.sse.ui.EditorExecutionContext.execute(EditorExecutionContext.java:147)
      at org.eclipse.wst.sse.core.internal.text.JobSafeStructuredDocument.replace(JobSafeStructuredDocument.java:95)
      at org.eclipse.jface.text.DefaultDocumentAdapter.replaceTextRange(DefaultDocumentAdapter.java:248)
      at org.eclipse.swt.custom.StyledText.modifyContent(StyledText.java:6637)
      at org.eclipse.swt.custom.StyledText.sendKeyEvent(StyledText.java:7446)
      at org.eclipse.swt.custom.StyledText.doContent(StyledText.java:2442)
      at org.eclipse.swt.custom.StyledText.handleKey(StyledText.java:5817)
      at org.eclipse.swt.custom.StyledText.handleKeyDown(StyledText.java:5842)
      at org.eclipse.swt.custom.StyledText$7.handleEvent(StyledText.java:5542)
      at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1027)
      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1012)
      at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1040)
      at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1036)
      at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1368)
      at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4053)
      at org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:346)
      at org.eclipse.swt.widgets.Control.windowProc(Control.java:3946)
      at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:342)
      at org.eclipse.swt.widgets.Display.windowProc(Display.java:4619)
      at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
      at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2411)
      at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3501)
      at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
      at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
      at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
      at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
      at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
      at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
      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:194)
      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:368)
      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:585)
      at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
      at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
      at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
      at org.eclipse.equinox.launcher.Main.main(Main.java:1287)

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                aklimkovich Anton Klimkovich
                Reporter:
                yradtsevich Yahor Radtsevich
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: