Linking to External Source Folders in Flex Builder

Flex Builder中链接到主源文件夹外的项目文件因使用绝对路径,难以被其他开发者复用。文章介绍了利用Eclipse内置功能解决此问题的方法,包括设置链接资源和添加源路径,使项目文件可共享,团队成员只需按步骤定义链接资源,无需更改项目文件。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

One problem I've always had with Flex Builder is that I can't reuse projects which link to source folders outside of the main source folder. These external source folders are usually defined with an absolute file path, which makes the project files unusable by other developers without changes. And changes mean that project files don't stay in sync, which is just one more thing to worry about.

Usually, the external source folder is a folder for test files, but it can also be some folders that really should be in a SWC. In any case, the project file isn't sharable in the current form, and we all like to share.

I learned from some developers at Brightcove that there is a solution to this using a built-in Eclipse feature. First, you need to set up a linked resource:

1. In Flex Builder, go to "Window > Preferences".
2. Navigate to "General > Workspace > LinkedResources".
3. Within LinkedResource, create a new variable that links to the folder you want to include or some common base directory. Usually, you'd enter some base directory within source control that could be reused for more than one external source path.

Once you have the linked resource, you'll want to add a source path to your project. Right-click on the project, go into "Properties", "Flex Build Path", "Source Path". As normal, select "Add Folder", but don't browse to the directory. Instead, use the linked resource name, either by itself:

${LINKED_RESOURCE_NAME} 注意,是${} 而不是$()!!!

Or if it's a base directory, you can tack on directories:

${LINKED_RESOURCE_NAME}/my_source/location

OK it, and it's all set up. Then you can share the project file to other people on the team, or check it into source control. Each member of the team will need to define the linked resource, as shown in the steps above, but the project files don't have to change.

转载于:https://www.cnblogs.com/chriscai/archive/2010/01/17/1650025.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值