EMF Compare Editor Investigation: Difference between revisions

From Event-B
Jump to navigationJump to search
imported>Colin
New page: EMF Compare Editor Investigation
 
imported>Colin
No edit summary
Line 1: Line 1:
EMF Compare Editor Investigation
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
# 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)
# 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)
# 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)
# I have tried to alter the priorities in the content type extensions (rodin core, eventb core etc) but this did not seem to work
# 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.

Revision as of 17:09, 10 September 2009

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.