You can subscribe to this list here.
2000 |
Jan
(11) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(8) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(145) |
Nov
(352) |
Dec
(329) |
2002 |
Jan
(461) |
Feb
(533) |
Mar
(632) |
Apr
(363) |
May
(619) |
Jun
(324) |
Jul
(109) |
Aug
(247) |
Sep
(167) |
Oct
(215) |
Nov
(115) |
Dec
(262) |
2003 |
Jan
(568) |
Feb
(537) |
Mar
(760) |
Apr
(493) |
May
(500) |
Jun
(284) |
Jul
(178) |
Aug
(180) |
Sep
(135) |
Oct
(230) |
Nov
(266) |
Dec
(175) |
2004 |
Jan
(121) |
Feb
(294) |
Mar
(222) |
Apr
(172) |
May
(162) |
Jun
(105) |
Jul
(93) |
Aug
(151) |
Sep
(136) |
Oct
(62) |
Nov
(74) |
Dec
(178) |
2005 |
Jan
(179) |
Feb
(288) |
Mar
(153) |
Apr
(138) |
May
(195) |
Jun
(39) |
Jul
(62) |
Aug
(41) |
Sep
(15) |
Oct
(365) |
Nov
(130) |
Dec
(199) |
2006 |
Jan
(235) |
Feb
(92) |
Mar
(262) |
Apr
(250) |
May
(345) |
Jun
(513) |
Jul
(587) |
Aug
(210) |
Sep
(216) |
Oct
(200) |
Nov
(188) |
Dec
(115) |
2007 |
Jan
(259) |
Feb
(182) |
Mar
(217) |
Apr
(109) |
May
(161) |
Jun
(205) |
Jul
(291) |
Aug
(176) |
Sep
(185) |
Oct
(190) |
Nov
(208) |
Dec
(182) |
2008 |
Jan
(141) |
Feb
(193) |
Mar
(219) |
Apr
(112) |
May
(233) |
Jun
(218) |
Jul
(149) |
Aug
(338) |
Sep
(291) |
Oct
(143) |
Nov
(131) |
Dec
(152) |
2009 |
Jan
(266) |
Feb
(178) |
Mar
(168) |
Apr
(167) |
May
(198) |
Jun
(282) |
Jul
(383) |
Aug
(341) |
Sep
(153) |
Oct
(214) |
Nov
(164) |
Dec
(278) |
2010 |
Jan
(430) |
Feb
(300) |
Mar
(214) |
Apr
(198) |
May
(271) |
Jun
(321) |
Jul
(144) |
Aug
(208) |
Sep
(275) |
Oct
(287) |
Nov
(218) |
Dec
(153) |
2011 |
Jan
(172) |
Feb
(172) |
Mar
(121) |
Apr
(62) |
May
(23) |
Jun
(155) |
Jul
(120) |
Aug
(252) |
Sep
(170) |
Oct
(206) |
Nov
(356) |
Dec
(300) |
2012 |
Jan
(412) |
Feb
(313) |
Mar
(419) |
Apr
(153) |
May
(194) |
Jun
(226) |
Jul
(115) |
Aug
(143) |
Sep
(223) |
Oct
(173) |
Nov
(121) |
Dec
(143) |
2013 |
Jan
(156) |
Feb
(109) |
Mar
(146) |
Apr
(82) |
May
(65) |
Jun
(52) |
Jul
(55) |
Aug
(347) |
Sep
(65) |
Oct
(95) |
Nov
(85) |
Dec
(37) |
2014 |
Jan
(12) |
Feb
(51) |
Mar
(31) |
Apr
(97) |
May
(60) |
Jun
(32) |
Jul
(35) |
Aug
(47) |
Sep
(16) |
Oct
(36) |
Nov
(55) |
Dec
(90) |
2015 |
Jan
(34) |
Feb
(65) |
Mar
(13) |
Apr
(13) |
May
(49) |
Jun
(10) |
Jul
(23) |
Aug
(96) |
Sep
(78) |
Oct
(38) |
Nov
(41) |
Dec
(126) |
2016 |
Jan
(29) |
Feb
(38) |
Mar
(21) |
Apr
(12) |
May
(45) |
Jun
(53) |
Jul
(40) |
Aug
(69) |
Sep
(60) |
Oct
(11) |
Nov
(19) |
Dec
(2) |
2017 |
Jan
(28) |
Feb
(17) |
Mar
(57) |
Apr
(4) |
May
(15) |
Jun
(60) |
Jul
(21) |
Aug
(5) |
Sep
(6) |
Oct
(34) |
Nov
(17) |
Dec
(28) |
2018 |
Jan
(15) |
Feb
(7) |
Mar
(13) |
Apr
(7) |
May
(2) |
Jun
(6) |
Jul
(10) |
Aug
(15) |
Sep
(6) |
Oct
|
Nov
|
Dec
|
2019 |
Jan
(2) |
Feb
(2) |
Mar
(9) |
Apr
(5) |
May
|
Jun
(6) |
Jul
(4) |
Aug
(35) |
Sep
(1) |
Oct
(6) |
Nov
(1) |
Dec
(18) |
2020 |
Jan
(1) |
Feb
|
Mar
(141) |
Apr
(196) |
May
(41) |
Jun
(3) |
Jul
(4) |
Aug
(3) |
Sep
(27) |
Oct
(2) |
Nov
(4) |
Dec
(25) |
2021 |
Jan
(8) |
Feb
(1) |
Mar
(46) |
Apr
(48) |
May
|
Jun
(9) |
Jul
(1) |
Aug
|
Sep
(5) |
Oct
(3) |
Nov
(10) |
Dec
(7) |
2022 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
(9) |
Jun
(24) |
Jul
(7) |
Aug
(7) |
Sep
(13) |
Oct
(7) |
Nov
(1) |
Dec
(2) |
2023 |
Jan
(11) |
Feb
(4) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
(13) |
Sep
(32) |
Oct
(10) |
Nov
(6) |
Dec
|
2024 |
Jan
|
Feb
(8) |
Mar
(4) |
Apr
(3) |
May
(22) |
Jun
|
Jul
(11) |
Aug
(8) |
Sep
|
Oct
(9) |
Nov
|
Dec
|
2025 |
Jan
|
Feb
(2) |
Mar
(16) |
Apr
(5) |
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: vampire0 <vam...@us...> - 2025-07-05 13:05:55
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "jEdit core". The branch, master has been updated discards ca2f88c868c055ea612f1d71efc074fb51428841 (commit) discards d88ae4c844d80d3dff57793d67b4713e1675dc88 (commit) discards 5102fd43e36e7291471d6260172b4019e7f681df (commit) discards 9f9f526157d620da319ea1873d4507db31b7615d (commit) discards 9814940f04c671cda09db294fb704810ddb49a0e (commit) discards f03db79e169fd30afda904ab7c39803ccb5e4fe4 (commit) discards fe315785ea5c8eec156487dc31a4fdaada53aa43 (commit) discards 85e1e9f6682dd8c1325faf6f0a9526bd5b5de08f (commit) discards 0a807841a6193c2cc0abc8cd30f74af9dca15969 (commit) discards 080e32e82306baff19926ffe7e7a499c5ba7b423 (commit) discards c8550b151808ac2f618018938c6eded4f503ccf7 (commit) discards 44102cf583ebfa217d39105a5928f6b2d7e7a1c6 (commit) discards 2245e2632b3e677b38055d5532d73870bcc749e0 (commit) discards 18f9ec391a510d12fa2aa3aa5cc0bf117c854f05 (commit) discards 310fb941f52d6c08b19577c06a326be9a7a932a7 (commit) discards 4988b18a82617b3ae03e95b9315e9cd4a2ca0a3a (commit) discards fd6d7661b5faf793a695e289bcbdf973f025aff5 (commit) discards 762a031972c18fa3f1070d5a6b243e37b214360d (commit) discards 42471304e4f6f07e9e5151060f7c0e747485490c (commit) discards d702a03a9ef2266a8ebbda316ab6bb580d0ee6ed (commit) discards ec3ccf926672ee9341101c713ade2a12471f745a (commit) discards 871b6a876feff0f750473ad049a9a5f807183234 (commit) discards 3b8c8b22d11071d196955a2c635e7476a1b0e074 (commit) discards 7f9867e5dffef26e02010b50dbab50b8ee97aa6c (commit) discards a7c2598d0cbf48af9989abe1c62ec7561553b5ed (commit) discards 8fadacda61f1423094fb13d6f904c906e36d2dcc (commit) discards c57cbd0f603eb02a41230058801da6cae46718a0 (commit) discards 9fc892d231292baf786323dcddea402d2d8d1a32 (commit) discards 01f411fa30df22e479fb2f0bcec65894ab69741e (commit) discards 651090fef89c9b55cbe6c039859b8e988a282f52 (commit) discards c4c307e7ff5101b837e81a039811f39d91d0be37 (commit) discards a32f9f5004970c2762c1bcf60f2bff1765b399b6 (commit) discards 93602c5ee6379988431bcbf89b17fd6059a0ed49 (commit) discards 02f3134642ad00d308a40ec8176303b5dcfa86b3 (commit) discards d1aafc978131a03caaf190a6cdcdcf294b8b8414 (commit) discards e7168c4fe006d6a930b7fc142c02f8dd04589f1f (commit) discards 44c03bf87f04f9c4f8adcbf4ecdd2a84c63297fb (commit) discards 7dc69c2c1d62c61b2ddd99926e075241dd04d31c (commit) This update discarded existing revisions and left the branch pointing at a previous point in the repository history. * -- * -- N (01c732d64823f7e70e5bcc3fcb3f7ea6b7207bb8) \ O -- O -- O (ca2f88c868c055ea612f1d71efc074fb51428841) The removed revisions are not necessarilly gone - if another reference still refers to them they will stay in the repository. No new revisions were added by this update. Summary of changes: .github/workflows/build.main.kts | 261 +--- .github/workflows/build.yaml | 474 +++--- .../workflows/mirror-canonical-repository.main.kts | 24 +- .github/workflows/mirror-canonical-repository.yaml | 10 +- README.SRC.txt | 2 +- build.xml | 623 +++----- installer/ServerKiller.java | 2 +- ivy.xml | 23 +- org/gjt/sp/jedit/EditServer.java | 27 +- org/gjt/sp/jedit/browser/RenameBrowserTask.java | 4 +- .../jedit/browser/VFSDirectoryEntryTableModel.java | 3 +- org/gjt/sp/jedit/gui/ActionBar.java | 9 +- org/gjt/sp/jedit/io/FileVFS.java | 7 +- org/gjt/sp/jedit/io/VFS.java | 3 +- org/gjt/sp/jedit/jEdit.java | 2 +- org/gjt/sp/jedit/menu/EnhancedMenu.java | 1 - org/gjt/sp/jedit/menu/EnhancedMenuItem.java | 1 - package-files/osx/DS_Store | Bin 0 -> 15364 bytes package-files/osx/jedit | Bin 0 -> 157079 bytes package-files/osx/set-background.scpt | 25 - test/SpockConfig.groovy | 26 - test/org/gjt/sp/jedit/MiscUtilitiesTest.groovy | 583 ------- test/org/gjt/sp/jedit/MiscUtilitiesTest.java | 741 +++++++++ test/org/gjt/sp/jedit/ModeTest.groovy | 36 - .../org/gjt/sp/jedit/ModeTest.java | 87 +- test/org/gjt/sp/jedit/TextUtilitiesTest.groovy | 44 - .../org/gjt/sp/jedit/TextUtilitiesTest.java | 34 +- .../gjt/sp/jedit/buffer/ContentManagerTest.groovy | 111 -- .../gjt/sp/jedit/buffer/ContentManagerTest.java | 102 ++ .../gjt/sp/jedit/syntax/SyntaxUtilitiesTest.groovy | 52 - .../gjt/sp/jedit/syntax/SyntaxUtilitiesTest.java | 62 + .../org/gjt/sp/jedit/textarea/FirstLineTest.groovy | 82 - test/org/gjt/sp/jedit/textarea/FirstLineTest.java | 100 ++ .../jedit/textarea/LineCharacterBreakerTest.groovy | 61 - .../jedit/textarea/LineCharacterBreakerTest.java | 71 + test/org/gjt/sp/jedit/textarea/RangeMapTest.groovy | 183 --- test/org/gjt/sp/jedit/textarea/RangeMapTest.java | 186 +++ .../sp/jedit/textarea/ScreenLineManagerTest.groovy | 558 ------- .../sp/jedit/textarea/ScreenLineManagerTest.java | 533 +++++++ .../org/gjt/sp/util/GenericGUIUtilitiesTest.groovy | 55 - .../org/gjt/sp/util/GenericGUIUtilitiesTest.java | 88 +- test/org/gjt/sp/util/HtmlUtilitiesTest.groovy | 112 -- test/org/gjt/sp/util/HtmlUtilitiesTest.java | 126 ++ test/org/gjt/sp/util/IOUtilitiesTest.groovy | 75 - test/org/gjt/sp/util/IOUtilitiesTest.java | 57 + test/org/gjt/sp/util/IntegerArrayTest.groovy | 63 - .../org/gjt/sp/util/IntegerArrayTest.java | 50 +- test/org/gjt/sp/util/SegmentBufferTest.groovy | 63 - test/org/gjt/sp/util/SegmentBufferTest.java | 67 + .../org/gjt/sp/util/SegmentCharSequenceTest.groovy | 46 - .../org/gjt/sp/util/SegmentCharSequenceTest.java | 48 +- test/org/gjt/sp/util/StandardUtilitiesTest.groovy | 201 --- test/org/gjt/sp/util/StandardUtilitiesTest.java | 343 +++++ test/org/gjt/sp/util/StringListTest.groovy | 72 - test/org/gjt/sp/util/StringListTest.java | 90 ++ test/org/gjt/sp/util/SyntaxUtilitiesTest.groovy | 135 -- test/org/gjt/sp/util/SyntaxUtilitiesTest.java | 211 +++ test/org/jedit/io/Native2ASCIIEncodingTest.groovy | 1585 ------------------- test/org/jedit/io/Native2ASCIIEncodingTest.java | 1598 ++++++++++++++++++++ test/org/jedit/test/JUnitXmlResultFormatter.groovy | 93 -- ui-test/GebConfig.groovy | 60 - ...ockframework.runtime.extension.IGlobalExtension | 23 - ui-test/README.txt | 24 - ui-test/geb/spock/OnFailureReporter.groovy | 48 - ui-test/logging.properties | 25 - ui-test/org/jedit/test/ui/EditServerTest.groovy | 174 --- ui-test/org/jedit/test/ui/FileVFSTest.groovy | 169 --- ui-test/org/jedit/test/ui/IconificationTest.groovy | 105 -- .../jedit/test/ui/MisbehavingEditServerTest.groovy | 194 --- .../jedit/test/ui/SettingsDirectoryLockTest.groovy | 95 -- .../jedit/test/ui/SyntaxHighlightingTest.groovy | 146 -- ui-test/org/jedit/test/ui/VFSBrowserTest.groovy | 623 -------- .../jedit/test/ui/base/GlobalRetryExtension.groovy | 75 - .../org/jedit/test/ui/base/JEditJavaProfile.groovy | 52 - .../ui/base/RetryProblemDetectorExtension.groovy | 73 - ui-test/org/jedit/test/ui/base/UISpec.groovy | 154 -- .../test/ui/base/WorkAroundGebReportingSpec.groovy | 41 - .../jedit/test/ui/base/WorkAroundGebSpec.groovy | 41 - ui-test/org/jedit/test/ui/content/FileMenu.groovy | 44 - ui-test/org/jedit/test/ui/content/Menu.groovy | 38 - .../jedit/test/ui/content/OpenFileDialog.groovy | 44 - .../org/jedit/test/ui/content/OptionsDialog.groovy | 32 - ui-test/org/jedit/test/ui/content/Table.groovy | 42 - ui-test/org/jedit/test/ui/content/TextArea.groovy | 74 - .../jedit/test/ui/content/TextInputDialog.groovy | 32 - ui-test/org/jedit/test/ui/content/UtilsMenu.groovy | 43 - .../test/ui/content/VFSBrowserContextMenu.groovy | 39 - ui-test/org/jedit/test/ui/content/View.groovy | 63 - ui-test/org/jedit/test/ui/content/Window.groovy | 31 - .../test/ui/reporter/MultiWindowReporter.groovy | 42 - .../test/ui/reporter/ScreenshotReporter.groovy | 68 - .../ui/reporter/WindowScreenshotReporter.groovy | 53 - .../ui/reporter/WindowStructureReporter.groovy | 269 ---- ui-test/uiTestStartup.bsh | 5 - 94 files changed, 4905 insertions(+), 8467 deletions(-) create mode 100644 package-files/osx/DS_Store create mode 100644 package-files/osx/jedit delete mode 100644 package-files/osx/set-background.scpt delete mode 100644 test/SpockConfig.groovy delete mode 100644 test/org/gjt/sp/jedit/MiscUtilitiesTest.groovy create mode 100644 test/org/gjt/sp/jedit/MiscUtilitiesTest.java delete mode 100644 test/org/gjt/sp/jedit/ModeTest.groovy copy org/gjt/sp/jedit/LargeFileMode.java => test/org/gjt/sp/jedit/ModeTest.java (60%) delete mode 100644 test/org/gjt/sp/jedit/TextUtilitiesTest.groovy copy org/gjt/sp/jedit/manager/EditPaneManager.java => test/org/gjt/sp/jedit/TextUtilitiesTest.java (67%) delete mode 100644 test/org/gjt/sp/jedit/buffer/ContentManagerTest.groovy create mode 100644 test/org/gjt/sp/jedit/buffer/ContentManagerTest.java delete mode 100644 test/org/gjt/sp/jedit/syntax/SyntaxUtilitiesTest.groovy create mode 100644 test/org/gjt/sp/jedit/syntax/SyntaxUtilitiesTest.java delete mode 100644 test/org/gjt/sp/jedit/textarea/FirstLineTest.groovy create mode 100644 test/org/gjt/sp/jedit/textarea/FirstLineTest.java delete mode 100644 test/org/gjt/sp/jedit/textarea/LineCharacterBreakerTest.groovy create mode 100644 test/org/gjt/sp/jedit/textarea/LineCharacterBreakerTest.java delete mode 100644 test/org/gjt/sp/jedit/textarea/RangeMapTest.groovy create mode 100644 test/org/gjt/sp/jedit/textarea/RangeMapTest.java delete mode 100644 test/org/gjt/sp/jedit/textarea/ScreenLineManagerTest.groovy create mode 100644 test/org/gjt/sp/jedit/textarea/ScreenLineManagerTest.java delete mode 100644 test/org/gjt/sp/util/GenericGUIUtilitiesTest.groovy copy org/jedit/util/SystemManager.java => test/org/gjt/sp/util/GenericGUIUtilitiesTest.java (51%) delete mode 100644 test/org/gjt/sp/util/HtmlUtilitiesTest.groovy create mode 100644 test/org/gjt/sp/util/HtmlUtilitiesTest.java delete mode 100644 test/org/gjt/sp/util/IOUtilitiesTest.groovy create mode 100644 test/org/gjt/sp/util/IOUtilitiesTest.java delete mode 100644 test/org/gjt/sp/util/IntegerArrayTest.groovy copy org/jedit/io/HttpException.java => test/org/gjt/sp/util/IntegerArrayTest.java (57%) delete mode 100644 test/org/gjt/sp/util/SegmentBufferTest.groovy create mode 100644 test/org/gjt/sp/util/SegmentBufferTest.java delete mode 100644 test/org/gjt/sp/util/SegmentCharSequenceTest.groovy copy org/gjt/sp/util/swing/event/UniqueActionDocumentListener.java => test/org/gjt/sp/util/SegmentCharSequenceTest.java (51%) delete mode 100644 test/org/gjt/sp/util/StandardUtilitiesTest.groovy create mode 100644 test/org/gjt/sp/util/StandardUtilitiesTest.java delete mode 100644 test/org/gjt/sp/util/StringListTest.groovy create mode 100644 test/org/gjt/sp/util/StringListTest.java delete mode 100644 test/org/gjt/sp/util/SyntaxUtilitiesTest.groovy create mode 100644 test/org/gjt/sp/util/SyntaxUtilitiesTest.java delete mode 100644 test/org/jedit/io/Native2ASCIIEncodingTest.groovy create mode 100644 test/org/jedit/io/Native2ASCIIEncodingTest.java delete mode 100644 test/org/jedit/test/JUnitXmlResultFormatter.groovy delete mode 100644 ui-test/GebConfig.groovy delete mode 100644 ui-test/META-INF/services/org.spockframework.runtime.extension.IGlobalExtension delete mode 100644 ui-test/README.txt delete mode 100644 ui-test/geb/spock/OnFailureReporter.groovy delete mode 100644 ui-test/logging.properties delete mode 100644 ui-test/org/jedit/test/ui/EditServerTest.groovy delete mode 100644 ui-test/org/jedit/test/ui/FileVFSTest.groovy delete mode 100644 ui-test/org/jedit/test/ui/IconificationTest.groovy delete mode 100644 ui-test/org/jedit/test/ui/MisbehavingEditServerTest.groovy delete mode 100644 ui-test/org/jedit/test/ui/SettingsDirectoryLockTest.groovy delete mode 100644 ui-test/org/jedit/test/ui/SyntaxHighlightingTest.groovy delete mode 100644 ui-test/org/jedit/test/ui/VFSBrowserTest.groovy delete mode 100644 ui-test/org/jedit/test/ui/base/GlobalRetryExtension.groovy delete mode 100644 ui-test/org/jedit/test/ui/base/JEditJavaProfile.groovy delete mode 100644 ui-test/org/jedit/test/ui/base/RetryProblemDetectorExtension.groovy delete mode 100644 ui-test/org/jedit/test/ui/base/UISpec.groovy delete mode 100644 ui-test/org/jedit/test/ui/base/WorkAroundGebReportingSpec.groovy delete mode 100644 ui-test/org/jedit/test/ui/base/WorkAroundGebSpec.groovy delete mode 100644 ui-test/org/jedit/test/ui/content/FileMenu.groovy delete mode 100644 ui-test/org/jedit/test/ui/content/Menu.groovy delete mode 100644 ui-test/org/jedit/test/ui/content/OpenFileDialog.groovy delete mode 100644 ui-test/org/jedit/test/ui/content/OptionsDialog.groovy delete mode 100644 ui-test/org/jedit/test/ui/content/Table.groovy delete mode 100644 ui-test/org/jedit/test/ui/content/TextArea.groovy delete mode 100644 ui-test/org/jedit/test/ui/content/TextInputDialog.groovy delete mode 100644 ui-test/org/jedit/test/ui/content/UtilsMenu.groovy delete mode 100644 ui-test/org/jedit/test/ui/content/VFSBrowserContextMenu.groovy delete mode 100644 ui-test/org/jedit/test/ui/content/View.groovy delete mode 100644 ui-test/org/jedit/test/ui/content/Window.groovy delete mode 100644 ui-test/org/jedit/test/ui/reporter/MultiWindowReporter.groovy delete mode 100644 ui-test/org/jedit/test/ui/reporter/ScreenshotReporter.groovy delete mode 100644 ui-test/org/jedit/test/ui/reporter/WindowScreenshotReporter.groovy delete mode 100644 ui-test/org/jedit/test/ui/reporter/WindowStructureReporter.groovy delete mode 100644 ui-test/uiTestStartup.bsh hooks/post-receive -- jEdit core |
From: vampire0 <vam...@us...> - 2025-07-05 13:02:36
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "jEdit core". The branch, master has been updated via ca2f88c868c055ea612f1d71efc074fb51428841 (commit) via d88ae4c844d80d3dff57793d67b4713e1675dc88 (commit) via 5102fd43e36e7291471d6260172b4019e7f681df (commit) via 9f9f526157d620da319ea1873d4507db31b7615d (commit) via 9814940f04c671cda09db294fb704810ddb49a0e (commit) via f03db79e169fd30afda904ab7c39803ccb5e4fe4 (commit) via fe315785ea5c8eec156487dc31a4fdaada53aa43 (commit) via 85e1e9f6682dd8c1325faf6f0a9526bd5b5de08f (commit) via 0a807841a6193c2cc0abc8cd30f74af9dca15969 (commit) via 080e32e82306baff19926ffe7e7a499c5ba7b423 (commit) via c8550b151808ac2f618018938c6eded4f503ccf7 (commit) via 44102cf583ebfa217d39105a5928f6b2d7e7a1c6 (commit) via 2245e2632b3e677b38055d5532d73870bcc749e0 (commit) via 18f9ec391a510d12fa2aa3aa5cc0bf117c854f05 (commit) via 310fb941f52d6c08b19577c06a326be9a7a932a7 (commit) via 4988b18a82617b3ae03e95b9315e9cd4a2ca0a3a (commit) via fd6d7661b5faf793a695e289bcbdf973f025aff5 (commit) via 762a031972c18fa3f1070d5a6b243e37b214360d (commit) via 42471304e4f6f07e9e5151060f7c0e747485490c (commit) via d702a03a9ef2266a8ebbda316ab6bb580d0ee6ed (commit) via ec3ccf926672ee9341101c713ade2a12471f745a (commit) via 871b6a876feff0f750473ad049a9a5f807183234 (commit) via 3b8c8b22d11071d196955a2c635e7476a1b0e074 (commit) via 7f9867e5dffef26e02010b50dbab50b8ee97aa6c (commit) via a7c2598d0cbf48af9989abe1c62ec7561553b5ed (commit) via 8fadacda61f1423094fb13d6f904c906e36d2dcc (commit) via c57cbd0f603eb02a41230058801da6cae46718a0 (commit) via 9fc892d231292baf786323dcddea402d2d8d1a32 (commit) via 01f411fa30df22e479fb2f0bcec65894ab69741e (commit) via 651090fef89c9b55cbe6c039859b8e988a282f52 (commit) via c4c307e7ff5101b837e81a039811f39d91d0be37 (commit) via a32f9f5004970c2762c1bcf60f2bff1765b399b6 (commit) via 93602c5ee6379988431bcbf89b17fd6059a0ed49 (commit) via 02f3134642ad00d308a40ec8176303b5dcfa86b3 (commit) via d1aafc978131a03caaf190a6cdcdcf294b8b8414 (commit) via e7168c4fe006d6a930b7fc142c02f8dd04589f1f (commit) via 44c03bf87f04f9c4f8adcbf4ecdd2a84c63297fb (commit) via 7dc69c2c1d62c61b2ddd99926e075241dd04d31c (commit) from 01c732d64823f7e70e5bcc3fcb3f7ea6b7207bb8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit: https://sourceforge.net/p/jedit/jEdit/ci/ca2f88c868c055ea612f1d71efc074fb51428841/ tree: https://sourceforge.net/p/jedit/jEdit/ci/ca2f88c868c055ea612f1d71efc074fb51428841/tree/ commit ca2f88c868c055ea612f1d71efc074fb51428841 Author: Björn Kautler <Bj...@Ka...> Date: Sat Jul 5 04:37:45 2025 +0200 fixup! Improve macOS app bundle building diff --git a/build.xml b/build.xml index 58d679d6b..4a758f621 100644 --- a/build.xml +++ b/build.xml @@ -1463,15 +1463,13 @@ failonerror="true"> <arg value="attach"/> <arg value="-readwrite"/> - <arg value="-mountpoint"/> - <arg value="${dist.dir}/classes/mac/mnt"/> <arg file="${dist.dir}/udrw-${mac.disk.image.filename}"/> </exec> <exec executable="ln" failonerror="true"> <arg value="-sF"/> <arg file="/Applications"/> - <arg file="${dist.dir}/classes/mac/mnt/"/> + <arg file="/Volumes/jEdit/"/> </exec> <exec executable="osascript" failonerror="true"> @@ -1480,7 +1478,7 @@ <arg value="168"/> <arg value="379"/> <arg value="512"/> - <arg value="539"/> + <arg value="539"/> <!-- image height + 25 --> <arg value="130"/> <arg value=".background:background.png"/> <arg value="jEdit"/> @@ -1492,7 +1490,7 @@ <exec executable="hdiutil" failonerror="true"> <arg value="detach"/> - <arg file="${dist.dir}/classes/mac/mnt"/> + <arg file="/Volumes/jEdit"/> <arg value="-force"/> </exec> <exec executable="hdiutil" diff --git a/package-files/osx/set-background.scpt b/package-files/osx/set-background.scpt index d0bef72bd..9c4771a26 100644 --- a/package-files/osx/set-background.scpt +++ b/package-files/osx/set-background.scpt @@ -1,24 +1,25 @@ -on run(volName, windowX, windowY, windowWidth, windowHeight, iconSize, backgroundImg, appName, appIconX, appIconY, appFolderX, appFolderY) - tell application "Finder" - tell disk volName - open - tell its container window - set its current view to icon view - set its toolbar visible to false - set its statusbar visible to false - set its bounds to {windowX, windowY, windowX + windowWidth, windowY + windowHeight} -- 168, 379, 512, 520 + 25 (currently 539) - tell its icon view options - set its arrangement to not arranged - set its icon size to iconSize -- 130 - set its background picture to file backgroundImg -- ".background:background.png" - end tell - set position of item (appName & ".app") of it to {appIconX, appIconY} -- 113, 180 - set position of item "Applications" of it to {appFolderX, appFolderY} -- 399, 180 - end tell - close - open - update without registering applications - delay 2 - end tell - end tell +on run(volName, windowX, windowY, windowWidth, windowHeight, iconSize, backgroundImage, appName, appIconX, appIconY, appFolderX, appFolderY) + tell application "Finder" + tell disk volName + open + set backgroundImage to file backgroundImage + tell its container window + set its current view to icon view + set its toolbar visible to false + set its statusbar visible to false + set its bounds to {windowX, windowY, windowX + windowWidth, windowY + windowHeight} + tell its icon view options + set its arrangement to not arranged + set its icon size to iconSize + set its background picture to backgroundImage + end tell + set position of item (appName & ".app") of it to {appIconX, appIconY} + set position of item "Applications" of it to {appFolderX, appFolderY} + end tell + close + open + update without registering applications + delay 2 + end tell + end tell end run commit: https://sourceforge.net/p/jedit/jEdit/ci/d88ae4c844d80d3dff57793d67b4713e1675dc88/ tree: https://sourceforge.net/p/jedit/jEdit/ci/d88ae4c844d80d3dff57793d67b4713e1675dc88/tree/ commit d88ae4c844d80d3dff57793d67b4713e1675dc88 Author: Björn Kautler <Bj...@Ka...> Date: Sat Jul 5 04:18:51 2025 +0200 wip diff --git a/.github/workflows/build.main.kts b/.github/workflows/build.main.kts index 9d75e4700..8f37c8f0a 100755 --- a/.github/workflows/build.main.kts +++ b/.github/workflows/build.main.kts @@ -19,6 +19,7 @@ @file:DependsOn("actions:download-artifact___major:[v4,v5-alpha)") @file:DependsOn("actions:create-github-app-token:[v2,v3-alpha)") @file:DependsOn("EnricoMi:publish-unit-test-result-action__linux___major:[v2,v3-alpha)") +@file:DependsOn("mxschmitt:action-tmate___major:[v3,v4-alpha)") import io.github.typesafegithub.workflows.actions.actions.Cache import io.github.typesafegithub.workflows.actions.actions.CacheRestore @@ -59,6 +60,8 @@ import nl.adaptivity.xmlutil.jdk.StAXReader import nl.adaptivity.xmlutil.jdk.StAXWriter import nl.adaptivity.xmlutil.serialization.XML import java.io.File +import io.github.typesafegithub.workflows.actions.mxschmitt.ActionTmate +import io.github.typesafegithub.workflows.domain.RunnerType.MacOSLatest workflow( name = "Build", @@ -138,10 +141,19 @@ workflow( ) ) + job( + id = "foo", + name = "Foo", + runsOn = MacOSLatest + ) { + uses(action = ActionTmate()) + } + val build = job( id = "build", name = "Build on ${expr("matrix.os")} with ${expr("matrix.java")}", runsOn = RunnerType.Custom(expr("matrix.os")), + condition = "false", _customArguments = mapOf( "strategy" to mapOf( "fail-fast" to false, @@ -400,6 +412,7 @@ workflow( runsOn = UbuntuLatest, needs = listOf(build), condition = """ + false && (!${cancelled()}) && (${build.result neq Skipped}) """.trimIndent() @@ -476,6 +489,7 @@ workflow( runsOn = UbuntuLatest, needs = listOf(build), condition = """ + false && (!${cancelled()}) && (${build.result neq Skipped}) """.trimIndent() diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e8e3dc0e7..86ad234de 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -20,11 +20,20 @@ jobs: - id: 'step-2' name: 'Consistency check' run: 'git diff --exit-code ''.github/workflows/build.yaml''' + foo: + name: 'Foo' + runs-on: 'macos-latest' + needs: + - 'check_yaml_consistency' + steps: + - id: 'step-0' + uses: 'mxschmitt/action-tmate@v3' build: name: 'Build on ${{ matrix.os }} with ${{ matrix.java }}' runs-on: '${{ matrix.os }}' needs: - 'check_yaml_consistency' + if: 'false' strategy: fail-fast: false matrix: @@ -512,6 +521,7 @@ jobs: - 'build' - 'check_yaml_consistency' if: |- + false && (!cancelled()) && (needs.build.result != 'skipped') steps: @@ -572,6 +582,7 @@ jobs: - 'build' - 'check_yaml_consistency' if: |- + false && (!cancelled()) && (needs.build.result != 'skipped') steps: commit: https://sourceforge.net/p/jedit/jEdit/ci/5102fd43e36e7291471d6260172b4019e7f681df/ tree: https://sourceforge.net/p/jedit/jEdit/ci/5102fd43e36e7291471d6260172b4019e7f681df/tree/ commit 5102fd43e36e7291471d6260172b4019e7f681df Author: Björn Kautler <Bj...@Ka...> Date: Thu Jul 3 23:14:35 2025 +0200 Improve macOS app bundle building diff --git a/build.xml b/build.xml index 602981050..58d679d6b 100644 --- a/build.xml +++ b/build.xml @@ -1406,6 +1406,7 @@ applicationCategory="public.app-category.developer-tools" highResolutionCapable="true" supportsAutomaticGraphicsSwitching="true" + ignoreVerbose="true" mainclassname="org.gjt.sp.jedit.jEdit"> <classpath file="${dist.dir}/${jar.filename}"/> <option value="-Dapple.awt.textantialiasing=true"/> @@ -1413,18 +1414,15 @@ <option value="-Dapple.awt.antialiasing=true"/> <argument value="-background"/> <bundledocument contentTypes="public.text" - extensions="*" icon="icons/file.icns" name="jEdit TEXT Document" role="Editor"/> + <bundledocument contentTypes="public.data, public.content" + icon="icons/file.icns" + name="jEdit Document" + role="Editor" + handlerRank="Alternate"/> </appbundler:create> - <!-- part of work-around for https://github.com/TheInfiniteKind/appbundler/pull/88 --> - <copy file="package-files/osx/jedit" - todir="${dist.dir}/classes/mac/jEdit.app/Contents/MacOS/" - overwrite="true"/> - <!-- part of work-around for https://github.com/TheInfiniteKind/appbundler/pull/88 --> - <chmod file="${dist.dir}/classes/mac/jEdit.app/Contents/MacOS/jedit" - perm="+x"/> <copy todir="${dist.dir}/classes/mac/jEdit.app/Contents/Java/" overwrite="true"> <fileset dir="${dist.dir}" @@ -1436,11 +1434,6 @@ properties/** startup/**"/> </copy> - <replace file="${dist.dir}/classes/mac/jEdit.app/Contents/Info.plist" - encoding="UTF-8" - token="<key>IgnorePSN</key>" - value="<key>IgnoreVerbose</key><true/><key>IgnorePSN</key>" - failonnoreplacements="true"/> <copy todir="${dist.dir}/classes/mac/" overwrite="true"> <fileset dir="package-files/osx/" @@ -1457,47 +1450,55 @@ <arg value="create"/> <arg value="-volname"/> <arg value="jEdit"/> + <arg value="-format"/> + <arg value="UDRW"/> + <arg value="-fs"/> + <arg value="HFS+"/> <arg value="-srcfolder"/> <arg file="${dist.dir}/classes/mac"/> - <arg file="${dist.dir}/orig-${mac.disk.image.filename}"/> + <arg file="${dist.dir}/udrw-${mac.disk.image.filename}"/> </exec> </retry> - <exec executable="hdiutil" - failonerror="true"> - <arg value="convert"/> - <arg file="${dist.dir}/orig-${mac.disk.image.filename}"/> - <arg value="-format"/> - <arg value="UDRW"/> - <arg value="-o"/> - <arg file="${dist.dir}/udrw-${mac.disk.image.filename}"/> - </exec> <exec executable="hdiutil" failonerror="true"> <arg value="attach"/> + <arg value="-readwrite"/> + <arg value="-mountpoint"/> + <arg value="${dist.dir}/classes/mac/mnt"/> <arg file="${dist.dir}/udrw-${mac.disk.image.filename}"/> </exec> <exec executable="ln" failonerror="true"> <arg value="-sF"/> <arg file="/Applications"/> - <arg file="/Volumes/jEdit/"/> + <arg file="${dist.dir}/classes/mac/mnt/"/> + </exec> + <exec executable="osascript" + failonerror="true"> + <arg file="package-files/osx/set-background.scpt"/> + <arg value="jEdit"/> + <arg value="168"/> + <arg value="379"/> + <arg value="512"/> + <arg value="539"/> + <arg value="130"/> + <arg value=".background:background.png"/> + <arg value="jEdit"/> + <arg value="113"/> + <arg value="180"/> + <arg value="399"/> + <arg value="180"/> </exec> - <copy file="package-files/osx/DS_Store" - tofile="/Volumes/jEdit/.DS_Store" - overwrite="true"/> <exec executable="hdiutil" failonerror="true"> <arg value="detach"/> - <arg file="/Volumes/jEdit"/> + <arg file="${dist.dir}/classes/mac/mnt"/> <arg value="-force"/> </exec> - <copy file="${dist.dir}/udrw-${mac.disk.image.filename}" - tofile="${dist.dir}/udrw-copy-${mac.disk.image.filename}" - overwrite="true"/> <exec executable="hdiutil" failonerror="true"> <arg value="convert"/> - <arg file="${dist.dir}/udrw-copy-${mac.disk.image.filename}"/> + <arg file="${dist.dir}/udrw-${mac.disk.image.filename}"/> <arg value="-format"/> <arg value="UDZO"/> <arg value="-imagekey"/> diff --git a/ivy.xml b/ivy.xml index 73aeb8b5e..0f380cfc2 100644 --- a/ivy.xml +++ b/ivy.xml @@ -108,6 +108,6 @@ <dependency org="com.google.code.findbugs" name="jsr305" rev="3.0.2"/> - <dependency org="com.evolvedbinary.appbundler" name="appbundler" rev="1.3.0" conf="appbundler"/> + <dependency org="com.evolvedbinary.appbundler" name="appbundler" rev="1.3.1" conf="appbundler"/> </dependencies> </ivy-module> diff --git a/package-files/osx/DS_Store b/package-files/osx/DS_Store deleted file mode 100644 index 74707f330..000000000 Binary files a/package-files/osx/DS_Store and /dev/null differ diff --git a/package-files/osx/jedit b/package-files/osx/jedit deleted file mode 100644 index ce982e7c4..000000000 Binary files a/package-files/osx/jedit and /dev/null differ diff --git a/package-files/osx/set-background.scpt b/package-files/osx/set-background.scpt new file mode 100644 index 000000000..d0bef72bd --- /dev/null +++ b/package-files/osx/set-background.scpt @@ -0,0 +1,24 @@ +on run(volName, windowX, windowY, windowWidth, windowHeight, iconSize, backgroundImg, appName, appIconX, appIconY, appFolderX, appFolderY) + tell application "Finder" + tell disk volName + open + tell its container window + set its current view to icon view + set its toolbar visible to false + set its statusbar visible to false + set its bounds to {windowX, windowY, windowX + windowWidth, windowY + windowHeight} -- 168, 379, 512, 520 + 25 (currently 539) + tell its icon view options + set its arrangement to not arranged + set its icon size to iconSize -- 130 + set its background picture to file backgroundImg -- ".background:background.png" + end tell + set position of item (appName & ".app") of it to {appIconX, appIconY} -- 113, 180 + set position of item "Applications" of it to {appFolderX, appFolderY} -- 399, 180 + end tell + close + open + update without registering applications + delay 2 + end tell + end tell +end run commit: https://sourceforge.net/p/jedit/jEdit/ci/9f9f526157d620da319ea1873d4507db31b7615d/ tree: https://sourceforge.net/p/jedit/jEdit/ci/9f9f526157d620da319ea1873d4507db31b7615d/tree/ commit 9f9f526157d620da319ea1873d4507db31b7615d Author: Björn Kautler <Bj...@Ka...> Date: Wed Jul 2 22:37:25 2025 +0200 Add tests for additional UNC roots in roots file system diff --git a/ui-test/org/jedit/test/ui/VFSBrowserTest.groovy b/ui-test/org/jedit/test/ui/VFSBrowserTest.groovy index 1162db18a..811d98797 100644 --- a/ui-test/org/jedit/test/ui/VFSBrowserTest.groovy +++ b/ui-test/org/jedit/test/ui/VFSBrowserTest.groovy @@ -24,6 +24,7 @@ package org.jedit.test.ui import org.jedit.test.ui.base.UISpec import org.jedit.test.ui.content.OpenFileDialog import org.jedit.test.ui.content.OptionsDialog +import org.jedit.test.ui.content.TextInputDialog import spock.lang.Requires import spock.lang.Shared import spock.lang.TempDir @@ -511,4 +512,112 @@ class VFSBrowserTest extends UISpec { } } } + + @Requires({ instance && os.windows }) + def 'roots file system should show local WSL network share by default'() { + given: + def openFileDialog = switchToNewWindow(OpenFileDialog) { + view.fileMenu.open().openFileItem.click() + } + PollingConditions polling = new PollingConditions(timeout: 10) + + when: + openFileDialog.path << + chord(CONTROL, 'a') << + 'roots:' << + ENTER + + then: + polling { + /\\wsl$/ in openFileDialog.filesTable.column('Name')*.text() + } + } + + @Requires({ instance && os.windows }) + def 'network shares should have type filesystem'() { + given: + def openFileDialog = switchToNewWindow(OpenFileDialog) { + view.fileMenu.open().openFileItem.click() + } + + when: + openFileDialog.path << + chord(CONTROL, 'a') << + 'roots:' << + ENTER + waitFor { + /\\wsl$/ in openFileDialog.filesTable.column('Name')*.text() + } + + then: + def i = openFileDialog.filesTable.column('Name')*.text().indexOf(/\\wsl$/) + openFileDialog.filesTable.cell('Type', i + 1).text() == 'File system' + } + + @Requires({ instance && os.windows }) + def 'UNC paths should sort last when sorting by name'() { + given: + withNewWindow(page: OptionsDialog, { + view.utilsMenu.openGlobalOptions() + }) { + def dialog = page as OptionsDialog + interact { + doubleClick(dialog.treeNode('jEdit')) + } + interact { + doubleClick(dialog.treeNode('File System Browser')) + } + dialog.treeNode('Additional UNC Roots').click() + ['aaa', 'bbb', 'zzz'].each { path -> + withNewWindow(page: TextInputDialog, { + dialog.$('button', fieldName: 'add').click() + }) { + def inputDialog = page as TextInputDialog + inputDialog.textField << path << ENTER + } + } + dialog.$('button', text: 'OK').click() + } + + and: + def openFileDialog = switchToNewWindow(OpenFileDialog) { + view.fileMenu.open().openFileItem.click() + } + + and: + openFileDialog.path << + chord(CONTROL, 'a') << + 'roots:' << + ENTER + waitFor { + 'File system' in openFileDialog.filesTable.column('Type')*.text() + } + + when: + interact { + doubleClick(openFileDialog.filesTable.headerItem('Type')) + doubleClick(openFileDialog.filesTable.headerItem('Name')) + } + + then: + openFileDialog.filesTable.column('Name')*.text().takeRight(4) == [ + /\\aaa/, + /\\bbb/, + /\\wsl$/, + /\\zzz/ + ] + + when: + interact { + doubleClick(openFileDialog.filesTable.headerItem('Name')) + } + + then: + openFileDialog.filesTable.column('Name')*.text().take(4) == [ + /\\zzz/, + /\\wsl$/, + /\\bbb/, + /\\aaa/ + ] + } } commit: https://sourceforge.net/p/jedit/jEdit/ci/9814940f04c671cda09db294fb704810ddb49a0e/ tree: https://sourceforge.net/p/jedit/jEdit/ci/9814940f04c671cda09db294fb704810ddb49a0e/tree/ commit 9814940f04c671cda09db294fb704810ddb49a0e Author: Björn Kautler <Bj...@Ka...> Date: Wed Jul 2 22:37:20 2025 +0200 Add test that file extensions are shown in the type column of the file system browser diff --git a/ui-test/org/jedit/test/ui/VFSBrowserTest.groovy b/ui-test/org/jedit/test/ui/VFSBrowserTest.groovy index d908395a7..1162db18a 100644 --- a/ui-test/org/jedit/test/ui/VFSBrowserTest.groovy +++ b/ui-test/org/jedit/test/ui/VFSBrowserTest.groovy @@ -434,6 +434,46 @@ class VFSBrowserTest extends UISpec { ] } + def 'type column should show the file extension'() { + given: + fileSystemFixture.create { + dir('1-directory.2') + file('2-file') << '' + dir('3-directory.1') + file('4-file.2') << '' + file('5-file.1') << '' + } + + and: + def openFileDialog = switchToNewWindow(OpenFileDialog) { + view.fileMenu.open().openFileItem.click() + } + + when: + openFileDialog.path << + chord(OperatingSystem.current.isMacOs() ? COMMAND : CONTROL, 'a') << + "${fileSystemFixture.currentPath.toAbsolutePath()}" << + ENTER + waitFor { + openFileDialog.filesTable.column('Name')*.text().sort() == [ + '1-directory.2', + '2-file', + '3-directory.1', + '4-file.2', + '5-file.1' + ] + } + + then: + openFileDialog.filesTable.column('Type')*.text() ==~ [ + 'Directory', + 'Directory', + 'File', + 'File (.1)', + 'File (.2)' + ] + } + @Requires({ instance && os.windows }) def 'icons in roots file system should not always show default icons'() { given: commit: https://sourceforge.net/p/jedit/jEdit/ci/f03db79e169fd30afda904ab7c39803ccb5e4fe4/ tree: https://sourceforge.net/p/jedit/jEdit/ci/f03db79e169fd30afda904ab7c39803ccb5e4fe4/tree/ commit f03db79e169fd30afda904ab7c39803ccb5e4fe4 Author: Björn Kautler <Bj...@Ka...> Date: Wed Jul 2 22:37:15 2025 +0200 Add test that sorting by type actually sorts by type and then by file extension diff --git a/org/gjt/sp/jedit/browser/VFSDirectoryEntryTableModel.java b/org/gjt/sp/jedit/browser/VFSDirectoryEntryTableModel.java index 51ec0ecbc..196571b87 100644 --- a/org/gjt/sp/jedit/browser/VFSDirectoryEntryTableModel.java +++ b/org/gjt/sp/jedit/browser/VFSDirectoryEntryTableModel.java @@ -392,8 +392,7 @@ vfs_attr_loop: for(int i = 0; i < attrs.length; i++) { this.dirEntry = dirEntry; this.level = level; - if (dirEntry.getType() == VFSFile.FILE) - this.extension = MiscUtilities.getFileExtension(dirEntry.getName()); + this.extension = (dirEntry.getType() == VFSFile.FILE) ? MiscUtilities.getFileExtension(dirEntry.getName()) : ""; } diff --git a/ui-test/org/jedit/test/ui/VFSBrowserTest.groovy b/ui-test/org/jedit/test/ui/VFSBrowserTest.groovy index 7c176c184..d908395a7 100644 --- a/ui-test/org/jedit/test/ui/VFSBrowserTest.groovy +++ b/ui-test/org/jedit/test/ui/VFSBrowserTest.groovy @@ -296,6 +296,144 @@ class VFSBrowserTest extends UISpec { ] } + def 'sorting by type should first sort by type then by extension of files'() { + given: + fileSystemFixture.create { + dir('1-directory.2') + file('2-file') << '' + dir('3-directory.1') + file('4-file.2') << '' + file('5-file.1') << '' + } + + and: + def openFileDialog = switchToNewWindow(OpenFileDialog) { + view.fileMenu.open().openFileItem.click() + } + + and: + openFileDialog.path << + chord(OperatingSystem.current.isMacOs() ? COMMAND : CONTROL, 'a') << + "${fileSystemFixture.currentPath.toAbsolutePath()}" << + ENTER + waitFor { + openFileDialog.filesTable.column('Name')*.text().sort() == [ + '1-directory.2', + '2-file', + '3-directory.1', + '4-file.2', + '5-file.1' + ] + } + + when: + interact { + doubleClick(openFileDialog.filesTable.headerItem('Size')) + doubleClick(openFileDialog.filesTable.headerItem('Name')) + doubleClick(openFileDialog.filesTable.headerItem('Type')) + } + + then: + openFileDialog.filesTable.column('Name')*.text() == [ + '1-directory.2', + '3-directory.1', + '2-file', + '5-file.1', + '4-file.2' + ] + + when: + interact { + doubleClick(openFileDialog.filesTable.headerItem('Type')) + } + + then: + openFileDialog.filesTable.column('Name')*.text() == [ + '4-file.2', + '5-file.1', + '2-file', + '1-directory.2', + '3-directory.1' + ] + } + + def 'sorting by type should first sort by type then by extension of files even if mixing files and directories is enabled'() { + given: + fileSystemFixture.create { + dir('1-directory.2') + file('2-file') << '' + dir('3-directory.1') + file('4-file.2') << '' + file('5-file.1') << '' + } + + and: + withNewWindow(page: OptionsDialog, { + view.utilsMenu.openGlobalOptions() + }) { + def dialog = page as OptionsDialog + interact { + doubleClick(dialog.treeNode('jEdit')) + } + interact { + doubleClick(dialog.treeNode('File System Browser')) + } + dialog.treeNode('General').click() + dialog.$('check-box', label: 'Mix files and directories').click() + dialog.$('button', text: 'OK').click() + } + + and: + def openFileDialog = switchToNewWindow(OpenFileDialog) { + view.fileMenu.open().openFileItem.click() + } + + and: + openFileDialog.path << + chord(OperatingSystem.current.isMacOs() ? COMMAND : CONTROL, 'a') << + "${fileSystemFixture.currentPath.toAbsolutePath()}" << + ENTER + waitFor { + openFileDialog.filesTable.column('Name')*.text().sort() == [ + '1-directory.2', + '2-file', + '3-directory.1', + '4-file.2', + '5-file.1' + ] + } + + when: + interact { + doubleClick(openFileDialog.filesTable.headerItem('Size')) + doubleClick(openFileDialog.filesTable.headerItem('Name')) + doubleClick(openFileDialog.filesTable.headerItem('Type')) + } + + then: + openFileDialog.filesTable.column('Name')*.text() == [ + '1-directory.2', + '3-directory.1', + '2-file', + '5-file.1', + '4-file.2' + ] + + when: + interact { + doubleClick(openFileDialog.filesTable.headerItem('Type')) + } + + then: + openFileDialog.filesTable.column('Name')*.text() == [ + '4-file.2', + '5-file.1', + '2-file', + '1-directory.2', + '3-directory.1' + ] + } + @Requires({ instance && os.windows }) def 'icons in roots file system should not always show default icons'() { given: commit: https://sourceforge.net/p/jedit/jEdit/ci/fe315785ea5c8eec156487dc31a4fdaada53aa43/ tree: https://sourceforge.net/p/jedit/jEdit/ci/fe315785ea5c8eec156487dc31a4fdaada53aa43/tree/ commit fe315785ea5c8eec156487dc31a4fdaada53aa43 Author: Björn Kautler <Bj...@Ka...> Date: Wed Jul 2 22:37:10 2025 +0200 Treat file systems like directories during initial sorting in file system browser diff --git a/org/gjt/sp/jedit/io/VFS.java b/org/gjt/sp/jedit/io/VFS.java index 92174c56c..7f92a8893 100644 --- a/org/gjt/sp/jedit/io/VFS.java +++ b/org/gjt/sp/jedit/io/VFS.java @@ -1201,7 +1201,8 @@ public abstract class VFS { if(!sortMixFilesAndDirs) { - if(file1.getType() != file2.getType()) + if(((file1.getType() == VFSFile.FILE) || (file2.getType() == VFSFile.FILE)) + && (file1.getType() != file2.getType())) return file2.getType() - file1.getType(); } commit: https://sourceforge.net/p/jedit/jEdit/ci/85e1e9f6682dd8c1325faf6f0a9526bd5b5de08f/ tree: https://sourceforge.net/p/jedit/jEdit/ci/85e1e9f6682dd8c1325faf6f0a9526bd5b5de08f/tree/ commit 85e1e9f6682dd8c1325faf6f0a9526bd5b5de08f Author: Björn Kautler <Bj...@Ka...> Date: Wed Jul 2 22:37:05 2025 +0200 Fix broken file renaming diff --git a/org/gjt/sp/jedit/io/FileVFS.java b/org/gjt/sp/jedit/io/FileVFS.java index 6af3972be..a8768429b 100644 --- a/org/gjt/sp/jedit/io/FileVFS.java +++ b/org/gjt/sp/jedit/io/FileVFS.java @@ -48,6 +48,7 @@ import org.gjt.sp.jedit.msg.PropertiesChanged; import org.gjt.sp.util.IOUtilities; import org.gjt.sp.util.Log; +import static java.nio.file.StandardCopyOption.REPLACE_EXISTING; import static org.gjt.sp.jedit.MiscUtilities.isUncPath; import static org.gjt.sp.util.StandardUtilities.castUnchecked; //}}} @@ -573,11 +574,7 @@ public class FileVFS extends VFS fromCanonPath = from; } - // Case-insensitive fs workaround - if(!fromCanonPath.equalsIgnoreCase(toCanonPath)) - Files.delete(_to.toPath()); - - Files.move(_from.toPath(), _to.toPath()); + Files.move(_from.toPath(), _to.toPath(), REPLACE_EXISTING); VFSManager.sendVFSUpdate(this,fromCanonPath,true); VFSManager.sendVFSUpdate(this,toCanonPath,true); return true; diff --git a/ui-test/org/jedit/test/ui/FileVFSTest.groovy b/ui-test/org/jedit/test/ui/FileVFSTest.groovy new file mode 100644 index 000000000..8a50ebc2c --- /dev/null +++ b/ui-test/org/jedit/test/ui/FileVFSTest.groovy @@ -0,0 +1,169 @@ +/* + * jEdit - Programmer's Text Editor + * :tabSize=4:indentSize=4:noTabs=false: + * :folding=explicit:collapseFolds=1: + * + * Copyright © 2025 jEdit contributors + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +package org.jedit.test.ui + +import org.jedit.test.ui.base.UISpec +import org.jedit.test.ui.content.OpenFileDialog +import org.jedit.test.ui.content.VFSBrowserContextMenu +import spock.lang.Requires +import spock.lang.Shared +import spock.lang.TempDir +import spock.util.concurrent.PollingConditions +import spock.util.environment.OperatingSystem +import spock.util.io.FileSystemFixture + +import static java.nio.file.Files.list +import static org.openqa.selenium.Keys.COMMAND +import static org.openqa.selenium.Keys.CONTROL +import static org.openqa.selenium.Keys.ENTER +import static org.openqa.selenium.Keys.chord + +class FileVFSTest extends UISpec { + @Shared + @TempDir + FileSystemFixture caseSensitivityCheckDirectory + + @Shared + boolean caseSensitiveFilesystem + + // part of work-around for https://github.com/spockframework/spock/issues/1862 + @Shared + @TempDir + FileSystemFixture fileSystemFixture + + def setupSpec() { + caseSensitivityCheckDirectory.create { + file('file') << '' + file('FILE') << '' + } + caseSensitiveFilesystem = list(caseSensitivityCheckDirectory.currentPath) + .count() == 2 + } + + // part of work-around for https://github.com/spockframework/spock/issues/1862 + def cleanup() { + assert fileSystemFixture.currentPath.deleteDir() + } + + def 'renaming a file should work properly'() { + given: + fileSystemFixture.create { + file('file') << '' + } + + and: + PollingConditions polling = new PollingConditions(timeout: 10) + def openFileDialog = switchToNewWindow(OpenFileDialog) { + view.fileMenu.open().openFileItem.click() + } + openFileDialog.path << + chord(OperatingSystem.current.isMacOs() ? COMMAND : CONTROL, 'a') << + "${fileSystemFixture.currentPath.toAbsolutePath()}" << + ENTER + waitFor { + openFileDialog.filesTable.column('Name')*.text() == ['file'] + } + + when: + interact { + contextClick(openFileDialog.filesTable.cell('Name', 1)) + } + openFileDialog.self.module(VFSBrowserContextMenu).rename('file2') + + then: + polling { + openFileDialog.filesTable.column('Name')*.text() == ['file2'] + } + } + + def 'renaming a file into a new directory should work properly'() { + given: + fileSystemFixture.create { + file('file') << '' + } + + and: + PollingConditions polling = new PollingConditions(timeout: 10) + def openFileDialog = switchToNewWindow(OpenFileDialog) { + view.fileMenu.open().openFileItem.click() + } + openFileDialog.path << + chord(OperatingSystem.current.isMacOs() ? COMMAND : CONTROL, 'a') << + "${fileSystemFixture.currentPath.toAbsolutePath()}" << + ENTER + waitFor { + openFileDialog.filesTable.column('Name')*.text() == ['file'] + } + + when: + interact { + contextClick(openFileDialog.filesTable.cell('Name', 1)) + } + openFileDialog.self.module(VFSBrowserContextMenu).rename('dir/file2') + + and: + waitFor { + openFileDialog.filesTable.column('Name')*.text() == ['dir'] + } + interact { + moveToElement(openFileDialog.filesTable.cell('Name', 1), 0, 0) + click() + } + + then: + polling { + openFileDialog.filesTable.column('Name')*.text() == ['dir', 'file2'] + } + } + + @Requires({ shared.caseSensitiveFilesystem }) + def 'renaming a file should work if only differing in case'() { + given: + fileSystemFixture.create { + file('file') << '' + } + + and: + PollingConditions polling = new PollingConditions(timeout: 10) + def openFileDialog = switchToNewWindow(OpenFileDialog) { + view.fileMenu.open().openFileItem.click() + } + openFileDialog.path << + chord(OperatingSystem.current.isMacOs() ? COMMAND : CONTROL, 'a') << + "${fileSystemFixture.currentPath.toAbsolutePath()}" << + ENTER + waitFor { + openFileDialog.filesTable.column('Name')*.text() == ['file'] + } + + when: + interact { + contextClick(openFileDialog.filesTable.cell('Name', 1)) + } + openFileDialog.self.module(VFSBrowserContextMenu).rename('FILE') + + then: + polling { + openFileDialog.filesTable.column('Name')*.text() == ['FILE'] + } + } +} diff --git a/ui-test/org/jedit/test/ui/content/TextInputDialog.groovy b/ui-test/org/jedit/test/ui/content/TextInputDialog.groovy new file mode 100644 index 000000000..5fcea34a2 --- /dev/null +++ b/ui-test/org/jedit/test/ui/content/TextInputDialog.groovy @@ -0,0 +1,32 @@ +/* + * jEdit - Programmer's Text Editor + * :tabSize=4:indentSize=4:noTabs=false: + * :folding=explicit:collapseFolds=1: + * + * Copyright © 2025 jEdit contributors + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +package org.jedit.test.ui.content + +class TextInputDialog extends Window { + static at = { + self.@oMapClassName == 'javax.swing.JOptionPane#Dialog_3_2' + } + + static content = { + textField { $('#"OptionPane.textField"') } + } +} diff --git a/ui-test/org/jedit/test/ui/content/VFSBrowserContextMenu.groovy b/ui-test/org/jedit/test/ui/content/VFSBrowserContextMenu.groovy new file mode 100644 index 000000000..40b77b25a --- /dev/null +++ b/ui-test/org/jedit/test/ui/content/VFSBrowserContextMenu.groovy @@ -0,0 +1,39 @@ +/* + * jEdit - Programmer's Text Editor + * :tabSize=4:indentSize=4:noTabs=false: + * :folding=explicit:collapseFolds=1: + * + * Copyright © 2025 jEdit contributors + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +package org.jedit.test.ui.content + +import static org.openqa.selenium.Keys.ENTER + +class VFSBrowserContextMenu extends Menu<VFSBrowserContextMenu> { + static content = { + renameItem { menuItems.$('.#"vfs.browser.rename"') } + } + + def rename(String newName) { + browser.withNewWindow(page: TextInputDialog, { + renameItem.click() + }) { + def dialog = page as TextInputDialog + dialog.textField << newName << ENTER + } + } +} commit: https://sourceforge.net/p/jedit/jEdit/ci/0a807841a6193c2cc0abc8cd30f74af9dca15969/ tree: https://sourceforge.net/p/jedit/jEdit/ci/0a807841a6193c2cc0abc8cd30f74af9dca15969/tree/ commit 0a807841a6193c2cc0abc8cd30f74af9dca15969 Author: Björn Kautler <Bj...@Ka...> Date: Wed Jul 2 22:37:00 2025 +0200 Fix rename error messages diff --git a/org/gjt/sp/jedit/browser/RenameBrowserTask.java b/org/gjt/sp/jedit/browser/RenameBrowserTask.java index de5728c4e..32c51bde9 100644 --- a/org/gjt/sp/jedit/browser/RenameBrowserTask.java +++ b/org/gjt/sp/jedit/browser/RenameBrowserTask.java @@ -99,7 +99,7 @@ class RenameBrowserTask extends AbstractBrowserTask setCancellable(false); Log.log(Log.ERROR, this, io); String[] pp = {io.toString()}; - VFSManager.error(browser, path, "ioerror.directory-error", pp); + VFSManager.error(browser, path, "ioerror.rename-error", pp); } finally { @@ -112,7 +112,7 @@ class RenameBrowserTask extends AbstractBrowserTask setCancellable(false); Log.log(Log.ERROR, this, io); String[] pp = {io.toString()}; - VFSManager.error(browser, path, "ioerror.directory-error", pp); + VFSManager.error(browser, path, "ioerror.rename-error", pp); } } } //}}} commit: https://sourceforge.net/p/jedit/jEdit/ci/080e32e82306baff19926ffe7e7a499c5ba7b423/ tree: https://sourceforge.net/p/jedit/jEdit/ci/080e32e82306baff19926ffe7e7a499c5ba7b423/tree/ commit 080e32e82306baff19926ffe7e7a499c5ba7b423 Author: Björn Kautler <Bj...@Ka...> Date: Wed Jul 2 22:36:55 2025 +0200 Add test that roots file system can use system icons diff --git a/ui-test/org/jedit/test/ui/VFSBrowserTest.groovy b/ui-test/org/jedit/test/ui/VFSBrowserTest.groovy index b13076040..7c176c184 100644 --- a/ui-test/org/jedit/test/ui/VFSBrowserTest.groovy +++ b/ui-test/org/jedit/test/ui/VFSBrowserTest.groovy @@ -295,4 +295,42 @@ class VFSBrowserTest extends UISpec { '1-filesystem' ] } + + @Requires({ instance && os.windows }) + def 'icons in roots file system should not always show default icons'() { + given: + withNewWindow(page: OptionsDialog, { + view.utilsMenu.openGlobalOptions() + }) { + def dialog = page as OptionsDialog + interact { + doubleClick(dialog.treeNode('jEdit')) + } + interact { + doubleClick(dialog.treeNode('File System Browser')) + } + dialog.treeNode('General').click() + dialog.$('check-box', label: 'Use default icons').click() + dialog.$('button', text: 'OK').click() + } + + and: + PollingConditions polling = new PollingConditions(timeout: 10) + def openFileDialog = switchToNewWindow(OpenFileDialog) { + view.fileMenu.open().openFileItem.click() + } + + when: + openFileDialog.path << + chord(CONTROL, 'a') << + 'roots:' << + ENTER + + then: + polling { + openFileDialog.filesTable.column('Name')*.@icon.findAll { + !it.startsWith('jeditresource:') + } + } + } } commit: https://sourceforge.net/p/jedit/jEdit/ci/c8550b151808ac2f618018938c6eded4f503ccf7/ tree: https://sourceforge.net/p/jedit/jEdit/ci/c8550b151808ac2f618018938c6eded4f503ccf7/tree/ commit c8550b151808ac2f618018938c6eded4f503ccf7 Author: Björn Kautler <Bj...@Ka...> Date: Wed Jul 2 22:36:49 2025 +0200 Add test that all types are mixed if enabled diff --git a/ui-test/org/jedit/test/ui/VFSBrowserTest.groovy b/ui-test/org/jedit/test/ui/VFSBrowserTest.groovy index 3a27cacb4..b13076040 100644 --- a/ui-test/org/jedit/test/ui/VFSBrowserTest.groovy +++ b/ui-test/org/jedit/test/ui/VFSBrowserTest.groovy @@ -23,6 +23,7 @@ package org.jedit.test.ui import org.jedit.test.ui.base.UISpec import org.jedit.test.ui.content.OpenFileDialog +import org.jedit.test.ui.content.OptionsDialog import spock.lang.Requires import spock.lang.Shared import spock.lang.TempDir @@ -199,4 +200,99 @@ class VFSBrowserTest extends UISpec { '2-file' ] } + + def 'all types should be mixed when enabled and sorting for another column'() { + given: + fileSystemFixture.create { + dir('1-filesystem') + file('2-file') << '' + dir('3-directory') + dir('4-filesystem') + dir('5-directory') + file('6-file') << '' + } + + and: + withNewWindow(page: OptionsDialog, { + view.utilsMenu.openGlobalOptions() + }) { + def dialog = page as OptionsDialog + interact { + doubleClick(dialog.treeNode('jEdit')) + } + interact { + doubleClick(dialog.treeNode('File System Browser')) + } + dialog.treeNode('General').click() + dialog.$('check-box', label: 'Mix files and directories').click() + dialog.$('button', text: 'OK').click() + } + + and: + def openFileDialog = switchToNewWindow(OpenFileDialog) { + view.fileMenu.open().openFileItem.click() + } + + and: + openFileDialog.path << + chord(OperatingSystem.current.isMacOs() ? COMMAND : CONTROL, 'a') << + "${fileSystemFixture.currentPath.toAbsolutePath()}" << + ENTER + waitFor { + openFileDialog.filesTable.column('Name')*.text().sort() == [ + '1-filesystem', + '2-file', + '3-directory', + '4-filesystem', + '5-directory', + '6-file' + ] + } + + and: + exec(openFileDialog.filesTable) { + // language=java prefix="class MarathonExecScript {\n\tvoid execute(org.gjt.sp.jedit.browser.VFSDirectoryEntryTable $1) {" suffix="\n\t}\n}" + ''' + org.gjt.sp.jedit.browser.VFSDirectoryEntryTableModel model = (org.gjt.sp.jedit.browser.VFSDirectoryEntryTableModel) $1.getModel(); + org.gjt.sp.jedit.io.VFSFile[] files = model.getFiles(); + for(int i = 0; i < files.length; i++) { + if(files[i].getName().endsWith("-filesystem")) { + files[i].setType(org.gjt.sp.jedit.io.VFSFile.FILESYSTEM); + } + } + $1.repaint(); + ''' + } + + when: + interact { + doubleClick(openFileDialog.filesTable.headerItem('Size')) + doubleClick(openFileDialog.filesTable.headerItem('Name')) + } + + then: + openFileDialog.filesTable.column('Name')*.text() == [ + '1-filesystem', + '2-file', + '3-directory', + '4-filesystem', + '5-directory', + '6-file' + ] + + when: + interact { + doubleClick(openFileDialog.filesTable.headerItem('Name')) + } + + then: + openFileDialog.filesTable.column('Name')*.text() == [ + '6-file', + '5-directory', + '4-filesystem', + '3-directory', + '2-file', + '1-filesystem' + ] + } } diff --git a/ui-test/org/jedit/test/ui/content/OptionsDialog.groovy b/ui-test/org/jedit/test/ui/content/OptionsDialog.groovy new file mode 100644 index 000000000..1782b74a6 --- /dev/null +++ b/ui-test/org/jedit/test/ui/content/OptionsDialog.groovy @@ -0,0 +1,32 @@ +/* + * jEdit - Programmer's Text Editor + * :tabSize=4:indentSize=4:noTabs=false: + * :folding=explicit:collapseFolds=1: + * + * Copyright © 2025 jEdit contributors + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +package org.jedit.test.ui.content + +class OptionsDialog extends Window { + static at = { + self.@className == 'org.jedit.options.CombinedOptions' + } + + static content = { + treeNode { text -> self.$('tree:displayed::all-nodes', text: text) } + } +} diff --git a/ui-test/org/jedit/test/ui/content/UtilsMenu.groovy b/ui-test/org/jedit/test/ui/content/UtilsMenu.groovy new file mode 100644 index 000000000..b9d4ae7fa --- /dev/null +++ b/ui-test/org/jedit/test/ui/content/UtilsMenu.groovy @@ -0,0 +1,43 @@ +/* + * jEdit - Programmer's Text Editor + * :tabSize=4:indentSize=4:noTabs=false: + * :folding=explicit:collapseFolds=1: + * + * Copyright © 2025 jEdit contributors + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +package org.jedit.test.ui.content + +class UtilsMenu extends Menu<UtilsMenu> { + UtilsMenu() { + menuId = 'utils' + } + + static content = { + globalOptions { menuItems.$('.#global-options') } + } + + def openGlobalOptions() { + def (newWindow, mewPage) = browser.withNewWindow(page: OptionsDialog, { + open() + globalOptions.click() + }) { + [currentWindow, browser.page] + } + browser.driver.switchTo().window(newWindow as String) + return mewPage as OptionsDialog + } +} diff --git a/ui-test/org/jedit/test/ui/content/View.groovy b/ui-test/org/jedit/test/ui/content/View.groovy index 022fc9850..cb6cc9f93 100644 --- a/ui-test/org/jedit/test/ui/content/View.groovy +++ b/ui-test/org/jedit/test/ui/content/View.groovy @@ -58,5 +58,6 @@ class View extends Window { optionalActionBarCloseButton(required: false) { optionalActionBar.$('button#close') } textArea { self.module(TextArea) } fileMenu { self.module(FileMenu) } + utilsMenu { self.module(UtilsMenu) } } } commit: https://sourceforge.net/p/jedit/jEdit/ci/44102cf583ebfa217d39105a5928f6b2d7e7a1c6/ tree: https://sourceforge.net/p/jedit/jEdit/ci/44102cf583ebfa217d39105a5928f6b2d7e7a1c6/tree/ commit 44102cf583ebfa217d39105a5928f6b2d7e7a1c6 Author: Björn Kautler <Bj...@Ka...> Date: Wed Jul 2 22:36:44 2025 +0200 Add test that directories and filesystems are mixed diff --git a/ui-test/logging.properties b/ui-test/logging.properties index 21917fa9a..f8f6cdb0d 100644 --- a/ui-test/logging.properties +++ b/ui-test/logging.properties @@ -22,3 +22,4 @@ handlers = java.util.logging.ConsoleHandler .level = INFO net.sourceforge.marathon.level = WARNING +org.openqa.selenium.interactions.Actions.level = WARNING diff --git a/ui-test/org/jedit/test/ui/VFSBrowserTest.groovy b/ui-test/org/jedit/test/ui/VFSBrowserTest.groovy index 6b19b3b50..3a27cacb4 100644 --- a/ui-test/org/jedit/test/ui/VFSBrowserTest.groovy +++ b/ui-test/org/jedit/test/ui/VFSBrowserTest.groovy @@ -24,8 +24,11 @@ package org.jedit.test.ui import org.jedit.test.ui.base.UISpec import org.jedit.test.ui.content.OpenFileDialog import spock.lang.Requires +import spock.lang.Shared +import spock.lang.TempDir import spock.util.concurrent.PollingConditions import spock.util.environment.OperatingSystem +import spock.util.io.FileSystemFixture import static org.openqa.selenium.Keys.COMMAND import static org.openqa.selenium.Keys.CONTROL @@ -33,6 +36,16 @@ import static org.openqa.selenium.Keys.ENTER import static org.openqa.selenium.Keys.chord class VFSBrowserTest extends UISpec { + // part of work-around for https://github.com/spockframework/spock/issues/1862 + @Shared + @TempDir + FileSystemFixture fileSystemFixture + + // part of work-around for https://github.com/spockframework/spock/issues/1862 + def cleanup() { + assert fileSystemFixture.currentPath.deleteDir() + } + @Requires({ instance && os.windows }) def 'drive entries on Windows should not end with the file separator'() { given: @@ -107,4 +120,83 @@ class VFSBrowserTest extends UISpec { ] } } + + def 'directories and filesystems should always be mixed when sorting for another column'() { + given: + fileSystemFixture.create { + dir('1-filesystem') + file('2-file') << '' + dir('3-directory') + dir('4-filesystem') + dir('5-directory') + file('6-file') << '' + } + + and: + def openFileDialog = switchToNewWindow(OpenFileDialog) { + view.fileMenu.open().openFileItem.click() + } + + and: + openFileDialog.path << + chord(OperatingSystem.current.isMacOs() ? COMMAND : CONTROL, 'a') << + "${fileSystemFixture.currentPath.toAbsolutePath()}" << + ENTER + waitFor { + openFileDialog.filesTable.column('Name')*.text().sort() == [ + '1-filesystem', + '2-file', + '3-directory', + '4-filesystem', + '5-directory', + '6-file' + ] + } + + and: + exec(openFileDialog.filesTable) { + // language=java prefix="class MarathonExecScript {\n\tvoid execute(org.gjt.sp.jedit.browser.VFSDirectoryEntryTable $1) {" suffix="\n\t}\n}" + ''' + org.gjt.sp.jedit.browser.VFSDirectoryEntryTableModel model = (org.gjt.sp.jedit.browser.VFSDirectoryEntryTableModel) $1.getModel(); + org.gjt.sp.jedit.io.VFSFile[] files = model.getFiles(); + for(int i = 0; i < files.length; i++) { + if(files[i].getName().endsWith("-filesystem")) { + files[i].setType(org.gjt.sp.jedit.io.VFSFile.FILESYSTEM); + } + } + $1.repaint(); + ''' + } + + when: + interact { + doubleClick(openFileDialog.filesTable.headerItem('Size')) + doubleClick(openFileDialog.filesTable.headerItem('Name')) + } + + then: + openFileDialog.filesTable.column('Name')*.text() == [ + '1-filesystem', + '3-directory', + '4-filesystem', + '5-directory', + '2-file', + '6-file' + ] + + when: + interact { + doubleClick(openFileDialog.filesTable.headerItem('Name')) + } + + then: + openFileDialog.filesTable.column('Name')*.text() == [ + '5-directory', + '4-filesystem', + '3-directory', + '1-filesystem', + '6-file', + '2-file' + ] + } } commit: https://sourceforge.net/p/jedit/jEdit/ci/2245e2632b3e677b38055d5532d73870bcc749e0/ tree: https://sourceforge.net/p/jedit/jEdit/ci/2245e2632b3e677b38055d5532d73870bcc749e0/tree/ commit 2245e2632b3e677b38055d5532d73870bcc749e0 Author: Björn Kautler <Bj...@Ka...> Date: Wed Jul 2 22:36:39 2025 +0200 Add test that protocol node is not shown twice for URL paths diff --git a/ui-test/org/jedit/test/ui/VFSBrowserTest.groovy b/ui-test/org/jedit/test/ui/VFSBrowserTest.groovy index 0709bd531..6b19b3b50 100644 --- a/ui-test/org/jedit/test/ui/VFSBrowserTest.groovy +++ b/ui-test/org/jedit/test/ui/VFSBrowserTest.groovy @@ -25,7 +25,9 @@ import org.jedit.test.ui.base.UISpec import org.jedit.test.ui.content.OpenFileDialog import spock.lang.Requires import spock.util.concurrent.PollingConditions +import spock.util.environment.OperatingSystem +import static org.openqa.selenium.Keys.COMMAND import static org.openqa.selenium.Keys.CONTROL import static org.openqa.selenium.Keys.ENTER import static org.openqa.selenium.Keys.chord @@ -83,4 +85,26 @@ class VFSBrowserTest extends UISpec { ] } } + + def 'parents list of URL path should not have the protocol node twice'() { + given: + PollingConditions polling = new PollingConditions(timeout: 10) + def openFileDialog = switchToNewWindow(OpenFileDialog) { + view.fileMenu.open().openFileItem.click() + } + + when: + openFileDialog.path << + chord(OperatingSystem.current.isMacOs() ? COMMAND : CONTROL, 'a') << + 'https://localhost' << + ENTER + + then: + polling { + openFileDialog.parents == [ + 'https:', + 'localhost' + ] + } + } } commit: https://sourceforge.net/p/jedit/jEdit/ci/18f9ec391a510d12fa2aa3aa5cc0bf117c854f05/ tree: https://sourceforge.net/p/jedit/jEdit/ci/18f9ec391a510d12fa2aa3aa5cc0bf117c854f05/tree/ commit 18f9ec391a510d12fa2aa3aa5cc0bf117c854f05 Author: Björn Kautler <Bj...@Ka...> Date: Wed Jul 2 22:36:34 2025 +0200 Add test that root parent of a UNC path is the UNC server diff --git a/ui-test/org/jedit/test/ui/VFSBrowserTest.groovy b/ui-test/org/jedit/test/ui/VFSBrowserTest.groovy index 2e1e58c1f..0709bd531 100644 --- a/ui-test/org/jedit/test/ui/VFSBrowserTest.groovy +++ b/ui-test/org/jedit/test/ui/VFSBrowserTest.groovy @@ -60,4 +60,27 @@ class VFSBrowserTest extends UISpec { .empty } } + + @Requires({ instance && os.windows }) + def 'parents list of UNC path should contain correct entries'() { + given: + PollingConditions polling = new PollingConditions(timeout: 10) + def openFileDialog = switchToNewWindow(OpenFileDialog) { + view.fileMenu.open().openFileItem.click() + } + + when: + openFileDialog.path << + chord(CONTROL, 'a') << + /\\foo\bar/ << + ENTER + + then: + polling { + openFileDialog.parents == [ + /\\foo/, + 'bar' + ] + } + } } diff --git a/ui-test/org/jedit/test/ui/content/OpenFileDialog.groovy b/ui-test/org/jedit/test/ui/content/OpenFileDialog.groovy index 44b9d9e44..37f332f50 100644 --- a/ui-test/org/jedit/test/ui/content/OpenFileDialog.groovy +++ b/ui-test/org/jedit/test/ui/content/OpenFileDialog.groovy @@ -31,6 +31,7 @@ class OpenFileDialog extends Window { static content = { path { $('text-field#path') } + parents(wait: true) { $('list#parent::all-items')*.text().with { it == ['Loading...'] ? null : it } } filesTable { $('table#file').module(Table) } filename { $('text-field#filename') } openButton { $('button#ok') } commit: https://sourceforge.net/p/jedit/jEdit/ci/310fb941f52d6c08b19577c06a326be9a7a932a7/ tree: https://sourceforge.net/p/jedit/jEdit/ci/310fb941f52d6c08b19577c06a326be9a7a932a7/tree/ commit 310fb941f52d6c08b19577c06a326be9a7a932a7 Author: Björn Kautler <Bj...@Ka...> Date: Wed Jul 2 22:36:29 2025 +0200 Add test for not having a file separator for drive entries in the file roots view diff --git a/ui-test/org/jedit/test/ui/VFSBrowserTest.groovy b/ui-test/org/jedit/test/ui/VFSBrowserTest.groovy new file mode 100644 index 000000000..2e1e58c1f --- /dev/null +++ b/ui-test/org/jedit/test/ui/VFSBrowserTest.groovy @@ -0,0 +1,63 @@ +/* + * jEdit - Programmer's Text Editor + * :tabSize=4:indentSize=4:noTabs=false: + * :folding=explicit:collapseFolds=1: + * + * Copyright © 2025 jEdit contributors + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +package org.jedit.test.ui + +import org.jedit.test.ui.base.UISpec +import org.jedit.test.ui.content.OpenFileDialog +import spock.lang.Requires +import spock.util.concurrent.PollingConditions + +import static org.openqa.selenium.Keys.CONTROL +import static org.openqa.selenium.Keys.ENTER +import static org.openqa.selenium.Keys.chord + +class VFSBrowserTest extends UISpec { + @Requires({ instance && os.windows }) + def 'drive entries on Windows should not end with the file separator'() { + given: + PollingConditions polling = new PollingConditions(timeout: 10) + def openFileDialog = switchToNewWindow(OpenFileDialog) { + view.fileMenu.open().openFileItem.click() + } + + when: + openFileDialog.path << + chord(CONTROL, 'a') << + 'roots:' << + ENTER + + then: + polling { + openFileDialog + .filesTable + .column('Name') + *.text() + .findAll { + (it[1] == ':') && + (it.size() >= 3) && + (it[2] in ['/', $/\/$]) && + ((it.size() == 3) || (it[3] == ' ')) + } + .empty + } + } +} diff --git a/ui-test/org/jedit/test/ui/content/OpenFileDialog.groovy b/ui-test/org/jedit/test/ui/content/OpenFileDialog.groovy index 1bfb034a1..44b9d9e44 100644 --- a/ui-test/org/jedit/test/ui/content/OpenFileDialog.groovy +++ b/ui-test/org/jedit/test/ui/content/OpenFileDialog.groovy @@ -30,6 +30,8 @@ class OpenFileDialog extends Window { } static content = { + path { $('text-field#path') } + filesTable { $('table#file').module(Table) } filename { $('text-field#filename') } openButton { $('button#ok') } } diff --git a/ui-test/org/jedit/test/ui/content/OpenFileDialog.groovy b/ui-test/org/jedit/test/ui/content/Table.groovy similarity index 57% copy from ui-test/org/jedit/test/ui/content/OpenFileDialog.groovy copy to ui-test/org/jedit/test/ui/content/Table.groovy index 1bfb034a1..1528e0d59 100644 --- a/ui-test/org/jedit/test/ui/content/OpenFileDialog.groovy +++ b/ui-test/org/jedit/test/ui/content/Table.groovy @@ -21,21 +21,22 @@ package org.jedit.test.ui.content -import java.nio.file.Path - -class OpenFileDialog extends Window { - static at = { - self.@className == 'org.gjt.sp.jedit.browser.VFSFileChooserDialog' - $('panel', className: 'org.gjt.sp.jedit.browser.VFSBrowser').@mode == '4' - } +import geb.Module +class Table extends Module { static content = { - filename { $('text-field#filename') } - openButton { $('button#ok') } - } - - def openFile(Path file) { - filename << "${file.toAbsolutePath()}" - openButton.click() + header { $('.::header') } + headerItems { header.$('.::all-items') } + headerItem { String column -> headerItems.$('.', text: column) } + headerItemN { int column -> header.$(".::nth-item($column)") } + columnIndex { String column -> headerItems.toList().indexOf(headerItem(column)) } + rowCount { attr('rowCount') as int } + cellN { int row, int column -> $(".::mnth-cell($row, $column)") } + cell { String column, int row -> cellN(row, columnIndex(column) + 1) } + columnN { int column -> (1..rowCount).collect { cellN(it, column) } } + column { String column -> + def n = columnIndex(column) + 1 + (1..rowCount).collect { cellN(it, n) } + } } } commit: https://sourceforge.net/p/jedit/jEdit/ci/4988b18a82617b3ae03e95b9315e9cd4a2ca0a3a/ tree: https://sourceforge.net/p/jedit/jEdit/ci/4988b18a82617b3ae03e95b9315e9cd4a2ca0a3a/tree/ commit 4988b18a82617b3ae03e95b9315e9cd4a2ca0a3a Author: Björn Kautler <Bj...@Ka...> Date: Wed Jul 2 22:36:24 2025 +0200 Deiconify the windows when using -newview or -newplainview diff --git a/org/gjt/sp/jedit/EditServer.java b/org/gjt/sp/jedit/EditServer.java index bd4944f85..b3dfb0c40 100644 --- a/org/gjt/sp/jedit/EditServer.java +++ b/org/gjt/sp/jedit/EditServer.java @@ -256,6 +256,7 @@ public class EditServer extends Thread } else if(newPlainView) { + jEdit.un... [truncated message content] |
From: vampire0 <vam...@us...> - 2025-04-14 17:43:37
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "jEdit core". The branch, test/master has been deleted was 7a2b553e699c90173b7317a357d3aea782eb3a68 ----------------------------------------------------------------------- 7a2b553e699c90173b7317a357d3aea782eb3a68 wip ----------------------------------------------------------------------- hooks/post-receive -- jEdit core |
From: vampire0 <vam...@us...> - 2025-04-14 17:43:00
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "jEdit core". The branch, test/master has been created at 7a2b553e699c90173b7317a357d3aea782eb3a68 (commit) - Log ----------------------------------------------------------------- commit: https://sourceforge.net/p/jedit/jEdit/ci/7a2b553e699c90173b7317a357d3aea782eb3a68/ tree: https://sourceforge.net/p/jedit/jEdit/ci/7a2b553e699c90173b7317a357d3aea782eb3a68/tree/ commit 7a2b553e699c90173b7317a357d3aea782eb3a68 Author: Björn Kautler <Bj...@Ka...> Date: Mon Apr 14 19:42:16 2025 +0200 wip diff --git a/build.xml b/build.xml index 6fc5739d1..3d0df3733 100644 --- a/build.xml +++ b/build.xml @@ -280,6 +280,7 @@ <pathelement location="${classes.dir}/core"/> </groovy:classpath> <groovy:exclude name="SpockConfig.groovy"/> + <groovy:exclude name="GebConfig.groovy"/> </groovy:groovyc> </target> @@ -450,6 +451,7 @@ <junitlauncher printsummary="true" failureproperty="tests.failed"> <classpath refid="classpath.test"/> + <classpath location="."/> <classpath location="test"/> <classpath location="${classes.dir}/test"/> <classpath location="${ant.library.dir}/ant.jar"/> diff --git a/ivy.xml b/ivy.xml index 1dae7e7e9..095f95133 100644 --- a/ivy.xml +++ b/ivy.xml @@ -67,6 +67,13 @@ <dependency org="org.spockframework" name="spock-core" rev="2.3-groovy-4.0" conf="test;sources;javadoc"/> <dependency org="org.objenesis" name="objenesis" rev="3.4" conf="test;sources;javadoc"/> <dependency org="net.bytebuddy" name="byte-buddy" rev="1.17.5" conf="test;sources;javadoc"/> + <dependency org="com.jaliansystems" name="marathon-java-driver" rev="5.4.0.0" conf="test;sources;javadoc"/> + <dependency org="org.gebish" name="geb-core" rev="7.0" conf="test;sources;javadoc"> + <exclude org="org.seleniumhq.selenium" module="selenium-api"/> + </dependency> + <dependency org="org.gebish" name="geb-spock" rev="7.0" conf="test;sources;javadoc"> + <exclude org="org.seleniumhq.selenium" module="selenium-api"/> + </dependency> <dependency org="org.junit.platform" name="junit-platform-launcher" rev="1.12.1" conf="test;sources;javadoc"/> <dependency org="saxon" name="saxon" rev="6.5.3" conf="docbook"/> diff --git a/test/GebConfig.groovy b/test/GebConfig.groovy new file mode 100644 index 000000000..da5955604 --- /dev/null +++ b/test/GebConfig.groovy @@ -0,0 +1,28 @@ +/* + * jEdit - Programmer's Text Editor + * :tabSize=4:indentSize=4:noTabs=false: + * :folding=explicit:collapseFolds=1: + * + * Copyright © 2025 jEdit contributors + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + + +import geb.report.ScreenshotReporter +import net.sourceforge.marathon.javadriver.JavaDriver + +driver = { new JavaDriver() } +reporter = new ScreenshotReporter() +reportsDir = 'build/test/geb-reports' diff --git a/test/org/gjt/sp/jedit/UITest.groovy b/test/org/gjt/sp/jedit/UITest.groovy new file mode 100644 index 000000000..e881ce322 --- /dev/null +++ b/test/org/gjt/sp/jedit/UITest.groovy @@ -0,0 +1,54 @@ +/* + * jEdit - Programmer's Text Editor + * :tabSize=4:indentSize=4:noTabs=false: + * :folding=explicit:collapseFolds=1: + * + * Copyright © 2025 jEdit contributors + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +package org.gjt.sp.jedit + +import geb.spock.GebReportingSpec +import org.gjt.sp.jedit.jEdit as jEditClass +import spock.lang.IgnoreIf +import spock.lang.Isolated + +import static java.awt.GraphicsEnvironment.headless + +@Isolated +@IgnoreIf({ headless }) +class UITest extends GebReportingSpec { + def foo() { + given: + jEditClass.setBooleanProperty('tip.show', false) + jEditClass.setBooleanProperty('lang.usedefaultlocale', false) + jEditClass.main('-nosettings') + + when: + waitFor(15) { + title.contains('jEdit') + } + def title = withNewWindow({ + $('menu[text="Utilities"]').click() + $('menu-item[text="Global Options..."]').click() + }, close: false) { + title + } + + then: + title == 'Global Options jEdit: General' + } +} commit: https://sourceforge.net/p/jedit/jEdit/ci/df8f7c41ce365506a84807b48b39be72af4d605e/ tree: https://sourceforge.net/p/jedit/jEdit/ci/df8f7c41ce365506a84807b48b39be72af4d605e/tree/ commit df8f7c41ce365506a84807b48b39be72af4d605e Author: Björn Kautler <Bj...@Ka...> Date: Mon Apr 14 04:14:28 2025 +0200 Port all existing tests to Spock diff --git a/build.xml b/build.xml index 134fd2ed9..6fc5739d1 100644 --- a/build.xml +++ b/build.xml @@ -279,12 +279,6 @@ includes="*.jar"/> <pathelement location="${classes.dir}/core"/> </groovy:classpath> - <groovy:javac debug="true" - debuglevel="${config.build.debuglevel}" - nowarn="${config.build.nowarn}" - deprecation="${config.build.deprecation}" - release="${target.java.version}" - encoding="UTF-8"/> <groovy:exclude name="SpockConfig.groovy"/> </groovy:groovyc> </target> diff --git a/ivy.xml b/ivy.xml index f08d27622..1dae7e7e9 100644 --- a/ivy.xml +++ b/ivy.xml @@ -60,13 +60,10 @@ <dependencies defaultconf="compile;sources;javadoc"> <dependency org="ant-contrib" name="ant-contrib" rev="1.0b3" conf="ant-contrib"/> - <dependency org="org.junit.vintage" name="junit-vintage-engine" rev="5.12.1" conf="test;sources;javadoc"/> - <dependency org="org.mockito" name="mockito-junit-jupiter" rev="3.3.3" conf="test;sources;javadoc"/> - <dependency org="org.hamcrest" name="hamcrest-library" rev="2.1" conf="test;sources;javadoc"/> - <dependency org="org.apache.groovy" name="groovy-ant" rev="4.0.26" conf="groovy-ant;sources;javadoc"/> <dependency org="org.apache.groovy" name="groovy-groovydoc" rev="4.0.26" conf="groovy-ant;sources;javadoc"/> <dependency org="org.apache.groovy" name="groovy" rev="4.0.26" conf="test;sources;javadoc"/> + <dependency org="org.apache.groovy" name="groovy-nio" rev="4.0.26" conf="test;sources;javadoc"/> <dependency org="org.spockframework" name="spock-core" rev="2.3-groovy-4.0" conf="test;sources;javadoc"/> <dependency org="org.objenesis" name="objenesis" rev="3.4" conf="test;sources;javadoc"/> <dependency org="net.bytebuddy" name="byte-buddy" rev="1.17.5" conf="test;sources;javadoc"/> diff --git a/test/org/gjt/sp/jedit/MiscUtilitiesTest.groovy b/test/org/gjt/sp/jedit/MiscUtilitiesTest.groovy new file mode 100644 index 000000000..1306b2d64 --- /dev/null +++ b/test/org/gjt/sp/jedit/MiscUtilitiesTest.groovy @@ -0,0 +1,583 @@ +/* + * jEdit - Programmer's Text Editor + * :tabSize=4:indentSize=4:noTabs=false: + * :folding=explicit:collapseFolds=1: + * + * Copyright © 2025 jEdit contributors + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +package org.gjt.sp.jedit + +import org.gjt.sp.jedit.jEdit as jEditClass +import org.jedit.util.SystemManager +import spock.lang.Requires +import spock.lang.ResourceLock +import spock.lang.Specification +import spock.util.environment.RestoreSystemProperties + +import static org.gjt.sp.jedit.MiscUtilities.abbreviate +import static org.gjt.sp.jedit.MiscUtilities.backupDirectory +import static org.gjt.sp.jedit.MiscUtilities.buildToVersion +import static org.gjt.sp.jedit.MiscUtilities.canonPath +import static org.gjt.sp.jedit.MiscUtilities.classToFile +import static org.gjt.sp.jedit.MiscUtilities.concatPath +import static org.gjt.sp.jedit.MiscUtilities.constructPath +import static org.gjt.sp.jedit.MiscUtilities.escapesToChars +import static org.gjt.sp.jedit.MiscUtilities.expandVariables +import static org.gjt.sp.jedit.MiscUtilities.fileToClass +import static org.gjt.sp.jedit.MiscUtilities.getBaseName +import static org.gjt.sp.jedit.MiscUtilities.getCompleteBaseName +import static org.gjt.sp.jedit.MiscUtilities.getFileExtension +import static org.gjt.sp.jedit.MiscUtilities.getFileName +import static org.gjt.sp.jedit.MiscUtilities.getFirstSeparatorIndex +import static org.gjt.sp.jedit.MiscUtilities.getLastSeparatorIndex +import static org.gjt.sp.jedit.MiscUtilities.getLongestPrefix +import static org.gjt.sp.jedit.MiscUtilities.getNthBackupFile +import static org.gjt.sp.jedit.MiscUtilities.getProtocolOfURL +import static org.gjt.sp.jedit.MiscUtilities.isAbsolutePath +import static org.gjt.sp.jedit.MiscUtilities.isURL +import static org.gjt.sp.jedit.MiscUtilities.pathsEqual +import static org.gjt.sp.jedit.MiscUtilities.resolveSymlinks +import static org.gjt.sp.jedit.MiscUtilities.svc +import static org.gjt.sp.jedit.OperatingSystem.UNIX +import static org.gjt.sp.jedit.OperatingSystem.WINDOWS_NT +import static org.gjt.sp.jedit.OperatingSystem.os +import static org.gjt.sp.jedit.OperatingSystem.windows + +@RestoreSystemProperties +@ResourceLock('org.gjt.sp.jedit.OperatingSystem.os') +class MiscUtilitiesTest extends Specification { + static variableKey = 'jEdit_TEST' + + View view = Stub { + buffer >> Stub(Buffer) + } + + def origOs + + def setup() { + origOs = os + } + + def cleanup() { + os = origOs + } + + def 'canonPath of "#path" should be "#result"'() { + expect: + canonPath(path) == result + + where: + path || result + '' || '' + 'https://jedit.org/' || 'https://jedit.org/' + $/file://C:\Users\jedit-dev\/$ || $/C:\Users\jedit-dev\/$ + $/file:C:\Users\jedit-dev\/$ || $/C:\Users\jedit-dev\/$ + } + + @ResourceLock('org.gjt.sp.jedit.jEdit.activeView') + def 'canonPath of "-" should be directory of current buffer'() { + given: + def origActiveView = jEditClass.activeView + jEditClass.activeView = view + view.buffer.path >> '/home/jedit-dev/blabla/myfile.txt' + + expect: + canonPath('-') == '/home/jedit-dev/blabla/' + + cleanup: + jEditClass.activeView = origActiveView + } + + @Requires({ File.separatorChar == $/\/$ }) + def 'canonPath of file URL on Windows should be pure path with backslash separators'() { + expect: + canonPath($/file://C:\Users\jedit-dev/blabla//$) == $/C:\Users\jedit-dev\blabla\/$ + } + + def 'canonPath of "#path" should handle user home ending with file separator properly'() { + given: + def userHomeWithSeparator = System.getProperty('user.home') + if (!userHomeWithSeparator.endsWith(File.separator)) { + userHomeWithSeparator = "$userHomeWithSeparator${File.separator}" + System.setProperty('user.home', userHomeWithSeparator) + } + + expect: + canonPath(path) == "${userHomeWithSeparator}${resultPart}" + + where: + path || resultPart + '~' || '' + '~/' || '' + '~/toto' || 'toto' + } + + def 'canonPath of "#path" should handle user home not ending with file separator properly'() { + given: + def userHomeWithoutSeparator = System.getProperty('user.home') + if (userHomeWithoutSeparator.endsWith(File.separator)) { + userHomeWithoutSeparator = userHomeWithoutSeparator.dropRight(1) + System.setProperty('user.home', userHomeWithoutSeparator) + } + + expect: + canonPath(path) == "${userHomeWithoutSeparator}${resultPart}" + + where: + path || resultPart + '~' || '' + '~/' || File.separator + '~/toto' || "${File.separator}toto" + } + + def 'expandVariables should replace "~" in "~/" by user home'() { + expect: + expandVariables('~/blabla') == "${System.getProperty('user.home')}/blabla" + } + + def 'expandVariables should replace "~" in "~\\" by user home'() { + expect: + expandVariables(/~\blabla/) == "${System.getProperty('user.home')}\\blabla" + } + + @ResourceLock('org.gjt.sp.jedit.jEdit.systemManager') + def 'expandVariables of "#variable" on #testOs should work properly'() { + given: + def value = /c:\home\jEdit/ + def origSystemManager = jEditClass.systemManager + jEditClass.systemManager = Mock(SystemManager) { + 1 * getenv(variableKey) >> value + } + + and: + os = OperatingSystem."$testOs" + + expect: + expandVariables(variable) == value + + cleanup: + jEditClass.systemManager = origSystemManager + + where: + variable | testOs + "%${variableKey}%" | 'WINDOWS_NT' + "%${variableKey}%" | 'UNIX' + "\$${variableKey}" | 'UNIX' + "\${${variableKey}}" | 'UNIX' + } + + def 'expandVariables with unclosed unix pattern should not change the string'() { + given: + os = UNIX + + expect: + expandVariables("\${${variableKey}") == "\${${variableKey}" + } + + def 'abbreviate user home on Windows should result in according environment variable reference'() { + given: + os = WINDOWS_NT + svc = null + + expect: + abbreviate(System.getProperty('user.home')) in ['%USERPROFILE%', '%HOME%'] + } + + def 'abbreviate user home on Unix should result in "~"'() { + given: + os = UNIX + svc = null + + expect: + abbreviate(System.getProperty('user.home')) == '~' + } + + def 'resolveSymlinks for a URL should return the URL unchanged'() { + expect: + resolveSymlinks('https://www.jedit.org') == 'https://www.jedit.org' + } + + def 'resolveSymlinks on Windows for a drive letter (#path) should return it unchanged'() { + given: + os = WINDOWS_NT + + expect: + resolveSymlinks(path) == path + + where: + path << ['c:', $/c:\/$] + } + + @Requires({ windows }) + def 'resolveSymlinks on Windows with more than just drive letter should return the canonical path'() { + expect: + resolveSymlinks(/c:\bla/) == /C:\bla/ + } + + def 'isAbsolutePath should return true for "#path"'() { + expect: + isAbsolutePath(path) + + where: + path || _ + 'https://www.jedit.org' || _ + '~/' || _ + '-' || _ + } + + def 'isAbsolutePath should return #result for "#path" on Windows'() { + given: + os = WINDOWS_NT + + expect: + isAbsolutePath(path) == result + + where: + path || result + 'c:' || true + $/c:\/$ || true + /c:\bla/ || true + 'toto/tutu' || false + 'c:/bla' || true + '//bla' || true + /\\bla/ || true + 'c:blabla.txt' || false + } + + def 'isAbsolutePath should return #result for "#path" on Unix'() { + given: + os = UNIX + + expect: + isAbsolutePath(path) == result + + where: + path || result + '/toto/tutu' || true + 'toto/tutu' || false + } + + def 'constructPath with an absolute path should return it canonicalized'() { + expect: + constructPath(null, 'https://www.jedit.org') == 'https://www.jedit.org' + } + + def 'constructPath with null parent and empty path should return user dir'() { + expect: + constructPath(null, '') == System.getProperty('user.dir') + } + + def 'constructPath with "." as path should return parent'() { + expect: + constructPath('/home/dev/jEdit', '.') == '/home/dev/jEdit' + } + + def 'constructPath with ".." path should return parent of parent'() { + expect: + constructPath('/home/dev/jEdit', '..') == '/home/dev/' + } + + def 'constructPath with path containing ".." part should properly canonicalize the result'() { + expect: + constructPath('/home/dev/jEdit', '../yolo') == + '/home/dev/yolo'.replace('/', File.separator) + } + + def 'constructPath for drive letter (#path) on Windows should return the drive letter'() { + given: + os = WINDOWS_NT + + expect: + constructPath(null, path) == path + + where: + path << ['c:', $/c:\/$] + } + + def 'constructPath for drive-relative path on Windows should return the path drive-absolute'() { + given: + os = WINDOWS_NT + + expect: + constructPath(null, 'c:blabla.txt') == /c:\blabla.txt/ + } + + def 'constructPath with three arguments should work properly'() { + expect: + constructPath('/home/dev/jEdit', '..', 'file.txt') == + '/home/dev/file.txt'.replace('/', File.separator) + } + + def 'concatPath should treat path as relative even if it looks like absolute'() { + expect: + concatPath('/home/dev/jEdit', '/test.txt') == + '/home/dev/jEdit/test.txt'.replace('/', File.separator) + } + + def 'concatPath should properly handle relative paths'() { + expect: + concatPath('/home/dev/jEdit', 'test.txt') == + '/home/dev/jEdit/test.txt'.replace('/', File.separator) + } + + def 'concatPath should treat drive-letter path like if ":" is a file separator'() { + expect: + concatPath('/home/dev/jEdit', 'c:test.txt') == + '/home/dev/jEdit/c/test.txt'.replace('/', File.separator) + } + + def 'concatPath should treat drive-letter path like if ":" is a file separator with parent ending in slash'() { + expect: + concatPath('/home/dev/jEdit/', 'c:test.txt') == + '/home/dev/jEdit/c/test.txt'.replace('/', File.separator) + } + + def 'getFirstSeparatorIndex on absolute Unix path should return 0'() { + expect: + getFirstSeparatorIndex('/yoyo/tata/aaa.txt') == 0 + } + + def 'getFirstSeparatorIndex on relative path should work properly'() { + expect: + getFirstSeparatorIndex('yoyo/tata/aaa.txt') == 4 + } + + def 'getFirstSeparatorIndex on path without separator should return -1'() { + expect: + getFirstSeparatorIndex('yoyotata') == -1 + } + + def 'getFirstSeparatorIndex on drive-relative path should work properly on Windows'() { + given: + os = WINDOWS_NT + + expect: + getFirstSeparatorIndex('c:yoyo/tata/aaa.txt') == 6 + } + + def 'getFirstSeparatorIndex on drive-absolute path should return 2 on Windows'() { + given: + os = WINDOWS_NT + + expect: + getFirstSeparatorIndex('c:/yoyo/tata/aaa.txt') == 2 + } + + @Requires({ File.separatorChar == $/\/$ }) + def 'getFirstSeparatorIndex on mixed separators path should work properly on Windows'() { + expect: + getFirstSeparatorIndex($/c:\yoyo/tata/aaa.txt/$) == 2 + } + + @Requires({ File.separatorChar == $/\/$ }) + def 'getFirstSeparatorIndex on backslash-only path should work properly on Windows'() { + expect: + getFirstSeparatorIndex(/c:\yoyo\tata\aaa.txt/) == 2 + } + + def 'getLastSeparatorIndex on absolute Unix path should work properly'() { + expect: + getLastSeparatorIndex('/yoyo/tata/aaa.txt') == 10 + } + + def 'getLastSeparatorIndex on relative path should work properly'() { + expect: + getLastSeparatorIndex('yoyo/tata/aaa.txt') == 9 + } + + def 'getLastSeparatorIndex on path without separator should return -1'() { + expect: + getLastSeparatorIndex('yoyotata') == -1 + } + + def 'getLastSeparatorIndex on drive-relative path should work properly on Windows'() { + given: + os = WINDOWS_NT + + expect: + getLastSeparatorIndex('c:yoyo/tata/aaa.txt') == 11 + } + + def 'getLastSeparatorIndex on drive-absolute path should work properly on Windows'() { + given: + os = WINDOWS_NT + + expect: + getLastSeparatorIndex('c:/yoyo/tata/aaa.txt') == 12 + } + + def 'getLastSeparatorIndex on mixed separators path should work properly on Windows'() { + given: + os = WINDOWS_NT + + expect: + getLastSeparatorIndex($/c:\yoyo/tata/aaa.txt/$) == 12 + } + + def 'getFileExtension for "#path" should return "#extension" on Windows'() { + given: + os = WINDOWS_NT + + expect: + getFileExtension(path) == extension + + where: + path || extension + $/c:\yoyo/ta.ta/aaa.txt/$ || '.txt' + $/c:\yoyo/ta.ta/aaa.tar.gz/$ || '.gz' + $/c:\yoyo/ta.ta/aaa/$ || '' + } + + def 'getFileName should return the file name'() { + expect: + getFileName($/c:\yoyo/ta.ta/aaa.txt/$) == 'aaa.txt' + } + + def 'getCompleteBaseName for a path without extension should return the full file name'() { + expect: + getCompleteBaseName($/c:\yoyo/ta.ta/aaa/$) == 'aaa' + } + + def 'getCompleteBaseName for a path with extension should return the file name without extension'() { + expect: + getCompleteBaseName('/net/log/IP-192.168.1.1-data.tar.gz') == 'IP-192.168.1.1-data.tar' + } + + def 'getBaseName for a path without extension should return the full file name'() { + expect: + getBaseName($/c:\yoyo/ta.ta/aaa/$) == 'aaa' + } + + def 'getBaseName for a path with extension should return the file name up to the first "."'() { + expect: + getBaseName('/net/log/IP-192.168.1.1-data.tar.gz') == 'IP-192' + } + + def 'getProtocolOfURL should return the protocol of a URL'() { + expect: + getProtocolOfURL('https://www.jedit.org') == 'https' + } + + def '#input #should be recognized as URL'() { + expect: + isURL(input) == result + + where: + input || result + 'https://www.jedit.org' || true + '/etc/passwd' || false + /C:\AUTOEXEC.BAT/ || false + 'file:///etc/passwd' || true + + and: + should = result ? 'should' : 'should not' + } + + def 'getNthBackupFile with empty suffix should append the backup number'() { + expect: + getNthBackupFile('toto.txt', 0, 2, null, '', '/tmp') == + new File('/tmp/toto.txt0'.replace('/', File.separator)) + } + + def 'getNthBackupFile with null suffix should append the backup number'() { + expect: + getNthBackupFile('toto.txt', 1, 2, '', null, '/tmp') == + new File('/tmp/toto.txt1'.replace('/', File.separator)) + } + + def 'getNthBackupFile with suffix and 0 backups should append the given suffix instead of backup number'() { + expect: + getNthBackupFile('toto.txt', 1, 0, '', 'suf', '/tmp') == + new File('/tmp/toto.txtsuf'.replace('/', File.separator)) + } + + def 'getNthBackupFile with suffix and 1 backup should append the given suffix instead of backup number'() { + expect: + getNthBackupFile('toto.txt', 1, 1, '', 'suf', '/tmp') == + new File('/tmp/toto.txtsuf'.replace('/', File.separator)) + } + + def 'getNthBackupFile with prefix should prepend the prefix'() { + expect: + getNthBackupFile('toto.txt', 1, 2, '_', '', '/tmp') == + new File('/tmp/_toto.txt1'.replace('/', File.separator)) + } + + def 'backupDirectory should not be set by default'() { + expect: + backupDirectory == null + } + + def 'fileToClass should translate a class file path to a class name'() { + expect: + fileToClass('org/git/sp/jedit/MiscUtilitiesTest.class') == 'org.git.sp.jedit.MiscUtilitiesTest' + } + + def 'classToFile should translate a class name to a class file path'() { + expect: + classToFile('org.git.sp.jedit.MiscUtilitiesTest') == 'org/git/sp/jedit/MiscUtilitiesTest.class' + } + + def '#left #should be equal to #right'() { + expect: + pathsEqual(left, right) == result + + where: + left | right || result + 'https://www.jedit.org' | 'https://www.jedit.org' || true + 'https://www.jedit.org' | 'https://www.jedit.org/' || true + 'https://www.jedit.org/' | 'https://www.jedit.org' || true + 'https://www.jedit.org/' | 'https://www.jedit.org/' || true + 'https://www.jedit.org' | 'c:/test.txt' || false + + and: + should = result ? 'should' : 'should not' + } + + def 'escapesToChars should unescape backslash escapes'() { + expect: + escapesToChars('bl\\\\a\\t\\tbo\\t\\n\\naa\\t\\n\\tff') == 'bl\\a\t\tbo\t\n\naa\t\n\tff' + } + + def 'getLongestPrefix should work properly case insensitively'() { + expect: + getLongestPrefix(['blabla', 'blabladsf', 'blaBladsfdddd'], true) == 'blabla' + } + + def 'getLongestPrefix should work properly case sensitively'() { + expect: + getLongestPrefix(['blabla', 'blabladsf', 'blaBladsfdddd'], false) == 'bla' + } + + def 'getLongestPrefix should work properly on arrays'() { + expect: + getLongestPrefix(['blabla', 'blabladsf', 'blaBladsfdddd'] as String[], true) == 'blabla' + } + + def 'buildToVersion for #build should return #version'() { + expect: + buildToVersion(build) == version + + where: + build || version + '05.06.01.00' || '5.6pre1' + '05.06.02.00' || '5.6pre2' + '05.06.99.00' || '5.6.0' + '05.06.99.01' || '5.6.1' + '05.06.99.02' || '5.6.2' + } +} diff --git a/test/org/gjt/sp/jedit/MiscUtilitiesTest.java b/test/org/gjt/sp/jedit/MiscUtilitiesTest.java deleted file mode 100644 index 1a93e0dd6..000000000 --- a/test/org/gjt/sp/jedit/MiscUtilitiesTest.java +++ /dev/null @@ -1,741 +0,0 @@ -/* - * jEdit - Programmer's Text Editor - * :tabSize=8:indentSize=8:noTabs=false: - * :folding=explicit:collapseFolds=1: - * - * Copyright © 2020 jEdit contributors - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or any later version. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package org.gjt.sp.jedit; - -import org.jedit.util.SystemManager; -import org.junit.After; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.ArgumentCaptor; -import org.mockito.Mock; -import org.mockito.Mockito; -import org.mockito.junit.MockitoJUnitRunner; - -import java.io.File; -import java.lang.reflect.Field; -import java.util.List; - -import static org.junit.Assert.*; -import static org.junit.Assume.*; -import static org.mockito.Mockito.when; - -@RunWith(MockitoJUnitRunner.class) -public class MiscUtilitiesTest -{ - private static final int UNIX = 0x31337; - private static final int WINDOWS_NT = 0x666; - private static int os; - private static String userHome; - - @Mock - private Buffer buffer; - @Mock - private View view; - - @BeforeClass - public static void beforeClass() throws Exception - { - os = getOS(); - userHome = System.getProperty("user.home"); - } - - @After - public void tearDown() throws Exception - { - updateOS(os); - System.setProperty("user.home", userHome); - } - - @Test - public void canonPathEmpty() - { - assertEquals("", MiscUtilities.canonPath("")); - } - - @Test - public void canonPathHome() - { - assertEquals(System.getProperty("user.home"), MiscUtilities.canonPath("~")); - } - - @Test - public void canonPathHomeStart() - { - assertEquals(System.getProperty("user.home") + File.separator, MiscUtilities.canonPath("~/")); - } - - @Test - public void canonPathHomeStart2() - { - assertEquals(System.getProperty("user.home") + File.separator + "toto", MiscUtilities.canonPath("~/toto")); - } - - @Test - public void canonPathHomeMinus() - { - jEdit.setActiveView(view); -// jEdit.getViewManager().setActiveView(view); - when(view.getBuffer()).thenReturn(buffer); - when(buffer.getPath()).thenReturn("/home/jedit-dev/blabla/myfile.txt"); - assertEquals("/home/jedit-dev/blabla/", MiscUtilities.canonPath("-")); - } - - @Test - public void canonPathHomeUrl() - { - assertEquals("https://jedit.org/", MiscUtilities.canonPath("https://jedit.org/")); - } - - @Test - public void canonPathFile() - { - assertEquals("C:\\Users\\jedit-dev\\", MiscUtilities.canonPath("file://C:\\Users\\jedit-dev\\")); - } - - @Test - public void canonPathFileWindows() - { - assumeTrue("depends on final File.separatorChar", OperatingSystem.isWindows()); - assertEquals("C:\\Users\\jedit-dev\\blabla\\", MiscUtilities.canonPath("file://C:\\Users\\jedit-dev/blabla/")); - } - - @Test - public void canonPathFileSlash() - { - assertEquals("C:\\Users\\jedit-dev\\", MiscUtilities.canonPath("file:C:\\Users\\jedit-dev\\")); - } - - @Test - public void canonPathTildeHomeWithFileSeparator() - { - String tmpUserHome = userHome; - if (!userHome.endsWith(File.separator)) - { - tmpUserHome = userHome + File.separator; - System.setProperty("user.home", tmpUserHome); - } - assertEquals(tmpUserHome, MiscUtilities.canonPath("~/")); - } - - @Test - public void canonPathTildeHomeWithoutSeparator() - { - String tmpUserHome = userHome; - if (userHome.endsWith(File.separator)) - { - System.setProperty("user.home", userHome.substring(0, userHome.length() - 2)); - } - else - { - tmpUserHome = userHome + File.separator; - } - assertEquals(tmpUserHome, MiscUtilities.canonPath("~/")); - } - - @Test - public void expandVariablesTilde() - { - String userHome = System.getProperty("user.home"); - assertEquals(userHome + "/blabla", MiscUtilities.expandVariables("~/blabla")); - } - - @Test - public void expandVariablesTildeWindows() - { - String userHome = System.getProperty("user.home"); - assertEquals(userHome + "\\blabla", MiscUtilities.expandVariables("~\\blabla")); - } - - @Test - public void expandVariablesEnvWindowsAsWindows() throws Exception - { - jEdit.systemManager = Mockito.mock(SystemManager.class); - var captor = ArgumentCaptor.forClass(String.class); - var value = "c:\\home\\jEdit"; - Mockito.when(jEdit.systemManager.getenv(captor.capture())).thenReturn(value); - updateOS(WINDOWS_NT); - var key = "jEdit_TEST"; - assertEquals(value, MiscUtilities.expandVariables('%' + key + '%')); - assertEquals(captor.getValue(), key); - } - @Test - public void expandVariablesEnvWindowsAsUnix() throws Exception - { - jEdit.systemManager = Mockito.mock(SystemManager.class); - var captor = ArgumentCaptor.forClass(String.class); - var value = "c:\\home\\jEdit"; - Mockito.when(jEdit.systemManager.getenv(captor.capture())).thenReturn(value); - updateOS(UNIX); - var key = "jEdit_TEST"; - assertEquals(value, MiscUtilities.expandVariables('%' + key + '%')); - assertEquals(captor.getValue(), key); - } - - @Test - public void expandVariablesEnvUnix() throws Exception - { - jEdit.systemManager = Mockito.mock(SystemManager.class); - var captor = ArgumentCaptor.forClass(String.class); - var value = "c:\\home\\jEdit"; - Mockito.when(jEdit.systemManager.getenv(captor.capture())).thenReturn(value); - updateOS(UNIX); - var key = "jEdit_TEST"; - assertEquals(value, MiscUtilities.expandVariables('$' + key)); - assertEquals(captor.getValue(), key); - } - - @Test - public void expandVariablesEnvUnix2() throws Exception - { - jEdit.systemManager = Mockito.mock(SystemManager.class); - var captor = ArgumentCaptor.forClass(String.class); - var value = "c:\\home\\jEdit"; - Mockito.when(jEdit.systemManager.getenv(captor.capture())).thenReturn(value); - updateOS(UNIX); - var key = "jEdit_TEST"; - assertEquals(value, MiscUtilities.expandVariables("${" + key + '}')); - } - - @Test - public void expandVariablesEnvUnixNoMatch() throws Exception - { - updateOS(UNIX); - // it is wanted that the } is missing here - var key = "jEdit_TEST"; - assertEquals("${" + key, MiscUtilities.expandVariables("${" + key)); - } - - @Test - public void abbreviateUserHomeWindows() throws Exception - { - updateOS(WINDOWS_NT); - MiscUtilities.svc = null; - String result = MiscUtilities.abbreviate(System.getProperty("user.home")); - assertTrue("%USERPROFILE%".equals(result) || "%HOME%".equals(result)); - } - - @Test - public void abbreviateUserHomeUnix() throws Exception - { - updateOS(UNIX); - MiscUtilities.svc = null; - assertEquals("~", MiscUtilities.abbreviate(System.getProperty("user.home"))); - } - - @Test - public void resolveSymlinksWindowsUrl() throws Exception - { - updateOS(WINDOWS_NT); - assertEquals("https://www.jedit.org", MiscUtilities.resolveSymlinks("https://www.jedit.org")); - } - - @Test - public void resolveSymlinksWindows1() throws Exception - { - updateOS(WINDOWS_NT); - assertEquals("c:", MiscUtilities.resolveSymlinks("c:")); - } - - @Test - public void resolveSymlinksWindows2() throws Exception - { - updateOS(WINDOWS_NT); - assertEquals("c:\\", MiscUtilities.resolveSymlinks("c:\\")); - } - - @Test - public void resolveSymlinksWindows3() throws Exception - { - assumeTrue("depends on File.getCanonicalPath", OperatingSystem.isWindows()); - assertEquals("C:\\bla", MiscUtilities.resolveSymlinks("c:\\bla")); - } - - @Test - public void isAbsolutePathUrl() - { - assertTrue(MiscUtilities.isAbsolutePath("https://www.jedit.org")); - } - - @Test - public void isAbsolutePathTilde() - { - assertTrue(MiscUtilities.isAbsolutePath("~/")); - } - - @Test - public void isAbsolutePathMinus() - { - assertTrue(MiscUtilities.isAbsolutePath("-")); - } - - @Test - public void isAbsolutePathWindows() throws Exception - { - updateOS(WINDOWS_NT); - assertTrue(MiscUtilities.isAbsolutePath("c:")); - } - - @Test - public void isAbsolutePathWindows2() throws Exception - { - updateOS(WINDOWS_NT); - assertTrue(MiscUtilities.isAbsolutePath("c:\\")); - } - - @Test - public void isAbsolutePathWindows3() throws Exception - { - updateOS(WINDOWS_NT); - assertTrue(MiscUtilities.isAbsolutePath("c:\\bla")); - } - - @Test - public void isAbsolutePathWindows4() throws Exception - { - updateOS(WINDOWS_NT); - assertFalse(MiscUtilities.isAbsolutePath("toto/tutu")); - } - - @Test - public void isAbsolutePathWindows5() throws Exception - { - updateOS(WINDOWS_NT); - assertTrue(MiscUtilities.isAbsolutePath("c:/bla")); - } - - @Test - public void isAbsolutePathWindows6() throws Exception - { - updateOS(WINDOWS_NT); - assertTrue(MiscUtilities.isAbsolutePath("//bla")); - } - - @Test - public void isAbsolutePathWindows7() throws Exception - { - updateOS(WINDOWS_NT); - assertTrue(MiscUtilities.isAbsolutePath("\\\\bla")); - } - - @Test - public void isAbsolutePathWindows8() throws Exception - { - updateOS(WINDOWS_NT); - assertFalse(MiscUtilities.isAbsolutePath("c:blabla.txt")); - } - - @Test - public void isAbsolutePathUnix() throws Exception - { - updateOS(UNIX); - assertTrue(MiscUtilities.isAbsolutePath("/toto/tutu")); - } - - @Test - public void isAbsolutePathUnix2() throws Exception - { - updateOS(UNIX); - assertFalse(MiscUtilities.isAbsolutePath("toto/tutu")); - } - - @Test - public void constructPathAbsolute() - { - assertEquals("https://www.jedit.org", MiscUtilities.constructPath(null, "https://www.jedit.org")); - } - - @Test - public void constructPathNullEmpty() - { - assertEquals(System.getProperty("user.dir"), MiscUtilities.constructPath(null, "")); - } - - @Test - public void constructPathDot() - { - assertEquals("/home/dev/jEdit", MiscUtilities.constructPath("/home/dev/jEdit", ".")); - } - - @Test - public void constructPathDotDot() - { - assertEquals("/home/dev/", MiscUtilities.constructPath("/home/dev/jEdit", "..")); - } - - @Test - public void constructPathDotDotPath() - { - assertEquals(File.separator + String.join(File.separator, "home", "dev", "yolo"), MiscUtilities.constructPath("/home/dev/jEdit", "../yolo")); - } - - @Test - public void constructPathWindows() throws Exception - { - updateOS(WINDOWS_NT); - assertEquals("c:", MiscUtilities.constructPath(null, "c:")); - } - - @Test - public void constructPathWindows2() throws Exception - { - updateOS(WINDOWS_NT); - assertEquals("c:\\", MiscUtilities.constructPath(null, "c:\\")); - } - - @Test - public void constructPathWindows3() throws Exception - { - updateOS(WINDOWS_NT); - assertEquals("c:\\blabla.txt", MiscUtilities.constructPath(null, "c:blabla.txt")); - } - - @Test - public void constructPath3Args() - { - assertEquals(File.separator + String.join(File.separator, "home", "dev", "file.txt"), - MiscUtilities.constructPath("/home/dev/jEdit", "..", "file.txt")); - } - - @Test - public void concatPath() - { - assertEquals(File.separator + String.join(File.separator, "home", "dev", "jEdit", "test.txt"), - MiscUtilities.concatPath("/home/dev/jEdit", "/test.txt")); - } - - @Test - public void concatPath2() - { - assertEquals(File.separator + String.join(File.separator, "home", "dev", "jEdit", "test.txt"), - MiscUtilities.concatPath("/home/dev/jEdit", "test.txt")); - } - - @Test - public void concatPath3() - { - assertEquals(File.separator + String.join(File.separator, "home", "dev", "jEdit", "c","test.txt"), - MiscUtilities.concatPath("/home/dev/jEdit", "c:test.txt")); - } - - @Test - public void concatPath4() - { - assertEquals(File.separator + String.join(File.separator, "home", "dev", "jEdit", "c","test.txt"), - MiscUtilities.concatPath("/home/dev/jEdit/", "c:test.txt")); - } - - @Test - public void getFirstSeparatorIndexAbsolute() - { - assertEquals(0, MiscUtilities.getFirstSeparatorIndex("/yoyo/tata/aaa.txt")); - } - - @Test - public void getFirstSeparatorIndexRelative() - { - assertEquals(4, MiscUtilities.getFirstSeparatorIndex("yoyo/tata/aaa.txt")); - } - - @Test - public void getFirstSeparatorWindows1() throws Exception - { - updateOS(WINDOWS_NT); - assertEquals(6, MiscUtilities.getFirstSeparatorIndex("c:yoyo/tata/aaa.txt")); - } - - @Test - public void getFirstSeparatorWindows2() throws Exception - { - updateOS(WINDOWS_NT); - assertEquals(2, MiscUtilities.getFirstSeparatorIndex("c:/yoyo/tata/aaa.txt")); - } - - @Test - public void getFirstSeparatorWindows3() throws Exception - { - assumeTrue("depends on final File.separatorChar", OperatingSystem.isWindows()); - assertEquals(2, MiscUtilities.getFirstSeparatorIndex("c:\\yoyo/tata/aaa.txt")); - } - - @Test - public void getFirstSeparatorWindows4() throws Exception - { - assumeTrue("depends on final File.separatorChar", OperatingSystem.isWindows()); - assertEquals(2, MiscUtilities.getFirstSeparatorIndex("c:\\yoyo\\tata\\aaa.txt")); - } - - @Test - public void getLastSeparatorIndexAbsolute() - { - assertEquals(10, MiscUtilities.getLastSeparatorIndex("/yoyo/tata/aaa.txt")); - } - - @Test - public void getLastSeparatorIndexRelative() - { - assertEquals(9, MiscUtilities.getLastSeparatorIndex("yoyo/tata/aaa.txt")); - } - - @Test - public void getLastSeparatorIndexNo() - { - assertEquals(-1, MiscUtilities.getLastSeparatorIndex("yoyotata")); - } - - @Test - public void getLastSeparatorWindows1() throws Exception - { - updateOS(WINDOWS_NT); - assertEquals(11, MiscUtilities.getLastSeparatorIndex("c:yoyo/tata/aaa.txt")); - } - - @Test - public void getLastSeparatorWindows2() throws Exception - { - updateOS(WINDOWS_NT); - assertEquals(12, MiscUtilities.getLastSeparatorIndex("c:/yoyo/tata/aaa.txt")); - } - - @Test - public void getLastSeparatorWindows3() throws Exception - { - updateOS(WINDOWS_NT); - assertEquals(12, MiscUtilities.getLastSeparatorIndex("c:\\yoyo/tata/aaa.txt")); - } - - @Test - public void getFileExtension() throws Exception - { - updateOS(WINDOWS_NT); - assertEquals(".txt", MiscUtilities.getFileExtension("c:\\yoyo/ta.ta/aaa.txt")); - } - - @Test - public void getFileExtension2() throws Exception - { - updateOS(WINDOWS_NT); - assertEquals(".gz", MiscUtilities.getFileExtension("c:\\yoyo/ta.ta/aaa.tar.gz")); - } - - @Test - public void getFileExtensionNoExtension() throws Exception - { - updateOS(WINDOWS_NT); - assertEquals("", MiscUtilities.getFileExtension("c:\\yoyo/ta.ta/aaa")); - } - - @Test - public void getFileName() - { - assertEquals("aaa.txt", MiscUtilities.getFileName("c:\\yoyo/ta.ta/aaa.txt")); - } - - @Test - public void getCompleteBaseName() - { - assertEquals("aaa", MiscUtilities.getCompleteBaseName("c:\\yoyo/ta.ta/aaa")); - } - - @Test - public void getCompleteBaseName2() - { - assertEquals("IP-192.168.1.1-data.tar", MiscUtilities.getCompleteBaseName("/net/log/IP-192.168.1.1-data.tar.gz")); - } - - @Test - public void getBaseName() - { - assertEquals("aaa", MiscUtilities.getBaseName("c:\\yoyo/ta.ta/aaa")); - } - - @Test - public void getBaseName2() - { - assertEquals("IP-192", MiscUtilities.getBaseName("/net/log/IP-192.168.1.1-data.tar.gz")); - } - - @Test - public void getProtocolOfURL() - { - assertEquals("https", MiscUtilities.getProtocolOfURL("https://www.jedit.org")); - } - - @Test - public void isURL() - { - assertTrue(MiscUtilities.isURL("https://www.jedit.org")); - } - - @Test - public void isURLEtcPassword() - { - assertFalse(MiscUtilities.isURL("/etc/passwd")); - } - - @Test - public void isURLWindowsPath() - { - assertFalse(MiscUtilities.isURL("C:\\AUTOEXEC.BAT")); - } - - @Test - public void isURLFileUrl() - { - assertTrue(MiscUtilities.isURL("file:///etc/passwd")); - } - - @Test - public void getNthBackupFileNoPrefix() - { - assertEquals(new File(File.separatorChar + String.join(File.separator, "tmp", "toto.txt0")), - MiscUtilities.getNthBackupFile("toto.txt", 0, 2, null, "", "/tmp")); - } - - @Test - public void getNthBackupFileNoPrefix1() - { - assertEquals(new File(File.separatorChar + String.join(File.separator, "tmp", "toto.txt1")), - MiscUtilities.getNthBackupFile("toto.txt", 1, 2, "", null, "/tmp")); - } - - @Test - public void getNthBackupFileNoPrefixButSuffix() - { - assertEquals(new File(File.separatorChar + String.join(File.separator, "tmp", "toto.txtsuf")), - MiscUtilities.getNthBackupFile("toto.txt", 1, 0, "", "suf", "/tmp")); - } - - @Test - public void getNthBackupFileNoPrefix1ButSuffix() - { - assertEquals(new File(File.separatorChar + String.join(File.separator, "tmp", "toto.txtsuf")), - MiscUtilities.getNthBackupFile("toto.txt", 1, 1, "", "suf", "/tmp")); - } - - @Test - public void getNthBackupFileNoSuffix() - { - assertEquals(new File(File.separatorChar + String.join(File.separator, "tmp","_toto.txt1")), MiscUtilities.getNthBackupFile("toto.txt", 1, 2, "_", "", "/tmp")); - } - - @Test - public void getBackupDirectory() - { - assertNull(MiscUtilities.getBackupDirectory()); - } - - @Test - public void fileToClass() - { - assertEquals("org.git.sp.jedit.MiscUtilitiesTest", MiscUtilities.fileToClass("org/git/sp/jedit/MiscUtilitiesTest.class")); - } - - @Test - public void classToFile() - { - assertEquals("org/git/sp/jedit/MiscUtilitiesTest.class", MiscUtilities.classToFile("org.git.sp.jedit.MiscUtilitiesTest")); - } - - @Test - public void pathsEqual() - { - assertTrue(MiscUtilities.pathsEqual("https://www.jedit.org","https://www.jedit.org")); - } - - @Test - public void pathsEqual2() - { - assertTrue(MiscUtilities.pathsEqual("https://www.jedit.org","https://www.jedit.org/")); - } - - @Test - public void pathsEqual3() - { - assertTrue(MiscUtilities.pathsEqual("https://www.jedit.org/","https://www.jedit.org")); - } - - @Test - public void pathsEqual4() - { - assertTrue(MiscUtilities.pathsEqual("https://www.jedit.org/","https://www.jedit.org/")); - } - - @Test - public void pathsEqualFalse() - { - assertFalse(MiscUtilities.pathsEqual("https://www.jedit.org","c:/test.txt")); - } - - @Test - public void escapesToChars() - { - assertEquals("bl\\a\t\tbo\t\n\naa\t\n\tff", MiscUtilities.escapesToChars("bl\\\\a\\t\\tbo\\t\\n\\naa\\t\\n\\tff")); - } - - @Test - public void getLongestPrefix() - { - assertEquals("blabla", MiscUtilities.getLongestPrefix(List.of("blabla", "blabladsf", "blaBladsfdddd"), true)); - } - - @Test - public void getLongestPrefix2() - { - assertEquals("bla", MiscUtilities.getLongestPrefix(List.of("blabla", "blabladsf", "blaBladsfdddd"), false)); - } - - @Test - public void getLongestPrefix3() - { - assertEquals("blabla", MiscUtilities.getLongestPrefix(new String[]{"blabla", "blabladsf", "blaBladsfdddd"}, true)); - } - - @Test - public void buildToVersion() - { - assertEquals("5.6pre1", MiscUtilities.buildToVersion("05.06.01.00")); - } - - @Test - public void isToolsJarAvailable() - { - assertTrue(MiscUtilities.isToolsJarAvailable()); - } - - private static int getOS() throws IllegalAccessException, NoSuchFieldException - { - Field os = OperatingSystem.class.getDeclaredField("os"); - os.setAccessible(true); - int oldValue = os.getInt(OperatingSystem.class); - return oldValue; - } - - private static int updateOS(int newValue) throws IllegalAccessException, NoSuchFieldException - { - Field os = OperatingSystem.class.getDeclaredField("os"); - os.setAccessible(true); - int oldValue = os.getInt(OperatingSystem.class); - os.set(OperatingSystem.class, newValue); - return oldValue; - } -} \ No newline at end of file diff --git a/test/org/gjt/sp/jedit/ModeTest.java b/test/org/gjt/sp/jedit/ModeTest.groovy similarity index 55% rename from test/org/gjt/sp/jedit/ModeTest.java rename to test/org/gjt/sp/jedit/ModeTest.groovy index 4cca0e6bf..a1595b671 100644 --- a/test/org/gjt/sp/jedit/ModeTest.java +++ b/test/org/gjt/sp/jedit/ModeTest.groovy @@ -1,9 +1,9 @@ /* * jEdit - Programmer's Text Editor - * :tabSize=8:indentSize=8:noTabs=false: + * :tabSize=4:indentSize=4:noTabs=false: * :folding=explicit:collapseFolds=1: * - * Copyright © 2024 jEdit contributors + * Copyright © 2025 jEdit contributors * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -19,28 +19,18 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -package org.gjt.sp.jedit; +package org.gjt.sp.jedit -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.junit.MockitoJUnitRunner; +import spock.lang.Specification -import static org.junit.Assert.*; +class ModeTest extends Specification { + def 'acceptFile should properly consider regular expression alternatives in filename globs'() { + given: + def mode = new Mode('shellscript') + mode.setProperty('filenameGlob', /(re)(.+\.sh)|PKGBUILD/) + mode.init() -@RunWith(MockitoJUnitRunner.class) -public class ModeTest -{ - - /** - * verify that a re filenameGlob consisting in an alternative without enclosing brackets - * works in Mode.acceptFile() - */ - @Test - public void acceptFileREAlternatives() - { - Mode m = new Mode("shellscript"); - m.setProperty("filenameGlob", "(re)(.+\\.sh)|PKGBUILD"); - m.init(); - assertTrue(m.acceptFile("/tmp/PKGBUILD", "")); + expect: + mode.acceptFile('/tmp/PKGBUILD', '') } -} \ No newline at end of file +} diff --git a/test/org/gjt/sp/jedit/TextUtilitiesTest.java b/test/org/gjt/sp/jedit/TextUtilitiesTest.groovy similarity index 59% copy from test/org/gjt/sp/jedit/TextUtilitiesTest.java copy to test/org/gjt/sp/jedit/TextUtilitiesTest.groovy index 80da0d99a..0dfad31dc 100644 --- a/test/org/gjt/sp/jedit/TextUtilitiesTest.java +++ b/test/org/gjt/sp/jedit/TextUtilitiesTest.groovy @@ -1,9 +1,9 @@ /* * jEdit - Programmer's Text Editor - * :tabSize=8:indentSize=8:noTabs=false: + * :tabSize=4:indentSize=4:noTabs=false: * :folding=explicit:collapseFolds=1: * - * Copyright © 2020 jEdit contributors + * Copyright © 2025 jEdit contributors * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -19,28 +19,26 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -package org.gjt.sp.jedit; +package org.gjt.sp.jedit -import org.junit.Test; +import spock.lang.Specification -import java.util.Collections; -import java.util.List; +import static org.gjt.sp.jedit.TextUtilities.join -import static org.junit.Assert.*; +class TextUtilitiesTest extends Specification { + def 'join should properly join values together'() { + given: + def list = ['aa', 'bb', 'cc', 'dd'] -public class TextUtilitiesTest -{ - @Test - public void join() - { - List<String> list = List.of("aa", "bb", "cc", "dd"); - assertEquals("aa bb cc dd", TextUtilities.join(list, " ")); + expect: + join(list, ' ') == 'aa bb cc dd' } - @Test - public void joinEmpty() - { - List<String> list = Collections.emptyList(); - assertEquals("", TextUtilities.join(list, " ")); + def 'join on empty list should produce empty string'() { + given: + def list = [] + + expect: + join(list, ' ') == '' } -} \ No newline at end of file +} diff --git a/test/org/gjt/sp/jedit/buffer/ContentManagerTest.groovy b/test/org/gjt/sp/jedit/buffer/ContentManagerTest.groovy new file mode 100644 index 000000000..6cf5d65d0 --- /dev/null +++ b/test/org/gjt/sp/jedit/buffer/ContentManagerTest.groovy @@ -0,0 +1,111 @@ +/* + * jEdit - Programmer's Text Editor + * :tabSize=4:indentSize=4:noTabs=false: + * :folding=explicit:collapseFolds=1: + * + * Copyright © 2025 jEdit contributors + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +package org.gjt.sp.jedit.buffer + +import org.gjt.sp.util.SegmentBuffer +import org.gjt.sp.util.SegmentCharSequence +import spock.lang.Specification +import spock.lang.Subject + +import javax.swing.text.Segment + +class ContentManagerTest extends Specification { + @Subject + def contentManager = new ContentManager() + + def '_setContent should work properly'() { + given: + def input = 'Hello world\nHow are you ?' + + when: + contentManager._setContent(input.chars, input.size()) + + then: + contentManager.length == input.size() + contentManager.getText(0, contentManager.length) == input + with(contentManager.getSegment(0, contentManager.length)) { + length() == contentManager.length + "$it" == input + } + with(new Segment()) { + contentManager.getText(0, contentManager.length - 14, it) + "$it" == 'Hello world' + } + contentManager.getText(12, contentManager.length - 12) == 'How are you ?' + } + + def 'insert(String) should work properly'() { + given: + def input = 'Hello world\nHow are you ?' + + when: + contentManager.insert(0, input) + + then: + contentManager.length == input.length() + contentManager.getText(0, contentManager.length) == input + with(contentManager.getSegment(0, contentManager.length)) { + length() == contentManager.length + "$it" == input + } + contentManager.getText(12, contentManager.length - 12) == 'How are you ?' + } + + def 'insert(Segment) should work properly'() { + given: + def input = 'Hello world\nHow are you ?' + def segmentBuffer = new SegmentBuffer(10) + segmentBuffer.append(input.chars, 0, input.size()) + + when: + contentManager.insert(0, segmentBuffer) + + then: + contentManager.length == input.size() + contentManager.getText(0, contentManager.length) == input + with(contentManager.getSegment(0, contentManager.length)) { + length() == contentManager.length + "$it" == input + } + contentManager.getText(12, contentManager.length - 12) == 'How are you ?' + } + + def 'insert(SegmentCharSequence) should work properly'() { + given: + def segmentBuffer = new SegmentBuffer(10) + def input = 'Hello world\nHow are you ?' + segmentBuffer.append(input.chars, 0, input.size()) + def segmentCharSequence = new SegmentCharSequence(segmentBuffer) + + when: + contentManager.insert(0, segmentCharSequence) + + then: + contentManager.length == input.size() + contentManager.getText(0, contentManager.length) == input + with(contentManager.getSegment(0, contentManager.length)) { + length() == contentManager.length + "$it" == input + } + contentManager.getText(12, contentManager.length - 12) == 'How are you ?' + } +} diff --git a/test/org/gjt/sp/jedit/buffer/ContentManagerTest.java b/test/org/gjt/sp/jedit/buffer/ContentManagerTest.java deleted file mode 100644 index 2dc5f86a8..000000000 --- a/test/org/gjt/sp/jedit/buffer/ContentManagerTest.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * jEdit - Programmer's Text Editor - * :tabSize=8:indentSize=8:noTabs=false: - * :folding=explicit:collapseFolds=1: - * - * Copyright © 2020 jEdit contributors - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or any later version. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -package org.gjt.sp.jedit.buffer; - -import org.gjt.sp.util.SegmentBuffer; -import org.gjt.sp.util.SegmentCharSequence; -import org.junit.Before; -import org.junit.Test; - -import javax.swing.text.Segment; - -import static org.junit.Assert.*; - -public class ContentManagerTest -{ - private ContentManager contentManager; - - @Before - public void setUp() throws Exception - { - contentManager = new ContentManager(); - } - - @Test - public void setContent() - { - String input = "Hello world\nHow are you ?"; - contentManager._setContent(input.toCharArray(), input.length()); - assertEquals(input.length(), contentManager.getLength()); - assertEquals(input, contentManager.getText(0, contentManager.getLength())); - CharSequence segment = contentManager.getSegment(0, contentManager.getLength()); - assertEquals(contentManager.getLength(), segment.length()); - assertEquals(input, segment.toString()); - Segment segment2 = new Segment(); - contentManager.getText(0, contentManager.getLength() - 14, segment2); - assertEquals("Hello world", segment2.toString()); - assertEquals("How are you ?", contentManager.getText(12, contentManager.getLength() - 12)); - } - - @Test - public void insertString() - { - String input = "Hello world\nHow are you ?"; - contentManager.insert(0, input); - assertEquals(input.length(), contentManager.getLength()); - assertEquals(input, contentManager.getText(0, contentManager.getLength())); - CharSequence segment = contentManager.getSegment(0, contentManager.getLength()); - assertEquals(contentManager.getLength(), segment.length()); - assertEquals(input, segment.toString()); - assertEquals("How are you ?", contentManager.getText(12, contentManager.getLength() - 12)); - } - - @Test - public void insertSegment() - { - SegmentBuffer segmentBuffer = new SegmentBuffer(10); - String input = "Hello world\nHow are you ?"; - segmentBuffer.append(input.toCharArray(), 0, input.length()); - contentManager.insert(0, segmentBuffer); - assertEquals(input.length(), contentManager.getLength()); - assertEquals(input, contentManager.getText(0, contentManager.getLength())); - CharSequence segment = contentManager.getSegment(0, contentManager.getLength()); - assertEquals(contentManager.getLength(), segment.length()); - assertEquals(input, segment.toString()); - assertEquals("How are you ?", contentManager.getText(12, contentManager.getLength() - 12)); - } - - @Test - public void insertSegmentCharSequence() - { - SegmentBuffer segmentBuffer = new SegmentBuffer(10); - String input = "Hello world\nHow are you ?"; - segmentBuffer.append(input.toCharArray(), 0, input.length()); - SegmentCharSequence segmentCharSequence = new SegmentCharSequence(segmentBuffer); - contentManager.insert(0, segmentCharSequence); - assertEquals(input.length(), contentManager.getLength()); - assertEquals(input, contentManager.getText(0, contentManager.getLength())); - CharSequence segment = contentManager.getSegment(0, contentManager.getLength()); - assertEquals(contentManager.getLength(), segment.length()); - assertEquals(input, segment.toString()); - assertEquals("How are you ?", contentManager.getText(12, contentManager.getLength() - 12)); - } -} \ No newline at end of file diff --git a/test/org/gjt/sp/util/IntegerArrayTest.java b/test/org/gjt/sp/jedit/syntax/SyntaxUtilitiesTest.groovy similarity index 51% rename from test/org/gjt/sp/util/IntegerArrayTest.java rename to test/org/gjt/sp/jedit/syntax/SyntaxUtilitiesTest.groovy index 45bf50612..b0b5fac3a 100644 --- a/test/org/gjt/sp/util/IntegerArrayTest.java +++ b/test/org/gjt/sp/jedit/syntax/SyntaxUtilitiesTest.groovy @@ -1,9 +1,9 @@ /* * jEdit - Programmer's Text Editor - * :tabSize=8:indentSize=8:noTabs=false: + * :tabSize=4:indentSize=4:noTabs=false: * :folding=explicit:collapseFolds=1: * - * Copyright © 2020 jEdit contributors + * Copyright © 2025 jEdit contributors * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -19,49 +19,34 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -package org.gjt.sp.util; +package org.gjt.sp.jedit.syntax -import org.junit.Before; -import org.junit.Test; +import spock.lang.Specification -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import javax.swing.text.Segment -public class IntegerArrayTest -{ - private IntegerArray empty; - private IntegerArray small; +import static org.gjt.sp.jedit.syntax.SyntaxUtilities.regionMatches - @Before - public void setUp() throws Exception - { - empty = new IntegerArray(0); - small = new IntegerArray(10); - } +class SyntaxUtilitiesTest extends Specification { + def src = 'Hello world' - @Test - public void get() - { - small.add(33); - assertEquals(33, small.get(0)); + def segment = new Segment().tap { + array = src.chars + count = src.size() } - @Test - public void getEmpty() - { - empty.add(33); - assertEquals(33, empty.get(0)); + def 'regionMatches should return true on match'() { + expect: + regionMatches(false, segment, 6, 'world'.chars) } - @Test - public void isEmpty() - { - assertTrue(empty.isEmpty()); + def 'regionMatches should return false on no match'() { + expect: + !regionMatches(false, segment, 6, 'worlD'.chars) } - @Test - public void isEmpty2() - { - assertTrue(small.isEmpty()); + def 'regionMatches should ignore case if told so'() { + expect: + regionMatches(true, segment, 6, 'worlD'.chars) } -} \ No newline at end of file +} diff --git a/test/org/gjt/sp/jedit/syntax/SyntaxUtilitiesTest.java b/test/org/gjt/sp/jedit/syntax/SyntaxUtilitiesTest.java deleted file mode 100644 index 54b9be0f9..000000000 --- a/test/org/gjt/sp/jedit/syntax/SyntaxUtilitiesTest.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * jEdit - Programmer's Text Editor - * :tabSize=8:indentSize=8:noTabs=false: - * :folding=explicit:collapseFolds=1: - * - * Copyright © 2020 jEdit contributors - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or any later version. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warra... [truncated message content] |
From: vampire0 <vam...@us...> - 2025-04-08 23:05:44
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "jEdit core". The branch, master has been updated via 01c732d64823f7e70e5bcc3fcb3f7ea6b7207bb8 (commit) via f90aa5ae8569de399c515332a1c9ba4fabfff230 (commit) via a6c2d768009a4900981da51203451d01d44cf33a (commit) via 74944041504cb27c50b4a20a43197e9d5020f25a (commit) via ae921958a37a449784927572d36fcdfb5707fc13 (commit) via c97ae42442d3a3d029eef2f2484ddc65e07228a0 (commit) via 8681fcc3c202941f9a0eee3284e4b48cbec18fad (commit) via 2ea6546fba6c8c69d46c343aea55834e3456cd8e (commit) via 4e4019292de66fd7b21aad35200af5662e8554b3 (commit) via 1a610ef0ce3c330924e8a03035eb063e7ac7b9ae (commit) via f0db4d6ff6ba078e2ecfcd52964becaa905af776 (commit) via 3dd2bd6df734ad819ea4de1cb56616c698b4e420 (commit) via e73d8bfd46e7d0dba2371c1bad82a89a7aa12ba9 (commit) via 56c114e62466fab661da48df7e4cfdc0447badc5 (commit) via 017ec7539642815f0c6bce0bec490d0c54546e77 (commit) via be1f3b17bb2227e9f03d9a011d4c07d53a72b0c1 (commit) via 81f45c471074fffbfddfc938920a520e597f2a4d (commit) via 0bb7354c0e0fb4431362d3675c9f816bde13b528 (commit) via 8a3a08cbfe0e07089fe98c4271e90094c0f99f86 (commit) via ead082106f91fe8001a4603601a314cb6c7cde99 (commit) via 8ffb88ae8d33fb11d8c8d62134072ca6eb8219d3 (commit) via c3bbc112c4ae94ab5545867b491ba321e26d2c1f (commit) via d0a5940c7734893042f35147d4803b082970699c (commit) via 914ecf230017c5643fe01af4e0ed135f0b83fa5e (commit) via eb06fbf6e04eb7b17a4c1e8c21dd7fa1966537da (commit) via c03bd7f906605b5b04b7e24d6ddbda469fb9d3d6 (commit) via a9f91f99f22d69e07a0634b75891920d978910f2 (commit) via c1da40a90c3cef359de4adc8f0687a9f54d4cee8 (commit) via a825f547870d7cf91e0cd551991ef6164d147367 (commit) via 35b8392c2bbb6f6c190f92f851fa09e8e014c2e8 (commit) via 2d166de5cab01ce622f09811d5f76178ec5b2be4 (commit) via ec6abdaf8a7b2272b54139f905f900a4cae1e94f (commit) from e6f81220794a325f7c23f4e346574a32e1d42611 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit: https://sourceforge.net/p/jedit/jEdit/ci/01c732d64823f7e70e5bcc3fcb3f7ea6b7207bb8/ tree: https://sourceforge.net/p/jedit/jEdit/ci/01c732d64823f7e70e5bcc3fcb3f7ea6b7207bb8/tree/ commit 01c732d64823f7e70e5bcc3fcb3f7ea6b7207bb8 Author: Björn Kautler <Bj...@Ka...> Date: Wed Apr 9 01:04:01 2025 +0200 Properly set the normative doctype in the doc files diff --git a/doc/FAQ/faq-contrib.xml b/doc/FAQ/faq-contrib.xml index a6c5d74f7..b71bb8473 100644 --- a/doc/FAQ/faq-contrib.xml +++ b/doc/FAQ/faq-contrib.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> <appendix id="appendix"> <title>Contributors</title> <!-- jEdit buffer-local properties: --> diff --git a/doc/FAQ/faq-general.xml b/doc/FAQ/faq-general.xml index 5b5d98565..46bb30c3e 100644 --- a/doc/FAQ/faq-general.xml +++ b/doc/FAQ/faq-general.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> <section id="general"> <title>General Questions</title> <!-- jEdit buffer-local properties: --> diff --git a/doc/FAQ/faq-install.xml b/doc/FAQ/faq-install.xml index 7a88f7729..04bdf690e 100644 --- a/doc/FAQ/faq-install.xml +++ b/doc/FAQ/faq-install.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> <section id="installation"> <title>Installation Questions</title> <!-- jEdit buffer-local properties: --> diff --git a/doc/FAQ/faq-intro.xml b/doc/FAQ/faq-intro.xml index dfb99e455..3e272312c 100644 --- a/doc/FAQ/faq-intro.xml +++ b/doc/FAQ/faq-intro.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> <section id="intro"> <title>Introduction</title> <!-- jEdit buffer-local properties: --> @@ -22,4 +23,4 @@ <para>Each section of this document deals with a different category of topics, and each begins with a listing of the questions covered. This should allow you to find the information you are seeking quickly.</para> -</section> \ No newline at end of file +</section> diff --git a/doc/FAQ/faq-macros.xml b/doc/FAQ/faq-macros.xml index c155df642..54355e013 100644 --- a/doc/FAQ/faq-macros.xml +++ b/doc/FAQ/faq-macros.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> <section id="macros"> <title>Macros</title> <!-- jEdit buffer-local properties: --> @@ -124,4 +125,4 @@ </qandaentry> </qandadiv> </qandaset> -</section> \ No newline at end of file +</section> diff --git a/doc/FAQ/faq-plugins.xml b/doc/FAQ/faq-plugins.xml index 892ee8627..5ff54cd33 100644 --- a/doc/FAQ/faq-plugins.xml +++ b/doc/FAQ/faq-plugins.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> <section id="plugins"> <title>Plugin Questions</title> <!-- jEdit buffer-local properties: --> @@ -180,4 +181,4 @@ </qandaentry> </qandadiv> </qandaset> -</section> \ No newline at end of file +</section> diff --git a/doc/FAQ/faq-problems.xml b/doc/FAQ/faq-problems.xml index 66d9a9363..e993dbf1b 100644 --- a/doc/FAQ/faq-problems.xml +++ b/doc/FAQ/faq-problems.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> <section id="problems"> <title>Problems</title> <!-- jEdit buffer-local properties: --> diff --git a/doc/FAQ/faq-use.xml b/doc/FAQ/faq-use.xml index 209188d89..acadb4c60 100644 --- a/doc/FAQ/faq-use.xml +++ b/doc/FAQ/faq-use.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> <section id="usage"> <title>Usage Questions</title> diff --git a/doc/FAQ/faq.xml b/doc/FAQ/faq.xml index 0e52624b9..f4e9534c1 100644 --- a/doc/FAQ/faq.xml +++ b/doc/FAQ/faq.xml @@ -1,12 +1,12 @@ <?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> <!-- jEdit buffer-local properties: --> <!-- :indentSize=2 --> <!-- jEdit FAQ --> <!-- Command line for processing: --> <!-- --> <!-- xsltproc -xinclude -output .\html\ faq.xsl faq.xml --> -<article class="faq" id="faq" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xi="http://www.w3.org/2001/XInclude" xsi:noNamespaceSchemaLocation="https://www.docbook.org/xsd/4.4/docbook.xsd"> +<article class="faq" id="faq" xmlns:xi="http://www.w3.org/2001/XInclude"> <articleinfo> <author> @@ -106,4 +106,4 @@ <xi:include href="faq-plugins.xml" /> <xi:include href="faq-problems.xml" /> <xi:include href="faq-contrib.xml" /> -</article> \ No newline at end of file +</article> diff --git a/doc/users-guide/activity-log.xml b/doc/users-guide/activity-log.xml index 28144e2e3..7825e00e0 100644 --- a/doc/users-guide/activity-log.xml +++ b/doc/users-guide/activity-log.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> - +<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> <appendix id="activity-log"> <!-- jEdit buffer-local properties: --> <!-- :indentSize=2:noTabs=true: --> @@ -55,7 +55,7 @@ The <guibutton>Settings</guibutton> button in the Activity Log window shows a dialog that lets you adjust the output colors, filter the messages by type, and lets you set - the maximum number of lines to display. Note that larger numbers will + the maximum number of lines to display. Note that larger numbers will decrease the overall performance of jEdit since these lines are kept in memory. </para> @@ -65,7 +65,7 @@ It allows for catching problems right after they show up. Each error message entry is accompanied by a system beep. Lower priority entries may be alerted this way, if the - <userinput>log</userinput> option is used, + <userinput>log</userinput> option is used, see <xref linkend="cli-usage" />. </para> -</appendix> \ No newline at end of file +</appendix> diff --git a/doc/users-guide/basics.xml b/doc/users-guide/basics.xml index dd43c2316..7f4f5d42d 100644 --- a/doc/users-guide/basics.xml +++ b/doc/users-guide/basics.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> <chapter id="basics"> <title>jEdit Basics</title> <!-- jEdit buffer-local properties: --> diff --git a/doc/users-guide/bsh-commands.xml b/doc/users-guide/bsh-commands.xml index fd2320da9..5c75602d9 100644 --- a/doc/users-guide/bsh-commands.xml +++ b/doc/users-guide/bsh-commands.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> <chapter id="bsh-commands"> <!-- jEdit buffer local properties: :indentSize=2:noTabs=yes:maxLineLen=90:tabSize=2: @@ -715,4 +716,4 @@ crufties.counter = 5; </listitem> </itemizedlist> </section> -</chapter> \ No newline at end of file +</chapter> diff --git a/doc/users-guide/conventions.xml b/doc/users-guide/conventions.xml index c7d3b120a..a24348198 100644 --- a/doc/users-guide/conventions.xml +++ b/doc/users-guide/conventions.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> <chapter id="conventions"> <title>Conventions</title> <!-- jEdit buffer-local properties: --> @@ -92,7 +93,7 @@ Pressing this letter in combination with the <keycap>Alt</keycap> key activates the associated user interface widget. The "F10" key can also be pressed to put - focus on the menu bar, it has the same functionality as the + focus on the menu bar, it has the same functionality as the Alt key in Windows. Note that this functionality is not available on macOS with the <quote>macOS Adaptive</quote> look and feel. See <xref linkend="appearance-pane" /> for diff --git a/doc/users-guide/customizing.xml b/doc/users-guide/customizing.xml index 865953554..16dfbe5db 100644 --- a/doc/users-guide/customizing.xml +++ b/doc/users-guide/customizing.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> <chapter id="customizing"> <title>Customizing jEdit</title> <!-- jEdit buffer-local properties: --> diff --git a/doc/users-guide/dialog-macro.xml b/doc/users-guide/dialog-macro.xml index 7e5db26bf..f85f49c1c 100644 --- a/doc/users-guide/dialog-macro.xml +++ b/doc/users-guide/dialog-macro.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> <chapter id="dialog-macro"> <title>A Dialog-Based Macro</title> <!-- jEdit 4.x Macro Guide, (C) 2001, 2002 John Gellene --> @@ -636,4 +637,4 @@ prefixSuffixDialog();</programlisting> techniques.</para> </section> </section> -</chapter> \ No newline at end of file +</chapter> diff --git a/doc/users-guide/files.xml b/doc/users-guide/files.xml index abd17fdcc..be4c2a916 100644 --- a/doc/users-guide/files.xml +++ b/doc/users-guide/files.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> <chapter id="files"> <title>Working With Files</title> diff --git a/doc/users-guide/globs.xml b/doc/users-guide/globs.xml index 0fc7c4e35..c87a1cdd4 100644 --- a/doc/users-guide/globs.xml +++ b/doc/users-guide/globs.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> <appendix id="globs"> <title>Glob Patterns</title> @@ -134,4 +135,4 @@ <para>If you need to match files that begin with the glob-translate-disable prefix <literal>(re)</literal>, you can escape it with a leading backslash and the metacharacters will be translated into globs as before.</para> -</appendix> \ No newline at end of file +</appendix> diff --git a/doc/users-guide/history.xml b/doc/users-guide/history.xml index a85a37dc5..d0b6e11ec 100644 --- a/doc/users-guide/history.xml +++ b/doc/users-guide/history.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> <appendix id="history"> <title>History Text Fields</title> <!-- jEdit buffer-local properties: --> @@ -42,4 +43,4 @@ button, although right-click will still show you the history as a context menu.</para> </note> -</appendix> \ No newline at end of file +</appendix> diff --git a/doc/users-guide/installing-modes.xml b/doc/users-guide/installing-modes.xml index 7ab902f72..14378fcff 100644 --- a/doc/users-guide/installing-modes.xml +++ b/doc/users-guide/installing-modes.xml @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> <chapter id="installing-modes"> <title>Installing Edit Modes</title> <!-- jEdit buffer-local properties: --> <!-- :indentSize=2:noTabs=true: --> <!-- :xml.root=users-guide.xml: --> - <para>The easiest way to install a new mode locally is to use the Editing + <para>The easiest way to install a new mode locally is to use the Editing dialog found under Utilities - Global Options. At the bottom of this dialog is an "Add Mode" button. Clicking this button shows a dialog to add a mode to jEdit. Simply fill in the blanks and the mode file will be put in the @@ -63,11 +64,11 @@ <listitem> <para><literal>FILE_NAME_GLOB</literal> - files whose names match this glob pattern will be opened in this edit mode. - This can also specify full paths, if the glob pattern contains a - path separator character. <literal>FILE_NAME_GLOB</literal> can be - specified in the <literal>modes/catalog</literal> file, or the mode - file itself. See the <literal>FILE_NAME_GLOB</literal> for - <literal>apacheconf.xml</literal> in <literal>modes/catalog</literal> + This can also specify full paths, if the glob pattern contains a + path separator character. <literal>FILE_NAME_GLOB</literal> can be + specified in the <literal>modes/catalog</literal> file, or the mode + file itself. See the <literal>FILE_NAME_GLOB</literal> for + <literal>apacheconf.xml</literal> in <literal>modes/catalog</literal> for an example of full path filename globbing. </para> </listitem> @@ -95,4 +96,4 @@ <listitem><para> the filename matches the <literal>FILE_NAME_GLOB</literal> </para></listitem> <listitem><para> the first line of the file matches the <literal>FIRST_LINE_GLOB</literal></para></listitem> </orderedlist> -</chapter> \ No newline at end of file +</chapter> diff --git a/doc/users-guide/launcher-guide.xml b/doc/users-guide/launcher-guide.xml index 5bc8b7cd9..a1972179e 100644 --- a/doc/users-guide/launcher-guide.xml +++ b/doc/users-guide/launcher-guide.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> <!-- :xml.root=users-guide.xml: --> <appendix id="launcher-guide"> <title>jEditLauncher for Windows</title> @@ -533,4 +534,4 @@ o.RunDiff(path + "Search.bsh", path + "Search2.bsh") source code or other materials used in the creation of jEditLauncher.</para> </section> -</appendix> \ No newline at end of file +</appendix> diff --git a/doc/users-guide/macro-basics.xml b/doc/users-guide/macro-basics.xml index e77d70ff9..0b018762f 100644 --- a/doc/users-guide/macro-basics.xml +++ b/doc/users-guide/macro-basics.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> <chapter id="macro-basics"> <title>Macro Basics</title> <!-- jEdit buffer-local properties: --> @@ -757,4 +758,4 @@ String result = df.format(d); </listitem> </itemizedlist> </section> -</chapter> \ No newline at end of file +</chapter> diff --git a/doc/users-guide/macro-index.xml b/doc/users-guide/macro-index.xml index f68f724dc..04c74f107 100644 --- a/doc/users-guide/macro-index.xml +++ b/doc/users-guide/macro-index.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> <appendix id="macro-index"> <title>Macros Included With jEdit</title> <!-- jEdit 4.0 Macro Guide, (C) 2001 John Gellene --> diff --git a/doc/users-guide/macro-tips.xml b/doc/users-guide/macro-tips.xml index b91746aae..242dd0aa4 100644 --- a/doc/users-guide/macro-tips.xml +++ b/doc/users-guide/macro-tips.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> <chapter id="macro-tips"> <title>Macro Tips and Techniques</title> <!-- jEdit buffer-local properties: --> @@ -903,4 +904,4 @@ Log.log(Log.DEBUG, BeanShell.class, "counter = " + counter); </sidebar> </section> </section> -</chapter> \ No newline at end of file +</chapter> diff --git a/doc/users-guide/plugin-implement.xml b/doc/users-guide/plugin-implement.xml index dfce63a07..836ad4308 100644 --- a/doc/users-guide/plugin-implement.xml +++ b/doc/users-guide/plugin-implement.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> <chapter id="plugin-implement"> <!-- jEdit buffer-local properties: --> <!-- :xml.root=users-guide.xml: --> @@ -1285,4 +1286,4 @@ else if(msg instanceof ViewUpdate) { <para> This section is new but will be expanded shortly. Please post suggestions to the <literal>jedit-devel</literal> mailing list. </para> </section> -</chapter> \ No newline at end of file +</chapter> diff --git a/doc/users-guide/plugin-intro.xml b/doc/users-guide/plugin-intro.xml index e9ec8a165..41c41df04 100644 --- a/doc/users-guide/plugin-intro.xml +++ b/doc/users-guide/plugin-intro.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> <chapter id="plugin-intro"> <title>Introducing the Plugin API</title> <!-- :indentSize=2:tabSize=2:noTabs=true:wrap=soft:maxLineLen=90: --> diff --git a/doc/users-guide/plugin-tips.xml b/doc/users-guide/plugin-tips.xml index eeccbf67a..23db636c1 100644 --- a/doc/users-guide/plugin-tips.xml +++ b/doc/users-guide/plugin-tips.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> <chapter id="plugin-tips"> <title>Plugin Tips and Techniques</title> <!-- jEdit buffer-local properties: --> @@ -7,26 +8,26 @@ <section id="utility-classes"> <title> Utility Classes </title> - - <para> If you need to check what the current running platform is, + + <para> If you need to check what the current running platform is, see <classname>org.gjt.sp.jedit.OperatingSystem</classname>. </para> - + <para> If you need to compare file names and don't want to - worry about whether you are on a case-sensitive file system or not, + worry about whether you are on a case-sensitive file system or not, use <function>MiscUtilities.pathsEqual()</function>. See that class for other useful path manipulation routines. </para> <para> There are other helpful classes in <package>org.gjt.sp.util</package>, such as <classname>HtmlUtilities</classname>, <classname>StandardUtilities</classname>, - <classname>IOUtilities</classname>, and <classname>Log</classname>. - In particular, the <classname>Log</classname> class is recommended - for reporting errors and also logging debug information. + <classname>IOUtilities</classname>, and <classname>Log</classname>. + In particular, the <classname>Log</classname> class is recommended + for reporting errors and also logging debug information. </para> - <para> If your plugin needs to "find a word" (using word boundaries) somewhere + <para> If your plugin needs to "find a word" (using word boundaries) somewhere in the buffer, you might want to reuse the <classname>org.gjt.sp.jedit.TextUtilities</classname> class. </para> - + </section> <section id="plugin-tips-libraries"> diff --git a/doc/users-guide/regexps.xml b/doc/users-guide/regexps.xml index 956670d5a..786c2b3d8 100644 --- a/doc/users-guide/regexps.xml +++ b/doc/users-guide/regexps.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> <appendix id="regexps"> <title>Regular Expressions</title> <!-- jEdit buffer-local properties: --> diff --git a/doc/users-guide/shortcuts.xml b/doc/users-guide/shortcuts.xml index 1a491239f..6c0288fc5 100644 --- a/doc/users-guide/shortcuts.xml +++ b/doc/users-guide/shortcuts.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> <appendix id="shortcuts"> <title>Keyboard Shortcuts</title> <!-- This is for the default jEdit keymap. Do we really need this? --> diff --git a/doc/users-guide/source-edit.xml b/doc/users-guide/source-edit.xml index 8985cf56d..e390a2201 100644 --- a/doc/users-guide/source-edit.xml +++ b/doc/users-guide/source-edit.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> <chapter id="source-edit"> <title>Editing Source Code</title> <!-- jEdit buffer-local properties: --> @@ -760,4 +761,4 @@ With text inside it. that were hidden as a result of narrowing.</para> </section> </section> -</chapter> \ No newline at end of file +</chapter> diff --git a/doc/users-guide/starting.xml b/doc/users-guide/starting.xml index f62ed1f6b..ed56b5be2 100644 --- a/doc/users-guide/starting.xml +++ b/doc/users-guide/starting.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> <chapter id="starting"> <title>Starting jEdit</title> <!-- jEdit buffer-local properties: --> diff --git a/doc/users-guide/text-edit.xml b/doc/users-guide/text-edit.xml index dfed12449..3dd98ff12 100644 --- a/doc/users-guide/text-edit.xml +++ b/doc/users-guide/text-edit.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> <chapter id="editing"> <title>Editing Text</title> <!-- jEdit buffer-local properties: @@ -1354,4 +1355,4 @@ the search bar or give it keyboard focus.</para> </section> </section> -</chapter> \ No newline at end of file +</chapter> diff --git a/doc/users-guide/updating-modes.xml b/doc/users-guide/updating-modes.xml index d305df6a4..4d7d11c85 100644 --- a/doc/users-guide/updating-modes.xml +++ b/doc/users-guide/updating-modes.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> <chapter id="updating-modes"> <title>Updating Edit Modes</title> <!-- jEdit buffer-local properties: --> diff --git a/doc/users-guide/users-guide.xml b/doc/users-guide/users-guide.xml index d9536f98d..3dec029ef 100644 --- a/doc/users-guide/users-guide.xml +++ b/doc/users-guide/users-guide.xml @@ -1,9 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> <!-- jEdit buffer-local properties: --> <!-- maxLineLen=90:wrap=soft:indentSize=2:noTabs=true: --> <!-- jEdit user's guide --> -<book id="users-guide" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xi="http://www.w3.org/2001/XInclude" xsi:noNamespaceSchemaLocation="https://www.docbook.org/xsd/4.4/docbook.xsd"> +<book id="users-guide" xmlns:xi="http://www.w3.org/2001/XInclude"> <bookinfo> <title>jEdit 5.7 User's Guide</title> @@ -142,4 +142,4 @@ <xi:include href="plugin-tips.xml" /> </part> -</book> \ No newline at end of file +</book> diff --git a/doc/users-guide/using-macros.xml b/doc/users-guide/using-macros.xml index 184e75124..b7a43fb47 100644 --- a/doc/users-guide/using-macros.xml +++ b/doc/users-guide/using-macros.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> <chapter id="using-macros"> <title>Using Macros</title> <!-- jEdit buffer-local properties: --> @@ -181,4 +182,4 @@ <guimenu>Macros</guimenu>><guimenuitem>Rescan Macros</guimenuitem> command to update the macro list.</para> </section> -</chapter> \ No newline at end of file +</chapter> diff --git a/doc/users-guide/using-plugins.xml b/doc/users-guide/using-plugins.xml index 79bfddef1..ffce07820 100644 --- a/doc/users-guide/using-plugins.xml +++ b/doc/users-guide/using-plugins.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> <chapter id="using-plugins"> <title>Installing and Using Plugins</title> <!-- jEdit buffer-local properties: --> @@ -140,4 +141,4 @@ </section> -</chapter> \ No newline at end of file +</chapter> diff --git a/doc/users-guide/writing-modes.xml b/doc/users-guide/writing-modes.xml index 71db5d941..387da5bf0 100644 --- a/doc/users-guide/writing-modes.xml +++ b/doc/users-guide/writing-modes.xml @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> <chapter id="writing-modes"> <title>Mode Definition Syntax</title> <!-- jEdit buffer-local properties: --> diff --git a/doc/whatsnew/news.xml b/doc/whatsnew/news.xml index 0a92779ee..aefe4a4c0 100644 --- a/doc/whatsnew/news.xml +++ b/doc/whatsnew/news.xml @@ -1,7 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> -<article id="whatsnewarticle" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="https://www.docbook.org/xsd/4.4/docbook.xsd"> +<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> +<article id="whatsnewarticle"> <title> What's new in jEdit 5.7 </title> <articleinfo> commit: https://sourceforge.net/p/jedit/jEdit/ci/f90aa5ae8569de399c515332a1c9ba4fabfff230/ tree: https://sourceforge.net/p/jedit/jEdit/ci/f90aa5ae8569de399c515332a1c9ba4fabfff230/tree/ commit f90aa5ae8569de399c515332a1c9ba4fabfff230 Author: Björn Kautler <Bj...@Ka...> Date: Tue Apr 8 02:57:22 2025 +0200 Correctly show "/" on *nix and properly add it to FSB history diff --git a/doc/CHANGES.txt b/doc/CHANGES.txt index 2ebd773da..11368cb8d 100644 --- a/doc/CHANGES.txt +++ b/doc/CHANGES.txt @@ -84,6 +84,9 @@ for contributing to this release. - Correct the result when using the reset button in the custom context menu option pane for the file system browser (Björn Kautler) +- Correctly show "/" on *nix and properly add it to file system browser history + (Björn Kautler) + }}} {{{ Miscellaneous diff --git a/org/gjt/sp/jedit/browser/VFSBrowser.java b/org/gjt/sp/jedit/browser/VFSBrowser.java index 67fb69b92..d64bcc050 100644 --- a/org/gjt/sp/jedit/browser/VFSBrowser.java +++ b/org/gjt/sp/jedit/browser/VFSBrowser.java @@ -1352,8 +1352,8 @@ check_selected: VFSBrowser.this.path = path; if(!pathField.getText().equals(path)) pathField.setText(path); - if(path.endsWith("/") || - path.endsWith(File.separator)) + if((path.endsWith("/") || path.endsWith(File.separator)) + && (path.length() > 1)) { // ensure consistent history; // eg we don't want both commit: https://sourceforge.net/p/jedit/jEdit/ci/a6c2d768009a4900981da51203451d01d44cf33a/ tree: https://sourceforge.net/p/jedit/jEdit/ci/a6c2d768009a4900981da51203451d01d44cf33a/tree/ commit a6c2d768009a4900981da51203451d01d44cf33a Author: Björn Kautler <Bj...@Ka...> Date: Tue Apr 8 02:57:17 2025 +0200 Restore correct value in FSB custom context menu options diff --git a/doc/CHANGES.txt b/doc/CHANGES.txt index 38c4960d5..2ebd773da 100644 --- a/doc/CHANGES.txt +++ b/doc/CHANGES.txt @@ -81,6 +81,9 @@ for contributing to this release. - Restore lost search indexing error title and message (Björn Kautler) +- Correct the result when using the reset button in the custom context menu + option pane for the file system browser (Björn Kautler) + }}} {{{ Miscellaneous @@ -134,6 +137,11 @@ for contributing to this release. - Added MiscUtilities.isUncPath to determine whether a given path is a UNC path (Björn Kautler) +- The previous AbstractContextOptionPane constructors are now deprecated; the + reset button in that class always restored the view context menu for all + subclasses, in the new constructors the property key has to be specified + (Björn Kautler) + }}} {{{ Editing diff --git a/org/gjt/sp/jedit/gui/AbstractContextOptionPane.java b/org/gjt/sp/jedit/gui/AbstractContextOptionPane.java index 27dfc42b5..fda046137 100644 --- a/org/gjt/sp/jedit/gui/AbstractContextOptionPane.java +++ b/org/gjt/sp/jedit/gui/AbstractContextOptionPane.java @@ -38,13 +38,10 @@ import org.gjt.sp.util.StandardUtilities; * * @author Slava Pestov * @author Marcelo Vanzin - * @version $Id$ * @since jEdit 4.3pre13 */ public abstract class AbstractContextOptionPane extends AbstractOptionPane { - private final ActionContext actionContext; - /** * Constructor that takes a name as an argument, for use by * subclasses. @@ -53,26 +50,62 @@ public abstract class AbstractContextOptionPane extends AbstractOptionPane * @param caption String to use as the caption of the context menu * configuration list. * @since jEdit 4.3pre13 + * @deprecated As of jEdit 5.8pre1, replaced by {@link #AbstractContextOptionPane(String, String, String)} */ + @Deprecated protected AbstractContextOptionPane(String name, String caption) { - this(name, caption, jEdit.getActionContext()); + this(name, caption, "view.context", jEdit.getActionContext()); } /** * Constructor that takes a name as an argument, for use by * subclasses. * - * @param name Name of the option pane. - * @param caption String to use as the caption of the context menu - * configuration list. - * @param actionContext the actionContext + * @param name Name of the option pane. + * @param caption String to use as the caption of the context menu + * configuration list. + * @param contextMenuKey Property key for the context menu configuration + * @since jEdit 5.8pre1 + */ + protected AbstractContextOptionPane(String name, String caption, String contextMenuKey) + { + this(name, caption, contextMenuKey, jEdit.getActionContext()); + } + + /** + * Constructor that takes a name as an argument, for use by + * subclasses. + * + * @param name Name of the option pane. + * @param caption String to use as the caption of the context menu + * configuration list. + * @param actionContext The actionContext * @since jEdit 4.5pre1 + * @deprecated As of jEdit 5.8pre1, replaced by {@link #AbstractContextOptionPane(String, String, String, ActionContext)} */ + @Deprecated protected AbstractContextOptionPane(String name, String caption, ActionContext actionContext) + { + this(name, caption, "view.context", actionContext); + } + + /** + * Constructor that takes a name as an argument, for use by + * subclasses. + * + * @param name Name of the option pane. + * @param caption String to use as the caption of the context menu + * configuration list. + * @param contextMenuKey Property key for the context menu configuration + * @param actionContext The actionContext + * @since jEdit 5.8pre1 + */ + protected AbstractContextOptionPane(String name, String caption, String contextMenuKey, ActionContext actionContext) { super(name); this.actionContext = actionContext; + this.contextMenuKey = contextMenuKey; this.caption = new JLabel(caption); } @@ -137,14 +170,25 @@ public abstract class AbstractContextOptionPane extends AbstractOptionPane * * @since jEdit 4.3pre13 */ - protected abstract String getContextMenu(); + /** + * Returns jEdit's context menu configuration. + * + * @since jEdit 4.3pre13 + */ + protected String getContextMenu() + { + return jEdit.getProperty(contextMenuKey); + } /** * Saves the context menu configuration. * * @since jEdit 4.3pre13 */ - protected abstract void saveContextMenu(String menu); + protected void saveContextMenu(String menu) + { + jEdit.setProperty(contextMenuKey, menu); + } /** * Adds a widget to the "buttons" panel at the bottom. The component @@ -187,6 +231,8 @@ public abstract class AbstractContextOptionPane extends AbstractOptionPane private JButton remove; private JButton moveUp, moveDown; private JButton reset; + private final ActionContext actionContext; + private final String contextMenuKey; private final JLabel caption; private JPanel buttons; @@ -314,10 +360,10 @@ public abstract class AbstractContextOptionPane extends AbstractOptionPane // so we need to modify the list, not the actual property // since the default value is not available, // we reset, fetch default value and re-set to original - String orgContext = jEdit.getProperty("view.context"); - jEdit.resetProperty("view.context"); - String defaultContext = jEdit.getProperty("view.context"); - jEdit.setProperty("view.context", orgContext); + String orgContext = jEdit.getProperty(contextMenuKey); + jEdit.resetProperty(contextMenuKey); + String defaultContext = jEdit.getProperty(contextMenuKey); + jEdit.setProperty(contextMenuKey, orgContext); reloadContextList(defaultContext); // reset selection if user had more buttons than default diff --git a/org/gjt/sp/jedit/options/BrowserContextOptionPane.java b/org/gjt/sp/jedit/options/BrowserContextOptionPane.java index fb08050d1..3a0e95ba6 100644 --- a/org/gjt/sp/jedit/options/BrowserContextOptionPane.java +++ b/org/gjt/sp/jedit/options/BrowserContextOptionPane.java @@ -28,36 +28,11 @@ import org.gjt.sp.jedit.jEdit; * Right-click context menu editor. * * @author Matthieu Casanova - * @version $Id$ */ public class BrowserContextOptionPane extends AbstractContextOptionPane { - public BrowserContextOptionPane() { - super("browser.custom.context", jEdit.getProperty("options.browser.context.caption")); - } - - /** - * Returns jEdit's context menu configuration. - * - * @since jEdit 4.3pre13 - */ - @Override - protected String getContextMenu() - { - return jEdit.getProperty("browser.custom.context"); + super("browser.custom.context", jEdit.getProperty("options.browser.custom.context.caption"), "browser.custom.context"); } - - /** - * Saves jEdit's context menu configuration. - * - * @since jEdit 4.3pre13 - */ - @Override - protected void saveContextMenu(String menu) - { - jEdit.setProperty("browser.custom.context", menu); - } - } diff --git a/org/gjt/sp/jedit/options/ContextOptionPane.java b/org/gjt/sp/jedit/options/ContextOptionPane.java index 0dcf3faa1..547d3debf 100644 --- a/org/gjt/sp/jedit/options/ContextOptionPane.java +++ b/org/gjt/sp/jedit/options/ContextOptionPane.java @@ -39,7 +39,7 @@ public class ContextOptionPane extends AbstractContextOptionPane public ContextOptionPane() { - super("context", jEdit.getProperty("options.context.caption")); + super("context", jEdit.getProperty("options.context.caption"), "view.context"); } @Override @@ -53,17 +53,6 @@ public class ContextOptionPane extends AbstractContextOptionPane addButton(includeOptionsLink); } - /** - * Returns jEdit's context menu configuration. - * - * @since jEdit 4.3pre13 - */ - @Override - protected String getContextMenu() - { - return jEdit.getProperty("view.context"); - } - /** * Saves jEdit's context menu configuration. * @@ -72,7 +61,7 @@ public class ContextOptionPane extends AbstractContextOptionPane @Override protected void saveContextMenu(String menu) { - jEdit.setProperty("view.context", menu); + super.saveContextMenu(menu); jEdit.setBooleanProperty( "options.context.includeOptionsLink", includeOptionsLink.isSelected()); commit: https://sourceforge.net/p/jedit/jEdit/ci/74944041504cb27c50b4a20a43197e9d5020f25a/ tree: https://sourceforge.net/p/jedit/jEdit/ci/74944041504cb27c50b4a20a43197e9d5020f25a/tree/ commit 74944041504cb27c50b4a20a43197e9d5020f25a Author: Björn Kautler <Bj...@Ka...> Date: Tue Apr 8 02:57:12 2025 +0200 Restore lost search indexing error title and message diff --git a/doc/CHANGES.txt b/doc/CHANGES.txt index a0519772e..38c4960d5 100644 --- a/doc/CHANGES.txt +++ b/doc/CHANGES.txt @@ -79,6 +79,8 @@ for contributing to this release. - Do not consider a directory with dot to have an extension in file system browser, for example when sorting by type (Björn Kautler) +- Restore lost search indexing error title and message (Björn Kautler) + }}} {{{ Miscellaneous diff --git a/org/jedit/localization/jedit_de.props b/org/jedit/localization/jedit_de.props index 8a56b9fc3..64058d8ae 100644 --- a/org/jedit/localization/jedit_de.props +++ b/org/jedit/localization/jedit_de.props @@ -2031,6 +2031,9 @@ helpviewer.toc.online-apidocs=jEdit API-Referenz (Online) helpviewer.search.label=Suche helpviewer.search.caption=Suchen nach: +helpviewer.search.error.title=Indizierungsfehler +helpviewer.search.error.message=Während des aufbauen des Hilfeindexes ist ein Fehler aufgetreten.\n\ + ({0}) helpviewer.searching=Suchen... helpviewer.no-results=Keine Ergebnisse #}}} diff --git a/org/jedit/localization/jedit_en.props b/org/jedit/localization/jedit_en.props index ec360ba9e..98d750675 100644 --- a/org/jedit/localization/jedit_en.props +++ b/org/jedit/localization/jedit_en.props @@ -2011,6 +2011,9 @@ helpviewer.toc.online-apidocs=jEdit API Reference (Online) helpviewer.search.label=Search helpviewer.search.caption=Search for: +helpviewer.search.error.title=Indexing Error +helpviewer.search.error.message=An error occurred while building the help index.\n\ + ({0}) helpviewer.searching=Searching... helpviewer.no-results=No results #}}} commit: https://sourceforge.net/p/jedit/jEdit/ci/ae921958a37a449784927572d36fcdfb5707fc13/ tree: https://sourceforge.net/p/jedit/jEdit/ci/ae921958a37a449784927572d36fcdfb5707fc13/tree/ commit ae921958a37a449784927572d36fcdfb5707fc13 Author: Björn Kautler <Bj...@Ka...> Date: Tue Apr 8 02:57:07 2025 +0200 Allow to configure additional UNC server under roots VFS diff --git a/doc/CHANGES.txt b/doc/CHANGES.txt index 67f98c632..a0519772e 100644 --- a/doc/CHANGES.txt +++ b/doc/CHANGES.txt @@ -105,6 +105,9 @@ for contributing to this release. - Show local WSL network share under roots: file system (Björn Kautler) +- Allow to configure additional UNC server to be shown under the roots: file + system in the file system browser on Windows (Björn Kautler) + }}} {{{ API Changes diff --git a/org/gjt/sp/jedit/io/FileRootsVFS.java b/org/gjt/sp/jedit/io/FileRootsVFS.java index fbff5ab1c..1bda24cd2 100644 --- a/org/gjt/sp/jedit/io/FileRootsVFS.java +++ b/org/gjt/sp/jedit/io/FileRootsVFS.java @@ -34,9 +34,11 @@ import java.util.Arrays; import java.util.HashSet; import java.util.LinkedList; import java.util.Set; +import java.util.StringTokenizer; import org.gjt.sp.jedit.MiscUtilities; import org.gjt.sp.jedit.OperatingSystem; +import org.gjt.sp.jedit.jEdit; import static org.gjt.sp.jedit.MiscUtilities.isUncPath; //}}} @@ -132,7 +134,13 @@ public class FileRootsVFS extends VFS rootsPlus.addAll(Arrays.asList(roots)); rootsPlus.addAll(Arrays.asList(fsViewRoots)); if(OperatingSystem.isWindows()) { - rootsPlus.add(new File("\\\\wsl$")); + String uncRoots = jEdit.getProperty("vfs.browser.additionalUncRoots", "\\\\wsl$"); + StringTokenizer st = new StringTokenizer(uncRoots); + while(st.hasMoreTokens()) + { + String uncRoot = st.nextToken(); + rootsPlus.add(new File(uncRoot)); + } } return rootsPlus.toArray(new File[0]); } diff --git a/org/gjt/sp/jedit/io/FileVFS.java b/org/gjt/sp/jedit/io/FileVFS.java index 54f1a456e..6af3972be 100644 --- a/org/gjt/sp/jedit/io/FileVFS.java +++ b/org/gjt/sp/jedit/io/FileVFS.java @@ -38,8 +38,13 @@ import java.lang.reflect.Method; import java.nio.file.Files; import java.text.*; import java.util.Date; +import java.util.List; +import java.util.StringTokenizer; +import java.util.concurrent.CopyOnWriteArrayList; import org.gjt.sp.jedit.*; +import org.gjt.sp.jedit.EditBus.EBHandler; +import org.gjt.sp.jedit.msg.PropertiesChanged; import org.gjt.sp.util.IOUtilities; import org.gjt.sp.util.Log; @@ -66,8 +71,30 @@ public class FileVFS extends VFS ? CASE_INSENSITIVE_CAP : 0), new String[] { EA_SIZE, EA_MODIFIED, EA_STATUS, EA_TYPE }); + + if(OperatingSystem.isWindows()) { + EditBus.addToBus(this); + updateAdditionalUncServers(null); + } } //}}} + @EBHandler + public void updateAdditionalUncServers(PropertiesChanged propertiesChanged) + { + additionalUncServers.clear(); + String uncRoots = jEdit.getProperty("vfs.browser.additionalUncRoots", "\\\\wsl$"); + StringTokenizer st = new StringTokenizer(uncRoots); + while(st.hasMoreTokens()) + { + String uncServer = st.nextToken().substring(2); + additionalUncServers.add(uncServer); + if ("wsl$".equals(uncServer)) + additionalUncServers.add("wsl.localhost"); + if ("wsl.localhost".equals(uncServer)) + additionalUncServers.add("wsl$"); + } + } + //{{{ getFileName() method @Override public String getFileName(String path) @@ -96,13 +123,14 @@ public class FileVFS extends VFS return FileRootsVFS.PROTOCOL + ':'; else if (isUncPath(path) && (MiscUtilities.getLastSeparatorIndex(path, true) == 1)) - if ((path.length() >= 5) - && (path.charAt(2) == 'w') - && (path.charAt(3) == 's') - && (path.charAt(4) == 'l')) + { + int firstSeparatorIndex = MiscUtilities.getFirstSeparatorIndex(path.substring(2)); + if ((path.length() >= 3) + && additionalUncServers.contains(path.substring(2, firstSeparatorIndex == -1 ? path.length() : firstSeparatorIndex + 2))) return FileRootsVFS.PROTOCOL + ':'; else return path; + } } return super.getParentOfPath(path); @@ -718,5 +746,6 @@ public class FileVFS extends VFS //{{{ Private members private static FileSystemView fsView; + private static final List<String> additionalUncServers = new CopyOnWriteArrayList<>(); //}}} } diff --git a/org/gjt/sp/jedit/jedit.props b/org/gjt/sp/jedit/jedit.props index 2b5a32947..eeecdbd07 100644 --- a/org/gjt/sp/jedit/jedit.props +++ b/org/gjt/sp/jedit/jedit.props @@ -494,6 +494,8 @@ vfs.browser.colors.8.glob=*.{props,properties} vfs.browser.colors.8.color=#666666 browser.custom.context= + +vfs.browser.additionalUncRoots=\\\\wsl$ #}}} #{{{ Plugin manager settings diff --git a/org/gjt/sp/jedit/jedit_gui.props b/org/gjt/sp/jedit/jedit_gui.props index 878c8b6b8..2a37bb3a2 100644 --- a/org/gjt/sp/jedit/jedit_gui.props +++ b/org/gjt/sp/jedit/jedit_gui.props @@ -800,7 +800,7 @@ options.groups=jedit browser options.group.jedit=general abbrevs appearance context docking editing \ encodings gutter large-files mouse plugin-manager firewall save-back \ shortcuts status syntax textarea toolbar view -options.group.browser=browser.general browser.colors browser.custom.context +options.group.browser=browser.general browser.colors browser.custom.context browser.additional-unc-roots #}}} #{{{ General pane @@ -929,13 +929,10 @@ view.fracFontMetrics=false #}}} #{{{ File System Browser panes -options.browser.colors.code=new BrowserColorsOptionPane(); - options.browser.general.code=new BrowserOptionPane(); -#}}} - -#{{{ Browser Context Menu +options.browser.colors.code=new BrowserColorsOptionPane(); options.browser.custom.context.code=new BrowserContextOptionPane(); +options.browser.additional-unc-roots.code=new BrowserAdditionalUncRootsOptionPane() #}}} #}}} diff --git a/org/gjt/sp/jedit/options/BrowserAdditionalUncRootsOptionPane.java b/org/gjt/sp/jedit/options/BrowserAdditionalUncRootsOptionPane.java new file mode 100644 index 000000000..a7945391b --- /dev/null +++ b/org/gjt/sp/jedit/options/BrowserAdditionalUncRootsOptionPane.java @@ -0,0 +1,257 @@ +/* + * Copyright (C) 2000, 2001 Slava Pestov + * :tabSize=4:indentSize=4:noTabs=false: + * :folding=explicit:collapseFolds=1: + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +package org.gjt.sp.jedit.options; + +//{{{ Imports +import java.awt.BorderLayout; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.StringJoiner; +import java.util.StringTokenizer; +import javax.swing.AbstractListModel; +import javax.swing.BoxLayout; +import javax.swing.JButton; +import javax.swing.JLabel; +import javax.swing.JList; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.border.EmptyBorder; + +import org.gjt.sp.jedit.AbstractOptionPane; +import org.gjt.sp.jedit.GUIUtilities; +import org.gjt.sp.jedit.gui.RolloverButton; +import org.gjt.sp.jedit.jEdit; + +import static java.awt.BorderLayout.CENTER; +import static java.awt.BorderLayout.NORTH; +import static javax.swing.Box.createGlue; +import static javax.swing.Box.createHorizontalStrut; +import static javax.swing.BoxLayout.X_AXIS; +import static javax.swing.ListSelectionModel.SINGLE_SELECTION; +import static org.gjt.sp.jedit.GUIUtilities.error; +import static org.gjt.sp.jedit.GUIUtilities.loadIcon; +import static org.gjt.sp.jedit.MiscUtilities.getLastSeparatorIndex; +import static org.gjt.sp.jedit.MiscUtilities.isUncPath; +// }}} + +/** + * Additional UNC roots editor. + * + * @author Björn Kautler + * @since jEdit 5.8pre1 + */ +public class BrowserAdditionalUncRootsOptionPane extends AbstractOptionPane +{ + //{{{ BrowserAdditionalUncRootsOptionPane constructor + public BrowserAdditionalUncRootsOptionPane() + { + super("browser.additional-unc-roots"); + caption = new JLabel(jEdit.getProperty("options.browser.additional-unc-roots.caption")); + } // }}} + + //{{{ _init method + @Override + protected void _init() + { + setLayout(new BorderLayout()); + + add(NORTH, caption); + + listData = new ArrayList<>(); + listModel = new SortedListModel(); + reloadUncRootsList(jEdit.getProperty("vfs.browser.additionalUncRoots")); + + list = new JList<>(listModel); + list.setSelectionMode(SINGLE_SELECTION); + list.addListSelectionListener(__ -> updateButtons()); + + add(CENTER, new JScrollPane(list)); + + JPanel buttons = new JPanel(); + buttons.setBorder(new EmptyBorder(3, 0, 0, 0)); + buttons.setLayout(new BoxLayout(buttons, X_AXIS)); + ActionHandler actionHandler = new ActionHandler(); + add = new RolloverButton(loadIcon(jEdit.getProperty("common.add.icon"))); + add.setToolTipText(jEdit.getProperty("common.add")); + add.addActionListener(actionHandler); + buttons.add(add); + buttons.add(createHorizontalStrut(6)); + remove = new RolloverButton(loadIcon(jEdit.getProperty("common.remove.icon"))); + remove.setToolTipText(jEdit.getProperty("common.remove")); + remove.addActionListener(actionHandler); + buttons.add(remove); + buttons.add(createGlue()); + + // add "reset to defaults" button + reset = new RolloverButton(loadIcon(jEdit.getProperty("common.clearAll.icon"))); + reset.setToolTipText(jEdit.getProperty("common.reset")); + reset.addActionListener(actionHandler); + buttons.add(reset); + + updateButtons(); + add(BorderLayout.SOUTH, buttons); + } // }}} + + //{{{ _save method + @Override + protected void _save() + { + StringJoiner joiner = new StringJoiner(" "); + for(String uncRoot : listData) + joiner.add(uncRoot); + jEdit.setProperty("vfs.browser.additionalUncRoots", joiner.toString()); + } // }}} + + //{{{ Private members + private List<String> listData; + private SortedListModel listModel; + private JList<String> list; + private JButton add; + private JButton remove; + private JButton reset; + private final JLabel caption; + // }}} + + //{{{ updateButtons method + private void updateButtons() + { + int index = list.getSelectedIndex(); + remove.setEnabled((index != -1) && !listData.isEmpty()); + } // }}} + + //{{{ reloadUncRootsList method + private void reloadUncRootsList(String uncRoots) + { + listData.clear(); + StringTokenizer st = new StringTokenizer(uncRoots); + while(st.hasMoreTokens()) + { + String uncRoot = st.nextToken(); + if(!listData.contains(uncRoot)) + listData.add(uncRoot); + } + Collections.sort(listData); + listModel.fireContentsChanged(listModel, 0, listData.size() - 1); + } // }}} + + //{{{ SortedListModel class + private class SortedListModel extends AbstractListModel<String> + { + @Override + public int getSize() + { + return listData.size(); + } + + @Override + public String getElementAt(int index) + { + return listData.get(index); + } + + @Override + protected void fireContentsChanged(Object source, int index0, int index1) + { + super.fireContentsChanged(source, index0, index1); + } + } // }}} + + //{{{ ActionHandler class + private class ActionHandler implements ActionListener + { + @Override + public void actionPerformed(ActionEvent evt) + { + Object source = evt.getSource(); + + if(source == add) + { + String userInput = GUIUtilities.input(BrowserAdditionalUncRootsOptionPane.this, "options.browser.additional-unc-roots.add.dialog", null); + while(userInput != null) + { + int lastSeparatorIndex = getLastSeparatorIndex(userInput); + if(((isUncPath(userInput) && (lastSeparatorIndex == 1)) + || (!userInput.isBlank() && (lastSeparatorIndex == -1))) + && (!userInput.contains(" "))) + { + String uncRoot = "\\\\" + userInput.substring(lastSeparatorIndex + 1); + if(!listData.contains(uncRoot)) + { + String selectedValue = list.getSelectedValue(); + listData.add(uncRoot); + Collections.sort(listData); + listModel.fireContentsChanged(listModel, 0, listData.size() - 1); + list.setSelectedValue(selectedValue, true); + } + break; + } + else + { + error(BrowserAdditionalUncRootsOptionPane.this, "options.browser.additional-unc-roots.format.error", null); + userInput = GUIUtilities.input(BrowserAdditionalUncRootsOptionPane.this, "options.browser.additional-unc-roots.add.dialog", userInput); + } + } + } + else if(source == remove) + { + int index = list.getSelectedIndex(); + listData.remove(index); + listModel.fireContentsChanged(listModel, 0, listData.size() - 1); + if(!listData.isEmpty()) + { + list.setSelectedIndex( + Math.min(listData.size() - 1, + index)); + } + updateButtons(); + } + else if(source == reset) + { + String dialogType = "options.browser.additional-unc-roots.reset.dialog"; + int result = GUIUtilities.confirm(list, dialogType, null, + JOptionPane.YES_NO_OPTION, + JOptionPane.WARNING_MESSAGE); + + if(result == JOptionPane.YES_OPTION) + { + // the user should be able to cancel the options dialog + // so we need to modify the list, not the actual property + // since the default value is not available, + // we reset, fetch default value and re-set to original + String orgUncRoots = jEdit.getProperty("vfs.browser.additionalUncRoots"); + jEdit.resetProperty("vfs.browser.additionalUncRoots"); + String defaultUncRoots = jEdit.getProperty("vfs.browser.additionalUncRoots"); + jEdit.setProperty("vfs.browser.additionalUncRoots", orgUncRoots); + reloadUncRootsList(defaultUncRoots); + + // reset selection if user had more buttons than default + list.setSelectedIndex(0); + list.ensureIndexIsVisible(0); + updateButtons(); + } + } + } + } // }}} +} diff --git a/org/jedit/localization/jedit_de.props b/org/jedit/localization/jedit_de.props index dd080b374..8a56b9fc3 100644 --- a/org/jedit/localization/jedit_de.props +++ b/org/jedit/localization/jedit_de.props @@ -1956,6 +1956,20 @@ options.browser.general.currentBufferFilter=Filter in Dateidialogen ist der Typ options.browser.general.useDefaultIcons=Standard-Icons verwenden #}}} +#{{{ Browser Additional UNC Roots +options.browser.additional-unc-roots.label=Zusätzliche UNC Server +options.browser.additional-unc-roots.caption=Zusätzliche UNC Server die im roots: Dateisystem angezeigt werden: + +options.browser.additional-unc-roots.add.dialog.title=Neuer UNC Server +options.browser.additional-unc-roots.add.dialog.message=Welcher zusätzliche UNC Server soll angezeigt werden? + +options.browser.additional-unc-roots.format.error.title=Kein UNC Server +options.browser.additional-unc-roots.format.error.message=Der eingegebene Text ist kein valider UNC Server, Beispiele sind "fileserver.company.com" oder "\\\\shares" + +options.browser.additional-unc-roots.reset.dialog.title=Zurücksetzen +options.browser.additional-unc-roots.reset.dialog.message=Sollen die zusätzlichen UNC Server wirklich auf die Standardeinträge zurückgesetzt werden? +#}}} + #{{{ Browser Context Menu options.browser.custom.context.label=Kontextmenü options.browser.custom.context.caption=Eigene Einträge im Kontextmenü des Dateisystem-Browsers: diff --git a/org/jedit/localization/jedit_en.props b/org/jedit/localization/jedit_en.props index c851752f4..ec360ba9e 100644 --- a/org/jedit/localization/jedit_en.props +++ b/org/jedit/localization/jedit_en.props @@ -1936,6 +1936,20 @@ options.browser.general.currentBufferFilter=Filter in file dialogs is \ options.browser.general.useDefaultIcons=Use default icons #}}} +#{{{ Browser Additional UNC Roots +options.browser.additional-unc-roots.label=Additional UNC Roots +options.browser.additional-unc-roots.caption=Additional UNC servers that are shown under the roots: file system: + +options.browser.additional-unc-roots.add.dialog.title=New UNC Server +options.browser.additional-unc-roots.add.dialog.message=Which additional UNC server should be shown? + +options.browser.additional-unc-roots.format.error.title=Not a UNC Server +options.browser.additional-unc-roots.format.error.message=The given input is not a valid UNC server, examples are "fileserver.company.com" or "\\\\shares" + +options.browser.additional-unc-roots.reset.dialog.title=Reset to Default +options.browser.additional-unc-roots.reset.dialog.message=Are you sure you want to reset the additional UNC roots to the installation default? +#}}} + #{{{ Browser Context Menu options.browser.custom.context.label=Context menu options.browser.custom.context.caption=Custom items in browser right click menu: diff --git a/org/jedit/options/GlobalOptionGroup.java b/org/jedit/options/GlobalOptionGroup.java index eef66ed63..a7afec456 100644 --- a/org/jedit/options/GlobalOptionGroup.java +++ b/org/jedit/options/GlobalOptionGroup.java @@ -24,6 +24,7 @@ package org.jedit.options; +import org.gjt.sp.jedit.OperatingSystem; import org.gjt.sp.jedit.OptionGroup; import org.gjt.sp.jedit.jEdit; @@ -65,13 +66,14 @@ public class GlobalOptionGroup extends OptionGroup } else if ("browser".equals(group)) { - def = "browser.general browser.colors browser.custom.context"; + def = "browser.general browser.colors browser.custom.context browser.additional-unc-roots"; } String optionPanes = jEdit.getProperty(paneList, def); String[] panes = optionPanes.split(" "); for (String pane : panes) { - optionGroup.addOptionPane(pane); + if (OperatingSystem.isWindows() || !"browser.additional-unc-roots".equals(pane)) + optionGroup.addOptionPane(pane); } addGroup(optionGroup); } commit: https://sourceforge.net/p/jedit/jEdit/ci/c97ae42442d3a3d029eef2f2484ddc65e07228a0/ tree: https://sourceforge.net/p/jedit/jEdit/ci/c97ae42442d3a3d029eef2f2484ddc65e07228a0/tree/ commit c97ae42442d3a3d029eef2f2484ddc65e07228a0 Author: Björn Kautler <Bj...@Ka...> Date: Tue Apr 8 02:57:01 2025 +0200 Correct fallback option group contents diff --git a/org/jedit/options/GlobalOptionGroup.java b/org/jedit/options/GlobalOptionGroup.java index 6069ea913..eef66ed63 100644 --- a/org... [truncated message content] |
From: vampire0 <vam...@us...> - 2025-04-01 02:40:17
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "jEdit core". The branch, master has been updated via e6f81220794a325f7c23f4e346574a32e1d42611 (commit) via 3e1f03b4dd8d47d32ac7822269317be9d6ccf934 (commit) via 2ccfedfc1908bccf45df1646b66916a19c5c0e8e (commit) from dd6ced0c71837f1facd3133dc4ef94195f37d6c3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit: https://sourceforge.net/p/jedit/jEdit/ci/e6f81220794a325f7c23f4e346574a32e1d42611/ tree: https://sourceforge.net/p/jedit/jEdit/ci/e6f81220794a325f7c23f4e346574a32e1d42611/tree/ commit e6f81220794a325f7c23f4e346574a32e1d42611 Author: Björn Kautler <Bj...@Ka...> Date: Tue Apr 1 04:36:37 2025 +0200 Deiconify from tray when necessary like when sending commands to the edit server that should show some GUI diff --git a/doc/CHANGES.txt b/doc/CHANGES.txt index 70ad326fb..3c8dcdf1a 100644 --- a/doc/CHANGES.txt +++ b/doc/CHANGES.txt @@ -51,6 +51,9 @@ for contributing to this release. - Use correct macOS name everywhere consistently (Björn Kautler) +- Deiconify from tray when necessary like when sending commands to the edit + server that should show some GUI (Björn Kautler) + }}} {{{ Miscellaneous diff --git a/org/gjt/sp/jedit/View.java b/org/gjt/sp/jedit/View.java index 074ecf6de..62c7b2ae5 100644 --- a/org/gjt/sp/jedit/View.java +++ b/org/gjt/sp/jedit/View.java @@ -1241,6 +1241,9 @@ public class View extends JFrame implements InputHandlerProvider @Override public void toFront() { + // In case we are for example hidden to tray icon + jEdit.unhideGUI(); + // Hack done to fix bringing the window to the front. if (jEdit.getBooleanProperty("server.brokenToFront")) setState(ICONIFIED); commit: https://sourceforge.net/p/jedit/jEdit/ci/3e1f03b4dd8d47d32ac7822269317be9d6ccf934/ tree: https://sourceforge.net/p/jedit/jEdit/ci/3e1f03b4dd8d47d32ac7822269317be9d6ccf934/tree/ commit 3e1f03b4dd8d47d32ac7822269317be9d6ccf934 Author: Björn Kautler <Bj...@Ka...> Date: Tue Apr 1 04:34:50 2025 +0200 Move GUI visibility handling to jEdit class diff --git a/org/gjt/sp/jedit/gui/tray/JEditSwingTrayIcon.java b/org/gjt/sp/jedit/gui/tray/JEditSwingTrayIcon.java index 301f6df04..cca90a30e 100644 --- a/org/gjt/sp/jedit/gui/tray/JEditSwingTrayIcon.java +++ b/org/gjt/sp/jedit/gui/tray/JEditSwingTrayIcon.java @@ -22,14 +22,10 @@ package org.gjt.sp.jedit.gui.tray; //{{{ Imports -import java.awt.Frame; -import java.awt.Window; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.util.ArrayList; import java.util.Collection; -import java.util.HashMap; -import java.util.Map; import javax.swing.JMenuItem; import javax.swing.JPopupMenu; @@ -84,7 +80,7 @@ public class JEditSwingTrayIcon extends JEditTrayIcon setToolTip(String.join(" | ", sl)); } } - + //{{{ setTrayIconArgs() method @Override void setTrayIconArgs(boolean restore, String userDir, String[] args) @@ -97,60 +93,15 @@ public class JEditSwingTrayIcon extends JEditTrayIcon //{{{ MyMouseAdapter class private class MyMouseAdapter extends MouseAdapter { - private final Map<Window,Boolean> windowState = new HashMap<>(); - @Override public void mouseClicked(MouseEvent e) { if (e.getButton() != MouseEvent.BUTTON1) return; if (jEdit.getViewCount() == 0) - { EditServer.handleClient(restore, true, false, userDir, args); - } else - { - boolean newVisibilityState = !jEdit.getActiveView().isVisible(); - if (newVisibilityState) - { - for (Window window : Window.getOwnerlessWindows()) - { - if (skipWindow(window)) - continue; - Boolean previousState = windowState.get(window); - if (previousState == null) - window.setVisible(true); - else if (previousState) - window.setVisible(previousState); - } - windowState.clear(); - if (jEdit.getActiveView().getState() == Frame.ICONIFIED) - jEdit.getActiveView().setState(Frame.NORMAL); - jEdit.getActiveView().toFront(); - } - else - { - for (Window window : Window.getOwnerlessWindows()) - { - if (skipWindow(window)) - continue; - windowState.put(window, window.isVisible()); - window.setVisible(false); - } - } - } + jEdit.toggleGUIVisibility(); } - - //{{{ skipWindow method - /** - * Check if a window is not top level or systray icon - * @param window the checked window - * @return true if it is not toplevel or systray icon - */ - private boolean skipWindow(Window window) - { - return window.getClass().getName().contains("Tray"); - } //}}} - } //}}} } diff --git a/org/gjt/sp/jedit/jEdit.java b/org/gjt/sp/jedit/jEdit.java index c958f6c1d..abdc16456 100644 --- a/org/gjt/sp/jedit/jEdit.java +++ b/org/gjt/sp/jedit/jEdit.java @@ -80,6 +80,7 @@ import org.gjt.sp.jedit.visitors.SaveCaretInfoVisitor; import org.gjt.sp.jedit.bufferset.BufferSetManager; import org.gjt.sp.jedit.bufferset.BufferSet; +import static java.lang.Boolean.FALSE; import static java.lang.Integer.parseInt; import static java.nio.file.StandardOpenOption.CREATE; import static java.nio.file.StandardOpenOption.WRITE; @@ -2811,6 +2812,65 @@ public class jEdit //}}} + //{{{ GUI visibility methods + + //{{{ toggleGUIVisibility() method + /** + * Iconify to tray + */ + public static void toggleGUIVisibility() + { + if(getActiveView().isVisible()) + hideGUI(); + else + unhideGUI(); + } //}}} + + //{{{ hideGUI() method + public static void hideGUI() + { + if(!getActiveView().isVisible()) + return; + for (Window window : Window.getOwnerlessWindows()) + { + if (skipWindowHiding(window)) + continue; + windowState.put(window, window.isVisible()); + window.setVisible(false); + } + } //}}} + + //{{{ unhideGUI() method + public static void unhideGUI() + { + if(getActiveView().isVisible()) + return; + for (Window window : Window.getOwnerlessWindows()) + { + if (skipWindowHiding(window)) + continue; + Boolean previousState = windowState.get(window); + if (!FALSE.equals(previousState)) + window.setVisible(true); + } + windowState.clear(); + jEdit.getActiveView().toFront(); + } //}}} + + //{{{ skipWindowHiding method + /** + * Check if a window should be hidden. + * + * @param window the window to check + * @return true if the window should be hidden + */ + private static boolean skipWindowHiding(Window window) + { + return window.getClass().getName().contains("Tray"); + } //}}} + + //}}} + //{{{ Miscellaneous methods //{{{ relocateSettings() method @@ -3334,6 +3394,7 @@ public class jEdit private static BufferSetManager bufferSetManager; private static BufferManagerImpl bufferManager = new BufferManagerImpl(); + private static final Map<Window,Boolean> windowState = new HashMap<>(); private static ViewManagerImpl viewManager = new ViewManagerImpl(); private static EditPaneManager editPaneManager = new EditPaneManagerImpl(viewManager); public static SystemManager systemManager = new SystemManager(); commit: https://sourceforge.net/p/jedit/jEdit/ci/2ccfedfc1908bccf45df1646b66916a19c5c0e8e/ tree: https://sourceforge.net/p/jedit/jEdit/ci/2ccfedfc1908bccf45df1646b66916a19c5c0e8e/tree/ commit 2ccfedfc1908bccf45df1646b66916a19c5c0e8e Author: Björn Kautler <Bj...@Ka...> Date: Tue Apr 1 04:33:27 2025 +0200 Move View.toFront hacks to View class so that all calls benefit diff --git a/org/gjt/sp/jedit/EditServer.java b/org/gjt/sp/jedit/EditServer.java index 288d08f96..e277a8cf6 100644 --- a/org/gjt/sp/jedit/EditServer.java +++ b/org/gjt/sp/jedit/EditServer.java @@ -253,26 +253,8 @@ public class EditServer extends Thread { // no background mode, and reusing existing view View view = jEdit.getActiveView(); - Buffer buffer = jEdit.openFiles(view,parent,args); - - // Hack done to fix bringing the window to the front. - // At least on windows, Frame.toFront() doesn't cut it. - // Remove the isWindows check if it's broken under other - // OSes too. - if (jEdit.getBooleanProperty("server.brokenToFront")) - view.setState(java.awt.Frame.ICONIFIED); - - // un-iconify using JDK 1.3 API - view.setState(java.awt.Frame.NORMAL); - view.requestFocus(); view.toFront(); - // In some platforms (e.g. Windows), only setAlwaysOnTop works - if (! view.isAlwaysOnTop()) - { - view.setAlwaysOnTop(true); - view.setAlwaysOnTop(false); - } return buffer; } } //}}} diff --git a/org/gjt/sp/jedit/View.java b/org/gjt/sp/jedit/View.java index 1d7bea5f6..074ecf6de 100644 --- a/org/gjt/sp/jedit/View.java +++ b/org/gjt/sp/jedit/View.java @@ -1237,6 +1237,26 @@ public class View extends JFrame implements InputHandlerProvider this.waitSocket = waitSocket; } //}}} + //{{{ toFront() method + @Override + public void toFront() + { + // Hack done to fix bringing the window to the front. + if (jEdit.getBooleanProperty("server.brokenToFront")) + setState(ICONIFIED); + + // un-iconify using JDK 1.3 API + setState(NORMAL); + requestFocus(); + super.toFront(); + // In some platforms (e.g. Windows), only setAlwaysOnTop works + if (!isAlwaysOnTop()) + { + setAlwaysOnTop(true); + setAlwaysOnTop(false); + } + } //}}} + //{{{ toString() method @Override public String toString() ----------------------------------------------------------------------- Summary of changes: doc/CHANGES.txt | 3 ++ org/gjt/sp/jedit/EditServer.java | 18 ------- org/gjt/sp/jedit/View.java | 23 +++++++++ org/gjt/sp/jedit/gui/tray/JEditSwingTrayIcon.java | 53 +------------------- org/gjt/sp/jedit/jEdit.java | 61 +++++++++++++++++++++++ 5 files changed, 89 insertions(+), 69 deletions(-) hooks/post-receive -- jEdit core |
From: vampire0 <vam...@us...> - 2025-04-01 01:24:51
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "jEdit core". The branch, master has been updated via dd6ced0c71837f1facd3133dc4ef94195f37d6c3 (commit) via c47795ae32555d6374b722fa47264ffe8371d88f (commit) via 158bb9e0613c6480af5ed7c8c09627f949927aa8 (commit) via f81bb86be51622bf06f5d3612039c13e60031872 (commit) from 70840836eb6a3dffa42ef2fea7091f5cc8e5b922 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit: https://sourceforge.net/p/jedit/jEdit/ci/dd6ced0c71837f1facd3133dc4ef94195f37d6c3/ tree: https://sourceforge.net/p/jedit/jEdit/ci/dd6ced0c71837f1facd3133dc4ef94195f37d6c3/tree/ commit dd6ced0c71837f1facd3133dc4ef94195f37d6c3 Author: Björn Kautler <Bj...@Ka...> Date: Tue Apr 1 03:23:47 2025 +0200 Use HTTPS to download mirror list, plugin list, and plugins (#4043) diff --git a/doc/CHANGES.txt b/doc/CHANGES.txt index edad4a440..70ad326fb 100644 --- a/doc/CHANGES.txt +++ b/doc/CHANGES.txt @@ -60,6 +60,9 @@ for contributing to this release. - Prevent multiple jEdit instances using the same settings directory using a file lock (Björn Kautler) +- Use HTTPS to download mirror list, plugin list, and plugins + (#4043 - Björn Kautler) + }}} {{{ API Changes diff --git a/org/gjt/sp/jedit/jedit_gui.props b/org/gjt/sp/jedit/jedit_gui.props index e2f611bf2..878c8b6b8 100644 --- a/org/gjt/sp/jedit/jedit_gui.props +++ b/org/gjt/sp/jedit/jedit_gui.props @@ -1003,8 +1003,8 @@ vfs.browser.open-in=vfs.browser.open-view \ #}}} #{{{ Plugin manager -plugin-manager.export-url=http://plugins.jedit.org/export/gzip_plugin_manager.php -plugin-manager.mirror-url=http://plugins.jedit.org/export/mirror_list.php +plugin-manager.export-url=https://plugins.jedit.org/export/gzip_plugin_manager.php +plugin-manager.mirror-url=https://plugins.jedit.org/export/mirror_list.php #{{{ Plugin management manage-plugins.restore.icon=22x22/actions/document-open.png diff --git a/org/gjt/sp/jedit/pluginmgr/Roster.java b/org/gjt/sp/jedit/pluginmgr/Roster.java index 4b43f743f..e7104b2a9 100644 --- a/org/gjt/sp/jedit/pluginmgr/Roster.java +++ b/org/gjt/sp/jedit/pluginmgr/Roster.java @@ -447,9 +447,9 @@ class Roster { try { - String host = jEdit.getProperty("plugin-manager.mirror.id"); - if (host == null || host.equals(MirrorList.Mirror.NONE)) - host = "default"; + String mirror = jEdit.getProperty("plugin-manager.mirror.id"); + if (mirror == null || mirror.equals(MirrorList.Mirror.NONE)) + mirror = "default"; // follow HTTP redirects boolean finalUrlFound = false; @@ -465,7 +465,7 @@ class Roster int responseCode = httpConn.getResponseCode(); String locationHeader = httpConn.getHeaderField("Location"); if ((responseCode >= 300) && (responseCode < 400) && (locationHeader != null)) - finalUrl = locationHeader.replaceFirst("^https:", "http:"); + finalUrl = locationHeader; else finalUrlFound = true; } @@ -475,8 +475,8 @@ class Roster String path = MiscUtilities.constructPath(getDownloadDir(),fileName); Matcher hostMatcher = HOST_REGEX.matcher(finalUrl); if (hostMatcher.find()) - host = hostMatcher.group(); - String progressMessage = jEdit.getProperty("plugin-manager.progress", new String[]{fileName, host}); + mirror = hostMatcher.group(); + String progressMessage = jEdit.getProperty("plugin-manager.progress", new String[]{fileName, mirror}); progress.setStatus(progressMessage); try (InputStream in = conn.getInputStream(); FileOutputStream out = new FileOutputStream(path)) commit: https://sourceforge.net/p/jedit/jEdit/ci/c47795ae32555d6374b722fa47264ffe8371d88f/ tree: https://sourceforge.net/p/jedit/jEdit/ci/c47795ae32555d6374b722fa47264ffe8371d88f/tree/ commit c47795ae32555d6374b722fa47264ffe8371d88f Author: Björn Kautler <Bj...@Ka...> Date: Tue Apr 1 02:08:06 2025 +0200 Use correct macOS name everywhere consistently diff --git a/README.SRC.txt b/README.SRC.txt index ebaebb8b6..62825eeae 100644 --- a/README.SRC.txt +++ b/README.SRC.txt @@ -29,17 +29,17 @@ General jEdit documentation can be found in the 'doc' directory. <https://adoptium.net/de/temurin/releases/?version=11> or from your package manager - e.g. openjdk-11-jdk. - For building the windows installer (for the final step): + For building the Windows installer (for the final step): - Inno Setup 6.0.0 or newer. Get it from <https://www.jrsoftware.org/isdl.php> - A box running windows or wine, e.g. on *nix. If Inno Setup should be run via wine, a wine version of at least 1.3.10 is required because of a bug in earlier wine versions. - For building the OS X disk image (DMG) for easy distribution + For building the macOS disk image (DMG) for easy distribution (for the final step): - - A box running OS X + - A box running macOS * Tasks @@ -49,7 +49,7 @@ General jEdit documentation can be found in the 'doc' directory. - retrieve retrieve the dependencies retrieves almost all dependencies needed for building jEdit, only InnoSetup for the - windows installer and wine, if InnoSetup should be run on *nix or OS X, have to + windows installer and wine, if InnoSetup should be run on *nix or macOS, have to be installed and configured in build.properties manually. - build build the jEdit JAR-file with full debug-information @@ -86,7 +86,7 @@ General jEdit documentation can be found in the 'doc' directory. in the build-folder, configured in build.properties. - dist build all distribution files - builds all distribution files or prepares the final step for some of them (Win and Mac) + builds all distribution files or prepares the final step for some of them (Win and macOS) in the dist-folder, configured in build.properties. - dist-deb build the DEB Package @@ -98,17 +98,17 @@ General jEdit documentation can be found in the 'doc' directory. - dist-java build the Java-installer builds the Java installer in the dist-folder, configured in build.properties. - - dist-mac build the OS X disk image (DMG-file) - builds the OS X internet-enabled disk image (DMG-file) if building on a box - running OS X. If building on a box running something else, there will be a file + - dist-mac build the macOS disk image (DMG-file) + builds the macOS internet-enabled disk image (DMG-file) if building on a box + running macOS. If building on a box running something else, there will be a file called jedit<version_here>-dist-mac-finish.tar.bz2 in the dist-folder, - configured in build.properties. Give that to someone running OS X and ask him + configured in build.properties. Give that to someone running macOS and ask him to extract the archive and to execute "ant dist-mac-finish". The only thing that needs to be installed for this final step is Apache Ant. - - dist-mac-finish finish building the OS X disk image (DMG-file) on OS X - builds the OS X internet-enabled disk image (DMG-file) in the dist-folder, - configured in build.properties if building on a box running OS X. + - dist-mac-finish finish building the macOS disk image (DMG-file) on macOS + builds the macOS internet-enabled disk image (DMG-file) in the dist-folder, + configured in build.properties if building on a box running macOS. This target is normally only run directly, if someone just has to do the final step that was prepared by "dist-mac" or "dist". @@ -186,7 +186,7 @@ java build path. The ant build process creates a subfolder called "build" for its work. Eclipse does the same and may pick the same folder. It is recommended you check/ensure that a different build -directory ("Default Ouptut Folder") for Eclipse is used. +directory ("Default Output Folder") for Eclipse is used. Some of the source directories are only needed for building packages on certain platforms. If you add jEdit source to an IDE like Eclipse that tries diff --git a/build.xml b/build.xml index 12ad74bb8..ce1e352f1 100644 --- a/build.xml +++ b/build.xml @@ -512,7 +512,7 @@ </copy> <copy todir="${jar.location}/jars"> <fileset dir="${lib.dir}/default-plugins"> - <exclude name="MacOSX.jar"/> + <exclude name="MacOS.jar"/> </fileset> </copy> <contrib:if> @@ -520,7 +520,7 @@ <contrib:then> <copy todir="${jar.location}/jars"> <fileset dir="${lib.dir}/default-plugins"> - <include name="MacOSX.jar"/> + <include name="MacOS.jar"/> </fileset> </copy> </contrib:then> @@ -598,7 +598,7 @@ osfamily="mac"/> </contrib:case> <contrib:default> - <fail message="Unsupported OS family (${osfamily}). If you are on Windows, *nix or MacOS, please report this as bug, if not, please report it as a feature request"/> + <fail message="Unsupported OS family (${osfamily}). If you are on Windows, *nix or macOS, please report this as bug, if not, please report it as a feature request"/> </contrib:default> </contrib:switch> <taskdef name="create" @@ -1018,7 +1018,7 @@ startup/** ${jar.filename}" excludes="doc/api/** - jars/MacOSX.jar"/> + jars/MacOS.jar"/> </tar> <tar destfile="${dist.dir}/jedit-windows.tar.bz2" longfile="gnu" @@ -1032,7 +1032,7 @@ compression="bzip2"> <tarfileset id="jedit-mac" dir="${dist.dir}" - includes="jars/MacOSX.jar"/> + includes="jars/MacOS.jar"/> </tar> <tar destfile="${dist.dir}/jedit-api.tar.bz2" longfile="gnu" @@ -1184,8 +1184,8 @@ <target name="dist-mac-finish" depends="init,retrieve,setup" - description="finish building the Mac OS X disk image (DMG-file) on Mac OS X"> - <fail message="The disk image (DMG-file) for easy distribution on Mac OS X can only be built on Mac OS X currently"> + description="finish building the macOS disk image (DMG-file) on macOS"> + <fail message="The disk image (DMG-file) for easy distribution on macOS can only be built on macOS currently"> <condition> <not> <os family="mac"/> @@ -1325,7 +1325,7 @@ <target name="dist-mac" depends="init,retrieve,setup,prepare-dist-files" - description="build the Mac OS X disk image (DMG-file)"> + description="build the macOS disk image (DMG-file)"> <contrib:if> <os family="mac"/> <contrib:then> @@ -1519,7 +1519,7 @@ properties/** startup/** ${jar.filename}" - excludes="jars/MacOSX.jar" + excludes="jars/MacOS.jar" username="root" group="root" prefix="usr/share/jedit-${jedit.version}/"/> @@ -1655,7 +1655,7 @@ properties/** startup/** ${jar.filename}" - excludes="jars/MacOSX.jar"/> + excludes="jars/MacOS.jar"/> </mod:calculatesize> <copy todir="${dist.dir}/classes/package-files/linux/deb" encoding="UTF-8" @@ -1717,7 +1717,7 @@ <datafileset file="." fullpath="usr/share/jEdit/jars/"/> <datafileset dir="${dist.dir}/jars" - excludes="MacOSX.jar" + excludes="MacOS.jar" prefix="usr/share/jEdit/jars/"/> <datafileset file="." fullpath="usr/share/man/"/> @@ -2055,7 +2055,7 @@ Press Return key to continue... ${config.dist.dir}/modes/** ${config.dist.dir}/properties/** ${config.dist.dir}/startup/**" - excludes="${config.dist.dir}/jars/MacOSX.jar" + excludes="${config.dist.dir}/jars/MacOS.jar" compression="bzip2"/> </contrib:else> </contrib:if> diff --git a/doc/CHANGES.txt b/doc/CHANGES.txt index b24bc9fb9..edad4a440 100644 --- a/doc/CHANGES.txt +++ b/doc/CHANGES.txt @@ -49,6 +49,8 @@ for contributing to this release. - Replace outdated URLs and use HTTPS where possible (Björn Kautler) +- Use correct macOS name everywhere consistently (Björn Kautler) + }}} {{{ Miscellaneous diff --git a/doc/FAQ/faq-general.xml b/doc/FAQ/faq-general.xml index b65948335..5b5d98565 100644 --- a/doc/FAQ/faq-general.xml +++ b/doc/FAQ/faq-general.xml @@ -18,7 +18,7 @@ <para>jEdit is a programmer's text editor written in Java, originally developed by Slava Pestov, now maintained by others. It has an easy to use interface that resembles that - of many other Windows and MacOS text editors. It is also + of many other Windows and macOS text editors. It is also highly customizable, and contains a <quote>plugin</quote> architecture that allows its features to be extended by additional programs.</para> diff --git a/doc/FAQ/faq-install.xml b/doc/FAQ/faq-install.xml index 413b1b642..7a88f7729 100644 --- a/doc/FAQ/faq-install.xml +++ b/doc/FAQ/faq-install.xml @@ -124,17 +124,17 @@ </qandadiv> <qandadiv id="install-mac"> - <title>Installing jEdit on MacOS</title> + <title>Installing jEdit on macOS</title> <qandaentry> <question id="install.mac9-basic"> - <para>How do I install jEdit on MacOS 8 or MacOS 9? s</para> + <para>How do I install jEdit on macOS 8 or macOS 9?</para> </question> <answer> <para>The latest version of jEdit requires - MacOS X (preferably 10.5 or later), because the Java - platforms of earlier MacOS version are outdated.</para> + macOS (preferably 10.5 or later), because the Java + platforms of earlier macOS version are outdated.</para> <para>Once you have completed installing jEdit locate the jedit.jar file and do the following:</para> @@ -167,16 +167,14 @@ <qandaentry> <question> - <para>How do I uninstall jEdit for Mac OS?</para> + <para>How do I uninstall jEdit for macOS?</para> </question> <answer> <para>There are no system files, so simply drop the jEdit folder in the trash. If you want to remove the settings directory used by jEdit you will find it at - <filename>~/.jedit</filename>. It is hidden, so you will - need to remove it from the command line, or use one of the - various uilities available that will let you see it.</para> + <filename>~/Library/jEdit</filename>.</para> </answer> </qandaentry> </qandadiv> diff --git a/doc/FAQ/faq-problems.xml b/doc/FAQ/faq-problems.xml index a30c13792..66d9a9363 100644 --- a/doc/FAQ/faq-problems.xml +++ b/doc/FAQ/faq-problems.xml @@ -42,7 +42,7 @@ <para>If jEdit does load using this procedure, you need to examine the <quote>shortcut</quote> loading mechanism you wish to use.</para> - <para>On Linux and MacOS X, you need to find and examine the + <para>On Linux and macOS, you need to find and examine the <filename>jedit</filename> shell script provided by the installation routine to confirm that the script's commands target the correct files and locations, and that variables @@ -71,7 +71,7 @@ settings, unsupported plugins) in your jEdit settings directory (<literal>~/.jedit</literal> on Linux, <literal>%APPDATA%\jEdit</literal> on Windows, or - <literal>~/Library/jEdit</literal> on MacOS). + <literal>~/Library/jEdit</literal> on macOS). You may want to try renaming the offending directory to something else, and restarting jEdit with fresh settings. You can later copy things from your old settings back @@ -242,7 +242,7 @@ view.unsplitCurrent(); solve. Depending on your platform, there should be information logged about what caused the crash to occur. For Unix type systems you will likely get an error in the - console (and for Mac OS X you may also get a report in + console (and for macOS you may also get a report in ~/Library/Logs/CrashReporter/JavaApplicationStub.crash.log). </para> </answer> diff --git a/doc/releasing-jedit.txt b/doc/releasing-jedit.txt index 1e781bbeb..f011b0764 100644 --- a/doc/releasing-jedit.txt +++ b/doc/releasing-jedit.txt @@ -53,11 +53,11 @@ Workflow - Release - Release.gpg [/iffinal] -6.2. If you have jedit[version]-dist-win-finish.tar.bz2 in your [tag]/dist folder you probably don't run a Windows box and don't have wine installed and set up, so please hand over this file to someone (e. g. <Björn "Vampire" Kautler> Va...@jE...) who does and ask him to unpack the file and run +6.2. If you have jedit[version]-dist-win-finish.tar.bz2 in your [tag]/dist folder you probably don't run a Windows box and don't have wine installed and set up, so please hand over this file to someone (e. g. <Björn Kautler> Va...@jE...) who does and ask him to unpack the file and run ant dist-win-finish and to hand over the resulting file jedit[version]install.exe to you. The requirements for this are described in README.SRC.txt -6.3. If you have jedit[version]-dist-mac-finish.tar.bz2 in your [tag]/dist folder you probably don't run a Mac OS X box, so please hand over this file to someone (e. g. Björn "Vampire" Kautler <Va...@jE...>) who does and ask him to unpack the file and run +6.3. If you have jedit[version]-dist-mac-finish.tar.bz2 in your [tag]/dist folder you probably don't run a macOS box, so please hand over this file to someone (e. g. Björn Kautler <Va...@jE...>) who does and ask him to unpack the file and run ant dist-mac-finish and to hand over the resulting file jedit[version]install.dmg to you. The requirements for this are described in README.SRC.txt @@ -92,7 +92,7 @@ Workflow - Download Button: Manual in A4 Paper size - Default Download For: <none> - jedit[version]install.dmg - - Download Button: Mac OS X Installer + - Download Button: macOS Installer - Default Download For: [ifdevel]<none>[/ifdevel][iffinal]mac[/iffinal] - jedit[version]install.exe - Download Button: Windows Installer diff --git a/doc/users-guide/conventions.xml b/doc/users-guide/conventions.xml index 8dca2d37e..c7d3b120a 100644 --- a/doc/users-guide/conventions.xml +++ b/doc/users-guide/conventions.xml @@ -35,7 +35,7 @@ <row> <entry><keycap>C</keycap></entry> - <entry>The primary modifier key in jEdit. On MacOS X, this + <entry>The primary modifier key in jEdit. On macOS, this is actually the key known as <quote>Command</quote>. On most other keyboards, this key is labelled <quote>Control</quote>.</entry> @@ -44,7 +44,7 @@ <row> <entry><keycap>A</keycap></entry> - <entry>The secondary modifier key in jEdit. On MacOS X, this + <entry>The secondary modifier key in jEdit. On macOS, this is actually the key labelled <quote>Control</quote>. On most other keyboards, this key is labelled <quote>Alt</quote>.</entry> @@ -94,7 +94,7 @@ interface widget. The "F10" key can also be pressed to put focus on the menu bar, it has the same functionality as the Alt key in Windows. Note that this functionality is not - available on MacOS X with the <quote>MacOS Adaptive</quote> + available on macOS with the <quote>macOS Adaptive</quote> look and feel. See <xref linkend="appearance-pane" /> for information on changing the look and feel.</entry> </row> diff --git a/doc/users-guide/customizing.xml b/doc/users-guide/customizing.xml index d8618d75d..865953554 100644 --- a/doc/users-guide/customizing.xml +++ b/doc/users-guide/customizing.xml @@ -682,7 +682,7 @@ <para>The location of the settings directory is system-specific <footnote><para> On Linux, it is <literal>~/.jedit</literal>. On Windows, you will find it in <literal>%APPDATA%\jEdit</literal>. - On the Mac, it is <literal>~/Library/jEdit</literal>. + On macOS, it is <literal>~/Library/jEdit</literal>. </para></footnote>. It is printed to the activity log (<guimenu>Utilities</guimenu>><guisubmenu>Troubleshooting</guisubmenu>><guimenuitem>Activity diff --git a/doc/users-guide/files.xml b/doc/users-guide/files.xml index 75af6a700..abd17fdcc 100644 --- a/doc/users-guide/files.xml +++ b/doc/users-guide/files.xml @@ -206,7 +206,7 @@ <title>Line Separators</title> <para>Unix systems use newlines (<literal>\n</literal>) to mark line - endings in text files. The MacOS uses carriage-returns + endings in text files. The macOS uses carriage-returns (<literal>\r</literal>). Windows uses a carriage-return followed by a newline (<literal>\r\n</literal>). jEdit can read and write files in all three formats.</para> @@ -276,9 +276,9 @@ <guimenuitem>Options</guimenuitem> dialog box; see <xref linkend="encodings-pane" />. Unless you change this setting, it will be your operating system's - native encoding, for example <literal>MacRoman</literal> on the MacOS, - <literal>windows-1252</literal> on Windows, and - <literal>ISO-8859-1</literal> on Unix.</para> + native encoding, for example <literal>MacRoman</literal> on macOS, + <literal>windows-1252</literal> on many Windows installations, and + <literal>UTF-8</literal> on many Linux installations.</para> <para>An encoding can be explicitly set when opening a file in the file system browser's @@ -494,7 +494,7 @@ <listitem> <para><guimenuitem>Root Directory</guimenuitem> - on Unix, goes to the root directory (<filename>/</filename>). On - Windows and MacOS X, lists all mounted drives and network + Windows and macOS, lists all mounted drives and network shares. The forward slash (/) achieves this too. </para> </listitem> diff --git a/doc/users-guide/macro-index.xml b/doc/users-guide/macro-index.xml index 86f84b325..f68f724dc 100644 --- a/doc/users-guide/macro-index.xml +++ b/doc/users-guide/macro-index.xml @@ -367,7 +367,7 @@ <para>Toggles a local file's read-only flag. Uses platform-specific commands, so it only works on Windows, Unix - and MacOS X.</para> + and macOS.</para> </listitem> </itemizedlist> </section> diff --git a/doc/users-guide/starting.xml b/doc/users-guide/starting.xml index 03767e522..f62ed1f6b 100644 --- a/doc/users-guide/starting.xml +++ b/doc/users-guide/starting.xml @@ -25,11 +25,11 @@ having to wait for it to start the first time. The downside of this is increased memory usage.</para> - <para>When running on MacOS X, the <userinput>-background</userinput> + <para>When running on macOS, the <userinput>-background</userinput> command-line switch is active by default, so that jEdit conforms to the platform convention that programs should stay open until the <guimenuitem>Quit</guimenuitem> command is explicitly invoked by the user, - even if all windows are closed. To disable background mode on MacOS X, use + even if all windows are closed. To disable background mode on macOS, use the <userinput>-nobackground</userinput> switch.</para> <para>For more information about command line switches that control the @@ -398,7 +398,7 @@ directory as <literal>jEdit.exe</literal> and place one JVM option per line. </para> - <para> On Mac OS X, the jEdit.app bundle gets JVM options from a file called + <para> On macOS, the jEdit.app bundle gets JVM options from a file called <literal>Contents/Info.plist</literal>, which can be edited with a text editor. </para> diff --git a/doc/users-guide/text-edit.xml b/doc/users-guide/text-edit.xml index 88f2348f5..dfed12449 100644 --- a/doc/users-guide/text-edit.xml +++ b/doc/users-guide/text-edit.xml @@ -754,7 +754,7 @@ <para>The quick copy feature is accessed using the middle mouse button. If you do not have a three-button mouse, then either <keycap>Alt</keycap>-click (on Windows and Unix) or - <keycap>Option</keycap>-click (on MacOS X). The quick copy feature + <keycap>Option</keycap>-click (on macOS). The quick copy feature enables the following behavior:</para> <itemizedlist> diff --git a/installer/install.props b/installer/install.props index 943dc4021..38241ba20 100644 --- a/installer/install.props +++ b/installer/install.props @@ -46,11 +46,11 @@ comp.3.real-size=@jedit-windows.realsize@ comp.3.fileset=jedit-windows comp.3.os=Windows -comp.4.name=MacOS desktop integration +comp.4.name=macOS desktop integration comp.4.disk-size=@jedit-mac.disksize@ comp.4.real-size=@jedit-mac.realsize@ comp.4.fileset=jedit-mac -comp.4.os=MacOS +comp.4.os=macOS comp.5.name=OS/2 start script comp.5.disk-size=@jedit-os2.disksize@ diff --git a/keymaps/German_Keyboard_keys.props b/keymaps/German_Keyboard_keys.props index 13393a045..2a897735e 100644 --- a/keymaps/German_Keyboard_keys.props +++ b/keymaps/German_Keyboard_keys.props @@ -63,7 +63,7 @@ delete-line.shortcut=C+d # C+e is a prefix find.shortcut=C+f find-next.shortcut=F3 -# C+h is not usable on MacOS X +# C+h is not usable on macOS indent-lines.shortcut=C+i join-lines.shortcut=C+j swap-marker.shortcut=C+k diff --git a/keymaps/jEdit_keys.props b/keymaps/jEdit_keys.props index 7b736f294..defe4b074 100644 --- a/keymaps/jEdit_keys.props +++ b/keymaps/jEdit_keys.props @@ -11,7 +11,7 @@ delete-line.shortcut=C+d # C+e is a prefix find.shortcut=C+f find-next.shortcut=F3 -# C+h is not usable on MacOS X +# C+h is not usable on macOS indent-lines.shortcut=C+i join-lines.shortcut=C+j swap-marker.shortcut=C+k diff --git a/macros/Files/Toggle_ReadOnly.bsh b/macros/Files/Toggle_ReadOnly.bsh index 4358d4a8c..30d74b7c0 100644 --- a/macros/Files/Toggle_ReadOnly.bsh +++ b/macros/Files/Toggle_ReadOnly.bsh @@ -23,8 +23,8 @@ // Localization final static String OnlyLocalFilesError = jEdit.getProperty("macro.rs.ToggleReadOnly.OnlyLocalFiles.error", "This macro only works on local files."); -final static String OnlyWindowsUnixMacosError = jEdit.getProperty("macro.rs.ToggleReadOnly.OnlyWindowsUnixMacos.error", "This macro only works on Windows, Unix, & MacOS X."); - +final static String OnlyWindowsUnixMacosError = jEdit.getProperty("macro.rs.ToggleReadOnly.OnlyWindowsUnixMacos.error", "This macro only works on Windows, Unix, & macOS."); + //Process CmdThread(cmd, view) { @@ -80,7 +80,7 @@ ToggleReadOnly(view); <listitem> <para><filename>Toggle_ReadOnly.bsh</filename></para> <abstract><para> - Toggles a local file's read-only flag. Uses platform-specific commands, so it only works on Windows, Unix and MacOS X. + Toggles a local file's read-only flag. Uses platform-specific commands, so it only works on Windows, Unix and macOS. </para></abstract> </listitem> diff --git a/macros/Properties/Insert_Buffer_Properties.bsh b/macros/Properties/Insert_Buffer_Properties.bsh index 2ef49a666..91632262d 100644 --- a/macros/Properties/Insert_Buffer_Properties.bsh +++ b/macros/Properties/Insert_Buffer_Properties.bsh @@ -8,7 +8,7 @@ * * Copyright (C) 2002, 2003 Ollie Rutherfurd <ol...@ru...> * - * BugFixed by Björn "Vampire" Kautler <Vam...@gm...> + * BugFixed by Björn Kautler <Va...@jE...> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/misc/clojure/README.txt b/misc/clojure/README.txt index 49bbd6bb1..9dec43e63 100644 --- a/misc/clojure/README.txt +++ b/misc/clojure/README.txt @@ -58,5 +58,4 @@ afficionado will ever use. The result is these hacky instructions. In attempting an elegant laziness I perhaps doom future maintainers to editing two files. Mea culpa. Feel free to patch in a project.clj file or whatever. -Regarding instructions for Windows, Mac, whatever. Please feel free to add some. - +Regarding instructions for Windows, macOS, whatever. Please feel free to add some. diff --git a/modes/clojure.xml b/modes/clojure.xml index 8bfe95daf..263092048 100644 --- a/modes/clojure.xml +++ b/modes/clojure.xml @@ -11,7 +11,7 @@ Want to do something about it? Do you know Clojure? Do you use linux? - (or are you knowledgeable enought to translate to your os?) + (or are you knowledgeable enough to translate to your os?) Verify file coverage of Clojure namespace symbols using code in: misc/clojure diff --git a/modes/django.xml b/modes/django.xml index 098a6c1ad..4af58e1bb 100644 --- a/modes/django.xml +++ b/modes/django.xml @@ -7,9 +7,9 @@ Django 1.2 templates edit mode Updated 2010-09-10 by Jakub Roztocil <ja...@we...> * Added missing filters, tags, operators, etc. -* Higlight Django syntax inside tags and attributes -* Higlight CSS (and to some extent also Django tags) inside <style> -* Higlight JavaScript inside <script> +* Highlight Django syntax inside tags and attributes +* Highlight CSS (and to some extent also Django tags) inside <style> +* Highlight JavaScript inside <script> CSS & JS integration and tag highlighting inspired by the PHP mode. diff --git a/org/gjt/sp/jedit/Debug.java b/org/gjt/sp/jedit/Debug.java index 9fa6d6fd1..dae5b2036 100644 --- a/org/gjt/sp/jedit/Debug.java +++ b/org/gjt/sp/jedit/Debug.java @@ -103,11 +103,11 @@ public class Debug * Logs messages when BeanShell code is evaluated. */ public static boolean BEANSHELL_DEBUG; - + /** * If true, A+ shortcuts are disabled. If you use this, you should also - * remap the the modifiers so that A+ is actually something else. - * <b>On by default on MacOS.</b> + * remap the modifiers so that A+ is actually something else. + * <b>On by default on macOS.</b> */ public static boolean ALT_KEY_PRESSED_DISABLED = OperatingSystem.isMacOS(); @@ -133,7 +133,7 @@ public class Debug /** * Create new search dialogs instead of reusing instances. - * <b> Off by default on Mac OS because it can cause search dialogs to + * <b> Off by default on macOS because it can cause search dialogs to * show up on the wrong space. </b> */ public static boolean DISABLE_SEARCH_DIALOG_POOL = OperatingSystem.isMacOS(); diff --git a/org/gjt/sp/jedit/GUIUtilities.java b/org/gjt/sp/jedit/GUIUtilities.java index 432aee4ce..4e9eca691 100644 --- a/org/gjt/sp/jedit/GUIUtilities.java +++ b/org/gjt/sp/jedit/GUIUtilities.java @@ -562,8 +562,8 @@ public class GUIUtilities //{{{ getPlatformShortcutLabel() method /** * Translates a shortcut description string (e.g. "CS+SEMICOLON") to - * a platform-localized description. On OS X this puts in the pretty - * unicode characters for Shift, Cmd, etc. + * a platform-localized description. On macOS this puts in the pretty + * Unicode characters for Shift, Cmd, etc. */ public static String getPlatformShortcutLabel(String label) { @@ -1184,7 +1184,7 @@ public class GUIUtilities } catch(Exception e) { - /* Workaround for OS X bug. */ + /* Workaround for macOS bug. */ Log.log(Log.ERROR,GUIUtilities.class,e); } @@ -1716,8 +1716,8 @@ public class GUIUtilities private static HashMap<String, String> macKeySymbols = null; /* - * Create a list of unicode characters to be used in displaying keyboard shortcuts - * on Mac OS X. + * Create a list of Unicode characters to be used in displaying keyboard shortcuts + * on macOS. */ static { diff --git a/org/gjt/sp/jedit/OperatingSystem.java b/org/gjt/sp/jedit/OperatingSystem.java index 2f77c672d..0e3f8a22b 100644 --- a/org/gjt/sp/jedit/OperatingSystem.java +++ b/org/gjt/sp/jedit/OperatingSystem.java @@ -187,7 +187,7 @@ public class OperatingSystem //{{{ isUnix() method /** - * Returns if we're running Unix (this includes MacOS X). + * Returns if we're running Unix (this includes macOS). */ public static boolean isUnix() { @@ -196,7 +196,7 @@ public class OperatingSystem //{{{ isMacOS() method /** - * Returns if we're running MacOS X. + * Returns if we're running macOS. */ public static boolean isMacOS() { @@ -225,7 +225,7 @@ public class OperatingSystem //{{{ isMacOSLF() method /** - * Returns if we're running MacOS X and using the native look and feel. + * Returns if we're running macOS and using the native look and feel. */ public static boolean isMacOSLF() { @@ -234,7 +234,7 @@ public class OperatingSystem //{{{ hasScreenMenuBar() method /** - * Returns whether the screen menu bar on Mac OS X is in use. + * Returns whether the screen menu bar on macOS is in use. * @since jEdit 4.2pre1 */ public static boolean hasScreenMenuBar() diff --git a/org/gjt/sp/jedit/SettingsReloader.java b/org/gjt/sp/jedit/SettingsReloader.java index 442cdadfe..3d86f8c70 100644 --- a/org/gjt/sp/jedit/SettingsReloader.java +++ b/org/gjt/sp/jedit/SettingsReloader.java @@ -48,7 +48,7 @@ class SettingsReloader String jEditHome = jEdit.getJEditHome(); String settingsDirectory = jEdit.getSettingsDirectory(); - // On Windows and MacOS, path names are case insensitive + // On Windows and macOS, path names are case insensitive if((VFSManager.getVFSForPath(path).getCapabilities() & VFS.CASE_INSENSITIVE_CAP) != 0) { diff --git a/org/gjt/sp/jedit/View.java b/org/gjt/sp/jedit/View.java index 86b614b67..1d7bea5f6 100644 --- a/org/gjt/sp/jedit/View.java +++ b/org/gjt/sp/jedit/View.java @@ -1264,7 +1264,7 @@ public class View extends JFrame implements InputHandlerProvider StringBuilder title = new StringBuilder(); - /* On Mac OS X, apps are not supposed to show their name in the + /* On macOS, apps are not supposed to show their name in the title bar. */ if(!OperatingSystem.isMacOS()) { @@ -1363,7 +1363,7 @@ public class View extends JFrame implements InputHandlerProvider enableEvents(AWTEvent.KEY_EVENT_MASK); - // OS X users expect a preview of the window rather than an icon + // macOS users expect a preview of the window rather than an icon if (!OperatingSystem.isMacOS()) setIconImage(GUIUtilities.getEditorIcon()); diff --git a/org/gjt/sp/jedit/bufferio/BufferIORequest.java b/org/gjt/sp/jedit/bufferio/BufferIORequest.java index 26cd5a6c5..7bdf1dfc7 100644 --- a/org/gjt/sp/jedit/bufferio/BufferIORequest.java +++ b/org/gjt/sp/jedit/bufferio/BufferIORequest.java @@ -180,7 +180,7 @@ public abstract class BufferIORequest extends IoTask // means this is a DOS/Windows file boolean CRLF = false; - // A \r was read, hence a MacOS file + // A \r was read, hence a macOS file boolean CROnly = false; // Was the previous read character a \r? @@ -210,7 +210,7 @@ public abstract class BufferIORequest extends IoTask case '\r': // If we read a \r and // lastWasCR is also true, - // it is probably a Mac file + // it is probably a macOS file // (\r\r in stream) if(lastWasCR) { @@ -268,7 +268,7 @@ public abstract class BufferIORequest extends IoTask default: /* If we find some other character that follows a \r, so it is not a Windows file, and probably - a Mac file */ + a macOS file */ if(lastWasCR) { CROnly = true; diff --git a/org/gjt/sp/jedit/gui/ColorWellButton.java b/org/gjt/sp/jedit/gui/ColorWellButton.java index 178d54764..a74cfa2b3 100644 --- a/org/gjt/sp/jedit/gui/ColorWellButton.java +++ b/org/gjt/sp/jedit/gui/ColorWellButton.java @@ -48,7 +48,7 @@ public class ColorWellButton extends JButton setMargin(new Insets(2, 2, 2, 2)); addActionListener(new ActionHandler()); - // according to krisk this looks better on OS X... + // according to krisk this looks better on macOS... if(OperatingSystem.isMacOSLF()) putClientProperty("JButton.buttonType","toolbar"); } //}}} diff --git a/org/gjt/sp/jedit/gui/KeyEventTranslator.java b/org/gjt/sp/jedit/gui/KeyEventTranslator.java index 20d151679..4409abb6d 100644 --- a/org/gjt/sp/jedit/gui/KeyEventTranslator.java +++ b/org/gjt/sp/jedit/gui/KeyEventTranslator.java @@ -129,14 +129,14 @@ public class KeyEventTranslator int ignoreMods; if(Debug.ALT_KEY_PRESSED_DISABLED) { - /* on MacOS, A+ can be user input */ + /* on macOS, A+ can be user input */ ignoreMods = InputEvent.SHIFT_DOWN_MASK | InputEvent.ALT_GRAPH_DOWN_MASK | InputEvent.ALT_DOWN_MASK; } else { - /* on MacOS, A+ can be user input */ + /* on macOS, A+ can be user input */ ignoreMods = InputEvent.SHIFT_DOWN_MASK | InputEvent.ALT_GRAPH_DOWN_MASK; } diff --git a/org/gjt/sp/jedit/gui/OptionsDialog.java b/org/gjt/sp/jedit/gui/OptionsDialog.java index e32013045..40d167315 100644 --- a/org/gjt/sp/jedit/gui/OptionsDialog.java +++ b/org/gjt/sp/jedit/gui/OptionsDialog.java @@ -285,7 +285,7 @@ public abstract class OptionsDialog extends EnhancedDialog implements TreeSelect paneTree.setVisibleRowCount(1); paneTree.setCellRenderer(new PaneNameRenderer()); - // looks bad with the OS X L&F, apparently... + // looks bad with the macOS L&F, apparently... if(!OperatingSystem.isMacOSLF()) paneTree.putClientProperty("JTree.lineStyle", "Angled"); diff --git a/org/gjt/sp/jedit/gui/VariableGridLayout.java b/org/gjt/sp/jedit/gui/VariableGridLayout.java index 5e0f322d2..f819fdd15 100644 --- a/org/gjt/sp/jedit/gui/VariableGridLayout.java +++ b/org/gjt/sp/jedit/gui/VariableGridLayout.java @@ -64,7 +64,7 @@ import java.util.Arrays; * <li>Ability to span components over more than one cell horizontally and vertically. * </ul> * - * @author Dirk Moebius, Björn "Vampire" Kautler + * @author Dirk Moebius, Björn Kautler * @version 1.5 * @see java.awt.GridLayout */ diff --git a/org/gjt/sp/jedit/help/HelpTOCPanel.java b/org/gjt/sp/jedit/help/HelpTOCPanel.java index 83454821d..41018c4ca 100644 --- a/org/gjt/sp/jedit/help/HelpTOCPanel.java +++ b/org/gjt/sp/jedit/help/HelpTOCPanel.java @@ -51,7 +51,7 @@ public class HelpTOCPanel extends JPanel toc = new TOCTree(); - // looks bad with the OS X L&F, apparently... + // looks bad with the macOS L&F, apparently... if(!OperatingSystem.isMacOSLF()) toc.putClientProperty("JTree.lineStyle", "Angled"); diff --git a/org/gjt/sp/jedit/io/FileRootsVFS.java b/org/gjt/sp/jedit/io/FileRootsVFS.java index 293f31f08..b474d7ced 100644 --- a/org/gjt/sp/jedit/io/FileRootsVFS.java +++ b/org/gjt/sp/jedit/io/FileRootsVFS.java @@ -92,7 +92,7 @@ public class FileRootsVFS extends VFS { // Nasty hardcoded values File[] volumes = new File("/Volumes").listFiles(); - assert volumes != null : "Volumes cannot be null on MacOS"; + assert volumes != null : "Volumes cannot be null on macOS"; LinkedList<File> roots = new LinkedList<>(); roots.add(new File("/")); diff --git a/org/gjt/sp/jedit/io/FileVFS.java b/org/gjt/sp/jedit/io/FileVFS.java index a0c554cf7..f4ba8e3e0 100644 --- a/org/gjt/sp/jedit/io/FileVFS.java +++ b/org/gjt/sp/jedit/io/FileVFS.java @@ -447,7 +447,7 @@ public class FileVFS extends VFS toCanonPath = to; } - // this is needed because on OS X renaming to a non-existent + // this is needed because on macOS renaming to a non-existent // directory causes problems File parent = new File(_to.getParent()); if(parent.exists()) diff --git a/org/gjt/sp/jedit/jEdit.java b/org/gjt/sp/jedit/jEdit.java index 4082f4d97..c958f6c1d 100644 --- a/org/gjt/sp/jedit/jEdit.java +++ b/org/gjt/sp/jedit/jEdit.java @@ -146,7 +146,7 @@ public class jEdit settingsDirectory = MiscUtilities.constructPath( System.getProperty("user.home"), ".jedit"); - // On mac, different rules (should) apply + // On macOS, different rules (should) apply if(OperatingSystem.isMacOS()) settingsDirectory = MiscUtilities.constructPath( System.getProperty("user.home"), "Library/jEdit" ); @@ -157,7 +157,7 @@ public class jEdit settingsDirectory = MiscUtilities.constructPath( appData, "jEdit"); } - // MacOS users expect the app to keep running after all windows + // macOS users expect the app to keep running after all windows // are closed background = OperatingSystem.isMacOS(); @@ -417,7 +417,7 @@ public class jEdit logTime("after splash screen activation"); //{{{ Settings migration code. // Windows check introduced in 5.0pre1. - // MacOS check introduced in 4.3. + // macOS check introduced in 4.3. if((OperatingSystem.isMacOS() || OperatingSystem.isWindows()) && shouldRelocateSettings && settingsDirectory != null) { diff --git a/org/gjt/sp/jedit/jedit.props b/org/gjt/sp/jedit/jedit.props index a9e9edea2..2b5a32947 100644 --- a/org/gjt/sp/jedit/jedit.props +++ b/org/gjt/sp/jedit/jedit.props @@ -35,7 +35,7 @@ helpviewer.fontstyle=0 decorate.frames=false decorate.dialogs=false -# Draw multi-key shortcuts on screen menu bar? (OS X only) +# Draw multi-key shortcuts on screen menu bar? (macOS only) menu.multiShortcut=false # If true, welcome screen will be displayed. @@ -158,7 +158,7 @@ largefilemode=ask # The OS default will be used if this is not specified # Unix=\n # Windows=\r\n -# MacOS=\r +# macOS=\r #buffer.lineSeparator=\n # Encoding @@ -503,7 +503,6 @@ plugin-manager.showAll=true plugin-manager.mirror.id=NONE plugin-manager.deleteDownloads=true plugin-manager.hide-libraries.toggle=true -plugin-blacklist.MacOS.jar=true #}}} #{{{ Hidden settings diff --git a/org/gjt/sp/jedit/jedit_gui.props b/org/gjt/sp/jedit/jedit_gui.props index a7a383b9f..e2f611bf2 100644 --- a/org/gjt/sp/jedit/jedit_gui.props +++ b/org/gjt/sp/jedit/jedit_gui.props @@ -577,7 +577,7 @@ about.text.contributors=Slava Pestov\n\ Bernhard Walle\n\ Bertalan Fodor\n\ Bill McMilleon\n\ - Björn "Vampire" Kautler\n\ + Björn Kautler\n\ Brad Mace\n\ Brant Langer Gurganus\n\ Brett Smith\n\ diff --git a/org/gjt/sp/jedit/pluginmgr/InstallPanel.java b/org/gjt/sp/jedit/pluginmgr/InstallPanel.java index 8389832a1..ac5f3d6bf 100644 --- a/org/gjt/sp/jedit/pluginmgr/InstallPanel.java +++ b/org/gjt/sp/jedit/pluginmgr/InstallPanel.java @@ -4,7 +4,7 @@ * :folding=explicit:collapseFolds=1: * * Copyright (C) 2002-2013 Kris Kopicki, Slava Pestov, Dale Anson, - * Matthieu Casanova, Alan Ezust, Björn "Vampire" Kautler + * Matthieu Casanova, Alan Ezust, Björn Kautler * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/org/gjt/sp/jedit/search/HyperSearchResults.java b/org/gjt/sp/jedit/search/HyperSearchResults.java index fcbe1d831..0f6b45019 100644 --- a/org/gjt/sp/jedit/search/HyperSearchResults.java +++ b/org/gjt/sp/jedit/search/HyperSearchResults.java @@ -111,7 +111,7 @@ public class HyperSearchResults extends JPanel implements DefaultFocusComponent //so we remove this keystroke binding bug #1955140 KeyStroke keyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0); resultTree.getInputMap().remove(keyStroke); - // looks bad with the OS X L&F, apparently... + // looks bad with the macOS L&F, apparently... if(!OperatingSystem.isMacOSLF()) resultTree.putClientProperty("JTree.lineStyle", "Angled"); diff --git a/org/jedit/localization/jedit_cs.props b/org/jedit/localization/jedit_cs.props index 89d50e6fc..7ec0923b5 100644 --- a/org/jedit/localization/jedit_cs.props +++ b/org/jedit/localization/jedit_cs.props @@ -38,9 +38,9 @@ common.clearAll=VyÄistit vÅ¡e common.selectAll=OznaÄit vÅ¡e common.selectNone=OdznaÄit vÅ¡e -lineSep.LF=Unix/MacOS (\\n) +lineSep.LF=Unix/macOS (\\n) lineSep.CRLF=DOS/Windows (\\r\\n) -lineSep.CR=Classic MacOS (\\r) +lineSep.CR=Classic macOS (\\r) #}}} #{{{ Miscellaneous @@ -2186,7 +2186,7 @@ macro.rs.OpenPath.PathName.label=Název cesty: #{{{Toggle ReadOnly macro.rs.ToggleReadOnly.OnlyLocalFiles.error=Toto makro funguje pouze s lokálnÃmi soubory- -macro.rs.ToggleReadOnly.OnlyWindowsUnixMacos.error=Toto makro funguje pouze na OS Windows, Unix, & MacOS X. +macro.rs.ToggleReadOnly.OnlyWindowsUnixMacos.error=Toto makro funguje pouze na OS Windows, Unix, & macOS. #}}} #}}} diff --git a/org/jedit/localization/jedit_de.props b/org/jedit/localization/jedit_de.props index 91c212a35..dd080b374 100644 --- a/org/jedit/localization/jedit_de.props +++ b/org/jedit/localization/jedit_de.props @@ -75,9 +75,9 @@ common.selectNone=Nichts wählen common.loading=Lade... common.reset=Zurücksetzen -lineSep.LF=Unix/MacOS (\\n) +lineSep.LF=Unix/macOS (\\n) lineSep.CRLF=DOS/Windows (\\r\\n) -lineSep.CR=Classic MacOS (\\r) +lineSep.CR=Classic macOS (\\r) #}}} #{{{ Miscellaneous @@ -2462,7 +2462,7 @@ macro.rs.OpenPath.PathName.label=Pfadname: #{{{Toggle ReadOnly macro.rs.ToggleReadOnly.OnlyLocalFiles.error=Dieses Makro funktioniert nur mit lokalen Dateien -macro.rs.ToggleReadOnly.OnlyWindowsUnixMacos.error=Dieses Makro funktioniert nur unter Windows, Unix und MacOS X. +macro.rs.ToggleReadOnly.OnlyWindowsUnixMacos.error=Dieses Makro funktioniert nur unter Windows, Unix und macOS. #}}} #}}} diff --git a/org/jedit/localization/jedit_en.props b/org/jedit/localization/jedit_en.props index d37b752ec..c851752f4 100644 --- a/org/jedit/localization/jedit_en.props +++ b/org/jedit/localization/jedit_en.props @@ -40,9 +40,9 @@ common.selectNone=Select None common.loading=Loading... common.reset=Reset -lineSep.LF=Unix/MacOS (\\n) +lineSep.LF=Unix/macOS (\\n) lineSep.CRLF=DOS/Windows (\\r\\n) -lineSep.CR=Classic MacOS (\\r) +lineSep.CR=Classic macOS (\\r) #}}} #{{{ Miscellaneous @@ -2443,7 +2443,7 @@ macro.rs.OpenPath.PathName.label=Path name: #{{{Toggle ReadOnly macro.rs.ToggleReadOnly.OnlyLocalFiles.error=This macro only works on local files. -macro.rs.ToggleReadOnly.OnlyWindowsUnixMacos.error=This macro only works on Windows, Unix, & MacOS X. +macro.rs.ToggleReadOnly.OnlyWindowsUnixMacos.error=This macro only works on Windows, Unix, & macOS. #}}} #}}} diff --git a/org/jedit/localization/jedit_fr.props b/org/jedit/localization/jedit_fr.props index 656fb89ea..ac20cd722 100644 --- a/org/jedit/localization/jedit_fr.props +++ b/org/jedit/localization/jedit_fr.props @@ -39,9 +39,9 @@ common.selectAll=Tout sélectionner common.selectNone=Ne rien sélectionner common.loading=Chargement... -lineSep.LF=Unix/MacOS (\\n) +lineSep.LF=Unix/macOS (\\n) lineSep.CRLF=DOS/Windows (\\r\\n) -lineSep.CR=Classic MacOS (\\r) +lineSep.CR=Classic macOS (\\r) #}}} #{{{ Miscellaneous @@ -2184,7 +2184,7 @@ macro.rs.OpenPath.PathName.label=Nom du chemin : #{{{Toggle ReadOnly macro.rs.ToggleReadOnly.OnlyLocalFiles.error=Cette macro ne fonctionne que sur les fichiers locaux. -macro.rs.ToggleReadOnly.OnlyWindowsUnixMacos.error=Cette macro ne fonctionne que sur Windows, Unix, & MacOS X. +macro.rs.ToggleReadOnly.OnlyWindowsUnixMacos.error=Cette macro ne fonctionne que sur Windows, Unix, & macOS. #}}} #}}} diff --git a/org/jedit/localization/jedit_ja.props b/org/jedit/localization/jedit_ja.props index 318a965ba..2c9be9dbd 100644 --- a/org/jedit/localization/jedit_ja.props +++ b/org/jedit/localization/jedit_ja.props @@ -38,9 +38,9 @@ common.clearAll=ãã¹ã¦ã¯ãªã¢ common.selectAll=ãã¹ã¦é¸æ common.selectNone=é¸æè§£é¤ -lineSep.LF=Unix/MacOS (\\n) +lineSep.LF=Unix/macOS (\\n) lineSep.CRLF=DOS/Windows (\\r\\n) -lineSep.CR=Classic MacOS (\\r) +lineSep.CR=Classic macOS (\\r) #}}} #{{{ Miscellaneous @@ -2182,7 +2182,7 @@ macro.rs.OpenPath.PathName.label=ãã¹å: #{{{Toggle ReadOnly macro.rs.ToggleReadOnly.OnlyLocalFiles.error=ãã®ãã¯ãã¯ãã¼ã«ã«ãã¡ã¤ã«ã§ããåãã¾ããã -macro.rs.ToggleReadOnly.OnlyWindowsUnixMacos.error=ãã®ãã¯ã㯠Windows ã Unix ã MacOS X ã§ããåãã¾ããã +macro.rs.ToggleReadOnly.OnlyWindowsUnixMacos.error=ãã®ãã¯ã㯠Windows ã Unix ã macOS ã§ããåãã¾ããã #}}} #}}} diff --git a/org/jedit/localization/jedit_ko.props b/org/jedit/localization/jedit_ko.props index 53c7e29e7..82546c6fe 100644 --- a/org/jedit/localization/jedit_ko.props +++ b/org/jedit/localization/jedit_ko.props @@ -39,9 +39,9 @@ common.selectAll=ì ì²´ ì í common.selectNone=ì í í´ì common.loading=ë¡ë©... -lineSep.LF=Unix/MacOS (\\n) +lineSep.LF=Unix/macOS (\\n) lineSep.CRLF=DOS/Windows (\\r\\n) -lineSep.CR=Classic MacOS (\\r) +lineSep.CR=Classic macOS (\\r) #}}} #{{{ Miscellaneous @@ -2152,7 +2152,7 @@ macro.rs.OpenPath.PathName.label=ê²½ë¡ ì´ë¦: #{{{Toggle ReadOnly macro.rs.ToggleReadOnly.OnlyLocalFiles.error=ì´ ë§¤í¬ë¡ë ë´ë¶ íì¼ë§ ì§ìí©ëë¤. -macro.rs.ToggleReadOnly.OnlyWindowsUnixMacos.error=ì´ ë§¤í¬ë¡ë Windows, Unix, & MacOS Xììë§ ì§ìí©ëë¤. +macro.rs.ToggleReadOnly.OnlyWindowsUnixMacos.error=ì´ ë§¤í¬ë¡ë Windows, Unix, & macOSììë§ ì§ìí©ëë¤. #}}} #}}} diff --git a/org/jedit/localization/jedit_ru.props b/org/jedit/localization/jedit_ru.props index d6535332c..802c07375 100644 --- a/org/jedit/localization/jedit_ru.props +++ b/org/jedit/localization/jedit_ru.props @@ -40,9 +40,9 @@ common.selectNone=ÐÑмениÑÑ Ð²Ñделение common.loading=ÐагÑÑзка... common.reset=СбÑÐ¾Ñ -lineSep.LF=Unix/MacOS (\\n) +lineSep.LF=Unix/macOS (\\n) lineSep.CRLF=DOS/Windows (\\r\\n) -lineSep.CR=Classic MacOS (\\r) +lineSep.CR=Classic macOS (\\r) #}}} #{{{ Miscellaneous @@ -2406,7 +2406,7 @@ macro.rs.OpenPath.PathName.label=ÐÑÑÑ: #{{{Toggle ReadOnly macro.rs.ToggleReadOnly.OnlyLocalFiles.error=ÐÑÐ¾Ñ Ð¼Ð°ÐºÑÐ¾Ñ ÑабоÑÐ°ÐµÑ ÑолÑко Ñ Ð»Ð¾ÐºÐ°Ð»ÑнÑми Ñайлами. -macro.rs.ToggleReadOnly.OnlyWindowsUnixMacos.error=ÐÑÐ¾Ñ Ð¼Ð°ÐºÑÐ¾Ñ ÑабоÑÐ°ÐµÑ ÑолÑко Ñ Windows, Unix и MacOS X. +macro.rs.ToggleReadOnly.OnlyWindowsUnixMacos.error=ÐÑÐ¾Ñ Ð¼Ð°ÐºÑÐ¾Ñ ÑабоÑÐ°ÐµÑ ÑолÑко Ñ Windows, Unix и macOS. #}}} #}}} diff --git a/org/jedit/localization/jedit_zh-tw.props b/org/jedit/localization/jedit_zh-tw.props index 2fe83cc2a..6f6d32d4d 100644 --- a/org/jedit/localization/jedit_zh-tw.props +++ b/org/jedit/localization/jedit_zh-tw.props @@ -38,9 +38,9 @@ common.clearAll=å ¨é¨æ¸ é¤ common.selectAll=å ¨é¨é¸å common.selectNone=å ¨é¨æ¸ é¤ -lineSep.LF=Unix/MacOS (\\n) +lineSep.LF=Unix/macOS (\\n) lineSep.CRLF=DOS/Windows (\\r\\n) -lineSep.LF=MacOS (\\r) +lineSep.CR=Classic macOS (\\r) #}}} #{{{ Miscellaneous @@ -2349,7 +2349,7 @@ macro.rs.OpenPath.PathName.label=è·¯å¾å: #{{{Toggle ReadOnly macro.rs.ToggleReadOnly.OnlyLocalFiles.error=éåå·¨éå é©ç¨æ¼æ¬æ©æªæ¡. -macro.rs.ToggleReadOnly.OnlyWindowsUnixMacos.error=éåå·¨éå é©ç¨æ¼ Windows, Unix, 以å MacOS X. +macro.rs.ToggleReadOnly.OnlyWindowsUnixMacos.error=éåå·¨éå é©ç¨æ¼ Windows, Unix, 以å macOS. #}}} #}}} diff --git a/org/jedit/localization/jedit_zh.props b/org/jedit/localization/jedit_zh.props index 4cb02bba0..5b8474eed 100644 --- a/org/jedit/localization/jedit_zh.props +++ b/org/jedit/localization/jedit_zh.props @@ -38,9 +38,9 @@ common.clearAll=å ¨é¨æ¸ é¤ common.selectAll=å ¨é common.selectNone=åé -lineSep.LF=Unix/MacOS (\\n) +lineSep.LF=Unix/macOS (\\n) lineSep.CRLF=DOS/Windows (\\r\\n) -lineSep.CR=Classic MacOS (\\r) +lineSep.CR=Classic macOS (\\r) #}}} #{{{ Miscellaneous @@ -2168,7 +2168,7 @@ macro.rs.OpenPath.PathName.label=è·¯å¾å: #{{{Toggle ReadOnly macro.rs.ToggleReadOnly.OnlyLocalFiles.error=è¿ä¸ªå®ä» éç¨äºæ¬å°æä»¶. -macro.rs.ToggleReadOnly.OnlyWindowsUnixMacos.error=è¿ä¸ªå®ä» éç¨äº Windows, Unix, 以å MacOS X. +macro.rs.ToggleReadOnly.OnlyWindowsUnixMacos.error=è¿ä¸ªå®ä» éç¨äº Windows, Unix, 以å macOS. #}}} #}}} diff --git a/org/jedit/options/OptionGroupPane.java b/org/jedit/options/OptionGroupPane.java index 7a22a2fa2..c1f55433e 100644 --- a/org/jedit/options/OptionGroupPane.java +++ b/org/jedit/options/OptionGroupPane.java @@ -301,7 +301,7 @@ public class OptionGroupPane extends AbstractOptionPane implements TreeSelection stage = new JPanel(new BorderLayout()); - // looks bad with the OS X L&F, apparently... + // looks bad with the macOS L&F, apparently... if (!OperatingSystem.isMacOSLF()) paneTree.putClientProperty("JTree.lineStyle", "Angled"); diff --git a/startup/startup.bsh b/startup/startup.bsh index 9e1ae24ed..1a11b1cc6 100644 --- a/startup/startup.bsh +++ b/startup/startup.bsh @@ -74,14 +74,14 @@ s(search,replace,flags) // InputEvent.ALT_MASK, InputEvent.META_MASK, // InputEvent.SHIFT_MASK); -/* ... and this the MacOS default: */ +/* ... and this the macOS default: */ //KeyEventTranslator.setModifierMapping(InputEvent.META_MASK, /* == C+ */ // InputEvent.CTRL_MASK, /* == A+ */ // InputEvent.ALT_MASK, /* == M+ */ // InputEvent.SHIFT_MASK /* == S+ */); -/* ... if you want MacOS keyboard to behave like a Linux or Windows keyboard - (This is also a MacOSX plugin option): */ +/* ... if you want macOS keyboard to behave like a Linux or Windows keyboard + (This is also a MacOS plugin option): */ // KeyEventTranslator.setModifierMapping(InputEvent.CTRL_MASK, // InputEvent.META_MASK, InputEvent.ALT_MASK, commit: https://sourceforge.net/p/jedit/jEdit/ci/158bb9e0613c6480af5ed7c8c09627f949927aa8/ tree: https://sourceforge.net/p/jedit/jEdit/ci/158bb9e0613c6480af5ed7c8c09627f949927aa8/tree/ commit 158bb9e0613c6480af5ed7c8c09627f949927aa8 Author: Björn Kautler <Bj...@Ka...> Date: Tue Apr 1 01:55:39 2025 +0200 Replace outdated URLs and use HTTPS where possible diff --git a/README.SRC.txt b/README.SRC.txt index 2bd79b721..ebaebb8b6 100644 --- a/README.SRC.txt +++ b/README.SRC.txt @@ -8,7 +8,7 @@ General jEdit documentation can be found in the 'doc' directory. For all tasks: - - Apache Ant. Get it from <http://ant.apache.org>. + - Apache Ant. Get it from <https://ant.apache.org>. 1.9.10 or newer has to be used. - The Ant Optional package. This is included in the download from ants website, as well as the AntPlugin from the Plugin Manager, @@ -19,20 +19,20 @@ General jEdit documentation can be found in the 'doc' directory. For building jEdit, the API documentation or any of the distribution files except of the source package: - - A Java compiler of version 11, such as OpenJDK's javac which is - included in the JDK. Get it from <http://www.java.com/download> - or from your package manager - e. g. openjdk-11-jdk. + - A Java compiler of version 11, such as Temurin's javac which is included in + the JDK. Get it from <https://adoptium.net/de/temurin/releases/?version=11> + or from your package manager - e.g. openjdk-11-jdk. For building the API documentation: - - Sun's javadoc tool, which is included in the JDK. - Get it from <http://www.java.com/download> or from your package - manager - e. g. openjdk-11-jdk. + - Sun's javadoc tool, which is included in the JDK. Get it from + <https://adoptium.net/de/temurin/releases/?version=11> or from + your package manager - e.g. openjdk-11-jdk. For building the windows installer (for the final step): - - Inno Setup 6.0.0 or newer. Get it from <http://www.jrsoftware.org/isdl.php> - - A box running windows or wine, e. g. on *nix. If Inno Setup should be + - Inno Setup 6.0.0 or newer. Get it from <https://www.jrsoftware.org/isdl.php> + - A box running windows or wine, e.g. on *nix. If Inno Setup should be run via wine, a wine version of at least 1.3.10 is required because of a bug in earlier wine versions. diff --git a/build.xml b/build.xml index 9928ed7fc..12ad74bb8 100644 --- a/build.xml +++ b/build.xml @@ -102,7 +102,7 @@ depends="init,check-ivy" unless="ivy.jar.present"> <mkdir dir="${ivy.jar.dir}"/> - <get src="https://repo1.maven.org/maven2/org/apache/ivy/ivy/${config.ivy.version}/ivy-${config.ivy.version}.jar" + <get src="https://repo.maven.apache.org/maven2/org/apache/ivy/ivy/${config.ivy.version}/ivy-${config.ivy.version}.jar" dest="${ivy.jar.file}" usetimestamp="true"/> </target> diff --git a/doc/CHANGES.txt b/doc/CHANGES.txt index 96f2dcacf..b24bc9fb9 100644 --- a/doc/CHANGES.txt +++ b/doc/CHANGES.txt @@ -47,6 +47,8 @@ for contributing to this release. - Fix htaccess edit mode to be context sensitive (#3812 - Björn Kautler) +- Replace outdated URLs and use HTTPS where possible (Björn Kautler) + }}} {{{ Miscellaneous diff --git a/doc/FAQ/faq-general.xml b/doc/FAQ/faq-general.xml index 101212b94..b65948335 100644 --- a/doc/FAQ/faq-general.xml +++ b/doc/FAQ/faq-general.xml @@ -65,7 +65,7 @@ <answer> <para>The short answer is, too many to list here. There is a detailed list available on the <ulink - url="http://www.jedit.org/index.php?page=features">jEdit web + url="https://www.jedit.org/index.php?page=features">jEdit web site</ulink>, but here are some of the major features:</para> <itemizedlist> @@ -174,7 +174,7 @@ installed, and kept current from within jEdit's <quote>Plugin Manager</quote>. There is also a section of the jEdit web site called <ulink - url="http://plugins.jedit.org/">Plugin Central</ulink> that + url="https://plugins.jedit.org/">Plugin Central</ulink> that maintains a descriptive index and download links for all publicly available plugins.</para> <para>Additional questions and answers regarding plugins may @@ -190,7 +190,7 @@ <para>There is a comprehensive User's Guide available from within the program using the <guimenu>Help</guimenu> menu. The User's Guide can also be downloaded from the <ulink - url="http://www.jedit.org/index.php?page=download&platform=source"> + url="https://www.jedit.org/index.php?page=download&platform=source"> jEdit web site</ulink> in Portable Document Format (PDF), suitable for online display or printing.</para> </answer> @@ -207,20 +207,20 @@ <itemizedlist> <listitem> <para>The <ulink - url="http://lists.sourceforge.net/lists/listinfo/jedit-users"> + url="https://lists.sourceforge.net/lists/listinfo/jedit-users"> jedit-users list</ulink>, for comments and questions about using jEdit and its features</para> </listitem> <listitem> <para>The <ulink - url="http://lists.sourceforge.net/lists/listinfo/jedit-devel"> + url="https://lists.sourceforge.net/lists/listinfo/jedit-devel"> jedit-devel list</ulink>, for discussion of development issues by members of the developer team and other interested persons</para> </listitem> <listitem> <para>The <ulink - ... [truncated message content] |
From: vampire0 <vam...@us...> - 2025-03-31 13:14:44
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "jEdit core". The branch, master has been updated via 70840836eb6a3dffa42ef2fea7091f5cc8e5b922 (commit) from a9885bb3c58a0fcd31cd608f501dbfe4d33e5c4a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit: https://sourceforge.net/p/jedit/jEdit/ci/70840836eb6a3dffa42ef2fea7091f5cc8e5b922/ tree: https://sourceforge.net/p/jedit/jEdit/ci/70840836eb6a3dffa42ef2fea7091f5cc8e5b922/tree/ commit 70840836eb6a3dffa42ef2fea7091f5cc8e5b922 Author: Björn Kautler <Bj...@Ka...> Date: Mon Mar 31 15:14:06 2025 +0200 Prevent multiple jEdit instances using the same settings directory using a file lock diff --git a/doc/CHANGES.txt b/doc/CHANGES.txt index d89f09e16..96f2dcacf 100644 --- a/doc/CHANGES.txt +++ b/doc/CHANGES.txt @@ -53,6 +53,9 @@ for contributing to this release. - Do not check edit mode rules twice for hash chars that do not have upper- and lowercase versions (Björn Kautler) +- Prevent multiple jEdit instances using the same settings directory using a + file lock (Björn Kautler) + }}} {{{ API Changes diff --git a/org/gjt/sp/jedit/Buffer.java b/org/gjt/sp/jedit/Buffer.java index 27f3d21e1..9a0899028 100644 --- a/org/gjt/sp/jedit/Buffer.java +++ b/org/gjt/sp/jedit/Buffer.java @@ -203,7 +203,7 @@ public class Buffer extends JEditBuffer { if(isPerformingIO()) { - GUIUtilities.error(view,"buffer-multiple-io",null); + GUIUtilities.error(view,"buffer-multiple-io",(Object[])null); return false; } @@ -344,7 +344,7 @@ public class Buffer extends JEditBuffer { if(isPerformingIO()) { - GUIUtilities.error(view,"buffer-multiple-io",null); + GUIUtilities.error(view,"buffer-multiple-io",(Object[])null); return false; } @@ -489,7 +489,7 @@ public class Buffer extends JEditBuffer { if(isPerformingIO()) { - GUIUtilities.error(view,"buffer-multiple-io",null); + GUIUtilities.error(view,"buffer-multiple-io",(Object[])null); return false; } diff --git a/org/gjt/sp/jedit/GUIUtilities.java b/org/gjt/sp/jedit/GUIUtilities.java index 31256248e..432aee4ce 100644 --- a/org/gjt/sp/jedit/GUIUtilities.java +++ b/org/gjt/sp/jedit/GUIUtilities.java @@ -72,6 +72,8 @@ import java.util.concurrent.Future; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicLong; + +import static javax.swing.JOptionPane.ERROR_MESSAGE; //}}} /** Various GUI utility functions related to icons, menus, toolbars, keyboard shortcuts, etc. @@ -671,27 +673,31 @@ public class GUIUtilities * message text */ public static void error(final Component comp, final String name, final Object[] args) + { + error(comp, + jEdit.getProperty(name.concat(".title"),args), + jEdit.getProperty(name.concat(".message"),args)); + } + + /* package-private */ static void error(final Component comp, final String title, final String message) { if (EventQueue.isDispatchThread()) { hideSplashScreen(); - JOptionPane.showMessageDialog(comp, - jEdit.getProperty(name.concat(".message"),args), - jEdit.getProperty(name.concat(".title"),args), - JOptionPane.ERROR_MESSAGE); + JOptionPane.showMessageDialog(comp, message, title, ERROR_MESSAGE); + } + else + { + try + { + EventQueue.invokeAndWait(() -> error(comp, title, message)); + } + catch (Exception e) // NOPMD + { + // ignored + } } - else - { - try - { - EventQueue.invokeAndWait(() -> error(comp, name, args)); - } - catch (Exception e) // NOPMD - { - // ignored - } - } } //}}} //{{{ input() method diff --git a/org/gjt/sp/jedit/Macros.java b/org/gjt/sp/jedit/Macros.java index 6925a99ef..e198bdfde 100644 --- a/org/gjt/sp/jedit/Macros.java +++ b/org/gjt/sp/jedit/Macros.java @@ -649,7 +649,7 @@ public class Macros Recorder recorder = view.getMacroRecorder(); if(recorder == null) - GUIUtilities.error(view,"macro-not-recording",null); + GUIUtilities.error(view,"macro-not-recording",(Object[])null); else { view.setMacroRecorder(null); @@ -671,7 +671,7 @@ public class Macros if(settings == null) { - GUIUtilities.error(view,"no-settings",null); + GUIUtilities.error(view,"no-settings",(Object[])null); return; } @@ -681,7 +681,7 @@ public class Macros if(jEdit.getBufferManager().getBuffer(path).isEmpty()) { - GUIUtilities.error(view,"no-temp-macro",null); + GUIUtilities.error(view,"no-temp-macro",(Object[])null); return; } diff --git a/org/gjt/sp/jedit/jEdit.java b/org/gjt/sp/jedit/jEdit.java index 36722f7cb..7c2c8ea0a 100644 --- a/org/gjt/sp/jedit/jEdit.java +++ b/org/gjt/sp/jedit/jEdit.java @@ -46,6 +46,8 @@ import javax.swing.*; import java.awt.event.*; import java.io.*; import java.net.*; +import java.nio.channels.FileChannel; +import java.nio.channels.FileLock; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; @@ -79,6 +81,8 @@ import org.gjt.sp.jedit.bufferset.BufferSetManager; import org.gjt.sp.jedit.bufferset.BufferSet; import static java.lang.Integer.parseInt; +import static java.nio.file.StandardOpenOption.CREATE; +import static java.nio.file.StandardOpenOption.WRITE; //}}} /** @@ -398,10 +402,17 @@ public class jEdit System.exit(0); } //}}} + //{{{ Lock settings directory if it exists already + if ((settingsDirectory != null) && + new File(settingsDirectory).isDirectory() && + !lockSettingsDirectory()) + return; + // }}} + // don't show splash screen if there is a file named // 'nosplash' in the settings directory logTime("before splash screen activation"); - if(splash && (!new File(settingsDirectory,"nosplash").exists())) + if(splash && ((settingsDirectory == null) || !new File(settingsDirectory, "nosplash").exists())) GUIUtilities.showSplashScreen(); logTime("after splash screen activation"); //{{{ Settings migration code. @@ -418,9 +429,16 @@ public class jEdit Writer stream; if(settingsDirectory != null) { - File _settingsDirectory = new File(settingsDirectory); - if(!_settingsDirectory.exists()) - _settingsDirectory.mkdirs(); + if(settingsLock == null) + { + File _settingsDirectory = new File(settingsDirectory); + if(!_settingsDirectory.exists()) + _settingsDirectory.mkdirs(); + + // Lock settings directory if it was newly created or relocated + if (!lockSettingsDirectory()) return; + } + File _macrosDirectory = new File(settingsDirectory,"macros"); if(!_macrosDirectory.exists()) _macrosDirectory.mkdir(); @@ -651,6 +669,40 @@ public class jEdit logTime("main done"); } //}}} + //{{{ lockSettingsDirectory() method + private static boolean lockSettingsDirectory() + { + try + { + String settingsLockFileName = ".lock"; + File settingsLockFile = new File(settingsDirectory, settingsLockFileName); + settingsLock = FileChannel.open(settingsLockFile.toPath(), CREATE, WRITE).tryLock(); + System.err.println("Settings directory lock acquired: " + settingsLock); + + if(settingsLock == null) + { + // Localization properties are not yet initialized, so we use a hard-coded message here + String errorMessage = "The settings directory " + + new File(settingsDirectory).getAbsolutePath() + + " is locked by another jEdit instance.\n" + + "If you are sure there is no other jEdit instance running," + + " delete the file named \"" + settingsLockFileName + "\"."; + GUIUtilities.error(null,"Settings Directory is locked",errorMessage); + return false; + } + else + { + settingsLockFile.deleteOnExit(); + } + } + catch(Exception e) + { + Log.log(Log.ERROR, jEdit.class, "Error while trying to lock settings directory", e); + System.exit(1); + } + return true; + } //}}} + //{{{ Property methods //{{{ getCurrentLanguage() method @@ -3262,6 +3314,7 @@ public class jEdit //{{{ Static variables private static String jEditHome; private static String settingsDirectory; + private static FileLock settingsLock; private static String jarCacheDirectory; private static long propsModTime; private static PropertyManager propMgr = new PropertyManager(); ----------------------------------------------------------------------- Summary of changes: doc/CHANGES.txt | 3 ++ org/gjt/sp/jedit/Buffer.java | 6 ++-- org/gjt/sp/jedit/GUIUtilities.java | 36 ++++++++++++---------- org/gjt/sp/jedit/Macros.java | 6 ++-- org/gjt/sp/jedit/jEdit.java | 61 +++++++++++++++++++++++++++++++++++--- 5 files changed, 87 insertions(+), 25 deletions(-) hooks/post-receive -- jEdit core |
From: vampire0 <vam...@us...> - 2025-03-31 00:15:44
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "jEdit core". The branch, master has been updated via a9885bb3c58a0fcd31cd608f501dbfe4d33e5c4a (commit) via 2c30e5e0833ff11d4476dc2f34a2f30cbe38603b (commit) via 74c4fd1afe5517cbc8e9a2272c45c410db95c014 (commit) from 78e5d38fac53681f82d9000bce85510378bc031b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit: https://sourceforge.net/p/jedit/jEdit/ci/a9885bb3c58a0fcd31cd608f501dbfe4d33e5c4a/ tree: https://sourceforge.net/p/jedit/jEdit/ci/a9885bb3c58a0fcd31cd608f501dbfe4d33e5c4a/tree/ commit a9885bb3c58a0fcd31cd608f501dbfe4d33e5c4a Author: Björn Kautler <Bj...@Ka...> Date: Mon Mar 31 02:15:04 2025 +0200 Fix htaccess edit mode to be context sensitive (#3812) diff --git a/doc/CHANGES.txt b/doc/CHANGES.txt index 833801fb6..d89f09e16 100644 --- a/doc/CHANGES.txt +++ b/doc/CHANGES.txt @@ -45,6 +45,8 @@ for contributing to this release. - Consider context insensitivity of an edit mode also on first usage after reloading edit modes (#3812 - Björn Kautler) +- Fix htaccess edit mode to be context sensitive (#3812 - Björn Kautler) + }}} {{{ Miscellaneous diff --git a/modes/htaccess.xml b/modes/htaccess.xml index 3e547e928..f805f4c69 100644 --- a/modes/htaccess.xml +++ b/modes/htaccess.xml @@ -6,7 +6,6 @@ <PROPS> <PROPERTY NAME="lineComment" VALUE="#" /> <PROPERTY NAME="noWordSep" VALUE="-" /> - <PROPERTY NAME="contextInsensitive" VALUE="true" /> </PROPS> <RULES HIGHLIGHT_DIGITS="FALSE" IGNORE_CASE="TRUE"> commit: https://sourceforge.net/p/jedit/jEdit/ci/2c30e5e0833ff11d4476dc2f34a2f30cbe38603b/ tree: https://sourceforge.net/p/jedit/jEdit/ci/2c30e5e0833ff11d4476dc2f34a2f30cbe38603b/tree/ commit 2c30e5e0833ff11d4476dc2f34a2f30cbe38603b Author: Björn Kautler <Bj...@Ka...> Date: Mon Mar 31 02:11:58 2025 +0200 Consider context insensitivity of an edit mode also on first usage after reloading edit modes (#3812) diff --git a/doc/CHANGES.txt b/doc/CHANGES.txt index 59e5063c5..833801fb6 100644 --- a/doc/CHANGES.txt +++ b/doc/CHANGES.txt @@ -42,6 +42,9 @@ for contributing to this release. not do nothing anymore when connecting to a wrong-answering service (Björn Kautler) +- Consider context insensitivity of an edit mode also on first usage after + reloading edit modes (#3812 - Björn Kautler) + }}} {{{ Miscellaneous diff --git a/org/gjt/sp/jedit/buffer/JEditBuffer.java b/org/gjt/sp/jedit/buffer/JEditBuffer.java index 55dd7a538..cf10cc58f 100644 --- a/org/gjt/sp/jedit/buffer/JEditBuffer.java +++ b/org/gjt/sp/jedit/buffer/JEditBuffer.java @@ -1973,6 +1973,7 @@ loop: for(int i = 0; i < seg.count; i++) this.mode = mode; + mode.loadIfNecessary(); contextInsensitive = forceContextInsensitive || mode.getBooleanProperty("contextInsensitive"); commit: https://sourceforge.net/p/jedit/jEdit/ci/74c4fd1afe5517cbc8e9a2272c45c410db95c014/ tree: https://sourceforge.net/p/jedit/jEdit/ci/74c4fd1afe5517cbc8e9a2272c45c410db95c014/tree/ commit 74c4fd1afe5517cbc8e9a2272c45c410db95c014 Author: Björn Kautler <Bj...@Ka...> Date: Mon Mar 31 00:11:59 2025 +0200 Do not check edit mode rules twice for hash chars that do not have upper- and lowercase versions diff --git a/doc/CHANGES.txt b/doc/CHANGES.txt index 6b8ed0e4b..59e5063c5 100644 --- a/doc/CHANGES.txt +++ b/doc/CHANGES.txt @@ -45,6 +45,8 @@ for contributing to this release. }}} {{{ Miscellaneous +- Do not check edit mode rules twice for hash chars that do not have upper- and + lowercase versions (Björn Kautler) }}} {{{ API Changes diff --git a/org/gjt/sp/jedit/syntax/ParserRuleSet.java b/org/gjt/sp/jedit/syntax/ParserRuleSet.java index a20c5c44d..84fffdad2 100644 --- a/org/gjt/sp/jedit/syntax/ParserRuleSet.java +++ b/org/gjt/sp/jedit/syntax/ParserRuleSet.java @@ -145,7 +145,9 @@ public class ParserRuleSet else { addRule(parserRule.upHashChar[0], parserRule); - addRule(Character.toLowerCase(parserRule.upHashChar[0]), parserRule); + char lowerHashChar = Character.toLowerCase(parserRule.upHashChar[0]); + if(lowerHashChar != parserRule.upHashChar[0]) + addRule(lowerHashChar, parserRule); } } else @@ -153,7 +155,9 @@ public class ParserRuleSet for (char upHashChar : parserRule.upHashChars) { addRule(upHashChar, parserRule); - addRule(Character.toLowerCase(upHashChar), parserRule); + char lowerHashChar = Character.toLowerCase(upHashChar); + if(lowerHashChar != upHashChar) + addRule(lowerHashChar, parserRule); } } } //}}} ----------------------------------------------------------------------- Summary of changes: doc/CHANGES.txt | 7 +++++++ modes/htaccess.xml | 1 - org/gjt/sp/jedit/buffer/JEditBuffer.java | 1 + org/gjt/sp/jedit/syntax/ParserRuleSet.java | 8 ++++++-- 4 files changed, 14 insertions(+), 3 deletions(-) hooks/post-receive -- jEdit core |
From: vampire0 <vam...@us...> - 2025-03-30 03:12:08
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "jEdit core". The branch, master has been updated via 78e5d38fac53681f82d9000bce85510378bc031b (commit) via 38a3513f4cf9b245d64148b4dcf1ddfc9c0fe3e0 (commit) via b0dc655b4f716071b7ac4bd73080f7f8cde19253 (commit) via bd1a37f73ca6fb8b162878da68606d590c6c6f1e (commit) via 8a951e9a551af16f9fab3c30566ad0d29f31dfd3 (commit) via 8c8f7d5333d4e1cd9fbd5615ecf4f311480f6505 (commit) via 29e2a1fb08b1e781bc1c98f450eb7569922d95d5 (commit) from 492aff312cfc20fb7c6e056921a5c9b6dbbc9fee (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit: https://sourceforge.net/p/jedit/jEdit/ci/78e5d38fac53681f82d9000bce85510378bc031b/ tree: https://sourceforge.net/p/jedit/jEdit/ci/78e5d38fac53681f82d9000bce85510378bc031b/tree/ commit 78e5d38fac53681f82d9000bce85510378bc031b Author: Björn Kautler <Bj...@Ka...> Date: Sun Mar 30 05:03:23 2025 +0200 Improve reliability of the jEdit server protocol diff --git a/doc/CHANGES.txt b/doc/CHANGES.txt index 2ff24867a..6b8ed0e4b 100644 --- a/doc/CHANGES.txt +++ b/doc/CHANGES.txt @@ -37,6 +37,11 @@ for contributing to this release. - Fix the server killer in the installer to use the correct settings directory (Björn Kautler) +- Improve reliability of the jEdit server protocol; it now does not hang + indefinitely anymore when connecting to a non-answering service and does + not do nothing anymore when connecting to a wrong-answering service + (Björn Kautler) + }}} {{{ Miscellaneous diff --git a/installer/ServerKiller.java b/installer/ServerKiller.java index ef4425435..05ea78475 100644 --- a/installer/ServerKiller.java +++ b/installer/ServerKiller.java @@ -58,64 +58,133 @@ public class ServerKiller if(portFile.exists()) { + BufferedReader portFileIn = null; + DataInputStream in = null; + DataOutputStream out = null; try { - BufferedReader in = new BufferedReader(new FileReader(portFile)); - String check = in.readLine(); - if(!check.equals("b")) + portFileIn = new BufferedReader(new FileReader(portFile)); + String protocolVersion = portFileIn.readLine(); + if(!("b".equals(protocolVersion) || "c".equals(protocolVersion))) { System.out.println("Wrong port file format"); return false; } - - int port = Integer.parseInt(in.readLine()); - int key = Integer.parseInt(in.readLine()); - - Socket socket = new Socket(InetAddress.getByName(null),port); - DataOutputStream out = new DataOutputStream( - socket.getOutputStream()); - out.writeInt(key); - - // we can't close the socket cleanly, because we want - // to wait for complete exit, and then it's too late. - // so the socket is closed when the JVM is shut down. - String script; - script = "jEdit.exit(null,true);\n"; - out.writeUTF(script); + int port = Integer.parseInt(portFileIn.readLine()); + int keyFromPortFile = Integer.parseInt(portFileIn.readLine()); + + Socket socket = new Socket(InetAddress.getLoopbackAddress(),port); - // block until its closed - try + in = new DataInputStream(socket.getInputStream()); + + boolean correctService; + if("b".equals(protocolVersion)) { - socket.getInputStream().read(); + // with protocol "b" just assume we are talking to a jEdit server + // later protocols should answer with the auth key to make sure + // we are connected to a proper jEdit server and not some + // service that happens to listen on the port in a stale port file + correctService = true; } - catch(Exception e) + else { - //should get an exception ! + // if the service does not answer at all, timeout after a second + socket.setSoTimeout(1000); + int keyByServer = in.readInt(); + if(keyByServer != keyFromPortFile) + { + System.out.println("The service" + + " answering on the server port did not follow" + + " the right protocol"); + correctService = false; + } + else + { + correctService = true; + } + socket.setSoTimeout(0); } - in.close(); - out.close(); + // the listening service did not answer with the expected response + // so do not send it further bytes but start a new jEdit instance + if(correctService) + { + out = new DataOutputStream(socket.getOutputStream()); + out.writeInt(keyFromPortFile); + + // we can't close the socket cleanly, because we want + // to wait for complete exit, and then it's too late. + // so the socket is closed when the JVM is shut down. + String script; + script = "jEdit.exit(null,true);\n"; + + out.writeUTF(script); + + // block until its closed + try + { + in.read(); + } + catch(Exception e) + { + //should get an exception ! + } + } } catch(FileNotFoundException fnfe) { //it exists : we checked that earlier ! + throw new AssertionError(fnfe); } catch(UnknownHostException uhe) { //localhost doesn't exist ? + throw new AssertionError(uhe); } catch(IOException ioe) { System.out.println("Exception while trying to connect to existing server:"); - System.out.println(ioe); + ioe.printStackTrace(System.out); System.out.println("Don't worry too much !"); return false; //warn the user } + finally + { + closeQuietly(portFileIn); + closeQuietly(in); + closeQuietly(out); + } } return true; } + private static void closeQuietly(Closeable closeable) + { + if(closeable != null) + { + try + { + if (closeable instanceof Flushable) + { + ((Flushable)closeable).flush(); + } + } + catch (IOException e) + { + // ignore + } + try + { + closeable.close(); + } + catch (IOException e) + { + //ignore + } + } + } + /** * try to connect to any running server instance and close it. * exit with an error code on failure, but not if no server was found. diff --git a/org/gjt/sp/jedit/EditServer.java b/org/gjt/sp/jedit/EditServer.java index d088b172e..288d08f96 100644 --- a/org/gjt/sp/jedit/EditServer.java +++ b/org/gjt/sp/jedit/EditServer.java @@ -82,7 +82,7 @@ public class EditServer extends Thread // Bind to any port on localhost; accept 2 simultaneous // connection attempts before rejecting connections socket = new ServerSocket(0, 2, - InetAddress.getByName(null)); + InetAddress.getLoopbackAddress()); authKey = new Random().nextInt(Integer.MAX_VALUE); int port = socket.getLocalPort(); @@ -90,7 +90,7 @@ public class EditServer extends Thread try { - out.write("b\n"); + out.write("c\n"); out.write(String.valueOf(port)); out.write("\n"); out.write(String.valueOf(authKey)); @@ -142,10 +142,14 @@ public class EditServer extends Thread Log.log(Log.MESSAGE,this,client + ": connected"); + DataOutputStream out = new DataOutputStream( + client.getOutputStream()); + out.writeInt(authKey); + DataInputStream in = new DataInputStream( client.getInputStream()); - handleClient(client, in); + handleClient(client, out, in); } catch(SocketTimeoutException e) { @@ -311,7 +315,7 @@ public class EditServer extends Thread //}}} //{{{ handleClient() method - private void handleClient(final Socket client, DataInputStream in) + private void handleClient(final Socket client, DataOutputStream out, DataInputStream in) throws Exception { int key = in.readInt(); @@ -321,6 +325,7 @@ public class EditServer extends Thread + " authorization key (got " + key + ", expected " + authKey + ")"); in.close(); + out.close(); client.close(); } else diff --git a/org/gjt/sp/jedit/jEdit.java b/org/gjt/sp/jedit/jEdit.java index 000ad4174..36722f7cb 100644 --- a/org/gjt/sp/jedit/jEdit.java +++ b/org/gjt/sp/jedit/jEdit.java @@ -292,45 +292,82 @@ public class jEdit //{{{ Try connecting to another running jEdit instance if(portFile != null && new File(portFile).exists()) { - BufferedReader in = null; + BufferedReader portFileIn = null; + DataInputStream in = null; DataOutputStream out = null; try { - in = new BufferedReader(new FileReader(portFile)); - String check = in.readLine(); - if(!"b".equals(check)) + portFileIn = new BufferedReader(new FileReader(portFile)); + String protocolVersion = portFileIn.readLine(); + if(!("b".equals(protocolVersion) || "c".equals(protocolVersion))) throw new IllegalArgumentException("Wrong port file format"); - int port = parseInt(in.readLine()); - int key = parseInt(in.readLine()); + int port = parseInt(portFileIn.readLine()); + int keyFromPortFile = parseInt(portFileIn.readLine()); // socket is closed via BeanShell script below @SuppressWarnings("resource") - Socket socket = new Socket(InetAddress.getByName(null),port); - out = new DataOutputStream(socket.getOutputStream()); - out.writeInt(key); + Socket socket = new Socket(InetAddress.getLoopbackAddress(),port); - String script; - if(quit) + in = new DataInputStream(socket.getInputStream()); + + boolean correctService; + if("b".equals(protocolVersion)) { - script = "socket.close();\n" - + "jEdit.exit(null,true);\n"; + // with protocol "b" just assume we are talking to a jEdit server + // later protocols should answer with the auth key to make sure + // we are connected to a proper jEdit server and not some + // service that happens to listen on the port in a stale port file + correctService = true; } else { - script = makeServerScript(wait,restore, - newView,newPlainView,args, - scriptFile); + // if the service does not answer at all, timeout after a second + socket.setSoTimeout(1000); + int keyByServer = in.readInt(); + if(keyByServer != keyFromPortFile) + { + Log.log(Log.MESSAGE,jEdit.class, "The service" + + " answering on the server port did not follow" + + " the right protocol"); + correctService = false; + } + else + { + correctService = true; + } + socket.setSoTimeout(0); } - out.writeUTF(script); + // the listening service did not answer with the expected response + // so do not send it further bytes but start a new jEdit instance + if(correctService) + { + out = new DataOutputStream(socket.getOutputStream()); + out.writeInt(keyFromPortFile); - Log.log(Log.DEBUG,jEdit.class,"Waiting for server"); + String script; + if(quit) + { + script = "socket.close();\n" + + "jEdit.exit(null,true);\n"; + } + else + { + script = makeServerScript(wait,restore, + newView,newPlainView,args, + scriptFile); + } - // block until its closed - socket.getInputStream().read(); + out.writeUTF(script); - System.exit(0); + Log.log(Log.DEBUG,jEdit.class,"Waiting for server"); + + // block until its closed + in.read(); + + System.exit(0); + } } catch(Exception e) { @@ -348,6 +385,7 @@ public class jEdit } finally { + IOUtilities.closeQuietly(portFileIn); IOUtilities.closeQuietly(in); IOUtilities.closeQuietly(out); } commit: https://sourceforge.net/p/jedit/jEdit/ci/38a3513f4cf9b245d64148b4dcf1ddfc9c0fe3e0/ tree: https://sourceforge.net/p/jedit/jEdit/ci/38a3513f4cf9b245d64148b4dcf1ddfc9c0fe3e0/tree/ commit 38a3513f4cf9b245d64148b4dcf1ddfc9c0fe3e0 Author: Björn Kautler <Bj...@Ka...> Date: Sun Mar 30 04:16:45 2025 +0200 Fix the server killer in the installer diff --git a/doc/CHANGES.txt b/doc/CHANGES.txt index 67463a98e..2ff24867a 100644 --- a/doc/CHANGES.txt +++ b/doc/CHANGES.txt @@ -34,6 +34,9 @@ for contributing to this release. settings directory, also look in the installation directory for doclets, and properly handle multiple doclet JARs (Björn Kautler) +- Fix the server killer in the installer to use the correct settings + directory (Björn Kautler) + }}} {{{ Miscellaneous diff --git a/installer/OperatingSystem.java b/installer/OperatingSystem.java index 7e301ddff..067392ab4 100644 --- a/installer/OperatingSystem.java +++ b/installer/OperatingSystem.java @@ -24,6 +24,10 @@ public abstract class OperatingSystem { public abstract String getInstallDirectory(String name, String version); + public File getSettingsDirectory() { + return new File(System.getProperty("user.home"), ".jedit"); + } + public abstract static class OSTask { protected Install installer; @@ -284,6 +288,14 @@ public abstract class OperatingSystem return "/Applications/" + name + " " + version; } + public File getSettingsDirectory() + { + File result = new File(System.getProperty("user.home"), "Library/jEdit"); + if(result.isDirectory()) + return result; + return super.getSettingsDirectory(); + } + public String getExtraClassPath() { return "/System/Library/Java/:"; @@ -307,6 +319,18 @@ public abstract class OperatingSystem return programDir + "\\" + name + " " + version; } + public File getSettingsDirectory() + { + String appData = System.getenv("APPDATA"); + if(appData != null) + { + File result = new File(appData, "jEdit"); + if(result.isDirectory()) + return result; + } + return super.getSettingsDirectory(); + } + public class JEditLauncherOSTask extends OSTask { public JEditLauncherOSTask(Install installer) diff --git a/installer/ServerKiller.java b/installer/ServerKiller.java index 5b6cf05bd..ef4425435 100644 --- a/installer/ServerKiller.java +++ b/installer/ServerKiller.java @@ -27,6 +27,8 @@ package installer; import java.io.*; import java.net.*; +import static installer.OperatingSystem.getOperatingSystem; + /** * Utility class to check for a running jEdit server, * and stop it. @@ -39,7 +41,7 @@ import java.net.*; */ public class ServerKiller { - + /** * try to contact a running instance of jEdit Server * and ask it to close. @@ -48,14 +50,12 @@ public class ServerKiller */ public static boolean quitjEditServer() { - + /* {{{ default server file location */ - String settingsDirectory = System.getProperty("user.home"); - File portFile; - File f = new File(settingsDirectory); - portFile = new File(f,".jedit/server"); + File settingsDirectory = getOperatingSystem().getSettingsDirectory(); + File portFile = new File(settingsDirectory,"server"); /* }}} */ - + if(portFile.exists()) { try @@ -115,7 +115,7 @@ public class ServerKiller } return true; } - + /** * try to connect to any running server instance and close it. * exit with an error code on failure, but not if no server was found. @@ -129,5 +129,3 @@ public class ServerKiller } } } - - commit: https://sourceforge.net/p/jedit/jEdit/ci/b0dc655b4f716071b7ac4bd73080f7f8cde19253/ tree: https://sourceforge.net/p/jedit/jEdit/ci/b0dc655b4f716071b7ac4bd73080f7f8cde19253/tree/ commit b0dc655b4f716071b7ac4bd73080f7f8cde19253 Author: Björn Kautler <Bj...@Ka...> Date: Sun Mar 30 03:54:58 2025 +0200 Some fixes for the Preview_JavaDoc_Of_Current_Buffer.bsh macro diff --git a/doc/CHANGES.txt b/doc/CHANGES.txt index e79fec6b8..67463a98e 100644 --- a/doc/CHANGES.txt +++ b/doc/CHANGES.txt @@ -30,6 +30,10 @@ for contributing to this release. - Do not abort edit server on exception, like timeout due to script-kiddie DoS protection (Björn Kautler) +- Fix the Preview_JavaDoc_Of_Current_Buffer.bsh macro to use the correct + settings directory, also look in the installation directory for doclets, + and properly handle multiple doclet JARs (Björn Kautler) + }}} {{{ Miscellaneous diff --git a/macros/Java/Preview_JavaDoc_Of_Current_Buffer.bsh b/macros/Java/Preview_JavaDoc_Of_Current_Buffer.bsh index 0a330df09..fa22ac798 100644 --- a/macros/Java/Preview_JavaDoc_Of_Current_Buffer.bsh +++ b/macros/Java/Preview_JavaDoc_Of_Current_Buffer.bsh @@ -435,10 +435,11 @@ else String[] docletClassName = { "", "bp.doclet.Bouvard", "com.mf.doclet.docbook.DocBookDoclet", "codeinsight.xmldoclet.XMLDoclet", - "com.tarsec.javadoc.pdfdoclet.PDFDoclet"}; - String[] docletClassPath = { "", "Bouvard.jar", "dbdoclet.jar", - "xmldoclet.jar", - "pdfdoclet.jar:itext.jar:/usr/lib/pkgs" }; + "com.tarsec.javadoc.pdfdoclet.PDFDoclet" }; + String[][] docletClassPath = { { "" }, { "Bouvard.jar" }, { "dbdoclet.jar" }, + { "xmldoclet.jar" }, + { "pdfdoclet.jar", + "itext.jar" + SYSTEM_PATH_SEPERATOR + "/usr/lib/pkgs" } }; String PDFDocletConfigPropertiesFile = "pdfdoclet.config.properties"; // Set the DEFAULT Doclet to the JavaDoclet String proceed = options[0]; @@ -481,8 +482,7 @@ else { // you might need some of the follwing if you want to add some // commandline parms - String jedit_userdir=System.getProperty("user.home") + - SYSTEM_FILE_SEPERATOR +".jedit"; + String jedit_userdir=jEdit.getSettingsDirectory(); String jedit_homedir=jEdit.getJEditHome(); String currClassPath=System.getProperty("java.class.path"); String java_home=System.getProperty("java.home"); @@ -501,11 +501,25 @@ else command.append(docletClassName[docletChoice]); command.append("\" "); command.append("-docletpath \""); - command.append(jedit_userdir); - command.append(SYSTEM_FILE_SEPERATOR); - command.append("jars"); - command.append(SYSTEM_FILE_SEPERATOR); - command.append(docletClassPath[docletChoice]); + boolean separator = false; + for (entry : docletClassPath[docletChoice]) + { + if (separator) { + command.append(SYSTEM_PATH_SEPERATOR); + } + separator = true; + command.append(jedit_userdir); + command.append(SYSTEM_FILE_SEPERATOR); + command.append("jars"); + command.append(SYSTEM_FILE_SEPERATOR); + command.append(entry); + command.append(SYSTEM_PATH_SEPERATOR); + command.append(jedit_homedir); + command.append(SYSTEM_FILE_SEPERATOR); + command.append("jars"); + command.append(SYSTEM_FILE_SEPERATOR); + command.append(entry); + } command.append("\" "); //}}} @@ -570,7 +584,7 @@ else } else - { + { //{{{ standard doclet parms if (addWindowTitle) command.append(windowTitle.toString()); @@ -594,7 +608,7 @@ else command.append("-d \""); command.append(outputDir); command.append("\" "); - + //}}} } @@ -686,7 +700,7 @@ System.out.println("************************************************************ retVal = _returnSystemCommand(view, command.toString()); if (retVal.indexOf("error") == -1) { - + // Build the url for the Viewer // If you don't want to use the InfoViewer plugin... // easy, change the implementation in this macros _infoView method @@ -820,4 +834,3 @@ Macro index data (in DocBook format) */ // end Preview_JavaDoc_of_Buffer.bsh - commit: https://sourceforge.net/p/jedit/jEdit/ci/bd1a37f73ca6fb8b162878da68606d590c6c6f1e/ tree: https://sourceforge.net/p/jedit/jEdit/ci/bd1a37f73ca6fb8b162878da68606d590c6c6f1e/tree/ commit bd1a37f73ca6fb8b162878da68606d590c6c6f1e Author: Björn Kautler <Bj...@Ka...> Date: Sat Mar 29 20:12:24 2025 +0100 Do not abort edit server on exceptions diff --git a/doc/CHANGES.txt b/doc/CHANGES.txt index 340d85c88..e79fec6b8 100644 --- a/doc/CHANGES.txt +++ b/doc/CHANGES.txt @@ -27,6 +27,9 @@ for contributing to this release. - Do not abort edit server due to misbehaving client that is not following the edit server protocol properly (Björn Kautler) +- Do not abort edit server on exception, like timeout due to script-kiddie DoS + protection (Björn Kautler) + }}} {{{ Miscellaneous diff --git a/org/gjt/sp/jedit/EditServer.java b/org/gjt/sp/jedit/EditServer.java index 6c02cf778..d088b172e 100644 --- a/org/gjt/sp/jedit/EditServer.java +++ b/org/gjt/sp/jedit/EditServer.java @@ -147,11 +147,15 @@ public class EditServer extends Thread handleClient(client, in); } + catch(SocketTimeoutException e) + { + if(!abort) + Log.log(Log.NOTICE,this,e); + } catch(Exception e) { if(!abort) Log.log(Log.ERROR,this,e); - abort = true; } } } //}}} commit: https://sourceforge.net/p/jedit/jEdit/ci/8a951e9a551af16f9fab3c30566ad0d29f31dfd3/ tree: https://sourceforge.net/p/jedit/jEdit/ci/8a951e9a551af16f9fab3c30566ad0d29f31dfd3/tree/ commit 8a951e9a551af16f9fab3c30566ad0d29f31dfd3 Author: Björn Kautler <Bj...@Ka...> Date: Sat Mar 29 20:04:36 2025 +0100 Do not abort edit server on misbehaving client diff --git a/doc/CHANGES.txt b/doc/CHANGES.txt index ad3b276ef..340d85c88 100644 --- a/doc/CHANGES.txt +++ b/doc/CHANGES.txt @@ -24,6 +24,9 @@ for contributing to this release. - Make sure socket is closed and server file deleted on edit server aborting (Björn Kautler) +- Do not abort edit server due to misbehaving client that is not following the + edit server protocol properly (Björn Kautler) + }}} {{{ Miscellaneous diff --git a/org/gjt/sp/jedit/EditServer.java b/org/gjt/sp/jedit/EditServer.java index 7a96d10f9..6c02cf778 100644 --- a/org/gjt/sp/jedit/EditServer.java +++ b/org/gjt/sp/jedit/EditServer.java @@ -145,8 +145,7 @@ public class EditServer extends Thread DataInputStream in = new DataInputStream( client.getInputStream()); - if(!handleClient(client,in)) - abort = true; + handleClient(client, in); } catch(Exception e) { @@ -308,7 +307,7 @@ public class EditServer extends Thread //}}} //{{{ handleClient() method - private boolean handleClient(final Socket client, DataInputStream in) + private void handleClient(final Socket client, DataInputStream in) throws Exception { int key = in.readInt(); @@ -319,8 +318,6 @@ public class EditServer extends Thread + ", expected " + authKey + ")"); in.close(); client.close(); - - return false; } else { @@ -363,8 +360,6 @@ public class EditServer extends Thread } } }); - - return true; } } //}}} commit: https://sourceforge.net/p/jedit/jEdit/ci/8c8f7d5333d4e1cd9fbd5615ecf4f311480f6505/ tree: https://sourceforge.net/p/jedit/jEdit/ci/8c8f7d5333d4e1cd9fbd5615ecf4f311480f6505/tree/ commit 8c8f7d5333d4e1cd9fbd5615ecf4f311480f6505 Author: Björn Kautler <Bj...@Ka...> Date: Sat Mar 29 19:43:52 2025 +0100 Make sure socket is closed and server file deleted on edit server aborting diff --git a/doc/CHANGES.txt b/doc/CHANGES.txt index cb50d1684..ad3b276ef 100644 --- a/doc/CHANGES.txt +++ b/doc/CHANGES.txt @@ -21,6 +21,9 @@ for contributing to this release. - fix empty Default Line Separator combobox in EncodingOptionsPane (Alan Ezust) +- Make sure socket is closed and server file deleted on edit server aborting + (Björn Kautler) + }}} {{{ Miscellaneous diff --git a/org/gjt/sp/jedit/EditServer.java b/org/gjt/sp/jedit/EditServer.java index 476f8a0ed..7a96d10f9 100644 --- a/org/gjt/sp/jedit/EditServer.java +++ b/org/gjt/sp/jedit/EditServer.java @@ -126,7 +126,10 @@ public class EditServer extends Thread while (true) { if(abort) + { + stopServer(); return; + } try { commit: https://sourceforge.net/p/jedit/jEdit/ci/29e2a1fb08b1e781bc1c98f450eb7569922d95d5/ tree: https://sourceforge.net/p/jedit/jEdit/ci/29e2a1fb08b1e781bc1c98f450eb7569922d95d5/tree/ commit 29e2a1fb08b1e781bc1c98f450eb7569922d95d5 Author: Björn Kautler <Bj...@Ka...> Date: Sat Mar 29 19:56:12 2025 +0100 Fix whitespaces in changelog diff --git a/doc/CHANGES.txt b/doc/CHANGES.txt index a145263e9..cb50d1684 100644 --- a/doc/CHANGES.txt +++ b/doc/CHANGES.txt @@ -10,11 +10,15 @@ for contributing to this release. {{{ Bug Fixes - allow '(re)' glob in edit mode to contain alternative without enclosing - brackets (Eric Le Lay) + brackets (Eric Le Lay) + - fixes for GenericGUIUtilities in macros (patch #636, #637, #638, Robert Schwenn) + - fix for SyntaxUtilities in Color_Picker macro (patch #639, Robert Schwenn) + - fix Run_Script macro beanshell under windows (patch #641, Robert Schwenn) + - fix empty Default Line Separator combobox in EncodingOptionsPane (Alan Ezust) }}} ----------------------------------------------------------------------- Summary of changes: doc/CHANGES.txt | 27 ++++- installer/OperatingSystem.java | 24 ++++ installer/ServerKiller.java | 139 ++++++++++++++++------ macros/Java/Preview_JavaDoc_Of_Current_Buffer.bsh | 43 ++++--- org/gjt/sp/jedit/EditServer.java | 27 +++-- org/gjt/sp/jedit/jEdit.java | 80 +++++++++---- 6 files changed, 257 insertions(+), 83 deletions(-) hooks/post-receive -- jEdit core |
From: <vam...@us...> - 2025-03-20 19:40:08
|
Revision: 25772 http://sourceforge.net/p/jedit/svn/25772 Author: vampire0 Date: 2025-03-20 19:40:06 +0000 (Thu, 20 Mar 2025) Log Message: ----------- Add continuous builds to download page Modified Paths: -------------- www/trunk/htdocs/download.html Modified: www/trunk/htdocs/download.html =================================================================== --- www/trunk/htdocs/download.html 2025-03-17 03:23:56 UTC (rev 25771) +++ www/trunk/htdocs/download.html 2025-03-20 19:40:06 UTC (rev 25772) @@ -195,19 +195,19 @@ <td></td> </tr> -<!--tr> +<tr> <td colspan="4"><hr></td> </tr> <tr class="hilite"> <td></td> -<td colspan=3><b>Daily Builds:</b> jEdit 5.7pre1 (development trunk) <a href="https://sourceforge.net/p/jedit/svn/HEAD/tree/jEdit/trunk/doc/CHANGES.txt">Changes</a> </td> +<td colspan=3><b>Continuous Builds:</b> jEdit 5.8pre1 (master branch) <a href="https://github.com/jEdit-editor/jEdit/blob/master/doc/CHANGES.txt">Changes</a> </td> </tr> <tr class="hilite"> <td>Download: </td> -<td colspan=3><a href="http://www.tellurianring.com/projects/jedit-daily/">Daily Builds</a></td> -</tr--> +<td colspan=3><a href="https://github.com/jEdit-editor/jEdit/actions/workflows/build.yaml?query=branch%3Amaster">Continuous Builds</a></td> +</tr> </table> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: vampire0 <vam...@us...> - 2025-03-20 18:16:34
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "jEdit core". The branch, master has been updated via 492aff312cfc20fb7c6e056921a5c9b6dbbc9fee (commit) from e7bba0b3b4e9a337cae64e6e217e3efbfa0fe337 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit: https://sourceforge.net/p/jedit/jEdit/ci/492aff312cfc20fb7c6e056921a5c9b6dbbc9fee/ tree: https://sourceforge.net/p/jedit/jEdit/ci/492aff312cfc20fb7c6e056921a5c9b6dbbc9fee/tree/ commit 492aff312cfc20fb7c6e056921a5c9b6dbbc9fee Author: Björn Kautler <Bj...@Ka...> Date: Thu Mar 20 19:15:59 2025 +0100 Fix JavaDoc building on newer JDKs diff --git a/org/gjt/sp/jedit/ActionSet.java b/org/gjt/sp/jedit/ActionSet.java index 50e1b6843..65308bf4e 100644 --- a/org/gjt/sp/jedit/ActionSet.java +++ b/org/gjt/sp/jedit/ActionSet.java @@ -38,7 +38,7 @@ import javax.annotation.Nonnull; * A set of actions, either loaded from an XML file, or constructed at runtime * by a plugin. * - * <h3>Action sets loaded from XML files</h3> + * <h2>Action sets loaded from XML files</h2> * * Action sets are read from these files inside the plugin JAR: * <ul> @@ -104,14 +104,14 @@ import javax.annotation.Nonnull; * Each action must have a property <code><i>name</i>.label</code> containing * the action's menu item label. * - * <h3>View actions</h3> + * <h2>View actions</h2> * * Actions defined in <code>actions.xml</code> can be added to the view's * <b>Plugins</b> menu; see {@link EditPlugin}. * The action code may use any standard predefined * BeanShell variable; see {@link BeanShell}. * - * <h3>File system browser actions</h3> + * <h2>File system browser actions</h2> * * Actions defined in <code>actions.xml</code> can be added to the file * system browser's <b>Plugins</b> menu; see {@link EditPlugin}. @@ -123,7 +123,7 @@ import javax.annotation.Nonnull; * File system browser actions should not define * <code><IS_SELECTED></code> blocks. * - * <h3>Custom action sets</h3> + * <h2>Custom action sets</h2> * * Call {@link jEdit#addActionSet(ActionSet)} to add a custom action set to * jEdit's action context. You must also call {@link #initKeyBindings()} for new diff --git a/org/gjt/sp/jedit/EditPlugin.java b/org/gjt/sp/jedit/EditPlugin.java index f89370256..19dd47fa8 100644 --- a/org/gjt/sp/jedit/EditPlugin.java +++ b/org/gjt/sp/jedit/EditPlugin.java @@ -35,7 +35,7 @@ import java.io.*; * Alternatively, instead of extending this class, a plugin core class can * extend {@link EBPlugin} to automatically receive EditBus messages. * - * <h3>Basic plugin information properties</h3> + * <h2>Basic plugin information properties</h2> * * Note that in all cases above where a <i>className</i> is needed, the fully * qualified class name, including the package name, if any, must be used.<p> @@ -100,7 +100,7 @@ import java.io.*; * description.html are both located in the root directory of the plugin, * as well as the generated JAR. </p> * - * <h3>Plugin dependency properties</h3> + * <h2>Plugin dependency properties</h2> * * <p>Plugin dependencies are also specified using properties. * Each dependency is defined in a property named with @@ -136,7 +136,7 @@ plugin.console.ConsolePlugin.depend.2=plugin errorlist.ErrorListPlugin 1.4 plugin.console.ConsolePlugin.depend.3=optional plugin projectviewer.ProjectPlugin 2.1.0.92 </pre> - * <h3>Plugin menu item properties</h3> + * <h2>Plugin menu item properties</h2> * *<p> To add your plugin to the view's <b>Plugins</b> menu, define one of these two * properties: </p> @@ -179,7 +179,7 @@ plugin.console.ConsolePlugin.depend.3=optional plugin projectviewer.ProjectPlugi * file, file system browser actions are defined in a * <code>browser.actions.xml</code> file; see {@link ActionSet}. *</p> - * <h3>Plugin option pane properties</h3> + * <h2>Plugin option pane properties</h2> * * <p>To add your plugin to the <b>Plugin Options</b> dialog box, define one of * these two properties: @@ -201,7 +201,7 @@ plugin.console.ConsolePlugin.depend.3=optional plugin projectviewer.ProjectPlugi * <li><code>options.<i>paneName</i>.code</code> - BeanShell code that * evaluates to an instance of the {@link OptionPane} class.</li> * </ul> - * <h3>Example</h3> + * <h2>Example</h2> * * Here is an example set of plugin properties: * diff --git a/org/gjt/sp/jedit/JEditActionSet.java b/org/gjt/sp/jedit/JEditActionSet.java index ebeb1c0af..4442b03d6 100644 --- a/org/gjt/sp/jedit/JEditActionSet.java +++ b/org/gjt/sp/jedit/JEditActionSet.java @@ -38,7 +38,7 @@ import static org.gjt.sp.util.StandardUtilities.EMPTY_STRING_ARRAY; * A set of actions, either loaded from an XML file, or constructed at runtime * by a plugin. <p> * - * <h3>Action sets loaded from XML files</h3> + * <h2>Action sets loaded from XML files</h2> * * Action sets are read from these files inside the plugin JAR: * <ul> @@ -104,14 +104,14 @@ import static org.gjt.sp.util.StandardUtilities.EMPTY_STRING_ARRAY; * Each action must have a property <code><i>name</i>.label</code> containing * the action's menu item label. * - * <h3>View actions</h3> + * <h2>View actions</h2> * * Actions defined in <code>actions.xml</code> can be added to the view's * <b>Plugins</b> menu; see {@link EditPlugin}. * The action code may use any standard predefined * BeanShell variable; see {@link BeanShell}. * - * <h3>File system browser actions</h3> + * <h2>File system browser actions</h2> * * Actions defined in <code>actions.xml</code> can be added to the file * system browser's <b>Plugins</b> menu; see {@link EditPlugin}. @@ -123,7 +123,7 @@ import static org.gjt.sp.util.StandardUtilities.EMPTY_STRING_ARRAY; * File system browser actions should not define * <code><IS_SELECTED></code> blocks. * - * <h3>Custom action sets</h3> + * <h2>Custom action sets</h2> * * Call {@link jEdit#addActionSet(ActionSet)} to add a custom action set to * jEdit's action context. You must also call {@link #initKeyBindings()} for new diff --git a/org/gjt/sp/jedit/PluginJAR.java b/org/gjt/sp/jedit/PluginJAR.java index a8d9c43d5..e7b39fce5 100644 --- a/org/gjt/sp/jedit/PluginJAR.java +++ b/org/gjt/sp/jedit/PluginJAR.java @@ -79,7 +79,7 @@ import static org.gjt.sp.jedit.EditBus.EBHandler; /** * Loads and unloads plugins.<p> * - * <h3>JAR file contents</h3> + * <h2>JAR file contents</h2> * * When loading a plugin, jEdit looks for the following resources: * @@ -123,7 +123,7 @@ import static org.gjt.sp.jedit.EditBus.EBHandler; * {@link EditPlugin} and define a few required properties, otherwise it is * ignored. * - * <h3>Dynamic and deferred loading</h3> + * <h2>Dynamic and deferred loading</h2> * * Unlike in prior jEdit versions, jEdit 4.2 and later allow * plugins to be added and removed to the resident set at any time using diff --git a/org/gjt/sp/jedit/io/VFS.java b/org/gjt/sp/jedit/io/VFS.java index 2b85f2d82..626919f02 100644 --- a/org/gjt/sp/jedit/io/VFS.java +++ b/org/gjt/sp/jedit/io/VFS.java @@ -63,7 +63,7 @@ import javax.annotation.Nullable; * * See {@link org.gjt.sp.jedit.ServiceManager} for details.<p> * - * <h3>Session objects:</h3> + * <h2>Session objects:</h2> * * A session is used to persist things like login information, any network * sockets, etc. File system implementations that do not need this kind of @@ -83,7 +83,7 @@ import javax.annotation.Nullable; * When done, the session must be disposed of using * {@link #_endVFSSession(Object,Component)}.<p> * - * <h3>Thread safety:</h3> + * <h2>Thread safety:</h2> * * The following methods cannot be called from an I/O thread: * @@ -97,7 +97,7 @@ import javax.annotation.Nullable; * * All remaining methods are required to be thread-safe in subclasses. * - * <h3>Implementing a VFS</h3> + * <h2>Implementing a VFS</h2> * * You can override as many or as few methods as you want. Make sure * {@link #getCapabilities()} returns a value reflecting the functionality ----------------------------------------------------------------------- Summary of changes: org/gjt/sp/jedit/ActionSet.java | 8 ++++---- org/gjt/sp/jedit/EditPlugin.java | 10 +++++----- org/gjt/sp/jedit/JEditActionSet.java | 8 ++++---- org/gjt/sp/jedit/PluginJAR.java | 4 ++-- org/gjt/sp/jedit/io/VFS.java | 6 +++--- 5 files changed, 18 insertions(+), 18 deletions(-) hooks/post-receive -- jEdit core |
From: vampire0 <vam...@us...> - 2025-03-17 04:18:41
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "jEdit jEdit plugin". The branch, master has been updated via e7bba0b3b4e9a337cae64e6e217e3efbfa0fe337 (commit) via 03596d317b52a7152aefa3731e081268c3c53cef (commit) from 998bce256c6a08e5ab1b74c90553ca549191db80 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit: https://sourceforge.net/p/jedit/jEdit/ci/e7bba0b3b4e9a337cae64e6e217e3efbfa0fe337/ tree: https://sourceforge.net/p/jedit/jEdit/ci/e7bba0b3b4e9a337cae64e6e217e3efbfa0fe337/tree/ commit e7bba0b3b4e9a337cae64e6e217e3efbfa0fe337 Author: Björn Kautler <Bj...@Ka...> Date: Mon Mar 17 05:18:29 2025 +0100 Work around hdiutil problem on newer macOS diff --git a/build.xml b/build.xml index 3294b969e..9928ed7fc 100644 --- a/build.xml +++ b/build.xml @@ -1263,15 +1263,18 @@ <fileset dir="${dist.dir}" includes="*${mac.disk.image.filename}"/> </delete> - <exec executable="hdiutil" - failonerror="true"> - <arg value="create"/> - <arg value="-volname"/> - <arg value="jEdit"/> - <arg value="-srcfolder"/> - <arg file="${dist.dir}/classes/mac"/> - <arg file="${dist.dir}/orig-${mac.disk.image.filename}"/> - </exec> + <!-- work-around for https://github.com/actions/runner-images/issues/7522 --> + <retry retrycount="3" retrydelay="1000"> + <exec executable="hdiutil" + failonerror="true"> + <arg value="create"/> + <arg value="-volname"/> + <arg value="jEdit"/> + <arg value="-srcfolder"/> + <arg file="${dist.dir}/classes/mac"/> + <arg file="${dist.dir}/orig-${mac.disk.image.filename}"/> + </exec> + </retry> <exec executable="hdiutil" failonerror="true"> <arg value="convert"/> commit: https://sourceforge.net/p/jedit/jEdit/ci/03596d317b52a7152aefa3731e081268c3c53cef/ tree: https://sourceforge.net/p/jedit/jEdit/ci/03596d317b52a7152aefa3731e081268c3c53cef/tree/ commit 03596d317b52a7152aefa3731e081268c3c53cef Author: Björn Kautler <Bj...@Ka...> Date: Mon Mar 17 05:17:45 2025 +0100 Fix number-format problem when building exe launcher diff --git a/build.xml b/build.xml index d4ea77222..3294b969e 100644 --- a/build.xml +++ b/build.xml @@ -167,6 +167,7 @@ + (beta != 99 ? "pre" + beta : "." + micro); project.setUserProperty("jedit.version", version); project.setUserProperty("jedit.build.number", build); + project.setUserProperty("jedit.build.number.no.leading.zeros", major + "." + minor + "." + beta + "." + micro); project.setUserProperty("jedit.version.final", Boolean.toString(beta == 99)); </script> <property name="dist.jar.filename" @@ -1416,6 +1417,8 @@ value="${jar.filename}"/> <filter token="jedit.build.number" value="${jedit.build.number}"/> + <filter token="jedit.build.number.no.leading.zeros" + value="${jedit.build.number.no.leading.zeros}"/> <filter token="jedit.version" value="${jedit.version}"/> <filter token="target.java.version" diff --git a/package-files/windows/jedit.launch4j.xml b/package-files/windows/jedit.launch4j.xml index fd326365a..b920eb228 100644 --- a/package-files/windows/jedit.launch4j.xml +++ b/package-files/windows/jedit.launch4j.xml @@ -36,11 +36,11 @@ <minVersion>@target.java.version@</minVersion> </jre> <versionInfo> - <fileVersion>@jedit.build.number@</fileVersion> + <fileVersion>@jedit.build.number.no.leading.zeros@</fileVersion> <txtFileVersion>@jedit.version@</txtFileVersion> <fileDescription>jEdit - Programmer's Text Editor</fileDescription> <copyright>Copyright © 19...@cu...ar@ Contributors</copyright> - <productVersion>@jedit.build.number@</productVersion> + <productVersion>@jedit.build.number.no.leading.zeros@</productVersion> <txtProductVersion>@jedit.version@</txtProductVersion> <productName>jEdit</productName> <companyName>Contributors</companyName> ----------------------------------------------------------------------- Summary of changes: build.xml | 24 +++++++++++++++--------- package-files/windows/jedit.launch4j.xml | 4 ++-- 2 files changed, 17 insertions(+), 11 deletions(-) hooks/post-receive -- jEdit jEdit plugin |
From: vampire0 <vam...@us...> - 2025-03-17 03:51:01
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "jEdit jEdit plugin". The branch, master has been updated via 998bce256c6a08e5ab1b74c90553ca549191db80 (commit) from 14cb2e50284ccf1d33fecf872260384e7fe04ff1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit: https://sourceforge.net/p/jedit/jEdit/ci/998bce256c6a08e5ab1b74c90553ca549191db80/ tree: https://sourceforge.net/p/jedit/jEdit/ci/998bce256c6a08e5ab1b74c90553ca549191db80/tree/ commit 998bce256c6a08e5ab1b74c90553ca549191db80 Author: Björn Kautler <Bj...@Ka...> Date: Mon Mar 17 04:14:30 2025 +0100 Add continous integration GitHub workflow diff --git a/.github/workflows/build.main.kts b/.github/workflows/build.main.kts new file mode 100755 index 000000000..b27d166b3 --- /dev/null +++ b/.github/workflows/build.main.kts @@ -0,0 +1,376 @@ +#!/usr/bin/env kotlin + +@file:Repository("https://repo.maven.apache.org/maven2/") +@file:DependsOn("io.github.typesafegithub:github-workflows-kt:3.2.0") + +@file:Repository("https://bindings.krzeminski.it/") + +@file:DependsOn("tecolicom:actions-use-homebrew-tools___major:[v1,v2-alpha)") +@file:DependsOn("Wandalen:wretry.action__main___major:[v3,v4-alpha)") +@file:DependsOn("actions:checkout___major:[v4,v5-alpha)") +@file:DependsOn("actions:setup-java___major:[v4,v5-alpha)") +@file:DependsOn("DamianReeves:write-file-action___minor:[v1.3,v1.4-alpha)") +@file:DependsOn("actions:cache___major:[v4,v5-alpha)") +@file:DependsOn("actions:cache__restore___major:[v4,v5-alpha)") +@file:DependsOn("actions:cache__save___major:[v4,v5-alpha)") +@file:DependsOn("actions:upload-artifact___major:[v4,v5-alpha)") + +import io.github.typesafegithub.workflows.actions.actions.Cache +import io.github.typesafegithub.workflows.actions.actions.CacheRestore +import io.github.typesafegithub.workflows.actions.actions.CacheSave +import io.github.typesafegithub.workflows.actions.actions.Checkout +import io.github.typesafegithub.workflows.actions.actions.SetupJava +import io.github.typesafegithub.workflows.actions.actions.SetupJava.Distribution.Temurin +import io.github.typesafegithub.workflows.actions.actions.UploadArtifact +import io.github.typesafegithub.workflows.actions.actions.UploadArtifact.BehaviorIfNoFilesFound.Error +import io.github.typesafegithub.workflows.actions.actions.UploadArtifact.BehaviorIfNoFilesFound.Ignore +import io.github.typesafegithub.workflows.actions.actions.UploadArtifact.CompressionLevel.NoCompression +import io.github.typesafegithub.workflows.actions.damianreeves.WriteFileAction +import io.github.typesafegithub.workflows.actions.tecolicom.ActionsUseHomebrewTools +import io.github.typesafegithub.workflows.actions.wandalen.WretryActionMain +import io.github.typesafegithub.workflows.domain.AbstractResult.Status.Skipped +import io.github.typesafegithub.workflows.domain.AbstractResult.Status.Success +import io.github.typesafegithub.workflows.domain.RunnerType +import io.github.typesafegithub.workflows.domain.RunnerType.UbuntuLatest +import io.github.typesafegithub.workflows.domain.Shell.Bash +import io.github.typesafegithub.workflows.domain.triggers.PullRequest +import io.github.typesafegithub.workflows.domain.triggers.Push +import io.github.typesafegithub.workflows.dsl.expressions.Contexts.always +import io.github.typesafegithub.workflows.dsl.expressions.Contexts.runner +import io.github.typesafegithub.workflows.dsl.expressions.expr +import io.github.typesafegithub.workflows.dsl.workflow + +workflow( + name = "Build", + on = listOf( + Push(), + PullRequest() + ), + sourceFile = __FILE__ +) { + val allPossibleArtifacts = listOf( + Artifact( + name = "Manual in A4 Paper size", + path = "dist/jedit*manual-a4.pdf" + ), + Artifact( + name = "Manual in Letter Paper size", + path = "dist/jedit*manual-letter.pdf" + ), + Artifact( + name = "Source Package", + path = "dist/jedit*source.tar.bz2" + ), + Artifact( + name = "Java based Installer", + path = "dist/jedit*install.jar" + ), + Artifact( + name = "Slackware Installer", + path = "dist/jedit-*-noarch-1sao.tgz" + ), + Artifact( + name = "Debian Installer", + path = "dist/jedit_*_all.deb" + ), + Artifact( + name = "Windows Installer", + path = "dist/jedit*install.exe" + ), + Artifact( + name = "macOS Installer", + path = "dist/jedit*install.dmg", + condition = "${runner.os} == 'macOS'" + ), + Artifact( + name = "macOS Intermediate Result", + path = "dist/jedit*-dist-mac-finish.tar.bz2", + condition = "${runner.os} != 'macOS'" + ), + Artifact( + name = "Debian Repository Packages File", + path = "dist/Packages", + ignoreIfMissing = true + ), + Artifact( + name = "Debian Repository Packages File (gz)", + path = "dist/Packages.gz", + ignoreIfMissing = true + ), + Artifact( + name = "Debian Repository Packages File (bz2)", + path = "dist/Packages.bz2", + ignoreIfMissing = true + ), + Artifact( + name = "Debian Repository Release File", + path = "dist/Release", + ignoreIfMissing = true + ), + Artifact( + name = "Debian Repository Release File Signature", + path = "dist/Release.gpg", + ignoreIfMissing = true + ) + ) + + val build = job( + id = "build", + name = "Build on ${expr("matrix.os")}", + runsOn = RunnerType.Custom(expr("matrix.os")), + _customArguments = mapOf( + "strategy" to mapOf( + "fail-fast" to false, + "matrix" to mapOf( + "os" to listOf( + "ubuntu-latest", + "windows-latest", + "macos-latest" + ) + ) + ) + ) + ) { + run( + name = "Install Wine on Linux", + command = """ + sudo dpkg --add-architecture i386 + sudo wget -nc -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key + sudo wget -NP /etc/apt/sources.list.d/ "https://dl.winehq.org/wine-builds/ubuntu/dists/${'$'}(lsb_release -c | grep -o '\w*${'$'}')/winehq-${'$'}(lsb_release -c | grep -o '\w*${'$'}').sources" + sudo apt update + sudo apt install --yes --no-install-recommends winehq-stable + winecfg /v win10 + """.trimIndent(), + condition = "${runner.os} == 'Linux'" + ) + + uses( + name = "Install Wine on macOS", + action = ActionsUseHomebrewTools( + tools = listOf("wine-stable"), + path = listOf( + "/Applications", + "/Library" + ) + ), + condition = "${runner.os} == 'macOS'" + ) + + val innoSetupInstaller = "${expr { runner.temp }}/innosetup-6.3.3.exe" + + val cacheInnoSetupInstaller = uses( + name = "Cache InnoSetup installer on Linux and macOS", + action = Cache( + path = listOf(innoSetupInstaller), + key = innoSetupInstaller.substringAfterLast('/') + ), + condition = "(${runner.os} == 'Linux') || (${runner.os} == 'macOS')" + ) + + run( + name = "Provision InnoSetup on Linux and macOS", + command = "wget -O $innoSetupInstaller https://files.jrsoftware.org/is/6/innosetup-6.3.3.exe", + condition = """ + ((${runner.os} == 'Linux') || (${runner.os} == 'macOS')) + && (${cacheInnoSetupInstaller.outputs.cacheHit} == false) + """.trimIndent() + ) + + run( + name = "Start Xvfb on Linux", + command = "Xvfb :0 -screen 0 1024x768x16 &", + condition = "${runner.os} == 'Linux'" + ) + + uses( + name = "Install InnoSetup on Linux", + env = mapOf( + "DISPLAY" to ":0.0" + ), + // part of work-around for Xvfb sometimes not starting fast enough + action = WretryActionMain( + command = "wine $innoSetupInstaller /SP- /VERYSILENT /SUPPRESSMSGBOXES /NORESTART", + attemptLimit = 3, + attemptDelay = 1000, + preRetryCommand = "echo ::warning::Reexecuting $innoSetupInstaller" + ), + condition = "${runner.os} == 'Linux'" + ) + + run( + name = "Install InnoSetup on macOS", + command = "wine $innoSetupInstaller /SP- /VERYSILENT /SUPPRESSMSGBOXES /NORESTART", + condition = "${runner.os} == 'macOS'" + ) + + run( + name = "Configure Git", + command = "git config --global core.autocrlf input" + ) + + uses( + name = "Checkout", + action = Checkout() + ) + + uses( + name = "Setup Java 11", + action = SetupJava( + javaVersion = "11", + distribution = Temurin + ) + ) + + uses( + name = "Configure Build Properties for Linux", + action = WriteFileAction( + path = "build.properties", + contents = """ + wine.executable = wine + winepath.executable = winepath + innosetup.compiler.executable = /home/runner/.wine/drive_c/Program Files (x86)/Inno Setup 6/ISCC.exe + innosetup.via.wine = true + """.trimIndent() + ), + condition = "${runner.os} == 'Linux'" + ) + + uses( + name = "Configure Build Properties for Windows", + action = WriteFileAction( + path = "build.properties", + contents = """ + innosetup.compiler.executable = C:/Program Files (x86)/Inno Setup 6/ISCC.exe + """.trimIndent() + ), + condition = "${runner.os} == 'Windows'" + ) + + uses( + name = "Configure Build Properties for macOS", + action = WriteFileAction( + path = "build.properties", + contents = """ + wine.executable = wine + winepath.executable = winepath + innosetup.compiler.executable = /Users/runner/.wine/drive_c/Program Files (x86)/Inno Setup 6/ISCC.exe + innosetup.via.wine = true + """.trimIndent() + ), + condition = "${runner.os} == 'macOS'" + ) + + val build = run( + name = "Build", + command = "ant -keep-going dist" + ) + + val buildSuccessful = """ + (${always()}) + && (${build.outcome eq Success}) + """.trimIndent() + + // Upload all result files from macOS build that can build all artifacts as one archive + uses( + name = "Upload All Result Files", + action = UploadArtifact( + name = "All Artifacts", + path = allPossibleArtifacts.map { it.path }, + ifNoFilesFound = Error, + compressionLevel = NoCompression + ), + condition = "($buildSuccessful) && (${runner.os} == 'macOS')" + ) + + allPossibleArtifacts.forEach { (name, path, ignoreIfMissing, condition) -> + val verifyArtifactWasBuilt = run( + name = "Verify $name was Built", + command = if (ignoreIfMissing) { + """ + [ -f $path ] && echo 'found=true' || true >>"${'$'}GITHUB_OUTPUT" + """.trimIndent() + } else { + """ + [ -f $path ] && echo 'found=true' >>"${'$'}GITHUB_OUTPUT" + """.trimIndent() + }, + condition = condition?.let { "($buildSuccessful) && ($it)" } ?: buildSuccessful, + shell = Bash + ) + + uses( + name = "Save $name to Cache", + action = CacheSave( + path = listOf(path), + key = "${expr { github.run_id }} - $name - ${expr { runner.os }}", + enableCrossOsArchive = true + ), + condition = """ + ($buildSuccessful) + && (${verifyArtifactWasBuilt.outcome eq Success}) + && (${verifyArtifactWasBuilt.outputs["found"]} == 'true') + """.trimIndent() + ) + } + + val uploadAllUnexpectedResultFiles = uses( + name = "Upload All Unexpected Result Files", + action = UploadArtifact( + name = "Unexpected Artifacts (${expr { runner.os }})", + path = listOf("dist") + allPossibleArtifacts.map { "!${it.path}" }, + ifNoFilesFound = Ignore, + compressionLevel = NoCompression + ), + condition = buildSuccessful + ) + + run( + name = "Verify No Unexpected Result Files", + command = "[ '${expr { uploadAllUnexpectedResultFiles.outputs.artifactId }}' == '' ]", + condition = """ + (${always()}) + && (${uploadAllUnexpectedResultFiles.outcome eq Success}) + """.trimIndent(), + shell = Bash + ) + } + + job( + id = "upload-artifacts", + name = "Upload Individual Artifacts from one of the Jobs", + runsOn = UbuntuLatest, + needs = listOf(build), + condition = """ + (${always()} + && (${build.result neq Skipped})) + """.trimIndent() + ) { + allPossibleArtifacts.forEach { (name, path) -> + uses( + name = "Restore $name from Cache", + action = CacheRestore( + path = listOf(path), + key = "${expr { github.run_id }} - $name - macOS", + restoreKeys = listOf("${expr { github.run_id }} - $name - ") + ) + ) + + uses( + name = "Upload $name", + action = UploadArtifact( + name = name, + path = listOf(path), + ifNoFilesFound = Ignore, + compressionLevel = NoCompression + ) + ) + } + } +} + +data class Artifact( + val name: String, + val path: String, + val ignoreIfMissing: Boolean = false, + val condition: String? = null +) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 000000000..87ace8ff8 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,672 @@ +# This file was generated using Kotlin DSL (.github/workflows/build.main.kts). +# If you want to modify the workflow, please change the Kotlin file and regenerate this YAML file. +# Generated with https://github.com/typesafegithub/github-workflows-kt + +name: 'Build' +on: + push: {} + pull_request: {} +jobs: + check_yaml_consistency: + name: 'Check YAML consistency' + runs-on: 'ubuntu-latest' + steps: + - id: 'step-0' + name: 'Check out' + uses: 'actions/checkout@v4' + - id: 'step-1' + name: 'Execute script' + run: 'rm ''.github/workflows/build.yaml'' && ''.github/workflows/build.main.kts''' + - id: 'step-2' + name: 'Consistency check' + run: 'git diff --exit-code ''.github/workflows/build.yaml''' + build: + name: 'Build on ${{ matrix.os }}' + runs-on: '${{ matrix.os }}' + needs: + - 'check_yaml_consistency' + strategy: + fail-fast: false + matrix: + os: + - 'ubuntu-latest' + - 'windows-latest' + - 'macos-latest' + steps: + - id: 'step-0' + name: 'Install Wine on Linux' + run: |- + sudo dpkg --add-architecture i386 + sudo wget -nc -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key + sudo wget -NP /etc/apt/sources.list.d/ "https://dl.winehq.org/wine-builds/ubuntu/dists/$(lsb_release -c | grep -o '\w*$')/winehq-$(lsb_release -c | grep -o '\w*$').sources" + sudo apt update + sudo apt install --yes --no-install-recommends winehq-stable + winecfg /v win10 + if: 'runner.os == ''Linux''' + - id: 'step-1' + name: 'Install Wine on macOS' + uses: 'tecolicom/actions-use-homebrew-tools@v1' + with: + tools: 'wine-stable' + path: '/Applications /Library' + if: 'runner.os == ''macOS''' + - id: 'step-2' + name: 'Cache InnoSetup installer on Linux and macOS' + uses: 'actions/cache@v4' + with: + path: '${{ runner.temp }}/innosetup-6.3.3.exe' + key: 'innosetup-6.3.3.exe' + if: '(runner.os == ''Linux'') || (runner.os == ''macOS'')' + - id: 'step-3' + name: 'Provision InnoSetup on Linux and macOS' + run: 'wget -O ${{ runner.temp }}/innosetup-6.3.3.exe https://files.jrsoftware.org/is/6/innosetup-6.3.3.exe' + if: |- + ((runner.os == 'Linux') || (runner.os == 'macOS')) + && (steps.step-2.outputs.cache-hit == false) + - id: 'step-4' + name: 'Start Xvfb on Linux' + run: 'Xvfb :0 -screen 0 1024x768x16 &' + if: 'runner.os == ''Linux''' + - id: 'step-5' + name: 'Install InnoSetup on Linux' + uses: 'Wandalen/wretry.action/main@v3' + with: + command: 'wine ${{ runner.temp }}/innosetup-6.3.3.exe /SP- /VERYSILENT /SUPPRESSMSGBOXES /NORESTART' + pre_retry_command: 'echo ::warning::Reexecuting ${{ runner.temp }}/innosetup-6.3.3.exe' + attempt_limit: '3' + attempt_delay: '1000' + env: + DISPLAY: ':0.0' + if: 'runner.os == ''Linux''' + - id: 'step-6' + name: 'Install InnoSetup on macOS' + run: 'wine ${{ runner.temp }}/innosetup-6.3.3.exe /SP- /VERYSILENT /SUPPRESSMSGBOXES /NORESTART' + if: 'runner.os == ''macOS''' + - id: 'step-7' + name: 'Configure Git' + run: 'git config --global core.autocrlf input' + - id: 'step-8' + name: 'Checkout' + uses: 'actions/checkout@v4' + - id: 'step-9' + name: 'Setup Java 11' + uses: 'actions/setup-java@v4' + with: + java-version: '11' + distribution: 'temurin' + - id: 'step-10' + name: 'Configure Build Properties for Linux' + uses: 'DamianReeves/write-file-action@v1.3' + with: + path: 'build.properties' + contents: |- + wine.executable = wine + winepath.executable = winepath + innosetup.compiler.executable = /home/runner/.wine/drive_c/Program Files (x86)/Inno Setup 6/ISCC.exe + innosetup.via.wine = true + if: 'runner.os == ''Linux''' + - id: 'step-11' + name: 'Configure Build Properties for Windows' + uses: 'DamianReeves/write-file-action@v1.3' + with: + path: 'build.properties' + contents: 'innosetup.compiler.executable = C:/Program Files (x86)/Inno Setup 6/ISCC.exe' + if: 'runner.os == ''Windows''' + - id: 'step-12' + name: 'Configure Build Properties for macOS' + uses: 'DamianReeves/write-file-action@v1.3' + with: + path: 'build.properties' + contents: |- + wine.executable = wine + winepath.executable = winepath + innosetup.compiler.executable = /Users/runner/.wine/drive_c/Program Files (x86)/Inno Setup 6/ISCC.exe + innosetup.via.wine = true + if: 'runner.os == ''macOS''' + - id: 'step-13' + name: 'Build' + run: 'ant -keep-going dist' + - id: 'step-14' + name: 'Upload All Result Files' + uses: 'actions/upload-artifact@v4' + with: + name: 'All Artifacts' + path: |- + dist/jedit*manual-a4.pdf + dist/jedit*manual-letter.pdf + dist/jedit*source.tar.bz2 + dist/jedit*install.jar + dist/jedit-*-noarch-1sao.tgz + dist/jedit_*_all.deb + dist/jedit*install.exe + dist/jedit*install.dmg + dist/jedit*-dist-mac-finish.tar.bz2 + dist/Packages + dist/Packages.gz + dist/Packages.bz2 + dist/Release + dist/Release.gpg + if-no-files-found: 'error' + compression-level: '0' + if: |- + ((always()) + && (steps.step-13.outcome == 'success')) && (runner.os == 'macOS') + - id: 'step-15' + name: 'Verify Manual in A4 Paper size was Built' + shell: 'bash' + run: '[ -f dist/jedit*manual-a4.pdf ] && echo ''found=true'' >>"$GITHUB_OUTPUT"' + if: |- + (always()) + && (steps.step-13.outcome == 'success') + - id: 'step-16' + name: 'Save Manual in A4 Paper size to Cache' + uses: 'actions/cache/save@v4' + with: + path: 'dist/jedit*manual-a4.pdf' + key: '${{ github.run_id }} - Manual in A4 Paper size - ${{ runner.os }}' + enableCrossOsArchive: 'true' + if: |2- + ((always()) + && (steps.step-13.outcome == 'success')) + && (steps.step-15.outcome == 'success') + && (steps.step-15.outputs.found == 'true') + - id: 'step-17' + name: 'Verify Manual in Letter Paper size was Built' + shell: 'bash' + run: '[ -f dist/jedit*manual-letter.pdf ] && echo ''found=true'' >>"$GITHUB_OUTPUT"' + if: |- + (always()) + && (steps.step-13.outcome == 'success') + - id: 'step-18' + name: 'Save Manual in Letter Paper size to Cache' + uses: 'actions/cache/save@v4' + with: + path: 'dist/jedit*manual-letter.pdf' + key: '${{ github.run_id }} - Manual in Letter Paper size - ${{ runner.os }}' + enableCrossOsArchive: 'true' + if: |2- + ((always()) + && (steps.step-13.outcome == 'success')) + && (steps.step-17.outcome == 'success') + && (steps.step-17.outputs.found == 'true') + - id: 'step-19' + name: 'Verify Source Package was Built' + shell: 'bash' + run: '[ -f dist/jedit*source.tar.bz2 ] && echo ''found=true'' >>"$GITHUB_OUTPUT"' + if: |- + (always()) + && (steps.step-13.outcome == 'success') + - id: 'step-20' + name: 'Save Source Package to Cache' + uses: 'actions/cache/save@v4' + with: + path: 'dist/jedit*source.tar.bz2' + key: '${{ github.run_id }} - Source Package - ${{ runner.os }}' + enableCrossOsArchive: 'true' + if: |2- + ((always()) + && (steps.step-13.outcome == 'success')) + && (steps.step-19.outcome == 'success') + && (steps.step-19.outputs.found == 'true') + - id: 'step-21' + name: 'Verify Java based Installer was Built' + shell: 'bash' + run: '[ -f dist/jedit*install.jar ] && echo ''found=true'' >>"$GITHUB_OUTPUT"' + if: |- + (always()) + && (steps.step-13.outcome == 'success') + - id: 'step-22' + name: 'Save Java based Installer to Cache' + uses: 'actions/cache/save@v4' + with: + path: 'dist/jedit*install.jar' + key: '${{ github.run_id }} - Java based Installer - ${{ runner.os }}' + enableCrossOsArchive: 'true' + if: |2- + ((always()) + && (steps.step-13.outcome == 'success')) + && (steps.step-21.outcome == 'success') + && (steps.step-21.outputs.found == 'true') + - id: 'step-23' + name: 'Verify Slackware Installer was Built' + shell: 'bash' + run: '[ -f dist/jedit-*-noarch-1sao.tgz ] && echo ''found=true'' >>"$GITHUB_OUTPUT"' + if: |- + (always()) + && (steps.step-13.outcome == 'success') + - id: 'step-24' + name: 'Save Slackware Installer to Cache' + uses: 'actions/cache/save@v4' + with: + path: 'dist/jedit-*-noarch-1sao.tgz' + key: '${{ github.run_id }} - Slackware Installer - ${{ runner.os }}' + enableCrossOsArchive: 'true' + if: |2- + ((always()) + && (steps.step-13.outcome == 'success')) + && (steps.step-23.outcome == 'success') + && (steps.step-23.outputs.found == 'true') + - id: 'step-25' + name: 'Verify Debian Installer was Built' + shell: 'bash' + run: '[ -f dist/jedit_*_all.deb ] && echo ''found=true'' >>"$GITHUB_OUTPUT"' + if: |- + (always()) + && (steps.step-13.outcome == 'success') + - id: 'step-26' + name: 'Save Debian Installer to Cache' + uses: 'actions/cache/save@v4' + with: + path: 'dist/jedit_*_all.deb' + key: '${{ github.run_id }} - Debian Installer - ${{ runner.os }}' + enableCrossOsArchive: 'true' + if: |2- + ((always()) + && (steps.step-13.outcome == 'success')) + && (steps.step-25.outcome == 'success') + && (steps.step-25.outputs.found == 'true') + - id: 'step-27' + name: 'Verify Windows Installer was Built' + shell: 'bash' + run: '[ -f dist/jedit*install.exe ] && echo ''found=true'' >>"$GITHUB_OUTPUT"' + if: |- + (always()) + && (steps.step-13.outcome == 'success') + - id: 'step-28' + name: 'Save Windows Installer to Cache' + uses: 'actions/cache/save@v4' + with: + path: 'dist/jedit*install.exe' + key: '${{ github.run_id }} - Windows Installer - ${{ runner.os }}' + enableCrossOsArchive: 'true' + if: |2- + ((always()) + && (steps.step-13.outcome == 'success')) + && (steps.step-27.outcome == 'success') + && (steps.step-27.outputs.found == 'true') + - id: 'step-29' + name: 'Verify macOS Installer was Built' + shell: 'bash' + run: '[ -f dist/jedit*install.dmg ] && echo ''found=true'' >>"$GITHUB_OUTPUT"' + if: |- + ((always()) + && (steps.step-13.outcome == 'success')) && (runner.os == 'macOS') + - id: 'step-30' + name: 'Save macOS Installer to Cache' + uses: 'actions/cache/save@v4' + with: + path: 'dist/jedit*install.dmg' + key: '${{ github.run_id }} - macOS Installer - ${{ runner.os }}' + enableCrossOsArchive: 'true' + if: |2- + ((always()) + && (steps.step-13.outcome == 'success')) + && (steps.step-29.outcome == 'success') + && (steps.step-29.outputs.found == 'true') + - id: 'step-31' + name: 'Verify macOS Intermediate Result was Built' + shell: 'bash' + run: '[ -f dist/jedit*-dist-mac-finish.tar.bz2 ] && echo ''found=true'' >>"$GITHUB_OUTPUT"' + if: |- + ((always()) + && (steps.step-13.outcome == 'success')) && (runner.os != 'macOS') + - id: 'step-32' + name: 'Save macOS Intermediate Result to Cache' + uses: 'actions/cache/save@v4' + with: + path: 'dist/jedit*-dist-mac-finish.tar.bz2' + key: '${{ github.run_id }} - macOS Intermediate Result - ${{ runner.os }}' + enableCrossOsArchive: 'true' + if: |2- + ((always()) + && (steps.step-13.outcome == 'success')) + && (steps.step-31.outcome == 'success') + && (steps.step-31.outputs.found == 'true') + - id: 'step-33' + name: 'Verify Debian Repository Packages File was Built' + shell: 'bash' + run: '[ -f dist/Packages ] && echo ''found=true'' || true >>"$GITHUB_OUTPUT"' + if: |- + (always()) + && (steps.step-13.outcome == 'success') + - id: 'step-34' + name: 'Save Debian Repository Packages File to Cache' + uses: 'actions/cache/save@v4' + with: + path: 'dist/Packages' + key: '${{ github.run_id }} - Debian Repository Packages File - ${{ runner.os }}' + enableCrossOsArchive: 'true' + if: |2- + ((always()) + && (steps.step-13.outcome == 'success')) + && (steps.step-33.outcome == 'success') + && (steps.step-33.outputs.found == 'true') + - id: 'step-35' + name: 'Verify Debian Repository Packages File (gz) was Built' + shell: 'bash' + run: '[ -f dist/Packages.gz ] && echo ''found=true'' || true >>"$GITHUB_OUTPUT"' + if: |- + (always()) + && (steps.step-13.outcome == 'success') + - id: 'step-36' + name: 'Save Debian Repository Packages File (gz) to Cache' + uses: 'actions/cache/save@v4' + with: + path: 'dist/Packages.gz' + key: '${{ github.run_id }} - Debian Repository Packages File (gz) - ${{ runner.os }}' + enableCrossOsArchive: 'true' + if: |2- + ((always()) + && (steps.step-13.outcome == 'success')) + && (steps.step-35.outcome == 'success') + && (steps.step-35.outputs.found == 'true') + - id: 'step-37' + name: 'Verify Debian Repository Packages File (bz2) was Built' + shell: 'bash' + run: '[ -f dist/Packages.bz2 ] && echo ''found=true'' || true >>"$GITHUB_OUTPUT"' + if: |- + (always()) + && (steps.step-13.outcome == 'success') + - id: 'step-38' + name: 'Save Debian Repository Packages File (bz2) to Cache' + uses: 'actions/cache/save@v4' + with: + path: 'dist/Packages.bz2' + key: '${{ github.run_id }} - Debian Repository Packages File (bz2) - ${{ runner.os }}' + enableCrossOsArchive: 'true' + if: |2- + ((always()) + && (steps.step-13.outcome == 'success')) + && (steps.step-37.outcome == 'success') + && (steps.step-37.outputs.found == 'true') + - id: 'step-39' + name: 'Verify Debian Repository Release File was Built' + shell: 'bash' + run: '[ -f dist/Release ] && echo ''found=true'' || true >>"$GITHUB_OUTPUT"' + if: |- + (always()) + && (steps.step-13.outcome == 'success') + - id: 'step-40' + name: 'Save Debian Repository Release File to Cache' + uses: 'actions/cache/save@v4' + with: + path: 'dist/Release' + key: '${{ github.run_id }} - Debian Repository Release File - ${{ runner.os }}' + enableCrossOsArchive: 'true' + if: |2- + ((always()) + && (steps.step-13.outcome == 'success')) + && (steps.step-39.outcome == 'success') + && (steps.step-39.outputs.found == 'true') + - id: 'step-41' + name: 'Verify Debian Repository Release File Signature was Built' + shell: 'bash' + run: '[ -f dist/Release.gpg ] && echo ''found=true'' || true >>"$GITHUB_OUTPUT"' + if: |- + (always()) + && (steps.step-13.outcome == 'success') + - id: 'step-42' + name: 'Save Debian Repository Release File Signature to Cache' + uses: 'actions/cache/save@v4' + with: + path: 'dist/Release.gpg' + key: '${{ github.run_id }} - Debian Repository Release File Signature - ${{ runner.os }}' + enableCrossOsArchive: 'true' + if: |2- + ((always()) + && (steps.step-13.outcome == 'success')) + && (steps.step-41.outcome == 'success') + && (steps.step-41.outputs.found == 'true') + - id: 'step-43' + name: 'Upload All Unexpected Result Files' + uses: 'actions/upload-artifact@v4' + with: + name: 'Unexpected Artifacts (${{ runner.os }})' + path: |- + dist + !dist/jedit*manual-a4.pdf + !dist/jedit*manual-letter.pdf + !dist/jedit*source.tar.bz2 + !dist/jedit*install.jar + !dist/jedit-*-noarch-1sao.tgz + !dist/jedit_*_all.deb + !dist/jedit*install.exe + !dist/jedit*install.dmg + !dist/jedit*-dist-mac-finish.tar.bz2 + !dist/Packages + !dist/Packages.gz + !dist/Packages.bz2 + !dist/Release + !dist/Release.gpg + if-no-files-found: 'ignore' + compression-level: '0' + if: |- + (always()) + && (steps.step-13.outcome == 'success') + - id: 'step-44' + name: 'Verify No Unexpected Result Files' + shell: 'bash' + run: '[ ''${{ steps.step-43.outputs.artifact-id }}'' == '''' ]' + if: |- + (always()) + && (steps.step-43.outcome == 'success') + upload-artifacts: + name: 'Upload Individual Artifacts from one of the Jobs' + runs-on: 'ubuntu-latest' + needs: + - 'build' + - 'check_yaml_consistency' + if: |- + (always() + && (needs.build.result != 'skipped')) + steps: + - id: 'step-0' + name: 'Restore Manual in A4 Paper size from Cache' + uses: 'actions/cache/restore@v4' + with: + path: 'dist/jedit*manual-a4.pdf' + key: '${{ github.run_id }} - Manual in A4 Paper size - macOS' + restore-keys: '${{ github.run_id }} - Manual in A4 Paper size - ' + - id: 'step-1' + name: 'Upload Manual in A4 Paper size' + uses: 'actions/upload-artifact@v4' + with: + name: 'Manual in A4 Paper size' + path: 'dist/jedit*manual-a4.pdf' + if-no-files-found: 'ignore' + compression-level: '0' + - id: 'step-2' + name: 'Restore Manual in Letter Paper size from Cache' + uses: 'actions/cache/restore@v4' + with: + path: 'dist/jedit*manual-letter.pdf' + key: '${{ github.run_id }} - Manual in Letter Paper size - macOS' + restore-keys: '${{ github.run_id }} - Manual in Letter Paper size - ' + - id: 'step-3' + name: 'Upload Manual in Letter Paper size' + uses: 'actions/upload-artifact@v4' + with: + name: 'Manual in Letter Paper size' + path: 'dist/jedit*manual-letter.pdf' + if-no-files-found: 'ignore' + compression-level: '0' + - id: 'step-4' + name: 'Restore Source Package from Cache' + uses: 'actions/cache/restore@v4' + with: + path: 'dist/jedit*source.tar.bz2' + key: '${{ github.run_id }} - Source Package - macOS' + restore-keys: '${{ github.run_id }} - Source Package - ' + - id: 'step-5' + name: 'Upload Source Package' + uses: 'actions/upload-artifact@v4' + with: + name: 'Source Package' + path: 'dist/jedit*source.tar.bz2' + if-no-files-found: 'ignore' + compression-level: '0' + - id: 'step-6' + name: 'Restore Java based Installer from Cache' + uses: 'actions/cache/restore@v4' + with: + path: 'dist/jedit*install.jar' + key: '${{ github.run_id }} - Java based Installer - macOS' + restore-keys: '${{ github.run_id }} - Java based Installer - ' + - id: 'step-7' + name: 'Upload Java based Installer' + uses: 'actions/upload-artifact@v4' + with: + name: 'Java based Installer' + path: 'dist/jedit*install.jar' + if-no-files-found: 'ignore' + compression-level: '0' + - id: 'step-8' + name: 'Restore Slackware Installer from Cache' + uses: 'actions/cache/restore@v4' + with: + path: 'dist/jedit-*-noarch-1sao.tgz' + key: '${{ github.run_id }} - Slackware Installer - macOS' + restore-keys: '${{ github.run_id }} - Slackware Installer - ' + - id: 'step-9' + name: 'Upload Slackware Installer' + uses: 'actions/upload-artifact@v4' + with: + name: 'Slackware Installer' + path: 'dist/jedit-*-noarch-1sao.tgz' + if-no-files-found: 'ignore' + compression-level: '0' + - id: 'step-10' + name: 'Restore Debian Installer from Cache' + uses: 'actions/cache/restore@v4' + with: + path: 'dist/jedit_*_all.deb' + key: '${{ github.run_id }} - Debian Installer - macOS' + restore-keys: '${{ github.run_id }} - Debian Installer - ' + - id: 'step-11' + name: 'Upload Debian Installer' + uses: 'actions/upload-artifact@v4' + with: + name: 'Debian Installer' + path: 'dist/jedit_*_all.deb' + if-no-files-found: 'ignore' + compression-level: '0' + - id: 'step-12' + name: 'Restore Windows Installer from Cache' + uses: 'actions/cache/restore@v4' + with: + path: 'dist/jedit*install.exe' + key: '${{ github.run_id }} - Windows Installer - macOS' + restore-keys: '${{ github.run_id }} - Windows Installer - ' + - id: 'step-13' + name: 'Upload Windows Installer' + uses: 'actions/upload-artifact@v4' + with: + name: 'Windows Installer' + path: 'dist/jedit*install.exe' + if-no-files-found: 'ignore' + compression-level: '0' + - id: 'step-14' + name: 'Restore macOS Installer from Cache' + uses: 'actions/cache/restore@v4' + with: + path: 'dist/jedit*install.dmg' + key: '${{ github.run_id }} - macOS Installer - macOS' + restore-keys: '${{ github.run_id }} - macOS Installer - ' + - id: 'step-15' + name: 'Upload macOS Installer' + uses: 'actions/upload-artifact@v4' + with: + name: 'macOS Installer' + path: 'dist/jedit*install.dmg' + if-no-files-found: 'ignore' + compression-level: '0' + - id: 'step-16' + name: 'Restore macOS Intermediate Result from Cache' + uses: 'actions/cache/restore@v4' + with: + path: 'dist/jedit*-dist-mac-finish.tar.bz2' + key: '${{ github.run_id }} - macOS Intermediate Result - macOS' + restore-keys: '${{ github.run_id }} - macOS Intermediate Result - ' + - id: 'step-17' + name: 'Upload macOS Intermediate Result' + uses: 'actions/upload-artifact@v4' + with: + name: 'macOS Intermediate Result' + path: 'dist/jedit*-dist-mac-finish.tar.bz2' + if-no-files-found: 'ignore' + compression-level: '0' + - id: 'step-18' + name: 'Restore Debian Repository Packages File from Cache' + uses: 'actions/cache/restore@v4' + with: + path: 'dist/Packages' + key: '${{ github.run_id }} - Debian Repository Packages File - macOS' + restore-keys: '${{ github.run_id }} - Debian Repository Packages File - ' + - id: 'step-19' + name: 'Upload Debian Repository Packages File' + uses: 'actions/upload-artifact@v4' + with: + name: 'Debian Repository Packages File' + path: 'dist/Packages' + if-no-files-found: 'ignore' + compression-level: '0' + - id: 'step-20' + name: 'Restore Debian Repository Packages File (gz) from Cache' + uses: 'actions/cache/restore@v4' + with: + path: 'dist/Packages.gz' + key: '${{ github.run_id }} - Debian Repository Packages File (gz) - macOS' + restore-keys: '${{ github.run_id }} - Debian Repository Packages File (gz) - ' + - id: 'step-21' + name: 'Upload Debian Repository Packages File (gz)' + uses: 'actions/upload-artifact@v4' + with: + name: 'Debian Repository Packages File (gz)' + path: 'dist/Packages.gz' + if-no-files-found: 'ignore' + compression-level: '0' + - id: 'step-22' + name: 'Restore Debian Repository Packages File (bz2) from Cache' + uses: 'actions/cache/restore@v4' + with: + path: 'dist/Packages.bz2' + key: '${{ github.run_id }} - Debian Repository Packages File (bz2) - macOS' + restore-keys: '${{ github.run_id }} - Debian Repository Packages File (bz2) - ' + - id: 'step-23' + name: 'Upload Debian Repository Packages File (bz2)' + uses: 'actions/upload-artifact@v4' + with: + name: 'Debian Repository Packages File (bz2)' + path: 'dist/Packages.bz2' + if-no-files-found: 'ignore' + compression-level: '0' + - id: 'step-24' + name: 'Restore Debian Repository Release File from Cache' + uses: 'actions/cache/restore@v4' + with: + path: 'dist/Release' + key: '${{ github.run_id }} - Debian Repository Release File - macOS' + restore-keys: '${{ github.run_id }} - Debian Repository Release File - ' + - id: 'step-25' + name: 'Upload Debian Repository Release File' + uses: 'actions/upload-artifact@v4' + with: + name: 'Debian Repository Release File' + path: 'dist/Release' + if-no-files-found: 'ignore' + compression-level: '0' + - id: 'step-26' + name: 'Restore Debian Repository Release File Signature from Cache' + uses: 'actions/cache/restore@v4' + with: + path: 'dist/Release.gpg' + key: '${{ github.run_id }} - Debian Repository Release File Signature - macOS' + restore-keys: '${{ github.run_id }} - Debian Repository Release File Signature - ' + - id: 'step-27' + name: 'Upload Debian Repository Release File Signature' + uses: 'actions/upload-artifact@v4' + with: + name: 'Debian Repository Release File Signature' + path: 'dist/Release.gpg' + if-no-files-found: 'ignore' + compression-level: '0' ----------------------------------------------------------------------- Summary of changes: .github/workflows/build.main.kts | 376 ++++++++++++++++++++++ .github/workflows/build.yaml | 672 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 1048 insertions(+) create mode 100755 .github/workflows/build.main.kts create mode 100644 .github/workflows/build.yaml hooks/post-receive -- jEdit jEdit plugin |
From: vampire0 <vam...@us...> - 2025-03-17 03:48:41
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "jEdit jEdit plugin". The branch, master has been updated via 14cb2e50284ccf1d33fecf872260384e7fe04ff1 (commit) from e503d378403c2768d987f086b5f4194274fae865 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit: https://sourceforge.net/p/jedit/jEdit/ci/14cb2e50284ccf1d33fecf872260384e7fe04ff1/ tree: https://sourceforge.net/p/jedit/jEdit/ci/14cb2e50284ccf1d33fecf872260384e7fe04ff1/tree/ commit 14cb2e50284ccf1d33fecf872260384e7fe04ff1 Author: Björn Kautler <Bj...@Ka...> Date: Mon Mar 17 04:47:49 2025 +0100 Include Notes refs in mirroring diff --git a/.github/workflows/mirror-canonical-repository.main.kts b/.github/workflows/mirror-canonical-repository.main.kts index ad4877eef..81a75b47f 100755 --- a/.github/workflows/mirror-canonical-repository.main.kts +++ b/.github/workflows/mirror-canonical-repository.main.kts @@ -32,6 +32,11 @@ workflow( command = "git clone --bare git://git.code.sf.net/p/jedit/\${GITHUB_REPOSITORY#\$GITHUB_REPOSITORY_OWNER/} ." ) + run( + name = "Fetch Notes Refs", + command = "git fetch origin refs/notes/*:refs/notes/*" + ) + val MIRROR_TOKEN by secrets run( name = "Push To Mirror Repository", diff --git a/.github/workflows/mirror-canonical-repository.yaml b/.github/workflows/mirror-canonical-repository.yaml index c2ce9a641..b0477745b 100644 --- a/.github/workflows/mirror-canonical-repository.yaml +++ b/.github/workflows/mirror-canonical-repository.yaml @@ -33,5 +33,8 @@ jobs: name: 'Clone Canonical Repository' run: 'git clone --bare git://git.code.sf.net/p/jedit/${GITHUB_REPOSITORY#$GITHUB_REPOSITORY_OWNER/} .' - id: 'step-1' + name: 'Fetch Notes Refs' + run: 'git fetch origin refs/notes/*:refs/notes/*' + - id: 'step-2' name: 'Push To Mirror Repository' run: 'git push --mirror https://x:${{ secrets.MIRROR_TOKEN }}@github.com/${{ github.repository }}' ----------------------------------------------------------------------- Summary of changes: .github/workflows/mirror-canonical-repository.main.kts | 5 +++++ .github/workflows/mirror-canonical-repository.yaml | 3 +++ 2 files changed, 8 insertions(+) hooks/post-receive -- jEdit jEdit plugin |
From: vampire0 <vam...@us...> - 2025-03-17 03:26:08
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "jEdit jEdit plugin". The branch, master has been updated via 144ce3b2cf65e7dd4392ec672d95e81dbec66d93 (commit) from c0d8b66178be96b51d6eb8032a9c48fd9cf0b660 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit: https://sourceforge.net/p/jedit/jEdit/ci/144ce3b2cf65e7dd4392ec672d95e81dbec66d93/ tree: https://sourceforge.net/p/jedit/jEdit/ci/144ce3b2cf65e7dd4392ec672d95e81dbec66d93/tree/ commit 144ce3b2cf65e7dd4392ec672d95e81dbec66d93 Author: Björn Kautler <Bj...@Ka...> Date: Mon Mar 17 04:12:11 2025 +0100 Add repository mirroring GitHub workflow diff --git a/.github/workflows/README.adoc b/.github/workflows/README.adoc new file mode 100644 index 000000000..4fed2413a --- /dev/null +++ b/.github/workflows/README.adoc @@ -0,0 +1,41 @@ +== The YAML workflow files vs. the `*.main.kts` files + +The YAML workflow files are generated from the `*.main.kts` files. + +These use the https://github.com/typesafegithub/github-workflows-kt[github-workflows-kt] +Kotlin DSL library to conveniently and type-safely write GitHub Action workflow files. + +As there is no official built-in support in GitHub Actions yet until +https://github.com/orgs/community/discussions/15904 is considered, the YAML files +need to be generated manually. + +There is a safeguard check in all the generated files that this is not forgotten. +Running a workflow where the according `*.main.kts` produces a different output will +fail the execution. Additionally, a workflow that runs for pushes and pull requests +checks the consistency of all the YAML files as not all might be run. + + + +== Ways to generate the YAML workflow files + +There are multiple ways to generate the YAML files and all of them are fine, +but be aware of the last one of the caveats below if you are not using the Gradle method: + +* If you are in a `sh` derivate like e.g. `bash` and Kotlin is installed and + available in the `PATH`, you can just call the `*.main.kts` script like any + other shell script: ++ +[source,bash] +---- +$ ./release.main.kts +---- + +* If Kotlin is installed somewhere you can call it with the `*.main.kts` script + as argument: ++ +[source,bash] +---- +$ path/to/kotlin release.main.kts +---- + +* From the IDE you can create a run configuration that executes the `*.main.kts` script. diff --git a/.github/workflows/check-all-workflow-yaml-consistency.main.kts b/.github/workflows/check-all-workflow-yaml-consistency.main.kts new file mode 100644 index 000000000..be74efc3e --- /dev/null +++ b/.github/workflows/check-all-workflow-yaml-consistency.main.kts @@ -0,0 +1,46 @@ +#!/usr/bin/env kotlin + +@file:Repository("https://repo.maven.apache.org/maven2/") +@file:DependsOn("io.github.typesafegithub:github-workflows-kt:3.2.0") + +@file:Repository("https://bindings.krzeminski.it/") +@file:DependsOn("actions:checkout___major:[v4,v5-alpha)") + +import io.github.typesafegithub.workflows.actions.actions.Checkout +import io.github.typesafegithub.workflows.domain.RunnerType.UbuntuLatest +import io.github.typesafegithub.workflows.domain.triggers.PullRequest +import io.github.typesafegithub.workflows.domain.triggers.Push +import io.github.typesafegithub.workflows.dsl.workflow + +workflow( + name = "Check all Workflow YAML Consistency", + on = listOf( + Push(), + PullRequest() + ), + sourceFile = __FILE__ +) { + job( + id = "check_all_workflow_yaml_consistency", + name = "Check all Workflow YAML Consistency", + runsOn = UbuntuLatest + ) { + uses( + name = "Checkout", + action = Checkout() + ) + + run( + name = "Regenerate all Workflow YAMLs", + command = """find .github/workflows -mindepth 1 -maxdepth 1 -name '*.main.kts' -exec {} \;""" + ) + + run( + name = "Check for Modifications", + command = """ + git add --intent-to-add . + git diff --exit-code + """.trimIndent() + ) + } +} diff --git a/.github/workflows/check-all-workflow-yaml-consistency.yaml b/.github/workflows/check-all-workflow-yaml-consistency.yaml new file mode 100644 index 000000000..674cca9bf --- /dev/null +++ b/.github/workflows/check-all-workflow-yaml-consistency.yaml @@ -0,0 +1,39 @@ +# This file was generated using Kotlin DSL (.github/workflows/check-all-workflow-yaml-consistency.main.kts). +# If you want to modify the workflow, please change the Kotlin file and regenerate this YAML file. +# Generated with https://github.com/typesafegithub/github-workflows-kt + +name: 'Check all Workflow YAML Consistency' +on: + push: {} + pull_request: {} +jobs: + check_yaml_consistency: + name: 'Check YAML consistency' + runs-on: 'ubuntu-latest' + steps: + - id: 'step-0' + name: 'Check out' + uses: 'actions/checkout@v4' + - id: 'step-1' + name: 'Execute script' + run: 'rm ''.github/workflows/check-all-workflow-yaml-consistency.yaml'' && ''.github/workflows/check-all-workflow-yaml-consistency.main.kts''' + - id: 'step-2' + name: 'Consistency check' + run: 'git diff --exit-code ''.github/workflows/check-all-workflow-yaml-consistency.yaml''' + check_all_workflow_yaml_consistency: + name: 'Check all Workflow YAML Consistency' + runs-on: 'ubuntu-latest' + needs: + - 'check_yaml_consistency' + steps: + - id: 'step-0' + name: 'Checkout' + uses: 'actions/checkout@v4' + - id: 'step-1' + name: 'Regenerate all Workflow YAMLs' + run: 'find .github/workflows -mindepth 1 -maxdepth 1 -name ''*.main.kts'' -exec {} \;' + - id: 'step-2' + name: 'Check for Modifications' + run: |- + git add --intent-to-add . + git diff --exit-code diff --git a/.github/workflows/mirror-canonical-repository.main.kts b/.github/workflows/mirror-canonical-repository.main.kts new file mode 100644 index 000000000..ad4877eef --- /dev/null +++ b/.github/workflows/mirror-canonical-repository.main.kts @@ -0,0 +1,41 @@ +#!/usr/bin/env kotlin + +@file:DependsOn("io.github.typesafegithub:github-workflows-kt:3.2.0") + +import io.github.typesafegithub.workflows.domain.RunnerType.UbuntuLatest +import io.github.typesafegithub.workflows.domain.triggers.Cron +import io.github.typesafegithub.workflows.domain.triggers.Push +import io.github.typesafegithub.workflows.domain.triggers.RepositoryDispatch +import io.github.typesafegithub.workflows.domain.triggers.Schedule +import io.github.typesafegithub.workflows.domain.triggers.WorkflowDispatch +import io.github.typesafegithub.workflows.dsl.expressions.Contexts.secrets +import io.github.typesafegithub.workflows.dsl.expressions.expr +import io.github.typesafegithub.workflows.dsl.workflow + +workflow( + name = "Mirror Canonical Repository", + on = listOf( + Push(), + RepositoryDispatch(), + Schedule(triggers = listOf(Cron(minute = "44"))), + WorkflowDispatch() + ), + sourceFile = __FILE__ +) { + job( + id = "mirror_repository", + name = "Mirror Repository", + runsOn = UbuntuLatest + ) { + run( + name = "Clone Canonical Repository", + command = "git clone --bare git://git.code.sf.net/p/jedit/\${GITHUB_REPOSITORY#\$GITHUB_REPOSITORY_OWNER/} ." + ) + + val MIRROR_TOKEN by secrets + run( + name = "Push To Mirror Repository", + command = "git push --mirror https://x:${expr(MIRROR_TOKEN)}@github.com/${expr { github.repository }}" + ) + } +} diff --git a/.github/workflows/mirror-canonical-repository.yaml b/.github/workflows/mirror-canonical-repository.yaml new file mode 100644 index 000000000..c2ce9a641 --- /dev/null +++ b/.github/workflows/mirror-canonical-repository.yaml @@ -0,0 +1,37 @@ +# This file was generated using Kotlin DSL (.github/workflows/mirror-canonical-repository.main.kts). +# If you want to modify the workflow, please change the Kotlin file and regenerate this YAML file. +# Generated with https://github.com/typesafegithub/github-workflows-kt + +name: 'Mirror Canonical Repository' +on: + push: {} + repository_dispatch: {} + schedule: + - cron: '44 * * * *' + workflow_dispatch: {} +jobs: + check_yaml_consistency: + name: 'Check YAML consistency' + runs-on: 'ubuntu-latest' + steps: + - id: 'step-0' + name: 'Check out' + uses: 'actions/checkout@v4' + - id: 'step-1' + name: 'Execute script' + run: 'rm ''.github/workflows/mirror-canonical-repository.yaml'' && ''.github/workflows/mirror-canonical-repository.main.kts''' + - id: 'step-2' + name: 'Consistency check' + run: 'git diff --exit-code ''.github/workflows/mirror-canonical-repository.yaml''' + mirror_repository: + name: 'Mirror Repository' + runs-on: 'ubuntu-latest' + needs: + - 'check_yaml_consistency' + steps: + - id: 'step-0' + name: 'Clone Canonical Repository' + run: 'git clone --bare git://git.code.sf.net/p/jedit/${GITHUB_REPOSITORY#$GITHUB_REPOSITORY_OWNER/} .' + - id: 'step-1' + name: 'Push To Mirror Repository' + run: 'git push --mirror https://x:${{ secrets.MIRROR_TOKEN }}@github.com/${{ github.repository }}' ----------------------------------------------------------------------- Summary of changes: .github/workflows/README.adoc | 41 +++++++++++++++++++ .../check-all-workflow-yaml-consistency.main.kts | 46 ++++++++++++++++++++++ .../check-all-workflow-yaml-consistency.yaml | 39 ++++++++++++++++++ .../workflows/mirror-canonical-repository.main.kts | 41 +++++++++++++++++++ .github/workflows/mirror-canonical-repository.yaml | 37 +++++++++++++++++ 5 files changed, 204 insertions(+) create mode 100644 .github/workflows/README.adoc create mode 100644 .github/workflows/check-all-workflow-yaml-consistency.main.kts create mode 100644 .github/workflows/check-all-workflow-yaml-consistency.yaml create mode 100644 .github/workflows/mirror-canonical-repository.main.kts create mode 100644 .github/workflows/mirror-canonical-repository.yaml hooks/post-receive -- jEdit jEdit plugin |
From: <vam...@us...> - 2025-03-17 03:23:58
|
Revision: 25771 http://sourceforge.net/p/jedit/svn/25771 Author: vampire0 Date: 2025-03-17 03:23:56 +0000 (Mon, 17 Mar 2025) Log Message: ----------- remove SVN tags as official repository for jEdit core is now in Git Removed Paths: ------------- jEdit/tags/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vam...@us...> - 2025-03-17 03:23:28
|
Revision: 25770 http://sourceforge.net/p/jedit/svn/25770 Author: vampire0 Date: 2025-03-17 03:23:27 +0000 (Mon, 17 Mar 2025) Log Message: ----------- remove SVN branches as official repository for jEdit core is now in Git Removed Paths: ------------- jEdit/branches/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vam...@us...> - 2025-03-17 03:22:37
|
Revision: 25769 http://sourceforge.net/p/jedit/svn/25769 Author: vampire0 Date: 2025-03-17 03:22:24 +0000 (Mon, 17 Mar 2025) Log Message: ----------- put tombstone in place, official repository for jEdit core is now in Git Added Paths: ----------- jEdit/trunk/moved_to_git.txt Removed Paths: ------------- jEdit/trunk/.gitaccess jEdit/trunk/.idea/ jEdit/trunk/README.SRC.txt jEdit/trunk/build.properties.sample jEdit/trunk/build.xml jEdit/trunk/de/ jEdit/trunk/doc/ jEdit/trunk/doclet/ jEdit/trunk/icons/ jEdit/trunk/installer/ jEdit/trunk/ivy.xml jEdit/trunk/ivysettings.xml jEdit/trunk/jEdit.iml jEdit/trunk/jars/ jEdit/trunk/keymaps/ jEdit/trunk/macros/ jEdit/trunk/misc/ jEdit/trunk/modes/ jEdit/trunk/org/ jEdit/trunk/package-files/ jEdit/trunk/properties/ jEdit/trunk/startup/ jEdit/trunk/test/ Deleted: jEdit/trunk/.gitaccess =================================================================== --- jEdit/trunk/.gitaccess 2025-03-04 07:49:42 UTC (rev 25768) +++ jEdit/trunk/.gitaccess 2025-03-17 03:22:24 UTC (rev 25769) @@ -1,16 +0,0 @@ -ezust -daleanson -vanza -jarekczek -elberry -shlomy -jojaba_67 -rschwenn -kpouer -vampire0 -spestov -kerik-sf -thomasmey -tanakahisateru -evanpw -k_satoda Deleted: jEdit/trunk/README.SRC.txt =================================================================== --- jEdit/trunk/README.SRC.txt 2025-03-04 07:49:42 UTC (rev 25768) +++ jEdit/trunk/README.SRC.txt 2025-03-17 03:22:24 UTC (rev 25769) @@ -1,204 +0,0 @@ -SOURCE CODE NOTES - -This file only contains information about compiling from source. -Scroll to the bottom if you are trying to use an IDE like Eclipse. -General jEdit documentation can be found in the 'doc' directory. - -* Requirements - - For all tasks: - - - Apache Ant. Get it from <http://ant.apache.org>. - 1.9.10 or newer has to be used. - - The Ant Optional package. This is included in the download from ants website, - as well as the AntPlugin from the Plugin Manager, - but not in some default installs on various *nix systems. - There you should get the ant-optional package through your - package management system. - - For building jEdit, the API documentation or any of the - distribution files except of the source package: - - - A Java compiler of version 11, such as OpenJDK's javac which is - included in the JDK. Get it from <http://www.java.com/download> - or from your package manager - e. g. openjdk-11-jdk. - - For building the API documentation: - - - Sun's javadoc tool, which is included in the JDK. - Get it from <http://www.java.com/download> or from your package - manager - e. g. openjdk-11-jdk. - - For building the windows installer (for the final step): - - - Inno Setup 6.0.0 or newer. Get it from <http://www.jrsoftware.org/isdl.php> - - A box running windows or wine, e. g. on *nix. If Inno Setup should be - run via wine, a wine version of at least 1.3.10 is required because - of a bug in earlier wine versions. - - For building the OS X disk image (DMG) for easy distribution - (for the final step): - - - A box running OS X - - -* Tasks - - If all necessary tools are installed and set up, you can use ant with a couple of targets. - The default target if you just run "ant" is "build", like running "ant build". - - - retrieve retrieve the dependencies - retrieves almost all dependencies needed for building jEdit, only InnoSetup for the - windows installer and wine, if InnoSetup should be run on *nix or OS X, have to - be installed and configured in build.properties manually. - - - build build the jEdit JAR-file with full debug-information - builds jEdit in the build-folder, configured in build.properties, - with full debug information included. - - - build-exe-launcher build the EXE launcher - builds the EXE launcher in the build-folder, configured in build.properties. - - - run run jEdit - runs the jEdit-version in the build-folder, configured in build.properties. - If there isn't any, it builds it in front of execution. - - - run-debug run jEdit with debug listening enabled - runs the jEdit-version in the build-folder, configured in build.properties. - If there isn't any, it builds it in front of execution. - The debug listening for this JVM is enabled. - - - test run unit tests - runs the available unit tests. - - - docs-html generate HTML docs - builds the online help in HTML-format in the build-folder, configured in build.properties. - - - docs-javadoc generate JavaDoc API docs - builds the API documentation in the build-folder, configured in build.properties. - - - docs-pdf-USletter generate PDF users-guide with US letter paper size - builds the User's Guide in PDF-format with US letter page size - in the build-folder, configured in build.properties. - - - docs-pdf-a4 generate PDF users-guide with A4 paper size - builds the User's Guide in PDF-format with A4 page size - in the build-folder, configured in build.properties. - - - dist build all distribution files - builds all distribution files or prepares the final step for some of them (Win and Mac) - in the dist-folder, configured in build.properties. - - - dist-deb build the DEB Package - builds the DEB Debian package in the dist-folder, configured in build.properties. - - - dist-sign-deb-Release sign the DEB Release file - signs the Debian repository metadata - - - dist-java build the Java-installer - builds the Java installer in the dist-folder, configured in build.properties. - - - dist-mac build the OS X disk image (DMG-file) - builds the OS X internet-enabled disk image (DMG-file) if building on a box - running OS X. If building on a box running something else, there will be a file - called jedit<version_here>-dist-mac-finish.tar.bz2 in the dist-folder, - configured in build.properties. Give that to someone running OS X and ask him - to extract the archive and to execute "ant dist-mac-finish". - The only thing that needs to be installed for this final step is Apache Ant. - - - dist-mac-finish finish building the OS X disk image (DMG-file) on OS X - builds the OS X internet-enabled disk image (DMG-file) in the dist-folder, - configured in build.properties if building on a box running OS X. - This target is normally only run directly, if someone just has to do - the final step that was prepared by "dist-mac" or "dist". - - - dist-manuals build the PDF-manuals - builds the User's Guide in PDF-format with both, USletter and A4 page size - in the dist-folder, configured in build.properties. - - - dist-slackware build the Slackware Package - builds the Slackware TGZ package in the dist-folder, configured in build.properties. - - - dist-src build the src-archive - builds the source package in the dist-folder, configured in build.properties. - - - dist-win build the Windows installer (EXE-file) - builds the windows installer in the dist-folder, configured in build.properties, - on a box running Windows. If building on a box running something else, there will be - a file called jedit<version_here>-dist-win-finish.tar.bz2 in the dist-folder, - configured in build.properties. Give that to someone running Windows and ask him - to extract the archive and to execute "ant dist-win-finish". - The only things that need to be installed for this final step is Apache Ant - and Inno Setup. Prior to running "ant dist-win-finish", the helper has to set - up the build.properties file with the path to his Inno Setup installation. - - - dist-win-finish finish building the Windows installer (EXE-file) on Windows or via wine - build the windows installer in the dist-folder, configured in build.properties if - building on a box running Windows or via wine. This target is normally only run directly, if - someone just has to do the final step that was prepared by "dist-win" or "dist". - - - clean clean up intermediate files - cleans up the temporary files from the build- and dist-folder, configured in build.properties. - Leaves the runnable jEdit, and the distribution files in place. - - - clean-all clean up lib.dir, build.dir and dist.dir completely - cleans up all files from the lib-, build- and dist-folder, configured in build.properties, - and the folders itself too. - - - -* Interesting algorithms and tricks - - - org.gjt.sp.jedit.browser.VFSDirectoryEntryTable: a tree table control. - - - org.gjt.sp.jedit.buffer.LineManager: the "gap" optimization allows - update operations to be performed in O(1) time in certain - circumstances. - - - org.gjt.sp.jedit.buffer.KillRing: uses a hash to speed up comparisons - with sets of strings. - - - org.gjt.sp.jedit.search.BoyerMooreSearchMatcher: fast text search. - - - org.gjt.sp.jedit.syntax.TokenMarker: generic tokenizer driven by rules - defined in an XML file. - - - org.gjt.sp.jedit.textarea.DisplayManager: the fold visibility map - looks like an RLE-compressed bit set but does lookups in O(log n). - - - org.gjt.sp.util.WorkThreadPool: a pool of threads executing requests - from a queue, enforcing various concurrency requirements. - - - -* Tips for Eclipse/NetBeans/IDE users: - -A file "jsr305.jar" contains definitions of the annotations -used in jEdit source code. It is downloaded automatically by ivy -as part of the ant build process, to your lib/compile subfolder. -If you add that jar to the -project properties - java build path - libraries, that will -get rid of the compiler errors on the annotations. - -A file "tools.jar" from the JDK is also needed in your -java build path. - -The ant build process creates a subfolder called "build" for its work. -Eclipse does the same and may pick the same folder. -It is recommended you check/ensure that a different build -directory ("Default Ouptut Folder") for Eclipse is used. - -Some of the source directories are only needed for building packages on -certain platforms. If you add jEdit source to an IDE like Eclipse that tries -to compile every .java file, you'll get some errors from these directories unless -you have the right libraries, which are automatically downloaded by ivy. -However, if you tell Eclipse to exclude these directories, -you can still build and run/debug jEdit from source. Follow these steps: - - - Project properties - Java build path - - Source - Excluded dirs - Edit - Add multiple - - Add these subdirs: net, de, build, test, misc - - Default output folder: /build-eclipse - -The "eclipse-formatting.xml" file can be used to set the -code format style to be the same as what is currently used here. Deleted: jEdit/trunk/build.properties.sample =================================================================== --- jEdit/trunk/build.properties.sample 2025-03-04 07:49:42 UTC (rev 25768) +++ jEdit/trunk/build.properties.sample 2025-03-17 03:22:24 UTC (rev 25769) @@ -1,70 +0,0 @@ -### -### Build property file for jEdit -### - -### The directory where to download dependencies to -### Use a directory exclusive used for that, -### because the target "clean-all" will delete -### it with all its content. (So don't use your -### home-directory or your project-directory -### if you don't want to loose all your files!) -### This has to be a relative directory. -#lib.dir=lib - -### The directory where to put the build-files -### Use a directory exclusive used for that, -### because the target "clean-all" will delete -### it with all its content. (So don't use your -### home-directory or your project-directory -### if you don't want to loose all your files!) -### This has to be a relative directory. -#build.dir=build - -### The directory where to put the distribution-files -### Use a directory exclusive used for that, -### because the target "clean-all" will delete -### it with all its content. (So don't use your -### home-directory or your project-directory -### if you don't want to loose all your files!) -### This has to be a relative directory. -#dist.dir=dist - -### The Ivy version to be used -#ivy.version=2.2.0 - -### The name of the wine executable for building the Windows installer on *nix. -#wine.executable=wine - -### The name of the winepath executable for translating paths for wine. -#winepath.executable=winepath - -### The name of the Inno Setup command line compiler -### executable for building the Windows installer. - -# Example Windows location -#innosetup.compiler.executable=C:\\Program Files (x86)\\Inno Setup 6\\ISCC.exe - -# Example wine location -#innosetup.compiler.executable=/home/vampire/.wine/drive_c/Program Files (x86)/Inno Setup 6/ISCC.exe -#innosetup.via.wine=true - -### For uploading the docs to the public webserver -### adjust the following to your local path -#rsync.executable=C:\\Programme\\cwRsync\\bin\\rsync.exe -# If it's in your path, this is sufficient: -#rsync.executable=rsync - -### GPG settings for signing the Debian repository metadata -### The password can also be supplied interactively -#gpg.ignore.missing.secring=true -#gpg.secring=/home/vampire/.gnupg/secring.gpg -#gpg.secring.password=<password> - -# debug settings -#build.debug=true -#build.debuglevel=lines,vars,source - -# warning settings -#build.nowarn=false -#build.deprecation=true -#build.compilerarg=-Xlint:unchecked Deleted: jEdit/trunk/build.xml =================================================================== --- jEdit/trunk/build.xml 2025-03-04 07:49:42 UTC (rev 25768) +++ jEdit/trunk/build.xml 2025-03-17 03:22:24 UTC (rev 25769) @@ -1,2113 +0,0 @@ -<project name="jedit" - default="build" - xmlns:mod="antlib:de.masters_of_disaster.ant.tasks" - xmlns:contrib="antlib:net.sf.antcontrib" - xmlns:launch4j="antlib:net.sf.launch4j.ant" - xmlns:appbundler="antlib:com.oracle.appbundler" - xmlns:fop="antlib:org.apache.fop.tools.anttasks" - xmlns:ivy="antlib:org.apache.ivy.ant"> - <description> - This is an ant build.xml file for building jEdit - Programmer's Text Editor. - </description> - - <property file="build.properties" - prefix="config"/> - - <!-- Target Java Versions --> - <property name="target.java.version" - value="11"/> - - <!-- Various Paths --> - <property name="config.lib.dir" - value="lib"/> - <property name="config.build.dir" - value="build"/> - <property name="config.dist.dir" - value="dist"/> - <property name="lib.dir" - location="${config.lib.dir}"/> - <property name="build.dir" - location="${config.build.dir}"/> - <property name="dist.dir" - location="${config.dist.dir}"/> - <property name="classes.dir" - location="${build.dir}/classes"/> - <property name="jar.location" - location="${build.dir}"/> - <property name="textAreaPackage" - location="../textarea"/> - - <!-- Ivy Properties --> - <property name="config.ivy.version" - value="2.2.0"/> - <property name="ivy.jar.dir" - location="${lib.dir}/ivy"/> - <property name="ivy.jar.filename" - value="ivy-${config.ivy.version}.jar"/> - <property name="ivy.jar.file" - location="${ivy.jar.dir}/${ivy.jar.filename}"/> - - <!-- Miscellaneous --> - <property name="jar.filename" - value="${ant.project.name}.jar"/> - <property name="config.build.debuglevel" - value="lines,vars,source"/> - <property name="config.build.nowarn" - value="false"/> - <property name="config.build.deprecation" - value="true"/> - <property name="config.build.compilerarg" - value="-Xlint:unchecked -Xlint:finally -Xlint:fallthrough -Xmaxwarns 1000"/> - - <target name="init" - unless="init.done"> - <echo message="Buildfile for ${ant.project.name} (${ant.file})" - level="info"/> - <fail message="Ant 1.9.10 or newer is needed for jEdit to build, please install it and rerun (found Ant version: '${ant.version}')"> - <condition> - <not> - <antversion atleast="1.9.10"/> - </not> - </condition> - </fail> - <fail message="Java 11 or newer is needed for jEdit to build, please install it and rerun (found Java version: '${ant.java.version}')"> - <condition> - <not> - <javaversion atleast="11"/> - </not> - </condition> - </fail> - <fail message="The ant-optional package is needed for jEdit to build, please install it and rerun"> - <condition> - <not> - <and> - <available classname="org.apache.tools.ant.taskdefs.optional.depend.Depend"/> - <available classname="org.apache.tools.ant.taskdefs.optional.TraXLiaison"/> - </and> - </not> - </condition> - </fail> - <property name="init.done" - value="true"/> - </target> - - <target name="check-ivy" - depends="init"> - <available property="ivy.jar.present" - file="${ivy.jar.file}" - type="file"/> - </target> - - <target name="download-ivy" - depends="init,check-ivy" - unless="ivy.jar.present"> - <mkdir dir="${ivy.jar.dir}"/> - <get src="https://repo1.maven.org/maven2/org/apache/ivy/ivy/${config.ivy.version}/ivy-${config.ivy.version}.jar" - dest="${ivy.jar.file}" - usetimestamp="true"/> - </target> - - <target name="init-ivy" - depends="init,download-ivy" - unless="ivy.done"> - <property name="ivy.retrieve.pattern" - value="${lib.dir}/[conf]/[artifact](-[classifier]).[ext]"/> - <taskdef resource="org/apache/ivy/ant/antlib.xml" - classpath="${ivy.jar.file}" - loaderref="ivy.loader" - uri="antlib:org.apache.ivy.ant"/> - </target> - - <target name="retrieve" - description="retrieve the dependencies" - depends="init,init-ivy" - unless="ivy.done"> - <ivy:retrieve sync="true"/> - <ivy:retrieve pattern="${lib.dir}/ivy/[artifact]-[revision].[ext]" - organisation="org.apache.ivy" - module="ivy" - revision="${config.ivy.version}" - conf="default" - inline="true"/> - <property name="ivy.done" - value="true"/> - </target> - - <target name="setup" - depends="init,retrieve"> - <taskdef resource="net/sf/antcontrib/antlib.xml" - uri="antlib:net.sf.antcontrib"> - <classpath> - <fileset dir="${lib.dir}/ant-contrib" - includes="*.jar"/> - </classpath> - </taskdef> - - <script language="beanshell"> - <classpath> - <fileset dir="${lib.dir}/scripting" - includes="*.jar"/> - </classpath> - - import java.util.regex.Pattern; - file = new File(basedir, "org/gjt/sp/jedit/jEdit.java"); - fileChars = new char[file.length()]; - reader = new BufferedReader(new InputStreamReader(new FileInputStream(file), "UTF-8")); - reader.read(fileChars, 0, fileChars.length); - pattern = Pattern.compile("public static String getBuild\\(\\)[^}]+return \"([^\"]{11})\""); - matcher = pattern.matcher(new String(fileChars)); - matcher.find(); - build = matcher.group(1); - major = Integer.parseInt(build.substring(0,2)); - minor = Integer.parseInt(build.substring(3,5)); - beta = Integer.parseInt(build.substring(6,8)); - micro = Integer.parseInt(build.substring(9,11)); - version = major - + "." + minor - + (beta != 99 ? "pre" + beta : "." + micro); - project.setUserProperty("jedit.version", version); - project.setUserProperty("jedit.build.number", build); - project.setUserProperty("jedit.version.final", Boolean.toString(beta == 99)); - </script> - <property name="dist.jar.filename" - value="jedit${jedit.version}install.jar"/> - <property name="manual.filename.prefix" - value="jedit${jedit.version}manual-"/> - <property name="src.archive.filename" - value="jedit${jedit.version}source.tar.bz2"/> - <property name="win.filename" - value="jedit${jedit.version}install"/> - <property name="mac.disk.image.filename" - value="jedit${jedit.version}install.dmg"/> - </target> - - <target name="clean" - depends="init" - description="clean up intermediate files"> - <delete includeemptydirs="true" - failonerror="false"> - <fileset dir="${build.dir}/classes" - defaultexcludes="false"/> - <fileset dir="${dist.dir}/classes" - defaultexcludes="false"/> - </delete> - </target> - - <target name="clean-all" - depends="init" - description="clean up lib.dir, build.dir and dist.dir completely"> - <delete includeemptydirs="true" - failonerror="false"> - <fileset dir="${lib.dir}" - defaultexcludes="false"/> - <fileset dir="${build.dir}" - defaultexcludes="false"/> - <fileset dir="${dist.dir}" - defaultexcludes="false"/> - <fileset dir="${textAreaPackage}/build" - defaultexcludes="false"/> - </delete> - </target> - - <target name="clean-jenkins" - depends="init,clean-all" - description="clean-all, also clean up ivy cache"> - <delete includeemptydirs="true" - failonerror="false"> - <fileset dir="${user.home}/.ivy2/cache" - defaultexcludes="false"/> - </delete> - </target> - - <target name="compile" - depends="init,retrieve"> - <mkdir dir="${classes.dir}/core"/> - <depend srcDir="${basedir}" - destDir="${classes.dir}/core" - cache="${classes.dir}"/> - <dependset> - <srcfilelist files="build.xml"/> - <targetfileset dir="${classes.dir}/core"/> - </dependset> - <javac srcdir="${basedir}" - destdir="${classes.dir}/core" - debug="true" - debuglevel="${config.build.debuglevel}" - nowarn="${config.build.nowarn}" - deprecation="${config.build.deprecation}" - release="${target.java.version}" - compiler="modern" - encoding="UTF-8" - includeAntRuntime="false"> - <classpath id="classpath.compile"> - <fileset dir="${lib.dir}/compile" - includes="*.jar"/> - </classpath> - <include name="org/**"/> - <compilerarg line="${config.build.compilerarg}"/> - </javac> - </target> - - <target name="compile-test" - depends="init,retrieve,compile"> - <mkdir dir="${classes.dir}/test"/> - <depend srcDir="${basedir}/test" - destDir="${classes.dir}/test" - cache="${classes.dir}"/> - <dependset> - <srcfilelist files="build.xml"/> - <srcfilelist files="ivy.xml"/> - <targetfileset dir="${classes.dir}/test"/> - </dependset> - <javac srcdir="test" - destdir="${classes.dir}/test" - debug="true" - debuglevel="${config.build.debuglevel}" - nowarn="${config.build.nowarn}" - deprecation="${config.build.deprecation}" - release="${target.java.version}" - compiler="modern" - encoding="UTF-8" - includeAntRuntime="false"> - <classpath id="classpath.test"> - <fileset dir="${lib.dir}/test" - includes="*.jar"/> - <pathelement location="${classes.dir}/core"/> - </classpath> - <compilerarg line="${config.build.compilerarg}"/> - </javac> - </target> - - <target name="prepare-textArea" - depends="init"> - <delete includeemptydirs="true" - failonerror="false"> - <fileset dir="${textAreaPackage}/src"/> - </delete> - - <mkdir dir="${textAreaPackage}/src"/> - <copy todir="${textAreaPackage}/src"> - <fileset dir="${basedir}"> - <include name="modes/*"/> - <include name="keymaps/*"/> - <include name="org/gjt/sp/jedit/bsh/*"/> - <include name="org/gjt/sp/jedit/bsh/**/*"/> - - <include name="org/gjt/sp/jedit/buffer/BufferAdapter.java"/> - <include name="org/gjt/sp/jedit/buffer/BufferListener.java"/> - <include name="org/gjt/sp/jedit/buffer/BufferSegment.java"/> - <include name="org/gjt/sp/jedit/buffer/ContentManager.java"/> - <include name="org/gjt/sp/jedit/buffer/DefaultFoldHandlerProvider.java"/> - <include name="org/gjt/sp/jedit/buffer/DummyFoldHandler.java"/> - <include name="org/gjt/sp/jedit/buffer/ExplicitFoldHandler.java"/> - <include name="org/gjt/sp/jedit/buffer/FoldHandler.java"/> - <include name="org/gjt/sp/jedit/buffer/FoldHandlerProvider.java"/> - <include name="org/gjt/sp/jedit/buffer/IndentFoldHandler.java"/> - <include name="org/gjt/sp/jedit/buffer/JEditBuffer.java"/> - <include name="org/gjt/sp/jedit/buffer/KillRing.java"/> - <include name="org/gjt/sp/jedit/buffer/LineManager.java"/> - <include name="org/gjt/sp/jedit/buffer/PositionManager.java"/> - <include name="org/gjt/sp/jedit/buffer/UndoManager.java"/> - <include name="org/gjt/sp/jedit/buffer/WordWrap.java"/> - - <include name="org/gjt/sp/jedit/bufferio/IoTask.java"/> - - <include name="org/gjt/sp/jedit/gui/KeyEventTranslator.java"/> - <include name="org/gjt/sp/jedit/gui/KeyEventWorkaround.java"/> - <include name="org/gjt/sp/jedit/gui/MutableListModel.java"/> - <include name="org/gjt/sp/jedit/gui/ShortcutPrefixActiveEvent.java"/> - <include name="org/gjt/sp/jedit/gui/HistoryModel.java"/> - <include name="org/gjt/sp/jedit/gui/HistoryModelSaver.java"/> - - <include name="org/gjt/sp/jedit/indent/*.java"/> - - <include name="org/gjt/sp/jedit/input/AbstractInputHandler.java"/> - <include name="org/gjt/sp/jedit/input/DefaultInputHandlerProvider.java"/> - <include name="org/gjt/sp/jedit/input/InputHandlerProvider.java"/> - <include name="org/gjt/sp/jedit/input/TextAreaInputHandler.java"/> - - <include name="org/gjt/sp/jedit/syntax/*.java"/> - <include name="org/gjt/sp/jedit/syntax/xmode.dtd"/> - - <include name="org/gjt/sp/jedit/datatransfer/JEditDataFlavor.java"/> - <include name="org/gjt/sp/jedit/datatransfer/JEditRichText.java"/> - <include name="org/gjt/sp/jedit/datatransfer/JEditTransferable.java"/> - <include name="org/gjt/sp/jedit/datatransfer/JEditTransferableService.java"/> - <include name="org/gjt/sp/jedit/datatransfer/RichJEditTextTransferableService.java"/> - <include name="org/gjt/sp/jedit/datatransfer/RichTextTransferable.java"/> - <include name="org/gjt/sp/jedit/datatransfer/StringTransferableService.java"/> - <include name="org/gjt/sp/jedit/datatransfer/TransferHandler.java"/> - - <include name="org/gjt/sp/jedit/textarea/Anchor.java"/> - <include name="org/gjt/sp/jedit/textarea/AntiAlias.java"/> - <include name="org/gjt/sp/jedit/textarea/BufferHandler.java"/> - <include name="org/gjt/sp/jedit/textarea/ChunkCache.java"/> - <include name="org/gjt/sp/jedit/textarea/ColumnBlock.java"/> - <include name="org/gjt/sp/jedit/textarea/ColumnBlockLine.java"/> - <include name="org/gjt/sp/jedit/textarea/DisplayManager.java"/> - <include name="org/gjt/sp/jedit/textarea/ElasticTabStopBufferListener.java"/> - <include name="org/gjt/sp/jedit/textarea/ElasticTabstopsTabExpander.java"/> - <include name="org/gjt/sp/jedit/textarea/ExtensionManager.java"/> - <include name="org/gjt/sp/jedit/textarea/FastRepaintManager.java"/> - <include name="org/gjt/sp/jedit/textarea/FirstLine.java"/> - <include name="org/gjt/sp/jedit/textarea/FoldPainter.java"/> - <include name="org/gjt/sp/jedit/textarea/Gutter.java"/> - <include name="org/gjt/sp/jedit/textarea/GutterPopupHandler.java"/> - <include name="org/gjt/sp/jedit/textarea/InputMethodSupport.java"/> - <include name="org/gjt/sp/jedit/textarea/MouseActions.java"/> - <include name="org/gjt/sp/jedit/textarea/MouseActionsProvider.java"/> - <include name="org/gjt/sp/jedit/textarea/Node.java"/> - <include name="org/gjt/sp/jedit/textarea/RangeMap.java"/> - <include name="org/gjt/sp/jedit/textarea/Selection.java"/> - <include name="org/gjt/sp/jedit/textarea/SelectionManager.java"/> - <include name="org/gjt/sp/jedit/textarea/ScreenLineManager.java"/> - <include name="org/gjt/sp/jedit/textarea/ScrollLayout.java"/> - <include name="org/gjt/sp/jedit/textarea/ScrollLineCount.java"/> - <include name="org/gjt/sp/jedit/textarea/ScrollListener.java"/> - <include name="org/gjt/sp/jedit/textarea/StandaloneTextArea.java"/> - <include name="org/gjt/sp/jedit/textarea/StatusListener.java"/> - <include name="org/gjt/sp/jedit/textarea/StructureMatcher.java"/> - <include name="org/gjt/sp/jedit/textarea/TextArea.java"/> - <include name="org/gjt/sp/jedit/textarea/TextAreaBorder.java"/> - <include name="org/gjt/sp/jedit/textarea/TextAreaDropHandler.java"/> - <include name="org/gjt/sp/jedit/textarea/TextAreaException.java"/> - <include name="org/gjt/sp/jedit/textarea/TextAreaExtension.java"/> - <include name="org/gjt/sp/jedit/textarea/TextAreaMouseHandler.java"/> - <include name="org/gjt/sp/jedit/textarea/TextAreaPainter.java"/> - <include name="org/gjt/sp/jedit/textarea/textarea.actions.xml"/> - <include name="org/gjt/sp/jedit/textarea/TriangleFoldPainter.java"/> - - <include name="org/gjt/sp/jedit/ActionListHandler.java"/> - <include name="org/gjt/sp/jedit/BeanShellFacade.java"/> - <include name="org/gjt/sp/jedit/Debug.java"/> - <include name="org/gjt/sp/jedit/IPropertyManager.java"/> - <include name="org/gjt/sp/jedit/JEditAbstractEditAction.java"/> - <include name="org/gjt/sp/jedit/JEditActionSet.java"/> - <include name="org/gjt/sp/jedit/JEditActionContext.java"/> - <include name="org/gjt/sp/jedit/JEditBeanShellAction.java"/> - <include name="org/gjt/sp/jedit/LargeFileMode.java"/> - <include name="org/gjt/sp/jedit/Mode.java"/> - <include name="org/gjt/sp/jedit/OperatingSystem.java"/> - <include name="org/gjt/sp/jedit/RegistersListener.java"/> - <include name="org/gjt/sp/jedit/Registers.java"/> - <include name="org/gjt/sp/jedit/RegisterSaver.java"/> - <include name="org/gjt/sp/jedit/SelectionManager.java"/> - <include name="org/gjt/sp/jedit/TextUtilities.java"/> - <include name="org/gjt/sp/jedit/actions.dtd"/> - <include name="org/gjt/sp/jedit/jedit.props"/> - <include name="modes/*"/> - <include name="org/gjt/sp/util/GenericGUIUtilities.java"/> - <include name="org/gjt/sp/util/Log*.java"/> - <include name="org/gjt/sp/util/IntegerArray.java"/> - <include name="org/gjt/sp/util/IOUtilities.java"/> - <include name="org/gjt/sp/util/ProgressObserver.java"/> - <include name="org/gjt/sp/util/SegmentCharSequence.java"/> - <include name="org/gjt/sp/util/StandardUtilities.java"/> - <include name="org/gjt/sp/util/Task.java"/> - <include name="org/gjt/sp/util/TaskManager.java"/> - <include name="org/gjt/sp/util/TaskListener.java"/> - <include name="org/gjt/sp/util/AwtRunnableQueue.java"/> - <include name="org/gjt/sp/util/ThreadUtilities.java"/> - <include name="org/gjt/sp/util/SyntaxUtilities.java"/> - <include name="org/gjt/sp/util/XMLUtilities.java"/> - - <include name="org/jedit/util/CleanerService.java"/> - </fileset> - </copy> - - </target> - - <target name="compile-textArea" - depends="init,retrieve,prepare-textArea"> - <mkdir dir="${textAreaPackage}/build"/> - <javac srcdir="${textAreaPackage}/src" - destdir="${textAreaPackage}/build" - debug="true" - debuglevel="${config.build.debuglevel}" - nowarn="${config.build.nowarn}" - deprecation="${config.build.deprecation}" - release="${target.java.version}" - compiler="modern" - encoding="UTF-8" - includeAntRuntime="false"> - <classpath id="classpath.compile"> - <fileset dir="${lib.dir}/compile" includes="*.jar"/> - </classpath> - <compilerarg line="${config.build.compilerarg}"/> - </javac> - </target> - - <target name="test" - depends="init,retrieve,compile,compile-test" - description="run unit tests"> - <delete dir="${build.dir}/test/raw-reports"/> - <mkdir dir="${build.dir}/test/raw-reports"/> - <junit fork="true" - forkmode="once" - printsummary="true" - failureproperty="tests.failed" - includeantruntime="false" - showoutput="true" - enabletestlistenerevents="true"> - <classpath refid="classpath.test"/> - <classpath location="${classes.dir}/test"/> - <classpath location="${ant.library.dir}/ant.jar"/> - <classpath location="${ant.library.dir}/ant-junit.jar"/> - <classpath location="${ant.library.dir}/ant-junit4.jar"/> - <formatter type="xml"/> - <batchtest todir="${build.dir}/test/raw-reports"> - <fileset dir="test"/> - </batchtest> - </junit> - <mkdir dir="${build.dir}/test/merged-reports"/> - <junitreport todir="${build.dir}/test/merged-reports"> - <fileset dir="${build.dir}/test/raw-reports"/> - <report todir="${build.dir}/test/reports"/> - </junitreport> - <fail message="Unit test(s) failed! See reports at ${build.dir}/test/reports/index.html" - if="tests.failed"/> - </target> - - <target name="build" - depends="init,retrieve,setup,compile,test" - description="build the jEdit JAR-file with full debug-information"> - <mkdir dir="${jar.location}"/> - <jar destfile="${jar.location}/${jar.filename}" - basedir="${classes.dir}/core" - compress="false" - manifest="org/gjt/sp/jedit/jedit.manifest" - duplicate="fail" - index="true"> - <fileset dir="${basedir}"> - <include name="org/gjt/sp/jedit/bsh/commands/*.bsh"/> - <include name="org/gjt/sp/jedit/**/*.dtd"/> - <include name="org/gjt/sp/jedit/default.abbrevs"/> - <include name="org/gjt/sp/jedit/*.props"/> - <include name="org/gjt/sp/jedit/*.xml"/> - <include name="org/gjt/sp/jedit/textarea/*.xml"/> - <include name="org/gjt/sp/jedit/icons/**/*.gif"/> - <include name="org/gjt/sp/jedit/icons/**/*.jpg"/> - <include name="org/gjt/sp/jedit/icons/**/*.png"/> - <include name="org/jedit/localization/*.props"/> - </fileset> - </jar> - <loadfile srcfile="keymaps/jEdit_keys.props" - property="jEdit.keymap" - encoding="ISO-8859-1"/> - <fail message="jEdit keymap must not contain A+[a-z] shortcuts, those may conflict with main menu mnemonics in localizations"> - <condition> - <matches string="${jEdit.keymap}" - pattern="=A\+[a-z]"/> - </condition> - </fail> - <copy todir="${jar.location}"> - <fileset dir="${basedir}"> - <include name="keymaps/**"/> - <include name="macros/**"/> - <include name="modes/**"/> - <include name="properties/**"/> - <include name="startup/**"/> - </fileset> - </copy> - <copy todir="${jar.location}/jars"> - <fileset dir="${lib.dir}/default-plugins"> - <exclude name="MacOSX.jar"/> - </fileset> - </copy> - <contrib:if> - <os family="mac"/> - <contrib:then> - <copy todir="${jar.location}/jars"> - <fileset dir="${lib.dir}/default-plugins"> - <include name="MacOSX.jar"/> - </fileset> - </copy> - </contrib:then> - </contrib:if> - </target> - - <target name="build-exe-launcher" - depends="init,retrieve,setup,filter-package-files" - description="build the EXE launcher"> - <contrib:if> - <os family="windows"/> - <contrib:then> - <property name="osfamily" - value="windows"/> - </contrib:then> - </contrib:if> - <contrib:if> - <os family="mac"/> - <contrib:then> - <property name="osfamily" - value="mac"/> - </contrib:then> - </contrib:if> - <contrib:if> - <os family="unix" arch="amd64"/> - <contrib:then> - <property name="osfamily" - value="unix-x64"/> - </contrib:then> - </contrib:if> - <contrib:if> - <os family="unix" arch="x86"/> - <contrib:then> - <property name="osfamily" - value="unix-x32"/> - </contrib:then> - </contrib:if> - <contrib:switch value="${osfamily}"> - <contrib:case value="windows"> - <unjar src="${lib.dir}/launch4j/launch4j-workdir-win32.jar" - dest="${build.dir}/launch4j"/> - <copy todir="${lib.dir}/launch4j"> - <fileset dir="${build.dir}/launch4j/launch4j-3.50-workdir-win32/"/> - </copy> - </contrib:case> - <contrib:case value="unix-x64"> - <unjar src="${lib.dir}/launch4j/launch4j-workdir-linux64.jar" - dest="${build.dir}/launch4j/"/> - <copy todir="${lib.dir}/launch4j"> - <fileset dir="${build.dir}/launch4j/launch4j-3.50-workdir-linux64/"/> - </copy> - <chmod dir="${lib.dir}/launch4j/bin" - perm="+x" - includes="**"/> - </contrib:case> - <contrib:case value="unix"> - <unjar src="${lib.dir}/launch4j/launch4j-workdir-linux.jar" - dest="${build.dir}/launch4j/"/> - <copy todir="${lib.dir}/launch4j"> - <fileset dir="${build.dir}/launch4j/launch4j-3.50-workdir-linux/"/> - </copy> - <chmod dir="${lib.dir}/launch4j/bin" - perm="+x" - includes="**"/> - </contrib:case> - <contrib:case value="mac"> - <unjar src="${lib.dir}/launch4j/launch4j-workdir-mac.jar" - dest="${build.dir}/launch4j/"/> - <copy todir="${lib.dir}/launch4j"> - <fileset dir="${build.dir}/launch4j/launch4j-3.50-workdir-mac/"/> - </copy> - <chmod dir="${lib.dir}/launch4j/bin" - perm="+x" - includes="**" - osfamily="mac"/> - </contrib:case> - <contrib:default> - <fail message="Unsupported OS family (${osfamily}). If you are on Windows, *nix or MacOS, please report this as bug, if not, please report it as a feature request"/> - </contrib:default> - </contrib:switch> - <taskdef name="create" - classname="net.sf.launch4j.ant.Launch4jTask" - uri="antlib:net.sf.launch4j.ant"> - <classpath> - <fileset dir="${lib.dir}/launch4j" - includes="*.jar"/> - </classpath> - </taskdef> - <launch4j:create configFile="${classes.dir}/package-files/windows/jedit.launch4j.xml" - outfile="${jar.location}/jedit.exe"/> - </target> - - <target name="build-textArea" - depends="init,compile-textArea" - description="build the textArea JAR-file with full debug-information"> - <mkdir dir="${jar.location}"/> - <jar destfile="${jar.location}/${ant.project.name}-textArea.jar" - compress="true" - duplicate="fail" - index="true"> - <fileset dir="${textAreaPackage}/build/"/> - <fileset dir="${textAreaPackage}/src"> - <include name="org/gjt/sp/jedit/textarea/*.xml"/> - <include name="org/gjt/sp/jedit/syntax/xmode.dtd"/> - <include name="org/gjt/sp/jedit/actions.dtd"/> - <include name="org/gjt/sp/jedit/jedit.props"/> - <include name="keymaps/*.props"/> - <include name="modes/*"/> - </fileset> - <manifest> - <attribute name="Main-Class" - value="org.gjt.sp.jedit.textarea.StandaloneTextArea"/> - </manifest> - </jar> - </target> - - <target name="run" - depends="init,build" - description="run jEdit"> - <java jar="${jar.location}/${jar.filename}" - fork="true" - spawn="true"> - <arg value="-settings=${build.dir}/settings"/> - </java> - </target> - - <target name="run-debug" - depends="init,build" - description="run jEdit with debug listening enabled"> - <java jar="${jar.location}/${jar.filename}" - fork="true" - spawn="true"> - <jvmarg value="-agentlib:jdwp=transport=dt_socket,server=y,address=localhost:5005,timeout=60000"/> - <arg value="-settings=${build.dir}/settings"/> - </java> - </target> - - <target name="unpack-docbook-xsl" - depends="init,retrieve"> - <unzip src="${lib.dir}/docbook/docbook-xsl-resources.zip" - dest="${build.dir}/docbook-xsl/"/> - </target> - - <presetdef name="dependset.build"> - <dependset> - <srcfilelist dir="${basedir}"> - <file name="build.xml"/> - <file name="ivy.xml"/> - <file name="ivysettings.xml"/> - </srcfilelist> - </dependset> - </presetdef> - - <presetdef name="dependset.html"> - <dependset.build> - <srcfileset dir="${lib.dir}/docbook"/> - <srcfilelist files="doc/jedithtml.xsl"/> - </dependset.build> - </presetdef> - - <presetdef name="xslt.doc"> - <xslt> - <classpath> - <fileset dir="${lib.dir}/docbook" - includes="*.jar"/> - </classpath> - <!-- ant 1.9 compatibility: explicitly set the processor to Saxon (see bug #3818) --> - <factory name="com.icl.saxon.TransformerFactoryImpl"/> - <xmlcatalog> - <entity publicid="http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl" - location="${build.dir}/docbook-xsl/docbook/html/chunk.xsl"/> - <entity publicid="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl" - location="${build.dir}/docbook-xsl/docbook/fo/docbook.xsl"/> - </xmlcatalog> - <sysproperty key="javax.xml.parsers.DocumentBuilderFactory" - value="org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"/> - <sysproperty key="javax.xml.parsers.SAXParserFactory" - value="org.apache.xerces.jaxp.SAXParserFactoryImpl"/> - <sysproperty key="org.apache.xerces.xni.parser.XMLParserConfiguration" - value="org.apache.xerces.parsers.XIncludeParserConfiguration"/> - </xslt> - </presetdef> - - <target name="generate-doc-faq" - depends="init,retrieve,setup,unpack-docbook-xsl"> - <dependset.html> - <srcfileset dir="doc/FAQ"/> - <targetfileset dir="${jar.location}/doc/FAQ"/> - </dependset.html> - <contrib:if> - <available file="${jar.location}/doc/FAQ/toc.xml" - type="file"/> - <contrib:then> - <echo message="FAQ is up-to-date" - level="info"/> - </contrib:then> - <contrib:else> - <xslt.doc style="doc/jedithtml.xsl" - in="doc/FAQ/faq.xml" - out="${jar.location}/doc/FAQ/index.html"> - <param name="base.dir" - expression="${jar.location}/doc/FAQ/"/> - </xslt.doc> - </contrib:else> - </contrib:if> - </target> - - <target name="generate-doc-news" - depends="init,retrieve,setup,unpack-docbook-xsl"> - <dependset.html> - <srcfileset dir="doc/whatsnew"/> - <targetfileset dir="${jar.location}/doc/whatsnew"/> - </dependset.html> - <contrib:if> - <available file="${jar.location}/doc/whatsnew/toc.xml" - type="file"/> - <contrib:then> - <echo message="News is up-to-date" - level="info"/> - </contrib:then> - <contrib:else> - <xslt.doc style="doc/jedithtml.xsl" - in="doc/whatsnew/news.xml" - out="${jar.location}/doc/whatsnew/index.html"> - <param name="base.dir" - expression="${jar.location}/doc/whatsnew/"/> - </xslt.doc> - </contrib:else> - </contrib:if> - </target> - - <target name="generate-doc-users-guide" - depends="init,retrieve,setup,unpack-docbook-xsl"> - <dependset.html> - <srcfileset dir="doc/users-guide"/> - <targetfileset dir="${jar.location}/doc/users-guide"/> - </dependset.html> - <contrib:if> - <available file="${jar.location}/doc/users-guide/toc.xml" - type="file"/> - <contrib:then> - <echo message="User's Guide is up-to-date" - level="info"/> - </contrib:then> - <contrib:else> - <xslt.doc style="doc/jedithtml.xsl" - in="doc/users-guide/users-guide.xml" - out="${jar.location}/doc/users-guide/index.html"> - <param name="base.dir" - expression="${jar.location}/doc/users-guide/"/> - </xslt.doc> - </contrib:else> - </contrib:if> - </target> - - <target name="docs-html" - depends="init,generate-doc-faq,generate-doc-news,generate-doc-users-guide" - description="generate HTML docs"> - <copy todir="${jar.location}/doc"> - <fileset dir="doc"> - <include name="*.txt"/> - <include name="*.html"/> - <include name="*.png"/> - <include name="tips/**"/> - </fileset> - </copy> - </target> - - <target name="generate-javadoc" - depends="init,setup,compile"> - <dependset> - <srcfileset dir="${basedir}"> - <include name="build.xml"/> - <include name="doclet/**/*.java"/> - <include name="org/**/*.java"/> - <include name="org/**/package.html"/> - </srcfileset> - <targetfileset dir="${classes.dir}/javadoc"/> - </dependset> - <contrib:if> - <available file="${classes.dir}/javadoc/api/toc.xml" - type="file"/> - <contrib:then> - <echo message="JavaDoc is up-to-date" - level="info"/> - </contrib:then> - <contrib:else> - <mkdir dir="${classes.dir}/javadoc"/> - <javac srcdir="${basedir}" - destdir="${classes.dir}/javadoc" - includes="doclet/**" - debug="true" - debuglevel="${config.build.debuglevel}" - nowarn="${config.build.nowarn}" - deprecation="${config.build.deprecation}" - release="${target.java.version}" - compiler="modern" - encoding="UTF-8" - includeAntRuntime="true"> - <compilerarg line="${config.build.compilerarg}"/> - </javac> - <javadoc locale="en" - sourcepath="${basedir}" - destdir="${classes.dir}/javadoc/api" - packagenames="org.*" - doclet="doclet.GenerateTocXML" - docletpath="${classes.dir}/javadoc" - additionalparam="-Xmaxwarns 2000" - version="true" - use="true" - author="true" - splitindex="true" - windowtitle="jEdit API Documentation" - doctitle="jEdit API" - failonerror="true" - source="${target.java.version}" - encoding="UTF-8" - docencoding="UTF-8" - charset="UTF-8"> - <group title="jEdit 5 API" - packages="org.jedit.*"/> - <group title="jEdit 4 API" - packages="org.gjt.sp.*"/> - <group title="BeanShell" - packages="org.gjt.sp.jedit.bsh*"/> - <tag name="todo" scope="all" description="To do:"/> - <tag name="example" scope="all" description="Example:"/> - <classpath id="classpath.javadoc"> - <path refid="classpath.compile"/> - <pathelement location="${classes.dir}/core"/> - </classpath> - </javadoc> - </contrib:else> - </contrib:if> - </target> - - <target name="docs-javadoc" - depends="init,generate-javadoc" - description="generate JavaDoc API docs"> - <copy todir="${jar.location}/doc"> - <fileset dir="${classes.dir}/javadoc" - includes="api/**" - excludes="api/**/*.html"/> - </copy> - <copy todir="${jar.location}/doc"> - <fileset dir="${classes.dir}/javadoc" - includes="api/**/*.html"/> - <filterchain> - <tokenfilter> - <filetokenizer/> - <replaceregex pattern="<noscript>.*?JavaScript is disabled on your browser\..*?</noscript>" - flags="gs"/> - </tokenfilter> - </filterchain> - </copy> - </target> - - <target name="generate-pdf-users-guide" - depends="init,retrieve,setup,unpack-docbook-xsl"> - <fail message="Please set the property "paper.type"" - unless="paper.type"/> - <contrib:switch value="${paper.type}"> - <contrib:case value="A4"> - <property name="manual.filename.paper.type" - value="a4"/> - </contrib:case> - <contrib:case value="USletter"> - <property name="manual.filename.paper.type" - value="letter"/> - </contrib:case> - <contrib:default> - <property name="manual.filename.paper.type" - value="${paper.type}"/> - </contrib:default> - </contrib:switch> - <dependset.build> - <srcfileset dir="${lib.dir}/docbook"/> - <srcfileset dir="${lib.dir}/fop"/> - <srcfilelist files="doc/jeditfo.xsl"/> - <srcfileset dir="doc/users-guide"/> - <targetfileset file="${classes.dir}/docs-pdf/${manual.filename.prefix}${manual.filename.paper.type}.fot"/> - <targetfileset file="${jar.location}/${manual.filename.prefix}${manual.filename.paper.type}.pdf"/> - </dependset.build> - <contrib:if> - <available file="${jar.location}/${manual.filename.prefix}${manual.filename.paper.type}.pdf" - type="file"/> - <contrib:then> - <echo message="${paper.type} PDF User's Guide is up-to-date" - level="info"/> - </contrib:then> - <contrib:else> - <xslt.doc style="doc/jeditfo.xsl" - in="doc/users-guide/users-guide.xml" - out="${classes.dir}/docs-pdf/${manual.filename.prefix}${manual.filename.paper.type}.fot"> - <param name="paper.type" - expression="${paper.type}"/> - </xslt.doc> - <taskdef name="transform" - classname="org.apache.fop.tools.anttasks.Fop" - uri="antlib:org.apache.fop.tools.anttasks"> - <classpath> - <fileset dir="${lib.dir}/fop" - includes="*.jar"/> - </classpath> - </taskdef> - <fop:transform fofile="${classes.dir}/docs-pdf/${manual.filename.prefix}${manual.filename.paper.type}.fot" - outfile="${jar.location}/${manual.filename.prefix}${manual.filename.paper.type}.pdf" - format="application/pdf" - messagelevel="info"/> - </contrib:else> - </contrib:if> - </target> - - <target name="docs-pdf-a4" - depends="init" - description="generate PDF users-guide with A4 paper size"> - <antcall target="generate-pdf-users-guide"> - <param name="paper.type" - value="A4"/> - </antcall> - </target> - - <target name="docs-pdf-USletter" - depends="init" - description="generate PDF users-guide with US letter paper size"> - <antcall target="generate-pdf-users-guide"> - <param name="paper.type" - value="USletter"/> - </antcall> - </target> - - <target name="docs-upload" - depends="init,docs-html,docs-javadoc" - description="upload generated documentation to public website (needs rsync)"> - <fail message="Please set the property "rsync.executable" in build.properties, you may find example values in build.properties.sample" - unless="config.rsync.executable"/> - <exec executable="${config.rsync.executable}" - dir="${jar.location}/doc/" - failonerror="true"> - <arg value="-avz"/> - <arg value="--delete"/> - <arg value="--progress"/> - <arg value="api"/> - <arg value="FAQ"/> - <arg value="users-guide"/> - <arg value="web.sourceforge.net:/home/project-web/jedit/htdocs"/> - </exec> - </target> - - <target name="compile-installer" - depends="init"> - <mkdir dir="${classes.dir}/installer"/> - <depend srcDir="${basedir}" - destDir="${classes.dir}/installer" - cache="${classes.dir}"/> - <dependset> - <srcfilelist files="build.xml"/> - <targetfileset dir="${classes.dir}/installer"/> - </dependset> - <javac srcdir="${basedir}" - destdir="${classes.dir}/installer" - includes="installer/**" - debug="true" - debuglevel="${config.build.debuglevel}" - nowarn="${config.build.nowarn}" - deprecation="${config.build.deprecation}" - release="${target.java.version}" - compiler="modern" - encoding="UTF-8" - includeAntRuntime="false"> - <compilerarg line="${config.build.compilerarg}"/> - </javac> - </target> - - <target name="dist-java" - depends="init,setup,prepare-dist-files" - description="build the Java-installer"> - <tar destfile="${dist.dir}/jedit-macros.tar.bz2" - longfile="gnu" - compression="bzip2"> - <tarfileset id="jedit-macros" - dir="${dist.dir}" - includes="macros/**"/> - </tar> - <tar destfile="${dist.dir}/jedit-program.tar.bz2" - longfile="gnu" - compression="bzip2"> - <tarfileset id="jedit-program" - dir="${dist.dir}" - includes="doc/** - jars/** - keymaps/** - modes/** - properties/** - startup/** - ${jar.filename}" - excludes="doc/api/** - jars/MacOSX.jar"/> - </tar> - <tar destfile="${dist.dir}/jedit-windows.tar.bz2" - longfile="gnu" - compression="bzip2"> - <tarfileset id="jedit-windows" - dir="${dist.dir}" - includes="jedit.exe"/> - </tar> - <tar destfile="${dist.dir}/jedit-mac.tar.bz2" - longfile="gnu" - compression="bzip2"> - <tarfileset id="jedit-mac" - dir="${dist.dir}" - includes="jars/MacOSX.jar"/> - </tar> - <tar destfile="${dist.dir}/jedit-api.tar.bz2" - longfile="gnu" - compression="bzip2"> - <tarfileset id="jedit-api" - dir="${dist.dir}" - includes="doc/api/**"/> - </tar> - <tar destfile="${dist.dir}/jedit-os2.tar.bz2" - compression="bzip2"> - <tarfileset id="jedit-os2" - dir="${dist.dir}/classes/package-files/os2" - includes="jedit.cmd"/> - </tar> - <antcall target="compile-installer"> - <param name="config.build.debuglevel" - value="lines,source"/> - <param name="classes.dir" - location="${dist.dir}/classes"/> - </antcall> - <antcall target="compile-calculatesize"> - <param name="config.build.debuglevel" - value="lines,source"/> - <param name="classes.dir" - location="${dist.dir}/classes"/> - </antcall> - <taskdef name="calculatesize" - classname="de.masters_of_disaster.ant.tasks.calculatesize.CalculateSize" - classpath="${dist.dir}/classes/calculatesize" - uri="antlib:de.masters_of_disaster.ant.tasks"/> - <mod:calculatesize realsizeproperty="jedit-macros.realsize" - disksizeproperty="jedit-macros.disksize"> - <fileset refid="jedit-macros"/> - </mod:calculatesize> - <mod:calculatesize realsizeproperty="jedit-program.realsize" - disksizeproperty="jedit-program.disksize"> - <fileset refid="jedit-program"/> - </mod:calculatesize> - <mod:calculatesize realsizeproperty="jedit-windows.realsize" - disksizeproperty="jedit-windows.disksize"> - <fileset refid="jedit-windows"/> - </mod:calculatesize> - <mod:calculatesize realsizeproperty="jedit-mac.realsize" - disksizeproperty="jedit-mac.disksize"> - <fileset refid="jedit-mac"/> - </mod:calculatesize> - <mod:calculatesize realsizeproperty="jedit-api.realsize" - disksizeproperty="jedit-api.disksize"> - <fileset refid="jedit-api"/> - </mod:calculatesize> - <mod:calculatesize realsizeproperty="jedit-os2.realsize" - disksizeproperty="jedit-os2.disksize"> - <fileset refid="jedit-os2"/> - </mod:calculatesize> - <copy todir="${dist.dir}/classes/installer/installer" - encoding="UTF-8" - overwrite="true"> - <fileset file="installer/install.props"/> - <filterset> - <filter token="jedit.version" - value="${jedit.version}"/> - <filter token="jedit-macros.realsize" - value="${jedit-macros.realsize}"/> - <filter token="jedit-macros.disksize" - value="${jedit-macros.disksize}"/> - <filter token="jedit-program.realsize" - value="${jedit-program.realsize}"/> - <filter token="jedit-program.disksize" - value="${jedit-program.disksize}"/> - <filter token="jedit-windows.realsize" - value="${jedit-windows.realsize}"/> - <filter token="jedit-windows.disksize" - value="${jedit-windows.disksize}"/> - <filter token="jedit-mac.realsize" - value="${jedit-mac.realsize}"/> - <filter token="jedit-mac.disksize" - value="${jedit-mac.disksize}"/> - <filter token="jedit-api.realsize" - value="${jedit-api.realsize}"/> - <filter token="jedit-api.disksize" - value="${jedit-api.disksize}"/> - <filter token="jedit-os2.realsize" - value="${jedit-os2.realsize}"/> - <filter token="jedit-os2.disksize" - value="${jedit-os2.disksize}"/> - </filterset> - </copy> - <jar destfile="${dist.dir}/${dist.jar.filename}" - basedir="${dist.dir}/classes/installer" - compress="true" - manifest="installer/install.mf" - duplicate="fail" - index="true"> - <fileset dir="${basedir}"> - <include name="installer/*.html"/> - </fileset> - <fileset dir="${dist.dir}/classes/package-files/linux"> - <include name="jedit.1"/> - </fileset> - <zipfileset dir="${dist.dir}" - includes="jedit-api.tar.bz2 - jedit-mac.tar.bz2 - jedit-macros.tar.bz2 - jedit-os2.tar.bz2 - jedit-windows.tar.bz2 - jedit-program.tar.bz2" - prefix="installer"/> - </jar> - <property name="wipe.dist.files" - value="true"/> - <contrib:runtarget target="dist-cleanup"/> - </target> - - <target name="dist-manuals" - depends="init,setup" - description="build the PDF-manuals"> - <antcall target="docs-pdf-a4"> - <param name="classes.dir" - location="${dist.dir}/classes"/> - <param name="jar.location" - location="${dist.dir}"/> - </antcall> - <antcall target="docs-pdf-USletter"> - <param name="classes.dir" - location="${dist.dir}/classes"/> - <param name="jar.location" - location="${dist.dir}"/> - </antcall> - <property name="wipe.dist.files" - value="true"/> - <contrib:runtarget target="dist-cleanup"/> - </target> - - <target name="dist-src" - depends="init,setup" - description="build the src-archive"> - <mkdir dir="${dist.dir}"/> - <tar destfile="${dist.dir}/${src.archive.filename}" - longfile="gnu" - compression="bzip2"> - <tarfileset dir="${basedir}" - excludes="${config.lib.dir}/** - ${config.build.dir}/** - ${config.dist.dir}/** - **/build.properties" - prefix="jEdit/"/> - </tar> - </target> - - <target name="dist-mac-finish" - depends="init,retrieve,setup" - description="finish building the Mac OS X disk image (DMG-file) on Mac OS X"> - <fail message="The disk image (DMG-file) for easy distribution on Mac OS X can only be built on Mac OS X currently"> - <condition> - <not> - <os family="mac"/> - </not> - </condition> - </fail> - <taskdef name="create" - classname="com.oracle.appbundler.AppBundlerTask" - uri="antlib:com.oracle.appbundler"> - <classpath> - <fileset dir="${lib.dir}/appbundler" - includes="*.jar"/> - </classpath> - </taskdef> - <tstamp> - <format property="current.year" - pattern="yyyy"/> - </tstamp> - <mkdir dir="${dist.dir}/classes/mac"/> - <appbundler:create outputDirectory="${dist.dir}/classes/mac" - name="jEdit" - displayname="jEdit" - identifier="org.gjt.sp.jedit" - icon="icons/icon.icns" - executableName="jedit" - shortversion="${jedit.version}" - version="${jedit.build.number}" - signature="JESP" - copyright="Copyright © 1998-${current.year} Contributors" - jvmRequired="${target.java.version}" - applicationCategory="public.app-category.developer-tools" - highResolutionCapable="true" - supportsAutomaticGraphicsSwitching="true" - mainclassname="org.gjt.sp.jedit.jEdit"> - <classpath file="${dist.dir}/${jar.filename}"/> - <option value="-Dapple.awt.textantialiasing=true"/> - <option value="-Dapple.laf.useScreenMenuBar=true"/> - <option value="-Dapple.awt.antialiasing=true"/> - <argument value="-background"/> - <bundledocument contentTypes="public.text" - extensions="*" - icon="icons/file.icns" - name="jEdit TEXT Document" - role="Editor"/> - </appbundler:create> - <!-- part of work-around for https://github.com/TheInfiniteKind/appbundler/pull/88 --> - <copy file="package-files/osx/jedit" - todir="${dist.dir}/classes/mac/jEdit.app/Contents/MacOS/" - overwrite="true"/> - <!-- part of work-around for https://github.com/TheInfiniteKind/appbundler/pull/88 --> - <chmod file="${dist.dir}/classes/mac/jEdit.app/Contents/MacOS/jedit" - perm="+x"/> - <copy todir="${dist.dir}/classes/mac/jEdit.app/Contents/Java/" - overwrite="true"> - <fileset dir="${dist.dir}" - includes="doc/** - jars/** - keymaps/** - macros/** - modes/** - properties/** - startup/**"/> - </copy> - <replace file="${dist.dir}/classes/mac/jEdit.app/Contents/Info.plist" - encoding="UTF-8" - token="<key>IgnorePSN</key>" - value="<key>IgnoreVerbose</key><true/><key>IgnorePSN</key>" - failonnoreplacements="true"/> - <copy todir="${dist.dir}/classes/mac/" - overwrite="true"> - <fileset dir="package-files/osx/" - includes=".background/**"/> - </copy> - <delete failonerror="false"> - <fileset dir="${dist.dir}" - includes="*${mac.disk.image.filename}"/> - </delete> - <exec executable="hdiutil" - failonerror="true"> - <arg value="create"/> - <arg value="-volname"/> - <arg value="jEdit"/> - <arg value="-srcfolder"/> - <arg file="${dist.dir}/classes/mac"/> - <arg file="${dist.dir}/orig-${mac.disk.image.filename}"/> - </exec> - <exec executable="hdiutil" - failonerror="true"> - <arg value="convert"/> - <arg file="${dist.dir}/orig-${mac.disk.image.filename}"/> - <arg value="-format"/> - <arg value="UDRW"/> - <arg value="-o"/> - <arg file="${dist.dir}/udrw-${mac.disk.image.filename}"/> - </exec> - <exec executable="hdiutil" - failonerror="true"> - <arg value="attach"/> - <arg file="${dist.dir}/udrw-${mac.disk.image.filename}"/> - </exec> - <exec executable="ln" - failonerror="true"> - <arg value="-sF"/> - <arg file="/Applications"/> - <arg file="/Volumes/jEdit/"/> - </exec> - <copy file="package-files/osx/DS_Store" - tofile="/Volumes/jEdit/.DS_Store" - overwrite="true"/> - <exec executable="hdiutil" - failonerror="true"> - <arg value="detach"/> - <arg file="/Volumes/jEdit"/> - <arg value="-force"/> - </exec> - <copy file="${dist.dir}/udrw-${mac.disk.image.filename}" - tofile="${dist.dir}/udrw-copy-${mac.disk.image.filename}" - overwrite="true"/> - <exec exec... [truncated message content] |
From: vampire0 <vam...@us...> - 2025-03-14 19:05:05
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "jEdit core". The branch, master has been updated via 15debb1fa552ae0d33dad9bdd5da0c521a866e9c (commit) from cc59e2ff1af05734ac0d9dfec96860296424dac1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/jEdit;a=commit;h=15debb1fa552ae0d33dad9bdd5da0c521a866e9c commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/jEdit;a=commitdiff;h=15debb1fa552ae0d33dad9bdd5da0c521a866e9c tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/jEdit;a=tree;h=15debb1fa552ae0d33dad9bdd5da0c521a866e9c;hb=15debb1fa552ae0d33dad9bdd5da0c521a866e9c commit 15debb1fa552ae0d33dad9bdd5da0c521a866e9c Author: Björn Kautler <Bj...@Ka...> Date: Fri Mar 14 20:04:34 2025 +0100 foo ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- jEdit core |
From: vampire0 <vam...@us...> - 2025-03-14 19:04:23
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "jEdit core". The branch, master has been updated via cc59e2ff1af05734ac0d9dfec96860296424dac1 (commit) from 5fdff5fb624de31f492d14047f2b7d9b173df291 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/jEdit;a=commit;h=cc59e2ff1af05734ac0d9dfec96860296424dac1 commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/jEdit;a=commitdiff;h=cc59e2ff1af05734ac0d9dfec96860296424dac1 tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/jEdit;a=tree;h=cc59e2ff1af05734ac0d9dfec96860296424dac1;hb=cc59e2ff1af05734ac0d9dfec96860296424dac1 commit cc59e2ff1af05734ac0d9dfec96860296424dac1 Author: Björn Kautler <Bj...@Ka...> Date: Fri Mar 14 20:03:54 2025 +0100 foo ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- jEdit core |
From: vampire0 <vam...@us...> - 2025-03-14 19:02:49
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "jEdit core". The branch, master has been updated via 5fdff5fb624de31f492d14047f2b7d9b173df291 (commit) from 4dacf328c82d7258b27e12046c0dfaaa143176b0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/jEdit;a=commit;h=5fdff5fb624de31f492d14047f2b7d9b173df291 commitdiff: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/jEdit;a=commitdiff;h=5fdff5fb624de31f492d14047f2b7d9b173df291 tree: http://jedit.git.sourceforge.net/git/gitweb.cgi?p=jedit/jEdit;a=tree;h=5fdff5fb624de31f492d14047f2b7d9b173df291;hb=5fdff5fb624de31f492d14047f2b7d9b173df291 commit 5fdff5fb624de31f492d14047f2b7d9b173df291 Author: Björn Kautler <Bj...@Ka...> Date: Fri Mar 14 20:02:31 2025 +0100 foo ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- jEdit core |
From: <kp...@us...> - 2025-03-04 07:49:43
|
Revision: 25768 http://sourceforge.net/p/jedit/svn/25768 Author: kpouer Date: 2025-03-04 07:49:42 +0000 (Tue, 04 Mar 2025) Log Message: ----------- Added Paths: ----------- plugins/FTP/tags/FTP-1.4/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ez...@us...> - 2025-02-25 16:36:17
|
Revision: 25767 http://sourceforge.net/p/jedit/svn/25767 Author: ezust Date: 2025-02-25 16:36:14 +0000 (Tue, 25 Feb 2025) Log Message: ----------- changelog Modified Paths: -------------- jEdit/trunk/doc/CHANGES.txt Modified: jEdit/trunk/doc/CHANGES.txt =================================================================== --- jEdit/trunk/doc/CHANGES.txt 2025-02-25 16:28:45 UTC (rev 25766) +++ jEdit/trunk/doc/CHANGES.txt 2025-02-25 16:36:14 UTC (rev 25767) @@ -4,7 +4,8 @@ {{{ Version 5.8pre1 -Thanks to Robert Schwenn, Björn Kautler and Eric Le Lay for contributing to this release. +Thanks to Robert Schwenn, Björn Kautler, Alan Ezust, and Eric Le Lay +for contributing to this release. {{{ Bug Fixes @@ -14,6 +15,7 @@ Schwenn) - fix for SyntaxUtilities in Color_Picker macro (patch #639, Robert Schwenn) - fix Run_Script macro beanshell under windows (patch #641, Robert Schwenn) +- fix empty Default Line Separator combobox in EncodingOptionsPane (Alan Ezust) }}} {{{ Miscellaneous This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ez...@us...> - 2025-02-25 16:28:47
|
Revision: 25766 http://sourceforge.net/p/jedit/svn/25766 Author: ezust Date: 2025-02-25 16:28:45 +0000 (Tue, 25 Feb 2025) Log Message: ----------- Fix empty encoding options pane. Modified Paths: -------------- jEdit/trunk/modes/qdoc.xml jEdit/trunk/org/gjt/sp/jedit/options/EncodingsOptionPane.java Modified: jEdit/trunk/modes/qdoc.xml =================================================================== --- jEdit/trunk/modes/qdoc.xml 2024-10-23 17:27:36 UTC (rev 25765) +++ jEdit/trunk/modes/qdoc.xml 2025-02-25 16:28:45 UTC (rev 25766) @@ -4,7 +4,7 @@ <!-- This mode file is for QDoc, which is a documentation file format used by - The Qt Group, www.qt.io. + The Qt Group, www.qt.io. See https://doc.qt.io/qt/qdoc-index.html for details. --> <MODE> <PROPS> Modified: jEdit/trunk/org/gjt/sp/jedit/options/EncodingsOptionPane.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/options/EncodingsOptionPane.java 2024-10-23 17:27:36 UTC (rev 25765) +++ jEdit/trunk/org/gjt/sp/jedit/options/EncodingsOptionPane.java 2025-02-25 16:28:45 UTC (rev 25766) @@ -77,9 +77,9 @@ { /* Line separator */ - String[] lineSeps = { jEdit.getProperty("lineSep.unix"), - jEdit.getProperty("lineSep.windows"), - jEdit.getProperty("lineSep.mac") }; + String[] lineSeps = { jEdit.getProperty("lineSep.LF"), + jEdit.getProperty("lineSep.CRLF"), + jEdit.getProperty("lineSep.CR") }; lineSeparator = new JComboBox<String>(lineSeps); String lineSep = jEdit.getProperty("buffer."+ JEditBuffer.LINESEP, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |