//variables for informations to be displayed
final String fileNamePath, fileSavedDateTime, fileSize;
final int fileChangesSinceSave;
//get informations
//if file has been saved once
final MapModel map = Controller.getCurrentController().getMap();
if (map.getFile() != null) {
//fileNamePath
fileNamePath = map.getFile().toString();
//fleSavedDateTime as formatted string
final Calendar c = Calendar.getInstance();
c.setTimeInMillis(map.getFile().lastModified());
final DateFormat df = DateFormat.getDateTimeInstance(DateFormat.FULL, DateFormat.FULL);
fileSavedDateTime = df.format(c.getTime());
//fileSize as formatted string
final DecimalFormat def = new DecimalFormat();
def.setGroupingUsed(true);
fileSize = def.format(map.getFile().length()) + " "
+ TextUtils.getText("FileRevisionsDialog.file_size");
//fileChangesSinceSave
fileChangesSinceSave = map.getNumberOfChangesSinceLastSave();
}
else {
fileNamePath = TextUtils.getText("FileProperties_NeverSaved");
fileSavedDateTime = TextUtils.getText("FileProperties_NeverSaved");
fileSize = TextUtils.getText("FileProperties_NeverSaved");
fileChangesSinceSave = 0;
}
//node statistics
final NodeModel rootNode = map.getRootNode();
final int nodeMainBranches = rootNode.getChildCount();
final ICondition trueCondition = new ICondition() {
public boolean checkNode(NodeModel node) {
return true;
}
};
final ICondition isLeafCondition = new ICondition() {
public boolean checkNode(NodeModel node) {
return node.isLeaf();
}
};
final int nodeTotalNodeCount = getNodeCount(rootNode, trueCondition);
final int nodeTotalLeafCount = getNodeCount(rootNode, isLeafCondition);
final Filter filter = map.getFilter();
final int nodeTotalFiltered;
if(filter != null && filter.getCondition() != null){
final ICondition matchesFilterCondition = new ICondition() {
public boolean checkNode(NodeModel node) {
return filter.matches(node);