WorkbenchPage setPerspective - CoolBar problem [message #660462] |
Fri, 18 March 2011 10:40  |
Eclipse User |
|
|
|
This is a multi-part message in MIME format.
--------------090106090204030804010704
Content-Type: text/plain; charset=ISO-8859-2; format=flowed
Content-Transfer-Encoding: 7bit
I have
java.lang.NullPointerException at
org.eclipse.ui.internal.WorkbenchPage.setPerspective(Workben chPage.java:3715)
because I don't use CoolBar in my PresentationFactory:
Solution for me is extends: if (mgr != null) to if (mgr != null &&
mgr.getControl2() != null)
I use RAP 1.4 M5+
--------------090106090204030804010704
Content-Type: text/plain;
name="patch.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="patch.txt"
Index: Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java
============================================================ =======
RCS file: /cvsroot/rt/org.eclipse.rap/runtime.ui/org.eclipse.rap.ui.wo rkbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java,v
retrieving revision 1.7
diff -u -r1.7 WorkbenchPage.java
--- Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java 28 Dec 2010 14:47:59 -0000 1.7
+++ Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java 18 Mar 2011 14:27:28 -0000
@@ -3699,7 +3699,7 @@
// switched. Turn off redraw to help with this.
ICoolBarManager2 mgr = (ICoolBarManager2) window.getCoolBarManager2();
try {
- if (mgr != null)
+ if (mgr != null && mgr.getControl2() != null)
mgr.getControl2().setRedraw(false);
getClientComposite().setRedraw(false);
@@ -3711,7 +3711,7 @@
});
} finally {
getClientComposite().setRedraw(true);
- if (mgr != null)
+ if (mgr != null && mgr.getControl2() != null)
mgr.getControl2().setRedraw(true);
IWorkbenchPart part = getActivePart();
if (part != null) {
--------------090106090204030804010704--
|
|
|
|
Re: WorkbenchPage setPerspective - CoolBar problem [message #660473 is a reply to message #660462] |
Fri, 18 March 2011 10:59  |
Eclipse User |
|
|
|
Hi Michal,
could you provide a snippet to reproduce it (attach it to the bug 326289
and 254936)? Please test your snippet in RCP. If it is reproducible in
RCP too, please reopen this bug:
254936: [Coolbar] Cannot switch perspective in a RCP application without
Coolbars
https://bugs.eclipse.org/bugs/show_bug.cgi?id=254936
Thanks,
Ivan
On 3/18/2011 4:40 PM, Michal NkD Nikodím wrote:
> I have
> java.lang.NullPointerException at
> org.eclipse.ui.internal.WorkbenchPage.setPerspective(Workben chPage.java:3715)
>
> because I don't use CoolBar in my PresentationFactory:
>
> Solution for me is extends: if (mgr != null) to if (mgr != null &&
> mgr.getControl2() != null)
>
> I use RAP 1.4 M5+
>
>
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.26059 seconds