public void partActivated(IWorkbenchPart partArg) {
		if ((partArg == this.part)
				&& (this.timestamp > -1L)
				&& ((this.resource == null) || (this.resource.exists()) || (this.part
						.isDirty()))) {
			if (!readable()) {
				String[] buttons = { "Save", "Close" };
				MessageDialog dialog = new MessageDialog(
						this.part.getSite().getShell(),
						"File not accessible",
						null,
						"The file has been deleted or is not accessible. Do you want to save your changes or close the editor without saving?",
						3, buttons, 0);

				if (dialog.open() == 0) {
					this.part.doSave(new NullProgressMonitor());
				}
				this.part
						.getSite()
						.getShell()
						.getDisplay()
						.asyncExec(
								(Runnable) new EditorInputWatcher(
										(IQtEditor) this));
			} else {
				long newtimestamp = getCurrentTimeStamp();
				if ((newtimestamp != this.timestamp)
						&& (MessageDialog
								.openQuestion(
										this.part.getSite().getShell(),
										"File changed",
										"The file has been changed on the file system. Do you want to replace the editor contents with these changes?"))) {
					this.part.reload();
				}
			}

			updateTimeStamp();
		}
	}