Platform SDK vs Project SDK

Besides the obvious answer that one is for the platform and one is for
the project, what is the difference between the platform SDK and the
project SDK in terms of plugin development? 

I am not sure what to specify in each of these,.

Actually, I am a little confused about these and the modules and
libraries settings also. I just don't  know what IntelliJ want me to put
in for these options.

In Project Settings there's a Project SDK (standard development kit).
Not sure if you're looking for the Java SDk, like 1.6 or what. Then in
Platform Settings (what platform exactly?) there's input for  SDKs (plural) and
an input for classpath, source path and all this kind of thing. Are you
looking for the source path to Sun's Java sources or the sources to some
part of the OpenAPI (which part?) or the sources of the community edition
(which starts at what folder exactly?) or the sources to the plugin I am authoring? 

Then there's the JDSK home path.. not sure what to put in there.  


I am trying to set up an environment for developing plugins. I have read
the "setting up the IDE for plugins" page, but actually it's not that
clear when you're talking about platform SDK or project SDK or the java
SDK or what.

TIA
17 comments
Comment actions Permalink

Hello bassybassy,

I'm not sure which settings you are talking about. There is no such thing
as "Platform SDK" involved in plugin development.

To set up a plugin development environment, you need to do two things:
- create an SDK of type "JSDK" and point it to an ordinary JDK 1.6 installation;
- create an SDK of type "IntelliJ IDEA Plugin SDK" and point it to an installation
of IntelliJ IDEA.

Besides the obvious answer that one is for the platform and one is for
the project, what is the difference between the platform SDK and the
project SDK in terms of plugin development?

I am not sure what to specify in each of these,.

Actually, I am a little confused about these and the modules and
libraries settings also. I just don't  know what IntelliJ want me to
put in for these options.

In Project Settings there's a Project SDK (standard development kit).
Not sure if you're looking for the Java SDk, like 1.6 or what. Then in
Platform Settings (what platform exactly?) there's input for  SDKs
(plural) and
an input for classpath, source path and all this kind of thing. Are
you
looking for the source path to Sun's Java sources or the sources to
some
part of the OpenAPI (which part?) or the sources of the community
edition
(which starts at what folder exactly?) or the sources to the plugin I
am authoring?
Then there's the JDSK home path.. not sure what to put in there.

I am trying to set up an environment for developing plugins. I have
read the "setting up the IDE for plugins" page, but actually it's not
that clear when you're talking about platform SDK or project SDK or
the java SDK or what.


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

Thank you! Just FYI I am attaching a screenshot of the  Platform SDK dialog I am confused by.  I know my snapshot probably doesn't make any sense in terms of the things I've filled in  but I try to reason through things before asking questions and well, that dialog is sometimes what happens as a result !

When you say:
" create an SDK of type "IntelliJ IDEA Plugin SDK" and point it to an installation of IntelliJ IDEA."

 
actually I am not sure what's meant. 
 
There's the installation of IntelliJ that everyone has, plugin developer or not, which sits (in Windows) in "Program Files/Jetbrains" . Then there's the SOURCE of the Community Edition I downloaded through git (I think) and deposited  
 
at some specific place on my machine and which begins with idea10 ; at least, I believe that that's the source to the Community Edition. Then there are folders inside  idea10....
 
I am just not sure  how to map the phrase you used " an installation of IntelliJ IDEA" to a specific item or directory because in my mind it could  describe any number of candidates. 
  
Thanks for helping! 
  
Sincerely. 
 

Attachment(s):
platform SDKpicture.jpg
0
Comment actions Permalink

Hello bassybassy,

The home for the IntelliJ IDEA SDK should be the root of the IntelliJ IDEA
installation under Program Files\JetBrains, not the Community Edition source
code.

Thank you! Just FYI I am attaching a screenshot of the  Platform SDK
dialog I am confused by.  I know my snapshot probably doesn't make any
sense in terms of the things I've filled in  but I try to reason
through things before asking questions and well, that dialog is
sometimes what happens as a result !

When you say:
" create an SDK of type "IntelliJ IDEA Plugin SDK" and point it to an
installation of IntelliJ IDEA."
actually I am not sure what's meant.

There's the installation of IntelliJ that everyone has, plugin
developer or not, which sits (in Windows) in "*Program
Files/Jetbrains*" . Then there's the SOURCE of the Community Edition I
downloaded through git (I think) and deposited  at some specific place
on my machine and which begins with idea10 ; at least, I believe
that that's the source to the Community Edition. Then there are
folders inside  idea10....

I am just not sure  how to map the phrase you used " an installation
of IntelliJ IDEA" to a specific item or directory because in my mind
it could  describe any number of candidates.


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

Just continuing on this topic for the sake of understanding better what plugin developers shoudl do...

On this page:

http://www.jetbrains.org/display/IJOS/Writing+Plug-ins

it recommends:

  • Check out the sources of IntelliJ IDEA Community Edition as described in Check Out & Build Community Edition
  • Create an SDK of type "IntelliJ IDEA SDK" and specify your installation of IntelliJ IDEA Community Edition as the home path. (You can use IDEA Ultimate as well, but debugging the core code will only work with the Community Edition.)
  • In the Sourcepath tab of the SDK settings, press the "Add..." button and specify the directory into which you have checked out the sources of the Community Edition
  • Create a new module of type "Plugin" and select the created SDK as the SDK to be used for this module.


The things that are confusing are the things I put in color. Respectively:

Create an SDK of type "IntelliJ IDEA SDK"
I am not sure what it means to "create an SDK". What EXACTLY is this telling me to do? I also don't  understand what it means for an SDK to be of "type IntelliJ IDEA SDK". Does that mean type in the String IntelliJ IDEA SDK somewhere in a dialog box instead of say, the string  "Betty White's New Career" ?


Specify your installation of IntelliJ IDEA Community Edition as the home path
Again I am not sure what EXACTLY this is telling me to do. I don't  see an input for  "home path" in any dialog  and AFAIK "home path" is a Java (as opposed to IntelliJ) concept referring to either the path to the JDK or the path to the TLD of  the sources of your specific  project, depending on what was meant by the person using the expression "home path" when they were talking.


In the Sourcepath tab of the SDK settings
OK so there is but one call for  any Sourcepath in either Project or Platform SDK dialogs, and that is the one that appears under the Platform SDK dialog.So now I am wondering what exactly the Project SDK dialog is all about? What's the underlying concept or needs it adresses? What is the "Platform" in "Platform SDK"? Does "SDK" still stand for "Standard Development Kit" or has the specific sense of that acronym  departed us and it now just sort of  means a generic "root of some library in which we have some interest"?  

Very many gracious thank-yous.

0
Comment actions Permalink

Hello bassybassy,

OK, let's spell it out step by step. Just a little note: subsequent tasks
that you'll encounter during IntelliJ IDEA plugin development are going to
be considerably harder and less well-documented than setting up the development
environment, and I don't think we would be able to provide such hand-holding
later on.

1. Open IntelliJ IDEA
2. Click the "Project Structure" toolbar button
3. Select the "SDKs" item on the left
4. The pane in the middle shows the list of all SDKs you have configured.
Make sure that the list contains an item called "1.6" with a Java coffee
cup icon. If it does not:
4.1. Press the + button
4.2. Select the "JSDK" item from the popup that appears
4.3. Select your JDK installation path in the "Select Path" dialog that appears
5. Press the + button again
6. Select the "IntelliJ IDEA Plugin SDK" item from the popup that appears
7. Press "OK" in the "Select Path" dialog that appears. (The path that you
need is selected by default.)
8. Press "OK" in the "Select internal Java platform" dialog that appears
9. Switch to the "Sourcepath" tab in the right pane of the dialog that you
see
10. Press the "Add..." button on the right
11. Select the directory into which you've checked out the IntelliJ IDEA
Community Edition source code.
12. Press "OK" in the "Detected Source Roots" dialog that appears.
13. Press "OK" to close the Project Structure dialog.

Now you're all set.

Just continuing on this topic for the sake of understanding better
what plugin developers shoudl do...

On this page:

http://www.jetbrains.org/display/IJOS/Writing+Plug-ins

it recommends:

  • Check out the sources of IntelliJ IDEA Community Edition as

described in
http://www.jetbrains.org/pages/viewpage.action?pageId=983225

  • Create an SDK of type "IntelliJ IDEA SDK" and specify your

installation of IntelliJ IDEA Community Edition as the home path. (You
can use IDEA Ultimate as well, but debugging the core code will only
work with the Community Edition.)

  • In the Sourcepath tab of the SDK settings, press the "Add..." button

and specify the directory into which you have checked out the sources
of the Community Edition

  • Create a new module of type "Plugin" and select the created SDK as

the SDK to be used for this module.

The things that are confusing are the things I put in color.
Respectively:

Create an SDK of type "IntelliJ IDEA SDK"
I am not sure what it means to "create an SDK". What EXACTLY is this
telling me to do? I also don't  understand what it means for an SDK to
be of "type IntelliJ IDEA SDK". Does that mean type in the String
IntelliJ IDEA SDK somewhere in a dialog box instead of say, the string
"Betty White's New Career" ?
Specify your installation of IntelliJ IDEA Community Edition as the
home path

Again I am not sure what EXACTLY this is telling me to do. I don't
see an input for  "home path" in any dialog  and AFAIK "home path" is
a Java (as opposed to IntelliJ) concept referring to either the path
to the JDK or the path to the TLD of  the sources of your specific
project, depending on what was meant by the person using the
expression "home path" when they were talking.

In the Sourcepath tab of the SDK settings
OK so there is but one call for  any Sourcepath in either Project or
Platform SDK dialogs, and that is the one that appears under the
Platform SDK dialog.So now I am wondering what exactly the Project SDK
dialog is all about? What's the underlying concept or needs it
adresses? What is the "Platform" in "Platform SDK"? Does "SDK" still
stand for "Standard Development Kit" or has the specific sense of that
acronym  departed us and it now just sort of  means a generic "root of
some library in which we have some interest"?
Very many gracious thank-yous.

---
Original message URL:
http://devnet.jetbrains.net/message/5307675#5307675


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

Yole said: "and I don't think we would be able to provide such hand-holding later on."

It's true. You're holding my hand and I need hand holding, Musím přiznat. But consider also- now that all that's been made crystal clear,  neither you nor anyone at IntelliJ  ever has to answer that question in any form again. So there's something in it for me, for you and for everyone who comes after me with the same questions. Not a bad thing, all tallied.  

0
Comment actions Permalink

Besides which, what if I'm some sort of super-genius who is going to revolutionize the process of  writing software, perhaps even electing to start with  IntelliJ's OpenAPI? Perhaps your helping me will come back to you in the form of relief  of  tens of thousands of man hours. How do you know? How can you be sure?  

Why not just water all the little plants who have their faces turned up to you and are  thristy for water. Nevermind thinking to yourself "this one's not going to grow to be much, I can see that already...". Just water everyone and see how things turn out.

It's like gambling or playing a game with odds you can't know. ... who's going to get interested in the OpenAPI and how is it ultimately going to pay off for Jetbrains? How is open sourcing going to make all the difference for our company? You can't tell, you just have to have faith in whoever shows up and takes an interest.

If Jetbrains was going to have all the good ideas internally, then why bother making anything open source in the first place? Nothing you didn't already think of could come from it, right? In reality, you just never know what's going to pay off or how.  

Best wishes!  

0
Comment actions Permalink

bassybassy, you're not really fair or rational.
There is simply not enough water for too many plants that need one liter of water each minute given manually instead of reaching with its roots to the endless reservoir of water just one millimeter away to stay with your metaphor.
JetBrains is not a school where every kind of fact is just hammered into your head.
That you didn't get this managed and didn't understand what Dmitry wrote before the hands-on list, shows that you are completely new to IntelliJ and didn't do ANYthing with it before.
The sad thing is that this is quite a good example of RTFM. You never had even one look at the help files - the thing behind your F1 key -, did you?
The usage of IntelliJ is quite extensively documented in there and amongst many other things also the task you tried to do.
The help has also good search functionality.
And you can even look at the help in the web with your browser, so I can even point you to http://www.jetbrains.com/idea/webhelp/configuring-project-sdk.html which describes exactly the part of IntelliJ usage you didn't understand.
As Dmitry said, developing a plugin for IntelliJ - or developing anything - is much harder than understanding the extensively documented functionality of IntelliJ.
If Jetbrains would have to hold your hand the same level through your plugin development as for this simple yet well documented task, they cannot do their real work, which is improving IntelliJ and that would really be sad.
Of course you never know what someone could contribute, but I personally - and I'm not related to JetBrains in any way but as user and customer - think that you must not expect anything from someone not even willing to have one look at the manual before asking questions.
And no, I don't want to start a flamewar here and I will not further post any message to this thread.
I just wanted to tell my 2ct and that it is.
Fullstop.

PS: Have a nice day. :-)

0
Comment actions Permalink

bassybassygoodboy wrote:

I am trying to set up an environment for developing plugins. I have read the "setting up the IDE for plugins" page, but actually it's not that clear when you're talking about platform SDK or project SDK or the java SDK or what. TIA

This page pretty much wraps it up: http://www.jetbrains.com/idea/webhelp/configuring-intellij-idea-plugin-sdk.html

0
Comment actions Permalink

A couple of related questions: When you are attaching the source path for the idea sdk, there is no mention as to the *version* of the source that you are attaching. I'm assuming that you need to make sure that the source you downloaded is for the version of the idea installation that you chose for the idea sdk? And in which case, if you chose an ultimate edition installation, you can't attach any sources?

0
Comment actions Permalink

Hello Joseph,

Yes, the version should match; unfortunately there's no way to check this
automatically. You can attach sources to an Ultimate installation as well
- the classes from the Community part of the codebase will have sources,
and the ones from the Ultimate part will not.

A couple of related questions: When you are attaching the source path
for the idea sdk, there is no mention as to the version of the
source that you are attaching. I'm assuming that you need to make sure
that the source you downloaded is for the version of the idea
installation that you chose for the idea sdk? And in which case, if
you chose an ultimate edition installation, you can't attach any
sources?

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

8. Press "OK" in the "Select internal Java platform" dialog that appears

So before the above step, I installed JDK 1.6 and created a "IDEA jdk". When I come to the above step, the newly created jdk "IDEA jdk" doesn't show up in the drop down list. Not sure if it is problem with the particular version of IDEA or something wrong with my installation.

"
IntelliJ IDEA 2018.2 (Community Edition)
Build #IC-182.3684.101, built on July 24, 2018
JRE: 1.8.0_152-release-1248-b8 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.12.6
"

0
Comment actions Permalink

IntelliJ IDEA now requires JDK 1.8, not 1.6.

0
Comment actions Permalink

Those pages are up to date. The first page doesn't say anything about JDK versions, and the second one says that a JDK 1.8 is required and a JDK 1.6 is optional.

0
Comment actions Permalink

It’s true that the first page doesn’t say anything about 1.6 but talks about choosing “IDEA jdk”. In the second page, “IDEA jdk” is only associated with the 1.6 jdk. That and this sentence “However, you must be careful to avoid using Java 8 APIs in IntelliJ IDEA Community Edition modules that use IDEA jdk.” made me feel that 1.6 wasn’t optional and it worried me that I might encounter a difficult bug later on. Hope that makes it clear as to why I spent time troubleshooting this. I understand that the documentation is not perfect. Just trying to help make it clearer. Leaving it to your discretion.

Thanks again for answering my original question!

0
Comment actions Permalink

Thanks for clarification! I've filed an issue to update the docs: https://youtrack.jetbrains.com/issue/IJSDK-474

0

Please sign in to leave a comment.