UML Modeling Layer

com.ibm.xtools.uml.ui
Interface IUMLUIHelper


public interface IUMLUIHelper

Utilities to retrieve UML and notation elements from selection


Method Summary
 List<EObject> getSelectedElements()
          Gets the UML and/or Notation elements that can be inferred from the selection in the active workbench window, editor or view
 List<EObject> getSelectedElements(Diagram diagram)
          Returns the list of views selected in the specified diagram.
 List<EObject> getSelectedElements(String viewId)
          Gets the UML and/or Notation elements that can be inferred from the selection in the view with having the ID specified by viewId
 void setSelectedElements(Diagram diagram, List<? extends EObject> elements)
          Selects a list of edit parts corresponding to a list of elements in a given diagram in the currently active workbench window
 void setSelectedElements(List<? extends View> views)
          Selects a list of edit parts corresponding to a list of views in the currently active workbench window
 void setSelectedElements(String viewId, List<? extends EObject> elements)
          Selects the specified UML and/or notation elements in a given view
 

Method Detail

getSelectedElements

List<EObject> getSelectedElements()
Gets the UML and/or Notation elements that can be inferred from the selection in the active workbench window, editor or view

Returns:
The selected UML and/or Notation elements

getSelectedElements

List<EObject> getSelectedElements(String viewId)
Gets the UML and/or Notation elements that can be inferred from the selection in the view with having the ID specified by viewId

Parameters:
viewId - The ID of the view to retrieve selection from
Returns:
The selected UML and/or Notation elements
Throws:
IllegalArgumentException - viewId is an empty string
NullPointerException - viewId is null

getSelectedElements

List<EObject> getSelectedElements(Diagram diagram)
Returns the list of views selected in the specified diagram.

Parameters:
diagram - The diagram to get the selection for
Returns:
The list of selected UML and/or Notation elements

setSelectedElements

void setSelectedElements(String viewId,
                         List<? extends EObject> elements)
Selects the specified UML and/or notation elements in a given view

Parameters:
viewId - The ID of the view to set selection to
elements - The UML and/or Notation elements to select in the specified view
Throws:
IllegalArgumentException - viewId is an empty string
NullPointerException - viewId is null elements is null

setSelectedElements

void setSelectedElements(List<? extends View> views)
Selects a list of edit parts corresponding to a list of views in the currently active workbench window

Parameters:
views - A list of views to select

setSelectedElements

void setSelectedElements(Diagram diagram,
                         List<? extends EObject> elements)
Selects a list of edit parts corresponding to a list of elements in a given diagram in the currently active workbench window

Parameters:
diagram - The diagram to set the selection to
elements - The UML and/or Notation elements to select in the specified diagram

UML Modeling Layer

© Copyright IBM Corp. 2009. All rights reserved.