last day (2348 days later) » 

5:47 PM
@rm-rf Awake?
 
Yup
 
@rm-rf I fixed the documentation and in a few minutes I update the stuff.
From now on the most recent plugin jar can be found in the repo.
 
@halirutan That'd be useful!
btw, could you walk me through the basics of compiling it? Do I just do javac Mathematica.java in the src/.../mathematica/ directory?
 
@rm-rf You mean how to compile the plugin?
 
yes
 
5:53 PM
@rm-rf is your internet fast?
And do you have git?
 
Yes to both
 
@rm-rf OK, for development you definietly need the source of IDEA, because otherwise you cannot debug through their code and you will understand absolutely nothing of their api.
Therefore, clone their idea source into your dev folder:
 
@halirutan Ok, so this then?
 
git clone https://github.com/JetBrains/intellij-community.git
@rm-rf right!
 
ok
 
5:57 PM
@rm-rf In the meantime we can prepare the other stuff
Do you have the latest Community Edition of idea, yes?
 
yes
 
Do you have installed the "Plugin DevKit" Plugin?
(And additionally UI Designer and groovy)
 
@halirutan No, will install them now
 
@rm-rf Next thing: You have a JDK 1.6 installed?
 
@halirutan Looks like all three are bundled and enabled
@halirutan yes
 
6:02 PM
@rm-rf You are on OSX right?
 
yep
 
(ok, so the shortcut lecture has to wait.. I sit infront of my Linux currently)
 
hehe, ok
 
If you did not make any changes to the Mathematica plugin, then it would be wise to delete the folder and clone it again, because I changed the name of the project file.
@rm When you deleted it, go in IDEA to "Checkout from Version Control"
and use
https://github.com/halirutan/Mathematica-IntelliJ-Plugin.git
You click ok to everything but you deselect that the plugin jar is a library.
 
Done (I use the command line), but I'm slowly exploring IDEA's vcs features
 
6:06 PM
@rm-rf Then open IDEA and make Import project
and reuse the .iml file if it asks.
@rm-rf Is the cloning of the IDEA source finished?
 
@halirutan Ok, all done. Cloning is not yet finished
 
Now you need to set the compiler for the plugin.
 
I have a "fast" connection by US standards, not EU standards :D
 
Got to
@rm-rf It took ages here too
Go to "Project Structure"
(icon in the toolbar, top-right)
 
ok
 
6:11 PM
Then SDKs and +
@rm-rf "Intelli Plattform...SDK"
As directory you give the top directory of the Community Edition you are running right now!
Internal Java Platform is 1.6
 
@halirutan Top directory of the cloned dev directory, right? Not the .app folder?
 
@rm-rf NO
App folder!
 
Ok
 
Now you go on the left side to Project
and select this SDK as Project SDK
 
@halirutan Hold on, I might have to install 1.6 again... it shows only 1.7 here, although I do have /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/
 
6:14 PM
@rm-rf Then just create another JDK!
Same settings box and go back to SDKs
You have a 1.6 in this list?
 
No, it shows only 1.7 in "IDEA internal platform"
 
If not, go to + and select JDK and use the 1.6 folder on your machine
 
Ok
 
@rm-rf Although, if you don't have 1.6 JDK installed on your machine, you need to install it.
 
@halirutan All done now. Created a new 1.6 JDK and set that with IDEA internal platform
Also set it as project SDK
 
6:17 PM
@rm-rf That's it. Close the settings.
@rm-rf When you now open any java file, it should show no errors
 
Do you have a specific out folder or should I just pick its default of plugin/out?
 
@rm-rf Don't care about this.
 
ok
 
@rm-rf Go to Build -> rebuild project
@rm-rf Ah, btw the resource folder is blue in the project view on the left side, yes?
 
compiled with just 3 warnings
 
6:21 PM
@rm-rf And these are stupid depreciated color warnings
@rm-rf OK, now create a Run configuratoin
Go on the top toolbar left to the green "Play" button and go to Edit Configurations
Then + and "Plugin"
Give it a name and in "Use classpath.." should be Mathematica-IntelliJ-Plugin
@rm-rf Then you can use Shift+F9 to debug or Shift+F10 to run the plugin.
This starts a new sandbox IDEA
 
@halirutan Ok, everything seems to be fine (I think). When I do Shift-F9, I get "Loaded classes are uptodate." Is that what I should be getting?
 
@rm-rf You are pressing Shift yes?
 
Yes
 
@rm-rf And is a new Idea started?
@rm-rf Check whether there are some windows on the screen, maybe covered by other windows
It asks you whether it should import settings when you start the sandbox the first time.
 
@halirutan Yes, and I said yes (or was that incorrect?)
 
6:34 PM
@rm-rf And now you have a second IDEA on screen yes?
 
I restarted IDEA and now a new instance of IDEA opens when I do Shift-f9
@halirutan yes
 
@rm-rf this new idea has no open project, right?
 
That's right
 
Can you go to settings -> plugins
and look whether you have a Mathematica Plugin already selected there
 
@halirutan In the second IDEA? Btw, do I start a new dummy project or just cancel the welcome screen?
 
6:36 PM
@rm-rf Yes, in the second (Sandbox) idea
@rm-rf Before you create a project, lets see whether the plugin is already active
 
@halirutan yes, it is
 
Then create a new project (a Mathematica test project)
 
(btw, I missed it earlier, because it shows up as com.intellij.idea.main, with a coffee mug icon instead of the JI)
 
@rm-rf You should be able to create a "Mathematica Module" now!
 
Yup
 
6:39 PM
OK, if you have this, you could right-click on the src folder and create a new Mathematica package file
 
@halirutan Yup, done
works as in the original instance
Ok, so after I make any modifications, I build and open this sandbox instance and test it?
 
@rm-rf Yes, it should. The good thing is now, that when you debug it (Shift+F9) and you set breakpoints in the parser, or in the documentation-creating code, you jump to the plugin-src and can look what happens.
@rm-rf Yes
@rm-rf If you don't create/delete methods, but you only modify things, you can just recompile and the new classes get automatically updated into the running sandbox!
 
@halirutan Nice! Ok, will fiddle with it today
 
@rm-rf Btw, is the IDEA cloning finished?
 
@halirutan Yes
 
6:44 PM
Then let's fix the last thing:
@rm-rf Go to the menu bar to "About Idea" and check the exact built number you are using.
 
129.354
 
@rm-rf OK, go into your terminal and in the idea src folder:
git tag | grep idea/129.
 
129.93 is the highest
build.txt says 130.SNAPSHOT
 
Then make a git checkout
on the closest built number
 
(or 129.423 if they're doing it sequentially)
 
6:49 PM
@rm-rf Let's take this and hope the differences are minor
 
Ok, checked out idea/129.354
 
Then go to your real IDEA and go to Project Structure
and then SDKs
again
Then you click on your IDEA IC SDK you created and go to the Sourcepath tab
Then + on the right side and select the root directory of your idea src you checked out
@rm-rf If you have done this, you should have a long list of source folder names there
 
@halirutan Yes, do I leave all the subfolders checked by default?
 
yes, leave everything checked
@rm-rf Now, your SDK which is used has access to the complete IDEA source and when you debug the plugin, you can jump step by step even through IDEA code.
Furthermore, you can always view the implementation of their API.
 
Thanks, this is great!
(I'm still spankin' new to IDEA and Java, but hopefully, will be able to pick up as I go along)
 
6:57 PM
@rm-rf This should give you a start. If you want to look deeper into a specific topic, just ping me and I can give you some hints where to look first.
 
@halirutan Ok, I will! Thanks a lot for the walkthrough! :)
 
@rm-rf no problem
 
Ok, I'm heading out for a while now, but I'll play with it later and ping you if I get stuck
bye!
 
@rm-rf bye
 
 
5 hours later…
11:32 PM
@halirutan Changing the class files automatically reloads in the sandbox after Shift-F9. How do I get changes to other files, such as templates to reload? Rebuilding doesn't seem to work either... I have to quit and restart IJ
 
@rm-rf Are we talking specifically about the templates?
 
yes
 
It's pain in the ass.
 
hehe ok
 
@rm-rf You probably have to delete the template manually.
It's located in:
@rm-rf give me a sec
the problem is, that the template is just not reloaded. I had this issue too
@rm-rf But the template worked for you?
 
11:39 PM
@halirutan I played around and modified the template to automatically insert BeginPackage["FileName`"] (i.e., the correct context) and author name. The template works, but the only problem is that it doesn't reload. I have to quit and restart just to see the changes
I'm now trying to implement an application structure... partially there
Still figuring out how to create a directory, using the available idea classes
 
@rm-rf Ah, OK. Then it is not a problem. You really have to RESTART it because I assume the templates are loaded only once statically.
 
:/ Ok. I've got it working now, and won't have to change it anymore, so not a problem
 
@rm-rf But you have found all the important documentation about the pluginDev, yes?
And this is a list linking into the user forum
which you find here
 
@halirutan Yes, I've bookmarked that one already
 
@rm-rf And please don't forget that you have to full source code of idea. You can just compile it and run it. then you create e.g. a java class and debug the IDEA code to see how they do it ;-)
See here how to build and run IDEA
 
11:48 PM
Thanks!
 

  last day (2348 days later) »