IBM Rational Software Modeler
Release 6.0

com.ibm.xtools.uml.ui
Interface IUMLUIHelper


public interface IUMLUIHelper

Utilities to retrieve UML and notation elements from selection


Method Summary
 List getSelectedElements()
          Gets the UML and/or Notation elements that can be inferred from the selection in the active workbench window, editor or view
 List getSelectedElements(Diagram diagram)
          Returns the list of views selected in the diagramed specified by diagram
 List 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 elements)
          Selects a list of editparts correspending to a list of elements in a given diagram in the currently active workbench window
 void setSelectedElements(List views)
          Selects a list of editparts correspending to a list of views in the currently active workbench window
 void setSelectedElements(String viewId, List elements)
          Selects the specified UML and/or notation elements in a given view
 

Method Detail

getSelectedElements

public List 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

public List 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

public List getSelectedElements(Diagram diagram)
Returns the list of views selected in the diagramed specified by diagram

Parameters:
diagram - The diagram to get the selection for
Returns:
The list of selected views

setSelectedElements

public void setSelectedElements(String viewId,
                                List 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

public void setSelectedElements(List views)
Selects a list of editparts correspending to a list of views in the currently active workbench window

Parameters:
views - A list of views to select

setSelectedElements

public void setSelectedElements(Diagram diagram,
                                List elements)
Selects a list of editparts correspending 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

IBM Rational Software Modeler
Release 6.0


Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2004. All rights reserved.