Netbeans Legacy Versions, Old Versions, Build and Release Archive

Netbeans No Comments »

Just for the record, as this can be hard go google. If you need old and legacy versions of Netbeans, you can find them through this page:

http://www.netbeans.info/downloads/dev.php

Besides all releases, it also gets you to all build types including nightly, daily, milestone etc., acting as a way-back machine for Netbeans developers and users.

 

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Using rails-footnotes with vim/gVim

Netbeans, Ruby on Rails No Comments »

Few gems or plugins speed up Rails development like rails-footnotes by José Valim and others. Especially useful is its ability to open files directly in the a text editor from Firefox.

Out of the box, this gem works with Textmate, but it’s quite easy to get it to work with Netbeans. To apply the same process for Vim/gVim integration, proceed like so:

Adjust Filter Prefix

Change your configuration in environment.rb of your Rails project to, for example:

if defined?(Footnotes)
Footnotes::Filter.prefix = ‘gvim://open?url=file://%s&line=%d&column=%d’
end

The protocol can be anything you like, this will now be configured in Firefox.

Configure Firefox

Open about:config in your Firefox location bar and

Right Click > New > String “network.protocol-handler.app.gvim” with content ~/.editor_gvim.rb

Right Click > New > Boolean “network.protocol-handler.external.gvim” with value true

Create Editor Script

Create a script, for example in you home directory, and don’t forget to make it executable:

touch ~/.editor_gvim.rb && chmod +x ~/.editor_gvim.rb

The script could look like so:

#!/usr/local/bin/ruby
file = ARGV.first.split(’file://’).last.split(’&’).first
line = /\&line\=(\d+)/.match(ARGV.first)[1] rescue 0
`gvim –remote-tab-silent “+#{line}” #{file}`
`wmctrl -a “GVIM”`

The last two lines are delimited by backticks and it’s two hyphens (- -) before remote-tab-silent, which might all get eaten by Wordpress, so be sure to adjust after copying and pasting the code above.

Install wmctrl

sudo aptitude install wmctrl

Adjustments

The command in the script above

`gvim –remote-tab-silent “+#{line}” #{file}`

will open each file in a new tab.

If you want every file in a new buffer, simply change it to

`gvim –remote-silent “+#{line}” #{file}`

Finally, nothing stops you from opening the file in gVim and Netbeans simultaneously just by adding

`”/path/to/your/netbeans/executable” “#{file}:#{line}”`

`wmctrl -a “Netbeans IDE 6.5.1″`

NB will usually pick up all the changes automatically but in gVim you’ll have to reload with :e!

The Vim/gVim startup options are not easy to fathom (options go before files etc.), but here is the the documentation.

Update:

Here’s a version which also sets the current vim directory (check with :pwd) to your rails root (prevents overwhelming fuzzy finder):

#!/usr/local/bin/ruby
file = ARGV.first.split(’file://’).last.split(’&’).first
line = /\&line\=(\d+)/.match(ARGV.first)[1] rescue 0
rails_root = /\&rails_root\=(.*)/.match(ARGV.first)[1] rescue ‘~’
`gvim –remote-silent “+cd #{rails_root}” “+#{line}” #{file}`
`”/home/dirk/netbeans-6.5.1/bin/netbeans” “#{file}:#{line}”`
`wmctrl -a “Netbeans IDE 6.5.1″`
`wmctrl -a “GVIM”`

With these settings in environment.rb:

if defined?(Footnotes)
  Footnotes::Filter.prefix = “gvim://open?url=file://%s&line=%d&column=%d&rails_root=#{Rails.root}”
end

Vimperator

Now with the Vimperator plugin for Firefox you have round-trip development with gVim and Firefox without touching the mouse.

Hope it helps.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Folder org already exists/Too many open files with Netbeans

Linux, Netbeans No Comments »

The messages “Folder org already exists in …” and “Too many open files” when using Netbeans are likely related. The underlying error might be that Linux runs out of file descriptors, which can happen rather quickly when you open many projects at once. Here’s the solution.

The file descriptors can be set at the system level and at the shell level:

Check how many your system allows:

cat /proc/sys/fs/file-max

This value can be set to a high number, probably to several 100k without major issues. For now you might try:

echo “65536″ >/proc/sys/fs/file-max

You could also add

fs.file-max = 65536

to

/etc/sysctl.conf

then run

sysctl -p

to reload sysctl.conf

For the shell type

ulimit -n

to get the number of file descriptors.

You can set for example

* soft nofile 8192
* hard nofile 8192

in

/etc/security/limits.conf

to increase the number.

After increasing these values I have not had any issues with Netbeans as described above for several months now. Hope it helps.

=-=-=-=-=
Powered by Bilbo Blogger

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Editing less (less css) with Netbeans IDE

CSS, Linux, Netbeans 2 Comments »

Just a little tip, as the syntax of less (less css) is so similar to css, just add a new file type in Netbeans > Tools > Options > Miscellaneous > Files like so:

Btw, setting an image size in Bilbo after adding the image crashes Bilbo, but only after the post was saved locally. So add your images first, then “Save Locally” before this bug is fixed.

Update: I found less editing works a lot better with Netbeans 6.5.1 than with 6.8. The code formatting of 6.8 is too picky and will essentially not format less as it’s not proper css. No such problems with Netbeans 6.5.1 which I also use on Windows as a vastly superior less and css editor compared with Visual Studio.

You can always get Netbeans 6.5.1  and other versions through this page:

http://www.netbeans.info/downloads/dev.php

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Netbeans Regular Expressions Find and Replace

Netbeans, Programming, Quanta Plus No Comments »

Powerful find and replace with regular expressions should be the hallmark of every IDE worth its mettle. MS Visual Studio does it so-so, but lo and behold, Netbeans (at least in version 6.1) is even worse.

So I wanted to put foo at the beginning of every line in a text, which calls for a regex like:

^.*

and replace like:

foo $0

However, Netbeans only ever replaces the first match in a text, over and over again. It also hangs up easily in the process.

As with many a Netbeans quirk, it’s Quanta Plus to the rescue again:

Quanta_plus_utf-10

Works like a charm.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]
WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in