Please read and review: Draft of article "Developing custom language plugins for IDEA"

Hello everyone,

A very commonly requested documentation item was an article explaining the
concepts and usage of the IDEA Language API. Well, now there is one - or
at least, a draft for one. Before the article is published officially, I'd
like to give you the chance to review and comment on it.

What I'm most interested in is:
- if you have already used the Language API - are there any difficulties
or pitfalls that you encountered and that are not described in the article?
- if you have not used the Language API - does the article give you a clear
idea of how to use it, or are there any concepts that should be explained
in more detail?

The current draft of the article is posted at:
http://www.yole.ru/CustomLanguagePlugins.html

Thanks in advance for your help!

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"


0

Where is this Python language plugin which you mention in your article?
A quick survey of the Plugin Manager and a Google search leave me
unenlightened...

Thanks,
Gordon

--
Gordon Tyler (Software Developer)
Quest Software <http://www.quest.com/>
260 King Street East, Toronto, Ontario M5A 4L5, Canada
Voice: (416) 933-5046 | Fax: (416) 933-5001

0

This looks like a great collection of starting points. I have some comments:

Code examples for every step would be great, even 2 lines showing how to
register the file type would improve that section, for example.

I think in the lexer section, "For all other token types, new IElementType
instances are created and associated with a language in which the token type is
used." should be reworded to make it clear that the plugin can use its own
IElementType instances. The current wording implies that IDEA creates them somehow.

Also in lexer section, "for example, if an XML file contains a snippet of Java
code" is unfortunately misleading. I don't believe currently this is possible
without reimplementing XML parser. I think you should use a different example.
In general I think the chameleon paragraph is confusing and its wording could be
improved, and of course an example code would help.

In parser section, "Each pair of markers defines a single node in the AST tree"
could be clearer: "Each pair of markers defines the range of lexer tokens in a
single node in the AST tree" or something like that

I think a small diagram would help PSI section. I've attached a sample, if you
like it I've attached the .graffle file for OmniGraffle.

I'll read the rest of the guide later and probably post more comments.



Attachment(s):
Language API PSI parsing.png
att1.dat
Language API PSI parsing#D6464B
0

Hello Gordon,

GT> Where is this Python language plugin which you mention in your
GT> article? A quick survey of the Plugin Manager and a Google search
GT> leave me unenlightened...

Still nowhere but my personal Subversion repository... now that the article
draft is done, I'll focus on the remaining few issues that need fixing before
I can release the plugin.

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"


0

Dmitry Jemerov (JetBrains) wrote:

Hello Gordon,

GT> Where is this Python language plugin which you mention in your
GT> article? A quick survey of the Plugin Manager and a Google search
GT> leave me unenlightened...

Still nowhere but my personal Subversion repository... now that the
article draft is done, I'll focus on the remaining few issues that need
fixing before I can release the plugin.


Ah! Now I recall. You mentioned this before briefly. I look forward to
its release 8)

Ciao,
Gordon

--
Gordon Tyler (Software Developer)
Quest Software <http://www.quest.com/>
260 King Street East, Toronto, Ontario M5A 4L5, Canada
Voice: (416) 933-5046 | Fax: (416) 933-5001

0

I'm excited about this. Dmitry, can I help with this project? I am looking to
make a plugin for internal build files, which are stripped down Python scripts.
Maybe we could make a java.net or sourceforge project out of it. I've been too
nervous about integrating Jython's parser (based on JavaCC) to even begin the
plugin I want to write.

Dmitry Jemerov (JetBrains) wrote:

Hello Gordon,

GT> Where is this Python language plugin which you mention in your
GT> article? A quick survey of the Plugin Manager and a Google search
GT> leave me unenlightened...

Still nowhere but my personal Subversion repository... now that the
article draft is done, I'll focus on the remaining few issues that need
fixing before I can release the plugin.

0

It's probably worth a short section on how to write inspections for custom file types, and another on how to write quickfixes/intentions. (I'm actually not quite sure how to do the latter myself. I would need functionality equivalent to the ElementFactory.createExpressionFromText() or ElementFactory.createStatementFromText(), but don't seem to be able to find it in the API).

--Dave Griffith

0

Hello Keith,

KL> I'm excited about this. Dmitry, can I help with this project? I am
KL> looking to make a plugin for internal build files, which are
KL> stripped down Python scripts. Maybe we could make a java.net or
KL> sourceforge project out of it. I've been too nervous about
KL> integrating Jython's parser (based on JavaCC) to even begin the
KL> plugin I want to write.

As it's more of my personal project than an official JetBrains thing, I wouldn't
mind getting help at all. :) But I'd like to make the initial release first,
before finding a public place to host it.

I didn't integrate the Jython parser, by the way - I hand-coded my own, JavaScript-plugin-style.
It's quite tedious, but not too hard.

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"


0

Hello Dave,

DG> It's probably worth a short section on how to write inspections for
DG> custom file types, and another on how to write
DG> quickfixes/intentions.

Quickfixes are mentioned in a section on syntax and error highlighting...
inspections are worth adding, indeed. (All IDEA gives you in this regard
is LocalInspectionTool.checkFile(), but you can build a lot from that.)

DG> (I'm actually not quite sure how to do the
DG> latter myself. I would need functionality equivalent to the
DG> ElementFactory.createExpressionFromText() or
DG> ElementFactory.createStatementFromText(), but don't seem to be able
DG> to find it in the API).

That doesn't need to be in the API - check out how JavaScript plugin does
that in JSChangeUtil.createNameIdentifier(), for example.

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"


0

Dave Griffith wrote:

It's probably worth a short section on how to write inspections for custom
file types, and another on how to write quickfixes/intentions. (I'm actually
not quite sure how to do the latter myself. I would need functionality
equivalent to the ElementFactory.createExpressionFromText() or
ElementFactory.createStatementFromText(), but don't seem to be able to find
it in the API).

--Dave Griffith


Dave, the current hack to do it is to create a temporary file of the specified
type, and insert whatever declarations you need.

0

Hi Dmitry,

I think this is a very good start to give people a basic idea of what is possible and how.
I also agree with Keith that some code snippets would be nice. That makes it easier to get
an image of how things have to be done while reading the document. Adding more diagrams
and charts like Keith did might also be a good idea.

Here are some other things that came to my mind:

- Make it clear that idea.jar has to be added to the IDEA-JDK, not as a (Module) Library
which will cause problems.

- Add some explanation what the difference between Marker.drop() and Marker.rollbackTo()
is. It's 95% clear from their names, but another sentence or two wouldn't hurt.

- Mention how to use Marker.precede() to deal with recursive productions that can not be
linearized due to precedence issues:

OrExpr ::= AndExpr | OrExpr 'or' AndExpr

boolean parseOrExpr(PsiBuilder builder) {
PsiBuilder.Marker expr = builder.mark();
if (!parseAndExpression(builder)) {
expr.drop();
return false;
}
while (builder.getTokenType() == TokenTypes.OR) {
builder.advanceLexer();
if (!parseAndExpression(builder)) {
builder.error("expression expected");
}
expr.done(ElementTypes.BINARY_EXPRESSION);
expr = expr.precede();
}
expr.drop();
return true;
}

- Mention that all tokens must be processed by the parser, even if they are unexpected and
come after the start production of the grammar has been completely matched. Otherwise
you'll get some weird assertion for things like

Program ::= "program" Identifier ";" Block "."

program p;
begin
]]>
end.
... some unexpected tokens here ...

- You say that "All PSI elements which work as references need to implement the
com.intellij.psi.PsiReference interface". That's AFAIK not really true. PsiReferences and
PsiElements are independent concepts, which is IMO important to understand. A PsiElement
can hold a reference to other elements, but the element itself doesn't need to be one
(though this seems to be the common way to implement a reference).

This became obvious to me through an answer I got from Maxim some time ago: "As the matter
of fact PsiReference is not a PsiElement but rather array of references might be returned
by arbitrary PSI element. For instance, XML attribute value element may return references
to java class if there's something in it's value that looks like qualified class name."

The XML attribute value itself isn't a reference, but may provide one.

It should be made clear that this is what PsiElement.getReference[s]() is for, and that
those methods do NOT what PsiSearchHelper.findReferences() does.

- Add some description about how getVariants() and code completion play together and that
it's possible to return Strings and PsiElements to get an icon in the lookup list. It's
already in PsiReference's JavaDoc (which doesn't mention the possibility to return simple
Strings btw), but the code completion topic should be mentioned in this document as well.

- The Code Formatting chapter definitely needs a reasonably simple example to show how the
things explained work together. The description is quite good to understand, but without
seeing any code it's too theoretical. The JS formatter is IMO already too complex to get a
quick idea of how it works.


Sascha

0

We're in the probably-quite-unusual sitation where we have a project that
contains both Python and Jython code. I suspect it's asking too much for
your Python plugin to optionally support Jython extensions as well, but how
difficult do you think it would be for someone else to add that kind of functionality
to your plugin down the track?

Regardless, I'm looking forward to testing this once it is released.

Chris

Hello Keith,

KL>> I'm excited about this. Dmitry, can I help with this project? I am
KL>> looking to make a plugin for internal build files, which are
KL>> stripped down Python scripts. Maybe we could make a java.net or
KL>> sourceforge project out of it. I've been too nervous about
KL>> integrating Jython's parser (based on JavaCC) to even begin the
KL>> plugin I want to write.
KL>>

As it's more of my personal project than an official JetBrains thing,
I wouldn't mind getting help at all. :) But I'd like to make the
initial release first, before finding a public place to host it.

I didn't integrate the Jython parser, by the way - I hand-coded my
own, JavaScript-plugin-style. It's quite tedious, but not too hard.



0

Hello Chris,

CM> We're in the probably-quite-unusual sitation where we have a project
CM> that contains both Python and Jython code. I suspect it's asking too
CM> much for your Python plugin to optionally support Jython extensions
CM> as well, but how difficult do you think it would be for someone else
CM> to add that kind of functionality to your plugin down the track?

Given that the plugin runs in a Java IDE, support for the version of the
language which also runs under Java seems to be quite natural, so the support
for Jython extensions was in the original plan of my plugin.

I don't have too much time to work on the plugin now, so I don't know when
I'll be able to implement that myself, but it will be definitely possible
for other developers to add that functionality.

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"


0

Hello Sascha,

Thanks a lot for your comments! I've uploaded a new draft of the article,
which includes revisions based on your comments, to the same URL.

Some other comments are below.

SW> I think this is a very good start to give people a basic idea of
SW> what is possible and how. I also agree with Keith that some code
SW> snippets would be nice. That makes it easier to get an image of how
SW> things have to be done while reading the document. Adding more
SW> diagrams and charts like Keith did might also be a good idea.

As for the snippets - I don't think that random code snippets not related
to any specific language would provide much value... The best thing to have,
in my opinion, would be cross-referenced HTMLized source code of some language
plugins (JavaScript, maybe Python, maybe others) and links to that code from
thearticle.

As for diagrams - I'm not much of an artist, but I gave it a try. :) If
the diagram confuses more than helps, we can always drop it.

SW> - Mention how to use Marker.precede() to deal with recursive
SW> productions that can not be linearized due to precedence issues:

Unfortunately I don't quite understand how to describe this clearly... the
feature looks quite obvious when you see how it's used, but I don't know
how to explain it adequately with words. "Linearizing recursive productions"
sounds a bit too complex for me. :)

SW> - Add some description about how getVariants() and code completion
SW> play together and that it's possible to return Strings and
SW> PsiElements to get an icon in the lookup list. It's already in
SW> PsiReference's JavaDoc (which doesn't mention the possibility to
SW> return simple Strings btw), but the code completion topic should be
SW> mentioned in this document as well.

I somehow completely forgot about the code completion topic - I meant to
write it, for sure, but eventually didn't. The topic is in there now.

SW> - The Code Formatting chapter definitely needs a reasonably simple
SW> example to show how the things explained work together. The
SW> description is quite good to understand, but without seeing any code
SW> it's too theoretical. The JS formatter is IMO already too complex to
SW> get a quick idea of how it works.

In order to create a reasonably simple formatter example, a language with
relatively simple formatting rules is needed. Maybe you can suggest one?
Any language with a C-style syntax quickly turns out to require support for
several dozen code style rules, and becomes no simpler than the JavaScript
formatter...

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"


0

Hello Keith,

KL> This looks like a great collection of starting points. I have some
KL> comments:

Thanks a lot for your comments! I've included changes based on them in the
new draft of the article, which I've uploaded at the same URL.

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"


0

Could you also give an short note of the various utility classes?
For example PsiUtil provides many ready-to-use methods.

0

Hello Sven,

SS> Could you also give an short note of the various utility classes?
SS> For example PsiUtil provides many ready-to-use methods.

I think that description of utility classes lies outside the scope of this
article - the utility classes are better described in the JavaDoc documentation.

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"


0

I didn't mean that you should describe the various methods - JavaDoc is
just fine for them. The problem is that if you don't know that they are
there, you can't use them. A small overview like "PsiUtil contains
useful methods for dealing with psi-related issues" may help.
I found PsiUtil.isApplicable() by accident and it was exactly what I needed.


Dmitry Jemerov (JetBrains) schrieb:

Hello Sven,

SS> Could you also give an short note of the various utility classes?
SS> For example PsiUtil provides many ready-to-use methods.

I think that description of utility classes lies outside the scope of
this article - the utility classes are better described in the JavaDoc
documentation.

0

Hi Dimitry,

As for the snippets - I don't think that random code snippets not
related to any specific language would provide much value... The best
thing to have, in my opinion, would be cross-referenced HTMLized source
code of some language plugins (JavaScript, maybe Python, maybe others)
and links to that code from thearticle.


Well, that sounds good. It doesn't clutter the article and still provides something
substantial to see the explained things in detail. +1 for HTMLized source references.

The links to the corresponding JavaDoc for interfaces, etc. are nice as well, but they
should open in their own window to be able to open the article and the docs/examples side
by side.

As for diagrams - I'm not much of an artist, but I gave it a try. :) If
the diagram confuses more than helps, we can always drop it.


Haha, I'm not either, but the diagram you put up looks good IMO.

SW> - Mention how to use Marker.precede() to deal with recursive
SW> productions that can not be linearized due to precedence issues:

Unfortunately I don't quite understand how to describe this clearly...
the feature looks quite obvious when you see how it's used, but I don't
know how to explain it adequately with words. "Linearizing recursive
productions" sounds a bit too complex for me. :)


That's true, but I still think it should be covered in the article somehow. Here's
something I dug out of the forums, originally posted by Maxim:

"This method is useful for right-to-left parsing when you don't know
how many markers you need at certain position until you read more input. Example is binary
expression parsing like abc should be treated as (a(bc)) thus you need two markers at
'a' position, which fact isn't known until you get to 'c' lexem."

I think this explanation fits quite well, and when linked to some example code in the JS
plugin it should be clear what the method is useful for.

SW> - The Code Formatting chapter definitely needs a reasonably simple
SW> example to show how the things explained work together. The
SW> description is quite good to understand, but without seeing any code
SW> it's too theoretical. The JS formatter is IMO already too complex to
SW> get a quick idea of how it works.

In order to create a reasonably simple formatter example, a language
with relatively simple formatting rules is needed. Maybe you can suggest
one? Any language with a C-style syntax quickly turns out to require
support for several dozen code style rules, and becomes no simpler than
the JavaScript formatter...


True. What about plain text? This could show the bare minimum requirements for a formatter
with wrapping at the right margin and smart cursor positioning when pressing enter (cursor
goes to the position of the first non-whitespace character in the line above). Would that
be possible to realize with the Formatter-API and reasonably simple?

Sascha

PS: The title of the article ends a little abruptly: "Developing Custom Language Plugi".
You may want to fix that ;)

0

Hello Sascha,

SW> The links to the corresponding JavaDoc for interfaces, etc. are nice
SW> as well, but they should open in their own window to be able to open
SW> the article and the docs/examples side by side.

fixed

>> SW> - Mention how to use Marker.precede() to deal with recursive SW>
>> productions that can not be linearized due to precedence issues:
>>
>> Unfortunately I don't quite understand how to describe this
>> clearly... the feature looks quite obvious when you see how it's
>> used, but I don't know how to explain it adequately with words.
>> "Linearizing recursive productions" sounds a bit too complex for me.
>> :)
>>
SW> That's true, but I still think it should be covered in the article
SW> somehow. Here's something I dug out of the forums, originally posted
SW> by Maxim:
SW>
SW> "This method is useful for right-to-left parsing
SW> when you don't know how many markers you need at certain position
SW> until you read more input. Example is binary expression parsing like
SW> abc should be treated as (a(bc)) thus you need two markers at
SW> 'a' position, which fact isn't known until you get to 'c' lexem."

Added, with changes to make the explanation actually correct. :)

>> SW> - The Code Formatting chapter definitely needs a reasonably
>> simple
>> SW> example to show how the things explained work together. The
>> SW> description is quite good to understand, but without seeing any
>> code
>> SW> it's too theoretical. The JS formatter is IMO already too complex
>> to
>> SW> get a quick idea of how it works.
>> In order to create a reasonably simple formatter example, a language
>> with relatively simple formatting rules is needed. Maybe you can
>> suggest one? Any language with a C-style syntax quickly turns out to
>> require support for several dozen code style rules, and becomes no
>> simpler than the JavaScript formatter...
>>
SW> True. What about plain text? This could show the bare minimum
SW> requirements for a formatter with wrapping at the right margin and
SW> smart cursor positioning when pressing enter (cursor goes to the
SW> position of the first non-whitespace character in the line above).
SW> Would that be possible to realize with the Formatter-API and
SW> reasonably simple?

There is one little problem with that, namely IDEADEV-2140. :) Once this
is fixed, I think I can give it a try.

SW> PS: The title of the article ends a little abruptly: "Developing
SW> Custom Language Plugi". You may want to fix that ;)

Fixed. Stupid FrontPage. :)

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"


0

Dmitry Jemerov (JetBrains) wrote:

SW> PS: The title of the article ends a little abruptly: "Developing
SW> Custom Language Plugi". You may want to fix that ;)

Fixed. Stupid FrontPage. :)


Cool, except that now the links in the table of contents also open in another window.
Those should of course stay in the same window ;)

Sascha

0

Hello Sascha,

SW> Cool, except that now the links in the table of contents also open
SW> in another window. Those should of course stay in the same window ;)

Fixed, thanks.

I've uploaded a new (likely final) draft to the same URL, reviewed by Max
Shafirov, and with links to cross-referenced source code of the JavaScript
plugin.

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"


0

Hi Dmitry,

Any chance we could have an update on when we might see this plugin released?

Given that the plugin runs in a Java IDE, support for the version of
the language which also runs under Java seems to be quite natural, so
the support for Jython extensions was in the original plan of my
plugin.

I don't have too much time to work on the plugin now, so I don't know
when I'll be able to implement that myself, but it will be definitely
possible for other developers to add that functionality.



0

Hi Dmitry,

Any chance of a progress update on your Python plugin? Even releasing a build
that was only alpha quality would be appreciated.

Hello Gordon,

GT>> Where is this Python language plugin which you mention in your
GT>> article? A quick survey of the Plugin Manager and a Google search
GT>> leave me unenlightened...
GT>>

Still nowhere but my personal Subversion repository... now that the
article draft is done, I'll focus on the remaining few issues that
need fixing before I can release the plugin.



0

Any chance of a progress update on your Python plugin? Even releasing a
build that was only alpha quality would be appreciated.

Yes, it would be nice to know what's the status of it.
It was promised a long time ago, and that would be the only "clean" example of
the fesibility of the (Open)LanguageAPI & co anyway, since Javascript plug-in is using
too much "internal magic".


Ahmed.

0

Hello Chris,

Keith Lea now also participates in the work on the plugin, and we have created
a java.net project for it. However, the project is still in the incubator,
and as far as I understand, it means that it's not publically accessible
and only the project members have access to its content.

If anyone is interested in contributing to the plugin, you can send me your
java.net account IDs to me at yole@jetbrains.com, and I'll add the interested
people as contributors to the project.

As for the status, it hasn't really changed much recently - the current functionality
of the plugin is roughly the same as JavaScript in IDEA 5.0, without the
formatter. The formatter implementation is running into issues with the IDEA
formatter core, and I'll try once more to get these issues resolved before
the final 5.1 release. Some of the issues were fixed in recent 5.1 builds,
but I keep finding others. :)

CM> Any chance of a progress update on your Python plugin? Even
CM> releasing a build that was only alpha quality would be appreciated.
CM>
>> Hello Gordon,
>>
GT>>> Where is this Python language plugin which you mention in your
GT>>> article? A quick survey of the Plugin Manager and a Google search
GT>>> leave me unenlightened...
GT>>>
>> Still nowhere but my personal Subversion repository... now that the
>> article draft is done, I'll focus on the remaining few issues that
>> need fixing before I can release the plugin.
>>
--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"


0

Many thanks for the update Dmitry. I didn't realise you had it in the java.net
incubator now. That's great news, since the incubator isn't just restricted
to project members, anyone can access it! For those who are interested, the
project name is "pythonid" and you can access the project here: https://pythonid.dev.java.net

I haven't tried it yet but will hopefully find the time to have a play tonight.
Given my current schedule I'm not sure what my chances are of helping out
with the project, but I'll definitely let you know if I do find some spare
time.

Thanks again,
Chris

Hello Chris,

Keith Lea now also participates in the work on the plugin, and we have
created a java.net project for it. However, the project is still in
the incubator, and as far as I understand, it means that it's not
publically accessible and only the project members have access to its
content.

If anyone is interested in contributing to the plugin, you can send me
your java.net account IDs to me at yole@jetbrains.com, and I'll add
the interested people as contributors to the project.

As for the status, it hasn't really changed much recently - the
current functionality of the plugin is roughly the same as JavaScript
in IDEA 5.0, without the formatter. The formatter implementation is
running into issues with the IDEA formatter core, and I'll try once
more to get these issues resolved before the final 5.1 release. Some
of the issues were fixed in recent 5.1 builds, but I keep finding
others. :)



0

Hello Chris,

CM> Many thanks for the update Dmitry. I didn't realise you had it in
CM> the java.net incubator now. That's great news, since the incubator
CM> isn't just restricted to project members, anyone can access it! For
CM> those who are interested, the project name is "pythonid" and you can
CM> access the project here: https://pythonid.dev.java.net

Ah, indeed - there must have been some delay in updating the permissions.
I know I tried to access the project as soon as I got the incubator approval
request, and it requested my login for that. Now I can access it without
logging in, too.

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"


0

For anyone who's interested, here's a quick "how-to" for building and installing
the Python plugin:

1) check the pythonid project out of java.net. eg

cvs -d :pserver:<your-java.net-username>@cvs.dev.java.net:/cvs login
cvs -d :pserver:<your-java.net-username>@cvs.dev.java.net:/cvs checkout pythonid


2) Open the IDEA project file that comes with pythonid.
3) Make sure the JDK is set up correctly. You need to have the project pointing
at an "Intellij IDEA SDK" rather than a normal JDK. If you don't have one
of these set up already, create one using the "Configure JDK" dialog by clicking
the SECOND icon in from the top left.
4) Make sure idea.jar is added to the classpath of the JDK you just created.
Note that it MUST be added to the JDK classpath rather than as a module library.
5) Make sure the "Python Plugin" module depends on both the other two modules
(the project in CVS only depends on one I think, that will cause problems
when you deploy).
6) Build the project. This shouldn't generate any errors (although I do get
30 warnings). If you get any errors, double-check steps 3 & 4 carefully.
7) Right-click on the "Python Plugin" module in the project view. Choose
"Prepare Plugin Module for Deployment".
8) Exit IDEA.
9) Drop the jar file that was created by step 7 into your config/plugins
directory.
10) Start IDEA. The plugin should now be showing up in your installed plugins
list and your python files should now have a funky python icon!

Have fun!


0

Hi,

Thanks Chris - excellent instructions. I've managed to set it up in no time. :)

Although I can only get code completion to work for symbols defined in my test.py file. I am assuming this is not implemented yet.

Will there be completion on the standard python modules in future ?

Cheers,
Oliver

0

Hello Oliver,

OM> Although I can only get code completion to work for symbols defined
OM> in my test.py file. I am assuming this is not implemented yet.

That's correct.

OM> Will there be completion on the standard python modules in future ?

I certainly would like to implement this, but currently I have very little
time to work on the Python plugin. The project is open-source, so if you're
willing to contribute to it, this could help get the functionality implemented
much faster.

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"


0

请先登录再写评论。