Update of /cvsroot/squirrel-sql/sql12/fw/src/net/sourceforge/squirrel_sql/fw/codereformat
In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv20477/fw/src/net/sourceforge/squirrel_sql/fw/codereformat
Modified Files:
CodeReformator.java
Added Files:
ICodeReformator.java
Log Message:
Introduced interface to define plugin-specific formatter classes.
Index: CodeReformator.java
===================================================================
RCS file: /cvsroot/squirrel-sql/sql12/fw/src/net/sourceforge/squirrel_sql/fw/codereformat/CodeReformator.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** CodeReformator.java 15 Jul 2008 22:10:42 -0000 1.5
--- CodeReformator.java 28 Dec 2009 23:32:59 -0000 1.6
***************
*** 29,33 ****
import net.sourceforge.squirrel_sql.fw.util.log.LoggerController;
! public class CodeReformator {
private static final StringManager s_stringMgr = StringManagerFactory
.getStringManager(CodeReformator.class);
--- 29,33 ----
import net.sourceforge.squirrel_sql.fw.util.log.LoggerController;
! public class CodeReformator implements ICodeReformator {
private static final StringManager s_stringMgr = StringManagerFactory
.getStringManager(CodeReformator.class);
***************
*** 51,55 ****
}
! public String reformat(String in) {
in = flatenWhiteSpaces(in, false);
--- 51,58 ----
}
! /**
! * @see net.sourceforge.squirrel_sql.fw.codereformat.ICodeReformator#reformat(java.lang.String)
! */
! public String reformat(String in) {
in = flatenWhiteSpaces(in, false);
--- NEW FILE: ICodeReformator.java ---
/*
* Copyright (C) 2009 Rob Manning
* man...@us...
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package net.sourceforge.squirrel_sql.fw.codereformat;
/**
* An interface to allow alternate implementations of the CodeReformator to be configured by plugins.
*/
public interface ICodeReformator
{
/**
* Reformats the specified String, returning the reformatted version.
*
* @param in
* the string to apply formatting to.
* @return the formatted result
*/
String reformat(String in);
}
|