1) Create a file extension to mime-type association by creating a file in ~/.local/share/mime/packages called something like user-extension-graphml.xml and add the following contents:
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns='
http://www.freedesktop.org/standards/shared-mime-info'>
<mime-type type="text/graphml">
<comment>graphml file</comment>
<glob pattern="*.graphml"/>
</mime-type>
</mime-info>
2) Update the mime type database from the folder
~/.local/share with: sudo update-mime-database mime
and confirm with: sudo update-mime-database mime
3) Add yEd as an application so it appears in the Open With... dialog. Go to ~/.local/share/applications and edit the file: yEd Graph Editor-0.desktop
Add a %f to the end of the EXEC line. It should look something like this:
#!/usr/bin/env xdg-open
[Desktop Entry]
Type=Application
Name=yEd Graph Editor
Exec=/bin/sh "/opt/yEd/yEd" %f
Icon=/opt/yEd/.install4j/yEd.png
Categories=Application;
4) Now right click a GraphML file and find yEd in the application list to associate with text/graphml mime types.
Double click should now launch yEd for graphml files.