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
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <ker...@us...> - 2024-04-02 17:09:29
|
Revision: 25716 http://sourceforge.net/p/jedit/svn/25716 Author: kerik-sf Date: 2024-04-02 17:09:26 +0000 (Tue, 02 Apr 2024) Log Message: ----------- Fix #4132 freeze when deleting a directory and some children (race condition) See https://sourceforge.net/p/jedit/patches/633/ Modified Paths: -------------- jEdit/trunk/doc/CHANGES.txt jEdit/trunk/org/gjt/sp/jedit/io/VFSManager.java Modified: jEdit/trunk/doc/CHANGES.txt =================================================================== --- jEdit/trunk/doc/CHANGES.txt 2024-03-31 23:12:35 UTC (rev 25715) +++ jEdit/trunk/doc/CHANGES.txt 2024-04-02 17:09:26 UTC (rev 25716) @@ -35,6 +35,9 @@ - Delete at the end of the line does not delete newline on java20, java21 (#4125 - Eric Le Lay) +- Freeze when deleting a directory and some children (race condition) + (#4132 - Eric Le Lay) + }}} {{{ Miscellaneous Modified: jEdit/trunk/org/gjt/sp/jedit/io/VFSManager.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/io/VFSManager.java 2024-03-31 23:12:35 UTC (rev 25715) +++ jEdit/trunk/org/gjt/sp/jedit/io/VFSManager.java 2024-04-02 17:09:26 UTC (rev 25716) @@ -297,7 +297,7 @@ } } }; - ThreadUtilities.runInDispatchThreadAndWait(r); + ThreadUtilities.runInDispatchThread(r); } //}}} //{{{ sendVFSUpdate() method This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ez...@us...> - 2024-03-31 23:12:37
|
Revision: 25715 http://sourceforge.net/p/jedit/svn/25715 Author: ezust Date: 2024-03-31 23:12:35 +0000 (Sun, 31 Mar 2024) Log Message: ----------- Apply patch #635 Modified Paths: -------------- jEdit/trunk/macros/Misc/Display_Shortcuts.bsh Modified: jEdit/trunk/macros/Misc/Display_Shortcuts.bsh =================================================================== --- jEdit/trunk/macros/Misc/Display_Shortcuts.bsh 2024-03-29 16:09:39 UTC (rev 25714) +++ jEdit/trunk/macros/Misc/Display_Shortcuts.bsh 2024-03-31 23:12:35 UTC (rev 25715) @@ -75,7 +75,7 @@ String label = action.getLabel(); if(label == null) label = name; - else label = GUIUtilities.prettifyMenuLabel(label); + else label = GenericGUIUtilities.prettifyMenuLabel(label); ActionSet actionSet = jEdit.getActionSetForAction(name); String shortcut1 = actionSet.getProperty(name + ".shortcut"); if(shortcut1 == null) @@ -158,7 +158,7 @@ Collections.sort(v, new StandardUtilities.StringCompare()); table = new JTable(v, makeRow( NameLabel, Shortcut1Label, Shortcut2Label)); - table.setRowHeight(GUIUtilities.defaultRowHeight()); + table.setRowHeight(GenericGUIUtilities.defaultRowHeight()); table.getColumnModel().getColumn(0).setPreferredWidth(200); table.setRowSelectionAllowed(true); /* The next line prevents the table from being edited. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ez...@us...> - 2024-03-29 16:09:41
|
Revision: 25714 http://sourceforge.net/p/jedit/svn/25714 Author: ezust Date: 2024-03-29 16:09:39 +0000 (Fri, 29 Mar 2024) Log Message: ----------- Get rid of Floatable Toolbars option - it never worked properly anyway. Modified Paths: -------------- jEdit/trunk/modes/qdoc.xml jEdit/trunk/org/gjt/sp/jedit/GUIUtilities.java jEdit/trunk/org/gjt/sp/jedit/options/ViewOptionPane.java jEdit/trunk/org/jedit/localization/jedit_cs.props jEdit/trunk/org/jedit/localization/jedit_de.props jEdit/trunk/org/jedit/localization/jedit_en.props jEdit/trunk/org/jedit/localization/jedit_ja.props jEdit/trunk/org/jedit/localization/jedit_ko.props jEdit/trunk/org/jedit/localization/jedit_ru.props jEdit/trunk/org/jedit/localization/jedit_zh-tw.props jEdit/trunk/org/jedit/localization/jedit_zh.props Modified: jEdit/trunk/modes/qdoc.xml =================================================================== --- jEdit/trunk/modes/qdoc.xml 2024-03-14 08:02:03 UTC (rev 25713) +++ jEdit/trunk/modes/qdoc.xml 2024-03-29 16:09:39 UTC (rev 25714) @@ -3,8 +3,8 @@ <!-- - This mode file for QDoc, which is a documentation file format used by - The Qt Group, www.qt.io + This mode file is for QDoc, which is a documentation file format used by + The Qt Group, www.qt.io. --> <MODE> <PROPS> Modified: jEdit/trunk/org/gjt/sp/jedit/GUIUtilities.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/GUIUtilities.java 2024-03-14 08:02:03 UTC (rev 25713) +++ jEdit/trunk/org/gjt/sp/jedit/GUIUtilities.java 2024-03-29 16:09:39 UTC (rev 25714) @@ -472,7 +472,6 @@ JToolBar toolB = new JToolBar(); toolB.setName(name); toolB.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0)); - toolB.setFloatable(jEdit.getBooleanProperty("view.toolbar.floatable")); String buttons = jEdit.getProperty(name); if(buttons != null) @@ -956,7 +955,7 @@ * @return an integer indicating the option selected by the user * @since jEdit 4.3pre12 */ - @SuppressWarnings({"unchecked"}) + @SuppressWarnings({"unchecked"}) public static int listConfirm(final Component comp, final String name, final String[] args, final Object[] listModel, final List selectedItems) { @@ -1873,7 +1872,7 @@ break; } } //}}} - + //{{{ cancelResizeSave() method private void cancelResizeSave() { Modified: jEdit/trunk/org/gjt/sp/jedit/options/ViewOptionPane.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/options/ViewOptionPane.java 2024-03-14 08:02:03 UTC (rev 25713) +++ jEdit/trunk/org/gjt/sp/jedit/options/ViewOptionPane.java 2024-03-29 16:09:39 UTC (rev 25714) @@ -88,20 +88,13 @@ addComponent(layoutPanel); - /* Floatable Toolbars */ - floatableToolbars = new JCheckBox(jEdit.getProperty( - "options.view.floatableToolbars")); - floatableToolbars.setSelected(jEdit.getBooleanProperty( - "view.toolbar.floatable")); - addComponent(floatableToolbars); - - /* Abbreviate pathnames when possible */ + /* Abbreviate pathnames when possible */ abbreviatePaths = new JCheckBox(jEdit.getProperty( "options.view.abbreviatePaths")); abbreviatePaths.setSelected(jEdit.getBooleanProperty( "view.abbreviatePaths")); addComponent(abbreviatePaths); - + /* Show full path */ showFullPath = new JCheckBox(jEdit.getProperty( "options.view.showFullPath")); @@ -243,9 +236,8 @@ jEdit.setBooleanProperty("view.toolbar.alternateLayout", layout.getIcon() == layoutIcon3 || layout.getIcon() == layoutIcon4); - jEdit.setBooleanProperty("view.abbreviatePaths",abbreviatePaths.isSelected()); + jEdit.setBooleanProperty("view.abbreviatePaths",abbreviatePaths.isSelected()); jEdit.setBooleanProperty("view.showFullPath",showFullPath.isSelected()); - jEdit.setBooleanProperty("view.toolbar.floatable", floatableToolbars.isSelected()); jEdit.setBooleanProperty("view.showSearchbar",showSearchbar .isSelected()); @@ -272,7 +264,6 @@ private JButton alternateDockingLayout, alternateToolBarLayout; private JCheckBox abbreviatePaths; private JCheckBox showFullPath; - private JCheckBox floatableToolbars; private JCheckBox showSearchbar; private JCheckBox beepOnSearchAutoWrap; private JCheckBox showBufferSwitcher; Modified: jEdit/trunk/org/jedit/localization/jedit_cs.props =================================================================== --- jEdit/trunk/org/jedit/localization/jedit_cs.props 2024-03-14 08:02:03 UTC (rev 25713) +++ jEdit/trunk/org/jedit/localization/jedit_cs.props 2024-03-29 16:09:39 UTC (rev 25714) @@ -1640,7 +1640,6 @@ #{{{ View pane options.view.label=Pohled options.view.viewLayout=Rozmístění pohledu -options.view.floatableToolbars=Plovoucí panely nástrojů options.view.alternateDockingLayout=Alternativní rozmístění dokovaných oken options.view.alternateToolBarLayout=Alternativní rozmístění panelů nástrojů options.view.showFullPath=Zobrazit úplnou cestu bufferu v panelu názvu Modified: jEdit/trunk/org/jedit/localization/jedit_de.props =================================================================== --- jEdit/trunk/org/jedit/localization/jedit_de.props 2024-03-14 08:02:03 UTC (rev 25713) +++ jEdit/trunk/org/jedit/localization/jedit_de.props 2024-03-29 16:09:39 UTC (rev 25714) @@ -1909,7 +1909,6 @@ #{{{ View pane options.view.label=Ansicht options.view.viewLayout=Ansichtslayout -options.view.floatableToolbars=Frei positionierbare Symbolleisten options.view.alternateDockingLayout=Alternatives Dock-Layout options.view.alternateToolBarLayout=Alternatives Symbolleisten-Layout options.view.abbreviatePaths=Pfade mit Namen von Umgebungsvariablen abkürzen, wenn möglich Modified: jEdit/trunk/org/jedit/localization/jedit_en.props =================================================================== --- jEdit/trunk/org/jedit/localization/jedit_en.props 2024-03-14 08:02:03 UTC (rev 25713) +++ jEdit/trunk/org/jedit/localization/jedit_en.props 2024-03-29 16:09:39 UTC (rev 25714) @@ -1888,7 +1888,6 @@ #{{{ View pane options.view.label=View options.view.viewLayout=View layout -options.view.floatableToolbars=Floatable Toolbars options.view.alternateDockingLayout=Alternate docked window placement options.view.alternateToolBarLayout=Alternate tool bar placement options.view.abbreviatePaths=Abbreviate paths with environment variables when possible Modified: jEdit/trunk/org/jedit/localization/jedit_ja.props =================================================================== --- jEdit/trunk/org/jedit/localization/jedit_ja.props 2024-03-14 08:02:03 UTC (rev 25713) +++ jEdit/trunk/org/jedit/localization/jedit_ja.props 2024-03-29 16:09:39 UTC (rev 25714) @@ -1633,7 +1633,6 @@ #{{{ View pane options.view.label=ビュー options.view.viewLayout=ビューレイアウト -options.view.floatableToolbars=フロート可能なツールバー options.view.alternateDockingLayout=別のドッキングウィンドウ配置 options.view.alternateToolBarLayout=別のツールバー配置 options.view.showFullPath=タイトルバーにバッファのフルパスを表示 Modified: jEdit/trunk/org/jedit/localization/jedit_ko.props =================================================================== --- jEdit/trunk/org/jedit/localization/jedit_ko.props 2024-03-14 08:02:03 UTC (rev 25713) +++ jEdit/trunk/org/jedit/localization/jedit_ko.props 2024-03-29 16:09:39 UTC (rev 25714) @@ -1606,7 +1606,6 @@ #{{{ View pane options.view.label=보기 options.view.viewLayout=jEdit 뷰 레이아웃 -options.view.floatableToolbars=유동 툴바 options.view.alternateDockingLayout=도킹 창 위치 전환 options.view.alternateToolBarLayout=툴바 위치 전환 options.view.abbreviatePaths=환경변수로 단축 경로 사용 Modified: jEdit/trunk/org/jedit/localization/jedit_ru.props =================================================================== --- jEdit/trunk/org/jedit/localization/jedit_ru.props 2024-03-14 08:02:03 UTC (rev 25713) +++ jEdit/trunk/org/jedit/localization/jedit_ru.props 2024-03-29 16:09:39 UTC (rev 25714) @@ -1856,7 +1856,6 @@ #{{{ View pane options.view.label=Вид options.view.viewLayout=Схема -options.view.floatableToolbars=Плавающие панели options.view.alternateDockingLayout=Изменить положение дока options.view.alternateToolBarLayout=Изменить положение панели инструментов options.view.abbreviatePaths=Сокращать пути с помощью переменных окружения, если возможно Modified: jEdit/trunk/org/jedit/localization/jedit_zh-tw.props =================================================================== --- jEdit/trunk/org/jedit/localization/jedit_zh-tw.props 2024-03-14 08:02:03 UTC (rev 25713) +++ jEdit/trunk/org/jedit/localization/jedit_zh-tw.props 2024-03-29 16:09:39 UTC (rev 25714) @@ -1796,7 +1796,6 @@ #{{{ View pane options.view.label=視窗 options.view.viewLayout=查看佈局 -options.view.floatableToolbars=流通工具欄 options.view.alternateDockingLayout=備用停靠視窗位置 options.view.alternateToolBarLayout=備用工具欄的位置 options.view.abbreviatePaths=可能時,使用環境變數縮寫路徑 Modified: jEdit/trunk/org/jedit/localization/jedit_zh.props =================================================================== --- jEdit/trunk/org/jedit/localization/jedit_zh.props 2024-03-14 08:02:03 UTC (rev 25713) +++ jEdit/trunk/org/jedit/localization/jedit_zh.props 2024-03-29 16:09:39 UTC (rev 25714) @@ -1619,7 +1619,6 @@ #{{{ View pane options.view.label=视图 options.view.viewLayout=查看布局 -options.view.floatableToolbars=流通工具栏 options.view.alternateDockingLayout=备用停靠窗口位置 options.view.alternateToolBarLayout=备用工具栏的位置 options.view.abbreviatePaths=可能时,使用环境变量缩写路径 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <her...@us...> - 2024-03-14 08:02:04
|
Revision: 25713 http://sourceforge.net/p/jedit/svn/25713 Author: hertzhaft Date: 2024-03-14 08:02:03 +0000 (Thu, 14 Mar 2024) Log Message: ----------- Tagging for release 5.1.0 Added Paths: ----------- plugins/Templates/tags/Templates-5_1_0/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <her...@us...> - 2024-03-14 07:45:51
|
Revision: 25712 http://sourceforge.net/p/jedit/svn/25712 Author: hertzhaft Date: 2024-03-14 07:45:49 +0000 (Thu, 14 Mar 2024) Log Message: ----------- Bug fixes and improvements for release 5.1.0 Modified Paths: -------------- plugins/Templates/trunk/CHANGES.txt plugins/Templates/trunk/Templates.props plugins/Templates/trunk/actions.xml plugins/Templates/trunk/description.html plugins/Templates/trunk/templates/AcceleratorManager.java plugins/Templates/trunk/templates/AcceleratorOptionPane.java plugins/Templates/trunk/templates/TemplateAction.java plugins/Templates/trunk/templates/TemplateDir.java plugins/Templates/trunk/templates/TemplateDockable.java plugins/Templates/trunk/templates/TemplateFile.java plugins/Templates/trunk/templates/TemplateTree.java plugins/Templates/trunk/templates/TemplatesMenuProvider.java plugins/Templates/trunk/templates/TemplatesOptionPane.java plugins/Templates/trunk/templates/TemplatesPlugin.java Modified: plugins/Templates/trunk/CHANGES.txt =================================================================== --- plugins/Templates/trunk/CHANGES.txt 2024-02-18 13:58:02 UTC (rev 25711) +++ plugins/Templates/trunk/CHANGES.txt 2024-03-14 07:45:49 UTC (rev 25712) @@ -1,5 +1,15 @@ CHANGES file for Templates plugin. +Version 5.1.0 (11-MAR-2024) +============================= +CHANGES: +- fixed problem: keyboard bindings for template actions were not initialized (hertzhaft) +- fixed problem: keyboard shortcuts for templates were not functioning before opening the Plugins->Templates menu (hertzhaft) +- replaced the serial naming scheme for template actions; now shortcuts are no longer reassigned when new templates are added (hertzhaft) +- fixed problem: template accelerators were not saved (hertzhaft) +- added missing title and message properties for accelerator dialogs in dockable (hertzhaft) +- improved usability of accelerator option pane, added "reload accelerators" button (hertzhaft) + Version 5.0.0 (05-JAN-2017) ============================= CHANGES: @@ -165,10 +175,8 @@ Version 0.3.1 (10-JAN-2000) ============================= CHANGES: -- in TemplatesPlugin.createMenuItems(), Templates submenu now added to -menus vector, not menuItems (M. Dillon) -- changed comments style in Templates.props to conform to standard Java -properties file format (M. Dillon) +- in TemplatesPlugin.createMenuItems(), Templates submenu now added to menus vector, not menuItems (M. Dillon) +- changed comments style in Templates.props to conform to standard Java properties file format (M. Dillon) - added missing Templates.html help file back into distribution Version 0.3.0 (20-DEC-1999) Modified: plugins/Templates/trunk/Templates.props =================================================================== --- plugins/Templates/trunk/Templates.props 2024-02-18 13:58:02 UTC (rev 25711) +++ plugins/Templates/trunk/Templates.props 2024-03-14 07:45:49 UTC (rev 25712) @@ -3,7 +3,7 @@ plugin.templates.TemplatesPlugin.activate=startup plugin.templates.TemplatesPlugin.name=Templates plugin.templates.TemplatesPlugin.author=Steve Jakob, Calvin Yu -plugin.templates.TemplatesPlugin.version=5.0.3 +plugin.templates.TemplatesPlugin.version=5.1.0 plugin.sessions.TemplatesPlugin.description=The Templates plugin integrates the Apache Velocity templating engine with jEdit, to allow dynamic text generation based on template files. plugin.templates.TemplatesPlugin.docs=docs/index.html @@ -63,12 +63,18 @@ plugin.TemplatesPlugin.error.buffer-read-only.title=Unable to write plugin.TemplatesPlugin.error.buffer-read-only.message=Unable to write. Buffer is read-only. -#AcceleratorOptionPane Label Properties -plugin.TemplatesPlugin.mode.label=Mode -plugin.TemplatesPlugin.remove-accelerator.label=Remove -plugin.TemplatesPlugin.add-accelerator.label=Add -plugin.TemplatesPlugin.save-accelerator.label=Save +# Messages for the "set accelerator" dialog in the dockable window +plugin.TemplatesPlugin.set-accelerator.input-mode.title=Buffer edit mode +plugin.TemplatesPlugin.set-accelerator.input-mode.message=Enter the edit mode for which the accelerator will be used +plugin.TemplatesPlugin.set-accelerator.input-accelerator.title=Accelerator +plugin.TemplatesPlugin.set-accelerator.input-accelerator.message=Enter the accelerator string +# AcceleratorOptionPane label properties +plugin.TemplatesPlugin.mode.label=Select editor mode +plugin.TemplatesPlugin.new-accelerator.label=Create new accelerator +plugin.TemplatesPlugin.assign-accelerator.label=Assign accelerator to selected template +plugin.TemplatesPlugin.remove-accelerator.label=Remove assigned accelerator +plugin.TemplatesPlugin.reload-accelerator.label=Reload all accelerators from disk + # Templates Tree window templates-tree.title=Templates Tree - Modified: plugins/Templates/trunk/actions.xml =================================================================== --- plugins/Templates/trunk/actions.xml 2024-02-18 13:58:02 UTC (rev 25711) +++ plugins/Templates/trunk/actions.xml 2024-03-14 07:45:49 UTC (rev 25712) @@ -28,7 +28,7 @@ mgr = view.getDockableWindowManager(); mgr.showDockableWindow(VFSBrowser.NAME); mgr.getDockable(VFSBrowser.NAME) - .setDirectory(templates.TemplatesPlugin.getTemplateDir()); + .setDirectory(templates.TemplatesPlugin.getTemplateDirName()); </CODE> </ACTION> </ACTIONS> Modified: plugins/Templates/trunk/description.html =================================================================== --- plugins/Templates/trunk/description.html 2024-02-18 13:58:02 UTC (rev 25711) +++ plugins/Templates/trunk/description.html 2024-03-14 07:45:49 UTC (rev 25712) @@ -4,7 +4,9 @@ files based on template files. The incorporation of the Apache Velocity templating engine as of version 3.0.0 allows for a great deal of flexibility and interactivity. Templates may be accessed through the - Plugins menu or a dockable tree view. + Plugins menu, through expanding inline accelerators (like in the SuperAbbrevs + plugin), through keyboard shortcuts (assignable in GlobalOptions->Shortcuts) + or via a dockable tree view. </p> </html> Modified: plugins/Templates/trunk/templates/AcceleratorManager.java =================================================================== --- plugins/Templates/trunk/templates/AcceleratorManager.java 2024-02-18 13:58:02 UTC (rev 25711) +++ plugins/Templates/trunk/templates/AcceleratorManager.java 2024-03-14 07:45:49 UTC (rev 25712) @@ -47,10 +47,10 @@ public final static String KEYWORD_MAPPINGS_FILE = "accelerator-mappings"; private static AcceleratorManager instance; - + private static Pattern acceleratorPattern; + private final static String mappingRE = "(.*)\\.(.*)=(.*)"; - private static Pattern acceleratorPattern; - + /** * The mappings member contains a HashMap for each mode that has at least one * defined accelerator. Each of these HashMaps maps the accelerator name to the @@ -69,7 +69,6 @@ */ public AcceleratorManager() { - mappings = new HashMap(); loadAcceleratorMappings(); } @@ -94,6 +93,15 @@ } /** + * Loads all accelerators from mappings file. + */ + public void load() + { + loadAcceleratorMappings(); + Log.log(Log.DEBUG, this, "Reloaded template accelerator mappings"); + } + + /** * Saves all accelerators. */ public void save() @@ -130,7 +138,8 @@ if (modeMap == null) { return Collections.EMPTY_LIST; - } else + } + else { return modeMap.keySet(); } @@ -234,8 +243,7 @@ { System.out.println("AcceleratorManager: accelerator path is " + path); textArea.getBuffer().remove(sel.getStart(), sel.getEnd() - sel.getStart()); - ((TemplatesPlugin) jEdit.getPlugin("templates.TemplatesPlugin")) - .processTemplate(path, textArea); + TemplatesPlugin.processTemplate(path, textArea); } //}}} } @@ -280,7 +288,6 @@ int wordStart = TextUtilities.findWordStart(lineText, pos - 1, textArea.getBuffer().getStringProperty("noWordSep")); String accelerator = lineText.substring(wordStart, pos); - return accelerator; } @@ -303,6 +310,7 @@ */ private void loadAcceleratorMappings() { + mappings = new HashMap(); BufferedReader in = null; File mappingsFile = new File(getMappingsFilePath()); if (!mappingsFile.exists()) @@ -314,19 +322,18 @@ // Create regex pattern for matching accelerators try { - acceleratorPattern = Pattern.compile(mappingRE, - Pattern.CASE_INSENSITIVE); + acceleratorPattern = Pattern.compile(mappingRE, Pattern.CASE_INSENSITIVE); } catch (PatternSyntaxException pe) { // This won't happen if the programmer did his job right. - Log.log(Log.ERROR, this, + Log.log(Log.ERROR, this, "PatternSyntaxException in accelerator RE: " + mappingRE); } catch (IllegalArgumentException iae) { // This won't happen if the programmer did his job right. - Log.log(Log.ERROR, this, + Log.log(Log.ERROR, this, "IllegalArgumentException in accelerator RE: " + mappingRE); } } @@ -424,7 +431,7 @@ private static String getMappingsFilePath() { return MiscUtilities.constructPath( - TemplatesPlugin.getVelocityDirectory(), KEYWORD_MAPPINGS_FILE); + TemplatesPlugin.getVelocityDirectory(), KEYWORD_MAPPINGS_FILE); } } Modified: plugins/Templates/trunk/templates/AcceleratorOptionPane.java =================================================================== --- plugins/Templates/trunk/templates/AcceleratorOptionPane.java 2024-02-18 13:58:02 UTC (rev 25711) +++ plugins/Templates/trunk/templates/AcceleratorOptionPane.java 2024-03-14 07:45:49 UTC (rev 25712) @@ -41,95 +41,121 @@ implements ListSelectionListener, ActionListener, TreeSelectionListener { - private final static String ADD_ACTION = "add"; - private final static String REMOVE_ACTION = "remove"; - private final static String SAVE_ACTION = "save"; + private final static String ASSIGN_ACTION = "assign"; + private final static String NEW_ACTION = "new"; + private final static String REMOVE_ACTION = "remove"; + private final static String RELOAD_ACTION = "reload"; + private final static String INPUT_PROP = "options.Templates.accelerators.input.accelerator"; - private JComboBox modes; - private JList accelerators; - private TemplateTree templates; - private JButton removeButton; - private JButton saveButton; + private JComboBox modes; + private JList accelerators; + private TemplateTree templates; + private JButton newButton; + private JButton assignButton; + private JButton removeButton; + private JButton reloadButton; + private AcceleratorManager mgr; + /** * Create a new <code>AcceleratorOptionPane</code>. */ public AcceleratorOptionPane() { - super("Templates.accelerators"); + super("Templates.accelerators"); + mgr = AcceleratorManager.getInstance(); } //{{{ TreeSelectionListener Method /** - * Handle a tree selection change. + * save is enabled when a template is highlighted in the tree. */ public void valueChanged(TreeSelectionEvent evt) { - saveButton.setEnabled(templates.isTemplateSelected()); + assignButton.setEnabled(templates.isTemplateSelected()); } //}}} //{{{ ListSelectionListener Method /** - * Accelerator selection value changed. + * A new mode was chosen in the editor mode selector. */ public void valueChanged(ListSelectionEvent evt) { - templates.setEnabled(getSelectedAccelerator() != null); - removeButton.setEnabled(getSelectedAccelerator() != null); - String path = AcceleratorManager.getInstance() - .findTemplatePath(getSelectedMode(), getSelectedAccelerator()); + String acc = getSelectedAccelerator(); + String mode = getSelectedMode(); + String path = mgr.findTemplatePath(mode, acc); templates.setSelectedTemplate(path); - saveButton.setEnabled(false); + templates.setEnabled(true); + newButton.setEnabled(true); + removeButton.setEnabled(acc != null); + assignButton.setEnabled(acc != null); } //}}} //{{{ ActionListener Method /** - * Action performed. + * Perform button or mode selector action */ public void actionPerformed(ActionEvent evt) { - if (ADD_ACTION.equals(evt.getActionCommand())) { - String accelerator = GUIUtilities.input(this, - "options.Templates.accelerators.input.accelerator", - null); - AcceleratorManager.getInstance() - .addAccelerator(getSelectedMode(), accelerator, null); - loadAcceleratorsForMode(getSelectedMode()); - accelerators.setSelectedValue(accelerator, true); - } else if (REMOVE_ACTION.equals(evt.getActionCommand())) { - AcceleratorManager.getInstance() - .removeAccelerator(getSelectedMode(), getSelectedAccelerator()); - loadAcceleratorsForMode(getSelectedMode()); - } else if (SAVE_ACTION.equals(evt.getActionCommand())) { - saveAccelerator(); - } else { - String modeName = getSelectedMode(); - if (modeName == null) { - modes.setSelectedIndex(0); - } - loadAcceleratorsForMode(modeName); - } + String cmd = evt.getActionCommand(); + String mode = getSelectedMode(); + String acc = null; + + if (NEW_ACTION.equals(cmd)) + { + acc = GUIUtilities.input(this, INPUT_PROP, null); + if (acc == null || acc.equals("")) { + return; + } + mgr.addAccelerator(mode, acc, null); + loadAcceleratorsForMode(mode); + accelerators.setSelectedValue(acc, true); + newButton.setEnabled(false); + assignButton.setEnabled(true); + } + else if (ASSIGN_ACTION.equals(cmd)) + { + assignAccelerator(); + } + else if (REMOVE_ACTION.equals(cmd)) + { + mgr.removeAccelerator(mode, getSelectedAccelerator()); + loadAcceleratorsForMode(mode); + } + else if (RELOAD_ACTION.equals(cmd)) + { + mgr.load(); + loadAcceleratorsForMode(mode); + } + else // mode selector changed + { + if (mode == null) + { + modes.setSelectedIndex(0); + } + loadAcceleratorsForMode(mode); + } } //}}} /** - * Save the accelerator. + * Assign the accelerator. */ - public void saveAccelerator() + public void assignAccelerator() { - String accelerator = getSelectedAccelerator(); + String acc = getSelectedAccelerator(); if (!templates.isTemplateSelected()) { GUIUtilities.error(this, "plugin.TemplatesPlugin.error.invalid-template-path", null); } else { String path = templates.getSelectedTemplate(); - AcceleratorManager.getInstance().addAccelerator(getSelectedMode(), - accelerator, - path); + mgr.addAccelerator(getSelectedMode(), acc, path); } - saveButton.setEnabled(false); + newButton.setEnabled(true); + assignButton.setEnabled(false); + removeButton.setEnabled(true); } /** @@ -137,8 +163,9 @@ */ public String getSelectedAccelerator() { - if (accelerators.getModel().getSize() == 0) { - return null; + if (accelerators.getModel().getSize() == 0) + { + return null; } return (String) accelerators.getSelectedValue(); } @@ -148,7 +175,8 @@ */ public String getSelectedMode() { - if (modes.getItemCount() == 0) { + if (modes.getItemCount() == 0) + { return null; } return (String) modes.getSelectedItem(); @@ -161,19 +189,19 @@ { modes = new JComboBox(getModeNames()); modes.addActionListener(this); - addComponent(jEdit.getProperty( - "plugin.TemplatesPlugin.mode.label"), modes); - String currentMode = jEdit.getActiveView().getBuffer().getMode().getName(); - modes.setSelectedItem(currentMode); + addComponent(jEdit.getProperty("plugin.TemplatesPlugin.mode.label"), modes); + String currentMode = jEdit.getActiveView().getBuffer().getMode().getName(); + modes.setSelectedItem(currentMode); JPanel acceleratorPanel = new JPanel(new GridBagLayout()); acceleratorPanel.setBorder(BorderFactory.createEmptyBorder(12, 0, 0, 0)); - GridBagConstraints gbc = new GridBagConstraints(); accelerators = new JList(new DefaultListModel()); accelerators.setVisibleRowCount(7); accelerators.setPrototypeCellValue("XXXXXXXXXXXXXXX"); accelerators.addListSelectionListener(this); + + GridBagConstraints gbc = new GridBagConstraints(); gbc.anchor = gbc.WEST; gbc.fill = gbc.BOTH; gbc.gridx = 0; @@ -181,37 +209,52 @@ gbc.insets = new Insets(0, 0, 11, 11); gbc.weightx = .2; gbc.weighty = .998; + acceleratorPanel.add(new JScrollPane(accelerators), gbc); - JButton add = new JButton(jEdit.getProperty( - "plugin.TemplatesPlugin.add-accelerator.label")); - add.setActionCommand(ADD_ACTION); - add.addActionListener(this); + newButton = new JButton( + jEdit.getProperty("plugin.TemplatesPlugin.new-accelerator.label")); + newButton.setActionCommand(NEW_ACTION); + newButton.addActionListener(this); + gbc.fill = gbc.HORIZONTAL; + gbc.weighty = .001; gbc.gridy++; - gbc.weighty = .001; - acceleratorPanel.add(add, gbc); + acceleratorPanel.add(newButton, gbc); - saveButton = new JButton(jEdit.getProperty( - "plugin.TemplatesPlugin.save-accelerator.label")); - saveButton.setActionCommand(SAVE_ACTION); - saveButton.addActionListener(this); - saveButton.setEnabled(false); + assignButton = new JButton( + jEdit.getProperty("plugin.TemplatesPlugin.assign-accelerator.label")); + assignButton.setActionCommand(ASSIGN_ACTION); + assignButton.addActionListener(this); + assignButton.setEnabled(false); + gbc.gridy++; - acceleratorPanel.add(saveButton, gbc); + acceleratorPanel.add(assignButton, gbc); - removeButton = new JButton(jEdit.getProperty( - "plugin.TemplatesPlugin.remove-accelerator.label")); - removeButton.setEnabled(false); + removeButton = new JButton( + jEdit.getProperty("plugin.TemplatesPlugin.remove-accelerator.label")); removeButton.setActionCommand(REMOVE_ACTION); removeButton.addActionListener(this); + removeButton.setEnabled(false); + gbc.gridy++; - gbc.insets = new Insets(0, 0, 0, 11); + // gbc.insets = new Insets(0, 0, 0, 11); acceleratorPanel.add(removeButton, gbc); + reloadButton = new JButton( + jEdit.getProperty("plugin.TemplatesPlugin.reload-accelerator.label")); + reloadButton.setActionCommand(RELOAD_ACTION); + reloadButton.addActionListener(this); + reloadButton.setEnabled(true); + + gbc.gridy++; + gbc.insets = new Insets(0, 0, 0, 11); + acceleratorPanel.add(reloadButton, gbc); + templates = new TemplateTree(); templates.setEnabled(false); templates.addTreeSelectionListener(this); + gbc.fill = gbc.BOTH; gbc.gridy = 0; gbc.gridx++; @@ -225,41 +268,54 @@ GridBagConstraints cons = gridBag.getConstraints(acceleratorPanel); cons.fill = cons.BOTH; gridBag.setConstraints(acceleratorPanel, cons); - + loadAcceleratorsForMode(currentMode); } - /** - * Load the accelerators for the given mode. - */ - private void loadAcceleratorsForMode(String modeName) - { - Collection col = AcceleratorManager.getInstance().getAccelerators(modeName); - if (!col.isEmpty() && accelerators != null) { - accelerators.setEnabled(true); - List list = new ArrayList(col); - Collections.sort(list); - DefaultListModel listModel = (DefaultListModel) accelerators.getModel(); - listModel.clear(); - for (Iterator i = list.iterator(); i.hasNext();) { - listModel.addElement(i.next()); - } - accelerators.setModel(listModel); - accelerators.setSelectedIndex(0); - } - } + /** + * Saves accelerators on exit + */ + protected void _save() + { + mgr.save(); + } - /** - * Returns an array of mode names. - */ - private static String[] getModeNames() - { - Mode[] modes = jEdit.getModes(); - String[] names = new String[modes.length]; - for (int i=0; i<modes.length; i++) { - names[i] = modes[i].getName(); - } - return names; - } + /** + * Load the accelerators for the given mode. + */ + private void loadAcceleratorsForMode(String modeName) + { + if (accelerators == null) { + return; + } + DefaultListModel listModel = (DefaultListModel) accelerators.getModel(); + listModel.clear(); + Collection coll = mgr.getAccelerators(modeName); + if (coll.isEmpty()) { + return; + } + List list = new ArrayList(coll); + Collections.sort(list); + for (Iterator i = list.iterator(); i.hasNext();) + { + listModel.addElement(i.next()); + } + // accelerators.setModel(listModel); + accelerators.setSelectedIndex(0); + accelerators.setEnabled(true); + } + /** + * Returns an array of mode names. + */ + private static String[] getModeNames() + { + Mode[] modes = jEdit.getModes(); + String[] names = new String[modes.length]; + for (int i=0; i<modes.length; i++) { + names[i] = modes[i].getName(); + } + return names; + } + } Modified: plugins/Templates/trunk/templates/TemplateAction.java =================================================================== --- plugins/Templates/trunk/templates/TemplateAction.java 2024-02-18 13:58:02 UTC (rev 25711) +++ plugins/Templates/trunk/templates/TemplateAction.java 2024-03-14 07:45:49 UTC (rev 25712) @@ -30,12 +30,13 @@ */ public class TemplateAction extends BeanShellAction { - // private static String actionLabel = "Templates.process-template"; + // setup BeanShell code for action private static String code1 = "templates.TemplatesPlugin.processTemplate(\""; private static String code2 = "\", textArea);"; + // phased out MR 2024 private static int serialNum = 0; - //Constructors + // Constructor public TemplateAction(String actionName, String templateName, String filepath) { super(actionName, code1 + filepath.replace('\\','/') + code2, @@ -46,22 +47,21 @@ jEdit.setTemporaryProperty(actionName + ".label", templateName); } + // Constructor from TemplateFile public TemplateAction(TemplateFile file) { - this(TemplateAction.getUniqueActionName(), file.getLabel(), file.getPath()); + this( + // getUniqueActionName(), + file.getActionName(), + file.getLabel(), + file.getRelativePath() + ); } - + + // bad: changes when templates are added, so key bindings would get shifted public static synchronized final String getUniqueActionName() { return "process-template-" + Integer.toString(serialNum++); } - /** - * Over-ride EditAction.getLabel() which requires a property - */ - /* public String getLabel() { - return actionLabel; - } - */ - } /* * Change Log: Modified: plugins/Templates/trunk/templates/TemplateDir.java =================================================================== --- plugins/Templates/trunk/templates/TemplateDir.java 2024-02-18 13:58:02 UTC (rev 25711) +++ plugins/Templates/trunk/templates/TemplateDir.java 2024-03-14 07:45:49 UTC (rev 25712) @@ -36,18 +36,20 @@ public class TemplateDir extends TemplateFile { private Vector templateFiles; + private ActionSet actionSet; + // private static RE backupFilter; public static Pattern backupPattern; - //Constructors + // Constructors public TemplateDir(TemplateDir parent, File templateFile) { super(parent, templateFile); } - //Accessors & Mutators + // Accessors & Mutators - //Implementors + // Implementors public boolean isDirectory() { return true; @@ -58,7 +60,7 @@ * to template files. Backup files are ignored based on the values of the * backup prefix and suffix in the "Global Options" settings. */ - public void refreshTemplates() + public void readTemplates() { File f; this.templateFiles = new Vector(); @@ -74,15 +76,15 @@ if (f.isDirectory()) { // Add subdirectory as a TemplateDir - TemplateDir submenu = new TemplateDir(this, f); - this.templateFiles.addElement(submenu); - submenu.refreshTemplates(); + TemplateDir subdir = new TemplateDir(this, f); + this.templateFiles.addElement(subdir); + subdir.readTemplates(); } else { Matcher m = backupPattern.matcher(files[i]); if (!m.matches()) - {// if not a backup file + { // if not a backup file TemplateFile tf = new TemplateFile(this, f); this.templateFiles.addElement(tf); } @@ -107,7 +109,7 @@ { String exp = jEdit.getProperty("backup.prefix") + "\\S+" + - jEdit.getProperty("backup.suffix");// RE for jEdit backups + jEdit.getProperty("backup.suffix"); // RE for jEdit backups if (exp.equals("\\S+")) { exp = ""; @@ -115,6 +117,15 @@ // backupFilter = new RE(exp, RE.REG_ICASE); backupPattern = Pattern.compile(exp, Pattern.CASE_INSENSITIVE); } + + private static String fixPath(String path) + { // check for root of templates tree + if (!path.endsWith(File.separator) && !"".equals(path)) + { + path = path + File.separator; + } + return path; + } /** * Add a menu item to the given menu object for each TemplateFile contained @@ -124,62 +135,99 @@ * @param menu The menu to which the new JMenuItem objects will be added. * @param parent The path of the parent directory */ - public void createMenus(JMenu menu, String parent) + public void createMenus(JMenu menu, String parentPath) { - Object o; - JMenu submenu; - TemplateAction myAction; - TemplateDir td; - TemplateFile tf; - Enumeration e; - if (!parent.endsWith(File.separator)) + Log.log(Log.DEBUG, TemplatesPlugin.class, "subMenu: " + getLabel()); + + // PROBLEM #1: Templates actions are not showing up in + // Utilities->Global Options->Shortcuts until after "Refresh Templates" + // is selected. + // PROBLEM #2: When "Refresh Templates" is selected, the old actions + // are not removed. + // solved in v.5.1.0 (hertzhaft) + + Enumeration items = this.templateFiles.elements(); + while (items.hasMoreElements()) { - // check for root of templates tree - if (!"".equals(parent)) - { - parent = parent + File.separator; + Object object = items.nextElement(); + if (object instanceof TemplateDir) + { // add sub-menu + TemplateDir dir = (TemplateDir) object; + JMenu subMenu = new JMenu(dir.getLabel()); + menu.add(subMenu); + dir.createMenus(subMenu, fixPath(parentPath) + dir.getLabel()); } + else + { // add template action as a menu item + TemplateFile file = (TemplateFile) object; + menu.add(GUIUtilities.loadMenuItem( + jEdit.getActionContext(), + file.getActionName(), + false + )); + } } + } + + /** + * Add an ActionSet for this TemplateDir. + * Add an action for each TemplateFile contained within this TemplateDir. + * Recursively process any TemplateDir objects within this TemplateDir. + * + * @param parent The path of the parent directory + */ + public void createActions(String parentPath) + { if (templateFiles == null) { - this.refreshTemplates(); + this.readTemplates(); } - // Create ActionSet for the items in this TemplateDir - StringBuffer sb = new StringBuffer("Templates - "); - if ("".equals(parent)) // Top-level menu - sb.append("(Top-level menu)"); - else - sb.append(this.getFQLabel()); - ActionSet myActions = new ActionSet(sb.toString()); - // PROBLEM #1: Templates actions are not showing up in - // Utilities->Global Options->Shortcuts until after "Refresh Templates" - // is selected. - // PROBLEM #2: When "Refresh Templates" is selected, the old actions - // are not removed. - e = this.templateFiles.elements(); - while (e.hasMoreElements()) + String parent = fixPath(parentPath); + + StringBuffer name = new StringBuffer("Templates: "); + name.append("".equals(parent) + ? "(top-level menu)" + : this.getFQLabel()); + addActionSet( new ActionSet(name.toString())); + + Log.log(Log.DEBUG, TemplatesPlugin.class, "actionSet: " + name); + + Enumeration items = this.templateFiles.elements(); + while (items.hasMoreElements()) { - o = e.nextElement(); - if (o instanceof TemplateDir) - { - td = (TemplateDir) o; - submenu = new JMenu(td.getLabel()); - menu.add(submenu);// Add subdirectory as a sub-menu - td.createMenus(submenu, parent + td.getLabel()); - } else - { - tf = (TemplateFile) o; - String actionName = TemplateAction.getUniqueActionName(); - myAction = new TemplateAction(actionName, - tf.getLabel(), tf.getRelativePath()); - myActions.addAction(myAction); - menu.add(GUIUtilities.loadMenuItem(jEdit.getActionContext(), actionName, false)); + Object object = items.nextElement(); + if (object instanceof TemplateDir) + { // add ActionSet for subdir + TemplateDir dir = (TemplateDir) object; + dir.createActions(parent + dir.getLabel()); } + else + { // add Action for template file + TemplateFile file = (TemplateFile) object; + TemplateAction action = new TemplateAction(file); + actionSet.addAction(action); + } } - jEdit.addActionSet(myActions); + registerActionSet(); } + public ActionSet registerActionSet() + { + actionSet.initKeyBindings(); + jEdit.addActionSet(actionSet); + return actionSet; + } + + public ActionSet addActionSet(ActionSet newActionSet) + { + if (actionSet != null) { + jEdit.removeActionSet(actionSet); + } + actionSet = newActionSet; + return actionSet; + } + public Enumeration children() { return templateFiles.elements(); Modified: plugins/Templates/trunk/templates/TemplateDockable.java =================================================================== --- plugins/Templates/trunk/templates/TemplateDockable.java 2024-02-18 13:58:02 UTC (rev 25711) +++ plugins/Templates/trunk/templates/TemplateDockable.java 2024-03-14 07:45:49 UTC (rev 25712) @@ -59,7 +59,7 @@ templates.addMouseListener(this); } - + public boolean requestFocusInWindow() { templates.requestFocus(); return true; @@ -102,8 +102,7 @@ */ public void processSelectedTemplate() { - TemplatesPlugin plugin = (TemplatesPlugin) jEdit.getPlugin("templates.TemplatesPlugin"); - plugin.processTemplate(templates.getSelectedTemplate(), view, view.getTextArea()); + TemplatesPlugin.processTemplate(templates.getSelectedTemplate(), view, view.getTextArea()); view.getEditPane().getTextArea().requestFocus(); } @@ -182,34 +181,46 @@ if (RELOAD.equals(evt.getActionCommand())) { TemplatesPlugin.refreshTemplates(); templates.reload(); - } else if (EDIT.equals(evt.getActionCommand())) { - jEdit.openFile(view, MiscUtilities.concatPath(TemplatesPlugin.getTemplateDir(), - templates.getSelectedTemplate())); - } else if (SET_ACCELERATOR.equals(evt.getActionCommand())) { - String mode = - GUIUtilities.input(view, "plugin.TemplatesPlugin.set-accelerator.input-mode", - jEdit.getModes(), view.getEditPane().getBuffer().getMode().getName()); + } + else if (EDIT.equals(evt.getActionCommand())) { + jEdit.openFile(view, MiscUtilities.concatPath( + TemplatesPlugin.getTemplateDirName(), + templates.getSelectedTemplate() + )); + } + else if (SET_ACCELERATOR.equals(evt.getActionCommand())) { + String mode = GUIUtilities.input(view, + "plugin.TemplatesPlugin.set-accelerator.input-mode", + jEdit.getModes(), + view.getEditPane().getBuffer().getMode().getName() + ); if (mode == null) { return; } - String accelerator = - GUIUtilities.input(view, "plugin.TemplatesPlugin.set-accelerator.input-accelerator", null); + String accelerator = GUIUtilities.input(view, + "plugin.TemplatesPlugin.set-accelerator.input-accelerator", + null + ); if (accelerator == null) { return; } - if (AcceleratorManager.getInstance().findTemplatePath(mode, - accelerator) != null) - { - int result = - GUIUtilities.confirm(view, "plugin.TemplatesPlugin.set-accelerator.confirm-overwrite", - new String[] {"accelerator"}, JOptionPane.YES_NO_OPTION, - JOptionPane.WARNING_MESSAGE); - if (result != JOptionPane.YES_OPTION) { - return; - } + + AcceleratorManager mgr = AcceleratorManager.getInstance(); + + if (mgr.findTemplatePath(mode, accelerator) != null) { + int result = GUIUtilities.confirm(view, + "plugin.TemplatesPlugin.set-accelerator.confirm-overwrite", + new String[] {"accelerator"}, + JOptionPane.YES_NO_OPTION, + JOptionPane.WARNING_MESSAGE + ); + if (result != JOptionPane.YES_OPTION) + { + return; + } } - AcceleratorManager.getInstance().addAccelerator(mode, accelerator, - templates.getSelectedTemplate()); + mgr.addAccelerator(mode, accelerator, templates.getSelectedTemplate()); + mgr.save(); } } //}}} Modified: plugins/Templates/trunk/templates/TemplateFile.java =================================================================== --- plugins/Templates/trunk/templates/TemplateFile.java 2024-02-18 13:58:02 UTC (rev 25711) +++ plugins/Templates/trunk/templates/TemplateFile.java 2024-03-14 07:45:49 UTC (rev 25712) @@ -43,7 +43,7 @@ private static Pattern templateLabelPattern; private TemplateDir parent; - //Constructors + // Constructor public TemplateFile(TemplateDir parent, File templateFile) { super(); @@ -72,7 +72,7 @@ } } - //Accessors & Mutators + // Accessors & Mutators public String getLabel() { return label; @@ -83,6 +83,11 @@ label = labelVal; } + public String getActionName() + { + return "velocity-" + getRelativePath(); + } + /** * Returns the "fully qualified" label, that is, a hierarchical label * which includes the label of this <code>TemplateFile</code>'s parent. @@ -110,14 +115,14 @@ public String getRelativePath() { String absolutePath = templateFile.getPath(); - if (absolutePath.startsWith(TemplatesPlugin.getTemplateDir())) + if (absolutePath.startsWith(TemplatesPlugin.getTemplateDirName())) { - return absolutePath.substring(TemplatesPlugin.getTemplateDir().length()); + return absolutePath.substring(TemplatesPlugin.getTemplateDirName().length()); } return absolutePath; } - //Implementors + // Implementors public boolean isDirectory() { return false; Modified: plugins/Templates/trunk/templates/TemplateTree.java =================================================================== --- plugins/Templates/trunk/templates/TemplateTree.java 2024-02-18 13:58:02 UTC (rev 25711) +++ plugins/Templates/trunk/templates/TemplateTree.java 2024-03-14 07:45:49 UTC (rev 25712) @@ -108,7 +108,8 @@ */ public boolean isLastPathComponentATemplate(TreePath path) { - if (path == null) { + if (path == null) + { return false; } TreeNode node = (TreeNode) path.getLastPathComponent(); @@ -123,8 +124,10 @@ // NOTE: the supplied object path is an array of Strings List path = new LinkedList(); path.add(root); - for (int i=0; i<objPath.length; i++) { - if (!findChildNode(objPath, i, path)) { + for (int i=0; i<objPath.length; i++) + { + if (!findChildNode(objPath, i, path)) + { return null; } } @@ -139,7 +142,8 @@ Object target = objPath[idx]; TreeNode parent = (TreeNode) path.get(path.size() - 1); Enumeration children = parent.children(); - while (children.hasMoreElements()) { + while (children.hasMoreElements()) + { TreeNode node = (TreeNode) children.nextElement(); if ((((TemplateFile)node).getRelativePath()).endsWith((String)target)) { path.add(node); Modified: plugins/Templates/trunk/templates/TemplatesMenuProvider.java =================================================================== --- plugins/Templates/trunk/templates/TemplatesMenuProvider.java 2024-02-18 13:58:02 UTC (rev 25711) +++ plugins/Templates/trunk/templates/TemplatesMenuProvider.java 2024-03-14 07:45:49 UTC (rev 25712) @@ -41,7 +41,7 @@ * Re-create the Templates menu hierarchy. */ public void update(JMenu templatesMenu) { - Log.log(Log.DEBUG,this,"... TemplatesMenu.update()"); + Log.log(Log.DEBUG,this,"TemplatesMenu.update()"); templatesMenu.removeAll(); // Create menu items for the "Refresh" option and a separator JMenuItem mi; Modified: plugins/Templates/trunk/templates/TemplatesOptionPane.java =================================================================== --- plugins/Templates/trunk/templates/TemplatesOptionPane.java 2024-02-18 13:58:02 UTC (rev 25711) +++ plugins/Templates/trunk/templates/TemplatesOptionPane.java 2024-03-14 07:45:49 UTC (rev 25712) @@ -62,7 +62,7 @@ * @param textFieldStr A string containing the current Templates directory. */ private void initGUI() { - String templateFieldStr = TemplatesPlugin.getTemplateDir(); + String templateFieldStr = TemplatesPlugin.getTemplateDirName(); String velocityFieldStr = TemplatesPlugin.getVelocityDirectory(); boolean accelPassThruFlag = TemplatesPlugin.getAcceleratorPassThruFlag(); setLayout(new BorderLayout()); Modified: plugins/Templates/trunk/templates/TemplatesPlugin.java =================================================================== --- plugins/Templates/trunk/templates/TemplatesPlugin.java 2024-02-18 13:58:02 UTC (rev 25711) +++ plugins/Templates/trunk/templates/TemplatesPlugin.java 2024-03-14 07:45:49 UTC (rev 25712) @@ -35,16 +35,17 @@ import velocity.jEditContext; /** - * A jEdit plugin for adding a templating function. + * A jEdit plugin for using and managing Apache Velocity templates. * * @author Steve Jakob */ public class TemplatesPlugin extends EditPlugin - implements RuntimeConstants, VelocityConstants + implements RuntimeConstants, VelocityConstants { + private static String pluginName; private static String defaultTemplateDir; private static String defaultVelocityDir; - private static String sepChar;// System-dependant separator character + private static String sepChar; // System-dependant separator character private static TemplateDir templates = null; private static VelocityEngine engine; @@ -60,21 +61,11 @@ } /** - * Sets the root TemplateDir object to another value. - * - * @param newTemplates The new TemplateDir object - */ - public static void setTemplates(TemplateDir newTemplates) - { - templates = newTemplates; - } - - /** * Returns the directory where templates are stored * * @return A string containing the template directory path. */ - public static String getTemplateDir() + public static String getTemplateDirName() { String templateDir = jEdit.getProperty("plugin.TemplatesPlugin.templateDir.0", ""); if (templateDir.equals("")) @@ -132,7 +123,7 @@ * throw a more specific exception. */ public static VelocityEngine getEngine() - throws Exception + throws Exception { if (engine == null) { @@ -139,7 +130,7 @@ engine = new VelocityEngine(); Properties props = loadVelocityProperties(); props.setProperty(RUNTIME_LOG, getVelocityLog()); - props.setProperty(FILE_RESOURCE_LOADER_PATH, TemplatesPlugin.getTemplateDir()); + props.setProperty(FILE_RESOURCE_LOADER_PATH, TemplatesPlugin.getTemplateDirName()); engine.init(props); } return engine; @@ -211,18 +202,16 @@ { Properties props = new Properties(); InputStream in = null; - TemplatesPlugin thePlugin = (TemplatesPlugin) jEdit.getPlugin( - "templates.TemplatesPlugin"); // Load the normal Velocity properties try { - in = thePlugin.getClass().getClassLoader(). + in = TemplatesPlugin.class.getClassLoader(). getResourceAsStream("velocity/velocity.properties"); props.load(in); } catch (IOException e) { - Log.log(Log.ERROR, thePlugin, "Error loading normal velocity properties"); + Log.log(Log.ERROR, pluginName, "Error loading normal velocity properties"); } finally { @@ -240,7 +229,7 @@ } catch (IOException e) { - Log.log(Log.ERROR, thePlugin, "Error loading custom velocity properties"); + Log.log(Log.ERROR, pluginName, "Error loading custom velocity properties"); } finally { @@ -251,80 +240,74 @@ //{{{ EditPlugin Methods /** - * Start this plugin. + * Start this plugin. Read templates directory and create actions/actionsets. */ public void start() { + pluginName = TemplatesPlugin.class.getSimpleName(); + sepChar = System.getProperty("file.separator"); - defaultTemplateDir = jEdit.getSettingsDirectory() + sepChar + - "templates" + sepChar; - defaultVelocityDir = jEdit.getSettingsDirectory() + sepChar + - "velocity" + sepChar; + defaultTemplateDir = jEdit.getSettingsDirectory() + sepChar + "templates" + sepChar; + defaultVelocityDir = jEdit.getSettingsDirectory() + sepChar + "velocity" + sepChar; File velocityDir = new File(getVelocityDirectory()); if (velocityDir.isFile()) { - Log.log(Log.DEBUG, this, "'" + getVelocityDirectory() + "' is a file"); + Log.log(Log.DEBUG, pluginName, "'" + getVelocityDirectory() + "' is a file"); } if (!velocityDir.exists() && !velocityDir.mkdirs()) { - Log.log(Log.DEBUG, this, "Cannot make directory '" + getVelocityDirectory() + "'"); + Log.log(Log.DEBUG, pluginName, "Cannot make directory '" + getVelocityDirectory() + "'"); } - File templatesDir = new File(TemplatesPlugin.getTemplateDir()); - if (!templatesDir.exists() && !templatesDir.mkdirs()) + File templateDir = new File(TemplatesPlugin.getTemplateDirName()); + if (!templateDir.exists() && !templateDir.mkdirs()) { - Log.log(Log.DEBUG, this, "Cannot make directory '" + TemplatesPlugin.getTemplateDir() + "'"); + Log.log(Log.DEBUG, pluginName, "Cannot make directory '" + TemplatesPlugin.getTemplateDirName() + "'"); } - templates = new TemplateDir(null, templatesDir); - templates.refreshTemplates(); + templates = new TemplateDir(null, templateDir); + templates.readTemplates(); + templates.createActions(""); // make template shortcuts work from the start } /** - * Not used. + * Scans the templates directory, recreates all actions/actionsets + * and sends an EditBus message to all TemplatesMenu objects + * to update themselves when accessed. + * Backup files are ignored based on the values of the backup prefix and suffix + * in the "Global Options" settings. */ - public void stop() - { - AcceleratorManager.getInstance().save(); - } - - /** - * Scans the templates directory and sends an EditBus message to all - * TemplatesMenu objects to update themselves. Backup files are ignored based - * on the values of the backup prefix and suffix in the "Global Options" - * settings. - */ public static void refreshTemplates() { - String templateDirStr = getTemplateDir(); - File templateDir = new File(templateDirStr); + String dirName = getTemplateDirName(); + File templateDir = new File(dirName); try { if (!templateDir.exists()) - {// If the template directory doesn't exist - Log.log(Log.DEBUG, - jEdit.getPlugin(jEdit.getProperty("plugin.TemplatesPlugin.name")), - "Attempting to create templates directory: " + templateDirStr); - templateDir.mkdir();// then create it + { // If the template directory doesn't exist + Log.log(Log.DEBUG, pluginName, + "Attempting to create templates directory: " + dirName); + templateDir.mkdir(); // then create it if (!templateDir.exists()) - {// If insufficent privileges to create it + { // If insufficent privileges to create it throw new java.lang.SecurityException(); } } - setTemplates(new TemplateDir(null, templateDir)); - getTemplates().refreshTemplates(); - buildAllMenus(); + templates = new TemplateDir(null, templateDir); + templates.readTemplates(); + templates.createActions(""); + sendMenuChanged(); } catch (java.lang.SecurityException se) { - Log.log(Log.ERROR, - jEdit.getPlugin(jEdit.getProperty("plugin.TemplatesPlugin.name")), - jEdit.getProperty("plugin.TemplatesPlugin.error.create-dir") + templateDir - ); + Log.log(Log.ERROR, pluginName, + jEdit.getProperty("plugin.TemplatesPlugin.error.create-dir") + templateDir + ); } } - private static void buildAllMenus() + private static void sendMenuChanged() { + // signal the Plugins->Templates menu tree should be rebuilt on access EditBus.send(new DynamicMenuChanged("plugin.templates.TemplatesPlugin.menu")); } @@ -336,7 +319,7 @@ */ public static void editTemplate(View view) { - JFileChooser chooser = new JFileChooser(getTemplateDir()); + JFileChooser chooser = new JFileChooser(getTemplateDirName()); int retVal = chooser.showOpenDialog(view); if (retVal == JFileChooser.APPROVE_OPTION) { @@ -344,13 +327,11 @@ if (file != null) { try - { - // Load file into jEdit + { // Load file into jEdit jEdit.openFile(view, file.getCanonicalPath()); } catch (IOException e) - { - // shouldn't happen + { // shouldn't happen } } } @@ -364,7 +345,7 @@ */ public static void saveTemplate(View view) { - JFileChooser chooser = new JFileChooser(getTemplateDir()); + JFileChooser chooser = new JFileChooser(getTemplateDirName()); int retVal = chooser.showSaveDialog(view); if (retVal == JFileChooser.APPROVE_OPTION) { @@ -372,13 +353,11 @@ if (file != null) { try - { - // Save file + { // Save file view.getBuffer().save(view, file.getCanonicalPath()); } catch (IOException e) - { - // shouldn't happen + { // shouldn't happen } } } @@ -439,10 +418,8 @@ } catch (Exception e) { - TemplatesPlugin thePlugin = (TemplatesPlugin) jEdit.getPlugin( - "templates.TemplatesPlugin"); - Log.log(Log.ERROR, thePlugin, "Error processing template '" + template + "'"); - Log.log(Log.ERROR, thePlugin, e); + Log.log(Log.ERROR, pluginName, "Error processing template '" + template + "'"); + Log.log(Log.ERROR, pluginName, e); JOptionPane.showMessageDialog(textArea, "An error occurred while attempting to process a template." + "\nRefer to the Activity Log for more details.", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ker...@us...> - 2024-02-18 13:58:04
|
Revision: 25711 http://sourceforge.net/p/jedit/svn/25711 Author: kerik-sf Date: 2024-02-18 13:58:02 +0000 (Sun, 18 Feb 2024) Log Message: ----------- build-support: configurable extra and package file location this is to work with src/main/{java,resources} layouts in projects Modified Paths: -------------- build-support/trunk/plugin-build.xml Modified: build-support/trunk/plugin-build.xml =================================================================== --- build-support/trunk/plugin-build.xml 2024-02-18 13:57:57 UTC (rev 25710) +++ build-support/trunk/plugin-build.xml 2024-02-18 13:58:02 UTC (rev 25711) @@ -259,7 +259,8 @@ <!-- This selector defines extra files to be included in the plugin's JAR file. The context of the - selector is the plugin's directory (${basedir}), + selector is the plugin's directory (${basedir}) by default + (see the packageFilesSourceDir property), so it will not work for files outside the plugin directory. For those cases, use the "build.prepare" target. By default, it's empty. --> @@ -266,6 +267,9 @@ <selector id="packageFiles"> <size value="0" when="less" /> </selector> + <!-- Directory where to copy the packageFiles from. + Override it to eg. src/main/resources if your project is setup like that --> + <property name="packageFilesSourceDir" value="${basedir}"/> <!-- This selector defines the doc source files The context of the selector is the plugin's directory (${basedir}), @@ -279,7 +283,8 @@ <!-- This selector defines other files that should be packaged in the plugin's jar file; by default it contains actions.xml, dockables.xml, services.xml, any files ending in ".props", - "LICENSE" and "README". The context is "${basedir}". + "LICENSE" and "README". The context is "${basedir}" by default, + see the extraFilesSourceDir property. Normally, plugins do not override this but instead define a "packageFiles" selector. --> <selector id="extraFiles"> @@ -297,6 +302,9 @@ </or> </and> </selector> + <!-- Directory where to copy the extraFiles from. + Override it to eg. src/main/resources if your project is setup like that --> + <property name="extraFilesSourceDir" value="${basedir}"/> <!--{{{ Ivy setttings =============================== --> @@ -398,13 +406,13 @@ <mkdir dir="${install.dir}" /> <copy todir="${build.extras}" includeEmptyDirs="false"> - <fileset dir="${basedir}"> + <fileset dir="${extraFilesSourceDir}"> <selector refid="extraFiles" /> </fileset> </copy> <copy todir="${build.extras}" includeEmptyDirs="false"> - <fileset dir="${basedir}"> + <fileset dir="${packageFilesSourceDir}"> <selector refid="packageFiles" /> </fileset> </copy> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ker...@us...> - 2024-02-18 13:58:00
|
Revision: 25710 http://sourceforge.net/p/jedit/svn/25710 Author: kerik-sf Date: 2024-02-18 13:57:57 +0000 (Sun, 18 Feb 2024) Log Message: ----------- build-support: specify source and target when compiling Modified Paths: -------------- build-support/trunk/plugin-build.xml Modified: build-support/trunk/plugin-build.xml =================================================================== --- build-support/trunk/plugin-build.xml 2024-02-18 13:52:59 UTC (rev 25709) +++ build-support/trunk/plugin-build.xml 2024-02-18 13:57:57 UTC (rev 25710) @@ -235,6 +235,8 @@ nowarn="${compiler.nowarn}" listfiles="${compiler.listfiles}" fork="${compiler.fork}" + source="${compiler.source}" + target="${compiler.target}" bootclasspath="${compiler.bootclasspath}" > <src location="${src.dir}" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ker...@us...> - 2024-02-18 13:53:00
|
Revision: 25709 http://sourceforge.net/p/jedit/svn/25709 Author: kerik-sf Date: 2024-02-18 13:52:59 +0000 (Sun, 18 Feb 2024) Log Message: ----------- pjo/ant was using bad property to find PLUGIN.props Modified Paths: -------------- pjo/trunk/ant/build.xml Modified: pjo/trunk/ant/build.xml =================================================================== --- pjo/trunk/ant/build.xml 2024-02-18 13:50:55 UTC (rev 25708) +++ pjo/trunk/ant/build.xml 2024-02-18 13:52:59 UTC (rev 25709) @@ -127,8 +127,7 @@ <filename name="config/**" negate="true" /> <filename name="temp/**" negate="true" /> <filename name="ProjectViewer/pvdebug/**" negate="true" /> - <!--<include name="**/@{pluginName}.props"/>--> - <filename name="**/${pluginName}.props"/> + <filename name="**/${plugin.name}.props"/> </and> </selector> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ker...@us...> - 2024-02-18 13:50:56
|
Revision: 25708 http://sourceforge.net/p/jedit/svn/25708 Author: kerik-sf Date: 2024-02-18 13:50:55 +0000 (Sun, 18 Feb 2024) Log Message: ----------- pjo/ant copy ivy donwnloaded libs before view; remove splash Modified Paths: -------------- pjo/trunk/ant/build.xml Modified: pjo/trunk/ant/build.xml =================================================================== --- pjo/trunk/ant/build.xml 2024-02-18 13:50:09 UTC (rev 25707) +++ pjo/trunk/ant/build.xml 2024-02-18 13:50:55 UTC (rev 25708) @@ -447,9 +447,15 @@ <sequential> <property name="jedit.install.dir" value="${jedit.version.@{pluginJeditVersion}.install.dir}" /> <property name="jedit.settings.dir" value="${jedit.version.@{pluginJeditVersion}.settings.dir}" /> + <copy todir="${jedit.settings.dir}/jars"> + <fileset dir="@{pluginDownloadDir}/build/lib" + includes="*.jar" /> + </copy> <java fork="true" jar="${jedit.install.dir}/jedit.jar"> - <jvmarg value="-Xmx192M"/> + <jvmarg value="-Xmx192M" /> + <jvmarg value="-splash:dummy.git" /> <arg value="-noserver"/> + <arg value="-nosplash"/> <arg value="-settings=${jedit.settings.dir}"/> </java> </sequential> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ker...@us...> - 2024-02-18 13:50:11
|
Revision: 25707 http://sourceforge.net/p/jedit/svn/25707 Author: kerik-sf Date: 2024-02-18 13:50:09 +0000 (Sun, 18 Feb 2024) Log Message: ----------- pjo/ant don't copy to clipboard, doesn't play nice in a container Modified Paths: -------------- pjo/trunk/ant/build.xml Modified: pjo/trunk/ant/build.xml =================================================================== --- pjo/trunk/ant/build.xml 2024-02-18 13:49:23 UTC (rev 25706) +++ pjo/trunk/ant/build.xml 2024-02-18 13:50:09 UTC (rev 25707) @@ -234,10 +234,6 @@ depends="cache-lib-scripting, set-plugin-props-simple" unless="no.post.package" > <script language="beanshell" classpathref="lib.scripting.path" > - import java.awt.Toolkit; - import java.awt.datatransfer.Clipboard; - import java.awt.datatransfer.StringSelection; - dirPar = (new File(project.getProperty("plugin.dir"))).getParent(); dir = new File(dirPar, "packages"); files = dir.list(); @@ -245,11 +241,6 @@ for (fileName : files) { file = new File(dir, fileName); project.log(fileName + " " + file.length()); - Clipboard clip = Toolkit.getDefaultToolkit().getSystemClipboard(); - StringSelection sel = new StringSelection("" + file.length()); - clip.setContents(sel, this); - javax.swing.JOptionPane.showMessageDialog(null, - "Filesize of " + fileName + ": " + file.length() + " in clipboard"); } </script> </target> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ker...@us...> - 2024-02-18 13:49:26
|
Revision: 25706 http://sourceforge.net/p/jedit/svn/25706 Author: kerik-sf Date: 2024-02-18 13:49:23 +0000 (Sun, 18 Feb 2024) Log Message: ----------- pjo/ant java 8 and 11 Modified Paths: -------------- pjo/trunk/ant/build.xml Modified: pjo/trunk/ant/build.xml =================================================================== --- pjo/trunk/ant/build.xml 2024-02-18 13:48:27 UTC (rev 25705) +++ pjo/trunk/ant/build.xml 2024-02-18 13:49:23 UTC (rev 25706) @@ -132,7 +132,7 @@ </and> </selector> - <target name="build" depends="java5"> + <target name="build"> <input addproperty="plugin.name" message="Plugin Name:" /> <input addproperty="plugin.version" message="Version:" /> <plugin-jedit-version pluginName="${plugin.name}" pluginVersion="${plugin.version}" /> @@ -209,6 +209,14 @@ <property name="compiler.source" value="1.6" /> <property name="compiler.target" value="1.6" /> </target> + <target name="java8"> + <property name="compiler.source" value="1.8" /> + <property name="compiler.target" value="1.8" /> + </target> + <target name="java11"> + <property name="compiler.source" value="11" /> + <property name="compiler.target" value="11" /> + </target> <target name="package"> <input addproperty="plugin.name" message="Plugin Name:" /> <input addproperty="plugin.version" message="Version:" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ker...@us...> - 2024-02-18 13:48:28
|
Revision: 25705 http://sourceforge.net/p/jedit/svn/25705 Author: kerik-sf Date: 2024-02-18 13:48:27 +0000 (Sun, 18 Feb 2024) Log Message: ----------- pjo/ant fix jedit repo url Modified Paths: -------------- pjo/trunk/ant/build.xml Modified: pjo/trunk/ant/build.xml =================================================================== --- pjo/trunk/ant/build.xml 2024-02-18 13:45:05 UTC (rev 25704) +++ pjo/trunk/ant/build.xml 2024-02-18 13:48:27 UTC (rev 25705) @@ -303,7 +303,7 @@ jedit.version.04.03.settings.dir=${jedit.version.04.03.settings.dir} # The jEdit Subversion URL - shouldn't ever change. -jedit.svn.url=https://jedit.svn.sourceforge.net/svnroot/jedit +jedit.svn.url=https://svn.code.sf.net/p/jedit/svn </echo> </target> <macrodef name="call-plugin-macro"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ker...@us...> - 2024-02-18 13:45:08
|
Revision: 25704 http://sourceforge.net/p/jedit/svn/25704 Author: kerik-sf Date: 2024-02-18 13:45:05 +0000 (Sun, 18 Feb 2024) Log Message: ----------- pjo/ant more restrictive props file finding pattern Modified Paths: -------------- pjo/trunk/ant/build.properties.sample pjo/trunk/ant/build.xml pjo/trunk/ant/git_cl.xml Modified: pjo/trunk/ant/build.properties.sample =================================================================== --- pjo/trunk/ant/build.properties.sample 2023-11-19 23:37:24 UTC (rev 25703) +++ pjo/trunk/ant/build.properties.sample 2024-02-18 13:45:05 UTC (rev 25704) @@ -1,6 +1,6 @@ # The jEdit Subversion url - shouldn't ever change. -jedit.svn.url=https://jedit.svn.sourceforge.net/svnroot/jedit -jedit.git.url=git://jedit.git.sourceforge.net/gitroot/jedit +jedit.svn.url=https://svn.code.sf.net/p/jedit/svn +jedit.git.url=ssh://git.code.sf.net/p/jedit # This is your sandbox directory, all plugins will be downloaded and built from here. sandbox.dir=/Users/elberry/development/projects/jEdit/plugins/sandbox Modified: pjo/trunk/ant/build.xml =================================================================== --- pjo/trunk/ant/build.xml 2023-11-19 23:37:24 UTC (rev 25703) +++ pjo/trunk/ant/build.xml 2024-02-18 13:45:05 UTC (rev 25704) @@ -128,7 +128,7 @@ <filename name="temp/**" negate="true" /> <filename name="ProjectViewer/pvdebug/**" negate="true" /> <!--<include name="**/@{pluginName}.props"/>--> - <filename name="**/*.props"/> + <filename name="**/${pluginName}.props"/> </and> </selector> @@ -494,4 +494,4 @@ </macrodef> </project> -<!-- :noTabs=false: --> \ No newline at end of file +<!-- :noTabs=false: --> Modified: pjo/trunk/ant/git_cl.xml =================================================================== --- pjo/trunk/ant/git_cl.xml 2023-11-19 23:37:24 UTC (rev 25703) +++ pjo/trunk/ant/git_cl.xml 2024-02-18 13:45:05 UTC (rev 25704) @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<project name="SVN Command Line Targets" basedir="." default="help"> +<project name="GIT Command Line Targets" basedir="." default="help"> <!-- :noTabs=false: --> <property name="prog.git" value="git" /> <target name="checkout-plugin"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vam...@us...> - 2023-11-19 23:37:28
|
Revision: 25703 http://sourceforge.net/p/jedit/svn/25703 Author: vampire0 Date: 2023-11-19 23:37:24 +0000 (Sun, 19 Nov 2023) Log Message: ----------- Replace bundled MacOSX plugin by successor MacOS plugin Modified Paths: -------------- jEdit/trunk/doc/CHANGES.txt jEdit/trunk/ivy.xml Modified: jEdit/trunk/doc/CHANGES.txt =================================================================== --- jEdit/trunk/doc/CHANGES.txt 2023-11-17 20:21:41 UTC (rev 25702) +++ jEdit/trunk/doc/CHANGES.txt 2023-11-19 23:37:24 UTC (rev 25703) @@ -9,6 +9,9 @@ {{{ Bug Fixes +- Bundle the new MacOS 1.5 plugin instead of the old MacOSX 1.3 plugin + to become compatible with newer Java versions (Björn Kautler) + - Fix NullPointerException during saving autosave settings if no previous autosave directory was set (Björn Kautler) Modified: jEdit/trunk/ivy.xml =================================================================== --- jEdit/trunk/ivy.xml 2023-11-17 20:21:41 UTC (rev 25702) +++ jEdit/trunk/ivy.xml 2023-11-19 23:37:24 UTC (rev 25703) @@ -85,7 +85,7 @@ <exclude org="net.java.abeille" module="abeille"/> </dependency> - <dependency org="org.jedit.plugins" name="MacOSX" rev="1.3" conf="default-plugins"/> + <dependency org="org.jedit.plugins" name="MacOS" rev="1.5" conf="default-plugins"/> <dependency org="org.jedit.plugins" name="QuickNotepad" rev="5.0" conf="default-plugins"/> <dependency org="org.beanshell" name="bsh" rev="2.0b5" conf="scripting"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vam...@us...> - 2023-11-17 20:21:43
|
Revision: 25702 http://sourceforge.net/p/jedit/svn/25702 Author: vampire0 Date: 2023-11-17 20:21:41 +0000 (Fri, 17 Nov 2023) Log Message: ----------- Fix NullPointerException during saving autosave settings if no previous autosave directory was set Modified Paths: -------------- jEdit/trunk/doc/CHANGES.txt jEdit/trunk/org/gjt/sp/jedit/options/SaveBackupOptionPane.java Modified: jEdit/trunk/doc/CHANGES.txt =================================================================== --- jEdit/trunk/doc/CHANGES.txt 2023-11-17 19:37:45 UTC (rev 25701) +++ jEdit/trunk/doc/CHANGES.txt 2023-11-17 20:21:41 UTC (rev 25702) @@ -9,6 +9,9 @@ {{{ Bug Fixes +- Fix NullPointerException during saving autosave settings if no previous + autosave directory was set (Björn Kautler) + - BeanShell snippets and macros now work consistently and not suddenly change behaviour anymore just because some BeanShell snippet defined a class. This now disables reflective access to otherwise inaccessible fields through Modified: jEdit/trunk/org/gjt/sp/jedit/options/SaveBackupOptionPane.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/options/SaveBackupOptionPane.java 2023-11-17 19:37:45 UTC (rev 25701) +++ jEdit/trunk/org/gjt/sp/jedit/options/SaveBackupOptionPane.java 2023-11-17 20:21:41 UTC (rev 25702) @@ -210,7 +210,7 @@ // if autosave dir changed, we should issue to perform an autosave for all dirty and all untitled buffers // to have the autosaves at the new location - if (!autosaveDirectoryOriginal.equals(autosaveDirectory.getText())) + if (!autosaveDirectory.getText().equals(autosaveDirectoryOriginal)) { bufferManager.getDirtyBuffers().forEach(buffer -> buffer.autosave(true)); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vam...@us...> - 2023-11-17 19:37:48
|
Revision: 25701 http://sourceforge.net/p/jedit/svn/25701 Author: vampire0 Date: 2023-11-17 19:37:45 +0000 (Fri, 17 Nov 2023) Log Message: ----------- Never mark empty untitled buffers dirty, independent of settings Modified Paths: -------------- jEdit/trunk/doc/CHANGES.txt jEdit/trunk/org/gjt/sp/jedit/Buffer.java Modified: jEdit/trunk/doc/CHANGES.txt =================================================================== --- jEdit/trunk/doc/CHANGES.txt 2023-11-17 02:29:55 UTC (rev 25700) +++ jEdit/trunk/doc/CHANGES.txt 2023-11-17 19:37:45 UTC (rev 25701) @@ -102,6 +102,9 @@ }}} {{{ Editing +- Never mark empty untitled buffers dirty, independent of settings + (Björn Kautler) + - Never mark buffers dirty if contents are unchanged is now also properly supported for untitled buffers (Björn Kautler) Modified: jEdit/trunk/org/gjt/sp/jedit/Buffer.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/Buffer.java 2023-11-17 02:29:55 UTC (rev 25700) +++ jEdit/trunk/org/gjt/sp/jedit/Buffer.java 2023-11-17 19:37:45 UTC (rev 25701) @@ -974,7 +974,9 @@ boolean old_d = isDirty(); if (d && getLength() == initialLength) { - if (jEdit.getBooleanProperty("useMD5forDirtyCalculation")) + if (isUntitled()) + d = false; + else if (jEdit.getBooleanProperty("useMD5forDirtyCalculation")) d = !Arrays.equals(calculateHash(), md5hash); } super.setDirty(d); @@ -2217,7 +2219,6 @@ if (isUntitled()) { initialLength = 0; - md5hash = StandardUtilities.md5(""); } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vam...@us...> - 2023-11-17 02:29:57
|
Revision: 25700 http://sourceforge.net/p/jedit/svn/25700 Author: vampire0 Date: 2023-11-17 02:29:55 +0000 (Fri, 17 Nov 2023) Log Message: ----------- Update launch4j to version 3.50 and also search in PATH environment variable for a Java runtime from the EXE launcher Modified Paths: -------------- jEdit/trunk/build.xml jEdit/trunk/doc/CHANGES.txt jEdit/trunk/ivy.xml jEdit/trunk/package-files/windows/jedit.launch4j.xml Modified: jEdit/trunk/build.xml =================================================================== --- jEdit/trunk/build.xml 2023-11-17 01:34:10 UTC (rev 25699) +++ jEdit/trunk/build.xml 2023-11-17 02:29:55 UTC (rev 25700) @@ -562,7 +562,7 @@ <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.12-workdir-win32/"/> + <fileset dir="${build.dir}/launch4j/launch4j-3.50-workdir-win32/"/> </copy> </contrib:case> <contrib:case value="unix-x64"> @@ -569,7 +569,7 @@ <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.12-workdir-linux64/"/> + <fileset dir="${build.dir}/launch4j/launch4j-3.50-workdir-linux64/"/> </copy> <chmod dir="${lib.dir}/launch4j/bin" perm="+x" @@ -579,7 +579,7 @@ <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.12-workdir-linux/"/> + <fileset dir="${build.dir}/launch4j/launch4j-3.50-workdir-linux/"/> </copy> <chmod dir="${lib.dir}/launch4j/bin" perm="+x" @@ -589,7 +589,7 @@ <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.12-workdir-mac/"/> + <fileset dir="${build.dir}/launch4j/launch4j-3.50-workdir-mac/"/> </copy> <chmod dir="${lib.dir}/launch4j/bin" perm="+x" Modified: jEdit/trunk/doc/CHANGES.txt =================================================================== --- jEdit/trunk/doc/CHANGES.txt 2023-11-17 01:34:10 UTC (rev 25699) +++ jEdit/trunk/doc/CHANGES.txt 2023-11-17 02:29:55 UTC (rev 25700) @@ -32,6 +32,9 @@ }}} {{{ Miscellaneous +- Update launch4j to version 3.50 and also search in PATH environment + variable for a Java runtime from the EXE launcher (Björn Kautler) + - Update macOS app bundler to version 1.2.0 (Björn Kautler) - Status bar design updated with the ability to add widgets to the left Modified: jEdit/trunk/ivy.xml =================================================================== --- jEdit/trunk/ivy.xml 2023-11-17 01:34:10 UTC (rev 25699) +++ jEdit/trunk/ivy.xml 2023-11-17 02:29:55 UTC (rev 25700) @@ -72,7 +72,7 @@ <dependency org="org.apache.xmlgraphics" name="fop" rev="2.3" conf="fop"/> - <dependency org="net.sf.launch4j" name="launch4j" rev="3.12" conf="launch4j"> + <dependency org="net.sf.launch4j" name="launch4j" rev="3.50" conf="launch4j"> <artifact name="launch4j" e:classifier="core"/> <artifact name="launch4j" e:classifier="workdir-win32"/> <artifact name="launch4j" e:classifier="workdir-mac"/> Modified: jEdit/trunk/package-files/windows/jedit.launch4j.xml =================================================================== --- jEdit/trunk/package-files/windows/jedit.launch4j.xml 2023-11-17 01:34:10 UTC (rev 25699) +++ jEdit/trunk/package-files/windows/jedit.launch4j.xml 2023-11-17 02:29:55 UTC (rev 25700) @@ -32,10 +32,8 @@ <stayAlive>true</stayAlive> <icon>@base.dir@/icons/jedit.ico</icon> <jre> - <path>%JAVA_HOME%</path> - <bundledJreAsFallback>true</bundledJreAsFallback> + <path>%JAVA_HOME%;%PATH%</path> <minVersion>@target.java.version@</minVersion> - <jdkPreference>preferJdk</jdkPreference> </jre> <versionInfo> <fileVersion>@jedit.build.number@</fileVersion> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vam...@us...> - 2023-11-17 01:34:13
|
Revision: 25699 http://sourceforge.net/p/jedit/svn/25699 Author: vampire0 Date: 2023-11-17 01:34:10 +0000 (Fri, 17 Nov 2023) Log Message: ----------- Update macOS app bundler to version 1.2.0 Modified Paths: -------------- jEdit/trunk/doc/CHANGES.txt jEdit/trunk/ivy.xml Modified: jEdit/trunk/doc/CHANGES.txt =================================================================== --- jEdit/trunk/doc/CHANGES.txt 2023-11-17 01:31:50 UTC (rev 25698) +++ jEdit/trunk/doc/CHANGES.txt 2023-11-17 01:34:10 UTC (rev 25699) @@ -32,6 +32,8 @@ }}} {{{ Miscellaneous +- Update macOS app bundler to version 1.2.0 (Björn Kautler) + - Status bar design updated with the ability to add widgets to the left and the right of the bar (Matthieu Casanova) Modified: jEdit/trunk/ivy.xml =================================================================== --- jEdit/trunk/ivy.xml 2023-11-17 01:31:50 UTC (rev 25698) +++ jEdit/trunk/ivy.xml 2023-11-17 01:34:10 UTC (rev 25699) @@ -93,6 +93,6 @@ <dependency org="com.google.code.findbugs" name="jsr305" rev="3.0.2"/> - <dependency org="com.evolvedbinary.appbundler" name="appbundler" rev="1.0.4" conf="appbundler"/> + <dependency org="com.evolvedbinary.appbundler" name="appbundler" rev="1.2.0" conf="appbundler"/> </dependencies> </ivy-module> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vam...@us...> - 2023-11-17 01:31:53
|
Revision: 25698 http://sourceforge.net/p/jedit/svn/25698 Author: vampire0 Date: 2023-11-17 01:31:50 +0000 (Fri, 17 Nov 2023) Log Message: ----------- Revert jsr305 removal Modified Paths: -------------- jEdit/trunk/README.SRC.txt jEdit/trunk/build.xml jEdit/trunk/ivy.xml jEdit/trunk/org/gjt/sp/jedit/ActionSet.java jEdit/trunk/org/gjt/sp/jedit/EditPane.java jEdit/trunk/org/gjt/sp/jedit/EditPlugin.java jEdit/trunk/org/gjt/sp/jedit/GUIUtilities.java jEdit/trunk/org/gjt/sp/jedit/MiscUtilities.java jEdit/trunk/org/gjt/sp/jedit/PluginJAR.java jEdit/trunk/org/gjt/sp/jedit/Registers.java jEdit/trunk/org/gjt/sp/jedit/ServiceListHandler.java jEdit/trunk/org/gjt/sp/jedit/View.java jEdit/trunk/org/gjt/sp/jedit/browser/VFSBrowser.java jEdit/trunk/org/gjt/sp/jedit/browser/VFSFileChooserDialog.java jEdit/trunk/org/gjt/sp/jedit/buffer/BufferSegment.java jEdit/trunk/org/gjt/sp/jedit/buffer/JEditBuffer.java jEdit/trunk/org/gjt/sp/jedit/buffer/PositionManager.java jEdit/trunk/org/gjt/sp/jedit/bufferset/BufferSet.java jEdit/trunk/org/gjt/sp/jedit/gui/DefaultInputHandler.java jEdit/trunk/org/gjt/sp/jedit/gui/DockingLayoutManager.java jEdit/trunk/org/gjt/sp/jedit/gui/ExtendedGridLayout.java jEdit/trunk/org/gjt/sp/jedit/gui/FilteredListModel.java jEdit/trunk/org/gjt/sp/jedit/gui/LogViewer.java jEdit/trunk/org/gjt/sp/jedit/gui/PanelWindowContainer.java jEdit/trunk/org/gjt/sp/jedit/gui/PingPongList.java jEdit/trunk/org/gjt/sp/jedit/gui/StatusBar.java jEdit/trunk/org/gjt/sp/jedit/input/AbstractInputHandler.java jEdit/trunk/org/gjt/sp/jedit/io/AutoDetection.java jEdit/trunk/org/gjt/sp/jedit/io/CharsetEncoding.java jEdit/trunk/org/gjt/sp/jedit/io/CopyFileWorker.java jEdit/trunk/org/gjt/sp/jedit/io/Encoding.java jEdit/trunk/org/gjt/sp/jedit/io/EncodingWithBOM.java jEdit/trunk/org/gjt/sp/jedit/io/FavoritesVFS.java jEdit/trunk/org/gjt/sp/jedit/io/FileRootsVFS.java jEdit/trunk/org/gjt/sp/jedit/io/FileVFS.java jEdit/trunk/org/gjt/sp/jedit/io/RegexEncodingDetector.java jEdit/trunk/org/gjt/sp/jedit/io/VFS.java jEdit/trunk/org/gjt/sp/jedit/io/VFSManager.java jEdit/trunk/org/gjt/sp/jedit/jEdit.java jEdit/trunk/org/gjt/sp/jedit/manager/BufferManagerImpl.java jEdit/trunk/org/gjt/sp/jedit/manager/ViewManager.java jEdit/trunk/org/gjt/sp/jedit/manager/ViewManagerImpl.java jEdit/trunk/org/gjt/sp/jedit/menu/EnhancedMenuItem.java jEdit/trunk/org/gjt/sp/jedit/msg/BufferUpdate.java jEdit/trunk/org/gjt/sp/jedit/msg/DockableWindowUpdate.java jEdit/trunk/org/gjt/sp/jedit/msg/EditPaneUpdate.java jEdit/trunk/org/gjt/sp/jedit/msg/PluginUpdate.java jEdit/trunk/org/gjt/sp/jedit/msg/VFSUpdate.java jEdit/trunk/org/gjt/sp/jedit/msg/ViewUpdate.java jEdit/trunk/org/gjt/sp/jedit/options/StatusBarOptionPane.java jEdit/trunk/org/gjt/sp/jedit/pluginmgr/CachePluginList.java jEdit/trunk/org/gjt/sp/jedit/pluginmgr/RemotePluginList.java jEdit/trunk/org/gjt/sp/jedit/pluginmgr/Roster.java jEdit/trunk/org/gjt/sp/jedit/proto/jeditresource/PluginResURLConnection.java jEdit/trunk/org/gjt/sp/jedit/search/SearchDialog.java jEdit/trunk/org/gjt/sp/jedit/syntax/Chunk.java jEdit/trunk/org/gjt/sp/jedit/syntax/ParserRuleSet.java jEdit/trunk/org/gjt/sp/jedit/syntax/TokenMarker.java jEdit/trunk/org/gjt/sp/jedit/textarea/InputMethodSupport.java jEdit/trunk/org/gjt/sp/jedit/textarea/SelectionManager.java jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java jEdit/trunk/org/gjt/sp/util/AwtRunnableQueue.java jEdit/trunk/org/gjt/sp/util/IOUtilities.java jEdit/trunk/org/gjt/sp/util/ReverseCharSequence.java jEdit/trunk/org/gjt/sp/util/SegmentCharSequence.java jEdit/trunk/org/gjt/sp/util/StringList.java jEdit/trunk/org/jedit/io/Native2ASCIIEncoding.java Removed Paths: ------------- jEdit/trunk/org/jedit/annotation/ Modified: jEdit/trunk/README.SRC.txt =================================================================== --- jEdit/trunk/README.SRC.txt 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/README.SRC.txt 2023-11-17 01:31:50 UTC (rev 25698) @@ -173,6 +173,13 @@ * 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. Modified: jEdit/trunk/build.xml =================================================================== --- jEdit/trunk/build.xml 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/build.xml 2023-11-17 01:31:50 UTC (rev 25698) @@ -220,7 +220,7 @@ </target> <target name="compile" - depends="init"> + depends="init,retrieve"> <mkdir dir="${classes.dir}/core"/> <depend srcDir="${basedir}" destDir="${classes.dir}/core" @@ -239,6 +239,10 @@ 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> @@ -414,7 +418,7 @@ </target> <target name="compile-textArea" - depends="init,prepare-textArea"> + depends="init,retrieve,prepare-textArea"> <mkdir dir="${textAreaPackage}/build"/> <javac srcdir="${textAreaPackage}/src" destdir="${textAreaPackage}/build" @@ -426,6 +430,9 @@ 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> @@ -841,6 +848,7 @@ <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> Modified: jEdit/trunk/ivy.xml =================================================================== --- jEdit/trunk/ivy.xml 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/ivy.xml 2023-11-17 01:31:50 UTC (rev 25698) @@ -91,6 +91,8 @@ <dependency org="org.beanshell" name="bsh" rev="2.0b5" conf="scripting"/> <dependency org="org.bouncycastle" name="bcpg-jdk15on" rev="1.62" conf="scripting"/> + <dependency org="com.google.code.findbugs" name="jsr305" rev="3.0.2"/> + <dependency org="com.evolvedbinary.appbundler" name="appbundler" rev="1.0.4" conf="appbundler"/> </dependencies> </ivy-module> Modified: jEdit/trunk/org/gjt/sp/jedit/ActionSet.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/ActionSet.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/ActionSet.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -31,7 +31,7 @@ import org.jedit.keymap.Keymap; import org.gjt.sp.util.Log; -import org.jedit.annotation.Nonnull; +import javax.annotation.Nonnull; //}}} /** Modified: jEdit/trunk/org/gjt/sp/jedit/EditPane.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/EditPane.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/EditPane.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -30,8 +30,8 @@ import java.util.HashMap; import java.util.Map; -import org.jedit.annotation.Nonnull; -import org.jedit.annotation.Nullable; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; import javax.swing.*; import org.gjt.sp.jedit.EditBus.EBHandler; Modified: jEdit/trunk/org/gjt/sp/jedit/EditPlugin.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/EditPlugin.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/EditPlugin.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -26,7 +26,7 @@ import org.gjt.sp.jedit.menu.EnhancedMenu; import org.gjt.sp.util.Log; -import org.jedit.annotation.Nullable; +import javax.annotation.Nullable; import javax.swing.*; import java.io.*; Modified: jEdit/trunk/org/gjt/sp/jedit/GUIUtilities.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/GUIUtilities.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/GUIUtilities.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -44,7 +44,7 @@ import java.util.List; import java.lang.ref.SoftReference; -import org.jedit.annotation.Nonnull; +import javax.annotation.Nonnull; import javax.swing.Icon; import javax.swing.ImageIcon; import javax.swing.JButton; Modified: jEdit/trunk/org/gjt/sp/jedit/MiscUtilities.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/MiscUtilities.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/MiscUtilities.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -44,8 +44,8 @@ import org.gjt.sp.util.StandardUtilities; import org.gjt.sp.util.StringList; -import org.jedit.annotation.Nonnull; -import org.jedit.annotation.Nullable; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; //}}} /** Modified: jEdit/trunk/org/gjt/sp/jedit/PluginJAR.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/PluginJAR.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/PluginJAR.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -57,7 +57,7 @@ import java.util.zip.ZipEntry; import java.util.zip.ZipFile; -import org.jedit.annotation.Nonnull; +import javax.annotation.Nonnull; import javax.swing.SwingUtilities; import org.gjt.sp.jedit.browser.VFSBrowser; Modified: jEdit/trunk/org/gjt/sp/jedit/Registers.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/Registers.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/Registers.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -38,7 +38,7 @@ import org.gjt.sp.jedit.textarea.Selection; import org.gjt.sp.util.Log; -import org.jedit.annotation.Nullable; +import javax.annotation.Nullable; //}}} /** Modified: jEdit/trunk/org/gjt/sp/jedit/ServiceListHandler.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/ServiceListHandler.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/ServiceListHandler.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -32,7 +32,7 @@ import org.gjt.sp.util.XMLUtilities; -import org.jedit.annotation.Nullable; +import javax.annotation.Nullable; //}}} /** Modified: jEdit/trunk/org/gjt/sp/jedit/View.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/View.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/View.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -39,8 +39,8 @@ import java.util.List; import java.util.function.Consumer; -import org.jedit.annotation.Nonnull; -import org.jedit.annotation.Nullable; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; import javax.swing.JComponent; import javax.swing.JFrame; import javax.swing.JMenu; Modified: jEdit/trunk/org/gjt/sp/jedit/browser/VFSBrowser.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/browser/VFSBrowser.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/browser/VFSBrowser.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -26,7 +26,7 @@ import org.gjt.sp.jedit.EditBus.EBHandler; import org.gjt.sp.jedit.bsh.*; -import org.jedit.annotation.Nullable; +import javax.annotation.Nullable; import javax.swing.border.EmptyBorder; import javax.swing.event.*; import javax.swing.*; Modified: jEdit/trunk/org/gjt/sp/jedit/browser/VFSFileChooserDialog.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/browser/VFSFileChooserDialog.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/browser/VFSFileChooserDialog.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -23,7 +23,7 @@ package org.gjt.sp.jedit.browser; //{{{ Imports -import org.jedit.annotation.Nonnull; +import javax.annotation.Nonnull; import javax.swing.border.EmptyBorder; import javax.swing.*; import java.awt.BorderLayout; Modified: jEdit/trunk/org/gjt/sp/jedit/buffer/BufferSegment.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/buffer/BufferSegment.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/buffer/BufferSegment.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -21,7 +21,7 @@ package org.gjt.sp.jedit.buffer; -import org.jedit.annotation.Nonnull; +import javax.annotation.Nonnull; /** * A read-only text segment from a buffer. Allows concatenation using a Modified: jEdit/trunk/org/gjt/sp/jedit/buffer/JEditBuffer.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/buffer/JEditBuffer.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/buffer/JEditBuffer.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -37,7 +37,7 @@ import org.gjt.sp.util.Log; import org.gjt.sp.util.StandardUtilities; -import org.jedit.annotation.Nonnull; +import javax.annotation.Nonnull; import javax.swing.text.Position; import javax.swing.text.Segment; import java.util.*; Modified: jEdit/trunk/org/gjt/sp/jedit/buffer/PositionManager.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/buffer/PositionManager.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/buffer/PositionManager.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -23,7 +23,7 @@ package org.gjt.sp.jedit.buffer; //{{{ Imports -import org.jedit.annotation.Nonnull; +import javax.annotation.Nonnull; import javax.swing.text.Position; import java.util.*; import org.gjt.sp.util.Log; Modified: jEdit/trunk/org/gjt/sp/jedit/bufferset/BufferSet.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/bufferset/BufferSet.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/bufferset/BufferSet.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -32,7 +32,7 @@ import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; -import org.jedit.annotation.Nullable; +import javax.annotation.Nullable; //}}} /** An ordered list of buffers, normally attached to an EditPane Modified: jEdit/trunk/org/gjt/sp/jedit/gui/DefaultInputHandler.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/gui/DefaultInputHandler.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/gui/DefaultInputHandler.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -29,7 +29,7 @@ import org.gjt.sp.jedit.*; -import org.jedit.annotation.Nonnull; +import javax.annotation.Nonnull; //}}} /** The default input handler maps sequences of keystrokes into actions and inserts key typed events into the text area. Modified: jEdit/trunk/org/gjt/sp/jedit/gui/DockingLayoutManager.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/gui/DockingLayoutManager.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/gui/DockingLayoutManager.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -4,7 +4,7 @@ import java.util.Map; import java.util.Objects; -import org.jedit.annotation.Nonnull; +import javax.annotation.Nonnull; import javax.swing.JOptionPane; import org.gjt.sp.jedit.ActionSet; Modified: jEdit/trunk/org/gjt/sp/jedit/gui/ExtendedGridLayout.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/gui/ExtendedGridLayout.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/gui/ExtendedGridLayout.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -16,7 +16,7 @@ package org.gjt.sp.jedit.gui; -import org.jedit.annotation.Nonnull; +import javax.annotation.Nonnull; import java.awt.Component; import java.awt.Container; import java.awt.Dimension; Modified: jEdit/trunk/org/gjt/sp/jedit/gui/FilteredListModel.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/gui/FilteredListModel.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/gui/FilteredListModel.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -21,7 +21,7 @@ */ package org.gjt.sp.jedit.gui; -import org.jedit.annotation.Nullable; +import javax.annotation.Nullable; import javax.swing.*; import javax.swing.event.*; import java.util.*; Modified: jEdit/trunk/org/gjt/sp/jedit/gui/LogViewer.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/gui/LogViewer.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/gui/LogViewer.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -25,7 +25,7 @@ //{{{ Imports import java.awt.*; import java.awt.event.*; -import org.jedit.annotation.Nullable; +import javax.annotation.Nullable; import javax.swing.*; import javax.swing.border.EmptyBorder; import javax.swing.event.*; Modified: jEdit/trunk/org/gjt/sp/jedit/gui/PanelWindowContainer.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/gui/PanelWindowContainer.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/gui/PanelWindowContainer.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -45,7 +45,7 @@ import java.util.Comparator; import java.util.List; -import org.jedit.annotation.Nullable; +import javax.annotation.Nullable; import javax.swing.AbstractButton; import javax.swing.ButtonGroup; import javax.swing.Icon; Modified: jEdit/trunk/org/gjt/sp/jedit/gui/PingPongList.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/gui/PingPongList.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/gui/PingPongList.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -24,7 +24,7 @@ //{{{ Imports import org.gjt.sp.util.Log; -import org.jedit.annotation.Nonnull; +import javax.annotation.Nonnull; import javax.swing.*; import javax.swing.event.ListDataEvent; import javax.swing.event.ListDataListener; Modified: jEdit/trunk/org/gjt/sp/jedit/gui/StatusBar.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/gui/StatusBar.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/gui/StatusBar.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -34,7 +34,7 @@ import org.gjt.sp.util.TaskListener; import org.gjt.sp.util.TaskManager; -import org.jedit.annotation.Nullable; +import javax.annotation.Nullable; import javax.swing.*; import javax.swing.border.CompoundBorder; import javax.swing.border.EmptyBorder; Modified: jEdit/trunk/org/gjt/sp/jedit/input/AbstractInputHandler.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/input/AbstractInputHandler.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/input/AbstractInputHandler.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -29,8 +29,8 @@ import java.awt.event.KeyEvent; import java.util.Hashtable; import java.util.StringTokenizer; -import org.jedit.annotation.Nonnull; -import org.jedit.annotation.Nullable; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; import org.gjt.sp.jedit.JEditAbstractEditAction; import org.gjt.sp.jedit.gui.ShortcutPrefixActiveEvent; Modified: jEdit/trunk/org/gjt/sp/jedit/io/AutoDetection.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/io/AutoDetection.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/io/AutoDetection.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -34,7 +34,7 @@ import org.gjt.sp.jedit.bufferio.BufferIORequest; import org.gjt.sp.util.Log; -import org.jedit.annotation.Nullable; +import javax.annotation.Nullable; //}}} /** Modified: jEdit/trunk/org/gjt/sp/jedit/io/CharsetEncoding.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/io/CharsetEncoding.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/io/CharsetEncoding.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -31,7 +31,7 @@ import java.nio.charset.Charset; import java.nio.charset.CharsetDecoder; import java.nio.charset.CodingErrorAction; -import org.jedit.annotation.Nonnull; +import javax.annotation.Nonnull; //}}} /** Modified: jEdit/trunk/org/gjt/sp/jedit/io/CopyFileWorker.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/io/CopyFileWorker.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/io/CopyFileWorker.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -29,8 +29,8 @@ import java.util.Objects; import java.util.concurrent.CountDownLatch; -import org.jedit.annotation.Nonnull; -import org.jedit.annotation.Nullable; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; import org.gjt.sp.jedit.MiscUtilities; import org.gjt.sp.util.Log; Modified: jEdit/trunk/org/gjt/sp/jedit/io/Encoding.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/io/Encoding.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/io/Encoding.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -25,7 +25,7 @@ import java.io.OutputStream; import java.io.Reader; import java.io.Writer; -import org.jedit.annotation.Nonnull; +import javax.annotation.Nonnull; /** * An interface to represent an encoding. Modified: jEdit/trunk/org/gjt/sp/jedit/io/EncodingWithBOM.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/io/EncodingWithBOM.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/io/EncodingWithBOM.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -33,7 +33,7 @@ import java.util.Arrays; import java.util.HashMap; import java.util.Map; -import org.jedit.annotation.Nonnull; +import javax.annotation.Nonnull; //}}} /** Modified: jEdit/trunk/org/gjt/sp/jedit/io/FavoritesVFS.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/io/FavoritesVFS.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/io/FavoritesVFS.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -30,7 +30,7 @@ import org.gjt.sp.jedit.msg.DynamicMenuChanged; import org.gjt.sp.jedit.*; -import org.jedit.annotation.Nonnull; +import javax.annotation.Nonnull; //}}} /** Modified: jEdit/trunk/org/gjt/sp/jedit/io/FileRootsVFS.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/io/FileRootsVFS.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/io/FileRootsVFS.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -25,7 +25,7 @@ package org.gjt.sp.jedit.io; //{{{ Imports -import org.jedit.annotation.Nonnull; +import javax.annotation.Nonnull; import javax.swing.filechooser.FileSystemView; import java.awt.Component; import java.io.File; Modified: jEdit/trunk/org/gjt/sp/jedit/io/FileVFS.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/io/FileVFS.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/io/FileVFS.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -27,8 +27,8 @@ //{{{ Imports import java.io.Closeable; -import org.jedit.annotation.Nonnull; -import org.jedit.annotation.Nullable; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; import javax.swing.filechooser.FileSystemView; import javax.swing.*; Modified: jEdit/trunk/org/gjt/sp/jedit/io/RegexEncodingDetector.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/io/RegexEncodingDetector.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/io/RegexEncodingDetector.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -20,7 +20,7 @@ package org.gjt.sp.jedit.io; -import org.jedit.annotation.Nullable; +import javax.annotation.Nullable; import java.io.InputStream; import java.io.InputStreamReader; import java.io.IOException; Modified: jEdit/trunk/org/gjt/sp/jedit/io/VFS.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/io/VFS.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/io/VFS.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -44,8 +44,8 @@ import org.gjt.sp.util.Task; import org.gjt.sp.util.ThreadUtilities; -import org.jedit.annotation.Nonnull; -import org.jedit.annotation.Nullable; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; //}}} /** Modified: jEdit/trunk/org/gjt/sp/jedit/io/VFSManager.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/io/VFSManager.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/io/VFSManager.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -23,7 +23,7 @@ package org.gjt.sp.jedit.io; //{{{ Imports -import org.jedit.annotation.Nonnull; +import javax.annotation.Nonnull; import javax.swing.JOptionPane; import java.awt.Component; import java.awt.EventQueue; Modified: jEdit/trunk/org/gjt/sp/jedit/jEdit.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/jEdit.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/jEdit.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -40,8 +40,8 @@ import org.gjt.sp.jedit.View.ViewConfig; import org.gjt.sp.jedit.bsh.UtilEvalError; -import org.jedit.annotation.Nonnull; -import org.jedit.annotation.Nullable; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; import javax.swing.*; import java.awt.event.*; import java.io.*; Modified: jEdit/trunk/org/gjt/sp/jedit/manager/BufferManagerImpl.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/manager/BufferManagerImpl.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/manager/BufferManagerImpl.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -32,7 +32,7 @@ import org.gjt.sp.util.AwtRunnableQueue; import org.gjt.sp.util.StandardUtilities; -import org.jedit.annotation.GuardedBy; +import javax.annotation.concurrent.GuardedBy; import java.util.*; import java.util.function.Consumer; import java.util.function.Predicate; Modified: jEdit/trunk/org/gjt/sp/jedit/manager/ViewManager.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/manager/ViewManager.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/manager/ViewManager.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -23,7 +23,7 @@ import org.gjt.sp.jedit.View; -import org.jedit.annotation.Nullable; +import javax.annotation.Nullable; import java.util.List; import java.util.function.Consumer; Modified: jEdit/trunk/org/gjt/sp/jedit/manager/ViewManagerImpl.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/manager/ViewManagerImpl.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/manager/ViewManagerImpl.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -23,7 +23,7 @@ import org.gjt.sp.jedit.*; -import org.jedit.annotation.Nullable; +import javax.annotation.Nullable; import java.util.*; import java.util.function.Consumer; Modified: jEdit/trunk/org/gjt/sp/jedit/menu/EnhancedMenuItem.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/menu/EnhancedMenuItem.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/menu/EnhancedMenuItem.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -23,7 +23,7 @@ package org.gjt.sp.jedit.menu; //{{{ Imports -import org.jedit.annotation.Nullable; +import javax.annotation.Nullable; import javax.swing.*; import java.awt.*; import org.gjt.sp.jedit.*; Modified: jEdit/trunk/org/gjt/sp/jedit/msg/BufferUpdate.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/msg/BufferUpdate.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/msg/BufferUpdate.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -24,7 +24,7 @@ import org.gjt.sp.jedit.*; -import org.jedit.annotation.Nonnull; +import javax.annotation.Nonnull; import java.util.Objects; /** Modified: jEdit/trunk/org/gjt/sp/jedit/msg/DockableWindowUpdate.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/msg/DockableWindowUpdate.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/msg/DockableWindowUpdate.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -25,7 +25,7 @@ import org.gjt.sp.jedit.gui.DockableWindowManager; import org.gjt.sp.jedit.*; -import org.jedit.annotation.Nonnull; +import javax.annotation.Nonnull; import java.util.Objects; /** Modified: jEdit/trunk/org/gjt/sp/jedit/msg/EditPaneUpdate.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/msg/EditPaneUpdate.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/msg/EditPaneUpdate.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -21,7 +21,7 @@ import org.gjt.sp.jedit.*; -import org.jedit.annotation.Nonnull; +import javax.annotation.Nonnull; import java.util.Objects; /** Modified: jEdit/trunk/org/gjt/sp/jedit/msg/PluginUpdate.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/msg/PluginUpdate.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/msg/PluginUpdate.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -24,8 +24,8 @@ import java.io.File; import java.util.Objects; -import org.jedit.annotation.Nonnull; -import org.jedit.annotation.Nullable; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; import org.gjt.sp.jedit.*; Modified: jEdit/trunk/org/gjt/sp/jedit/msg/VFSUpdate.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/msg/VFSUpdate.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/msg/VFSUpdate.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -21,7 +21,7 @@ import org.gjt.sp.jedit.*; -import org.jedit.annotation.Nonnull; +import javax.annotation.Nonnull; import java.util.Objects; /** Modified: jEdit/trunk/org/gjt/sp/jedit/msg/ViewUpdate.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/msg/ViewUpdate.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/msg/ViewUpdate.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -24,7 +24,7 @@ import org.gjt.sp.jedit.*; -import org.jedit.annotation.Nonnull; +import javax.annotation.Nonnull; import java.util.Objects; /** Modified: jEdit/trunk/org/gjt/sp/jedit/options/StatusBarOptionPane.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/options/StatusBarOptionPane.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/options/StatusBarOptionPane.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -33,7 +33,7 @@ import org.gjt.sp.jedit.gui.statusbar.Widget; import org.gjt.sp.jedit.jEdit; -import org.jedit.annotation.Nonnull; +import javax.annotation.Nonnull; import javax.swing.*; import javax.swing.border.EmptyBorder; import javax.swing.table.AbstractTableModel; Modified: jEdit/trunk/org/gjt/sp/jedit/pluginmgr/CachePluginList.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/pluginmgr/CachePluginList.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/pluginmgr/CachePluginList.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -24,7 +24,7 @@ import org.gjt.sp.jedit.jEdit; import org.gjt.sp.util.Log; -import org.jedit.annotation.Nullable; +import javax.annotation.Nullable; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; Modified: jEdit/trunk/org/gjt/sp/jedit/pluginmgr/RemotePluginList.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/pluginmgr/RemotePluginList.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/pluginmgr/RemotePluginList.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -27,7 +27,7 @@ import org.gjt.sp.util.ProgressObserver; import org.jedit.io.HttpException; -import org.jedit.annotation.Nonnull; +import javax.annotation.Nonnull; import java.io.BufferedInputStream; import java.io.ByteArrayInputStream; import java.io.IOException; Modified: jEdit/trunk/org/gjt/sp/jedit/pluginmgr/Roster.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/pluginmgr/Roster.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/pluginmgr/Roster.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -23,7 +23,7 @@ package org.gjt.sp.jedit.pluginmgr; //{{{ Imports -import org.jedit.annotation.Nonnull; +import javax.annotation.Nonnull; import javax.swing.SwingUtilities; import java.awt.Component; import java.io.*; Modified: jEdit/trunk/org/gjt/sp/jedit/proto/jeditresource/PluginResURLConnection.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/proto/jeditresource/PluginResURLConnection.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/proto/jeditresource/PluginResURLConnection.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -31,7 +31,7 @@ import java.net.URL; import java.net.URLConnection; -import org.jedit.annotation.Nonnull; +import javax.annotation.Nonnull; import org.gjt.sp.jedit.MiscUtilities; import org.gjt.sp.jedit.PluginJAR; Modified: jEdit/trunk/org/gjt/sp/jedit/search/SearchDialog.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/search/SearchDialog.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/search/SearchDialog.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -23,7 +23,7 @@ package org.gjt.sp.jedit.search; //{{{ Imports -import org.jedit.annotation.Nonnull; +import javax.annotation.Nonnull; import javax.swing.border.*; import javax.swing.*; Modified: jEdit/trunk/org/gjt/sp/jedit/syntax/Chunk.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/syntax/Chunk.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/syntax/Chunk.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -24,8 +24,8 @@ package org.gjt.sp.jedit.syntax; //{{{ Imports -import org.jedit.annotation.Nonnull; -import org.jedit.annotation.Nullable; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; import javax.swing.text.*; import java.awt.font.*; import java.awt.geom.*; Modified: jEdit/trunk/org/gjt/sp/jedit/syntax/ParserRuleSet.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/syntax/ParserRuleSet.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/syntax/ParserRuleSet.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -24,7 +24,7 @@ package org.gjt.sp.jedit.syntax; //{{{ Imports -import org.jedit.annotation.Nonnull; +import javax.annotation.Nonnull; import java.lang.reflect.Array; import java.util.*; import java.util.regex.Pattern; Modified: jEdit/trunk/org/gjt/sp/jedit/syntax/TokenMarker.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/syntax/TokenMarker.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/syntax/TokenMarker.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -24,7 +24,7 @@ package org.gjt.sp.jedit.syntax; //{{{ Imports -import org.jedit.annotation.Nonnull; +import javax.annotation.Nonnull; import javax.swing.text.Segment; import java.lang.ref.WeakReference; import java.util.*; Modified: jEdit/trunk/org/gjt/sp/jedit/textarea/InputMethodSupport.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/textarea/InputMethodSupport.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/textarea/InputMethodSupport.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -24,7 +24,7 @@ package org.gjt.sp.jedit.textarea; // {{{ Imports -import org.jedit.annotation.Nonnull; +import javax.annotation.Nonnull; import java.awt.geom.Rectangle2D; import java.text.AttributedString; import java.text.AttributedCharacterIterator; Modified: jEdit/trunk/org/gjt/sp/jedit/textarea/SelectionManager.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/textarea/SelectionManager.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/textarea/SelectionManager.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -24,7 +24,7 @@ //{{{ Imports import java.util.*; -import org.jedit.annotation.Nonnull; +import javax.annotation.Nonnull; import org.gjt.sp.jedit.buffer.*; //}}} Modified: jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -28,7 +28,7 @@ import java.text.BreakIterator; import java.text.CharacterIterator; -import org.jedit.annotation.Nonnull; +import javax.annotation.Nonnull; import javax.swing.*; import javax.swing.Timer; import javax.swing.event.*; Modified: jEdit/trunk/org/gjt/sp/util/AwtRunnableQueue.java =================================================================== --- jEdit/trunk/org/gjt/sp/util/AwtRunnableQueue.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/util/AwtRunnableQueue.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -25,8 +25,8 @@ import java.awt.EventQueue; import java.util.LinkedList; -import org.jedit.annotation.GuardedBy; -import org.jedit.annotation.ThreadSafe; +import javax.annotation.concurrent.GuardedBy; +import javax.annotation.concurrent.ThreadSafe; /** * A queue for runnables that should run in the EDT after all pending Modified: jEdit/trunk/org/gjt/sp/util/IOUtilities.java =================================================================== --- jEdit/trunk/org/gjt/sp/util/IOUtilities.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/util/IOUtilities.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -25,7 +25,7 @@ import java.io.*; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; -import org.jedit.annotation.Nullable; +import javax.annotation.Nullable; /** * IO tools that depend on JDK only. Modified: jEdit/trunk/org/gjt/sp/util/ReverseCharSequence.java =================================================================== --- jEdit/trunk/org/gjt/sp/util/ReverseCharSequence.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/util/ReverseCharSequence.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -20,7 +20,7 @@ package org.gjt.sp.util; -import org.jedit.annotation.Nonnull; +import javax.annotation.Nonnull; /** * Reversed view of a given CharSequence. Modified: jEdit/trunk/org/gjt/sp/util/SegmentCharSequence.java =================================================================== --- jEdit/trunk/org/gjt/sp/util/SegmentCharSequence.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/util/SegmentCharSequence.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -21,7 +21,7 @@ package org.gjt.sp.util; import java.io.Serializable; -import org.jedit.annotation.Nonnull; +import javax.annotation.Nonnull; import javax.swing.text.Segment; /** Modified: jEdit/trunk/org/gjt/sp/util/StringList.java =================================================================== --- jEdit/trunk/org/gjt/sp/util/StringList.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/gjt/sp/util/StringList.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -22,7 +22,7 @@ package org.gjt.sp.util; //{{{ imports -import org.jedit.annotation.Nonnull; +import javax.annotation.Nonnull; import java.util.ArrayList; import java.util.Collection; //}}} Modified: jEdit/trunk/org/jedit/io/Native2ASCIIEncoding.java =================================================================== --- jEdit/trunk/org/jedit/io/Native2ASCIIEncoding.java 2023-10-14 11:42:01 UTC (rev 25697) +++ jEdit/trunk/org/jedit/io/Native2ASCIIEncoding.java 2023-11-17 01:31:50 UTC (rev 25698) @@ -35,8 +35,8 @@ import java.nio.charset.CharsetEncoder; import java.nio.charset.MalformedInputException; import java.nio.charset.StandardCharsets; -import org.jedit.annotation.Nonnull; -import org.jedit.annotation.Nullable; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; import org.gjt.sp.jedit.io.CharsetEncoding; import org.gjt.sp.jedit.io.Encoding; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vam...@us...> - 2023-10-14 11:42:04
|
Revision: 25697 http://sourceforge.net/p/jedit/svn/25697 Author: vampire0 Date: 2023-10-14 11:42:01 +0000 (Sat, 14 Oct 2023) Log Message: ----------- Make BeanShell behave consistent and remove the need for reflection when defining classes (#4118) Modified Paths: -------------- jEdit/trunk/doc/CHANGES.txt jEdit/trunk/org/gjt/sp/jedit/bsh/Capabilities.java jEdit/trunk/org/gjt/sp/jedit/bsh/ClassGeneratorImpl.java jEdit/trunk/org/gjt/sp/jedit/bsh/LHS.java jEdit/trunk/org/gjt/sp/jedit/bsh/Reflect.java Removed Paths: ------------- jEdit/trunk/org/gjt/sp/jedit/bsh/reflect/ Modified: jEdit/trunk/doc/CHANGES.txt =================================================================== --- jEdit/trunk/doc/CHANGES.txt 2023-10-13 21:05:09 UTC (rev 25696) +++ jEdit/trunk/doc/CHANGES.txt 2023-10-14 11:42:01 UTC (rev 25697) @@ -9,6 +9,12 @@ {{{ Bug Fixes +- BeanShell snippets and macros now work consistently and not suddenly change + behaviour anymore just because some BeanShell snippet defined a class. + This now disables reflective access to otherwise inaccessible fields through + simple syntax though, that used to work after a snippet with a class + definition was loaded. (#4118 - Björn Kautler) + - Fix the installation of plugins trying to use invalid file names (Björn Kautler) Modified: jEdit/trunk/org/gjt/sp/jedit/bsh/Capabilities.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/bsh/Capabilities.java 2023-10-13 21:05:09 UTC (rev 25696) +++ jEdit/trunk/org/gjt/sp/jedit/bsh/Capabilities.java 2023-10-14 11:42:01 UTC (rev 25697) @@ -7,7 +7,7 @@ * * * The contents of this file are subject to the Sun Public License Version * * 1.0 (the "License"); you may not use this file except in compliance with * - * the License. A copy of the License is available at http://www.sun.com * + * the License. A copy of the License is available at http://www.sun.com * * * * The Original Code is BeanShell. The Initial Developer of the Original * * Code is Pat Niemeyer. Portions created by Pat Niemeyer are Copyright * @@ -42,12 +42,12 @@ This class should be independent of all other bsh classes! <p> - Note that tests for class existence here do *not* use the - BshClassManager, as it may require other optional class files to be - loaded. + Note that tests for class existence here do *not* use the + BshClassManager, as it may require other optional class files to be + loaded. */ @SuppressWarnings("unchecked") -public class Capabilities +public class Capabilities { private static boolean accessibility = false; @@ -65,38 +65,22 @@ If accessibility is enabled determine if the accessibility mechanism exists and if we have the optional bsh package to use it. - Note that even if both are true it does not necessarily mean that we + Note that even if both are true it does not necessarily mean that we have runtime permission to access the fields... Java security has a say in it. @see org.gjt.sp.jedit.bsh.ReflectManager */ - public static boolean haveAccessibility() + public static boolean haveAccessibility() { return accessibility; } - public static void setAccessibility( boolean b ) + public static void setAccessibility( boolean b ) throws Unavailable - { - if ( b == false ) - { - accessibility = false; - return; - } - - if ( !classExists( "java.lang.reflect.AccessibleObject" ) - || !classExists("org.gjt.sp.jedit.bsh.reflect.ReflectManagerImpl") - ) - throw new Unavailable( "Accessibility unavailable" ); - - // test basic access - try { - String.class.getDeclaredMethods(); - } catch ( SecurityException e ) { - throw new Unavailable("Accessibility unavailable: "+e); - } - - accessibility = true; + { + if (b) + throw new Unavailable("Accessibility unavailable"); + accessibility = false; } private static Hashtable classes = new Hashtable(); @@ -105,11 +89,11 @@ We should not use BshClassManager here because: a) the systems using these tests would probably not load the classes through it anyway. - b) bshclassmanager is heavy and touches other class files. + b) bshclassmanager is heavy and touches other class files. this capabilities code must be light enough to be used by any system **including the remote applet**. */ - public static boolean classExists( String name ) + public static boolean classExists( String name ) { Object c = classes.get( name ); @@ -116,7 +100,7 @@ if ( c == null ) { try { /* - Note: do *not* change this to + Note: do *not* change this to BshClassManager plainClassForName() or equivalent. This class must not touch any other bsh classes. */ @@ -140,5 +124,3 @@ public Unavailable(String s ){ super(s); } } } - - Modified: jEdit/trunk/org/gjt/sp/jedit/bsh/ClassGeneratorImpl.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/bsh/ClassGeneratorImpl.java 2023-10-13 21:05:09 UTC (rev 25696) +++ jEdit/trunk/org/gjt/sp/jedit/bsh/ClassGeneratorImpl.java 2023-10-14 11:42:01 UTC (rev 25697) @@ -6,16 +6,16 @@ import java.lang.reflect.Method; /** - + @author Pat Niemeyer (pa...@pa...) */ @SuppressWarnings("unchecked") public class ClassGeneratorImpl extends ClassGenerator { - public Class generateClass( - String name, Modifiers modifiers, - Class [] interfaces, Class superClass, BSHBlock block, - boolean isInterface, CallStack callstack, Interpreter interpreter + public Class generateClass( + String name, Modifiers modifiers, + Class [] interfaces, Class superClass, BSHBlock block, + boolean isInterface, CallStack callstack, Interpreter interpreter ) throws EvalError { @@ -39,10 +39,10 @@ Note: This method will likely be removed in the future. */ // This could be static - public void setInstanceNameSpaceParent( + public void setInstanceNameSpaceParent( Object instance, String className, NameSpace parent ) { - This ithis = + This ithis = ClassGeneratorUtil.getClassInstanceThis( instance, className ); ithis.getNameSpace().setParent( parent ); } @@ -51,29 +51,18 @@ Parse the BSHBlock for for the class definition and generate the class using ClassGenerator. */ - public static Class generateClassImpl( - String name, Modifiers modifiers, - Class [] interfaces, Class superClass, BSHBlock block, - boolean isInterface, CallStack callstack, Interpreter interpreter + public static Class generateClassImpl( + String name, Modifiers modifiers, + Class [] interfaces, Class superClass, BSHBlock block, + boolean isInterface, CallStack callstack, Interpreter interpreter ) throws EvalError { - // Scripting classes currently requires accessibility - // This can be eliminated with a bit more work. - try { - Capabilities.setAccessibility( true ); - } catch ( Capabilities.Unavailable e ) - { - throw new EvalError( - "Defining classes currently requires reflective Accessibility.", - block, callstack ); - } - NameSpace enclosingNameSpace = callstack.top(); String packageName = enclosingNameSpace.getPackage(); - String className = enclosingNameSpace.isClass ? + String className = enclosingNameSpace.isClass ? ( enclosingNameSpace.getName()+"$"+name ) : name; - String fqClassName = + String fqClassName = packageName == null ? className : packageName + "." + className; BshClassManager bcm = interpreter.getClassManager(); @@ -81,26 +70,26 @@ bcm.definingClass( fqClassName ); // Create the class static namespace - NameSpace classStaticNameSpace = + NameSpace classStaticNameSpace = new NameSpace( enclosingNameSpace, className); classStaticNameSpace.isClass = true; callstack.push( classStaticNameSpace ); - // Evaluate any inner class class definitions in the block + // Evaluate any inner class class definitions in the block // effectively recursively call this method for contained classes first - block.evalBlock( - callstack, interpreter, true/*override*/, + block.evalBlock( + callstack, interpreter, true/*override*/, ClassNodeFilter.CLASSCLASSES ); // Generate the type for our class - Variable [] variables = + Variable [] variables = getDeclaredVariables( block, callstack, interpreter, packageName ); DelayedEvalBshMethod [] methods = getDeclaredMethods( block, callstack, interpreter, packageName ); - ClassGeneratorUtil classGenerator = new ClassGeneratorUtil( - modifiers, className, packageName, superClass, interfaces, + ClassGeneratorUtil classGenerator = new ClassGeneratorUtil( + modifiers, className, packageName, superClass, interfaces, variables, methods, classStaticNameSpace, isInterface ); byte [] code = classGenerator.generateClass(); @@ -108,7 +97,7 @@ String dir = System.getProperty("debugClasses"); if ( dir != null ) try { - FileOutputStream out= + FileOutputStream out= new FileOutputStream( dir+"/"+className+".class" ); out.write(code); out.close(); @@ -121,7 +110,7 @@ enclosingNameSpace.importClass( fqClassName.replace('$','.') ); try { - classStaticNameSpace.setLocalVariable( + classStaticNameSpace.setLocalVariable( ClassGeneratorUtil.BSHINIT, block, false/*strictJava*/ ); } catch ( UtilEvalError e ) { throw new InterpreterError("unable to init static: "+e ); @@ -132,8 +121,8 @@ classStaticNameSpace.setClassStatic( genClass ); // evaluate the static portion of the block in the static space - block.evalBlock( - callstack, interpreter, true/*override*/, + block.evalBlock( + callstack, interpreter, true/*override*/, ClassNodeFilter.CLASSSTATIC ); callstack.pop(); @@ -140,11 +129,11 @@ if ( !genClass.isInterface() ) { - // Set the static bsh This callback + // Set the static bsh This callback String bshStaticFieldName = ClassGeneratorUtil.BSHSTATIC+className; try { LHS lhs = Reflect.getLHSStaticField( genClass, bshStaticFieldName ); - lhs.assign( + lhs.assign( classStaticNameSpace.getThis( interpreter ), false/*strict*/ ); } catch ( Exception e ) { throw new InterpreterError("Error in class gen setup: "+e ); @@ -155,10 +144,10 @@ return genClass; } - static Variable [] getDeclaredVariables( - BSHBlock body, CallStack callstack, Interpreter interpreter, - String defaultPackage - ) + static Variable [] getDeclaredVariables( + BSHBlock body, CallStack callstack, Interpreter interpreter, + String defaultPackage + ) { List vars = new ArrayList(); for( int child=0; child<body.jjtGetNumChildren(); child++ ) @@ -166,11 +155,11 @@ SimpleNode node = (SimpleNode)body.jjtGetChild(child); if ( node instanceof BSHTypedVariableDeclaration ) { - BSHTypedVariableDeclaration tvd = + BSHTypedVariableDeclaration tvd = (BSHTypedVariableDeclaration)node; Modifiers modifiers = tvd.modifiers; - String type = tvd.getTypeDescriptor( + String type = tvd.getTypeDescriptor( callstack, interpreter, defaultPackage ); BSHVariableDeclarator [] vardec = tvd.getDeclarators(); @@ -178,7 +167,7 @@ { String name = vardec[i].name; try { - Variable var = new Variable( + Variable var = new Variable( name, type, null/*value*/, modifiers ); vars.add( var ); } catch ( UtilEvalError e ) { @@ -191,9 +180,9 @@ return (Variable [])vars.toArray( new Variable[0] ); } - static DelayedEvalBshMethod [] getDeclaredMethods( + static DelayedEvalBshMethod [] getDeclaredMethods( BSHBlock body, CallStack callstack, Interpreter interpreter, - String defaultPackage + String defaultPackage ) throws EvalError { @@ -207,20 +196,20 @@ md.insureNodesParsed(); Modifiers modifiers = md.modifiers; String name = md.name; - String returnType = md.getReturnTypeDescriptor( + String returnType = md.getReturnTypeDescriptor( callstack, interpreter, defaultPackage ); BSHReturnType returnTypeNode = md.getReturnTypeNode(); BSHFormalParameters paramTypesNode = md.paramsNode; - String [] paramTypes = paramTypesNode.getTypeDescriptors( + String [] paramTypes = paramTypesNode.getTypeDescriptors( callstack, interpreter, defaultPackage ); - DelayedEvalBshMethod bm = new DelayedEvalBshMethod( - name, + DelayedEvalBshMethod bm = new DelayedEvalBshMethod( + name, returnType, returnTypeNode, - md.paramsNode.getParamNames(), + md.paramsNode.getParamNames(), paramTypes, paramTypesNode, md.blockNode, null/*declaringNameSpace*/, - modifiers, callstack, interpreter + modifiers, callstack, interpreter ); methods.add( bm ); @@ -227,24 +216,24 @@ } } - return (DelayedEvalBshMethod [])methods.toArray( + return (DelayedEvalBshMethod [])methods.toArray( new DelayedEvalBshMethod[0] ); } /** - A node filter that filters nodes for either a class body static - initializer or instance initializer. In the static case only static - members are passed, etc. + A node filter that filters nodes for either a class body static + initializer or instance initializer. In the static case only static + members are passed, etc. */ static class ClassNodeFilter implements BSHBlock.NodeFilter { public static final int STATIC=0, INSTANCE=1, CLASSES=2; - public static ClassNodeFilter CLASSSTATIC = + public static ClassNodeFilter CLASSSTATIC = new ClassNodeFilter( STATIC ); - public static ClassNodeFilter CLASSINSTANCE = + public static ClassNodeFilter CLASSINSTANCE = new ClassNodeFilter( INSTANCE ); - public static ClassNodeFilter CLASSCLASSES = + public static ClassNodeFilter CLASSCLASSES = new ClassNodeFilter( CLASSES ); int context; @@ -251,7 +240,7 @@ private ClassNodeFilter( int context ) { this.context = context; } - public boolean isVisible( SimpleNode node ) + public boolean isVisible( SimpleNode node ) { if ( context == CLASSES ) return node instanceof BSHClassDeclaration; @@ -270,7 +259,7 @@ return true; } - boolean isStatic( SimpleNode node ) + boolean isStatic( SimpleNode node ) { if ( node instanceof BSHTypedVariableDeclaration ) return ((BSHTypedVariableDeclaration)node).modifiers != null @@ -296,7 +285,7 @@ throws UtilEvalError, ReflectError, InvocationTargetException { String superName = ClassGeneratorUtil.BSHSUPER+methodName; - + // look for the specially named super delegate method Class clas = instance.getClass(); Method superMethod = Reflect.resolveJavaMethod( @@ -309,7 +298,7 @@ // could be a superfluous "super." which is legal. Class superClass = clas.getSuperclass(); superMethod = Reflect.resolveExpectedJavaMethod( - bcm, superClass, instance, methodName, args, + bcm, superClass, instance, methodName, args, false/*onlyStatic*/ ); return Reflect.invokeMethod( superMethod, instance, args ); } Modified: jEdit/trunk/org/gjt/sp/jedit/bsh/LHS.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/bsh/LHS.java 2023-10-13 21:05:09 UTC (rev 25696) +++ jEdit/trunk/org/gjt/sp/jedit/bsh/LHS.java 2023-10-14 11:42:01 UTC (rev 25697) @@ -7,7 +7,7 @@ * * * The contents of this file are subject to the Sun Public License Version * * 1.0 (the "License"); you may not use this file except in compliance with * - * the License. A copy of the License is available at http://www.sun.com * + * the License. A copy of the License is available at http://www.sun.com * * * * The Original Code is BeanShell. The Initial Developer of the Original * * Code is Pat Niemeyer. Portions created by Pat Niemeyer are Copyright * @@ -37,14 +37,14 @@ import java.lang.reflect.Field; /** - An LHS is a wrapper for an variable, field, or property. It ordinarily - holds the "left hand side" of an assignment and may be either resolved to + An LHS is a wrapper for an variable, field, or property. It ordinarily + holds the "left hand side" of an assignment and may be either resolved to a value or assigned a value. <p> - + There is one special case here termed METHOD_EVAL where the LHS is used in an intermediate evaluation of a chain of suffixes and wraps a method - invocation. In this case it may only be resolved to a value and cannot be + invocation. In this case it may only be resolved to a value and cannot be assigned. (You can't assign a value to the result of a method call e.g. "foo() = 5;"). <p> @@ -186,7 +186,7 @@ /** Assign a value to the LHS. */ - public Object assign( Object val, boolean strictJava ) + public Object assign( Object val, boolean strictJava ) throws UtilEvalError { if ( type == VARIABLE ) @@ -196,27 +196,26 @@ nameSpace.setLocalVariable( varName, val, strictJava ); else nameSpace.setVariable( varName, val, strictJava ); - } else + } else if ( type == FIELD ) { try { - Object fieldVal = val instanceof Primitive ? + Object fieldVal = val instanceof Primitive ? ((Primitive)val).getValue() : val; - // This should probably be in Reflect.java - ReflectManager.RMSetAccessible( field ); + Reflect.setAccessible( field ); field.set( object, fieldVal ); return val; } - catch( NullPointerException e) { + catch( NullPointerException e) { throw new UtilEvalError( "LHS ("+field.getName()+") not a static field."); - } - catch( IllegalAccessException e2) { + } + catch( IllegalAccessException e2) { throw new UtilEvalError( "LHS ("+field.getName()+") can't access field: "+e2); - } - catch( IllegalArgumentException e3) + } + catch( IllegalArgumentException e3) { String type = val instanceof Primitive ? ((Primitive)val).getType().getName() @@ -226,7 +225,7 @@ + " not assignable to field "+field.getName()); } } - else + else if ( type == PROPERTY ) { /* @@ -244,7 +243,7 @@ Interpreter.debug("Assignment: " + e.getMessage()); throw new UtilEvalError("No such property: " + propName); } - } else + } else if ( type == INDEX ) try { Reflect.setIndex(object, index, val); @@ -259,7 +258,7 @@ return val; } - public String toString() { + public String toString() { return "LHS: " +((field!=null)? "field = "+field.toString():"") +(varName!=null ? " varName = "+varName: "") @@ -266,4 +265,3 @@ +(nameSpace!=null ? " nameSpace = "+nameSpace.toString(): ""); } } - Modified: jEdit/trunk/org/gjt/sp/jedit/bsh/Reflect.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/bsh/Reflect.java 2023-10-13 21:05:09 UTC (rev 25696) +++ jEdit/trunk/org/gjt/sp/jedit/bsh/Reflect.java 2023-10-14 11:42:01 UTC (rev 25697) @@ -7,7 +7,7 @@ * * * The contents of this file are subject to the Sun Public License Version * * 1.0 (the "License"); you may not use this file except in compliance with * - * the License. A copy of the License is available at http://www.sun.com * + * the License. A copy of the License is available at http://www.sun.com * * * * The Original Code is BeanShell. The Initial Developer of the Original * * Code is Pat Niemeyer. Portions created by Pat Niemeyer are Copyright * @@ -45,11 +45,11 @@ Note: This class is messy. The method and field resolution need to be rewritten. Various methods in here catch NoSuchMethod or NoSuchField exceptions during their searches. These should be rewritten to avoid - having to catch the exceptions. Method lookups are now cached at a high + having to catch the exceptions. Method lookups are now cached at a high level so they are less important, however the logic is messy. */ @SuppressWarnings("unchecked") -class Reflect +class Reflect { /** Invoke method on arbitrary object instance. @@ -58,13 +58,13 @@ @return the result of the method call */ public static Object invokeObjectMethod( - Object object, String methodName, Object[] args, - Interpreter interpreter, CallStack callstack, SimpleNode callerInfo ) + Object object, String methodName, Object[] args, + Interpreter interpreter, CallStack callstack, SimpleNode callerInfo ) throws ReflectError, EvalError, InvocationTargetException { // Bsh scripted object if ( object instanceof This && !This.isExposedThisMethod(methodName) ) - return ((This)object).invokeMethod( + return ((This)object).invokeMethod( methodName, args, interpreter, callstack, callerInfo, false/*delcaredOnly*/ ); @@ -84,9 +84,9 @@ } } - /** + /** Invoke a method known to be static. - No object instance is needed and there is no possibility of the + No object instance is needed and there is no possibility of the method being a bsh scripted method. */ public static Object invokeStaticMethod( @@ -94,7 +94,7 @@ throws ReflectError, UtilEvalError, InvocationTargetException { Interpreter.debug("invoke static Method"); - Method method = resolveExpectedJavaMethod( + Method method = resolveExpectedJavaMethod( bcm, clas, null, methodName, args, true ); return invokeMethod( method, null, args ); } @@ -105,7 +105,7 @@ @param args may be null */ static Object invokeMethod( - Method method, Object object, Object[] args ) + Method method, Object object, Object[] args ) throws ReflectError, InvocationTargetException { if ( args == null ) @@ -139,9 +139,9 @@ return Primitive.wrap( returnValue, returnType ); } catch( IllegalAccessException e ) { - throw new ReflectError( "Cannot access method " + throw new ReflectError( "Cannot access method " + StringUtil.methodString( - method.getName(), method.getParameterTypes() ) + method.getName(), method.getParameterTypes() ) + " in '" + method.getDeclaringClass() + "' :" + e ); } } @@ -149,7 +149,7 @@ public static Object getIndex(Object array, int index) throws ReflectError, UtilTargetError { - if ( Interpreter.DEBUG ) + if ( Interpreter.DEBUG ) Interpreter.debug("getIndex: "+array+", index="+index); try { Object val = Array.get(array, index); @@ -172,7 +172,7 @@ catch( ArrayStoreException e2 ) { throw new UtilTargetError( e2 ); } catch( IllegalArgumentException e1 ) { - throw new UtilTargetError( + throw new UtilTargetError( new ArrayStoreException( e1.toString() ) ); } catch(Exception e) { throw new ReflectError("Array access:" + e); @@ -210,7 +210,7 @@ static LHS getLHSStaticField(Class clas, String fieldName) throws UtilEvalError, ReflectError { - Field f = resolveExpectedJavaField( + Field f = resolveExpectedJavaField( clas, fieldName, true/*onlystatic*/); return new LHS(f); } @@ -228,15 +228,15 @@ { // I guess this is when we pass it as an argument? // Setting locally - boolean recurse = false; + boolean recurse = false; return new LHS( ((This)object).namespace, fieldName, recurse ); } try { - Field f = resolveExpectedJavaField( + Field f = resolveExpectedJavaField( object.getClass(), fieldName, false/*staticOnly*/ ); return new LHS(object, f); - } catch ( ReflectError e ) + } catch ( ReflectError e ) { // not a field, try property access if ( hasObjectPropertySetter( object.getClass(), fieldName ) ) @@ -271,13 +271,13 @@ unecessarily. This is just a temporary impl. @return the field or null if not found */ - protected static Field resolveJavaField( + protected static Field resolveJavaField( Class clas, String fieldName, boolean staticOnly ) throws UtilEvalError { try { return resolveExpectedJavaField( clas, fieldName, staticOnly ); - } catch ( ReflectError e ) { + } catch ( ReflectError e ) { return null; } } @@ -289,7 +289,7 @@ Note: this should really just throw NoSuchFieldException... need to change related signatures and code. */ - protected static Field resolveExpectedJavaField( + protected static Field resolveExpectedJavaField( Class clas, String fieldName, boolean staticOnly ) throws UtilEvalError, ReflectError @@ -305,7 +305,7 @@ catch( NoSuchFieldException e) { throw new ReflectError("No such field: " + fieldName ); } catch ( SecurityException e ) { - throw new UtilTargetError( + throw new UtilTargetError( "Security Exception while searching fields of: "+clas, e ); } @@ -320,13 +320,13 @@ /** Used when accessibility capability is available to locate an occurrance - of the field in the most derived class or superclass and set its + of the field in the most derived class or superclass and set its accessibility flag. Note that this method is not needed in the simple non accessible case because we don't have to hunt for fields. - Note that classes may declare overlapping private fields, so the + Note that classes may declare overlapping private fields, so the distinction about the most derived is important. Java doesn't normally - allow this kind of access (super won't show private variables) so + allow this kind of access (super won't show private variables) so there is no real syntax for specifying which class scope to use... @return the Field or throws NoSuchFieldException @@ -336,7 +336,7 @@ This method should be rewritten to use getFields() and avoid catching exceptions during the search. */ - private static Field findAccessibleField( Class clas, String fieldName ) + private static Field findAccessibleField( Class clas, String fieldName ) throws UtilEvalError, NoSuchFieldException { Field field; @@ -370,7 +370,7 @@ result. If the method is not found it throws a descriptive ReflectError. */ protected static Method resolveExpectedJavaMethod( - BshClassManager bcm, Class clas, Object object, + BshClassManager bcm, Class clas, Object object, String name, Object[] args, boolean staticOnly ) throws ReflectError, UtilEvalError { @@ -406,11 +406,11 @@ flag on the method as necessary. <p/> - If, when directed to find a static method, this method locates a more - specific matching instance method it will throw a descriptive exception + If, when directed to find a static method, this method locates a more + specific matching instance method it will throw a descriptive exception analogous to the error that the Java compiler would produce. Note: as of 2.0.x this is a problem because there is no way to work - around this with a cast. + around this with a cast. <p/> @param staticOnly @@ -418,7 +418,7 @@ @return the method or null if no matching method was found. */ protected static Method resolveJavaMethod( - BshClassManager bcm, Class clas, String name, + BshClassManager bcm, Class clas, String name, Class [] types, boolean staticOnly ) throws UtilEvalError { @@ -427,7 +427,7 @@ // Lookup previously cached method Method method = null; - if ( bcm == null ) + if ( bcm == null ) Interpreter.debug("resolveJavaMethod UNOPTIMIZED lookup"); else method = bcm.getResolvedMethod( clas, name, types, staticOnly ); @@ -439,7 +439,7 @@ try { method = findOverloadedMethod( clas, name, types, publicOnly ); } catch ( SecurityException e ) { - throw new UtilTargetError( + throw new UtilTargetError( "Security Exception while searching methods of: "+clas, e ); } @@ -913,7 +913,14 @@ } } - private static void logInvokeMethod( + public static void setAccessible(Member member) + throws Capabilities.Unavailable + { + if (!isPublic(member)) + ReflectManager.RMSetAccessible( member ); + } + + private static void logInvokeMethod( String msg, Method method, Object[] args ) { if ( Interpreter.DEBUG ) @@ -955,14 +962,12 @@ private static boolean isPublic( Class c ) { return Modifier.isPublic( c.getModifiers() ); } - private static boolean isPublic( Method m ) { + + private static boolean isPublic( Member m ) { return Modifier.isPublic( m.getModifiers() ); } - private static boolean isPublic( Constructor c ) { - return Modifier.isPublic( c.getModifiers() ); - } + private static boolean isStatic( Method m ) { return Modifier.isStatic( m.getModifiers() ); } } - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vam...@us...> - 2023-10-13 21:05:11
|
Revision: 25696 http://sourceforge.net/p/jedit/svn/25696 Author: vampire0 Date: 2023-10-13 21:05:09 +0000 (Fri, 13 Oct 2023) Log Message: ----------- Increase max warnings amount for JavaDoc generation Modified Paths: -------------- jEdit/trunk/build.xml Modified: jEdit/trunk/build.xml =================================================================== --- jEdit/trunk/build.xml 2023-10-13 20:42:17 UTC (rev 25695) +++ jEdit/trunk/build.xml 2023-10-13 21:05:09 UTC (rev 25696) @@ -820,6 +820,7 @@ packagenames="org.*" doclet="doclet.GenerateTocXML" docletpath="${classes.dir}/javadoc" + additionalparam="-Xmaxwarns 2000" version="true" use="true" author="true" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vam...@us...> - 2023-10-13 20:42:18
|
Revision: 25695 http://sourceforge.net/p/jedit/svn/25695 Author: vampire0 Date: 2023-10-13 20:42:17 +0000 (Fri, 13 Oct 2023) Log Message: ----------- Remove unnecessary BSF dependency for scripting Modified Paths: -------------- jEdit/trunk/ivy.xml Modified: jEdit/trunk/ivy.xml =================================================================== --- jEdit/trunk/ivy.xml 2023-10-13 20:20:35 UTC (rev 25694) +++ jEdit/trunk/ivy.xml 2023-10-13 20:42:17 UTC (rev 25695) @@ -88,7 +88,6 @@ <dependency org="org.jedit.plugins" name="MacOSX" rev="1.3" conf="default-plugins"/> <dependency org="org.jedit.plugins" name="QuickNotepad" rev="5.0" conf="default-plugins"/> - <dependency org="bsf" name="bsf" rev="2.4.0" conf="scripting"/> <dependency org="org.beanshell" name="bsh" rev="2.0b5" conf="scripting"/> <dependency org="org.bouncycastle" name="bcpg-jdk15on" rev="1.62" conf="scripting"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vam...@us...> - 2023-10-13 20:20:37
|
Revision: 25694 http://sourceforge.net/p/jedit/svn/25694 Author: vampire0 Date: 2023-10-13 20:20:35 +0000 (Fri, 13 Oct 2023) Log Message: ----------- Fix JavaDoc generation Modified Paths: -------------- jEdit/trunk/build.xml Modified: jEdit/trunk/build.xml =================================================================== --- jEdit/trunk/build.xml 2023-10-13 20:06:50 UTC (rev 25693) +++ jEdit/trunk/build.xml 2023-10-13 20:20:35 UTC (rev 25694) @@ -840,7 +840,6 @@ <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> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vam...@us...> - 2023-10-13 20:06:53
|
Revision: 25693 http://sourceforge.net/p/jedit/svn/25693 Author: vampire0 Date: 2023-10-13 20:06:50 +0000 (Fri, 13 Oct 2023) Log Message: ----------- Fix unchecked and deprecated compiler warnings Modified Paths: -------------- jEdit/trunk/org/gjt/sp/jedit/browser/VFSBrowser.java jEdit/trunk/org/gjt/sp/jedit/gui/BufferSwitcher.java jEdit/trunk/org/gjt/sp/jedit/gui/statusbar/EncodingWidgetFactory.java jEdit/trunk/org/gjt/sp/jedit/gui/statusbar/FoldWidgetFactory.java jEdit/trunk/org/gjt/sp/jedit/gui/statusbar/ModeWidgetFactory.java jEdit/trunk/org/gjt/sp/jedit/gui/statusbar/WrapWidgetFactory.java jEdit/trunk/org/gjt/sp/jedit/pluginmgr/PluginManagerProgress.java jEdit/trunk/org/gjt/sp/jedit/pluginmgr/Roster.java jEdit/trunk/org/gjt/sp/jedit/syntax/ParserRuleSet.java jEdit/trunk/org/gjt/sp/util/StandardUtilities.java Modified: jEdit/trunk/org/gjt/sp/jedit/browser/VFSBrowser.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/browser/VFSBrowser.java 2023-10-13 19:09:34 UTC (rev 25692) +++ jEdit/trunk/org/gjt/sp/jedit/browser/VFSBrowser.java 2023-10-13 20:06:50 UTC (rev 25693) @@ -51,6 +51,8 @@ import org.gjt.sp.jedit.buffer.JEditBuffer; import org.gjt.sp.util.*; import org.gjt.sp.jedit.menu.MenuItemTextComparator; + +import static org.gjt.sp.util.StandardUtilities.castUnchecked; //}}} /** @@ -731,7 +733,7 @@ } final Task task = new DeleteBrowserTask(this, session, vfs, files[i].getDeletePath()); - TaskManager.instance.addTaskListener(new TaskAdapter() + TaskManager.instance.addTaskListener(new TaskListener() { @Override public void done(Task t) @@ -1037,7 +1039,7 @@ return getSelectedFiles(); } } //}}} - + //{{{ paste() method /** * Paste the file contained in the clipboard. @@ -1045,7 +1047,6 @@ * @param file the target, it can be a file, in that case it will be pasted to * the parent directory, or a directory. */ - @SuppressWarnings({"unchecked"}) public void paste(VFSFile file) throws IOException, UnsupportedFlavorException { if (file == null) @@ -1079,7 +1080,7 @@ List<String> sources = new ArrayList<>(); if (transferable.isDataFlavorSupported(ListVFSFileTransferable.jEditFileList)) { - Iterable<VFSFile> copiedFiles = (Iterable<VFSFile>) transferable.getTransferData(ListVFSFileTransferable.jEditFileList); + Iterable<VFSFile> copiedFiles = castUnchecked(transferable.getTransferData(ListVFSFileTransferable.jEditFileList)); for (VFSFile copiedFile : copiedFiles) { sources.add(copiedFile.getPath()); @@ -1087,7 +1088,7 @@ } else if (transferable.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) { - Iterable<File> copiedFiles = (Iterable<File>) transferable.getTransferData(DataFlavor.javaFileListFlavor); + Iterable<File> copiedFiles = castUnchecked(transferable.getTransferData(DataFlavor.javaFileListFlavor)); for (File copiedFile : copiedFiles) { sources.add(copiedFile.getAbsolutePath()); @@ -1797,7 +1798,7 @@ } } } //}}} - + //{{{ Action class class Action extends AbstractAction { @@ -1887,7 +1888,7 @@ @Override void doPopup() - { + { if (popup==null) createPopupMenu(); GenericGUIUtilities.showPopupMenu(popup, this, 0, getHeight(), false); } Modified: jEdit/trunk/org/gjt/sp/jedit/gui/BufferSwitcher.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/gui/BufferSwitcher.java 2023-10-13 19:09:34 UTC (rev 25692) +++ jEdit/trunk/org/gjt/sp/jedit/gui/BufferSwitcher.java 2023-10-13 20:06:50 UTC (rev 25693) @@ -41,6 +41,8 @@ import org.gjt.sp.jedit.bufferset.BufferSetManager; import org.gjt.sp.jedit.msg.PropertiesChanged; import org.gjt.sp.util.ThreadUtilities; + +import static org.gjt.sp.util.StandardUtilities.castUnchecked; //}}} /** BufferSwitcher class @@ -223,7 +225,7 @@ Accessible acc = ui.getAccessibleChild(null, 0); if (acc instanceof BasicComboPopup) { - JList list = ((BasicComboPopup)acc).getList(); + JList<Object> list = ((BasicComboPopup)acc).getList(); list.setDragEnabled(true); list.setDropMode(DropMode.INSERT); list.setTransferHandler(new BufferSwitcherTransferHandler()); @@ -444,7 +446,7 @@ @Override public Transferable createTransferable(JComponent c) { - JList<Buffer> list = (JList<Buffer>) c; + JList<Buffer> list = castUnchecked(c); Buffer buffer = list.getSelectedValue(); if (buffer == null) { Modified: jEdit/trunk/org/gjt/sp/jedit/gui/statusbar/EncodingWidgetFactory.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/gui/statusbar/EncodingWidgetFactory.java 2023-10-13 19:09:34 UTC (rev 25692) +++ jEdit/trunk/org/gjt/sp/jedit/gui/statusbar/EncodingWidgetFactory.java 2023-10-13 20:06:50 UTC (rev 25693) @@ -38,11 +38,12 @@ import javax.swing.*; import static java.lang.String.CASE_INSENSITIVE_ORDER; +import static org.gjt.sp.util.StandardUtilities.castUnchecked; //}}} /** * @author Matthieu Casanova - * @since jEdit 4.3pre14 + * @since jEdit 4.3pre14 */ public class EncodingWidgetFactory implements StatusWidgetFactory { @@ -73,7 +74,7 @@ currentEncoding, listSelectionEvent -> EventQueue.invokeLater(() -> { - JList<String> list = (JList<String>) listSelectionEvent.getSource(); + JList<String> list = castUnchecked(listSelectionEvent.getSource()); String selectedValue = list.getSelectedValue(); int selectedOption = DialogChooser.openChooserWindow(view, jEdit.getProperty("buffer.encoding.reload", new String[]{selectedValue}), Modified: jEdit/trunk/org/gjt/sp/jedit/gui/statusbar/FoldWidgetFactory.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/gui/statusbar/FoldWidgetFactory.java 2023-10-13 19:09:34 UTC (rev 25692) +++ jEdit/trunk/org/gjt/sp/jedit/gui/statusbar/FoldWidgetFactory.java 2023-10-13 20:06:50 UTC (rev 25693) @@ -38,11 +38,13 @@ import org.gjt.sp.jedit.msg.BufferUpdate; import javax.swing.*; + +import static org.gjt.sp.util.StandardUtilities.castUnchecked; //}}} /** * @author Matthieu Casanova - * @since jEdit 4.3pre14 + * @since jEdit 4.3pre14 */ public class FoldWidgetFactory implements StatusWidgetFactory { @@ -71,7 +73,7 @@ currentFoldingMode, listSelectionEvent -> EventQueue.invokeLater(() -> { - JList<String> list = (JList<String>) listSelectionEvent.getSource(); + JList<String> list = castUnchecked(listSelectionEvent.getSource()); String selectedValue = list.getSelectedValue(); buffer.setStringProperty("folding", selectedValue); buffer.propertiesChanged(); Modified: jEdit/trunk/org/gjt/sp/jedit/gui/statusbar/ModeWidgetFactory.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/gui/statusbar/ModeWidgetFactory.java 2023-10-13 19:09:34 UTC (rev 25692) +++ jEdit/trunk/org/gjt/sp/jedit/gui/statusbar/ModeWidgetFactory.java 2023-10-13 20:06:50 UTC (rev 25693) @@ -33,6 +33,8 @@ import org.gjt.sp.jedit.gui.DialogChooser; import javax.swing.*; + +import static org.gjt.sp.util.StandardUtilities.castUnchecked; //}}} /** @@ -67,7 +69,7 @@ currentMode, listSelectionEvent -> EventQueue.invokeLater(() -> { - JList<Mode> list = (JList<Mode>) listSelectionEvent.getSource(); + JList<Mode> list = castUnchecked(listSelectionEvent.getSource()); buffer.setMode(list.getSelectedValue()); }), modes); Modified: jEdit/trunk/org/gjt/sp/jedit/gui/statusbar/WrapWidgetFactory.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/gui/statusbar/WrapWidgetFactory.java 2023-10-13 19:09:34 UTC (rev 25692) +++ jEdit/trunk/org/gjt/sp/jedit/gui/statusbar/WrapWidgetFactory.java 2023-10-13 20:06:50 UTC (rev 25693) @@ -37,6 +37,7 @@ import static org.gjt.sp.jedit.buffer.WordWrap.none; import static org.gjt.sp.jedit.buffer.WordWrap.soft; +import static org.gjt.sp.util.StandardUtilities.castUnchecked; //}}} /** @@ -70,7 +71,7 @@ currentFoldingMode, listSelectionEvent -> EventQueue.invokeLater(() -> { - JList<WordWrap> list = (JList<WordWrap>) listSelectionEvent.getSource(); + JList<WordWrap> list = castUnchecked(listSelectionEvent.getSource()); WordWrap selectedValue = list.getSelectedValue(); buffer.setWordWrap(selectedValue); EditBus.send(new BufferUpdate(buffer,null,BufferUpdate.PROPERTIES_CHANGED)); Modified: jEdit/trunk/org/gjt/sp/jedit/pluginmgr/PluginManagerProgress.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/pluginmgr/PluginManagerProgress.java 2023-10-13 19:09:34 UTC (rev 25692) +++ jEdit/trunk/org/gjt/sp/jedit/pluginmgr/PluginManagerProgress.java 2023-10-13 20:06:50 UTC (rev 25693) @@ -60,8 +60,8 @@ JButton stop = new JButton(jEdit.getProperty("plugin-manager.progress.stop")); stop.addActionListener(e -> { - // TODO: Thread.stop is deprecated, this should probably be Thread.interrupt - thread.stop(); + roster.abortWorkThreadOperations(); + thread.interrupt(); dispose(); }); JPanel panel = new JPanel(new FlowLayout( @@ -172,12 +172,10 @@ } @Override - @SuppressWarnings("deprecation") public void windowClosing(WindowEvent evt) { - // TODO: Thread.stop is deprecated, this should probably be Thread.interrupt - thread.stop(); - dispose(); + roster.abortWorkThreadOperations(); + thread.interrupt(); } } //}}} //}}} Modified: jEdit/trunk/org/gjt/sp/jedit/pluginmgr/Roster.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/pluginmgr/Roster.java 2023-10-13 19:09:34 UTC (rev 25692) +++ jEdit/trunk/org/gjt/sp/jedit/pluginmgr/Roster.java 2023-10-13 20:06:50 UTC (rev 25693) @@ -28,6 +28,7 @@ import java.awt.Component; import java.io.*; import java.net.*; +import java.util.concurrent.atomic.AtomicBoolean; import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.zip.*; @@ -51,6 +52,7 @@ //{{{ Roster constructor Roster() { + abortWorkThreadOperations = new AtomicBoolean(false); operations = new ArrayList<>(); toLoad = new ArrayList<>(); } //}}} @@ -77,6 +79,12 @@ toLoad.add(path); } //}}} + //{{{ abortWorkThreadOperations() method + void abortWorkThreadOperations() + { + abortWorkThreadOperations.set(true); + } //}}} + //{{{ getOperation() method public Operation getOperation(int i) { @@ -103,7 +111,7 @@ op.runInWorkThread(progress); progress.done(); - if (Thread.interrupted()) + if (abortWorkThreadOperations.get()) return; } } //}}} @@ -143,6 +151,7 @@ //{{{ Private members private static File downloadDir; + private final AtomicBoolean abortWorkThreadOperations; private final List<Operation> operations; private final List<String> toLoad; Modified: jEdit/trunk/org/gjt/sp/jedit/syntax/ParserRuleSet.java =================================================================== --- jEdit/trunk/org/gjt/sp/jedit/syntax/ParserRuleSet.java 2023-10-13 19:09:34 UTC (rev 25692) +++ jEdit/trunk/org/gjt/sp/jedit/syntax/ParserRuleSet.java 2023-10-13 20:06:50 UTC (rev 25693) @@ -25,8 +25,11 @@ //{{{ Imports import org.jedit.annotation.Nonnull; +import java.lang.reflect.Array; import java.util.*; import java.util.regex.Pattern; + +import static org.gjt.sp.util.StandardUtilities.castUnchecked; //}}} /** @@ -54,7 +57,7 @@ this.setName = setName; allRules = new ArrayList<>(); rulesForNull = new ArrayList<>(); - ruleArray = new List[BASE_CACHE]; + ruleArray = castUnchecked(Array.newInstance(List.class, BASE_CACHE)); imports = new ArrayList<>(); } //}}} Modified: jEdit/trunk/org/gjt/sp/util/StandardUtilities.java =================================================================== --- jEdit/trunk/org/gjt/sp/util/StandardUtilities.java 2023-10-13 19:09:34 UTC (rev 25692) +++ jEdit/trunk/org/gjt/sp/util/StandardUtilities.java 2023-10-13 20:06:50 UTC (rev 25693) @@ -754,4 +754,18 @@ } } // }}} + + //{{{ castUnchecked() method + /** + * Casts the given argument to the needed return type. + * + * @param castee The object to be casted unchecked + * @throws ClassCastException if the cast does not succeed + * @since jEdit 5.7 + */ + @SuppressWarnings("unchecked") + public static <T> T castUnchecked(Object castee) + { + return (T) castee; + } //}}} } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <vam...@us...> - 2023-10-13 19:09:37
|
Revision: 25692 http://sourceforge.net/p/jedit/svn/25692 Author: vampire0 Date: 2023-10-13 19:09:34 +0000 (Fri, 13 Oct 2023) Log Message: ----------- Add missing contributor information Modified Paths: -------------- jEdit/trunk/doc/CHANGES.txt Modified: jEdit/trunk/doc/CHANGES.txt =================================================================== --- jEdit/trunk/doc/CHANGES.txt 2023-10-11 19:19:41 UTC (rev 25691) +++ jEdit/trunk/doc/CHANGES.txt 2023-10-13 19:09:34 UTC (rev 25692) @@ -18,10 +18,10 @@ - Allow user to choose filename when printing to pdf (partial fix for #4115 - Dale Anson) -- Bug #4128 key handling in the Errors dialog uses current keymap. +- Key handling in the Errors dialog uses current keymap (#4128 - Eric Le Lay) -- Bug #4125 Delete at the end of the line does not delete newline on java20, - java21 +- Delete at the end of the line does not delete newline on java20, java21 + (#4125 - Eric Le Lay) }}} {{{ Miscellaneous @@ -103,7 +103,7 @@ - Updated java mode for new keywords introduced up to Java 17. (Dale Anson) -- FR #554 add match index to beanshell replace context +- Add match index to beanshell replace context (#554 - Eric Le Lay) }}} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |