[#3870] - Allow JSS to open .jrxml and .jasper files by default (patch included)

Category:
Enhancement request
Priority:
Normal
Status:
Confirmed
Project: Severity:
Minor
Resolution:
Open
Component: Reproducibility:
Always
Assigned to:
0

Hi,

It would be nice id JSS would be able to handle .jrxml and .jasper files by default on Mac. This is quite easy to do.

In the Info.plist inside the Mac version's appbundle:

Something similar to this should be added to the keys (this works fine and is minimalistic):

<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>jrxml</string>
</array>
<key>CFBundleTypeName</key>
<string>Jasper Report</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>jasper</string>
</array>
<key>CFBundleTypeName</key>
<string>Compiled Jasper Report</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
</array>

Kind regards,
Maarten @ Yesplan

v5.6
mvcoile's picture
120
Joined: Apr 28 2014 - 2:15am
Last seen: 1 year 2 months ago

3 Comments:

#1
  • Assigned:nobody» mrabbi
#2
  • Status:New» Confirmed

Hi,
as far as I could find there is no such "easy" way to modify the Info.plist information being produced when materializing the OSX product.
I found this reference that sounds interesting, anyhow, as you may see it is still in status NEW: https://bugs.eclipse.org/bugs/show_bug.cgi?id=339526
What I could try to do is to create something custom, like this maven plugin that, among the other tasks, patches the Info.plist file.
Reference here: https://github.com/komaz/eclipse-ini-patcher
I will put this among the TODO list in the road map.

The section you proposed above is fine, and you can as workaround for now apply it to the Info.plist located in /Applications/Jaspersoft Studio 5.6.1.final/Jaspersoft Studio.app/Contents
After that you give the following commands in terminal:
>> alias lsregister='/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister'
>> lsregister -lint -f /Applications/Jaspersoft\ Studio\ 5.6.1.final/Jaspersoft\ Studio.app

This will register the associations correctly and you will be able to double click on the JRXML (and .jasper) files to open them.
You can verify that the associations are present by verifying the output of "lsregister -dump" command.

Regards,
Massimo.

#3

we should have it also for Linux and Windows, to create this file associations and desktop shortcuts

file associations should be not only for .jrxml and .jasper but also for .jrtx .jrctx, all extensions we use

Feedback
randomness