public MainView(Shell shell) {
		this.shell = shell;

		addFileDropTarget(shell);
		
		createMenubar(shell);
		
		SashForm sash = new SashForm(shell, SWT.NONE);
		this.fileList = new FileList(sash);
		
		Composite right = new Composite(sash, SWT.NONE);
		this.tabs = new CTabFolder(right, SWT.NONE);
		
		GridLayout gridLayout = new GridLayout(1, false);
		gridLayout.marginHeight = 0;
		gridLayout.marginWidth = 0;
		right.setLayout(gridLayout);
		tabs.setLayoutData(new GridData(GridData.FILL_BOTH));
		
		createBottomBar(right);
		
		fileList.setFileSelectedCallback(new Callback<File>() {
			public void onCallback(File selected) {
				fileList.fileSelected(selected);
				
				for(CTabItem existing:tabs.getItems()) {
					if(existing.getData().equals(selected)) {
						tabs.setSelection(existing);
						return;
					}
				}
				
				final CTabItem tabItem = new CTabItem(tabs, SWT.NONE);
				tabItem.setText(selected.getName());
				tabItem.setData(selected);
				tabs.setSelection(tabItem);
				tabItem.setShowClose(true);
				tabs.setSimple(false);
				tabs.setTabHeight(22);
				
				final FileView fileView = fileViews.get(selected);
				
				if(fileView.isEmpty()) {
					try {
						fileView.addLines(FileUtils.readLines(selected));
					} catch(IOException e) {
						log.error("Error reading file: " + selected, e);
					}
					fileView.setTail(true);
				}
				
				Display.getCurrent().asyncExec(new Runnable() {
					public void run() {
						fileView.scrollToEnd();
					}
				});
				tabItem.setControl(fileView.getWidget());
			}
		});
		
		tabs.addSelectionListener(new SelectionAdapter() {
			public void widgetSelected(SelectionEvent event) {
				File file = (File)event.item.getData();
				fileList.fileSelected(file);
			}
		});
		
		tabs.addKeyListener(new KeyAdapter() {
			public void keyReleased(KeyEvent event) {
				if(event.stateMask == SWT.CONTROL && event.keyCode == 'w') {
					CTabItem selected = tabs.getSelection();
					if(selected != null) {
						selected.dispose();
					}
				}
			}
		});
		
		sash.setWeights(new int[] { 30, 70 });
	}