• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Absolute paths to eclipse project root? Why?

New Here ,
Apr 27, 2010 Apr 27, 2010

Copy link to clipboard

Copied

I am a dedicated follower of the Flex and related technologies since its first appearance (some years back, Flex 1.5)

Flash Builder (formerly Flex Builder) back then (version 2) seemed to have a problem with paths relative to project location.

More precisely, parts of generated projects always point to absolute locations either inside or outside the eclipse project workspace.

Unfortunately, the problem still persists. In the past I had reported this issue (long time to remember/extract details now) but without success as it seems.

This is very important for projects intended to be developed by more than one persons (different development machines, different paths etc.)

for an example, with Flash Builder 4, create a new Flex project (Web), activate WTP integration, complete project generation and then check files

.actionScriptProperties and .flexProperties

you will observe absolute path references to essential files

here is an example of my .actionScriptProperties

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<actionScriptProperties mainApplicationPath="Main.mxml" projectUUID="43b42874-f3f0-4b6b-932c-6a1d4e492b56" version="6">

<compiler additionalCompilerArguments="-services &quot;D:/eclipse-win32/workspace/net.eliasbalasis.flex.web.sample/WebContent/WEB-INF/flex/services-config.xml&quot; -locale en_US" autoRSLOrdering="true" copyDependentFiles="true" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin-debug" sourceFolderPath="flex_src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">

<compilerSourcePath/>

<libraryPath defaultLinkType="0">

<libraryPathEntry kind="4" path="">

<excludedEntries>

<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>

</excludedEntries>

</libraryPathEntry>

<libraryPathEntry kind="1" linkType="1" path="flex_libs"/>

<libraryPathEntry kind="3" linkType="1" path="D:/eclipse-win32/workspace/net.eliasbalasis.flex.web.sample/WebContent/WEB-INF/flex/libs/fds.swc" useDefaultLinkType="false"/>

<libraryPathEntry kind="3" linkType="1" path="D:/eclipse-win32/workspace/net.eliasbalasis.flex.web.sample/WebContent/WEB-INF/flex/libs/player/playerfds.swc" useDefaultLinkType="false"/>

<libraryPathEntry kind="1" linkType="1" path="D:/eclipse-win32/workspace/net.eliasbalasis.flex.web.sample/WebContent/WEB-INF/flex/locale/{locale}"/>

</libraryPath>

<sourceAttachmentPath/>

</compiler>

<applications>

<application path="Main.mxml"/>

</applications>

<modules/>

<buildCSSFiles/>

</actionScriptProperties>

here is a copy of my .flexProperties

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<flexProperties enableServiceManager="false" flexServerFeatures="6" flexServerType="8" flexWarLocation="D:/lcds/lcds.war" serverContextRoot="/WebContent" serverRoot="D:/eclipse-win32/workspace/net.eliasbalasis.flex.web.sample/WebContent" serverRootURL="http://localhost:8400/net.eliasbalasis.flex.web.sample" toolCompile="true" useServerFlexSDK="false" version="2"/>

D:/lcds/lcds.war i suspect is fine because it is the location of the LiveCycle Data Services WAR used to create the project (it is external anyway)

However, D:/eclipse-win32/workspace/net.eliasbalasis.flex.web.sample/WebContent is not fine at all. It is a location inside the project workspace. It should be referenced using some kind of variable, similarly to ${PROJECT_FRAMEWORKS} above.

I observed that there is a variable ${DOCUMENTS} under Eclipse-->Preferences-->Workspace-->Linked Resources which references the Eclipse project workspace root (extremely convenient).

Unfortunately, it seems that this variable can only be used within the context of other eclipse configuration files like .project and .classpath but not within the context of .actionScriptProperties and .flexProperties

This is the same exact issue I reported in the past (see above)

Flex Builder/Flash Builder family of products are the only Eclipse Based tools I have so far worked with that have such a big trouble handling file path locations relative to eclipse workspace root

OOPS. CORRECT ME IF I AM WRONG PLEASE.

I just replaced the eclipse workspace root with ${DOCUMENTS} and the project still compiles and generates deployment packages successfully.

Perhaps the "Linked Resources" variables work in the context of flex configuration files.

However I am not 100% sure.

Please verify or otherwise provide a solution, as I am ready to select Flex technology products for the development of a new quite complex, multi developer, large scale system and this will be the only reason making me consider abandoning Flex and use other technology products

Views

4.4K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 28, 2010 Apr 28, 2010

Copy link to clipboard

Copied

In the Eclipse environment it is possible to create variables to hold absolute path locations and then use those variables to replace your paths...as you discovered.

I use FB4 and Zend Studio 7.2 and the great thing is that I can use the same variables in both environments and not have to worry about absolute paths whether I am working on my laptop or my PC.

Gotta love the move to Eclipse!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 28, 2010 Apr 28, 2010

Copy link to clipboard

Copied

LATEST

I loooove Eclipse for reason.

Yes, you are right, use of variables is great thing.


However, there are 2 ways

1.

Use all paths relative to Eclipse workspace root. No absolute paths anywhere and No variables.

2.

Use tool-supplied variables (like ${DOCUMENTS} supplied by FB4 plugin pointing to Eclipse document root)

However, although the variable is supplied by FB4 plugin, when a project is generated its files still contain absolute path references

I had to manually introduce the ${DOCUMENTS} variable in project files discovering that variables work in the context of FB4 plugin project files.

In earlier versions of FB plugin variables where not processed.

Congratulations FB4 team, you saved the day.

All I am saying is that there shouldn't be absolute paths in generated FB project files. Replacing manually currently works but it is not the easiest thing for all users. I happened to know where to look. Others may not.

I believe FB team has to consider making actual use of the supplied variables in next version of FB (or alternatively, not use variables at all)


p.s.

You will love Eclipse, trust me 🙂

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines