Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 344017

Summary: [General] Papyrus uses internal methods that don't exist in Eclipse 4.1
Product: [Modeling] Papyrus Reporter: Remy Suen <remy.suen>
Component: CoreAssignee: Remi Schnekenburger <rschnekenburger>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3 CC: 69a2fa5b, cletavernier, david_williams, pwebster, rschnekenburger
Version: 0.9.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 344016    

Description Remy Suen CLA 2011-04-27 14:36:30 EDT
Tried switching perspectives in Eclipse 4.1 and got the following error.

java.lang.NoSuchMethodError: org.eclipse.ui.internal.WorkbenchPage.findPerspective(Lorg/eclipse/ui/IPerspectiveDescriptor;)Lorg/eclipse/ui/internal/Perspective;
	at org.eclipse.papyrus.ui.perspectiveconfiguration.PapyrusPerspectiveListener.perspectiveActivated(PapyrusPerspectiveListener.java:117)
	at org.eclipse.ui.internal.PerspectiveListenerList$1.run(PerspectiveListenerList.java:74)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.runtime.Platform.run(Platform.java:888)
	at org.eclipse.ui.internal.PerspectiveListenerList.fireEvent(PerspectiveListenerList.java:58)
	at org.eclipse.ui.internal.PerspectiveListenerList.firePerspectiveActivated(PerspectiveListenerList.java:72)
	at org.eclipse.ui.internal.WorkbenchWindow.firePerspectiveActivated(WorkbenchWindow.java:1278)
	at org.eclipse.ui.internal.WorkbenchPage.setPerspective(WorkbenchPage.java:3132)
	at org.eclipse.ui.handlers.ShowPerspectiveHandler.openPerspective(ShowPerspectiveHandler.java:146)
	at org.eclipse.ui.handlers.ShowPerspectiveHandler.openOther(ShowPerspectiveHandler.java:118)
	at org.eclipse.ui.handlers.ShowPerspectiveHandler.execute(ShowPerspectiveHandler.java:57)
Comment 1 Remy Suen CLA 2011-04-28 07:43:13 EDT
You are also calling downcasting to the internal class PerspectiveRegistry and calling its getCustomPersp(String) method (which no longer exists).
Comment 2 Remy Suen CLA 2011-04-28 08:00:58 EDT
(In reply to comment #0)
> Tried switching perspectives in Eclipse 4.1 and got the following error.

This pretty much makes 4.1 unusable if you're someone that uses perspectives as an error dialog appears every time you switch perspectives.
Comment 3 Patrick Tessier CLA 2011-04-28 08:52:34 EDT
very thanks for your feedback. ;D

Do your know other methods or other classes to do this job?
Comment 4 Remy Suen CLA 2011-04-28 09:03:17 EDT
(In reply to comment #3)
> Do your know other methods or other classes to do this job?

Can't really say as we don't understand your use cases at the moment.

It seems the updateActionBars() was appended "due to a bug on the refresh". What is this bug?
http://dev.eclipse.org/viewcvs/viewvc.cgi/trunk/plugins/core/org.eclipse.papyrus.ui.perspectiveconfiguration/src/org/eclipse/papyrus/ui/perspectiveconfiguration/PapyrusPerspectiveListener.java?root=MDT_Papyrus&r1=1360&r2=1372

I don't really understand the class as a whole due to the multiple requests to save the perspective as well as its direct manipulation of the perspective's tool items and its action sets.
Comment 5 Remy Suen CLA 2012-01-13 11:47:16 EST
I tried to install Papyrus from the Juno update site and this bug is still there. What exactly is the purpose of this perspective listener?

As stated in comment 2, the Eclipse 4.x SDK is unusable for anyone who uses perspectives because an error dialog will appear every time you switch perspectives.
Comment 6 Eric Moffatt CLA 2012-01-18 13:28:16 EST
What method is being called and why ? I'm not against adding it back into our code as long as it makes some reasonable sense...
Comment 7 Eric Moffatt CLA 2012-01-30 14:56:23 EST
Ping ! I need info in order to see if we can fix this on our side (specifically which internal method(s) you're using)...
Comment 8 Paul Webster CLA 2012-02-14 11:44:09 EST
Moving this to critical.  While Papyrus will still be able to be part of Juno, they would have to provide their own repo and would not be part of the common repo to provide a "3.8 only" option.

PW
Comment 9 Patrick Tessier CLA 2012-02-15 02:56:55 EST
For the moment this plugin has been removed of the release of Juno, we will rework on this in order to fix this problem.
Comment 10 Patrick Tessier CLA 2012-02-16 09:01:10 EST
I have commented this code that implies problems, I will work on that when I will have more time.
done in the revision 7210
Comment 11 Remi Schnekenburger CLA 2012-06-12 11:01:48 EDT
The listener for perspectives has been disabled for now, as we do not see how we could better filter the menus and external contributions from the Papyrus perspective. Perhaps a RCP or activities should be proposed for Papyrus users.

fixed in r8273
Comment 12 Camille Letavernier CLA 2012-08-23 06:12:03 EDT
This task is not critical anymore, but the feature still need to be fixed and re-enabled.

Switching the priority to major.
Comment 13 Camille Letavernier CLA 2013-07-05 12:34:54 EDT
This task can be closed