@Override
	public void actionPerformed(ActionEvent e) {
		if (e.getActionCommand().equals(EventConstants.DIFF_CALC)){
			if (!vm.getVersions().isEmpty()){
				if (dvm.isEmpty()){
					long time = System.currentTimeMillis();
					for (Entry<Integer,CRFVersion> entry:vm.getVersions().entrySet()){
						Integer nextKey = vm.getVersions().higherKey(entry.getKey());
						if (nextKey!=null){
							CRFVersion nextVersion = vm.getVersions().get(nextKey);
							//diffCalculator.clearAll();
							diffCalculator.calculateDiff(entry.getValue(), nextVersion);
							HashMap<String, HashMap<String, PropertyMapping>>propMap = 
									changeClassifier.classify(diffCalculator.getModifiedItems());
							VersionPair vp = new VersionPair(entry.getKey(),nextKey);
							DiffVersion dv = new DiffVersion();
							
							dv.setAddedItems(diffCalculator.getAddedItems());
							dv.setDeletedItems(diffCalculator.getDeletedItems());
							dv.setEqualItems(diffCalculator.getEqualItems());
							dv.setModifiedItems(propMap);
							dv.setNewOldItemMap(diffCalculator.getNewOldItemMap());
							dv.setOldNewItemMap(diffCalculator.getOldNewItemMap());
							dvm.addDiff(vp, dv);
						}
					}
					System.out.println(System.currentTimeMillis()-time);
					dvp.updateDiffTree();
					dvp.updateDeletedTable();
				}
			}else {
				JOptionPane.showConfirmDialog(null, "You have to load a set of CRF versions", "No versions available", JOptionPane.WARNING_MESSAGE);
			}
		}else if (e.getActionCommand().equals(EventConstants.SHOW)){
			if (!dvm.isEmpty()&&!vm.getVersions().isEmpty()){
			dvp.updateDiffTree();
			dvp.updateDeletedTable();
			}else{
				JOptionPane.showConfirmDialog(null, "You have to calculate the changes before you select a specific interval.", "No changes available", JOptionPane.WARNING_MESSAGE);
			}
		}else if (e.getSource() instanceof JCheckBoxMenuItem){
		
			dvp.updateColorTree();
		}
		
	}