Skip to content

For Java intellicode suggests a lot of poor choices #1754

Closed

Description

@rajinder-yadav

Issue Type: Bug

In java, when typing code, intellicode should be smart enough to know what context I am in, like coding a class and it should only provide what the most likely keyword I am going to type next.

  1. Create a class person with two private string fields
  2. Type "p", note what is suggested (should be private, public).
  3. After private, type "S", note what is suggested, in fact typing "Str" still does not yield "String" as a top choice.

This is no where close to improving productivity like with intellij, would love to see this fixed.

I'm sure this is also a problem with other languages like TypeScript, JS, GoLang.

After pressing "p"

bug-0

After pressing "S"

bug-1

After pressing "Str"

bug-2

System Info
Item Value
CPUs AMD Ryzen 7 2700X Eight-Core Processor (16 x 3967)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: disabled_software
skia_renderer: disabled_off_ok
video_decode: unavailable_off
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled
Load (avg) 0, 1, 1
Memory (System) 31.29GB (9.76GB free)
Process Argv . --no-sandbox
Screen Reader no
VM 0%
Extensions (54)
Extension Author (truncated) Version
terraform 4op 0.2.1
vscode-base64 ada 0.1.0
vscode-tomcat ada 0.11.3
markdown-toc Ala 1.5.6
Bookmarks ale 11.1.0
ng-template Ang 0.1100.2
vscode-browser-preview auc 0.6.7
npm-intellisense chr 1.3.1
path-intellisense chr 2.3.0
bracket-pair-colorizer Coe 1.0.61
vscode-markdownlint Dav 0.38.0
vscode-eslint dba 2.1.8
java-decompiler dgi 0.0.2
EditorConfig Edi 0.15.1
prettier-vscode esb 5.5.0
markdown-preview-bitbucket hbr 1.0.0
java-properties ith 0.0.2
vscode-peacock joh 3.8.0
solidity Jua 0.0.76
sort-typescript-imports mic 1.4.1
vscode-docker ms- 1.1.0
python ms- 2020.5.86806
cpptools ms- 0.28.3
vscode-typescript-tslint-plugin ms- 1.3.2
debugger-for-chrome msj 4.12.8
angular2-inline nat 0.0.17
vetur oct 0.24.0
vscode-boot-dev-pack Piv 0.0.8
vscode-concourse Piv 1.24.0
vscode-manifest-yaml Piv 1.24.0
vscode-spring-boot Piv 1.24.0
platformio-ide pla 1.10.0
java-ide-pack pve 1.2.1
java red 0.59.1
vscode-yaml red 0.13.0
markdown-preview-enhanced shd 0.5.15
vscode-checkstyle she 1.3.3
java-generate-setters-getters soh 5.3.0
sonarlint-vscode Son 1.19.0
language-stylus sys 1.11.0
find-then-jump tra 2.0.4
sort-lines Tyr 1.9.0
vscodeintellicode Vis 1.2.10
vscode-java-debug vsc 0.27.1
vscode-java-dependency vsc 0.9.0
vscode-java-pack vsc 0.12.1
vscode-java-test vsc 0.22.3
vscode-maven vsc 0.27.0
vscode-spring-boot-dashboard vsc 0.1.10
vscode-spring-initializr vsc 0.6.1
better-align wwm 1.1.6
vscode-java-saber You 0.1.1
markdown-pdf yza 1.4.4
vscode-aspell zap 0.1.4

(8 theme extensions excluded)

Activity

  1. testforstephen commented on Jan 4, 2021

    @testforstephen
    Collaborator

    @Eskibear Could you take a look whether this can be achieved by IntelliCode extension?

  2. Eskibear commented on Jan 4, 2021

    @Eskibear
    Contributor

    No, it's not related to IntelliCode. The behavior is the same when IntelliCode is not installed.

    • p[cursor] : classes staring with "p" are listed, because it's allowed that you don't have a public/private modifier before a member varible.
    • Str[cursor]: "String" is not on top of the list, because it's in alphabetical order.
  3. testforstephen commented on Jan 4, 2021

    @testforstephen
    Collaborator

    I don't mean that this is a bug in IntelliCode, I mean whether IntelliCode could optimize the recommendation order for these completion choices.

  4. Eskibear commented on Jan 4, 2021

    @Eskibear
    Contributor

    Theoretically that can be done by machine learninig approaches or hardcoded rules. But no, currently IntelliCode only re-ranks methods of a certain type. Modifiers, types, keywords are not included.

  5. 0dinD commented on Jan 5, 2021

    @0dinD
    Contributor

    My take on the issue in the first screenshot is that it's a non-issue if you follow the widely accepted convention of using UpperCamelCase for class names. If the class were to be named Person, the access modifiers are the top results, and you have to type a capital P in order to be suggested the Person class over the access modifiers.

    But I do agree that it would be nice if the IntelliCode extension could rank types based on their usage. So if anything I think you should focus on ranking types, not modifiers and keywords @Eskibear.

  6. Eskibear commented on Sep 17, 2026

    @Eskibear
    Contributor

    suggest to close, as intellicode itself is already deprecated.

  7. datho7561 commented on Sep 18, 2026

    @datho7561
    Contributor

    I agree about closing this.

    I think Fred/Roland were thinking about doing something along the line of reordering the type completions to put the most used ones on top, but it would be very expensive to calculate that.

    My understanding about the route involving reordering the results using AI was that any locally running model would either be too weak to yield good results or strong enough but so slow on most computers that it wouldn't be worth it.

  8. FaiqNoman69 commented on Sep 18, 2026

    @FaiqNoman69

    Makes sense. If IntelliCode already deprioritizes keywords/modifiers appropriately, then this specific concern is resolved and closing is fine.

    That said, I'd still like to see usage-based ranking applied to types specifically (e.g. classes/interfaces surfaced higher based on how often they're referenced in the project). If that's better tracked as its own feature request rather than reopening this one, happy to file it separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions