Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    New to the CF scene
    Join Date
    Jun 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    [Eclipse RCP]Create view with parameters or get ViewPart

    Hello,

    I am currently developing an eclipse rcp application.
    I want to implement the model view controller pattern but because RCP handles his own views. But the only thing i have to know is:

    How can i create a view in a RCP application with parameters in the constructor?
    Or: can i get a ViewPart object from my workbench?

    Edit:
    I have made a little progress.
    You can get a view by using:
    PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(View.ID);
    but this line gives me a nullpointer exception.
    The nullpointer is (most likely) created by the method findView because my ViewReferences is null (or empty).


    Greetz,
    LeDieu
    Last edited by LeDieu; 12-15-2008 at 01:31 PM.


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •