See the latest tools, trends, and technologies shaping the Java community in our top highlights from the JRebel 2023 Java Developer Productivity Report.
このエントリは、G*(Groovy, Grails ..) Advent Calendar 2013 参加エントリです。 このAdvent Calendar 、最初は http://groovy.codehaus.org/HTTP+Builder でオレオレ証明書を扱う方法について書くつもりで、いったんエントリーもあげたんですが、aya_eiya さんの ちょっとしたことがGroovy「エラーの出るSSL証明書を無視してHTTPSアクセスをテストする」と被っているということが判明しまして、それは一旦取り下げまして、その調査課程でどうしてもクリアできなかったことをエントリーにしたいと思います。 問題を単純にするために、HTTP Builder のサンプルコードで話を進めますが、 gist7913341 このスクリプト、コマンドプロンプトからだとすんなり動くんですが、IDEAから実行すると、
MLであったJenkinsのGroovyスクリプトを書くにはどうしたらいいかという話。 JenkinsのAPIはプラグインを書いたりしてるとなんとなく分かった気がしてきますが、慣れていないとJenkinsを管理したり、Groovy Postbuildプラグインを使うときに困ります。 で、どうするのがいいかというと、やっぱり慣れるしかないかと思います。やりたいことは毎回違うし、よくやるような事はプラグインにしてしまえば良かったり、すでにプラグインになってたりします。MLであった環境変数を設定したいというのは色んな場面で使えそうなので、Groovy Postbuildプラグインで、 manager.addEnv('HOGE', 'ほげ') とか出来るようになればいいのかなと思ってます。そんな感じでプラグインが使いやすくなっていくと、Groovyスクリプトを書く機会が減って慣れてない人には敷居が
Intellij上でGroovyを実行すると、全部classファイルにコンパイルされるので「 getClass().getResource("/hoge.groovy")」でgroovyファイルを読み込めない。groovyファイルを残すようにできないのだろうか?
http://plugins.jetbrains.com/plugin/?idea&pluginId=7173 地味すぎてあまり注目されてないけど、実はスゴいIntelliJEval。何してくれるかというと、こんなことしてくれる。 groovyでIntelliJのプラグインを書ける(スゴい! IntelliJEvalにgroovyスクリプトを登録するだけでプラグインが有効になる(超スゴい!! 普通のプラグインもその気になればgroovyで書けるんで前者はそれほどスゴくないんだけど、後者がなによりスゴイ!!要するにマクロみたいな気分でIntelliJのプラグインが作れるのだ。うっは、スゲェww IntelliJに限らずIDEのプラグインを作ったことある人ならわかると思いますが、プラグイン開発ってのは結構めんどいです。IntelliJの場合だと、ちょっと試してみるにもサンドボックス用のInte
メソッドコール部分をホバーするとAPIドキュメントを表示してくれるのはIDEとして普通のことだけど、 Groovyのような言語ではメソッドシグネチャで型を明示指定してないことが良くあります。 そういう場合でも、呼出先で使われるプロパティやメソッドなどを使ってどんなオブジェクトを期待しているか、可能な限りわかりやすく表示してくれる。 と、言葉で書いても何を言ってるかわからないだろうから、例を書くと def hoge(foo, bar, String baz) { foo.name = "" println foo.value bar.toString() baz.toString() } def zzzz() { hoge() } というメソッドがあるときに、zzzzのhoge()の上でカーソルをホバーしてみると(自分の環境だとCommand押しながらホバーでした).... String h
全編インテリジェイアイデアを使ったライブだったので、資料成分はほとんどありません。 資料で共有する価値が若干でもありそうなのは、1ページだけだったので画像だけ貼っておきますね。 ポイントとしては、 インテリジェイアイデア、マジ便利 新規購入はイケメン代理店からどうぞ http://codezine.jp/article/detail/6998 http://samuraism.com/ grails -debug で起動するとJavaのDebuggingAPI(?)でアタッチして動きを読むのがすごい楽! インテリジェイアイデアのDebug->Remoteを使うとすぐつなげる http://yamkazu.hatenablog.com/entry/2012/10/20/233031 最後の最後にsitemeshのフィルタが突然挟まるけど泣かない Grailsこわくない
以前Groovy版のIntroduce local variableつくってみたよ - しおしおの雑記帳で紹介した、GroovyでもQuick Fixでローカル変数を抽出するやつをIntelliJ CEにpull requestして、なんとかmasterにマージしてもらうことができました。 いつになるのかはわかりませんが、近いうちには正式にリリースされてGroovyプログラマの方々に使ってもらえることができるのかなと思っています。 前回のエントリはかなり適当な感じだったので、簡単ですがどんなことができるのかを紹介します。 仕様 Quick FixでJavaと同じようにローカル変数の抽出ができるようになっています。 ローカル変数に抽出できる部分は、カーソルがある式の一番外側のものとなっています。 有効/無効の設定 IntentionsのGroovy->Declarationに追加されているの
Here I would like to tell you about some of the Groovy language support improvements available in IntelliJ IDEA 11.1. Unused Symbol Highlighting If a class, method or property is unused even if it is in fact public, you may notice it immediately with new unused symbol highlighting feature. Introduce Parameter Refactoring Introduce Parameter refactoring has now become more powerful. Just select a c
最近周りの人の推しIDEに IntelliJ が増えてきたのでやってみた。 本当はScalaをやろうと思ったのだけど、ScreencastでSpockの紹介がやってたので、興味がそっちにいってしまった。 結論から先に言うと、IntelliJは自分と相性いいかも。 そう思った理由として、command + shift + t でテストクラスと行き来できるところ。 これがあればテストをGroovyで書いても Quick JUnit Plugin みたいに使える。 ただ最初は補完とか設定とか全然分からなくて何度もEclipseに戻ろうかと思った。 そんな僕を諦めずに支えてくれたのがこのScreencast。 Groovy/Spock好きの人は是非。 http://tv.jetbrains.net/videocontent/ffff http://tv.jetbrains.net/videocon
Java 7 がリリースされて数ヶ月が経ってるので今更ですが、Java 7 を使って開発を行うプロジェクトの環境設定をしてみます。 プロジェクトは Gradle (バージョンは 1.0-milestone-0.6) でビルドでき、IntelliJ IDEA で開発できるようにします*1。 また、Groovy も使えるようにしましょう。 Java 7 を使うなら、まだベータ版しかリリースされてませんが Groovy のバージョンは2.0以降にした方がよさそうなので、そうします*2。 という前置きのもと、Gradle の build.gradle ファイルを見ていこう!ってだけです。 ちなみに、この記事は「IntelliJ IDEA で実行可能 Jar ファイルを作成するプロジェクトの Gradle ビルドファイル 〜エンコーディングも指定するヨ〜 feat. JDK 1.6」の Java 7
IntelliJの外部ツールにGroovyServ登録してみた - marsのメモの手順とほぼ同じですが、これだとclasspathが設定できないので、BATを経由させます。 groovyclientは自動的に環境変数のCLASSPATHをgroovyservの方に渡すので、External Tools起動毎に一時的にCLASSPATHを書き換えてあげるだけでOKです。 groovyclient_wrap.bat groovyclient.exeと同じディレクトリに置く前提です。 @echo off set CLASSPATH=%~1 "%~dp0\groovyclient.exe" %2 %~1みたいに書くと、クォート("")が解除されるんすね。 IntelliJ IDEA側の設定 File > Settings > External Toolsに外部コマンドを追加する。以下の画面と同じ
G*ワークショップだったかJenkins勉強会で「IntelliJのGroovyサポートは惜しい」みたいな話を漏れ聞いたところ、んだっけか?と思うところもあったんで、ちょっと確認してみた。 IDEA10なってからGroovyもGrailsもまともに使ってないんだけど、多少の改善があった感じがする。その第1段がクロージャ引数とか空気読んで型を推測するようになってたよ。 たしかIDEA9んときは、 new File(".").eachFile { File it -> みたく型宣言するかDynamic Propertiesを指定しないとダメだったような記憶が...。 最後の手段で型宣言しちゃえば全然平気なんだけど、動的言語っぽくはないわな(ある意味ではGroovyっぽいんだけど。 それとクロージャ内もデバッガ止りますね。つうか昔のネタ探ってみたら結構前からできてたっぽいな。 → Re: gro
先日、業務系のJavaプログラマーが知っておくべき10個のBad Partsとその対策 - 達人プログラマーを目指してで、Javaのイケていない部分について説明し、そこでGroovyやScalaといったいわゆる軽量言語(LL)を使うことでコードが単純化されるという説明をしました。私自身も勉強会や書籍などで「軽量言語は簡単ですよ」という説明をされるたびに、軽量言語に乗り換えてみたいなという気になるのですが、いざ試してみると圧倒的に高機能で安定しているJavaのIDEと比較して見劣りがしてしまい(特に入力補完とリファクタリング機能において)、結局Javaに戻ってしまうということが今までに何度かありました。 先日参加したGroovyの勉強会(JGGUGの勉強会(G*ワークショップ)に初めて参加してきました - 達人プログラマーを目指して)でJenkinsの川口さんがIntelliJを使ってGro
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く