intellij-swagger icon indicating copy to clipboard operation
intellij-swagger copied to clipboard

Autocomplete won't work for non-project files and scratches

Open dgrothaus-ku opened this issue 7 years ago • 5 comments

Description

Autocomplete stopped working several versions ago. I just can't get it working any more. I'm writing my Swagger specs mainly in JSON, but added a YAML example for proof.

Autocomplete won't ever appear automatically and manually invoking autocomplete just shows No suggestion.

I already tried renaming to swagger. with no success as well as invalidating caches.

Examples

YAML

YAML

JSON

JSON

Specifications

Platform: Windows 10 (1703) Pro 64 bit PHPStorm: 2017.3 but it didn't work in 2017.2 too intellij-swagger: 1.0.2 from the repository other custom plugins: BashSupport 1.6.12.173, CMD support 1.0.5, GitLab Projects 1.4.10, JSON Utils 1.1, PHP composer.json support 1.0.21, String Manipulation 5.7.143.000.0, Swagger Codegen 0.1.0

dgrothaus-ku avatar Nov 29 '17 13:11 dgrothaus-ku

@dgrothaus-ku Thanks for reporting the issue. I tried to reproduce the issue by installing PHPStorm and the mentioned plugins, all worked well. I have a mac so maybe it is Windows related; I need to test that later.

semonte avatar Nov 30 '17 07:11 semonte

I can reproduce this with a fresh Windows 10 VM and a newly installed PhpStorm. After VM creation and PhpStorm installation the only thing I did was installing the plugin. Same behaviour: No autocomplete, no suggestion.

dgrothaus-ku avatar Dec 01 '17 09:12 dgrothaus-ku

I tested with VirtualBox and Windows 10, I still can't reproduce this! See screenshot:

image

I created a new "PHP Empty Project", added a swagger.yaml file. After adding a swagger field to the YAML document, the autocompletion kicked in. Can you make sure that the plugin installed successfully in the plugins settings?

image

semonte avatar Dec 04 '17 09:12 semonte

I evaluated again and the problem seems to be with files not belonging to the project, like scratch files and files dropped into the IDE.

To reproduce, please create a new scratch file and try auto-completion there.

dgrothaus-ku avatar Dec 04 '17 09:12 dgrothaus-ku

@dgrothaus-ku Thanks for debugging this, that is indeed an issue and should be fixed!

semonte avatar Dec 04 '17 09:12 semonte