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 256015 - NetBeans must always provide "Open in System"
Summary: NetBeans must always provide "Open in System"
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Platform (show other bugs)
Version: 8.0.2
Hardware: All All
: P3 normal (vote)
Assignee: Tomas Zezula
URL:
Keywords: PATCH_AVAILABLE
Depends on:
Blocks:
 
Reported: 2015-10-19 11:09 UTC by terje7601
Modified: 2015-10-28 21:10 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
proposed patch (29.54 KB, patch)
2015-10-28 21:02 UTC, matthias42
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description terje7601 2015-10-19 11:09:21 UTC
Just as with .odb files (issue 245429), when I have an .mwb file (MySQL WorkBench) in a project, there is no "Open in System" item in neither the "Projects" nor the "Files" view, to be able to open the file outside NetBeans with MySQL WorkBench.

Right now, NetBeans forces me to open up MySQL WorkBench / Windows Explorer, browse all the way to the folder containing the file, and open it. Instead, it should always provide an "Open in System" option, which would simply call java.awt.Desktop.open(...) on the file.

I really don't understand why NetBeans tries to claim files (such as anything that looks like a .zip file) when it doesn't allow you to do anything useful with them.

PS: issue 245429 was closed without any motivation, so if you're going to close this one as WONTFIX either, at least take the time to explain why
Comment 1 Jiri Kovalsky 2015-10-22 18:19:48 UTC
Reassigned to DB for further evaluation. Matthias, is this something you would like to implement for ODB files?

Meanwhile, why don't you Anthony use this plugin?

http://plugins.netbeans.org/plugin/43217
Comment 2 terje7601 2015-10-23 06:29:41 UTC
(In reply to Jiri Kovalsky from comment #1)
> Reassigned to DB for further evaluation. Matthias, is this something you
> would like to implement for ODB files?

I don't understand why you're reassigning to a specific component? This is an IDE-wide issue, and I just gave .odb/.mwb as 2 examples.
I don't know how NetBeans implements "Open in System", but like I said: in theory it's as simple as calling java.awt.Desktop.open(...) on the file.
Ideally, in addition to the "Open in System" context menu item, NetBeans should do the same when double-clicking the file while holding a modifier key (e.g. Shift + double-click would do "Open in System").
Comment 3 Jiri Kovalsky 2015-10-23 10:26:01 UTC
I reassigned it, because I thought it would help you in particular with opening your ODB files. The reason why your issue #245429 was closed is that we don't have anyone to implement this. If you are willing to do it, please sign OCA [1], attach the patch [2] to this issue and from next week it can be theoretically available in the development builds. Thanks!

[1] http://wiki.netbeans.org/FaqHowDoIFileACA
[2] https://netbeans.org/community/contribute/patches.html
Comment 4 terje7601 2015-10-23 13:01:19 UTC
(In reply to Jiri Kovalsky from comment #3)
> I reassigned it, because I thought it would help you in particular with
> opening your ODB files. The reason why your issue #245429 was closed is that
> we don't have anyone to implement this. If you are willing to do it, please
> sign OCA [1], attach the patch [2] to this issue and from next week it can
> be theoretically available in the development builds. Thanks!
> 
> [1] http://wiki.netbeans.org/FaqHowDoIFileACA
> [2] https://netbeans.org/community/contribute/patches.html

Thanks for your explanations (I think you mean MWB though, since ODB is not related to MySQL). And when I get around to learning the NetBeans Platform, I'll make sure to revisit this issue & try to create a patch for it ;-)
Comment 5 Jiri Kovalsky 2015-10-23 15:15:43 UTC
(In reply to terje7601 from comment #4)

> I think you mean MWB though, since ODB is not related to MySQL)

Oh, yes. My bad, sorry.

> And when I get around to learning the NetBeans Platform, I'll make
> sure to revisit this issue & try to create a patch for it ;-)

That would be awesome! Thanks.
Comment 6 matthias42 2015-10-28 21:02:55 UTC
Created attachment 157031 [details]
proposed patch

I looked into this a bit and came to the conclusion, that this issue has its root in the java.j2seplatform module (Java SE Platforms and Libraries).

The mentioned module offers a JAR DataLoader that offers a package view of the jar content. This is the cause for the missing menu entries. "Open in System" and "Open as" are provided for unknown file, but not for this now semi-known filetype.

The JAR DataLoader is responsible, because it not only claims ownership over jar, war, ear, ?ar, but also everything with the signature of a ZIP file. All openoffice filetypes, openxml filetypes and also the mysql workbenach file match this signature and can only be determined by either doing deep-analysis of the content or guessing from the extension.

While looking at this I also noticed, that the package view is not always appropriate for zip file, which primary represents a directory hierarchy, not java packages. So the attached patch does this:

- Split Java-Archive Handling (?ar, apk, jad) and ZIP File handling (signature base detection + zip)
- For "normal" ZIP show a folder hierarchy
- Add "Open in System" and "Open as" to both filetypes
Comment 7 matthias42 2015-10-28 21:10:21 UTC
Following my reasoning in comment 6 (these two comments are split because the first comment done while attaching the patch), I change assignment to product "java" and product "platform".

Please review the proposed patch. I subscribed to this bug - so comments will reach me.