org.eclipse.xtext.ui.util
Class FileOpener

java.lang.Object
  extended by org.eclipse.xtext.ui.util.FileOpener

public class FileOpener
extends java.lang.Object

Provide some limited but useful utilities when dealing with files that are currently in an intermediate state, e.g. the builder did not pick up their contents yet.

Author:
Michael Clay

Constructor Summary
FileOpener()
           
 
Method Summary
 void openFileToEdit(org.eclipse.swt.widgets.Shell shell, org.eclipse.core.resources.IFile file)
           Opens the file in the corresponding default editor (asynchronous execution).
Does nothing if file is null
 void selectAndReveal(org.eclipse.core.resources.IFile file)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileOpener

public FileOpener()
Method Detail

selectAndReveal

public void selectAndReveal(org.eclipse.core.resources.IFile file)
Parameters:
file - the file that should be selected. May be null.

openFileToEdit

public void openFileToEdit(org.eclipse.swt.widgets.Shell shell,
                           org.eclipse.core.resources.IFile file)

Opens the file in the corresponding default editor (asynchronous execution).
Does nothing if file is null

Parameters:
shell - the parent shell. May not be null
file - that should be selected.