Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 139536 Details for
Bug 280409
[Design] View action throws NullPointerException when there is no handler
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
NullpointerException Handling
handlerNullPointerExc (text/plain), 2.85 KB, created by
Holger Staudacher
on 2009-06-18 08:20:08 EDT
(
hide
)
Description:
NullpointerException Handling
Filename:
MIME Type:
Creator:
Holger Staudacher
Created:
2009-06-18 08:20:08 EDT
Size:
2.85 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rap.design.example >Index: src/org/eclipse/rap/internal/design/example/business/managers/BusinessCoolBarManager.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.ui/org.eclipse.rap.design.example/src/org/eclipse/rap/internal/design/example/business/managers/BusinessCoolBarManager.java,v >retrieving revision 1.2 >diff -u -r1.2 BusinessCoolBarManager.java >--- src/org/eclipse/rap/internal/design/example/business/managers/BusinessCoolBarManager.java 15 Jun 2009 17:02:53 -0000 1.2 >+++ src/org/eclipse/rap/internal/design/example/business/managers/BusinessCoolBarManager.java 18 Jun 2009 12:20:26 -0000 >@@ -17,6 +17,7 @@ > import org.eclipse.core.commands.Command; > import org.eclipse.core.commands.ExecutionEvent; > import org.eclipse.core.commands.ExecutionException; >+import org.eclipse.core.commands.IHandler; > import org.eclipse.core.runtime.Assert; > import org.eclipse.jface.action.Action; > import org.eclipse.jface.action.ActionContributionItem; >@@ -688,7 +689,10 @@ > public void widgetSelected( final SelectionEvent e ) { > try { > Command buttonCommand = ( Command ) button.getData(); >- buttonCommand.getHandler().execute( new ExecutionEvent() ); >+ IHandler handler = buttonCommand.getHandler(); >+ if( handler != null ) { >+ handler.execute( new ExecutionEvent() ); >+ } > } catch( ExecutionException e1 ) { > e1.printStackTrace(); > } >Index: src/org/eclipse/rap/internal/design/example/business/CommandUtil.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.ui/org.eclipse.rap.design.example/src/org/eclipse/rap/internal/design/example/business/CommandUtil.java,v >retrieving revision 1.1 >diff -u -r1.1 CommandUtil.java >--- src/org/eclipse/rap/internal/design/example/business/CommandUtil.java 28 May 2009 13:18:24 -0000 1.1 >+++ src/org/eclipse/rap/internal/design/example/business/CommandUtil.java 18 Jun 2009 12:20:26 -0000 >@@ -13,6 +13,7 @@ > import org.eclipse.core.commands.CommandManager; > import org.eclipse.core.commands.ExecutionEvent; > import org.eclipse.core.commands.ExecutionException; >+import org.eclipse.core.commands.IHandler; > import org.eclipse.jface.action.Action; > import org.eclipse.jface.action.IAction; > import org.eclipse.jface.action.MenuManager; >@@ -107,7 +108,10 @@ > Command command = param.getCommand(); > if( command != null ) { > try { >- command.getHandler().execute( new ExecutionEvent() ); >+ IHandler handler = command.getHandler(); >+ if( handler != null ) { >+ handler.execute( new ExecutionEvent() ); >+ } > } catch( final ExecutionException e ) { > e.printStackTrace(); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 280409
:
139536
|
139549