Menu

#111 Inclomplete Eclipse var substitution in external config path

4.4.0
open
nobody
None
5
2012-09-25
2008-01-09
nissekq
No

To refer to a external configuration file located in for example the Eclipse configuration folder I used the "osgi.configuration.area" property in the checkstyle-config.xml file:

<check-configuration name="My Checks" location="${osgi.configuration.area}/my_checkstyle_config.xml" type="external" description="My checks">
    <additional-data name="protect-config-file" value="false"/>
</check-configuration>

But if opening the checkstyle GUI, the file can't be found. After selecting "Configure ..." this message appears:

C:\Documents and Settings\myname\My Documents\Workspaces\eclipse_331\whatever\file:\C:\Misc\user_home.eclipse_dte\checkstyle_dte_config.xml (The filename, directory name, or volume label syntax is incorrect)

Expected: The checkstyle property expansion should honor the "file:\" prefix ...

Discussion

  • nissekq

    nissekq - 2008-01-09

    Logged In: YES
    user_id=1977373
    Originator: YES

    My error; should of course use "remote" style ...

     
  • Lars Koedderitzsch

    Logged In: YES
    user_id=1238882
    Originator: NO

    I am confused now, using ${osgi.configuration.area} in a remote config location string did actually work??

    Property expansion in location strings is only implemented for external configurations...

     
  • nissekq

    nissekq - 2008-01-09

    Logged In: YES
    user_id=1977373
    Originator: YES

    Thanks for quick response! Some more info ..

    1) I tried the external config, and since ${osgi.configuration.area} returns an entry with "file:/" prefix I logged this defect.

    2) I went back and tried syntax file:/C:/<localfile> for remote config - which worked. Then assumed that property expansion would work also for external config - so thought I was home, hence cancelled defect.</localfile>

    3) Finally tried ${osgi.configuration.area} for remote - and you are right, did not work.

    SO - now opened again with 2 suggestions: 1) allow "file:/" syntax for external 2) implement property expansion for external.

     
  • Lars Koedderitzsch

    Logged In: YES
    user_id=1238882
    Originator: NO

    Moving to feature requests.

    Suggestion 1: I probably won't do this, bc. external configuration is meant to reference a file in a local file system (simple file name). For handling URLs remote config is the proper one
    Suggestion 2: Will be implemented

     
  • nissekq

    nissekq - 2008-01-10

    Logged In: YES
    user_id=1977373
    Originator: YES

    Excellent - thanks! BTW: wrt suggestion 2, meant to say "2) implement property expansion for remote." not "external" but I guess you figured that out :-)

    Rgs,

    /N

     

Log in to post a comment.