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.

Bug 177471 - when click view on html file from nbdev build get 2 windows in broswer, not 1
Summary: when click view on html file from nbdev build get 2 windows in broswer, not 1
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Actions (show other bugs)
Version: 6.x
Hardware: PC Windows 7 x64
: P2 normal with 2 votes (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
: 202393 207634 221921 222382 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-11-23 13:44 UTC by emiddio
Modified: 2012-12-12 02:48 UTC (History)
11 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description emiddio 2009-11-23 13:44:50 UTC
latest dev build from 1,2 days ago -- click view on html file -- get to
windows opening up in chrome -- never happened before.
Comment 1 Ondrej Langr 2009-11-24 03:26:39 UTC
Standa, any ideas?
Comment 2 Stanislav Aubrecht 2009-11-24 03:34:43 UTC
what did you select in tools/options/web browser?
which version of java do you have?
Comment 3 emiddio 2009-11-24 11:55:08 UTC
i imported from prev netbeans; think nb67 dir.

i am using default system browser -- is chrome.

did not set explicitly.

worked fine with nbdev build a few days ago -- version 20091116, this version
20091122; never had this issue before

same jdk for months -- jdk1.6.0_16 64bit default;
Comment 4 asdoso 2012-02-20 16:35:07 UTC
This happens on Windows 7 x32 too, with both Firefox and Internet Explorer.

Right click on a HTML file, then click view, 2 windows (or 2 tabs) get opened.

Still unfixed on 7.1.
Comment 5 David Konecny 2012-10-15 23:34:09 UTC
*** Bug 207634 has been marked as a duplicate of this bug. ***
Comment 6 Denis Anisimov 2012-10-25 11:29:39 UTC
*** Bug 202393 has been marked as a duplicate of this bug. ***
Comment 7 David Konecny 2012-11-13 23:51:31 UTC
*** Bug 221921 has been marked as a duplicate of this bug. ***
Comment 8 David Konecny 2012-11-13 23:55:18 UTC
Standa, could you have a look in to this please - Jirka Skrivanek knows how to reproduce it. It looks like this has been happening for a while. I wonder whether it is extbrowser's problem or something in View action on HTML? Thanks.
Comment 9 mago_ebon 2012-11-14 03:57:48 UTC
I don't think this is a browser's issue since I have reproduced the behavior at on FF, IE and Chrome with same results.

I have seen this issue since at least 7.0, with both Java 1.6 and 1.7.
Comment 10 Stanislav Aubrecht 2012-11-14 09:24:38 UTC
The problem isn't reproducible with the embedded browser so it looks like an issue in external browser module.
Comment 11 asdoso 2012-11-14 09:45:47 UTC
It happens when you save the project where the folder is saved is different from the folder where the programs gets runned.

Try with project in "Netbeans Projects" folder and run it in the local server "HTDOCS" folder.
Comment 12 mago_ebon 2012-11-14 11:48:26 UTC
I'm not so sure of that last symptom. My project folders are same as sources.
Comment 13 David Konecny 2012-11-19 20:10:07 UTC
*** Bug 222382 has been marked as a duplicate of this bug. ***
Comment 14 David Konecny 2012-11-19 20:13:32 UTC
This is a fairly old issue and there is multiple duplicates. We should finally fix it. I cannot reproduce it but Jirka can so perhaps somebody from Prague's office could work with Jirka to figure out what's wrong? Please.
Comment 15 inonit 2012-11-21 18:38:48 UTC
I can reproduce this; my setup is FreeBSD 9.0-RELEASE, OpenJDK7, using Chrome.
Comment 16 inonit 2012-11-21 18:39:33 UTC
Sorry, and NetBeans 7.2.
Comment 17 Petr Jiricka 2012-12-05 13:06:03 UTC
I am able to reproduce. The issue is that the view method itself on HtmlDataObject$ViewSupport is called twice by the infrastructure. And this is because org.openide.awt.ContextManager.actionPerformed method looks for instances of org.netbeans.api.actions.Viewable, and 2 instances are returned by the lookup.

Passing to HTML - Marku can you please check if we are doing the cookie initialization magic correctly? Thanks.
Comment 18 Marek Fukala 2012-12-05 13:17:42 UTC
(In reply to comment #17)
> I am able to reproduce. The issue is that the view method itself on
> HtmlDataObject$ViewSupport is called twice by the infrastructure. And this is
> because org.openide.awt.ContextManager.actionPerformed method looks for
> instances of org.netbeans.api.actions.Viewable, and 2 instances are returned by
> the lookup.
What's the class of the instances?
Comment 19 Marek Fukala 2012-12-05 13:22:09 UTC
HtmlDataObject looks fine. It just adds the ViewSupport class to its CookieSet. (The ViewSupport implements ViewCookie which extends Viewable)
Comment 20 Marek Fukala 2012-12-06 12:19:59 UTC
ContextManager.isEnabled(Class<T> type, ...) calls findResult(type) that returns Lookup.Result which always contains two instances of the given type, regardless what is the type or the node on which the context action is invoked. Same problem on java, css, html with Openable, Viewable, ... but apparently the Viewable is the only one which is not idempotent.
Comment 21 Jaroslav Tulach 2012-12-11 11:12:09 UTC
ergonomics#c481e5e7e0d9
Comment 22 Quality Engineering 2012-12-12 02:48:42 UTC
Integrated into 'main-golden', will be available in build *201212120001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/c481e5e7e0d9
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #177471: when click view on html file from nbdev build get 2 windows in broswer, not 1
#177471: Remove duplicates when checking enablement status and invoking "cookies"