Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » WorkbenchPage setPerspective - CoolBar problem
WorkbenchPage setPerspective - CoolBar problem [message #660462] Fri, 18 March 2011 14:40 Go to next message
NkD Missing name is currently offline NkD Missing nameFriend
Messages: 61
Registered: July 2009
Member
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 #660472 is a reply to message #660462] Fri, 18 March 2011 14:49 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi Michal,
we already has this bug opened:
326289: NullPointerException in Workbenchpage with disabled coolbar
https://bugs.eclipse.org/bugs/show_bug.cgi?id=326289
but I thought that it has been fixed with the migration to the workbench
3.7 code base. I will check it against RCP (workbench 3.7) again.
Best,
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+
>
>
>
>
>
Re: WorkbenchPage setPerspective - CoolBar problem [message #660473 is a reply to message #660462] Fri, 18 March 2011 14:59 Go to previous message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
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+
>
>
>
>
>
Previous Topic:Accessing properties file through jar
Next Topic:How to access MC pojo beans from a RAP app
Goto Forum:
  


Current Time: Tue Apr 23 11:55:34 GMT 2024

Powered by FUDForum. Page generated in 0.21682 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top