Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » RCP app on Mac, "Cannot open files in the XYZ format" when app is already running.
RCP app on Mac, "Cannot open files in the XYZ format" when app is already running. [message #1000270] Mon, 14 January 2013 07:02 Go to next message
Eclipse UserFriend
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?

Re: RCP app on Mac, "Cannot open files in the XYZ format" when app is already running. [message #1004946 is a reply to message #1000270] Thu, 24 January 2013 02:36 Go to previous message
Eclipse UserFriend
Turns out that a plain Hello RCP app (with the addition of handling OpenDocument events) does not display this problem.


One question remains:
Is there any way to configure the app to always open a new window?
Previous Topic:Cell Editors & Command Handlers
Next Topic:Closing a view programmatically
Goto Forum:
  


Current Time: Tue Jul 22 20:09:58 EDT 2025

Powered by FUDForum. Page generated in 0.05282 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top