Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » DocumentProvider::createElementInfo does not handle IFileEditorInput
DocumentProvider::createElementInfo does not handle IFileEditorInput [message #1815347] Tue, 01 October 2019 09:05
Sonja Riethig is currently offline Sonja RiethigFriend
Messages: 4
Registered: May 2019
Junior Member
After updating to the newest GMF and GEF versions the code generated for my xxxDocumentProvider (which handles opening the diagram file) does not handle IFileEditorInput anymore. It only handles URIEditorInput.

/**
    * @generated
    */
    protected ElementInfo createElementInfo(Object element) throws CoreException {
        if (false == element instanceof URIEditorInput) {
            throw new CoreException(new Status(IStatus.ERROR, StatemachineDiagramEditorPlugin.ID, 0, NLS.bind(
                    Messages.NewStatemachineDocumentProvider_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;
    }


What do I have to do so that GMF generates the method like it did before?

[Updated on: Tue, 01 October 2019 09:07]

Report message to a moderator

Previous Topic: how to "dynamically" load different images for nodes ?
Next Topic:Connector Labels (Polyline Connection)
Goto Forum:
  


Current Time: Thu Mar 28 10:41:07 GMT 2024

Powered by FUDForum. Page generated in 0.03897 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top