private void initValidationJob() {
   final IFile file = ((IFileEditorInput) getEditorInput()).getFile();
   validationJob = new SCTValidationJob(getDiagram());
   IExpressionLanguageProvider registeredProvider =
       ExpressionLanguageProviderExtensions.getRegisteredProvider(
           SemanticTarget.StatechartSpecification, file.getFileExtension());
   Injector injector = registeredProvider.getInjector();
   injector.injectMembers(validationJob);
   validationJob.setRule(file);
 }
 @Override
 public void dispose() {
   validationJob.cancel();
   getEditingDomain().removeResourceSetListener(validationListener);
   getEditingDomain().removeResourceSetListener(domainAdapter);
   domainAdapter.dispose();
   IFileEditorInput editorInput = (IFileEditorInput) getEditorInput();
   try {
     // Touch the file for revalidation, when the user did not save
     // the changes
     if (editorInput.getFile() != null && editorInput.getFile().exists()) {
       editorInput.getFile().touch(new NullProgressMonitor());
     }
   } catch (CoreException e) {
     e.printStackTrace();
   }
   super.dispose();
 }