This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
NB 7.1 (20111017) If you open Tools | Options you'll see Firefox, Mozilla and Netscape ... I think it's time to replace Netscape by Chrome.
Nice enhancement for ide/extbrowser component.
Agreed.
-> DEFECT
fixed in easel_css_72 branch web-main#290487d391fd
On Ubuntu there are two versions of Chrome (see for example http://code.google.com/p/chromium/wiki/ChromiumBrowserVsGoogleChrome ) and we should try to detect both of them.
Something else is wrong. I installed (on my Ubuntu) google-chrome in addition to chromium-browser and I can see now Chrome option in IDE options. Selecting it and testing the browser (eg. Help -> About -> click the www.netbeans.org link) opens the browser but closing the browser results into Warning dialog in the IDE saying "Cannot execute /usr/bin/google-chrome. Check external browser configuration." Trying to do that I opened IDE options and clicked Edit on Chrome browser but dialog "Web Browsers" does not contain Chrome.
Created attachment 116352 [details] Patch that fixes launching Chrome on Mac I am also facing a problem - Chrome does not open at all on Mac when I choose Chrome in the IDE options - because for some reason, calling /usr/bin/open -a chrome <someurl> prints out "Unable to find application named 'chrome'". Also I noticed that the Chrome plugin version in the code is incorrect. The attached patch fixes this problem for me - see https://developer.apple.com/library/mac/#documentation/Darwin/Reference/Manpages/man1/open.1.html for background. I can push the patch - should I?
(In reply to comment #7) > Created attachment 116352 [details] > Patch that fixes launching Chrome on Mac > > I am also facing a problem - Chrome does not open at all on Mac when I choose > Chrome in the IDE options - because for some reason, calling /usr/bin/open -a > chrome <someurl> prints out "Unable to find application named 'chrome'". Also I > noticed that the Chrome plugin version in the code is incorrect. The attached > patch fixes this problem for me - see > https://developer.apple.com/library/mac/#documentation/Darwin/Reference/Manpages/man1/open.1.html > for background. I can push the patch - should I? Yes please. I will correct the version access method ( to read the version right from plugin installation file ) later.
Denis, if you do not have Ubuntu I can look into it myself. Just let me know.
(In reply to comment #8) > (In reply to comment #7) > > Created attachment 116352 [details] > > Patch that fixes launching Chrome on Mac > > > > I am also facing a problem - Chrome does not open at all on Mac when I choose > > Chrome in the IDE options - because for some reason, calling /usr/bin/open -a > > chrome <someurl> prints out "Unable to find application named 'chrome'". Also I > > noticed that the Chrome plugin version in the code is incorrect. The attached > > patch fixes this problem for me - see > > https://developer.apple.com/library/mac/#documentation/Darwin/Reference/Manpages/man1/open.1.html > > for background. I can push the patch - should I? > > Yes please. > I will correct the version access method ( to read the version right from > plugin installation file ) later. Please ignore this comment. I've corrected the Chrome case with your proposition and also I've changed the current plugin version method. Thanks for you help.
(In reply to comment #5) > On Ubuntu there are two versions of Chrome (see for example > http://code.google.com/p/chromium/wiki/ChromiumBrowserVsGoogleChrome ) and we > should try to detect both of them. Do you suggest to recognize Chromium and Chrome as one option item ? By the way I cannot understand how Chromium could be installed. Could you please send me a link with information how to do it ?
(In reply to comment #6) > Something else is wrong. I installed (on my Ubuntu) google-chrome in addition > to chromium-browser and I can see now Chrome option in IDE options. Selecting > it and testing the browser (eg. Help -> About -> click the www.netbeans.org > link) opens the browser but closing the browser results into Warning dialog in > the IDE saying "Cannot execute /usr/bin/google-chrome. Check external browser > configuration." Trying to do that I opened IDE options and clicked Edit on > Chrome browser but dialog "Web Browsers" does not contain Chrome. That's very strange behavior. The presence of browser is detected by existed FS path . From your description I see that it has been detected once. The absence Chrome item means the FS path is not available on the system. This could be result of external change. I did a minor corrections : web-main#bfb7c8e8c2ec . Could you please test how it works now ?
(In reply to comment #11) > (In reply to comment #5) > > On Ubuntu there are two versions of Chrome (see for example > > http://code.google.com/p/chromium/wiki/ChromiumBrowserVsGoogleChrome ) and we > > should try to detect both of them. > > Do you suggest to recognize Chromium and Chrome as one option item ? There are two different browsers which you can have installed in parallel so I would give each its own option. > By the way I cannot understand how Chromium could be installed. chromium is part of unix distribution and can be installed via Ubuntu Software Center app - just type "chromium" there. google-chrome installation is more complicated (eg. http://www.liberiangeek.net/2011/12/install-google-chrome-using-apt-get-in-ubuntu-11-10-oneiric-ocelot/)
(In reply to comment #12) > I did a minor corrections : web-main#bfb7c8e8c2ec . > Could you please test how it works now ? Thanks. May take me day or two - too many live changes right now.
There were two problems which I fixed: ChromeBrowser.isHidden was wrong and HINT_ChromeBrowserName key was missing in the bundle. I fixed this as part of other changes I was doing as I needed to configure Chrome for some testing. Unfortunately my changes (web-main#d959d4bb9899, web-main#bd90713bf62e, web-main#3ab38e0edb69) conflicted little bit with your one and I had to hotfix it in web-main#91ffa6db4573: I've started using BrowserId (which we should rename to BrowserFamilyId) in browser implementations itself (ExtWebBrowser.getBrowserFamilyId needs to be still fully implemented). But from now on most of my changes will be outside of browser modules so there should not be more conflicts. Sorry. Btw. ChromeManagerAccessor in web.plugins will also need to take into account chromium browser in addition to chrome.
David, regarding this addition to SystemDefaultBrowser: @Override public BrowserId getBrowserFamilyId() { return BrowserId.UNKNOWN; } Shouldn't this be smarter? Denis is working on improvements that will allow us to figure out which browser is set as the system default (on most platforms). If you want to tell the users that "JavaScript debugging is only supported on Chrome" and the user has Chrome set as the default browser in the system, and is using the <System Default> setting in the IDE, shouldn't we accept it as well?
Yeah sure. It is work in progress.
Created attachment 116492 [details] Returning correct BrowserId from SystemDefaultBrowser I must say I can not imagine how this method can be implemented without changing some other code as well - I am attaching a patch that works for me on Mac, which also changes other code. I am not sure how significant the 'url' parameter is, because right now it is "lost in translation" and we always pass null. Do we need the url parameter, and if so, how can we pass it?
I committed the latest patch: http://hg.netbeans.org/web-main/rev/ac919e19a304 We should still check regarding the meaning and purpose of the url parameter.
(In reply to comment #19) > I committed the latest patch: http://hg.netbeans.org/web-main/rev/ac919e19a304 > We should still check regarding the meaning and purpose of the url parameter. I've introduced it as parameter based on the output you provide for command "defaults read com.apple.LaunchServices" : { LSHandlers = ( { LSHandlerRoleAll = "com.google.chrome"; LSHandlerURLScheme = http; }, { LSHandlerRoleAll = "com.google.chrome"; LSHandlerURLScheme = https; }, { LSHandlerContentType = "public.html"; LSHandlerRoleViewer = "com.google.chrome"; }, { LSHandlerContentType = "public.url"; LSHandlerRoleViewer = "com.google.chrome"; }, I'm not sure ( I'm not an expert in Mac and I don't have it to check ) that Mac uses the same browser for any URL type. The output shows at least two URL schemas : "http" and "https" , HTML content type and any other URL . So it seems there could be different applications used for various schemas, content types and default application. So there is no "default browser" on the system but result application depends on URL . That's just an assumption. The implementation has been based on this assumption. Current code state doesn't assume URL-dependent application. If we decide to keep previous decision based on URL then it could be done via reintroducing method "getPluginId" back instead of "getSystemDefaultPluginId" for ExtBrowserImpl and using it for delegate from ExtWebBrowser factories implementations.
chromium is added : web-main#27b18f01e7a8
I would just keep it simple and not worry about the URL. Just pretend that there is a global system default. We can always add the url parameter later if we need to and do it properly. And I would clean up the code and remove the url parameter from ExtBrowserImpl.getSystemDefaultPluginId(). Also, shouldn't this method be renamed to getSystemDefaultBrowserFamilyId?
Fix in trunk for Chrome browser web-main#5bd9e668bc47
Integrated into 'main-golden', will be available in build *201203230400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/5bd9e668bc47 User: Denis Anisimov <ads@netbeans.org> Log: Fix for BZ#203899 - Replace Netscape by Chrome.
*** Bug 205569 has been marked as a duplicate of this bug. ***
Integrated into 'main-golden', will be available in build *201209031048* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/290487d391fd User: Denis Anisimov <ads@netbeans.org> Log: Fixes for BZ#203899 - Replace Netscape by Chrome and BZ#208896 - java.io.FileNotFoundException