Menu

#74 Example in language file

open
nobody
Server side (3)
5
2008-05-11
2008-05-11
No

Just a little idea which would clean up the interface file.

Currently we have the "example" in the html file:
<textarea id="cp-java" class="hidden-code">
import java.io.FileFilter;
import java.io.IOException;
import java.io.PrintWriter;

/**
* Project ECCO - File manager class
* @author Fernando M.A.d.S.
*/
public class FileManager extends HttpServlet {

private static final long serialVersionUID = 1L;
private static String login = "feanndor"; // session var should come here
private static String usersPath = System.getProperty("user.dir")+File.separator+"htdocs"+File.separator+"ecco"+File.separator+"users"+File.separator;
private static File dir = new File(usersPath+login+File.separator);
static boolean existDirectories = false;
static int isDirectory = 0;

public FileFilter filterFiles(File dir) {
return (new FileFilter() {
public boolean accept(File pathname) {
return !(pathname.isDirectory());
}
});
}
}
</textarea>

How about having the example in the actual language file?

Language.example = []

James

Discussion


Log in to post a comment.