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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T22:00:56+00:00 2026-05-31T22:00:56+00:00

I have an RCP application that uses extension points to defined various pluggable bits

  • 0

I have an RCP application that uses extension points to defined various pluggable bits of functionality.

In some cases, I’ve got an extension point that can logically have many implementations active at a time: say, a DataFeed point, and the application can support many of them.

In other cases, it only makes sense for there to be a single implementation active in a running instance of the application. I do want users to be able to switch between them though, and uninstalling/reinstalling plugins to do so is not very user friendly.

The way I’ve come up with to handle this is to define the extension point as having a factory using IExecutableExtensionFactory, then each plugin has to have a preference to say whether it’s active. If it’s not active, the factory returns null, and the application looks at the next option. If none, then use some reasonable default.

This doesn’t feel quite right though, and I wonder if there’s an alternate approach that I haven’t hit on yet to model this type of behavior. Anyone have ways of doing this that feel better?

  • 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-05-31T22:00:58+00:00Added an answer on May 31, 2026 at 10:00 pm

    In your solution, the responsibility for deciding whether an extension is active or not is assigned to extension providers (the factories). Regardless of the actual logic of choosing active extension (at any given moment) I’d say that it would be better to have the control in extension point provider, that is, in the class that makes calls to the factories. That’s because extension providers don’t know about each other (or shouldn’t know).

    This is actually pretty common situation in Eclipse and it is usually solved by having extensions define additional attributes for extension point handler to decide which extension should be active depending on workbench state (see, for example, enabledWhen attribute of org.eclipse.ui.handlers extension point) or user preferences.

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

Sidebar

Related Questions

I have an Eclipse RCP application which uses some bindings from org.eclipse.ui.defaultAcceleratorConfiguration in addition
I have an Eclipse RCP application that will launch properly after a clean install
I have a plug-in to an Eclipse RCP application that has a view. After
I have a RCP application that reuses org.eclipse.ui.navigator.CommonNavigator to give us a project view.
I have an Eclipse RCP application that I'd like to make available to end
I have a maven application that I'd like to convert to Eclipse RCP. My
I have a multiple user/location RCP application that currently utilizes several user configurable options.
I have created an eclipse RCP application with .nl1 fragments for some of the
I'm developing an Eclipse RCP application. I have been told that the UI part
I'm developing an Eclipse RCP based application, that uses the resource model of eclipse

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.