Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » Eclipse Linux version delete code formatting php (The Eclipse Linux version (Ubuntu 14.04) delete code formatting php file)
icon4.gif  Eclipse Linux version delete code formatting php [message #1717375] Sat, 12 December 2015 11:15 Go to next message
davide marchi is currently offline davide marchiFriend
Messages: 1
Registered: December 2015
Junior Member
Hi friends,
today I've installed on Ubuntu 14.04 Eclipse 3.8.1-5.1 and (from Indigo Update Site - http://download.eclipse.org/releases/indigo/) PHP Development Tools (PDT) SDK Feature 3.0.0.v201201110400-77-184_2BEICRgM_fMVcz0M4Va9O.

This one has installed as dependencies:

Dynamic Languages Toolkit - Core Frameworks	3.0.0.v20101211-0331-7l-2ED-z0UkhYdtV3_LBO	org.eclipse.dltk.core.feature.group	Eclipse.org

        Eclipse Platform	3.8.1.dist-A8F8_IVRG4VZSCmeloKVfCrtIFotGyJZcMPL9	org.eclipse.platform.feature.group	Eclipse.org

          Eclipse Help System	1.4.1.dist-8v7nFQYFCmSPZXHoT2597H	org.eclipse.help.feature.group	Eclipse.org

          Eclipse RCP	3.8.1.dist-8LA2GODFTJUDJ21934	org.eclipse.rcp.feature.group	Eclipse.org

          Equinox p2 Provisioning for IDEs.	2.2.0.dist-62DG8ltBZLdOsDwFEi8m9FbLOK8	org.eclipse.equinox.p2.user.ui.feature.group	Eclipse.org - Equinox

            Add-on Function for p2	1.1.0.dist-7A6FEcBpDPVGogGLmS7BA7	org.eclipse.equinox.p2.extras.feature.feature.group	Eclipse.org - Equinox

              Equinox p2 Core Function	1.1.0.dist-829EFnfFKlR6A96	org.eclipse.equinox.p2.core.feature.feature.group	Eclipse.org - Equinox

            Equinox p2 Core Function	1.1.0.dist-829EFnfFKlR6A96	org.eclipse.equinox.p2.core.feature.feature.group	Eclipse.org - Equinox

            Equinox p2 RCP Management Facilities	1.1.0.dist-785EoAUkciGogGLmS7BA7	org.eclipse.equinox.p2.rcp.feature.feature.group	Eclipse.org - Equinox

              Equinox p2 Core Function	1.1.0.dist-829EFnfFKlR6A96	org.eclipse.equinox.p2.core.feature.feature.group	Eclipse.org - Equinox

        EMF - Eclipse Modeling Framework Core Runtime	2.7.1.v20120127-1122	org.eclipse.emf.ecore.feature.group	Eclipse Modeling Project

      Dynamic Languages Toolkit - Core H2 Index Frameworks	3.0.0.v20101026-0553-79--9oA5885GAJ	org.eclipse.dltk.core.index.feature.group	Eclipse.org

        Dynamic Languages Toolkit - Core Frameworks	3.0.0.v20101211-0331-7l-2ED-z0UkhYdtV3_LBO	org.eclipse.dltk.core.feature.group	Eclipse.org

          Eclipse Platform	3.8.1.dist-A8F8_IVRG4VZSCmeloKVfCrtIFotGyJZcMPL9	org.eclipse.platform.feature.group	Eclipse.org

            Eclipse Help System	1.4.1.dist-8v7nFQYFCmSPZXHoT2597H	org.eclipse.help.feature.group	Eclipse.org

            Eclipse RCP	3.8.1.dist-8LA2GODFTJUDJ21934	org.eclipse.rcp.feature.group	Eclipse.org

            Equinox p2 Provisioning for IDEs.	2.2.0.dist-62DG8ltBZLdOsDwFEi8m9FbLOK8	org.eclipse.equinox.p2.user.ui.feature.group	Eclipse.org - Equinox

              Add-on Function for p2	1.1.0.dist-7A6FEcBpDPVGogGLmS7BA7	org.eclipse.equinox.p2.extras.feature.feature.group	Eclipse.org - Equinox

                Equinox p2 Core Function	1.1.0.dist-829EFnfFKlR6A96	org.eclipse.equinox.p2.core.feature.feature.group	Eclipse.org - Equinox

              Equinox p2 Core Function	1.1.0.dist-829EFnfFKlR6A96	org.eclipse.equinox.p2.core.feature.feature.group	Eclipse.org - Equinox

              Equinox p2 RCP Management Facilities	1.1.0.dist-785EoAUkciGogGLmS7BA7	org.eclipse.equinox.p2.rcp.feature.feature.group	Eclipse.org - Equinox

                Equinox p2 Core Function	1.1.0.dist-829EFnfFKlR6A96	org.eclipse.equinox.p2.core.feature.feature.group	Eclipse.org - Equinox

          EMF - Eclipse Modeling Framework Core Runtime	2.7.1.v20120127-1122	org.eclipse.emf.ecore.feature.group	Eclipse Modeling Project

    PHP Development Tools (PDT) Source Feature	3.0.1.v201201110400-7V-79F8NcJTcJTTTJwJJ	org.eclipse.php.source.feature.group	Eclipse.org



Now when I try to format or indent the php code, Eclips editor trunk part of the code.
For example, formatting a file with 1442 code lines obtain another one formed by 1329 code lines and part of the original file was missing.

Performing the same operation on windows or macos environment all works fine. From Linux happens as described above.

Is this a bug or could be individual misconfigured setting?


many thanks!


davide


Re: Eclipse Linux version delete code formatting php [message #1717510 is a reply to message #1717375] Mon, 14 December 2015 13:47 Go to previous message
Ilya Glazkov is currently offline Ilya GlazkovFriend
Messages: 4
Registered: December 2015
Junior Member
Maybe IDE do not delete code. Please show codestyle setting about empty lines. For example
function funcName () 
{
  ...

after formatting, copressed to
function funcName ()  {

and similar cases. If you want to be 100% sure that the code is lost, save the formatted file and try this code:
<?php # filename: compare.php
$old = file_get_contents('<path to old source before formatting>');
$name = file_get_contents('<path to new sources, after formatting>');
$oTrim = trim(str_replace(["\n","\t", " ","\r"],"", $old));
$nTrim = trim(str_replace(["\n","\t", " ","\r"],"", $new));
echo("Code is changed? " . (strcmp($oTrim, $nTrim) == 0 ? 'no' : 'yes') . "\n")
Previous Topic:Codestyle.Do not add whitespaces on "define" keyword.
Next Topic:install ftp in eclipse mars php
Goto Forum:
  


Current Time: Wed Oct 09 23:39:22 GMT 2024

Powered by FUDForum. Page generated in 0.04219 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top