Uploaded image for project: 'Gradle'
  1. Gradle
  2. GRADLE-1080

Eclipse .project merging creates significant whitespace diffs

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 0.9.1
    • Fix Version/s: 0.9.2

      Description

      Repro steps:

      1. run gradle eclipse for the first time against a project
      2. notice resulting .project file
        <projectDescription>
          <name>
            helloworld
          </name>
          <comment/>
          <projects/>
          <natures>
            <nature>
              org.eclipse.jdt.core.javanature
            </nature>
          </natures>
          <buildSpec>
            <buildCommand>
              <name>
                org.eclipse.jdt.core.javabuilder
              </name>
              <arguments/>
            </buildCommand>
          </buildSpec>
          <links/>
        </projectDescription>
        
      3. within eclipse, add a project nature (in this case, STS's 'Spring Project Nature'
      4. notice the resulting file and it's formatting differences
        <?xml version="1.0" encoding="UTF-8"?>
        <projectDescription>
                <name>helloworld</name>
                <comment></comment>
                <projects>
                </projects>
                <buildSpec>
                        <buildCommand>
                                <name>org.eclipse.jdt.core.javabuilder</name>
                                <arguments>
                                </arguments>
                        </buildCommand>
                        <buildCommand>
                                <name>org.springframework.ide.eclipse.core.springbuilder</name>
                                <arguments>
                                </arguments>
                        </buildCommand>
                </buildSpec>
                <natures>
                        <nature>org.springframework.ide.eclipse.core.springnature</nature>
                        <nature>org.eclipse.jdt.core.javanature</nature>
                </natures>
        </projectDescription>
        
      5. assume the user checks in at this point
      6. assume the user later runs gradle eclipse again
      7. notice that the spring nature is preserved, but formatting is not
        
        

        Attachments

          Activity

            People

            Assignee:
            pniederw Peter Niederwieser
            Reporter:
            cbeams Chris Beams
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: