RCP app on Mac, "Cannot open files in the XYZ format" when app is already running. [message #1000270] |
Mon, 14 January 2013 07:02  |
Eclipse User |
|
|
|
I have an RCP application to which I would like to associate *.jfr files.
I'm having problems on Mac, where my app only opens the files when the app is newly launched,
if the app is already running, instead of opening my file, I get this error message:
The document "X.jfr" could not be opened. <App name> cannot open files in the "XYZ" format.
What I've done is add the file extension to Info.plist
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeName</key>
<string>XYZ</string>
<key>CFBundleIconFile</key>
<string>icon.icns</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>jfr</string>
</array>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSTypeIsPackage</key>
<true/>
</dict>
</array>
And followed this example in the Eclipse help to handle SWT.OpenDocument events
http://help.eclipse.org/juno/topic/org.eclipse.platform.doc.isv/guide/product_open_file.htm?cp=2_0_21_8
I guess there is some important difference between a new launched app, and a already running one, but what is it, and how can I make it work in both cases?
Is there a workaround to launch a new instance of the app each time?
|
|
|
|
Powered by
FUDForum. Page generated in 0.03940 seconds