My plug-in can't run on ultimate, but it can run on the community version

 

I developed a plug-in for our company's project on the 2017.3 Community Edition, and I can debug normally when I run on the community version. But when I export jar and install the plug-in on 2017.2 ultimate, it can't run again. Through the log, I found out on ultimate

JavaPsiFacade.findClass (qualifiedName, GlobalSearchScope.allScope (project));

the result of the operation of the code is wrong, and it doesn't get the result that I want.

Is it if I used the wrong Api.

I use translation software to translate these questions, please forgive my grammatical mistakes。thanks

0
8 comments

Hello,

JavaPsiFacade.findClass should return the same results for IDEA Community and IDEA Ultimate. Could you please describe what is wrong with its result in IDEA Ultimate?

0

Sorry, I said it was wrong.   

Query<PsiReference> search = ReferencesSearch.search(psiClass, GlobalSearchScope.allScope(project));

It should be this line of code。
In the project, both the source code and the Lib directory use that class.
in the community version and returns all the places that use that class.
But in ultimate, it only returns the place where that class is used in the Lib directory.
In ultimate and the Community Edition, the same project is running.
Thanks。
0

Does Goto Declaration work correctly from the source code usages?

Could you please try File | Invalidate Caches in the Ultimate edition and see if the problem persists?

0

I tried itin Community Edition 

thanks

0

Sorry, I don't understand what you mean by "it", what do the screenshots illustrate, and whether everything is working now :)

0

I am sorry, I did not describe clearly what I mean。I have tried your suggestion。

There are two screenshots above, one is the Ultimate version, one is the community version. Ultimate, I was to export the plug-in, installed up, check the log. Community Edition is through debugging, view the console log. Two IDE running inside the same project. Screenshots contain two parts, one part I use find Usages, the other part is the log.

In Ultimate, the number I get is 23. In Community Edition, I get a number of 207. In Ultimate, it only searches maven's jar.

 

0

Does Goto Declaration work correctly in editor from the source code usages (in Ultimate edition)?

0

Thank you, I have solved this problem.

I first developed this plug-in in the Community Edition, then exported this plug-in to install on ultimate, but this plugin in the community version is normal, but it has the above problems on ultimate.

Finally, I copy the source code of the plug-in and put it on ultimate to develop, export, and install it on ultimate, and it can run normally. Maybe I have misunderstood something.

Once again, express my gratitude。

0

Please sign in to leave a comment.