You can subscribe to this list here.
| 2000 |
Jan
(11) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(8) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(145) |
Nov
(352) |
Dec
(329) |
| 2002 |
Jan
(461) |
Feb
(533) |
Mar
(632) |
Apr
(363) |
May
(619) |
Jun
(324) |
Jul
(109) |
Aug
(247) |
Sep
(167) |
Oct
(215) |
Nov
(115) |
Dec
(262) |
| 2003 |
Jan
(568) |
Feb
(537) |
Mar
(760) |
Apr
(493) |
May
(500) |
Jun
(284) |
Jul
(178) |
Aug
(180) |
Sep
(135) |
Oct
(230) |
Nov
(266) |
Dec
(175) |
| 2004 |
Jan
(121) |
Feb
(294) |
Mar
(222) |
Apr
(172) |
May
(162) |
Jun
(105) |
Jul
(93) |
Aug
(151) |
Sep
(136) |
Oct
(62) |
Nov
(74) |
Dec
(178) |
| 2005 |
Jan
(179) |
Feb
(288) |
Mar
(153) |
Apr
(138) |
May
(195) |
Jun
(39) |
Jul
(62) |
Aug
(41) |
Sep
(15) |
Oct
(365) |
Nov
(130) |
Dec
(199) |
| 2006 |
Jan
(235) |
Feb
(92) |
Mar
(262) |
Apr
(250) |
May
(345) |
Jun
(513) |
Jul
(587) |
Aug
(210) |
Sep
(216) |
Oct
(200) |
Nov
(188) |
Dec
(115) |
| 2007 |
Jan
(259) |
Feb
(182) |
Mar
(217) |
Apr
(109) |
May
(161) |
Jun
(205) |
Jul
(291) |
Aug
(176) |
Sep
(185) |
Oct
(190) |
Nov
(208) |
Dec
(182) |
| 2008 |
Jan
(141) |
Feb
(193) |
Mar
(219) |
Apr
(112) |
May
(233) |
Jun
(218) |
Jul
(149) |
Aug
(338) |
Sep
(291) |
Oct
(143) |
Nov
(131) |
Dec
(152) |
| 2009 |
Jan
(266) |
Feb
(178) |
Mar
(168) |
Apr
(167) |
May
(198) |
Jun
(282) |
Jul
(383) |
Aug
(341) |
Sep
(153) |
Oct
(214) |
Nov
(164) |
Dec
(278) |
| 2010 |
Jan
(430) |
Feb
(300) |
Mar
(214) |
Apr
(198) |
May
(271) |
Jun
(321) |
Jul
(144) |
Aug
(208) |
Sep
(275) |
Oct
(287) |
Nov
(218) |
Dec
(153) |
| 2011 |
Jan
(172) |
Feb
(172) |
Mar
(121) |
Apr
(62) |
May
(23) |
Jun
(155) |
Jul
(120) |
Aug
(252) |
Sep
(170) |
Oct
(206) |
Nov
(356) |
Dec
(300) |
| 2012 |
Jan
(412) |
Feb
(313) |
Mar
(419) |
Apr
(153) |
May
(194) |
Jun
(226) |
Jul
(115) |
Aug
(143) |
Sep
(223) |
Oct
(173) |
Nov
(121) |
Dec
(143) |
| 2013 |
Jan
(156) |
Feb
(109) |
Mar
(146) |
Apr
(82) |
May
(65) |
Jun
(52) |
Jul
(55) |
Aug
(347) |
Sep
(65) |
Oct
(95) |
Nov
(85) |
Dec
(37) |
| 2014 |
Jan
(12) |
Feb
(51) |
Mar
(31) |
Apr
(97) |
May
(60) |
Jun
(32) |
Jul
(35) |
Aug
(47) |
Sep
(16) |
Oct
(36) |
Nov
(55) |
Dec
(90) |
| 2015 |
Jan
(34) |
Feb
(65) |
Mar
(13) |
Apr
(13) |
May
(49) |
Jun
(10) |
Jul
(23) |
Aug
(96) |
Sep
(78) |
Oct
(38) |
Nov
(41) |
Dec
(126) |
| 2016 |
Jan
(29) |
Feb
(38) |
Mar
(21) |
Apr
(12) |
May
(45) |
Jun
(53) |
Jul
(40) |
Aug
(69) |
Sep
(60) |
Oct
(11) |
Nov
(19) |
Dec
(2) |
| 2017 |
Jan
(28) |
Feb
(17) |
Mar
(57) |
Apr
(4) |
May
(15) |
Jun
(60) |
Jul
(21) |
Aug
(5) |
Sep
(6) |
Oct
(34) |
Nov
(17) |
Dec
(28) |
| 2018 |
Jan
(15) |
Feb
(7) |
Mar
(13) |
Apr
(7) |
May
(2) |
Jun
(6) |
Jul
(10) |
Aug
(15) |
Sep
(6) |
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
(2) |
Feb
(2) |
Mar
(9) |
Apr
(5) |
May
|
Jun
(6) |
Jul
(4) |
Aug
(35) |
Sep
(1) |
Oct
(6) |
Nov
(1) |
Dec
(18) |
| 2020 |
Jan
(1) |
Feb
|
Mar
(141) |
Apr
(196) |
May
(41) |
Jun
(3) |
Jul
(4) |
Aug
(3) |
Sep
(27) |
Oct
(2) |
Nov
(4) |
Dec
(25) |
| 2021 |
Jan
(8) |
Feb
(1) |
Mar
(46) |
Apr
(48) |
May
|
Jun
(9) |
Jul
(1) |
Aug
|
Sep
(5) |
Oct
(3) |
Nov
(10) |
Dec
(7) |
| 2022 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
(9) |
Jun
(24) |
Jul
(7) |
Aug
(7) |
Sep
(13) |
Oct
(7) |
Nov
(1) |
Dec
(2) |
| 2023 |
Jan
(11) |
Feb
(4) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
(13) |
Sep
(32) |
Oct
(10) |
Nov
(6) |
Dec
|
| 2024 |
Jan
|
Feb
(8) |
Mar
(4) |
Apr
(3) |
May
(22) |
Jun
|
Jul
(11) |
Aug
(8) |
Sep
|
Oct
(9) |
Nov
|
Dec
|
| 2025 |
Jan
|
Feb
(2) |
Mar
(16) |
Apr
(5) |
May
|
Jun
|
Jul
(2) |
Aug
(3) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
|
From: <kp...@us...> - 2021-03-26 08:44:47
|
Revision: 25444
http://sourceforge.net/p/jedit/svn/25444
Author: kpouer
Date: 2021-03-26 08:44:45 +0000 (Fri, 26 Mar 2021)
Log Message:
-----------
tagging 2.3.1
Added Paths:
-----------
plugins/ErrorList/tags/ErrorList-2.3.1/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kp...@us...> - 2021-03-26 08:43:08
|
Revision: 25443
http://sourceforge.net/p/jedit/svn/25443
Author: kpouer
Date: 2021-03-26 08:43:07 +0000 (Fri, 26 Mar 2021)
Log Message:
-----------
tagging 2.3.1
Added Paths:
-----------
plugins/ErrorList/branches/2.3.1/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kp...@us...> - 2021-03-25 22:10:26
|
Revision: 25442
http://sourceforge.net/p/jedit/svn/25442
Author: kpouer
Date: 2021-03-25 22:10:23 +0000 (Thu, 25 Mar 2021)
Log Message:
-----------
use diamond operator and fix indendation
Modified Paths:
--------------
jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java
Modified: jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java
===================================================================
--- jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java 2021-03-25 22:02:06 UTC (rev 25441)
+++ jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java 2021-03-25 22:10:23 UTC (rev 25442)
@@ -96,7 +96,7 @@
caretEvent = new MutableCaretEvent();
blink = true;
offsetXY = new Point();
- structureMatchers = new LinkedList<StructureMatcher>();
+ structureMatchers = new LinkedList<>();
structureMatchers.add(new StructureMatcher.BracketMatcher());
//}}}
@@ -753,7 +753,8 @@
if(visibleLines <= 1)
{
if(Debug.SCROLL_TO_DEBUG)
- Log.log(Log.DEBUG,this,"visibleLines <= 0");
+ Log.log(Log.DEBUG,this,"visibleLines <= 0");
+
// Fix the case when the line is wrapped
// it was not possible to see the second (or next)
// subregion of a line
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kp...@us...> - 2021-03-25 22:02:12
|
Revision: 25441
http://sourceforge.net/p/jedit/svn/25441
Author: kpouer
Date: 2021-03-25 22:02:06 +0000 (Thu, 25 Mar 2021)
Log Message:
-----------
remove deprecated method
Modified Paths:
--------------
jEdit/trunk/org/gjt/sp/util/StandardUtilities.java
Modified: jEdit/trunk/org/gjt/sp/util/StandardUtilities.java
===================================================================
--- jEdit/trunk/org/gjt/sp/util/StandardUtilities.java 2021-03-25 22:00:35 UTC (rev 25440)
+++ jEdit/trunk/org/gjt/sp/util/StandardUtilities.java 2021-03-25 22:02:06 UTC (rev 25441)
@@ -25,7 +25,6 @@
package org.gjt.sp.util;
//{{{ Imports
-import javax.annotation.Nullable;
import javax.swing.text.Segment;
import java.security.MessageDigest;
@@ -499,29 +498,6 @@
}
} //}}}
- //{{{ objectsEqual() method
- /**
- * Returns if two strings are equal. This correctly handles null pointers,
- * as opposed to calling <code>o1.equals(o2)</code>.
- * @since jEdit 4.3pre6
- * @deprecated use {java.util.Objects#equals(Object, Object}
- */
- @Deprecated
- public static boolean objectsEqual(@Nullable Object o1, @Nullable Object o2)
- {
- if(o1 == null)
- {
- if(o2 == null)
- return true;
- else
- return false;
- }
- else if(o2 == null)
- return false;
- else
- return o1.equals(o2);
- } //}}}
-
//{{{ globToRE() method
/**
* Converts a Unix-style glob to a regular expression.<p>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kp...@us...> - 2021-03-25 22:00:38
|
Revision: 25440
http://sourceforge.net/p/jedit/svn/25440
Author: kpouer
Date: 2021-03-25 22:00:35 +0000 (Thu, 25 Mar 2021)
Log Message:
-----------
remove deprecated method
Modified Paths:
--------------
jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java
Modified: jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java
===================================================================
--- jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java 2021-03-25 21:56:16 UTC (rev 25439)
+++ jEdit/trunk/org/gjt/sp/jedit/textarea/TextArea.java 2021-03-25 22:00:35 UTC (rev 25440)
@@ -6284,32 +6284,6 @@
}
} //}}}
- //{{{ showPopupMenu() method - copied from GUIUtilities
- /**
- * Shows the specified popup menu, ensuring it is displayed within
- * the bounds of the screen.
- * @param popup The popup menu
- * @param comp The component to show it for
- * @param x The x co-ordinate
- * @param y The y co-ordinate
- * @param point If true, then the popup originates from a single point;
- * otherwise it will originate from the component itself. This affects
- * positioning in the case where the popup does not fit onscreen.
- *
- * FIXME: move parts of GUIUtilities compatible with standalone TextArea in a separate
- * class, to prevent such copies
- *
- * @since jEdit 4.1pre1
- * @deprecated use {@link GenericGUIUtilities#showPopupMenu(JPopupMenu, Component, int, int, boolean)}
- */
- @Deprecated
- public static void showPopupMenu(JPopupMenu popup, Component comp,
- int x, int y, boolean point)
- {
- GenericGUIUtilities.showPopupMenu(popup, comp, x, y, point);
-
- } //}}}
-
//{{{ Character boundary staffs
//{{{ LineCharacterBreaker class
// Shared context among some operations which are aware of
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kp...@us...> - 2021-03-25 21:56:18
|
Revision: 25439
http://sourceforge.net/p/jedit/svn/25439
Author: kpouer
Date: 2021-03-25 21:56:16 +0000 (Thu, 25 Mar 2021)
Log Message:
-----------
remove deprecated method
Modified Paths:
--------------
jEdit/trunk/org/gjt/sp/jedit/Mode.java
jEdit/trunk/org/gjt/sp/jedit/OperatingSystem.java
Modified: jEdit/trunk/org/gjt/sp/jedit/Mode.java
===================================================================
--- jEdit/trunk/org/gjt/sp/jedit/Mode.java 2021-03-25 21:54:19 UTC (rev 25438)
+++ jEdit/trunk/org/gjt/sp/jedit/Mode.java 2021-03-25 21:56:16 UTC (rev 25439)
@@ -263,20 +263,6 @@
|| acceptFirstLine(firstLine);
} //}}}
- //{{{ acceptFilename() method
- /**
- * Returns true if the buffer name matches the file name glob.
- * @param fileName The buffer's name, can be {@code null}
- * @return true if the file name matches the file name glob.
- * @since jEdit 4.3pre18
- * @deprecated use {@link #acceptFile(String, String)} instead
- */
- @Deprecated
- public boolean acceptFilename(String fileName)
- {
- return acceptFile(null, fileName);
- } //}}}
-
//{{{ acceptFile() method
/**
* Returns true if the buffer's name or path matches the file name glob.
Modified: jEdit/trunk/org/gjt/sp/jedit/OperatingSystem.java
===================================================================
--- jEdit/trunk/org/gjt/sp/jedit/OperatingSystem.java 2021-03-25 21:54:19 UTC (rev 25438)
+++ jEdit/trunk/org/gjt/sp/jedit/OperatingSystem.java 2021-03-25 21:56:16 UTC (rev 25439)
@@ -149,17 +149,6 @@
return new Rectangle(x,y,w,h);
} //}}}
- //{{{ isDOSDerived() method
- /**
- * Returns if we're running Windows 95/98/ME/NT/2000/XP/Vista/Win7, or OS/2.
- * @deprecated use {@link #isWindows()}
- */
- @Deprecated
- public static boolean isDOSDerived()
- {
- return isWindows() || isOS2();
- } //}}}
-
//{{{ isWindows() method
/**
* Returns if we're running Windows 95/98/ME/NT/2000/XP/Vista/Win7.
@@ -263,20 +252,6 @@
return hasScreenMenuBar == 1;
} //}}}
- //{{{ hasJava17() method
- /**
- * @deprecated - there is no point in checking for this
- * since we require Java 11.
- * Returns if Java 2 version 1.7 is in use.
- * @since jEdit 5.0pre1
- */
- @Deprecated
- public static boolean hasJava17()
- {
- return true;
- } //}}}
-
-
//{{{ isCaseInsensitiveFS() method
/**
* @since jEdit 4.3pre2
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kp...@us...> - 2021-03-25 21:54:22
|
Revision: 25438
http://sourceforge.net/p/jedit/svn/25438
Author: kpouer
Date: 2021-03-25 21:54:19 +0000 (Thu, 25 Mar 2021)
Log Message:
-----------
remove deprecated method
Modified Paths:
--------------
jEdit/trunk/org/gjt/sp/jedit/MiscUtilities.java
jEdit/trunk/test/org/gjt/sp/jedit/MiscUtilitiesTest.java
Modified: jEdit/trunk/org/gjt/sp/jedit/MiscUtilities.java
===================================================================
--- jEdit/trunk/org/gjt/sp/jedit/MiscUtilities.java 2021-03-25 21:51:56 UTC (rev 25437)
+++ jEdit/trunk/org/gjt/sp/jedit/MiscUtilities.java 2021-03-25 21:54:19 UTC (rev 25438)
@@ -519,16 +519,6 @@
return name;
else
return name.substring(0,index);
- }
- /**
- @return the same thing as getBaseName()
- @deprecated use getBaseName() instead.
- @since jEdit 4.0
- */
- @Deprecated
- public static String getFileNameNoExtension(String path)
- {
- return getBaseName(path);
} //}}}
//{{{ getParentOfPath() method
@@ -1094,7 +1084,6 @@
return false;
} //}}}
-
//{{{ autodetect() method
/**
* Tries to detect if the stream is gzipped, and if it has an encoding
Modified: jEdit/trunk/test/org/gjt/sp/jedit/MiscUtilitiesTest.java
===================================================================
--- jEdit/trunk/test/org/gjt/sp/jedit/MiscUtilitiesTest.java 2021-03-25 21:51:56 UTC (rev 25437)
+++ jEdit/trunk/test/org/gjt/sp/jedit/MiscUtilitiesTest.java 2021-03-25 21:54:19 UTC (rev 25438)
@@ -563,7 +563,6 @@
public void getBaseName()
{
assertEquals("aaa", MiscUtilities.getBaseName("c:\\yoyo/ta.ta/aaa"));
- assertEquals("aaa", MiscUtilities.getFileNameNoExtension("c:\\yoyo/ta.ta/aaa"));
}
@Test
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kp...@us...> - 2021-03-25 21:51:59
|
Revision: 25437
http://sourceforge.net/p/jedit/svn/25437
Author: kpouer
Date: 2021-03-25 21:51:56 +0000 (Thu, 25 Mar 2021)
Log Message:
-----------
remove deprecated methods
Modified Paths:
--------------
jEdit/trunk/org/gjt/sp/jedit/GUIUtilities.java
Modified: jEdit/trunk/org/gjt/sp/jedit/GUIUtilities.java
===================================================================
--- jEdit/trunk/org/gjt/sp/jedit/GUIUtilities.java 2021-03-25 21:42:44 UTC (rev 25436)
+++ jEdit/trunk/org/gjt/sp/jedit/GUIUtilities.java 2021-03-25 21:51:56 UTC (rev 25437)
@@ -29,7 +29,6 @@
import org.gjt.sp.jedit.gui.FloatingWindowContainer;
import org.gjt.sp.jedit.gui.SplashScreen;
import org.gjt.sp.jedit.gui.VariableGridLayout;
-import org.gjt.sp.jedit.textarea.TextAreaMouseHandler;
import org.jedit.keymap.Keymap;
import org.gjt.sp.jedit.menu.EnhancedCheckBoxMenuItem;
import org.gjt.sp.jedit.menu.EnhancedMenu;
@@ -40,7 +39,6 @@
import org.gjt.sp.util.Log;
import org.gjt.sp.util.SyntaxUtilities;
-
import java.net.URL;
import java.util.*;
import java.util.List;
@@ -47,12 +45,10 @@
import java.lang.ref.SoftReference;
import javax.annotation.Nonnull;
-import javax.swing.AbstractButton;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JComponent;
-import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JMenu;
@@ -68,7 +64,6 @@
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
-
import java.awt.*;
import java.awt.event.*;
import java.awt.font.FontRenderContext;
@@ -92,7 +87,6 @@
* <li>{@link #showVFSFileDialog(View,String,int,boolean)}</li>
* <li>{@link #loadGeometry(Window,String)}</li>
* <li>{@link #saveGeometry(Window,String)}</li>
- * <li>{@link #showPopupMenu(JPopupMenu,Component,int,int)}</li>
* </ul>
*
* @author Slava Pestov
@@ -138,7 +132,7 @@
}
if(cache == null)
{
- cache = new Hashtable<>();
+ cache = new HashMap<>();
iconCache = new SoftReference<>(cache);
}
Icon icon = cache.get(iconName);
@@ -564,21 +558,6 @@
return b;
} //}}}
- //{{{ prettifyMenuLabel() method
- /**
- * `Prettifies' a menu item label by removing the `$' sign. This
- * can be used to process the contents of an <i>action</i>.label
- * property.
- * @param label the label
- * @return a pretty label
- * @deprecated use {@link GenericGUIUtilities#prettifyMenuLabel(String)}
- */
- @Deprecated
- public static String prettifyMenuLabel(String label)
- {
- return GenericGUIUtilities.prettifyMenuLabel(label);
- } //}}}
-
//{{{ getPlatformShortcutLabel() method
/**
* Translates a shortcut description string (e.g. "CS+SEMICOLON") to
@@ -638,20 +617,6 @@
}
} //}}}
- //{{{ setAutoMnemonic() method
- /**
- * Sets the mnemonic for the given button using jEdit convention,
- * taking the letter after the dollar.
- * @param button The button to set the mnemonic for.
- * @since jEdit 5.1
- * @deprecated use {@link GenericGUIUtilities#setAutoMnemonic(AbstractButton)}
- */
- @Deprecated
- public static void setAutoMnemonic(AbstractButton button)
- {
- GenericGUIUtilities.setAutoMnemonic(button);
- } //}}}
-
//}}}
//{{{ Canned dialog boxes
@@ -1143,38 +1108,6 @@
//{{{ Colors and styles
- //{{{ parseColor() method
- /**
- * Converts a color name to a color object. The name must either be
- * a known string, such as `red', `green', etc (complete list is in
- * the <code>java.awt.Color</code> class) or a hex color value
- * prefixed with `#', for example `#ff0088'.
- * @param name The color name
- * @deprecated use {@link SyntaxUtilities#parseColor(String, Color)}
- */
- @Deprecated
- public static Color parseColor(String name)
- {
- return SyntaxUtilities.parseColor(name, Color.black);
- } //}}}
-
- //{{{ parseStyle() method
- /**
- * Converts a style string to a style object.
- * @param str The style string
- * @param family Style strings only specify font style, not font family
- * @param size Style strings only specify font style, not font family
- * @exception IllegalArgumentException if the style is invalid
- * @since jEdit 3.2pre6
- * @deprecated use {@link SyntaxUtilities#parseStyle(String, String, int, boolean)}
- */
- @Deprecated
- public static SyntaxStyle parseStyle(String str, String family, int size)
- throws IllegalArgumentException
- {
- return SyntaxUtilities.parseStyle(str,family,size,true);
- } //}}}
-
//{{{ getStyleString() method
/**
* Converts a style into it's string representation.
@@ -1276,19 +1209,6 @@
loadGeometry(win, win.getParent(), name);
} //}}}
- //{{{ adjustForScreenBounds() method
- /**
- * Gives a rectangle the specified bounds, ensuring it is within the
- * screen bounds.
- * @since jEdit 4.2pre3
- * @deprecated use {@link GenericGUIUtilities#adjustForScreenBounds(Rectangle)}
- */
- @Deprecated
- public static void adjustForScreenBounds(Rectangle desired)
- {
- GenericGUIUtilities.adjustForScreenBounds(desired);
- } //}}}
-
//{{{ UnixWorkaround class
public static class UnixWorkaround
{
@@ -1529,145 +1449,6 @@
return panel;
} //}}}
- //{{{ requestFocus() method
- /**
- * Focuses on the specified component as soon as the window becomes
- * active.
- * @param win The window
- * @param comp The component
- * @deprecated use {@link GenericGUIUtilities#requestFocus(Window, Component)}
- */
- @Deprecated
- public static void requestFocus(final Window win, final Component comp)
- {
- GenericGUIUtilities.requestFocus(win, comp);
- } //}}}
-
- //{{{ isPopupTrigger() method
- /**
- * Returns if the specified event is the popup trigger event.
- * This implements precisely defined behavior, as opposed to
- * MouseEvent.isPopupTrigger().
- * @param evt The event
- * @since jEdit 3.2pre8
- * @deprecated use {@link GenericGUIUtilities#requestFocus(Window, Component)}
- */
- @Deprecated
- public static boolean isPopupTrigger(MouseEvent evt)
- {
- return GenericGUIUtilities.isPopupTrigger(evt);
- } //}}}
-
- //{{{ isMiddleButton() method
- /**
- * @param modifiers The modifiers flag from a mouse event
- * @since jEdit 4.1pre9
- * @deprecated use {@link TextAreaMouseHandler#isMiddleButton(MouseEvent)}
- */
- @Deprecated
- public static boolean isMiddleButton(int modifiers)
- {
- return TextAreaMouseHandler.isMiddleButton(modifiers);
- } //}}}
-
- //{{{ isRightButton() method
- /**
- * @param modifiers The modifiers flag from a mouse event
- * @since jEdit 4.1pre9
- * @deprecated use {@link TextAreaMouseHandler#isRightButton(MouseEvent)}
- */
- @Deprecated
- public static boolean isRightButton(int modifiers)
- {
- return TextAreaMouseHandler.isRightButton(modifiers);
- } //}}}
-
- //{{{ getScreenBounds() method
- /**
- * Returns the screen bounds, taking into account multi-screen
- * environments.
- * @since jEdit 4.3pre18
- * @deprecated use {@link GenericGUIUtilities#getScreenBounds()}
- */
- @Deprecated
- public static Rectangle getScreenBounds()
- {
- return GenericGUIUtilities.getScreenBounds();
- } //}}}
-
- //{{{ showPopupMenu() method
- /**
- * Shows the specified popup menu, ensuring it is displayed within
- * the bounds of the screen.
- * @param popup The popup menu
- * @param comp The component to show it for
- * @param x The x co-ordinate
- * @param y The y co-ordinate
- * @since jEdit 4.0pre1
- * @see javax.swing.JComponent#setComponentPopupMenu(javax.swing.JPopupMenu) setComponentPopupMenu
- * which works better and is simpler to use: you don't have to write the code to
- * show/hide popups in response to mouse events anymore.
- * @deprecated use {@link GenericGUIUtilities#showPopupMenu(JPopupMenu, Component, int, int)}
- */
- @Deprecated
- public static void showPopupMenu(JPopupMenu popup, Component comp,
- int x, int y)
- {
- GenericGUIUtilities.showPopupMenu(popup, comp, x, y);
- } //}}}
-
- //{{{ showPopupMenu() method
- /**
- * Shows the specified popup menu, ensuring it is displayed within
- * the bounds of the screen.
- * @param popup The popup menu
- * @param comp The component to show it for
- * @param x The x co-ordinate
- * @param y The y co-ordinate
- * @param point If true, then the popup originates from a single point;
- * otherwise it will originate from the component itself. This affects
- * positioning in the case where the popup does not fit onscreen.
- *
- * @since jEdit 4.1pre1
- * @deprecated use {@link GenericGUIUtilities#showPopupMenu(JPopupMenu, Component, int, int, boolean)}
- */
- @Deprecated
- public static void showPopupMenu(JPopupMenu popup, Component comp,
- int x, int y, boolean point)
- {
- GenericGUIUtilities.showPopupMenu(popup, comp, x, y, point);
-
- } //}}}
-
- //{{{ isAncestorOf() method
- /**
- * Returns if the first component is an ancestor of the
- * second by traversing up the component hierarchy.
- *
- * @param comp1 The ancestor
- * @param comp2 The component to check
- * @since jEdit 4.1pre5
- * @deprecated use {@link GenericGUIUtilities#isAncestorOf(Component, Component)}
- */
- @Deprecated
- public static boolean isAncestorOf(Component comp1, Component comp2)
- {
- return GenericGUIUtilities.isAncestorOf(comp1, comp2);
- } //}}}
-
- //{{{ getParentDialog() method
- /**
- * Traverses the given component's parent tree looking for an
- * instance of JDialog, and return it. If not found, return null.
- * @param c The component
- * @deprecated use {@link GenericGUIUtilities#getParentDialog(Component)}
- */
- @Deprecated
- public static JDialog getParentDialog(Component c)
- {
- return GenericGUIUtilities.getParentDialog(c);
- } //}}}
-
//{{{ getComponentParent() method
/**
* Finds a parent of the specified component.
@@ -1706,20 +1487,6 @@
return null;
} //}}}
- //{{{ setEnabledRecursively() method
- /**
- * Call setEnabled() recursively on the container and its descendants.
- * @param c The container
- * @param enabled The enabled state to set
- * @since jEdit 4.3pre17
- * @deprecated use {@link GenericGUIUtilities#setEnabledRecursively(Container, boolean)}
- */
- @Deprecated
- public static void setEnabledRecursively(Container c, boolean enabled)
- {
- GenericGUIUtilities.setEnabledRecursively(c, enabled);
- } //}}}
-
//{{{ getView() method
/**
* Finds the view parent of the specified component.
@@ -1732,67 +1499,6 @@
return (View)getComponentParent(comp,View.class);
} //}}}
- //{{{ setButtonContentMargin() method
- /**
- * Sets the content margin of a button (for Nimbus L&F).
- * @param button the button to modify
- * @param margin the new margin
- * @since jEdit 5.3
- * @deprecated use {@link GenericGUIUtilities#setButtonContentMargin(AbstractButton, Insets)}
- */
- @Deprecated
- public static void setButtonContentMargin(AbstractButton button, Insets margin)
- {
- GenericGUIUtilities.setButtonContentMargin(button, margin);
- } //}}}
-
- //{{{
- /**
- * Makes components the same size by finding the largest width and height of the
- * given components then setting all components to that width and height. This is
- * especially useful for making JButtons the same size.
- * @param components The components to make the same size.
- * @deprecated use {@link GenericGUIUtilities#makeSameSize(Component...)}
- */
- @Deprecated
- public static void makeSameSize(Component... components)
- {
- GenericGUIUtilities.makeSameSize(components);
- } //}}}
-
- //{{{ defaultTableDimension() method
- /**
- * JTable cell size, based on global defaults.
- * @deprecated use {@link GenericGUIUtilities#defaultTableCellSize()}
- */
- @Deprecated
- public static Dimension defaultTableCellSize()
- {
- return GenericGUIUtilities.defaultTableCellSize();
- } //}}}
-
- //{{{ defaultColumnWidth() method
- /**
- * Column width for JTable, based on global defaults.
- * @deprecated use {@link GenericGUIUtilities#defaultColumnWidth()}
- */
- @Deprecated
- public static int defaultColumnWidth()
- {
- return GenericGUIUtilities.defaultColumnWidth();
- } //}}}
-
- //{{{ defaultRowHeight() method
- /**
- * Row height for JTable, based on global defaults.
- * @deprecated use {@link GenericGUIUtilities#defaultRowHeight()}
- */
- @Deprecated
- public static int defaultRowHeight()
- {
- return GenericGUIUtilities.defaultRowHeight();
- } //}}}
-
//{{{ addSizeSaver() method
/**
* Adds a SizeSaver to the specified Frame. For non-Frame's use {@link #saveGeometry(Window,String)}
@@ -1962,7 +1668,7 @@
private static SoftReference<Map<String, Icon>> iconCache;
private static String iconPath = "jeditresource:/org/gjt/sp/jedit/icons/themes/";
private static final String defaultIconPath = "jeditresource:/org/gjt/sp/jedit/icons/themes/";
- private static final HashMap<String, String> deprecatedIcons = new HashMap<>();
+ private static final Map<String, String> deprecatedIcons = new HashMap<>();
//{{{ _loadMenuItem() method
private static JMenuItem _loadMenuItem(String name, ActionContext context, boolean setMnemonic)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kp...@us...> - 2021-03-25 21:42:46
|
Revision: 25436
http://sourceforge.net/p/jedit/svn/25436
Author: kpouer
Date: 2021-03-25 21:42:44 +0000 (Thu, 25 Mar 2021)
Log Message:
-----------
remove deprecated field and redundant initializer
Modified Paths:
--------------
jEdit/trunk/org/gjt/sp/jedit/Debug.java
Modified: jEdit/trunk/org/gjt/sp/jedit/Debug.java
===================================================================
--- jEdit/trunk/org/gjt/sp/jedit/Debug.java 2021-03-25 21:41:56 UTC (rev 25435)
+++ jEdit/trunk/org/gjt/sp/jedit/Debug.java 2021-03-25 21:42:44 UTC (rev 25436)
@@ -35,78 +35,74 @@
* Print messages when the gap moves, and other offset manager state
* changes.
*/
- public static boolean OFFSET_DEBUG = false;
+ public static boolean OFFSET_DEBUG;
/**
* Print messages when text area and display manager perform scroll
* updates.
*/
- public static boolean SCROLL_DEBUG = false;
+ public static boolean SCROLL_DEBUG;
/**
* Print messages when text area tries to make the caret visible.
*/
- public static boolean SCROLL_TO_DEBUG = false;
+ public static boolean SCROLL_TO_DEBUG;
/**
* Display an error if the scrolling code detects an inconsistency.
* This kills performance!
*/
- public static boolean SCROLL_VERIFY = false;
+ public static boolean SCROLL_VERIFY;
/**
* Print messages when screen line counts change.
*/
- public static boolean SCREEN_LINES_DEBUG = false;
+ public static boolean SCREEN_LINES_DEBUG;
/**
* For checking context, etc.
*/
- public static boolean TOKEN_MARKER_DEBUG = false;
+ public static boolean TOKEN_MARKER_DEBUG;
/**
* For checking fold level invalidation, etc.
*/
- public static boolean FOLD_DEBUG = false;
+ public static boolean FOLD_DEBUG;
/**
* For checking the line visibility structure..
*/
- public static boolean FOLD_VIS_DEBUG = false;
+ public static boolean FOLD_VIS_DEBUG;
/**
* For checking invalidation, etc.
*/
- public static boolean CHUNK_CACHE_DEBUG = false;
+ public static boolean CHUNK_CACHE_DEBUG;
/**
* Paints boxes around chunks.
*/
- public static boolean CHUNK_PAINT_DEBUG = false;
+ public static boolean CHUNK_PAINT_DEBUG;
/**
* Show time taken to repaint text area painter.
*/
- public static boolean PAINT_TIMER = false;
+ public static boolean PAINT_TIMER;
/**
* Show time taken for each EBComponent.
*/
- public static boolean EB_TIMER = false;
+ public static boolean EB_TIMER;
/**
* Paint strings instead of glyph vectors.
*/
- public static boolean DISABLE_GLYPH_VECTOR = false;
+ public static boolean DISABLE_GLYPH_VECTOR;
/**
* Logs messages when BeanShell code is evaluated.
*/
- public static boolean BEANSHELL_DEBUG = false;
-
- /** @deprecated no longer used. */
- @Deprecated
- public static boolean ALTERNATIVE_DISPATCHER = false;
+ public static boolean BEANSHELL_DEBUG;
/**
* If true, A+ shortcuts are disabled. If you use this, you should also
@@ -118,22 +114,22 @@
/**
* Geometry workaround for X11.
*/
- public static boolean GEOMETRY_WORKAROUND = false;
+ public static boolean GEOMETRY_WORKAROUND;
/**
* Dump key events received by text area?
*/
- public static boolean DUMP_KEY_EVENTS = false;
+ public static boolean DUMP_KEY_EVENTS;
/**
* Indent debug.
*/
- public static boolean INDENT_DEBUG = false;
+ public static boolean INDENT_DEBUG;
/**
* Printing debug.
*/
- public static boolean PRINT_DEBUG = false;
+ public static boolean PRINT_DEBUG;
/**
* Create new search dialogs instead of reusing instances.
@@ -147,7 +143,7 @@
* problems with some Java versions.
* @since jEdit 4.3pre1
*/
- public static boolean DISABLE_MULTIHEAD = false;
+ public static boolean DISABLE_MULTIHEAD;
/**
* Does a computational delay. Simulates heavy computations for
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kp...@us...> - 2021-03-25 21:41:58
|
Revision: 25435
http://sourceforge.net/p/jedit/svn/25435
Author: kpouer
Date: 2021-03-25 21:41:56 +0000 (Thu, 25 Mar 2021)
Log Message:
-----------
remove deprecated getFile() method
Modified Paths:
--------------
jEdit/trunk/org/gjt/sp/jedit/Buffer.java
Modified: jEdit/trunk/org/gjt/sp/jedit/Buffer.java
===================================================================
--- jEdit/trunk/org/gjt/sp/jedit/Buffer.java 2021-03-25 21:40:00 UTC (rev 25434)
+++ jEdit/trunk/org/gjt/sp/jedit/Buffer.java 2021-03-25 21:41:56 UTC (rev 25435)
@@ -1341,22 +1341,6 @@
//}}}
- //{{{ Deprecated methods
-
- //{{{ getFile() method
- /**
- * @deprecated Do not call this method, use {@link #getPath()}
- * instead.
- * @return the file
- */
- @Deprecated
- public File getFile()
- {
- return file;
- } //}}}
-
- //}}}
-
//{{{ Marker methods
//{{{ getMarkers() method
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kp...@us...> - 2021-03-25 21:40:02
|
Revision: 25434
http://sourceforge.net/p/jedit/svn/25434
Author: kpouer
Date: 2021-03-25 21:40:00 +0000 (Thu, 25 Mar 2021)
Log Message:
-----------
remove deprecated methods
Modified Paths:
--------------
jEdit/trunk/org/gjt/sp/jedit/io/VFSManager.java
Modified: jEdit/trunk/org/gjt/sp/jedit/io/VFSManager.java
===================================================================
--- jEdit/trunk/org/gjt/sp/jedit/io/VFSManager.java 2021-03-24 22:27:12 UTC (rev 25433)
+++ jEdit/trunk/org/gjt/sp/jedit/io/VFSManager.java 2021-03-25 21:40:00 UTC (rev 25434)
@@ -32,12 +32,10 @@
import java.lang.reflect.InvocationTargetException;
import java.util.*;
-import org.gjt.sp.jedit.bufferio.IoTask;
import org.gjt.sp.jedit.gui.ErrorListDialog;
import org.gjt.sp.jedit.msg.VFSUpdate;
import org.gjt.sp.jedit.*;
import org.gjt.sp.util.Log;
-import org.gjt.sp.util.Task;
import org.gjt.sp.util.TaskManager;
import org.gjt.sp.util.ThreadUtilities;
import org.gjt.sp.util.AwtRunnableQueue;
@@ -226,45 +224,6 @@
return TaskManager.instance.countIoTasks();
} //}}}
- //{{{ runInAWTThread() method
- /**
- * Executes the specified runnable in the AWT thread once all
- * pending I/O requests are complete. Only in one case the
- * <code>Runnable</code> is executed directly: when the current thread
- * is EDT and there are no I/O requests active or queued
- * at the moment of call.
- * @since jEdit 2.5pre1
- * @deprecated Using that method, when you run a task in AWT Thread,
- * it will wait for all background task causing some unwanted delays.
- * If you need calling a task after a background work, please add your
- * runnable to the EDT thread yourself at the end of the background task
- * @see org.gjt.sp.util.ThreadUtilities#runInDispatchThread(Runnable)
- * @see org.gjt.sp.util.ThreadUtilities#runInDispatchThreadAndWait(Runnable)
- */
- @Deprecated
- public static void runInAWTThread(Runnable run)
- {
- AwtRunnableQueue.INSTANCE.runAfterIoTasks(run);
- } //}}}
-
- //{{{ runInWorkThread() method
- /**
- * Executes the specified runnable in one of the I/O threads.
- * @since jEdit 2.6pre2
- * @deprecated You should not use this method, this threadpool
- * links the AWT Threads and Work threads.
- * @see org.gjt.sp.util.ThreadUtilities#runInBackground(org.gjt.sp.util.Task)
- * @see org.gjt.sp.util.ThreadUtilities#runInBackground(Runnable)
- */
- @Deprecated
- public static void runInWorkThread(Task run)
- {
- if(!(run instanceof IoTask))
- throw new IllegalArgumentException();
-
- ThreadUtilities.runInBackground(run);
- } //}}}
-
//}}}
//{{{ error() method
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kp...@us...> - 2021-03-24 22:27:15
|
Revision: 25433
http://sourceforge.net/p/jedit/svn/25433
Author: kpouer
Date: 2021-03-24 22:27:12 +0000 (Wed, 24 Mar 2021)
Log Message:
-----------
minor change in encoding detector to avoid use of instanceof and cast
Modified Paths:
--------------
jEdit/trunk/org/gjt/sp/jedit/bufferio/BufferLoadRequest.java
Added Paths:
-----------
jEdit/trunk/org/gjt/sp/jedit/io/StaticCharsetEncodingDetector.java
Modified: jEdit/trunk/org/gjt/sp/jedit/bufferio/BufferLoadRequest.java
===================================================================
--- jEdit/trunk/org/gjt/sp/jedit/bufferio/BufferLoadRequest.java 2021-03-24 22:25:04 UTC (rev 25432)
+++ jEdit/trunk/org/gjt/sp/jedit/bufferio/BufferLoadRequest.java 2021-03-24 22:27:12 UTC (rev 25433)
@@ -220,7 +220,7 @@
// encodingProviders is consist of given
// encodings as String or contents-aware
// detectors as EncodingDetector.
- List<Object> encodingProviders = new ArrayList<>();
+ List<EncodingDetector> encodingProviders = getEncodingDetectors();
boolean autodetect = buffer.getBooleanProperty(Buffer.ENCODING_AUTODETECT);
if(autodetect)
@@ -227,20 +227,10 @@
{
gzipped = AutoDetection.isGzipped(markedStream);
markedStream.reset();
-
- encodingProviders.addAll(AutoDetection.getEncodingDetectors());
- // If the detected encoding fail, fallback to
- // the original encoding.
- encodingProviders.add(buffer.getStringProperty(JEditBuffer.ENCODING));
-
- String fallbackEncodings = jEdit.getProperty("fallbackEncodings");
- if(fallbackEncodings != null && !fallbackEncodings.isEmpty())
- Collections.addAll(encodingProviders, fallbackEncodings.split("\\s+"));
}
else
{
gzipped = buffer.getBooleanProperty(Buffer.GZIPPED);
- encodingProviders.add(buffer.getStringProperty(JEditBuffer.ENCODING));
}
if(gzipped)
@@ -252,22 +242,10 @@
Collection<String> failedEncodings = new HashSet<>();
Exception encodingError = null;
- for(Object encodingProvider: encodingProviders)
+ for(EncodingDetector encodingProvider: encodingProviders)
{
- String encoding = null;
- if (encodingProvider instanceof String)
- {
- encoding = (String)encodingProvider;
- }
- else if(encodingProvider instanceof EncodingDetector)
- {
- markedStream = rewindContentsStream(markedStream, gzipped);
- encoding = ((EncodingDetector)encodingProvider).detectEncoding(new BufferedInputStream(markedStream));
- }
- else
- {
- Log.log(Log.DEBUG, this, "Strange encodingProvider: " + encodingProvider);
- }
+ markedStream = rewindContentsStream(markedStream, gzipped);
+ String encoding = encodingProvider.detectEncoding(new BufferedInputStream(markedStream));
if(encoding == null || encoding.length() <= 0
|| failedEncodings.contains(encoding))
@@ -326,6 +304,34 @@
}
} //}}}
+ //{{{ getEncodingDetectors() method
+ private List<EncodingDetector> getEncodingDetectors()
+ {
+ List<EncodingDetector> encodingProviders = new ArrayList<>();
+ boolean autodetect = buffer.getBooleanProperty(Buffer.ENCODING_AUTODETECT);
+ if(autodetect)
+ {
+ encodingProviders.addAll(AutoDetection.getEncodingDetectors());
+ // If the detected encoding fail, fallback to
+ // the original encoding.
+ encodingProviders.add(new StaticCharsetEncodingDetector(buffer.getStringProperty(JEditBuffer.ENCODING)));
+
+ String fallbackEncodings = jEdit.getProperty("fallbackEncodings");
+ if(fallbackEncodings != null && !fallbackEncodings.isEmpty())
+ {
+ Arrays.stream(fallbackEncodings
+ .split("\\s+"))
+ .map(StaticCharsetEncodingDetector::new)
+ .forEach(encodingProviders::add);
+ }
+ }
+ else
+ {
+ encodingProviders.add(new StaticCharsetEncodingDetector(buffer.getStringProperty(JEditBuffer.ENCODING)));
+ }
+ return encodingProviders;
+ } //}}}
+
//{{{ readMarkers() method
private static void readMarkers(Buffer buffer, InputStream _in)
throws IOException, InterruptedException
Added: jEdit/trunk/org/gjt/sp/jedit/io/StaticCharsetEncodingDetector.java
===================================================================
--- jEdit/trunk/org/gjt/sp/jedit/io/StaticCharsetEncodingDetector.java (rev 0)
+++ jEdit/trunk/org/gjt/sp/jedit/io/StaticCharsetEncodingDetector.java 2021-03-24 22:27:12 UTC (rev 25433)
@@ -0,0 +1,52 @@
+/*
+ * jEdit - Programmer's Text Editor
+ * :tabSize=8:indentSize=8:noTabs=false:
+ * :folding=explicit:collapseFolds=1:
+ *
+ * Copyright © 2021 jEdit contributors
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+package org.gjt.sp.jedit.io;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * A "detector" that always returns the same charset.
+ *
+ * @author Matthieu Casanova
+ */
+public class StaticCharsetEncodingDetector implements EncodingDetector
+{
+ private final String charset;
+
+ public StaticCharsetEncodingDetector(String charset)
+ {
+ this.charset = charset;
+ }
+
+ @Override
+ public String detectEncoding(InputStream sample) throws IOException
+ {
+ return charset;
+ }
+
+ @Override
+ public String toString()
+ {
+ return "StaticCharsetEncodingDetector{charset='" + charset + '\'' + '}';
+ }
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kp...@us...> - 2021-03-24 22:25:17
|
Revision: 25432
http://sourceforge.net/p/jedit/svn/25432
Author: kpouer
Date: 2021-03-24 22:25:04 +0000 (Wed, 24 Mar 2021)
Log Message:
-----------
add a toString() method
Modified Paths:
--------------
jEdit/trunk/org/gjt/sp/jedit/io/RegexEncodingDetector.java
Modified: jEdit/trunk/org/gjt/sp/jedit/io/RegexEncodingDetector.java
===================================================================
--- jEdit/trunk/org/gjt/sp/jedit/io/RegexEncodingDetector.java 2021-03-24 22:00:37 UTC (rev 25431)
+++ jEdit/trunk/org/gjt/sp/jedit/io/RegexEncodingDetector.java 2021-03-24 22:25:04 UTC (rev 25432)
@@ -108,4 +108,10 @@
found.appendReplacement(replaced, replacement);
return replaced.substring(length_before_match);
}
+
+ @Override
+ public String toString()
+ {
+ return "RegexEncodingDetector{pattern=" + pattern + ", replacement='" + replacement + '\'' + '}';
+ }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kp...@us...> - 2021-03-24 22:00:39
|
Revision: 25431
http://sourceforge.net/p/jedit/svn/25431
Author: kpouer
Date: 2021-03-24 22:00:37 +0000 (Wed, 24 Mar 2021)
Log Message:
-----------
remove unnecessary public modifier and add FunctionalInterface annotation
Modified Paths:
--------------
jEdit/trunk/org/gjt/sp/jedit/io/EncodingDetector.java
Modified: jEdit/trunk/org/gjt/sp/jedit/io/EncodingDetector.java
===================================================================
--- jEdit/trunk/org/gjt/sp/jedit/io/EncodingDetector.java 2021-03-14 07:53:10 UTC (rev 25430)
+++ jEdit/trunk/org/gjt/sp/jedit/io/EncodingDetector.java 2021-03-24 22:00:37 UTC (rev 25431)
@@ -35,6 +35,7 @@
* @since 4.3pre10
* @author Kazutoshi Satoda
*/
+@FunctionalInterface
public interface EncodingDetector
{
/**
@@ -41,5 +42,5 @@
* Returns the name of a detected encoding for the bytes in sample.
* Returns null if this instance could not detect reasonable one.
*/
- public String detectEncoding(InputStream sample) throws IOException;
+ String detectEncoding(InputStream sample) throws IOException;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kp...@us...> - 2021-03-14 07:53:18
|
Revision: 25430
http://sourceforge.net/p/jedit/svn/25430
Author: kpouer
Date: 2021-03-14 07:53:10 +0000 (Sun, 14 Mar 2021)
Log Message:
-----------
fix a possible NPE
Modified Paths:
--------------
jEdit/trunk/org/gjt/sp/jedit/View.java
Modified: jEdit/trunk/org/gjt/sp/jedit/View.java
===================================================================
--- jEdit/trunk/org/gjt/sp/jedit/View.java 2021-03-13 16:13:35 UTC (rev 25429)
+++ jEdit/trunk/org/gjt/sp/jedit/View.java 2021-03-14 07:53:10 UTC (rev 25430)
@@ -54,6 +54,7 @@
import javax.swing.event.CaretEvent;
import javax.swing.event.CaretListener;
+import org.gjt.sp.jedit.manager.BufferManagerImpl;
import org.jedit.options.CombinedOptions;
import org.gjt.sp.jedit.EditBus.EBHandler;
import org.gjt.sp.jedit.bufferset.BufferSet;
@@ -983,9 +984,10 @@
if (mgr.getScope() != BufferSet.Scope.editpane)
break;
}
- Buffer[] bufs = new Buffer[retval.size()];
- retval.toArray(bufs);
- return bufs;
+ if (retval != null)
+ return retval.toArray(BufferManagerImpl.EMPTY_BUFFER_ARRAY);
+
+ return BufferManagerImpl.EMPTY_BUFFER_ARRAY;
}//}}}
//{{{ setBuffer() method
@@ -1741,7 +1743,7 @@
{
return editPane = createEditPane(buffer);
}
- else if(splitConfig == null || splitConfig.trim().length() == 0)
+ else if(splitConfig == null || splitConfig.trim().isEmpty())
{
Buffer buf = bufferManager.getFirst();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kp...@us...> - 2021-03-13 16:13:37
|
Revision: 25429
http://sourceforge.net/p/jedit/svn/25429
Author: kpouer
Date: 2021-03-13 16:13:35 +0000 (Sat, 13 Mar 2021)
Log Message:
-----------
a few cleanup
Modified Paths:
--------------
jEdit/trunk/org/gjt/sp/jedit/EBPlugin.java
jEdit/trunk/org/gjt/sp/jedit/EditAction.java
jEdit/trunk/org/gjt/sp/jedit/EditBus.java
Modified: jEdit/trunk/org/gjt/sp/jedit/EBPlugin.java
===================================================================
--- jEdit/trunk/org/gjt/sp/jedit/EBPlugin.java 2021-03-13 16:08:15 UTC (rev 25428)
+++ jEdit/trunk/org/gjt/sp/jedit/EBPlugin.java 2021-03-13 16:13:35 UTC (rev 25429)
@@ -39,6 +39,7 @@
* Handles a message sent on the EditBus.
*/
// next version: remove this
+ @Override
public void handleMessage(EBMessage message)
{
EditBus.removeFromBus(this);
Modified: jEdit/trunk/org/gjt/sp/jedit/EditAction.java
===================================================================
--- jEdit/trunk/org/gjt/sp/jedit/EditAction.java 2021-03-13 16:08:15 UTC (rev 25428)
+++ jEdit/trunk/org/gjt/sp/jedit/EditAction.java 2021-03-13 16:13:35 UTC (rev 25429)
@@ -46,12 +46,12 @@
* Creates a new edit action with the specified name.
* @param name The action name
*/
- public EditAction(String name)
+ protected EditAction(String name)
{
super(name);
}
- public EditAction(String name, Object[] newArgs)
+ protected EditAction(String name, Object[] newArgs)
{
super(name, newArgs);
} //}}}
@@ -103,7 +103,8 @@
* @since jEdit 2.7pre2
* abstract since jEdit 4.3pre7
*/
- abstract public void invoke(View view);
+ @Override
+ public abstract void invoke(View view);
//}}}
//{{{ isToggle() method
@@ -213,6 +214,7 @@
*
* @param evt The action event
*/
+ @Override
public void actionPerformed(ActionEvent evt)
{
EditAction action = context.getAction(actionName);
Modified: jEdit/trunk/org/gjt/sp/jedit/EditBus.java
===================================================================
--- jEdit/trunk/org/gjt/sp/jedit/EditBus.java 2021-03-13 16:08:15 UTC (rev 25428)
+++ jEdit/trunk/org/gjt/sp/jedit/EditBus.java 2021-03-13 16:13:35 UTC (rev 25429)
@@ -326,27 +326,18 @@
* where modifications to the map are postponed until the map
* is unlocked.
*/
- private static class HandlerList
- extends HashMap<Class<?>, List<EBMessageHandler>>
+ private static class HandlerList extends HashMap<Class<?>, List<EBMessageHandler>>
{
-
public List<EBMessageHandler> safeGet(Class<?> type)
{
- List<EBMessageHandler> lst = super.get(type);
- if (lst == null) {
- lst = new LinkedList<EBMessageHandler>();
- super.put(type, lst);
- }
- return lst;
+ return computeIfAbsent(type, k -> new LinkedList<>());
}
-
public synchronized void lock()
{
lock++;
}
-
public synchronized void unlock()
{
lock--;
@@ -361,7 +352,6 @@
}
}
-
public synchronized void removeComponent(Object comp)
{
if (lock != 0)
@@ -376,17 +366,10 @@
List<EBMessageHandler> handlers = entry.getValue();
if (handlers == null)
continue;
- for (Iterator<EBMessageHandler> it = handlers.iterator();
- it.hasNext(); )
- {
- EBMessageHandler emh = it.next();
- if (emh.comp == comp)
- it.remove();
- }
+ handlers.removeIf(emh -> emh.comp == comp);
}
}
-
public synchronized void addComponent(Object comp)
{
if (lock != 0)
@@ -435,22 +418,20 @@
safeGet(EBMessage.class).add(new EBMessageHandler(comp, null, null));
}
-
private int lock;
- private List<Object> add = new LinkedList<Object>();
- private List<Object> remove = new LinkedList<Object>();
+ private final List<Object> add = new LinkedList<>();
+ private final List<Object> remove = new LinkedList<>();
} //}}}
//{{{ SendMessage class
private static class SendMessage implements Runnable
{
-
- public SendMessage(EBMessage message)
+ SendMessage(EBMessage message)
{
this.message = message;
}
-
+ @Override
public void run()
{
Log.log(Log.DEBUG,EditBus.class,message.toString());
@@ -466,7 +447,7 @@
}
}
- private EBMessage message;
+ private final EBMessage message;
} //}}}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kp...@us...> - 2021-03-13 16:08:18
|
Revision: 25428
http://sourceforge.net/p/jedit/svn/25428
Author: kpouer
Date: 2021-03-13 16:08:15 +0000 (Sat, 13 Mar 2021)
Log Message:
-----------
minor cleanup
Modified Paths:
--------------
jEdit/trunk/org/gjt/sp/jedit/Abbrevs.java
Modified: jEdit/trunk/org/gjt/sp/jedit/Abbrevs.java
===================================================================
--- jEdit/trunk/org/gjt/sp/jedit/Abbrevs.java 2021-03-13 12:51:06 UTC (rev 25427)
+++ jEdit/trunk/org/gjt/sp/jedit/Abbrevs.java 2021-03-13 16:08:15 UTC (rev 25428)
@@ -24,6 +24,7 @@
//{{{ Imports
import java.io.*;
+import java.nio.charset.StandardCharsets;
import java.util.*;
import org.gjt.sp.jedit.gui.AddAbbrevDialog;
import org.gjt.sp.jedit.textarea.*;
@@ -37,8 +38,6 @@
*/
public class Abbrevs
{
- public static final String ENCODING = "UTF8";
-
//{{{ getExpandOnInput() method
/**
* @return if abbreviations should be expanded after the
@@ -87,7 +86,7 @@
int caret = textArea.getCaretPosition();
String lineText = buffer.getLineText(line);
- if(lineText.length() == 0)
+ if(lineText.isEmpty())
{
if(add)
javax.swing.UIManager.getLookAndFeel().provideErrorFeedback(null);
@@ -181,8 +180,7 @@
view.getStatus().setMessageAndClear(
jEdit.getProperty(
"view.status.incomplete-abbrev",
- new Integer[] { Integer.valueOf(m_pp.size()),
- Integer.valueOf(expand.posParamCount) }));
+ new Integer[] {m_pp.size(), expand.posParamCount}));
}
return true;
@@ -268,12 +266,7 @@
if(!loaded)
load();
- Hashtable<String,String> modeAbbrevs = modes.get(mode);
- if(modeAbbrevs == null)
- {
- modeAbbrevs = new Hashtable<String,String>();
- modes.put(mode,modeAbbrevs);
- }
+ Map<String, String> modeAbbrevs = modes.computeIfAbsent(mode, k -> new Hashtable<>());
modeAbbrevs.put(abbrev,expansion);
abbrevsChanged = true;
} //}}}
@@ -301,7 +294,7 @@
{
saveAbbrevs(new OutputStreamWriter(
new FileOutputStream(file1),
- ENCODING));
+ StandardCharsets.UTF_8));
file2.delete();
file1.renameTo(file2);
}
@@ -351,7 +344,7 @@
try
{
loadAbbrevs(new InputStreamReader(
- new FileInputStream(file),ENCODING));
+ new FileInputStream(file), StandardCharsets.UTF_8));
loaded = true;
}
catch(FileNotFoundException fnf)
@@ -371,7 +364,7 @@
{
loadAbbrevs(new InputStreamReader(Abbrevs.class
.getResourceAsStream("default.abbrevs"),
- ENCODING));
+ StandardCharsets.UTF_8));
}
catch(Exception e)
{
@@ -406,7 +399,7 @@
// try mode-specific abbrevs first
String expand = null;
- Hashtable<String,String> modeAbbrevs = modes.get(mode);
+ Map<String,String> modeAbbrevs = modes.get(mode);
if(modeAbbrevs != null)
expand = modeAbbrevs.get(abbrev);
@@ -433,7 +426,7 @@
{
int index = line.indexOf('|');
- if(line.length() == 0)
+ if(line.isEmpty())
continue;
else if(line.startsWith("[") && index == -1)
{
@@ -443,12 +436,7 @@
{
String mode = line.substring(1,
line.length() - 1);
- currentAbbrevs = modes.get(mode);
- if(currentAbbrevs == null)
- {
- currentAbbrevs = new Hashtable<String,String>();
- modes.put(mode,currentAbbrevs);
- }
+ currentAbbrevs = modes.computeIfAbsent(mode, k -> new Hashtable<>());
}
}
else if(index != -1)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kp...@us...> - 2021-03-13 12:51:10
|
Revision: 25427
http://sourceforge.net/p/jedit/svn/25427
Author: kpouer
Date: 2021-03-13 12:51:06 +0000 (Sat, 13 Mar 2021)
Log Message:
-----------
add missing Override annotation
Modified Paths:
--------------
jEdit/trunk/org/gjt/sp/jedit/JARClassLoader.java
Modified: jEdit/trunk/org/gjt/sp/jedit/JARClassLoader.java
===================================================================
--- jEdit/trunk/org/gjt/sp/jedit/JARClassLoader.java 2021-03-13 09:34:17 UTC (rev 25426)
+++ jEdit/trunk/org/gjt/sp/jedit/JARClassLoader.java 2021-03-13 12:51:06 UTC (rev 25427)
@@ -76,6 +76,7 @@
/**
* @exception ClassNotFoundException if the class could not be found
*/
+ @Override
public Class loadClass(String clazz, boolean resolveIt)
throws ClassNotFoundException
{
@@ -125,6 +126,7 @@
} //}}}
//{{{ getResourceAsStream() method
+ @Override
public InputStream getResourceAsStream(String name)
{
try
@@ -162,6 +164,7 @@
* overriding getResource() because we want to search FIRST in this
* ClassLoader, then the parent, the path, etc.
*/
+ @Override
public URL getResource(String name)
{
try
@@ -273,11 +276,13 @@
this.element = element;
}
+ @Override
public boolean hasMoreElements()
{
return element != null;
}
+ @Override
public URL nextElement()
{
if(element != null)
@@ -297,6 +302,7 @@
//{{{ finalize() method
// TODO: 'finalize' is deprecated as of Java 9
+ @Override
@SuppressWarnings("deprecation")
protected void finalize()
{
@@ -377,10 +383,10 @@
private static int INDEX;
private static int live;
- private static Map<String, Object> classHash = new Hashtable<String, Object>();
- private static Map<String, Object> resourcesHash = new HashMap<String, Object>();
+ private static final Map<String, Object> classHash = new Hashtable<>();
+ private static final Map<String, Object> resourcesHash = new HashMap<>();
- private int id;
+ private final int id;
private boolean delegateFirst;
private PluginJAR jar;
@@ -488,7 +494,7 @@
Attributes ma = mf.getMainAttributes();
URL sealBase = null;
- if (Boolean.valueOf(getMfValue(sa, ma, Name.SEALED)))
+ if (Boolean.parseBoolean(getMfValue(sa, ma, Name.SEALED)))
{
try
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kp...@us...> - 2021-03-13 09:34:20
|
Revision: 25426
http://sourceforge.net/p/jedit/svn/25426
Author: kpouer
Date: 2021-03-13 09:34:17 +0000 (Sat, 13 Mar 2021)
Log Message:
-----------
minor cleanup
Modified Paths:
--------------
jEdit/trunk/org/gjt/sp/jedit/gui/statusbar/MemoryStatusWidgetFactory.java
Modified: jEdit/trunk/org/gjt/sp/jedit/gui/statusbar/MemoryStatusWidgetFactory.java
===================================================================
--- jEdit/trunk/org/gjt/sp/jedit/gui/statusbar/MemoryStatusWidgetFactory.java 2021-03-13 09:13:04 UTC (rev 25425)
+++ jEdit/trunk/org/gjt/sp/jedit/gui/statusbar/MemoryStatusWidgetFactory.java 2021-03-13 09:34:17 UTC (rev 25426)
@@ -91,7 +91,7 @@
// fucking GTK look and feel
Font font = new JLabel().getFont();
//Font font = UIManager.getFont("Label.font");
- MemoryStatus.this.setFont(font);
+ setFont(font);
FontRenderContext frc = new FontRenderContext(null,true,false);
Rectangle2D bounds = font.getStringBounds(
@@ -156,7 +156,7 @@
@Override
public void actionPerformed(ActionEvent evt)
{
- MemoryStatus.this.repaint();
+ repaint();
} //}}}
//{{{ paintComponent() method
@@ -170,10 +170,8 @@
long total = runtime.totalMemory();
long used = total - free;
- int width = MemoryStatus.this.getWidth()
- - insets.left - insets.right;
- int height = MemoryStatus.this.getHeight()
- - insets.top - insets.bottom - 1;
+ int width = getWidth() - insets.left - insets.right;
+ int height = getHeight() - insets.top - insets.bottom - 1;
float fraction = ((float)used) / total;
@@ -206,11 +204,11 @@
(int)(insets.top + lm.getAscent()));
g2.setClip(insets.left + (int)(width * fraction),
- insets.top,MemoryStatus.this.getWidth()
+ insets.top, getWidth()
- insets.left - (int)(width * fraction),
height);
- g2.setColor(MemoryStatus.this.getForeground());
+ g2.setColor(getForeground());
g2.drawString(str,
insets.left + ((int) (width - bounds.getWidth()) >> 1),
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kp...@us...> - 2021-03-13 09:13:11
|
Revision: 25425
http://sourceforge.net/p/jedit/svn/25425
Author: kpouer
Date: 2021-03-13 09:13:04 +0000 (Sat, 13 Mar 2021)
Log Message:
-----------
minor cleanup
Modified Paths:
--------------
jEdit/trunk/org/gjt/sp/jedit/gui/RolloverToggleButton.java
jEdit/trunk/org/gjt/sp/jedit/gui/ScreenRectangleSelectionButton.java
jEdit/trunk/org/gjt/sp/jedit/gui/SelectLineRange.java
Modified: jEdit/trunk/org/gjt/sp/jedit/gui/RolloverToggleButton.java
===================================================================
--- jEdit/trunk/org/gjt/sp/jedit/gui/RolloverToggleButton.java 2021-03-13 09:08:42 UTC (rev 25424)
+++ jEdit/trunk/org/gjt/sp/jedit/gui/RolloverToggleButton.java 2021-03-13 09:13:04 UTC (rev 25425)
@@ -45,10 +45,9 @@
*/
public class RolloverToggleButton extends JToggleButton
{
+ private final Border originalBorder;
+ private final Border rolloverBorder;
- private Border originalBorder;
- private Border rolloverBorder;
-
//{{{ RolloverButton constructor
/**
* Setup the border
@@ -79,6 +78,7 @@
} //}}}
//{{{ updateUI() method
+ @Override
public void updateUI()
{
super.updateUI();
@@ -87,6 +87,7 @@
} //}}}
//{{{ setEnabled() method
+ @Override
public void setEnabled(boolean b)
{
super.setEnabled(b);
@@ -95,6 +96,7 @@
} //}}}
//{{{ setBorderPainted() method
+ @Override
public void setBorderPainted(boolean b)
{
try
@@ -114,6 +116,7 @@
* We block calls to revalidate() from a setBorderPainted(), for
* performance reasons.
*/
+ @Override
public void revalidate()
{
if(!revalidateBlocked)
@@ -121,6 +124,7 @@
} //}}}
//{{{ paint() method
+ @Override
public void paint(Graphics g)
{
if(isEnabled())
@@ -145,6 +149,7 @@
*/
class MouseOverHandler extends MouseAdapter
{
+ @Override
public void mouseEntered(MouseEvent e)
{
setBorder(rolloverBorder);
@@ -152,6 +157,7 @@
setBorderPainted(true);
}
+ @Override
public void mouseExited(MouseEvent e)
{
setBorder(originalBorder);
Modified: jEdit/trunk/org/gjt/sp/jedit/gui/ScreenRectangleSelectionButton.java
===================================================================
--- jEdit/trunk/org/gjt/sp/jedit/gui/ScreenRectangleSelectionButton.java 2021-03-13 09:08:42 UTC (rev 25424)
+++ jEdit/trunk/org/gjt/sp/jedit/gui/ScreenRectangleSelectionButton.java 2021-03-13 09:13:04 UTC (rev 25425)
@@ -109,16 +109,19 @@
this.image = image;
}
+ @Override
public int getIconWidth()
{
return dimension.width;
}
+ @Override
public int getIconHeight()
{
return dimension.height;
}
+ @Override
public void paintIcon(Component c, Graphics g, int x, int y)
{
g = g.create();
@@ -136,6 +139,7 @@
//{{{ ActionHandler class
class ActionHandler implements ActionListener
{
+ @Override
public void actionPerformed(ActionEvent evt)
{
int iconWidth = getIcon().getIconWidth();
Modified: jEdit/trunk/org/gjt/sp/jedit/gui/SelectLineRange.java
===================================================================
--- jEdit/trunk/org/gjt/sp/jedit/gui/SelectLineRange.java 2021-03-13 09:08:42 UTC (rev 25424)
+++ jEdit/trunk/org/gjt/sp/jedit/gui/SelectLineRange.java 2021-03-13 09:13:04 UTC (rev 25425)
@@ -31,6 +31,7 @@
import org.gjt.sp.util.GenericGUIUtilities;
import org.gjt.sp.jedit.*;
//}}}
+
/** Dialog for selection of a range of lines */
public class SelectLineRange extends EnhancedDialog implements ActionListener
{
@@ -78,6 +79,7 @@
} //}}}
//{{{ ok() method
+ @Override
public void ok()
{
int startLine;
@@ -117,6 +119,7 @@
} //}}}
//{{{ cancel() method
+ @Override
public void cancel()
{
dispose();
@@ -123,6 +126,7 @@
} //}}}
//{{{ actionPerformed() method
+ @Override
public void actionPerformed(ActionEvent evt)
{
Object source = evt.getSource();
@@ -135,11 +139,11 @@
//{{{ Private members
//{{{ Instance variables
- private View view;
+ private final View view;
private NumericTextField startField;
private NumericTextField endField;
- private JButton ok;
- private JButton cancel;
+ private final JButton ok;
+ private final JButton cancel;
//}}}
//{{{ createFieldPanel() method
@@ -162,11 +166,13 @@
FocusListener focusListener = new FocusListener()
{
- public void focusGained(FocusEvent fe)
+ @Override
+ public void focusGained(FocusEvent fe)
{
((JTextField)fe.getSource()).selectAll();
}
+ @Override
public void focusLost(FocusEvent fe)
{
JTextField source = (JTextField)fe.getSource();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kp...@us...> - 2021-03-13 09:08:49
|
Revision: 25424
http://sourceforge.net/p/jedit/svn/25424
Author: kpouer
Date: 2021-03-13 09:08:42 +0000 (Sat, 13 Mar 2021)
Log Message:
-----------
minor cleanup
Modified Paths:
--------------
jEdit/trunk/org/gjt/sp/jedit/gui/PanelWindowContainer.java
Modified: jEdit/trunk/org/gjt/sp/jedit/gui/PanelWindowContainer.java
===================================================================
--- jEdit/trunk/org/gjt/sp/jedit/gui/PanelWindowContainer.java 2021-03-13 09:07:49 UTC (rev 25423)
+++ jEdit/trunk/org/gjt/sp/jedit/gui/PanelWindowContainer.java 2021-03-13 09:08:42 UTC (rev 25424)
@@ -115,8 +115,8 @@
buttonGroup.add(nullButton = new JToggleButton());
//}}}
- dockables = new ArrayList<DockableWindowManagerImpl.Entry>();
- buttons = new ArrayList<AbstractButton>();
+ dockables = new ArrayList<>();
+ buttons = new ArrayList<>();
dockablePanel = new DockablePanel(this);
this.dimension = dimension;
@@ -312,8 +312,7 @@
}
else
{
- Object reason = DockableWindowUpdate.DEACTIVATED;
- EditBus.send(new DockableWindowUpdate(wm, reason, current.factory.name));
+ EditBus.send(new DockableWindowUpdate(wm, DockableWindowUpdate.DEACTIVATED, current.factory.name));
current = null;
nullButton.setSelected(true);
// removing last component, so remove border
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kp...@us...> - 2021-03-13 09:07:52
|
Revision: 25423
http://sourceforge.net/p/jedit/svn/25423
Author: kpouer
Date: 2021-03-13 09:07:49 +0000 (Sat, 13 Mar 2021)
Log Message:
-----------
no need to test "current" as it is never null when arriving here
Modified Paths:
--------------
jEdit/trunk/org/gjt/sp/jedit/gui/PanelWindowContainer.java
Modified: jEdit/trunk/org/gjt/sp/jedit/gui/PanelWindowContainer.java
===================================================================
--- jEdit/trunk/org/gjt/sp/jedit/gui/PanelWindowContainer.java 2021-03-13 09:07:11 UTC (rev 25422)
+++ jEdit/trunk/org/gjt/sp/jedit/gui/PanelWindowContainer.java 2021-03-13 09:07:49 UTC (rev 25423)
@@ -312,12 +312,8 @@
}
else
{
- if (current != null)
- {
-
- Object reason = DockableWindowUpdate.DEACTIVATED;
- EditBus.send(new DockableWindowUpdate(wm, reason, current.factory.name));
- }
+ Object reason = DockableWindowUpdate.DEACTIVATED;
+ EditBus.send(new DockableWindowUpdate(wm, reason, current.factory.name));
current = null;
nullButton.setSelected(true);
// removing last component, so remove border
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kp...@us...> - 2021-03-13 09:07:13
|
Revision: 25422
http://sourceforge.net/p/jedit/svn/25422
Author: kpouer
Date: 2021-03-13 09:07:11 +0000 (Sat, 13 Mar 2021)
Log Message:
-----------
add a Nullable annotation and encapsulate fields
Modified Paths:
--------------
jEdit/trunk/org/gjt/sp/jedit/gui/PanelWindowContainer.java
Modified: jEdit/trunk/org/gjt/sp/jedit/gui/PanelWindowContainer.java
===================================================================
--- jEdit/trunk/org/gjt/sp/jedit/gui/PanelWindowContainer.java 2021-03-13 08:54:31 UTC (rev 25421)
+++ jEdit/trunk/org/gjt/sp/jedit/gui/PanelWindowContainer.java 2021-03-13 09:07:11 UTC (rev 25422)
@@ -45,6 +45,7 @@
import java.util.Comparator;
import java.util.List;
+import javax.annotation.Nullable;
import javax.swing.AbstractButton;
import javax.swing.ButtonGroup;
import javax.swing.Icon;
@@ -446,6 +447,7 @@
private JPopupMenu popup;
// remember the most recent dockable
+ @Nullable
private String mostRecent;
//}}}
@@ -540,12 +542,13 @@
//{{{ DockBorder class
static class DockBorder implements Border
{
- String position;
- Insets insets;
- Color color1;
- Color color2;
- Color color3;
+ private final String position;
+ private final Insets insets;
+ private Color color1;
+ private Color color2;
+ private Color color3;
+
//{{{ DockBorder constructor
DockBorder(String position)
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kp...@us...> - 2021-03-13 08:54:34
|
Revision: 25421
http://sourceforge.net/p/jedit/svn/25421
Author: kpouer
Date: 2021-03-13 08:54:31 +0000 (Sat, 13 Mar 2021)
Log Message:
-----------
add missing @Override annotations
Modified Paths:
--------------
jEdit/trunk/org/gjt/sp/jedit/gui/DockableLayout.java
Modified: jEdit/trunk/org/gjt/sp/jedit/gui/DockableLayout.java
===================================================================
--- jEdit/trunk/org/gjt/sp/jedit/gui/DockableLayout.java 2021-03-13 08:32:47 UTC (rev 25420)
+++ jEdit/trunk/org/gjt/sp/jedit/gui/DockableLayout.java 2021-03-13 08:54:31 UTC (rev 25421)
@@ -65,6 +65,7 @@
} //}}}
//{{{ addLayoutComponent() method
+ @Override
public void addLayoutComponent(String name, Component comp)
{
addLayoutComponent(comp, name);
@@ -71,6 +72,7 @@
} //}}}
//{{{ addLayoutComponent() method
+ @Override
public void addLayoutComponent(Component comp, Object cons)
{
if(cons == null || CENTER.equals(cons))
@@ -94,6 +96,7 @@
} //}}}
//{{{ removeLayoutComponent() method
+ @Override
public void removeLayoutComponent(Component comp)
{
if(center == comp)
@@ -109,6 +112,7 @@
} //}}}
//{{{ preferredLayoutSize() method
+ @Override
public Dimension preferredLayoutSize(Container parent)
{
Dimension prefSize = new Dimension(0,0);
@@ -138,6 +142,7 @@
} //}}}
//{{{ minimumLayoutSize() method
+ @Override
public Dimension minimumLayoutSize(Container parent)
{
// I'm lazy
@@ -145,6 +150,7 @@
} //}}}
//{{{ maximumLayoutSize() method
+ @Override
public Dimension maximumLayoutSize(Container parent)
{
return new Dimension(Integer.MAX_VALUE,Integer.MAX_VALUE);
@@ -151,6 +157,7 @@
} //}}}
//{{{ layoutContainer() method
+ @Override
public void layoutContainer(Container parent)
{
Dimension size = parent.getSize();
@@ -158,10 +165,10 @@
Dimension _topToolbars = new Dimension(0,0);
Dimension _bottomToolbars = new Dimension(0,0);
- int topButtonHeight = -1;
- int bottomButtonHeight = -1;
- int leftButtonWidth = -1;
- int rightButtonWidth = -1;
+ int topButtonHeight;
+ int bottomButtonHeight;
+ int leftButtonWidth;
+ int rightButtonWidth;
Dimension _top = top.getPreferredSize();
Dimension _left = left.getPreferredSize();
@@ -445,6 +452,7 @@
} //}}}
//{{{ getLayoutAlignmentX() method
+ @Override
public float getLayoutAlignmentX(Container target)
{
return 0.5f;
@@ -451,6 +459,7 @@
} //}}}
//{{{ getLayoutAlignmentY() method
+ @Override
public float getLayoutAlignmentY(Container target)
{
return 0.5f;
@@ -457,6 +466,7 @@
} //}}}
//{{{ invalidateLayout() method
+ @Override
public void invalidateLayout(Container target) {}
//}}}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <kp...@us...> - 2021-03-13 08:32:48
|
Revision: 25420
http://sourceforge.net/p/jedit/svn/25420
Author: kpouer
Date: 2021-03-13 08:32:47 +0000 (Sat, 13 Mar 2021)
Log Message:
-----------
Some cleanup
Modified Paths:
--------------
jEdit/trunk/org/gjt/sp/jedit/gui/DockableWindowFactory.java
jEdit/trunk/org/gjt/sp/jedit/gui/DockableWindowManager.java
jEdit/trunk/org/gjt/sp/jedit/gui/DockableWindowManagerProvider.java
jEdit/trunk/org/gjt/sp/jedit/gui/DockingLayoutManager.java
Modified: jEdit/trunk/org/gjt/sp/jedit/gui/DockableWindowFactory.java
===================================================================
--- jEdit/trunk/org/gjt/sp/jedit/gui/DockableWindowFactory.java 2021-02-13 18:09:26 UTC (rev 25419)
+++ jEdit/trunk/org/gjt/sp/jedit/gui/DockableWindowFactory.java 2021-03-13 08:32:47 UTC (rev 25420)
@@ -23,15 +23,10 @@
package org.gjt.sp.jedit.gui;
//{{{ Imports
-import java.awt.Color;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.Map;
-import java.util.Stack;
+import java.util.*;
import javax.swing.JComponent;
import javax.swing.LookAndFeel;
@@ -127,14 +122,7 @@
*/
public void unloadDockableWindows(PluginJAR plugin)
{
- Iterator entries = dockableWindowFactories.entrySet().iterator();
- while(entries.hasNext())
- {
- Map.Entry entry = (Map.Entry)entries.next();
- Window factory = (Window)entry.getValue();
- if(factory.plugin == plugin)
- entries.remove();
- }
+ dockableWindowFactories.entrySet().removeIf(entry -> plugin == entry.getValue().plugin);
} //}}}
//{{{ cacheDockableWindows() method
@@ -215,14 +203,14 @@
{
this.plugin = plugin;
this.uri = uri;
- stateStack = new Stack<String>();
+ stateStack = new Stack<>();
actions = true;
movable = MOVABLE_DEFAULT;
code = new StringBuilder();
- cachedDockableNames = new LinkedList<String>();
- cachedDockableActionFlags = new LinkedList<Boolean>();
- cachedDockableMovableFlags = new LinkedList<Boolean>();
+ cachedDockableNames = new LinkedList<>();
+ cachedDockableActionFlags = new LinkedList<>();
+ cachedDockableMovableFlags = new LinkedList<>();
} //}}}
//{{{ resolveEntity() method
@@ -273,10 +261,8 @@
registerDockableWindow(plugin,
dockableName,code.toString(),actions, movable);
cachedDockableNames.add(dockableName);
- cachedDockableActionFlags.add(
- Boolean.valueOf(actions));
- cachedDockableMovableFlags.add(
- Boolean.valueOf(movable));
+ cachedDockableActionFlags.add(actions);
+ cachedDockableMovableFlags.add(movable);
// make default be true for the next
// action
actions = true;
@@ -338,7 +324,7 @@
int i = 0;
for (Boolean value : list)
{
- returnValue[i++] = value.booleanValue();
+ returnValue[i++] = value;
}
return returnValue;
@@ -347,21 +333,21 @@
//{{{ Private members
//{{{ Instance variables
- private PluginJAR plugin;
+ private final PluginJAR plugin;
// What is the purpose of this?
private URL uri;
- private java.util.List<String> cachedDockableNames;
- private java.util.List<Boolean> cachedDockableActionFlags;
- private java.util.List<Boolean> cachedDockableMovableFlags;
+ private final java.util.List<String> cachedDockableNames;
+ private final java.util.List<Boolean> cachedDockableActionFlags;
+ private final java.util.List<Boolean> cachedDockableMovableFlags;
private String dockableName;
- private StringBuilder code;
+ private final StringBuilder code;
private boolean actions;
private boolean movable;
static final boolean MOVABLE_DEFAULT = false;
- private Stack<String> stateStack;
+ private final Stack<String> stateStack;
//}}}
//{{{ pushElement() method
@@ -397,7 +383,7 @@
String code;
boolean loaded;
boolean movable;
- boolean isBeingCreated = false;
+ boolean isBeingCreated;
//{{{ Window constructor
Window(PluginJAR plugin, String name, String code,
@@ -498,16 +484,17 @@
//{{{ OpenAction class
class OpenAction extends EditAction
{
- private String dockable;
+ private final String dockable;
//{{{ OpenAction constructor
OpenAction(String name)
{
super(name);
- this.dockable = name;
+ dockable = name;
} //}}}
//{{{ invoke() method
+ @Override
public void invoke(View view)
{
view.getDockableWindowManager()
@@ -526,16 +513,17 @@
//{{{ ToggleAction class
class ToggleAction extends EditAction
{
- private String dockable;
+ private final String dockable;
//{{{ ToggleAction constructor
ToggleAction(String name)
{
super(name + "-toggle");
- this.dockable = name;
+ dockable = name;
} //}}}
//{{{ invoke() method
+ @Override
public void invoke(View view)
{
view.getDockableWindowManager()
@@ -561,16 +549,17 @@
//{{{ FloatAction class
class FloatAction extends EditAction
{
- private String dockable;
+ private final String dockable;
//{{{ FloatAction constructor
FloatAction(String name)
{
super(name + "-float");
- this.dockable = name;
+ dockable = name;
} //}}}
//{{{ invoke() method
+ @Override
public void invoke(View view)
{
view.getDockableWindowManager()
Modified: jEdit/trunk/org/gjt/sp/jedit/gui/DockableWindowManager.java
===================================================================
--- jEdit/trunk/org/gjt/sp/jedit/gui/DockableWindowManager.java 2021-02-13 18:09:26 UTC (rev 25419)
+++ jEdit/trunk/org/gjt/sp/jedit/gui/DockableWindowManager.java 2021-03-13 08:32:47 UTC (rev 25420)
@@ -5,7 +5,6 @@
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.io.File;
-import java.io.FilenameFilter;
import java.util.*;
import java.util.Map.Entry;
@@ -434,12 +433,7 @@
// {{{ addPluginDockable
private void addPluginDockable(PluginJAR plugin, String name)
{
- Set<String> dockables = plugins.get(plugin);
- if (dockables == null)
- {
- dockables = new HashSet<String>();
- plugins.put(plugin, dockables);
- }
+ Set<String> dockables = plugins.computeIfAbsent(plugin, k -> new HashSet<>());
dockables.add(name);
}
// }}}
@@ -560,7 +554,7 @@
{
String oldPosition = positions.get(dockable);
String newPosition = getDockablePosition(dockable);
- if (oldPosition == null || !newPosition.equals(oldPosition))
+ if (!newPosition.equals(oldPosition))
{
positions.put(dockable, newPosition);
dockingPositionChanged(dockable, oldPosition, newPosition);
@@ -678,10 +672,10 @@
private List<Key> parseShortcut(String shortcut)
{
String [] parts = shortcut.split("\\s+");
- List<Key> keys = new ArrayList<Key>(parts.length);
+ List<Key> keys = new ArrayList<>(parts.length);
for (String part: parts)
{
- if (part.length() > 0)
+ if (!part.isEmpty())
keys.add(KeyEventTranslator.parseKey(part));
}
return keys;
@@ -704,19 +698,15 @@
{
}
- public String [] getSavedLayouts()
+ public String[] getSavedLayouts()
{
String layoutDir = getLayoutDirectory();
if (layoutDir == null)
return null;
File dir = new File(layoutDir);
- File[] files = dir.listFiles(new FilenameFilter()
- {
- public boolean accept(File dir, String name)
- {
- return name.endsWith(".xml");
- }
- });
+ File[] files = dir.listFiles((dir1, name) -> name.endsWith(".xml"));
+ if (files == null)
+ return null;
String[] layouts = new String[files.length];
for (int i = 0; i < files.length; i++)
layouts[i] = fileToLayout(files[i].getName());
Modified: jEdit/trunk/org/gjt/sp/jedit/gui/DockableWindowManagerProvider.java
===================================================================
--- jEdit/trunk/org/gjt/sp/jedit/gui/DockableWindowManagerProvider.java 2021-02-13 18:09:26 UTC (rev 25419)
+++ jEdit/trunk/org/gjt/sp/jedit/gui/DockableWindowManagerProvider.java 2021-03-13 08:32:47 UTC (rev 25420)
@@ -4,7 +4,6 @@
import org.gjt.sp.jedit.View.ViewConfig;
import org.gjt.sp.jedit.gui.DockableWindowManager.DockingLayout;
-
/** jEdit's classic dockable window manager, turned into a "provider" service.
*
* @author Shlomy Reinstein
@@ -12,15 +11,15 @@
*/
public class DockableWindowManagerProvider implements DockingFrameworkProvider
{
- public DockableWindowManager create(View view,
- DockableWindowFactory instance, ViewConfig config)
+ @Override
+ public DockableWindowManager create(View view, DockableWindowFactory instance, ViewConfig config)
{
return new DockableWindowManagerImpl(view, instance, config);
}
+ @Override
public DockingLayout createDockingLayout()
{
return new DockableWindowManagerImpl.DockableWindowConfig();
}
-
}
Modified: jEdit/trunk/org/gjt/sp/jedit/gui/DockingLayoutManager.java
===================================================================
--- jEdit/trunk/org/gjt/sp/jedit/gui/DockingLayoutManager.java 2021-02-13 18:09:26 UTC (rev 25419)
+++ jEdit/trunk/org/gjt/sp/jedit/gui/DockingLayoutManager.java 2021-03-13 08:32:47 UTC (rev 25420)
@@ -2,7 +2,9 @@
import java.util.HashMap;
import java.util.Map;
+import java.util.Objects;
+import javax.annotation.Nonnull;
import javax.swing.JOptionPane;
import org.gjt.sp.jedit.ActionSet;
@@ -20,6 +22,7 @@
import org.gjt.sp.jedit.msg.EditPaneUpdate;
import org.gjt.sp.jedit.msg.ViewUpdate;
import org.gjt.sp.jedit.options.DockingOptionPane;
+import org.gjt.sp.util.StandardUtilities;
/** Saves and loads dockable layouts to disk
@author Shlomy Reinstein
@@ -35,12 +38,13 @@
private static final String SAVE_LAYOUT_MESSAGE = "save-layout.message";
private static ActionSet actions;
private static DockingLayoutManager instance;
- private Map<View, String> currentMode;
+ private final Map<View, String> currentMode;
private DockingLayoutManager()
{
- currentMode = new HashMap<View, String>();
+ currentMode = new HashMap<>();
}
+
private static boolean save(View view, String layoutName)
{
if (jEdit.getSettingsDirectory() == null)
@@ -114,7 +118,7 @@
if (docking != null)
layouts = docking.getSavedLayouts();
if (layouts == null)
- return new String[0];
+ return StandardUtilities.EMPTY_STRING_ARRAY;
return layouts;
}
@@ -150,7 +154,7 @@
{
private static final String LOAD_PREFIX = "load-";
- public LoadPerspectiveAction(String layoutName)
+ LoadPerspectiveAction(String layoutName)
{
super(LOAD_PREFIX + layoutName, new String[] { layoutName });
jEdit.setTemporaryProperty(LOAD_PREFIX + layoutName + ".label", LOAD_PREFIX + layoutName);
@@ -163,7 +167,7 @@
}
}
- private boolean canChangeEditMode(EBMessage message)
+ private static boolean canChangeEditMode(EBMessage message)
{
if (message instanceof BufferUpdate)
{
@@ -189,6 +193,7 @@
return false;
}
+ @Override
public void handleMessage(EBMessage message)
{
boolean autoLoadModeLayout = jEdit.getBooleanProperty(
@@ -214,10 +219,8 @@
return;
String newMode = getCurrentEditMode(view);
String mode = currentMode.get(view);
- boolean sameMode =
- (mode == null && newMode == null) ||
- (mode != null && mode.equals(newMode));
- if (! sameMode)
+ boolean sameMode = Objects.equals(mode, newMode);
+ if (!sameMode)
{
boolean autoSaveModeLayout = jEdit.getBooleanProperty(
DockingOptionPane.AUTO_SAVE_MODE_LAYOUT_PROP, false);
@@ -228,7 +231,7 @@
}
}
- private String getCurrentEditMode(View view)
+ private static String getCurrentEditMode(View view)
{
Buffer buffer = view.getBuffer();
if (buffer == null)
@@ -241,19 +244,15 @@
private static final String GLOBAL_MODE = "DEFAULT";
- private void saveModeLayout(View view, String mode)
+ private static void saveModeLayout(View view, String mode)
{
String modeLayout = getModePerspective(mode);
- if (modeLayout == null)
- return;
save(view, modeLayout);
}
- private void loadModeLayout(View view, String mode)
+ private static void loadModeLayout(View view, String mode)
{
String modeLayout = getModePerspective(mode);
- if (modeLayout == null)
- return;
load(view, modeLayout);
}
@@ -261,8 +260,8 @@
{
if (view == null)
return;
- String mode = instance.getCurrentEditMode(view);
- instance.loadModeLayout(view, mode);
+ String mode = DockingLayoutManager.getCurrentEditMode(view);
+ loadModeLayout(view, mode);
}
public static void saveCurrentModeLayout(View view)
@@ -269,11 +268,12 @@
{
if (view == null)
return;
- String mode = instance.getCurrentEditMode(view);
- instance.saveModeLayout(view, mode);
+ String mode = DockingLayoutManager.getCurrentEditMode(view);
+ saveModeLayout(view, mode);
}
- private String getModePerspective(String mode)
+ @Nonnull
+ private static String getModePerspective(String mode)
{
if (mode == null)
mode = GLOBAL_MODE;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|