|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.etools.iseries.perspective.model.util.ISeriesModelUtil
public class ISeriesModelUtil
This is a general utility class for dealing with the iSeries projects object model.
Field Summary | |
---|---|
static String |
COPYRIGHT
|
Constructor Summary | |
---|---|
ISeriesModelUtil()
|
Method Summary | |
---|---|
static boolean |
allISeriesResourcesAreOfType(IStructuredSelection selection,
int resourceMask)
Returns whether the types of the resources in the given selection are among the specified iseries resource types. An example of a resource mask is as follows: |
static AbstractISeriesResource |
castToISeriesResource(Object object)
Tests wether the passed object is an iSeries Projects model object. |
static String |
findFirstDifferentProperty(IISeriesPropertiesModel propertiesModel,
Properties properties)
Returns the key to the first property in the properties parameter that is different
than its equivalent in the passed properties model. |
static AbstractISeriesResource |
findISeriesResource(IResource resource)
Finds an iSeries resource that represents the given IResource. returns null if no iSeries Resource is found. |
static com.ibm.etools.iseries.perspective.internal.model.impl.ISeriesProjectRoot |
getISeriesProjectRoot()
Synchronizes and returns iSeries Project Root for the iSeries projects model. This root holds all iSeries Projects. |
static boolean |
iSeriesResourceIsType(AbstractISeriesResource resource,
int resourceMask)
Returns whether the type of the given resource is among the specified resource types. |
static void |
selectRevealInISeriesProjectView(AbstractISeriesResource resource,
IWorkbenchWindow window,
boolean expandSelection)
Attempts to select and reveal the specified AbstractISeriesResource in all parts within the supplied workbench window's active page. |
static void |
selectRevealInISeriesProjectView(IResource resource,
boolean expandSelection)
Convenience method for calling selectRevealInISeriesProjectView against the current active workbench window. |
static void |
selectRevealInISeriesProjectView(IResource resource,
IWorkbenchWindow window,
boolean expandSelection)
Attempts to select and reveal the specified IResource in all parts within the supplied workbench window's active page. |
static void |
showISeriesProjectPerspective()
Opens up the iSeries Project Perspective according to the user's Preference settings. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String COPYRIGHT
Constructor Detail |
---|
public ISeriesModelUtil()
Method Detail |
---|
public static final com.ibm.etools.iseries.perspective.internal.model.impl.ISeriesProjectRoot getISeriesProjectRoot()
public static final AbstractISeriesResource castToISeriesResource(Object object)
public static void showISeriesProjectPerspective()
public static final AbstractISeriesResource findISeriesResource(IResource resource)
public static final boolean iSeriesResourceIsType(AbstractISeriesResource resource, int resourceMask)
resource
- the resourceresourceMask
- resource mask formed by bitwise OR of resource type
constants (defined on AbstractISeriesResource
)
true
if the resources has a matching type, and
false
otherwise.AbstractISeriesResource.getType()
public static final boolean allISeriesResourcesAreOfType(IStructuredSelection selection, int resourceMask)
int resourceMask =
AbstractISeriesResource.NATIVE_OBJECT
| AbstractISeriesResource.NATIVE_MEMBER;
true
if all selected elements are resources of the right
type, and false
if the selection is empty, or at least one element is either a resource
of some other type or not an AbstractISeriesResource resource.public static final String findFirstDifferentProperty(IISeriesPropertiesModel propertiesModel, Properties properties)
properties
parameter that is different
than its equivalent in the passed properties model.
propertiesModel
- the model to compare againstproperties
- the properties to compare.
public static final void selectRevealInISeriesProjectView(AbstractISeriesResource resource, IWorkbenchWindow window, boolean expandSelection)
Checks all parts in the active page to see if they implement ISetSelectionTarget
,
either directly or as an adapter. If so, tells the part to select and reveal the
specified resource. If the iSeries Project View is open in the current active page, it is given focus.
resource
- the resource to be selected and revealedwindow
- the workbench window to select and reveal the resourceexpandSelection
- flag indicating whether the resource should be expanded once it is seleceted and revealed.ISetSelectionTarget
public static final void selectRevealInISeriesProjectView(IResource resource, IWorkbenchWindow window, boolean expandSelection)
Checks all parts in the active page to see if they implement ISetSelectionTarget
,
either directly or as an adapter. If so, tells the part to select and reveal the
specified resource. If the iSeries Project View is open in the current active page, it is given focus.
Note that since the object to select is an IResource, the method actually selects it AbstractISeriesResource
equivalent in the iSeries Project Viewer.
resource
- the resource to be selected and revealedwindow
- the workbench window to select and reveal the resourceexpandSelection
- flag indicating whether the resource should be expanded once it is seleceted and revealed.ISetSelectionTarget
public static final void selectRevealInISeriesProjectView(IResource resource, boolean expandSelection)
selectRevealInISeriesProjectView
against the current active workbench window.
|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |