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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T05:46:28+00:00 2026-06-12T05:46:28+00:00

I am using Eclipse 4.2 Juno, Java 1.6. I have two parts in my

  • 0

I am using Eclipse 4.2 Juno, Java 1.6. I have two parts in my application. One part is registering the SelectionChangedListener:

@Inject
private ESelectionService selectionService;

@PostConstruct
public void init() {
    TreeViewer bsTreeViewer = new TreeViewer(tabFolder, SWT.BORDER);
    /* some other stuff */
    // Event declaration
    bsTreeViewer.addSelectionChangedListener(new SelectionChangedListener() {
        @Override
        public void selectionChanged(SelectionChangedEvent event) {
            if( selectionService != null ) {
                 selectionService.setSelection(((IStructuredSelection)event.getSelection()).getFirstElement());
            }
        }
    });
}

This Listener is called correctly. The first selected Element is of the right type, too.

I another part I am setting up the receiving end:

@Inject
public void setBS(@Named(IServiceConstants.ACTIVE_SELECTION) @Optional BS bs) {
    if (bs == null) {
      /* implementation not shown */
    } else {
      /* implementation not shown */
    }
}

However, nothing is received on this end of the pipe. What am I doing wrong or how could I debug this?

  • 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-12T05:46:29+00:00Added an answer on June 12, 2026 at 5:46 am

    The code above looks fine, but try to check the following issues:

    • check if the receiver object is created – if not, it won’t receive an event
    • check if the receiver object is created by eclipse framework (for example if it is element of application model such as part, handler it is for sure created by the framework) – if not, the framework (selection service) does not know about the receiver object and cannot notify it
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Eclipse Juno IDE and phpMyAdmin. I have java application, for this application
I'm using eclipse juno IDE I have Java application which have src folder. within
I have written a Java application using Eclipse Juno on Fedora 17. I have
I'm using Eclipse juno and osx 10.8 . I have java 7 with eclipse
I'm using Eclipse for Java Develepers (Juno x64 running on Windows 7). I have
I have been trying to deploy an Apache Axis2 WebService using Eclipse Juno, Maven
I am Using the WebSphere Application Server V8.5 Liberty Profile in Eclipse Juno. I
I'm using Eclipse 3.4 and have configured the Java code formatter with all of
I have been using the Eclipse platform for Java, javaEE, c++, python and PHP
I want to develop a simple C application for learning purposes using Eclipse (Juno)

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.