在 Flex Builder 中将 AS 项目转换为 Flex 项目

发布于 2024-07-14 04:09:13 字数 115 浏览 2 评论 0原文

有没有一种简单的方法可以在 Flex Builder 中将 Actionscript 3 项目转换为 Flex 项目? 当我右键单击该项目并将鼠标悬停在“Flex Project Nature”时,所有选项均呈灰色

Is there an easy way of converting a Actionscript 3 project to a Flex project in Flex Builder? When i right click on the project and hover "Flex Project Nature", all options are greyed out

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

无需解释 2024-07-21 04:09:13

在不丢失项目设置的情况下实现该目标的几个常规步骤:

  • 更改导航器过滤器以显示通常对您隐藏的所有文件。
  • 在项目的根目录中查找 .project 文件。 您会在其中看到一个 标签。
  • 创建一个新的 Flex 项目。 打开那里的 .project 文件,然后比较 节点。
  • 将缺少的内容复制到当前的 .project 文件中。
  • 您可能需要关闭项目并重新打开它,以推动 Flex Builder 解析修改后的 .project 文件,
  • 您可能需要在项目属性周围单击才能得到正确的结果。 至少在 Flex Build Path -> 下 库路径,单击“添加 Flex SDK”按钮,因为这可能就是您首先要执行此操作的原因。

如果你缺少模板/东西(我自己不是一个大粉丝,但当你刚开始一个项目时,它是一个很好的拐杖),请在“Actionscript Compiler”下的“HTML包装器”下搞乱其中一个表单字段您的项目属性并应用更改,IDE 将重新创建 templates/ 文件夹。

A few general steps to get there without losing your project settings:

  • change your navigator filter to show all the files it's normally hiding from you.
  • look for a .project file at the root of your project. You'll see a <natures> tag in there.
  • create a new Flex project. open the .project file there, and compare the <natures> node.
  • copy the missing stuff to your current .project file.
  • you may need to close the project and reopen it, to nudge Flex Builder to parse your modified .project file
  • you'll probably have to click around the project properties to get things just right. At least under Flex Build Path -> Library Path, click on the "Add Flex SDK" button, since that's probably why you want to do this in the first place.

If you're missing the templates/ stuff (not a big fan myself, but it's a nice crutch when you're just starting a project), go mess with one of the form fields under "HTML wrapper" under "Actionscript Compiler" in your project properties and apply the change, and the IDE will recreate the templates/ folder.

青春如此纠结 2024-07-21 04:09:13

我在FB3中还没有见过类似的东西。

AS3 项目将缺少相当多的Flex 项目设置(例如模板html)。 最好的方法是创建一个空的 Flex 项目并向其中添加 AS3 源代码 - 将文件夹拖放到 Flex 项目的 src 文件夹中。 或者,如果它是 SWC,您可以使用项目设置添加它。

I haven't seen anything like that in FB3.

An AS3 project will lack quite a few of Flex project settings (e.g. template html). You are best served by creating an empty Flex project and adding the AS3 source to it -- drag and drop the folder(s) in the src folder of the Flex project. Alternatively, if it is a SWC you can add it using project settings.

烟柳画桥 2024-07-21 04:09:13

虽然有点脏,但是很管用。

  1. 在 Flex Builder 的导航器中删除项目。
  2. 它会询问您是否也想从文件系统中删除文件。 保留它们。
  3. 在与 ActionScript 项目相同的目录中创建一个新的 Flex 项目。

旧文件将保持不变,但新项目将具有 Flex 项目性质。 如果已存在与项目向导要创建的文件同名的文件,则不会删除现有文件。

如果您有自定义命令行参数、源或库目录或任何其他特定于项目的设置,则可能必须重置它们。

以防万一出现问题,请务必先备份您的项目目录。 不过,当我重新创建 Flex Builder 项目时,我从未丢失过文件。

It's a little dirty, but it works.

  1. Delete the project in Flex Builder's Navigator.
  2. It will ask if you want to delete the files from the file system too. Keep them.
  3. Create a new Flex project in the same directory as the ActionScript project.

The old files will be unchanged, but the new project will have the Flex Project nature. If a file already exists that has the same name as a file that the project wizard wants to create, the existing file will be not be deleted.

If you have custom command line arguments, source or library directories, or any other project-specific settings, you may have to reset them.

Just in case something goes wrong, be sure to back up your project directory first. I've never lost files when I've recreated a Flex Builder project, though.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文