[prev in list] [next in list] [prev in thread] [next in thread]
List: jedit-cvs
Subject: [ jEdit-commits ] SF.net SVN: jedit:[25350] jEdit/trunk/org/gjt/sp/jedit/BeanShell.java
From: kpouer--- via jEdit-CVS <jedit-cvs () lists ! sourceforge ! net>
Date: 2020-07-02 6:54:09
Message-ID: 1593672849.793032.13351 () sfp-scm-5 ! v30 ! lw ! sourceforge ! com
[Download RAW message or body]
Revision: 25350
http://sourceforge.net/p/jedit/svn/25350
Author: kpouer
Date: 2020-07-02 06:54:09 +0000 (Thu, 02 Jul 2020)
Log Message:
-----------
a few cleanup
Modified Paths:
--------------
jEdit/trunk/org/gjt/sp/jedit/BeanShell.java
Modified: jEdit/trunk/org/gjt/sp/jedit/BeanShell.java
===================================================================
--- jEdit/trunk/org/gjt/sp/jedit/BeanShell.java 2020-06-10 12:07:06 UTC (rev 25349)
+++ jEdit/trunk/org/gjt/sp/jedit/BeanShell.java 2020-07-02 06:54:09 UTC (rev 25350)
@@ -93,7 +93,7 @@
if(command != null)
{
if(!command.endsWith(";"))
- command = command + ";";
+ command += ";";
int repeat = view.getInputHandler().getRepeatCount();
@@ -138,7 +138,7 @@
JEditTextArea textArea = view.getTextArea();
Buffer buffer = view.getBuffer();
- if(command == null || command.length() == 0)
+ if(command == null || command.isEmpty())
return;
Selection[] selection = textArea.getSelection();
@@ -149,7 +149,7 @@
}
if(!command.endsWith(";"))
- command = command + ";";
+ command += ";";
String script = "int[] lines = textArea.getSelectedLines();\n"
+ "for(int i = 0; i < lines.length; i++)\n"
@@ -159,7 +159,7 @@
+ "start = buffer.getLineStartOffset(line);\n"
+ "end = buffer.getLineEndOffset(line);\n"
+ "text = buffer.getText(start,end - start - 1);\n"
- + "newText = " + command + "\n"
+ + "newText = " + command + '\n'
+ "if(newText != null)\n"
+ "{\n"
+ "buffer.remove(start,end - start - 1);\n"
This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.
_______________________________________________
jEdit-CVS mailing list
jEdit-CVS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jedit-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic