Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » No PerspectiveBarManager class in RCP Project Eclipse12(Eclipse3.5 update to Eclipse4.12, Some class is lost and invalid in jar package of org.eclipse.ui.worbench, For instance the class PerspectiveBarManager all lost,but this class in package of eclispe3)
No PerspectiveBarManager class in RCP Project Eclipse12 [message #1809498] Wed, 17 July 2019 01:56 Go to next message
wang xianlong is currently offline wang xianlongFriend
Messages: 2
Registered: July 2019
Junior Member
//* set perspective
final PerspectiveBarManager perspBar = window.getPerspectiveBar();
IPerspectiveRegistry perspReg = WorkbenchPlugin.getDefault().getPerspectiveRegistry();


for (IContributionItem item: perspBar.getItems()) {
if ( !item.getId().equals(HomePerspective.ID) ){
perspBar.remove(item);
}
//System.out.println(item.getId());
if (item instanceof PerspectiveBarContributionItem) {
PerspectiveBarContributionItem pitem = (PerspectiveBarContributionItem)item;

//System.out.println(pitem.getId());
} else if (item instanceof PerspectiveBarNewContributionItem) {
//System.out.println("new " + item.getId());
//perspBar.remove(item);
}
// }
Re: No PerspectiveBarManager class in RCP Project Eclipse12 [message #1809508 is a reply to message #1809498] Wed, 17 July 2019 07:29 Go to previous messageGo to next message
Rolf Theunissen is currently offline Rolf TheunissenFriend
Messages: 160
Registered: April 2012
Senior Member
You are repeating your statement: Indeed there is no internal class PerspectiveBarManager in Eclipse 4.x

https://www.eclipse.org/forums/index.php/t/1099645/
Re: No PerspectiveBarManager class in RCP Project Eclipse12 [message #1809509 is a reply to message #1809508] Wed, 17 July 2019 07:33 Go to previous messageGo to next message
Rolf Theunissen is currently offline Rolf TheunissenFriend
Messages: 160
Registered: April 2012
Senior Member
But what are you trying to accomplish? Please give more context and ask a question.
By just dropping some lines of code, nobody can understand what you are trying to do, let alone give a reasonable answer.
Re: No PerspectiveBarManager class in RCP Project Eclipse12 [message #1817779 is a reply to message #1809509] Fri, 29 November 2019 03:20 Go to previous messageGo to next message
kaizao qin is currently offline kaizao qinFriend
Messages: 6
Registered: November 2019
Junior Member
if i wanna upgrade this code ,In What ways i can do 。would you like give me some demo about this?
Re: No PerspectiveBarManager class in RCP Project Eclipse12 [message #1817856 is a reply to message #1817779] Sun, 01 December 2019 11:36 Go to previous messageGo to next message
Rolf Theunissen is currently offline Rolf TheunissenFriend
Messages: 160
Registered: April 2012
Senior Member
Still I don't see the question *what* you are trying to accomplish. Without a clear question don't expect an answer.

Guessing from the comments in code, have a look at EPartService#switchPerspective
Re: No PerspectiveBarManager class in RCP Project Eclipse12 [message #1818014 is a reply to message #1817856] Wed, 04 December 2019 08:47 Go to previous messageGo to next message
kaizao qin is currently offline kaizao qinFriend
Messages: 6
Registered: November 2019
Junior Member

Thanks for your reply. For some reason, the code cannot be displayed. What I want to know is how to display a perspective view in eclipse4. There is too little information about Eclipse4.x RCP .
Re: No PerspectiveBarManager class in RCP Project Eclipse12 [message #1818026 is a reply to message #1818014] Wed, 04 December 2019 12:41 Go to previous messageGo to next message
Rolf Theunissen is currently offline Rolf TheunissenFriend
Messages: 160
Registered: April 2012
Senior Member
Many information can be found about Eclipse 4.x RCP development, as start use https://wiki.eclipse.org/Eclipse4/RCP and check out the tutorials.

Of course there are also search engines, then you find questions/answers like this:
https://www.eclipse.org/forums/index.php/t/351180/
Re: No PerspectiveBarManager class in RCP Project Eclipse12 [message #1818070 is a reply to message #1818026] Thu, 05 December 2019 09:10 Go to previous messageGo to next message
kaizao qin is currently offline kaizao qinFriend
Messages: 6
Registered: November 2019
Junior Member
I brower website you provied ,but it didn't suit for me .I wannder to know has some class that can replace PerspectiveBarManager.
Re: No PerspectiveBarManager class in RCP Project Eclipse12 [message #1818072 is a reply to message #1817856] Thu, 05 December 2019 09:14 Go to previous messageGo to next message
kaizao qin is currently offline kaizao qinFriend
Messages: 6
Registered: November 2019
Junior Member
what i wanna to do is make the smallest changes to migrate my eclipse3 project to eclipse4.x. The problem I have now is that there is no PerspectiveBarManage class after eclipse4.x. I want to find an alternative to this class in eclipse4.x
Re: No PerspectiveBarManager class in RCP Project Eclipse12 [message #1818074 is a reply to message #1818072] Thu, 05 December 2019 09:34 Go to previous messageGo to next message
Rolf Theunissen is currently offline Rolf TheunissenFriend
Messages: 160
Registered: April 2012
Senior Member
PerspectiveBarManager is gone, its functionality has been replaced by the Eclipse E4 model. It was a *internal* class, so no backward compatibility is provided. That is the risk of using internal API, it can break and no support is provided when it breaks.

- What is this piece of code trying to accomplish? Is this functionality essential to your application?
- Have a look at WorkbenchAdvisor#getInitialWindowPerspectiveId, does the code do something like this?
- Is there another official e3 interface that provides the functionality you want?
- Otherwise you need to learn about Eclipse E4 RCP development and the application model first. After that you can go to advanced topics like having perspectives in your E4 RCP application. But this will not be a small migration.
Re: No PerspectiveBarManager class in RCP Project Eclipse12 [message #1818076 is a reply to message #1818074] Thu, 05 December 2019 09:58 Go to previous messageGo to next message
kaizao qin is currently offline kaizao qinFriend
Messages: 6
Registered: November 2019
Junior Member
I get. maybe i should consider reCoding my code in Eclipse4 style.thanks for your reply
Re: No PerspectiveBarManager class in RCP Project Eclipse12 [message #1818430 is a reply to message #1818076] Mon, 16 December 2019 07:32 Go to previous message
kaizao qin is currently offline kaizao qinFriend
Messages: 6
Registered: November 2019
Junior Member
According to the eclipse code I found that eclipse4 setProperty method in ModeledPlaceholderFolderLayout was commented .My project was use it to mark layout
Previous Topic:Need to "Close / Open project" - after EACH edit ( CDT ) !
Next Topic:Lock Folder Windows 10
Goto Forum:
  


Current Time: Fri Aug 07 19:57:23 GMT 2020

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

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

Back to the top