- This topic has 5 replies, 2 voices, and was last updated 15 years, 8 months ago by support-joy.
-
AuthorPosts
-
ernestzMemberI am using MyEclipse 6.6 and working on existing projects I which I check out of source control. The projects were originally created with MyEclipse 6.0.
I have noticed that some of the existing .properties files use entries such as:
email.signature = Regards,\n\ {4}\n\ \n\ \n\ -- \n\ {4}, {5}\n\ Phone: {6}\n\ Email: {7}\n\ \n
The back-slash characters were used to break the property values into a more human readable format.
If I just open the .properties file in the “MyEclipse Properties Editor” under ME 6.6, the ‘multi-line’ values are all converted to single line values.
email.signature = Regards,\n{4}\n\n\n-- \n{4}, {5}\nPhone\: {6}\nEmail\: {7}\n\n
Making just one simple change results in many changes as far as source control is concerned, because of this concatenation – every single occurrence of a continuation in the property values are changed.
Is there any way to disable this ‘feature’ in the “MyEclipse Properties Editor”?
support-joyMemberHi ernestz,
You can change the property files editor settings here – Window > Preferences > Java > Properties Files Editor.
I am using ME 7 and I have edited an existing .property file to include the above entries with \n. I have saved .property file, closed and re-opened again. I am not able to reproduce this error at my end. Can you create a new .properties file and test auto-format?
ernestzMemberI don’t see how to disable this auto reformat anywhere in the “Properties Files Editor” settings dialog, but, maybe I’m just missing something.
But, I created a new General project, and create a new File called test.properties. By just double clicking on the test.properties file, the “MyEclipse Properties Editor” opens the file and I have two tabs at the bottom of the edit window, one labeled “Properties” and one labeled “Source”. I click on the source tab and enter:
email.signature = Regards,\n\ {4}\n\ \n\ \n\ -- \n\ {4}, {5}\n\ Phone: {6}\n\ Email: {7}\n\ \n
Including the trailing “\” character to continue the value on multiple lines. I then save and close the file. After double clicking to open the file again, I see that the all of my line continuation characters have been removed, and the entire name=value pair now resides on one line.
In my previous report, I simply opened an existing (and somewhat large) .properties file and made a simple change, only to find out when trying to check in my changes the the most of the file had been changed such that all line continuation characters had been removed and all of the multi-line entries had been converted likewise.
By the way, I found out I can change the default .properties file editor from the “MyEclipse Properties Editor” to the default Eclipse “Properties File Editor”, which does not ‘corrupt’ my existing multi-line name=value pairs.
I can understand reformatting existing text or code at the request of the user, but to auto-format/reformat without user initiation seems to be counter productive.
support-joyMemberHey ernestz,
Sorry for the inconvinience caused. To help me reproduce this issue at my end can you copy & paste your installation details? It should be under MyEclipse > Installation Summary > Installation Detail. Can you also PM me your .properties file. I tried to copy and paste the above code in .properties, and I am unable to reproduce this at my end.
ernestzMemberInstallation details:
*** Date: Monday, March 9, 2009 1:57:33 PM CDT ** System properties: OS=WindowsXP OS version=5.1 Java version=1.6.0_11 *** MyEclipse details: MyEclipse Enterprise Workbench Version: 6.6.0 Build id: 6.6.0-20081015 *** Eclipse details: MyEclipse Enterprise Workbench Version: 6.6.0 Build id: 6.6.0-20081015 Eclipse Project SDK Version: 3.3.3.r33x_r20080129-7M7J7LB-u3aphGW6o3_VmiVfGXWO Build id: M20080221-1800 Eclipse Platform Version: 3.3.3.r33x_r20080129-_19UEl7Ezk_gXF1kouft Build id: M20080221-1800 Eclipse Plug-in Development Environment Version: 3.3.3.r33x_r20080129-7N7M5DQVIA_6oJsEFkEL Build id: M20080221-1800 Eclipse RCP Version: 3.3.3.r33x_r20080129-8y8eE9UEUWI6qujeED0xT7bc Build id: M20080221-1800 Eclipse Java Development Tools Version: 3.3.2.r33x_r20080129-7o7jE7_EDhYDiyVEnjb1pFd7ZGD7 Build id: M20080221-1800 Eclipse Graphical Editing Framework Version: 3.3.2.v20080129 Build id: 20080221-1602 Eclipse startup command=-os win32 -ws win32 -arch x86 -showsplash -launcher C:\Program Files\MyEclipse 6.6\eclipse\eclipse.exe -name Eclipse --launcher.library C:\Program Files\MyEclipse 6.6\eclipse\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.3.R33x_v20080118\eclipse_1023.dll -startup C:\Program Files\MyEclipse 6.6\eclipse\plugins\org.eclipse.equinox.launcher_1.0.1.R33x_v20080118.jar -showlocation -vm C:\usr\jre6\bin\client\jvm.dll
support-joyMemberThank you ernestz. I am able to reproduce the error with the test.properties file you have PM’d me. I have filed a PR for the dev team to investigate this issue.
-
AuthorPosts