Pages

Tuesday, June 3, 2014

DevNation 2014: post factum

DevNation was fun. It would have been even more fun it it wasn't co-located with Red Hat Summit. It basically fell into the same trap as JavaOne with Oracle Open World - being just a side event of the "real" conference.
The schedule was actually awesome but lots of talks didn't receive the attention they deserved due to the dispersed focus and many parallel tracks. The event really has a great potential to become the next big even for Java (and not only Java). There are quite a few videos available from the talks. Here are some interesting ones:

Neal Ford - Opening Keynote: Agile Architecture and Design.

Jason Greene - JVM Finalize Pitfalls: How to Avoid the Danger

 The positive side of DevNation event is definitely the location. I love San Francisco - very nice city!

Friday, March 21, 2014

DevNation 150OFF

A sneak peek into my session about JRebel at DevNation conference in San Francisco :http://blog.arungupta.me/2014/03/anton-arhipov-jrebel-devnation/

Check out the full schedule here: http://www.devnation.org/

Register with promo code 150OFF and get $150 off the registration fee!

Thursday, February 27, 2014

GeekOUT Conference Early Bird Registration is Live!

Registration to GeekOUT conference in Tallinn is now open! Geekout in numbers:
  • 15 amazing invited talks
  • 14 great speakers
  • Hand-picked vendors @ Demogrounds
  • Kickass party
And a special extra: Reactive Programming workshop with Erik Meijer!

Monday, February 17, 2014

Java 8 Lambdas - The Unintentional Puzzle

I was tinkering with Java 8 lambdas just lately. It happened to be an early morning on a bus from Tallinn to Tartu and I probably didn't sleep enough the night before. So I managed to puzzle myself with this little piece of code:

I actually expected it to print "Hello, lambda!" when executed, but it didn't. Can you figure out why? This is a very simple puzzler, and a very silly mistake that I made. I shouldn't have used the method reference to initialize the runner variable of RunForrestRun class. However, while the example is very simple, it actually shows that the new features do bring some accidental complexity into the language.

Wednesday, February 12, 2014

IntelliJ IDEA for Eclipse users

Finally! With help from the awesome RebelLabs team, I present you the Getting Started with IntelliJ IDEA as an Eclipse User report.

If you're an Eclipse user and considering to give IntelliJ IDEA a try - this is the finest read for you! If you're a convinced Eclipse (or NetBeans) user and not considering to switch to IntelliJ IDEA, still, you might learn something interesting from this report. If you are an IntelliJ IDEA fan, yet, you can find something interesting from this read.



Friday, January 10, 2014

Speaking at Jkofus 2014: Apples and Oranges

I will be speaking at Jfokus in Stockholm, on February the 5th. This is a fun talk again, about the IDEs. I'll be presenting the IntelliJ IDEA part along with Geertjan Wielenga (NetBeans) and Ken Walder (Eclipse).

Thursday, January 9, 2014

Speaking at DevNation in San Francisco, April 13-16

I will be speaking at DevNation conference in San Francisco.

The conference is co-located with Red Hat Summit so it's going to be a big one!

Tuesday, November 5, 2013

Automating IntelliJ IDEA Plug-in Development

In the previous post I wrote about managing the dependencies for IntelliJ IDEA plugin development and generating the project files. This was pretty simple and here's the full script:


apply plugin: "java"
apply plugin: "idea"

repositories {
    jcenter()
    maven {
        credentials {
            username 'username'
            password 'password'
        }
        url "http://my.repository.url
    }
}

dependencies {
    compile('org.zeroturnaround:jr-sdk:5.4.1') {
        transitive = false
    }
    compile 'org.ow2.asm:asm-all:4.1'
    compile 'org.slf4j:slf4j-nop:1.6.3'
    compile 'org.apache.commons:commons-compress:1.2'
}

defaultTasks 'setup'

idea.project.ipr {
    beforeMerged { project ->
        project.modulePaths.clear()
    }
}

idea.module.iml {
    withXml {
        it.node.@type = "PLUGIN_MODULE"
    }
}

task setup {
   description = "crete .idea based project structure"
   dependsOn ideaModule, ideaProject
   doLast {
     copy {
        from '.'
        into '.idea/'
        include '*.ipr'
        rename { "modules.xml" }
     }
     project.delete "${project.name}.ipr"
   }
}

task wrapper(type: Wrapper) {
    gradleVersion = '1.8'
}

The script is only limited to pulling down the dependencies from binary repository and generating the project files. However, one really big thing is missing here, is the SDK setup. Adding the new SDK for plugin development is simple enough, but I still have a good reason to automate that. In my plugin, there's a dependency on some SDK artifacts that are not included into SDK classpath by default. So adding the dependencies one by one into the SDK via the UI is a bit tedious and not really encouraging for the team work.

It would be cool if the script could register the IntelliJ Platform Plugin SDK and add it into the project files. It turns out that it should be doable as the SDK definitions are stored in options/jdk.table.xml file in IntelliJ IDEA's configuration directory.

It might be a bit brittle to go tinkering with the file directly, so maybe JPS API could actually be used to add a new entry for the SDK. (just an idea)

Those would be the steps for automating the setup:

  1. Fetch dependencies and generate .idea directory based project
  2. Generate Platform SDK entry to options/jdk.table.xml and add the reference to project *.iml file and .idea/misc.xml file
  3. Optionally, add more dependencies to Platform SDK definition
  4. The final step is the to add the build and release logic to the script

Now, a little bit of dreaming :-)

In the ideal world, the steps could be described as properties in build.gradle file:

  1. idea.module.type="PLUGIN_MODULE" - resolve as plugin module
  2. idea.project.sdk=auto (and idea.module.sdk=auto) - auto-generate the SDK entry (with good defaults) and add it to the project and module
  3. The extra SDK dependencies are probably something that needs a special care. Don't know what could be the best workaround, but maybe something like this:
    idea.project.sdk.dependencies {
       lib1.jar
       lib2.jar
       lib3.jar
    }
  4. Build script would basically mimic the autogenerated the Ant file, and release step actually requires a bit more than just changing the version of the artifact: the version in META-INF/plugin.xml has to be updated as well.

Dreaming aside, I think that the steps described above could be automated with a reasonable effort.

Disqus for Code Impossible