Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8640711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T11:20:47+00:00 2026-06-12T11:20:47+00:00

I am working on a test project and followed Vogella’s RCP tutorial . After

  • 0

I am working on a test project and followed Vogella’s RCP tutorial. After that I made some changes on it, eg. created a JFace TreeView. Now I want that if the user double clicks on a TreeView element it opens up another Part. I have the command for it but, I do not know how to call it. If you look at the tutorial you may notice it only uses Parts, not Views and, I do not have an Application.java class that starts the workbench. Therefore the following methods do not work for me:

  1. IHandlerService handlerService = (IHandlerService) viewer.getSite().getService(IHandlerService.class);
  2. IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
    IHandlerService handlerService = (IHandlerService)window.getService(IHandlerService.class);
    handlerService.executeCommand(cmdID, null);

Both of them gives me NullPointerException.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T11:20:48+00:00Added an answer on June 12, 2026 at 11:20 am

    How about this old standby:

    Command command = ((ICommandService)getSite().getService(ICommandService.class)).getCommand(commandId);
    ...
    final Event trigger = new Event();
    ExecutionEvent executionEvent = ((IHandlerService)getSite().getService(IHandlerService.class)).createExecutionEvent(command, trigger);
    command.executeWithChecks(executionEvent);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a utility that will be used to test the project I'm
After working on some test code for open ID authentication, I had a break
I was working on an xcode project called Test, which I then made a
I'm working currently on a test project in order to practice some of the
We have multiple developers working on the same unit test project that have unique
Background: Trevor was working on a test project solely for the purpose of trying
I'm working on a project and I would like to test it on slow
I'm currently working on an Silverlight 3 project, I'm using 2 machines to test
I have added some animation using jquery but it's not working: $('.test-container').click(function(){ $(this).css('background-color', 'rgb(119,
I'm working with a test project based on WhoCanHelpMe, which is based on Sharp

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.