/** @generated */ protected void handleElementChanged( ResourceSetInfo info, Resource changedResource, IProgressMonitor monitor) { IFile file = WorkspaceSynchronizer.getFile(changedResource); if (file != null) { try { file.refreshLocal(IResource.DEPTH_INFINITE, monitor); } catch (CoreException ex) { CallGraphDiagramEditorPlugin.getInstance() .logError(Messages.CallGraphDocumentProvider_handleElementContentChanged, ex); // Error message to log was initially taken from // org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide.internal.l10n.EditorMessages.FileDocumentProvider_handleElementContentChanged } } changedResource.unload(); fireElementContentAboutToBeReplaced(info.getEditorInput()); removeUnchangedElementListeners(info.getEditorInput(), info); info.fStatus = null; try { setDocumentContent(info.fDocument, info.getEditorInput()); } catch (CoreException e) { info.fStatus = e.getStatus(); } if (!info.fCanBeSaved) { info.setModificationStamp(computeModificationStamp(info)); } addUnchangedElementListeners(info.getEditorInput(), info); fireElementContentReplaced(info.getEditorInput()); }
/** @generated */ protected void handleElementChanged( ResourceSetInfo info, Resource changedResource, IProgressMonitor monitor) { changedResource.unload(); fireElementContentAboutToBeReplaced(info.getEditorInput()); removeUnchangedElementListeners(info.getEditorInput(), info); info.fStatus = null; try { setDocumentContent(info.fDocument, info.getEditorInput()); } catch (CoreException e) { info.fStatus = e.getStatus(); } if (!info.fCanBeSaved) { info.setModificationStamp(computeModificationStamp(info)); } addUnchangedElementListeners(info.getEditorInput(), info); fireElementContentReplaced(info.getEditorInput()); }
/** @generated */ protected ElementInfo createElementInfo(Object element) throws CoreException { if (false == element instanceof URIEditorInput) { throw new CoreException( new Status( IStatus.ERROR, StateChartDiagramEditorPlugin.ID, 0, NLS.bind( Messages.StateChartDocumentProvider_IncorrectInputError, new Object[] { element, "org.eclipse.emf.common.ui.URIEditorInput" }), //$NON-NLS-1$ null)); } IEditorInput editorInput = (IEditorInput) element; IDiagramDocument document = (IDiagramDocument) createDocument(editorInput); ResourceSetInfo info = new ResourceSetInfo(document, editorInput); info.setModificationStamp(computeModificationStamp(info)); info.fStatus = null; return info; }