Skip to main content



      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 05:05
Eclipse UserFriend
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 05:07] by Moderator

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


Current Time: Tue Jul 08 18:05:10 EDT 2025

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

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

Back to the top