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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T20:47:16+00:00 2026-05-18T20:47:16+00:00

Eclipse does not find the correct variable for code completion as shown below. int

  • 0

Eclipse does not find the correct variable for code completion as shown below.

int i = 0;
f(xyz);    // f takes an int but eclipse won't fill it with i.
  • 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-18T20:47:17+00:00Added an answer on May 18, 2026 at 8:47 pm

    Under “Window” > “Preferences” > “Java” > “Editor” > “Content Assist”, make sure “Fill method arguments and show guess arguments” is set and “Insert best guessed arguments” is selected.


    Edit:

    I tried this in my Eclipse (Version: Helios Service Release 1 – Build id: 20100917-0705):

    public class BestGuessedParameter {
        static int xyz = 1;
        static void f(final int xyz) {
        }
        public static void main(final String[] args) {
            final int i = 0;
            f/*cursor here*/
        }
    }
    

    Right after I typed the f, I hit space and selected f(xyz), Eclipse did supply f(i) with i highlighted and in a pop-down menu of i (highlighted), xyz, and 0. i was the default.

    I couldn’t find any info on how Eclipse selects the “best guessed parameters” (I have no idea where to look in the Eclipse source). I would guess that Eclipse “guesses” based on type, name, and visibility, and that Eclipse thinks there’s a better match than your local variable. Perhaps if the local variable were closer in type and name, it would be a better match?

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

Sidebar

Related Questions

With the latest Java update on MacOSX 10.6, Eclipse does not find the Java
Eclipse issues warnings when a serialVersionUID is missing. The serializable class Foo does not
Does Eclipse have a feature that lets you search a project to find all
Possible Duplicate: Is it possible to integrate Jquery with Eclipse? Found WTP does not
Where does eclipse keep it's key-binding settings? I want to transfer them from one
I wish to print a Stack<Integer> object as nicely as the Eclipse debugger does
Visual Studio has a way to import, export your color settings. Does Eclipse have
Does anyone know of a good Eclipse POJO generator? The generate getter\setters and constructor
Does anyone know of an Eclipse plug-in or method to get Eclipse to generate
Does somebody know how to recover a never-starting eclipse when the error org.eclipse.swt.SWTError: Item

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.