org.eclipse.cdt.internal.ui.actions
Class OpenActionUtil

java.lang.Object
  extended by org.eclipse.cdt.internal.ui.actions.OpenActionUtil

public class OpenActionUtil
extends java.lang.Object


Method Summary
static java.util.List filterResolveResults(org.eclipse.cdt.core.model.ICElement[] codeResolveResults)
          Filters out source references from the given code resolve results.
static void open(java.lang.Object element)
          Opens the editor on the given element and subsequently selects it.
static void open(java.lang.Object element, boolean activate)
          Opens the editor on the given element and subsequently selects it.
static org.eclipse.cdt.core.model.ICElement selectCElement(org.eclipse.cdt.core.model.ICElement[] elements, org.eclipse.swt.widgets.Shell shell, java.lang.String title, java.lang.String message)
          Shows a dialog for resolving an ambigous C element.
static org.eclipse.cdt.core.model.ICElement selectCElement(org.eclipse.cdt.core.model.ICElement[] elements, org.eclipse.swt.widgets.Shell shell, java.lang.String title, java.lang.String message, int textFlags, int imageFlags)
          Shows a dialog for resolving an ambigous C element.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

open

public static void open(java.lang.Object element)
                 throws org.eclipse.cdt.core.model.CModelException,
                        org.eclipse.ui.PartInitException
Opens the editor on the given element and subsequently selects it.

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

open

public static void open(java.lang.Object element,
                        boolean activate)
                 throws org.eclipse.cdt.core.model.CModelException,
                        org.eclipse.ui.PartInitException
Opens the editor on the given element and subsequently selects it.

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

filterResolveResults

public static java.util.List filterResolveResults(org.eclipse.cdt.core.model.ICElement[] codeResolveResults)
Filters out source references from the given code resolve results. A utility method that can be called by subclassers.


selectCElement

public static org.eclipse.cdt.core.model.ICElement selectCElement(org.eclipse.cdt.core.model.ICElement[] elements,
                                                                  org.eclipse.swt.widgets.Shell shell,
                                                                  java.lang.String title,
                                                                  java.lang.String message)
Shows a dialog for resolving an ambigous C element. Utility method that can be called by subclassers.


selectCElement

public static org.eclipse.cdt.core.model.ICElement selectCElement(org.eclipse.cdt.core.model.ICElement[] elements,
                                                                  org.eclipse.swt.widgets.Shell shell,
                                                                  java.lang.String title,
                                                                  java.lang.String message,
                                                                  int textFlags,
                                                                  int imageFlags)
Shows a dialog for resolving an ambigous C element.

Parameters:
elements - an array of ambigous elements.
shell - parent shell for showing the dialog
title - title of the dialog
message - message to be shown in the dialog
textFlags - text flags to change the label provider
imageFlags - image flags to change the label provider
Returns:
the selected element or null
Since:
4.0
See Also:
CElementBaseLabels