Friday, June 18, 2010

RefactoringNG

RefactoringNG is a flexible and powerful Java refactoring tool, implemented as NetBeans module. Refactoring rules are described as transformations of source abstract syntax trees to destination abstract syntax trees. For example, the rule that rewrites x = x + 1 to x++ is as follows:

 // x = x + 1 -> x++
 Assignment {
    Identifier [name: "x"],
    Binary [kind: PLUS] {
       Identifier [name: "x"],
       Literal [kind: INT_LITERAL, value: 1]
    }
 } ->
 Unary [kind: POSTFIX_INCREMENT] {
    Identifier [name: "x"]
 }
The names and structure of abstract syntax trees are the same as in Sun Java compiler. The tool uses Compiler Tree API (com.sun.*), the formal language model in the JDK API (javax.language.model.*), and NetBeans infrastructure. For example, if you have ever needed to replace the constructor call with a factory method or add an argument to each method call, you may appreciate how easily such tasks can be done with RefactoringNG:

Factory method

 // new Position(<args>) -> Position.create(<args>)
 NewClass {
    null,
    List<Tree>,
    Identifier [name: "Position"],
    List<Expression> [id: args],
    null
 } ->
 MethodInvocation {
    List<Tree> { },
    MemberSelect [identifier: "create"] {
       Identifier [name: "Position"]
    },
    List<Expression> [ref: args]
 }

Another argument

 // plus (<expr1>, <expr2>) -> plus (<expr1>, <expr2>, 5)
 MethodInvocation {
    List [size: 0],
    Identifier [name: "plus"],
    List<Expression> [id: args, size: 2]
 } ->
 MethodInvocation {
    List<Tree> [size: 0],
    Identifier [name: "plus"],
    List<Expression> {
       ListItems [ref: args],
       Literal [kind: INT_LITERAL, value: 5]
    }
 }
For more information, go to http://kenai.com/projects/refactoringng. For download, go to http://kenai.com/projects/refactoringng/downloads

11 comments:

Luc Duponcheel said...

looks like an interesting project to me Zdenek

it also looks somewhat similar to the jackpot project (I do not know if Oracle Labs is still supporting on it)

btw

I've looked at your parser code.
I am convinced that you would appreciate the power and elegance of Scala for writing parser code
(Scala has a powerful and elegant parser combinator library)

keep on doing the good work

Luc

Zdeněk Troníček said...

Hi Luc, good comment. It is similar to Jackpot and I hope it is superior.
As for the parser, I certainly will have a look at Scala way.

Enjoy your stay in Prague!

mmo25 said...

The year 2013, exactly where they will recommended your mission's "team-based racing,Inches interpersonal features along with visual information, all of these obtain because of from the kiosk video clip.
Cheap FIFA 15 Coins

buy FIFA 15 Coins

Anonymous said...

Klik Aja Di Bawah Ini
Pemesanan: 087733776655
http://obatkuat-57.com/
Jual Obat Pembesar Penis Vigrx Plus
Alat Bantu Sex Pria Dan Wanita
Rajanya Obat Kuat Sex
Obat Perangsang Wanita, Obat Gairah Wanita
Obat Pembesar Payudara Monyok, Payudara Kencang
Alat Pembesar Payudara Montok
Alat Pembesar Penis
Alat Sex Pria Boneka Moderen
Obat Pengental Sperma
Minyak Pembesar Penis, Obat Pemanjang Penis
Obat Hernia Paling Ampuh
Obat Pelangsing Badan, Melangsingkan Tubuh
Obat Perapet Vagina
Obat Peninggi Badan, Meninggikan Bada
Obat Pembesar Pantat, Pembesar Bokong
Obat Pemerah Bibir, Pemerah Puting
Obat Pemutih Wajah Alami Tensung Cream
Obat Penggemuk Badan
Obat Penghilang Tatto Permanen Herbal Alami
Kondom Antik Pria
Rajanya Obat Kuat Pria
Alat Bantu Sex Wanita Antik
Alat Bantu Sex Pria
Obat Kuat Herbal
Vimax Obat Pembesar Alat Vital
Cara Memutihkan Selangkangan dan Ketiak


Obat Pelangsing Badan Fatloss Jimpness Beauty
Selaput Dara Perawan Buatan


Unknown said...

OBAT KUAT RANJANG. COM

Selamat datang di toko online kami,semoga kehadiran kami bisa membantu menyelesaikan masalah rumah tangga anda

Info pemesanan
call : 082133991881
BBm : 323fac0b

KAMI MENJUAL PRODUK -PRODUK DI BAWAH INI

VIMAX CANADA PEMBESAR PENIS

LINTAH PAPUA PEMBESAR PENIS

OBAT KUAT SEK

ALAT-ALAT SEX

PENIS TEMPEL ELEKTRIK

SEX TOYS PRIA DAN WANITA

PENIS MUTIARA GETAR GOYANG MAJU MUNDUR

VAGINA SILIKON MANUAL

VAGINA SENTER 7 SPEED

PENIS NAGA
ELEKTRIK


PERANGSANG WANITA CAIR

PENINGGI BANDAN

KONDOM DURI SILIKON

PEMBESAR PENIS

GALERI KOSMETIK

CELANA HERNIA

CONTAK KAMI :
Hub: 082133991881
Pin bb: 323fac0b





SITUS BOKEP ARTIS

TANTE TANTE KESEPIAN

VIDEO TANTE BUGIL

Della said...

seseorang harus mengasaskan dengan memilih meja yang mereka duga benar dan kemudian membudayakan diri secara berbagai siklus permainan.
asikqq
http://dewaqqq.club/
http://sumoqq.today/
interqq
pionpoker
bandar ceme terpercaya
betgratis
paito warna terlengkap
syair sgp

super hero said...

Misbah Digital Marketing is an excellent online marketing agency in Bangalore.Misbah Digital Marketing!
Misbah Digital Marketing! having certified professionals in Google Ads, Google Analytics and Bing Ads.

Misbah Digital Marketing!

Plumbing & HVAC Services San Diego said...

ظهور نخستین سایت های شرط بندی
اما نخستین سایت های شرط بندی چگونه شکل گرفتند؟ قبل از اینکه به مبحث اصلی مقاله یعنی معرفی سایت بازی انفجار نیترو بپردازیم، بد نیست کمی با ظهور نخستین سایت های شرط بندی آشنا شویم. اگر فراموش نکرده باشید اشاره کردیم بازی های شرط بندی در گذشته محدودیت های زیادی را داشتند.
حضرات نیترو
حضرات
بازی رولت

اما امروزه قدرت اینرنت باعث شده تا این بازی به سایت های شرط بندی کوچ کنند و از محدودیت مکانی خارج شوند. تاریخ دقیق ظهور سایت های شرط بندی در دسترس نمی باشد.
بتخته نرد آنلاین نیترو
تخته نرد آنلاین
بلک جک نیترو

اما با رجوع به تاریخچه بعضی از این سایت های از جمله سایت نیترو، خواهیم دریافت که پیشرفت تکنولوژی، بزرگترین ترغیب کننده برای ایجاد این سایت ها بوده است. البته مطالب گفته شده تمامی اطلاعات درباره این سایت های نمی باشد.
پوکر آنلاین نیترو
پوکر آنلاین
بلک جک

شمار سایت های شرط بندی امروزه رو به افزایش می باشد. برای مثال می توانیم به سایت نیترو اشاره کنیم. این سایت معتبر یکی از پیشگامان در این عرصه می باشد که قصد داریم در این مقاله شما را بیشتر با آن آشنا کنیم.
پاسور آنلاین نیترو
پاسور آنلاین

ترفند برد و آموزش بازی انفجار آنلاین و شرطی، نیترو بهترین و پرمخاطب ‌ترین سایت انفجار ایرانی، نحوه برد و واقعیت ربات ها و ...
Visit https://www.wmsociety.org/
here for more information

Subhasree said...

Most valuable post! This article is very helpful and I think it quite fascinating while reading it. Looking forward to more post like this. Thanks for posting like this a good post.
To service your laptop with offer prices, Please visit : Laptop service center in Navalur

Plumbing & HVAC Services San Diego said...

Compre documentos en línea, documentos originales y registrados.
Acerca de Permisodeespana, algunos dicen que somos los solucionadores de problemas, mientras que otros se refieren a nosotros como vendedores de soluciones. Contamos con cientos de clientes satisfechos a nivel mundial. Hacemos documentos falsos autorizados y aprobados como Permiso de Residencia Español, DNI, Pasaporte Español y Licencia de Conducir Española. Somos los fabricantes y proveedores de primer nivel de estos documentos, reconocidos a nivel mundial.

Comprar permiso de residencia,
permiso de residenciareal y falso en línea,
Compre licencia de conducir en línea,
Compre una licencia de conducir española falsa en línea,
Comprar tarjeta de identificación,
Licencia de conducir real y falsa,
Compre pasaporte real en línea,

Visit Here fpr more information. :- https://permisodeespana.com/licencia-de-conducir-espanola/
Address: 56 Guild Street, London, EC4A 3WU (UK)
Email: contact@permisodeespana.com
WhatsApp: +443455280186

Plumbing & HVAC Services San Diego said...

Plumbing & HVAC Services San Diego
Air Star Heating guarantees reliability and quality for all equipment and services
Air Star Heating is specializing in providing top-quality heating, ventilating, air conditioning, and plumbing services to our customers and clients.
Our company is leading the market right now. By using our seamless and huge array of services. Our customers can now have the privilege of taking benefit from our services very easily and swiftly. To cope up with the desires and needs of our clients we have built an excellent reputation. We are already having a huge list of satisfied customers that seem to be very pleased with our services.

Plumbing & HVAC Services in San Diego. Call now (858) 900-9977 ✓Licensed & Insured ✓Certified Experts ✓Same Day Appointment ✓Original Parts Only ✓Warranty On Every Job.
Visit:- https://airstarheating.com