Page tree

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


I.E., if you have a TextGridObject and need an IFile,

Code Block
TextGridObject textGridObject;
/* ... fill textGridObject ... */
IFile file = (IFile) textGridObject.getAdapter(IFile.class);
if (file != null)
  /* do something with file */


or vice versa

Code Block
  IFile file;
/* ... fill file ... */
TextGridObject textGridObject = (TextGridObject) file.getAdaptor(TextGridObject.class);


The IFiles have methods for reading and writing and they can also be passed, e.g., to plain Eclipse editors (by means of a IFileEditorInput, which is a standard Eclipse interface that can also be adapted to (and from) directly from TextGridObjects).