本文介绍了有没有办法在Flash Builder Standalone for Mac中添加Google Chrome作为外部Web浏览器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前看来,无法在Flash Builder Standalone for Mac中添加Google Chrome作为外部Web浏览器。在这种情况下,Eclipse只关心Unix可执行文件,而不关心.app文件。

It currently seems impossible to add Google Chrome as an external web browser in Flash Builder Standalone for Mac. In this context, Eclipse only cares about "Unix executables" and not .app files.

例如,Mac上的Firefox路径为: /Applications/Firefox.app/Contents/MacOS/firefox-bin
只能通过右键单击并在应用程序目录中的Firefox.app上选择显示包内容。

For example, the path to Firefox on a Mac is: /Applications/Firefox.app/Contents/MacOS/firefox-bin which is only found by right-clicking and choosing 'Show Package Contents' on Firefox.app in your Applications directory.

如果您尝试将Google Chrome添加为新的外部网络浏览器,您必须重复此过程才能导航到Chrome浏览器Unix exxecutable所在的 / Applications / Google Chrome.app/Contents/MacOS

If you try to add Google Chrome as a new external web browser, you'll have to repeat this process to navigate to /Applications/Google Chrome.app/Contents/MacOS where the 'Google Chrome' Unix exxecutable resides.

问题是名称中的空格。如果您尝试在Eclipse中单击确定,您将收到错误,阻止您继续:

The problem is that space in the name. If you attempt to click OK in Eclipse, you'll get an error preventing you from continuing:

是否有任何解决方法,所以我可以使用Chrome作为我的开发浏览器?我做了一些搜索,所有我可以想出的是这样的:

Are there any workarounds for this so I can use Chrome as my development browser only? I did some searching and all I could come up with was this:

更新:一个精湛的Flash Builder工程师给了我一个有用的提示。请注意,您需要在Mac中显示隐藏的文件,方法是打开终端并输入以下命令:

UPDATE: A kind and savvy Flash Builder engineer gave me a helpful tip. Note that you'll need to show hidden files in Mac, by opening Terminal and entering the following command:

defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder

按返回重新启动Finder。一旦隐藏的文件被显示,你会发现你在[你的工作空间] /。metadata / .plugins / org.eclipse.core.runtime / .settings / org.eclipse.ui.browser.prefs
有一个'browsers'属性定义了用于定义Eclipse Web浏览器的XML,添加一个新的浏览器位置和名称并重新启动Flash Builder。

Press Return to relaunch Finder. Once hidden files are shown, "You’ll find what you need in [YOUR WORKSPACE]/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.browser.prefs. There’s a 'browsers' property there that defines XML for defining Eclipse’s web browsers. Add a new browser location and name and restart Flash Builder."

在这种情况下, d添加:

In this case you'd add:

<external location\="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" name\="Google Chrome"/>\n

我可以确认这样做。希望我们不必在下一步的时候诉诸这种骇客。

I can confirm that this works. Hopefully we won't have to resort to this kind of hackery on the next go around.

推荐答案

你可以从FB 4.5中的UI - 但是,您需要在首选项 - > Web浏览器中确定路径(无引号和未转义)。选择使用外部浏览器,并将下面的行添加为位置(您可能不需要name \ =Google Chrome位,但看起来像我的一行):

You can do this from the UI in FB 4.5 - However, you need this exact path (unquoted and unescaped) in Preferences->Web Browser. Select "Use External Browser" and add the line below as the location (You may not need the 'name\="Google Chrome" bit, but looks like it worked all in one line for me):

/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" name\="Google Chrome

这篇关于有没有办法在Flash Builder Standalone for Mac中添加Google Chrome作为外部Web浏览器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-02 12:34