new lines now included in LineChange and slash to signal missing new line is correctly interpreted

[?]
5Fcw79vQhDwfM4etVgPeRL6WrYnyrS8RUCfeQLwzbHrM
Mar 17, 2024, 6:13 PM
QKPZQEN3OHGN7X647FP3CB4QWSGMK45KTUEWMNFOX7PNONY77CWQC

Dependencies

  • [2] M75IG7WM preparation for updating to IntelliJ 2023
  • [3] 7L5LODGZ Parse changes from `pijul change`
  • [4] QXUEMZ3B Initial CahngeProvider
  • [5] FSXHAVRF Update for IntelliJ 2021.2.2

Change contents

  • replacement in src/test/kotlin/com/github/jonathanxd/dracon/test/DraconTest.kt at line 514
    [3.32121][2.4900:4968]()
    LineChange(type = LineChangeType.ADD, data = "}\n")
    [3.32121]
    [3.32187]
    LineChange(type = LineChangeType.ADD, data = "}")
  • replacement in src/test/kotlin/com/github/jonathanxd/dracon/test/DraconTest.kt at line 570
    [3.35302][2.7419:7487]()
    LineChange(type = LineChangeType.ADD, data = "}\n")
    [3.35302]
    [3.35368]
    LineChange(type = LineChangeType.ADD, data = "}")
  • replacement in src/test/kotlin/com/github/jonathanxd/dracon/test/DraconTest.kt at line 727
    [2.14605][2.14605:14673]()
    LineChange(type = LineChangeType.ADD, data = "}\n")
    [2.14605]
    [3.44637]
    LineChange(type = LineChangeType.ADD, data = "}")
  • replacement in src/test/kotlin/com/github/jonathanxd/dracon/test/DraconTest.kt at line 1019
    [3.57391][3.57391:57735]()
    LineChange(type = LineChangeType.ADD, data = "- [ ] ..."),
    LineChange(type = LineChangeType.ADD, data = ""),
    LineChange(type = LineChangeType.ADD, data = ""),
    LineChange(type = LineChangeType.ADD, data = "# FAQ"),
    LineChange(type = LineChangeType.ADD, data = ""),
    [3.57391]
    [3.57735]
    LineChange(type = LineChangeType.ADD, data = "- [ ] ...\n"),
    LineChange(type = LineChangeType.ADD, data = "\n"),
    LineChange(type = LineChangeType.ADD, data = "\n"),
    LineChange(type = LineChangeType.ADD, data = "# FAQ\n"),
    LineChange(type = LineChangeType.ADD, data = "\n"),
  • replacement in src/test/kotlin/com/github/jonathanxd/dracon/test/DraconTest.kt at line 1026
    [3.57810][3.57810:57902]()
    data = "## Why Dracon and not Pijul for IDEA (or something like that)?"
    [3.57810]
    [3.57902]
    data = "## Why Dracon and not Pijul for IDEA (or something like that)?\n"
  • replacement in src/test/kotlin/com/github/jonathanxd/dracon/test/DraconTest.kt at line 1028
    [3.57921][3.57921:57987]()
    LineChange(type = LineChangeType.ADD, data = ""),
    [3.57921]
    [3.57987]
    LineChange(type = LineChangeType.ADD, data = "\n"),
  • replacement in src/test/kotlin/com/github/jonathanxd/dracon/test/DraconTest.kt at line 1031
    [3.58062][3.58062:58517]()
    data = "Because Dracon is not an official plugin, and I want to make sure that it is clear to anyone who uses this plugin. Dracon is an individual project being developed by [Jonathan H. R. Lopes](https://github.com/JonathanxD) which does not have any relation with Pijul creator. Also, Dracon uses MIT license, allowing to anyone, and that includes the Pijul creator, to contribute and create your own version of Dracon, if wish to."
    [3.58062]
    [3.58517]
    data = "Because Dracon is not an official plugin, and I want to make sure that it is clear to anyone who uses this plugin. Dracon is an individual project being developed by [Jonathan H. R. Lopes](https://github.com/JonathanxD) which does not have any relation with Pijul creator. Also, Dracon uses MIT license, allowing to anyone, and that includes the Pijul creator, to contribute and create your own version of Dracon, if wish to.\n"
  • replacement in src/test/kotlin/com/github/jonathanxd/dracon/test/DraconTest.kt at line 1033
    [3.58536][3.58536:58602]()
    LineChange(type = LineChangeType.ADD, data = ""),
    [3.58536]
    [3.58602]
    LineChange(type = LineChangeType.ADD, data = "\n"),
  • replacement in src/test/kotlin/com/github/jonathanxd/dracon/test/DraconTest.kt at line 1036
    [3.58677][3.58677:58784]()
    data = "## Why Dracon is developed against IntelliJ EAP instead of a stable releases?"
    [3.58677]
    [3.58784]
    data = "## Why Dracon is developed against IntelliJ EAP instead of a stable releases?\n"
  • replacement in src/test/kotlin/com/github/jonathanxd/dracon/test/DraconTest.kt at line 1038
    [3.58803][3.58803:58869]()
    LineChange(type = LineChangeType.ADD, data = ""),
    [3.58803]
    [3.58869]
    LineChange(type = LineChangeType.ADD, data = "\n"),
  • replacement in src/test/kotlin/com/github/jonathanxd/dracon/test/DraconTest.kt at line 1041
    [3.58944][3.58944:59706]()
    data = "Dracon is being developed based in actual [HG4Idea](https://github.com/JetBrains/intellij-community/tree/master/plugins/hg4idea) and [Git4Idea](https://github.com/JetBrains/intellij-community/tree/master/plugins/git4idea) plugins, as well based in current code of [IntelliJ IDEA Community](https://github.com/JetBrains/intellij-community/), and is planned to be released by the end of first semester of 2021, when release time comes, the IntelliJ EAP will be already released as stable, also I don't want to support older releases of IntelliJ IDEA because this involves basing on deprecated code, and this is my first IDEA plugin, so the more I focus the present than the past, more I deliver in terms of better and stable features."
    [3.58944]
    [3.59706]
    data = "Dracon is being developed based in actual [HG4Idea](https://github.com/JetBrains/intellij-community/tree/master/plugins/hg4idea) and [Git4Idea](https://github.com/JetBrains/intellij-community/tree/master/plugins/git4idea) plugins, as well based in current code of [IntelliJ IDEA Community](https://github.com/JetBrains/intellij-community/), and is planned to be released by the end of first semester of 2021, when release time comes, the IntelliJ EAP will be already released as stable, also I don't want to support older releases of IntelliJ IDEA because this involves basing on deprecated code, and this is my first IDEA plugin, so the more I focus the present than the past, more I deliver in terms of better and stable features.\n"
  • replacement in src/test/kotlin/com/github/jonathanxd/dracon/test/DraconTest.kt at line 1043
    [3.59725][3.59725:59967]()
    LineChange(type = LineChangeType.ADD, data = ""),
    LineChange(type = LineChangeType.ADD, data = "## Could I contribute to Dracon development?"),
    LineChange(type = LineChangeType.ADD, data = ""),
    [3.59725]
    [3.59967]
    LineChange(type = LineChangeType.ADD, data = "\n"),
    LineChange(type = LineChangeType.ADD, data = "## Could I contribute to Dracon development?\n"),
    LineChange(type = LineChangeType.ADD, data = "\n"),
  • replacement in src/test/kotlin/com/github/jonathanxd/dracon/test/DraconTest.kt at line 1048
    [3.60042][3.60042:60367]()
    data = "I'm currently focused on learning how IDEA Plugin platform works and how DVCS is implemented in IDEA, so until Dracon is officially released, I will not be accepting contributions, but Dracon is licensed under MIT, you are free to create your own version of Dracon and developing it on your own."
    [3.60042]
    [3.60367]
    data = "I'm currently focused on learning how IDEA Plugin platform works and how DVCS is implemented in IDEA, so until Dracon is officially released, I will not be accepting contributions, but Dracon is licensed under MIT, you are free to create your own version of Dracon and developing it on your own.\n"
  • replacement in src/test/kotlin/com/github/jonathanxd/dracon/test/DraconTest.kt at line 1050
    [3.60386][3.60386:60625]()
    LineChange(type = LineChangeType.ADD, data = ""),
    LineChange(type = LineChangeType.ADD, data = "## When Dracon will be official released?"),
    LineChange(type = LineChangeType.ADD, data = ""),
    [3.60386]
    [3.60625]
    LineChange(type = LineChangeType.ADD, data = "\n"),
    LineChange(type = LineChangeType.ADD, data = "## When Dracon will be official released?\n"),
    LineChange(type = LineChangeType.ADD, data = "\n"),
  • edit in src/main/kotlin/com/github/jonathanxd/dracon/log/PijulLog.kt at line 892
    [3.83707]
    [3.83707]
    /**
    *
    * # Line changes format
    *
    * Prefix:
    * - `-`: Removed.
    * - `+`: Added.
    * - `\`: Previous line didn't end with a new line.
    */
  • edit in src/main/kotlin/com/github/jonathanxd/dracon/log/PijulLog.kt at line 916
    [3.84055]
    [3.47207]
    val computeLastLine = {
    if (lastKnownLine.endsInNewLine(this)
    && !lookupFor(lastKnownLine, '+', ' ')
    && !lookupFor(lastKnownLine, '-', ' ')
    ) {
    null
    } else {
    lastKnownLine
    }
    }
  • replacement in src/main/kotlin/com/github/jonathanxd/dracon/log/PijulLog.kt at line 927
    [3.47265][3.47265:47331]()
    //val foundChange = CHANGE_PATTERN.matchEntire(lineStr)!!
    [3.47265]
    [3.47331]
    val isEndOfStream = {
    lastKnownLine + 1 == this.length
    }
  • replacement in src/main/kotlin/com/github/jonathanxd/dracon/log/PijulLog.kt at line 938
    [3.84422][3.47549:47723](),[3.47723][3.84486:84558](),[3.84486][3.84486:84558]()
    lastLine = if (lastKnownLine.endsInNewLine(this)
    && !lookupFor(lastKnownLine, '+', ' ')
    && !lookupFor(lastKnownLine, '-', ' ')) {
    null
    } else {
    lastKnownLine
    [3.84422]
    [3.84558]
    lastLine = computeLastLine()
    } else if ((lineStr == "\\\n" || (lineStr == "\\" && isEndOfStream())) && changes.isNotEmpty()) {
    lastKnownLine = lastLine + lineStr.lastIndex
    if (isEndOfStream()) {
    lastKnownLine += 1
  • edit in src/main/kotlin/com/github/jonathanxd/dracon/log/PijulLog.kt at line 944
    [3.84572]
    [3.84572]
    val last = changes.removeLast()
    changes += last.copy(data = last.data.substringBeforeLast("\n"))
    lastLine = computeLastLine()