The default setting "/Applications/Firefox.app/Contents/MacOS/firefox-bin" tries to start a new instance of Firefox every time, which is refused blatantly by Firefox if there is already one.
Then I tried to use the "open" magic and set it to:
Name: Firefox
Location: /usr/bin/open
Parameters: -a /Applications/Firefox.app %URL%
which solved the multiple instances problem.
However, another problem popped up. The URL of API gotten from the code under cursor(Open External Javadoc) lost its anchor part, i.e., ".../docs/reference/android/widget/ImageView.html#setImageDrawable(android.graphics.drawable.Drawable)" became ".../docs/reference/android/widget/ImageView.html". So after opening the page, I have to locate the API by myself, which is really tedious and unproductive.
So, how can I properly set Firefox as the External Web Browser to overcome both problems together?
Name: Firefox Location: /usr/bin/open Parameters: -a Firefox.app %URL%
Source: http://support.mozilla.com/en-US/questions/666771.
In eclipse if you explicitly set Firefox as your external browser then it will attempt to start a new instance. However, if you set Firefox as your default system browser and select that option in eclipse, it will open a new window within the existing instance.
If for some reason you must have 2 instances then you can create a new firefox profile. I tried this but had LIMITED success. I was able to get the debugger running in a new instance only by creating this script and pointed to it in eclipse:
#! /bin/bash /Applications/Firefox.app/Contents/MacOS/firefox-bin -P debug $1 $2 $3 $4 $5 $6 $7 $8 $9
After some fiddling, i came up with a solution that requires Safari, /usr/bin/osascript and an applescript.
create an applescript like:
on run argv
tell application "Safari"
activate
make new document at the beginning of documents
set the_url to item 1 of argv
set the URL of the front document to the_url
end tell
end run
then save it somewhere, making a note of the path: /my/path/to/launch_url.scpt
In Eclipse:
/usr/bin/osascript
/my/path/to/launch_url.scpt %URL%
This was tested with Eclipse 3.5, and opens urls like the one an0 mentioned above.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With