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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:32:50+00:00 2026-05-28T14:32:50+00:00

I am developing a simple plugin for eclipse where I want to detect what

  • 0

I am developing a simple plugin for eclipse where I want to detect what the user (who is opening a project file and typing in an editor) is typing. So far I have got the current workbench, currently active editor and the property changes made to the editor using the IPropertyListener; but I am repeatedly failing to detect whether any key is pressed or not.

the code:

       IWorkbench wb = PlatformUI.getWorkbench();
       IWorkbenchWindow win = wb.getActiveWorkbenchWindow();
       IWorkbenchPage page = win.getActivePage();
       System.out.println
               ("Yeah the editor is visible..." + page.isEditorAreaVisible() + "with ..." +     page.toString() );
       IEditorPart theEditor =  page.getActiveEditor() ;  

       IPropertyListener myPropL = new IPropertyListener() 
       {


        @Override
        public void propertyChanged(Object arg0, int arg1) 
        {
            // TODO Auto-generated method stub

            System.out.println("This is : " + arg0.toString()   );

        }
    };


        theEditor.addPropertyListener(myPropL); 
  • 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-28T14:32:50+00:00Added an answer on May 28, 2026 at 2:32 pm

    I fixed it by myself.

    This is the solution :

    1. get the IDocumentListener using IDocumentListener lr = new IDocumentListener()

    2. Override the documentChanged(DocumentEvent arg0) and use the arg0 parameter to get the typed text and the typed key using arg0.offset.

    For further questions happy to help 🙂

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

Sidebar

Related Questions

I am developing a plugin in eclipse which can generate a text file (based
I am currently developing a maven project in eclipse. The m2eclipse plugin works beautifully.
I am developing project on net-beans and I have successfully install the ireport plugin
I'm developing an editor plugin for eclipse. It works fine on files within eclipse
I developing the simple UIApplication in which i want to crop the UIImage (in
Hi I am developing a simple application based upon ASP.NET MVC. I have altered
i'm developing a simple C# Editor for one of my university courses and I
Now I am developing a sample plugin for Eclipse, to show all directories and
I'm developing an Eclipse plugin... I need to make it dependant on org.eclipse.ui.workbench (i
I'm evaluating the possibility of developing an Eclipse plugin to modify the source code

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.