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

JUnit Content Assist tests don't work with WTP 3.2.0

XMLWordPrintable

      Content Assist Tests aren't able to work with WTP 3.2.0 because of its changes against the previous version.

      The CA Tests were proposed to do the following steps while testing:

      • Find the editors CA Processors from the editor's configuration using the reflection API;
      • Call computeProposals() method on each CA Processor found to collect proposals
      • Compare the proposals collected with some template depending on the test

      For WTP 3.2.0 it is not enough just to call the CA Processor's computeProposals() method to get it work. Some specific initialization things are to be performed before the call to computeProposals(). Without this initialization the following exception appears:

      !ENTRY org.eclipse.wst.sse.ui 4 4 2010-08-13 14:17:12.114
      !MESSAGE null
      !STACK 0
      java.lang.NullPointerException
      at org.eclipse.wst.sse.ui.contentassist.StructuredContentAssistProcessor.isFirstPage(StructuredContentAssistProcessor.java:741)
      at org.eclipse.wst.sse.ui.contentassist.StructuredContentAssistProcessor.collectProposals(StructuredContentAssistProcessor.java:449)
      at org.eclipse.wst.sse.ui.contentassist.StructuredContentAssistProcessor.computeCompletionProposals(StructuredContentAssistProcessor.java:244)
      at org.eclipse.wst.sse.ui.internal.contentassist.CompoundContentAssistProcessor.computeCompletionProposals(CompoundContentAssistProcessor.java:126)
      at org.jboss.tools.jst.jsp.test.ca.JstJspJbide1585Test.testJstJspJbide1585(JstJspJbide1585Test.java:60)
      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 junit.framework.TestCase.runTest(TestCase.java:168)
      at junit.framework.TestCase.runBare(TestCase.java:134)
      at junit.framework.TestResult$1.protect(TestResult.java:110)
      at junit.framework.TestResult.runProtected(TestResult.java:128)
      at junit.framework.TestResult.run(TestResult.java:113)
      at junit.framework.TestCase.run(TestCase.java:124)
      at junit.framework.TestSuite.runTest(TestSuite.java:232)
      at junit.framework.TestSuite.run(TestSuite.java:227)
      at junit.framework.TestSuite.runTest(TestSuite.java:232)
      at junit.framework.TestSuite.run(TestSuite.java:227)
      at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
      at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
      at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
      at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.main(RemotePluginTestRunner.java:61)
      at org.eclipse.pde.internal.junit.runtime.UITestApplication$1.run(UITestApplication.java:116)
      at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
      at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
      at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4012)
      at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3631)
      at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2416)
      at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2380)
      at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2229)
      at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:504)
      at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
      at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:497)
      at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
      at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
      at org.eclipse.pde.internal.junit.runtime.UITestApplication.start(UITestApplication.java:47)
      at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
      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:369)
      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:619)
      at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
      at org.eclipse.equinox.launcher.Main.run(Main.java:1406)
      at org.eclipse.equinox.launcher.Main.main(Main.java:1382)

            vrubezhny Victor Rubezhny (Inactive)
            vrubezhny Victor Rubezhny (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: