[prev in list] [next in list] [prev in thread] [next in thread]
List: jedit-cvs
Subject: [ jEdit-commits ] SF.net SVN: jedit:[24951] plugins/Templates/trunk
From: daleanson--- via jEdit-CVS <jedit-cvs () lists ! sourceforge ! net>
Date: 2019-10-19 23:52:58
Message-ID: 1571529179.3135.28054 () sfp-scm-1 ! v30 ! lw ! sourceforge ! com
[Download RAW message or body]
Revision: 24951
http://sourceforge.net/p/jedit/svn/24951
Author: daleanson
Date: 2019-10-19 23:52:58 +0000 (Sat, 19 Oct 2019)
Log Message:
-----------
Fixed missing dependency in properties file, fixed a few deprecation warnings.
Modified Paths:
--------------
plugins/Templates/trunk/Templates.props
plugins/Templates/trunk/build.xml
plugins/Templates/trunk/templates/TemplatesPlugin.java
plugins/Templates/trunk/velocity/directives/Caret.java
plugins/Templates/trunk/velocity/directives/YesNoPrompt.java
Modified: plugins/Templates/trunk/Templates.props
===================================================================
--- plugins/Templates/trunk/Templates.props 2019-10-14 20:30:47 UTC (rev 24950)
+++ plugins/Templates/trunk/Templates.props 2019-10-19 23:52:58 UTC (rev 24951)
@@ -11,7 +11,7 @@
plugin.templates.TemplatesPlugin.depend.0=jedit 05.02.99.00
plugin.templates.TemplatesPlugin.depend.1=jdk 1.7
plugin.templates.TemplatesPlugin.depend.2=plugin jakartacommons.JakartaCommonsPlugin \
0.9
-plugin.templates.TemplatesPlugin.jars=oro-2.0.8.jar velocity-1.7.jar
+plugin.templates.TemplatesPlugin.jars=oro-2.0.8.jar velocity-1.7.jar \
log4j-1.2.14.jar
# Action labels
Templates.refresh-templates.label=Refresh templates
Modified: plugins/Templates/trunk/build.xml
===================================================================
--- plugins/Templates/trunk/build.xml 2019-10-14 20:30:47 UTC (rev 24950)
+++ plugins/Templates/trunk/build.xml 2019-10-19 23:52:58 UTC (rev 24951)
@@ -145,7 +145,7 @@
<!-- {{{ 'compile' target -->
<target name="compile" depends="init" description="Compile project files">
<javac srcdir="${src.dir}" destdir="${build.dir}"
- deprecation="on" includeJavaRuntime="yes">
+ deprecation="on" includeJavaRuntime="yes" includeantruntime="no">
<classpath refid="project.class.path"/>
</javac>
</target>
Modified: plugins/Templates/trunk/templates/TemplatesPlugin.java
===================================================================
--- plugins/Templates/trunk/templates/TemplatesPlugin.java 2019-10-14 20:30:47 UTC \
(rev 24950)
+++ plugins/Templates/trunk/templates/TemplatesPlugin.java 2019-10-19 23:52:58 UTC \
(rev 24951) @@ -21,8 +21,6 @@
import java.io.*;
import java.util.*;
import javax.swing.JFileChooser;
-import javax.swing.JMenu;
-import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
import org.apache.velocity.VelocityContext;
import org.apache.velocity.app.VelocityEngine;
@@ -29,7 +27,6 @@
import org.apache.velocity.context.Context;
import org.apache.velocity.runtime.RuntimeConstants;
import org.gjt.sp.jedit.*;
-import org.gjt.sp.jedit.gui.OptionsDialog;
import org.gjt.sp.jedit.msg.DynamicMenuChanged;
import org.gjt.sp.jedit.textarea.JEditTextArea;
import org.gjt.sp.util.Log;
@@ -424,7 +421,7 @@
{
try
{
- if (!getEngine().templateExists(template))
+ if (!getEngine().resourceExists(template))
{
GUIUtilities.error(view, "plugin.velocity.error.no-template-found",
new String[]{template});
@@ -433,7 +430,7 @@
((jEditContext) ctx).captureSelection();
Writer out = new BufferWriter(((Buffer) textArea.getBuffer()),
textArea.getCaretPosition());
- getEngine().mergeTemplate(template, ctx, out);
+ getEngine().mergeTemplate(template, "UTF-8", ctx, out);
if (ctx.get(CARET) != null)
{
Integer pos = (Integer) ctx.get(CARET);
Modified: plugins/Templates/trunk/velocity/directives/Caret.java
===================================================================
--- plugins/Templates/trunk/velocity/directives/Caret.java 2019-10-14 20:30:47 UTC \
(rev 24950)
+++ plugins/Templates/trunk/velocity/directives/Caret.java 2019-10-19 23:52:58 UTC \
(rev 24951) @@ -66,7 +66,7 @@
if (caretPos < 0) {
caretPos = 0;
}
- context.getInternalUserContext().put(CARET, new Integer(caretPos));
+ context.getInternalUserContext().put(CARET, Integer.valueOf(caretPos));
return true;
}
Modified: plugins/Templates/trunk/velocity/directives/YesNoPrompt.java
===================================================================
--- plugins/Templates/trunk/velocity/directives/YesNoPrompt.java 2019-10-14 20:30:47 \
UTC (rev 24950)
+++ plugins/Templates/trunk/velocity/directives/YesNoPrompt.java 2019-10-19 23:52:58 \
UTC (rev 24951) @@ -103,10 +103,7 @@
null);
// Set the variable's value in the context
- if (n == JOptionPane.YES_OPTION)
- context.getInternalUserContext().put(key, new Boolean(true));
- else
- context.getInternalUserContext().put(key, new Boolean(false));
+ context.getInternalUserContext().put(key, n == JOptionPane.YES_OPTION);
return true;
}
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