0

I am an ubuntu user and gedit is my preferred editor. Eclipse is my preferred editor for java project, but in the specific case of play framework, RAD java oriented, i'll prefer to use a light editor like gedit.

So the question is: Is there a plan to provide some gedit plugin/snippets for the playframework ?

Mark Hurd
  • 10,665
  • 10
  • 68
  • 101
  • First interesting question would be if it possible to open a file in gedit via an URL and jump to a specific line. Something like gedit geidt://myfile:3 to open myfile and jump to line3 – niels Nov 18 '10 at 17:55

2 Answers2

0

Certainly in the next version of the release, there does not seem to be any plans to release GEdit specifics to the framework. I think the TextMate bundle was added as this was the development environment Guillaume uses when building his Play applications for clients, so its made sense to speed his development up.

There is no reason why this functionality could not be created outside of the Play core framework, as a module or plugin.

As for Niels question about the gedit://myfile:3, it does appear that GEdit supports opening a file to a specific line number, but I was unable to find a way to open GEdit from a registered URL (again like TextMate). This should be possible, however I am not a strong enough Linux developer to know how, but it would simply be a case of mapping the URL in a format such as

gedit://open?url=file://%s&line=%s

to the linux command

gedit +<line> <file>
Codemwnci
  • 54,176
  • 10
  • 96
  • 129
0

It is possible to convert the play url to a gedit compatible commande line with a script.

I did a small script named "textmate" that does the conversion (I think there is some better way to do that but I am not a grep master) :

#!/bin/bash
URL=$1
FILE=`echo $URL | grep -o -E 'file(.*?)line=(.*)' | cut -d':' -f 2 | cut -d'&' -f 1`
LINE=`echo $URL | grep -o -E 'file(.*?)line=(.*)' | cut -d'=' -f 2`
gedit +$LINE $FILE &

In firefox you can associate this script with the txmt protocol as described here http://kb.mozillazine.org/Register_protocol#Firefox_3.5_and_above

Seb Cesbron
  • 3,823
  • 15
  • 18