Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » RCP Start View
RCP Start View [message #631739] Fri, 08 October 2010 15:06 Go to next message
Crombix  is currently offline Crombix Friend
Messages: 11
Registered: October 2010
Junior Member
Hi,
Can anybody tell me how to add a simple View to an existing RCP-application ? Waht I want to do, is simply to show a view (an image) on my RCP while nothing is selected in the pop up menu !! do I need an other View to impelement for this, or there is an other way to realize this ? maybe some changes in the Application.java Class (start()) ?! I'm not familiar with RCP.. please help !! Greets, Crombix
Re: RCP Start View [message #631788 is a reply to message #631739] Fri, 08 October 2010 18:21 Go to previous messageGo to next message
eshvar60  is currently offline eshvar60 Friend
Messages: 51
Registered: March 2010
Member
Hey Crombix,

Can you tell us what you mean by "View"? Are you displaying the image as a separate view in eclipse(like the Task List view or the Console view) or just an image in another view on a composite?

If its the former you need to create the view class by extending ViewPart. In your plugin.xml extends the org.eclipse.ui.views extension point and add your new view to that point.

Then in your Perspecitve class add the view to the layout.

There are lots of tutorials and if you have more questions, post away Smile
Re: RCP Start View [message #631915 is a reply to message #631788] Sun, 10 October 2010 14:31 Go to previous messageGo to next message
Crombix  is currently offline Crombix Friend
Messages: 11
Registered: October 2010
Junior Member
Hi eshvar60,
thank very much for the reply !! I've tried to create a new plugIn view like described in the following link: http://www.eclipse.org/articles/viewArticle/ViewArticle2.htm l
it works, but as I've tried to include this view to my RCP I couldn't see any changes... I've extended: org.eclipse.ui.views in my RCP with a new view and then added the View Class wich extend the Viewpart but without result.. That confuse me.. because as eclipse plugin I can show my new View by pressing window --> show view .etc.. but in the RCP I don't habe window in my Menubar !!! thanks for helping me !! Crombix.
Re: RCP Start View [message #632646 is a reply to message #631915] Wed, 13 October 2010 17:20 Go to previous messageGo to next message
eshvar60  is currently offline eshvar60 Friend
Messages: 51
Registered: March 2010
Member
Hey Crombix,

So if I understand it correctly you have a plugin that contains your main application? You are contributing a view to that application by extending the org.eclipse.ui.views. This is all good and correct.

The one item that you are missing is that the view is never added to your perspective. So what you need to do is either go to your plugin.xml and see if there is org.eclipse.ui.perspectiveExtensions is extended with your applications perspective class. If it is then click on that extension and press view. Then type in your view id.

Otherwise find the perspective class used my your application and in the createInitialLayout method do:

layout.addView(ViewId, ..............);
Re: RCP Start View [message #632763 is a reply to message #632646] Thu, 14 October 2010 08:28 Go to previous message
Crombix  is currently offline Crombix Friend
Messages: 11
Registered: October 2010
Junior Member
Hi eshvar60,

thank you very much for the answers !! I've tried something similar to that ! After extending the viewPart-Class, I've extended

org.eclipse.ui.actionSets by implementing the Interface IWorkbenchWindowActionDelegate! in its run()-Methode I've

declared an object from page, an then called my view with page.showView(View ID) and it works very well Very Happy now I can click a

toolbar button to show my view.. I'm trying right now to get it working with your solution !! Thanks, Crombix
Previous Topic:popupMenu visibility restrictions
Next Topic:More than one Handler for a command
Goto Forum:
  


Current Time: Thu Dec 18 12:39:16 GMT 2014

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

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