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 9083291
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T20:44:31+00:00 2026-06-16T20:44:31+00:00

I have one RCP program, with 3 parts – 2 views(on left, 2 parts)

  • 0

I have one RCP program, with 3 parts – 2 views(on left, 2 parts) and various editors(on right and the other part).
On my views i have trees and I can open the editor (other part).
On editor i can open another editor, but i need past an object when I call the editor, i make it on : addMouseListener(new MouseAdapter() {
@Override
public void mouseDown(MouseEvent e) {....

my button:

btnNewButton.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseDown(MouseEvent e) {

                  IHandlerService handlerService = (IHandlerService) getSite().getService(IHandlerService.class);

                  try {
                        handlerService.executeCommand("XPTO.command", null);
                    } catch (Exception ex) {
                        throw new RuntimeException(
                                "XPTO");
                    }
                }
            }); 

my command:

public class CallEditors extends AbstractHandler {

@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
    System.out.println("calledEditor");

    // Get the view
    IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event);

    IWorkbenchPage page = window.getActivePage();

    Editor navEditor = (Editor) page.findEditor(Editor.IDI);

}
}

thanks


I have the answer:

btnNewButton.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseDown(MouseEvent e) {

                // Get the view
                IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();

                IWorkbenchPage page = window.getActivePage();


                    Object obj = btnNewButton.getData();

                    if (obj != null) {


                      xPTO input = new xPTO();
                          try {

                                 page.openEditor(input, xptoEditor.ID, false);  
                                } catch (PartInitException e1) {
                                    throw new RuntimeException(e1);
                                }
                      }

}

  • 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-16T20:44:32+00:00Added an answer on June 16, 2026 at 8:44 pm

    Use IWorkbenchPage#openEditor(..)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my RCP application I have two types of editors (one is for *.xsd
I have one long excel sheet with books details of a library..can i import
I am programming an Eclipse RCP application. I have a View on the left
Have one Doubt In MVC Architecture we can able to pass data from Controller
I have a RCP project where I cannot fix a NoClassDefFoundError: One plugin depends
I have an RCP application with an welcome page implementing org.eclipse.ui.intro.config in one of
I have created a simple Eclipse RCP application where I can open multiple editor
I have one user that can't run my iPhone app. It starts up fine
i have one jtable with listselectionlistener i can dynamically added the new rows in
I have a personal Eclipse RCP product ( com.example.product ) based on one personal

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.