EMF Compare Editor Investigation

From Event-B
Revision as of 17:09, 10 September 2009 by imported>Colin
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

EMF Compare Editor Investigation


An extension to add a file association to EMF Compare for *.bum and *.buc files

(Doing this breaks the Rodin DB getRodinFile(Name) operations because it thinks files with these extensions are no longer Rodin files)

  <extension
        point="org.eclipse.core.runtime.contentTypes">
     <file-association
           content-type="org.eclipse.emf.compare.ui.contenttype.ModelContentType"
           file-extensions="bum,buc">
     </file-association>
  </extension>


Colin's Notes

  1. you need to make a file association with *.bum to the EMF compare editor. (you can do this in preferences but it is better to do it by a content type extension)
  2. doing this does not work because the text compare editor opens in preference (I think this is because Rodin content type is based on XML - not XMI which is the EMF content type)
  3. the new file association breaks the RodinDB getRodinFile operation because this operation sees the wrong file association and regards it as a non-rodin file (hence the new component wizard reports an invalid name)
  4. I have tried to alter the priorities in the content type extensions (rodin core, eventb core etc) but this did not seem to work
  5. I tried to alter the descriptors in the content type extensions to break the link to XML - I added a new descriptor that detects the root element of a machine file - but this just breaks the RodinDB again because it can't get the content type its expecting (hence the editor raises a null pointer exception because the rodin file is returned as null) -> it appears to get the EMF compare one (good!) but the EMF compare editor still didn't open.