| Summary: | [Design] View action throws NullPointerException when there is no handler | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Hasan Ceylan <hceylan> | ||||||
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | ||||||||
| Version: | unspecified | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Whiteboard: | sr121 | ||||||||
| Attachments: |
|
||||||||
|
Description
Hasan Ceylan
for some reason handler is null for the action.
Here's the stack trace. Action is declared using the plugin.xml and made
available based on "selection" and "instance of" expressions...
Hasan
java.lang.NullPointerException
at
org.eclipse.rap.internal.design.example.business.managers.BusinessCoolBarManager$6.widgetSelected(BusinessCoolBarManager.java:691)
at
org.eclipse.swt.events.SelectionEvent.dispatchToObserver(SelectionEvent.java:176)
at org.eclipse.rwt.internal.events.Event.processEvent(Event.java:44)
at org.eclipse.swt.events.TypedEvent.processEvent(TypedEvent.java:125)
at org.eclipse.swt.events.TypedEvent.executeNext(TypedEvent.java:165)
at
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.readAndDispatch(RWTLifeCycle.java:244)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:764)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2485)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2444)
at org.eclipse.ui.internal.Workbench.access$5(Workbench.java:2295)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:514)
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:157)
at com.turquality.server.rap.Application.createUI(Application.java:58)
at
org.eclipse.rwt.internal.lifecycle.EntryPointManager.createUI(EntryPointManager.java:92)
at
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWTLifeCycle.java:231)
at
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadController.run(RWTLifeCycle.java:119)
at java.lang.Thread.run(Thread.java:636)
Created attachment 139536 [details]
NullpointerException Handling
The attached solution should fix this Error. Can you verify this Hasan?
Nope, Solves the null pointer exception but the problem here is the handler is always null. Normally it should update based on the selection... As you may already know, handlers are dynamic and assigned to their respective commands based on contextual changes in the workbench, like selection... Hasan Created attachment 139549 [details]
HandlerService Solution
Hi Hasan,
I was on the wrong trail. Now it uses the HandlerService to execute commands, this should listen to selection changes and so on. Can you verify this, just check out the new attachment.
Committed to CVS HEAD and 1.2 maintenance. |