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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:33:06+00:00 2026-06-11T22:33:06+00:00

I’m writing an Eclipse plugin that allows easier resource editing for Android. When user

  • 0

I’m writing an Eclipse plugin that allows easier resource editing for Android. When user clicks on any XML resource file inside the project, an editor opens that allows editing all the resources in the project at once.

I’d like to add a capability to open the same file in a separate, default Android resource editor. I know the id of that editor, but I don’t have access to its class.

Calling IDE.openEditor does nothing, because an editor is already opened for that file, even though I specify the id of another, Android editor.

How to force Eclipse to open another editor for the same input?

On the other hand, is it possible to embed another editor in a MultiPageEditorPart if I have access only to its id, not its class?

  • 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-11T22:33:08+00:00Added an answer on June 11, 2026 at 10:33 pm

    The IDE.openEditor methods call at the end the corresponding IWorkbenchPage methods to open the editor.

    The method that could be useful in your case is
    org.eclipse.ui.IWorkbenchPage.openEditor(IEditorInput, String, boolean, int)

        /**
         * Opens an editor on the given input.
         * <p>
         * If this page already has an editor open that matches the given input
         * and/or editor id (as specified by the matchFlags argument), that editor
         * is brought to the front; otherwise, a new editor is opened. Two editor
         * inputs are considered the same if they equal. See
         * <code>Object.equals(Object)<code>
         * and <code>IEditorInput</code>. If <code>activate == true</code> the editor
         * will be activated.  
         * </p><p>
         * The editor type is determined by mapping <code>editorId</code> to an editor
         * extension registered with the workbench.  An editor id is passed rather than
         * an editor object to prevent the accidental creation of more than one editor
         * for the same input. It also guarantees a consistent lifecycle for editors,
         * regardless of whether they are created by the user or restored from saved 
         * data.
         * </p>
         * 
         * @param input the editor input
         * @param editorId the id of the editor extension to use
         * @param activate if <code>true</code> the editor will be activated
         * @param matchFlags a bit mask consisting of zero or more of the MATCH_* constants OR-ed together
         * @return an open editor, or <code>null</code> if an external editor was opened
         * @exception PartInitException if the editor could not be created or initialized
         * 
         * @see #MATCH_NONE
         * @see #MATCH_INPUT
         * @see #MATCH_ID
         * @since 3.2
         */
        public IEditorPart openEditor(final IEditorInput input,
            final String editorId, final boolean activate, final int matchFlags)
            throws PartInitException;
    

    you need to call it and pass it MATCH_ID | MATCH_INPUT so that it takes the editor id into account when trying to determine whether the existing editor should be reused or a new one should be created.

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

Sidebar

Related Questions

In my XML file chapters tag has more chapter tag.i need to display chapters
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I'm parsing an XML file, the creators of it stuck in a bunch social
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function

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.