org.eclipse.cdt.internal.ui.viewsupport
Class EditorOpener

java.lang.Object
  extended by org.eclipse.cdt.internal.ui.viewsupport.EditorOpener

public class EditorOpener
extends java.lang.Object

An utility to open editors for references or elements.

Author:
markus.schorn@windriver.com

Constructor Summary
EditorOpener()
           
 
Method Summary
static void open(org.eclipse.ui.IWorkbenchPage page, org.eclipse.cdt.core.model.ICElement element)
          Opens the editor for an ICElement, selecting the id.
static void open(org.eclipse.ui.IWorkbenchPage page, org.eclipse.core.resources.IFile file, org.eclipse.jface.text.IRegion region, long timestamp)
          Opens the editor selecting the given region.
static void open(org.eclipse.ui.IWorkbenchPage page, org.eclipse.cdt.core.model.ITranslationUnit tu, org.eclipse.jface.text.Region region, long timestamp)
          Opens the editor for an ICElement, selecting the given region.
static void openExternalFile(org.eclipse.ui.IWorkbenchPage page, org.eclipse.core.runtime.IPath location, org.eclipse.jface.text.IRegion region, long timestamp)
          Opens the editor for an external location, selecting the given region.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EditorOpener

public EditorOpener()
Method Detail

open

public static void open(org.eclipse.ui.IWorkbenchPage page,
                        org.eclipse.core.resources.IFile file,
                        org.eclipse.jface.text.IRegion region,
                        long timestamp)
Opens the editor selecting the given region.


openExternalFile

public static void openExternalFile(org.eclipse.ui.IWorkbenchPage page,
                                    org.eclipse.core.runtime.IPath location,
                                    org.eclipse.jface.text.IRegion region,
                                    long timestamp)
Opens the editor for an external location, selecting the given region.


open

public static void open(org.eclipse.ui.IWorkbenchPage page,
                        org.eclipse.cdt.core.model.ICElement element)
                 throws org.eclipse.cdt.core.model.CModelException
Opens the editor for an ICElement, selecting the id.

Throws:
org.eclipse.cdt.core.model.CModelException

open

public static void open(org.eclipse.ui.IWorkbenchPage page,
                        org.eclipse.cdt.core.model.ITranslationUnit tu,
                        org.eclipse.jface.text.Region region,
                        long timestamp)
Opens the editor for an ICElement, selecting the given region.