Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python libraries won't be resolved in intellij community edition. #59

Closed
ovkhasch opened this issue Jun 24, 2014 · 5 comments
Closed

Python libraries won't be resolved in intellij community edition. #59

ovkhasch opened this issue Jun 24, 2014 · 5 comments
Milestone

Comments

@ovkhasch
Copy link

This one is easy to fix. You check python pluginid in PythonResolver.detectPython:

                if (PYTHON_ID.equals(pluginId)) {
                    return true;
                }

and

private static final String PYTHON_ID = "Pythonid";

but this is correct for ultimate only. For community python pluginid is PythonCore. I believe if you allow this too your plugin should work fine in community edition.

BTW, should you really check the pluginid? Maybe trial and error method is OK? There are some instanceof checks for PyFile, PyClass, etc...

@ovkhasch ovkhasch changed the title Content assist doesn't work with intellij community edition. Python libraries won't be resolved in intellij community edition. Jun 24, 2014
@mtrubs
Copy link
Owner

mtrubs commented Jun 24, 2014

I was not aware of pythoncore. that is indeed an easy fix.

I spent a while looking for what the right way to figure this out is. i coundlt find anything and this worked. All the instanceof checks for those classes are safe because of the way java handles null at runtime. Wrapping a try/catch sounded risker to me as i was not sure.

@ovkhasch
Copy link
Author

What I wanted to say is that if there are PyFile and PyClass instances you may not need check pluginid also? However, that was just an assumption.

@sharyden
Copy link

fixing this for community editition plus adding transitive imports resolution will be a huge step forward!!!

@mtrubs
Copy link
Owner

mtrubs commented Jun 29, 2014

#61

@mtrubs mtrubs closed this as completed Jun 29, 2014
@mtrubs mtrubs added this to the 0.7 milestone Jun 29, 2014
@sharyden
Copy link

I have it now working! Thanks a lot!

@mtrubs mtrubs modified the milestones: 0.6, 0.7 Feb 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants