Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.perspective.rse.actions
Class RSEMakeOfflineAction

java.lang.Object
  extended by SystemBaseAction
      extended by com.ibm.etools.iseries.rse.ui.actions.QSYSSystemBaseAction
          extended by com.ibm.etools.iseries.perspective.rse.actions.RSEMakeOfflineAction
Direct Known Subclasses:
RSEAddToISeriesProjectAction

public class RSEMakeOfflineAction
extends QSYSSystemBaseAction

This action downloads the selected source file or source member locally to its corresponding iSeries project. It allows multiple source files and members in a single selection, but all must be in a single library. The corresponding iSeries project has the same host and the same library properties as the host name, and the library of the select source physical file or member. There may be several of these projects, the first one found is used.


Field Summary
static String COPYRIGHT
           
 
Fields inherited from class com.ibm.etools.iseries.rse.ui.actions.QSYSSystemBaseAction
copyright
 
Constructor Summary
RSEMakeOfflineAction()
           
RSEMakeOfflineAction(Shell shell)
           
 
Method Summary
protected  boolean checkLibraryName(String libraryName)
          Test if the parent library is valid using ISeriesNativeLibraryModelValidator
protected  void doDownloadAction(List<IQSYSResource> objectsToDownload, AbstractISeriesProject project, Properties projectProperties)
           
protected  AbstractISeriesProject[] findProjects(Properties projectProperties)
          Returns projects that match the criteria presented in the properties.
 boolean getEnabled(Object[] currentlySelected)
          The user has selected one or more objects.
 void run()
          Creates local iSeries source physical files and members from the selected RSE source physical files and members.
 void run(IAction a)
           
static void scheduleDownloadJob(Object[] objectsToDownload, IProject project, Properties projectProperties, Shell shell)
           
protected  void selectInISeriesPerspective(IResource resource)
          This method will open the iSeries Project perspective, and select the given resource.
 void selectionChanged(IAction action, ISelection selection)
           
 void setActivePart(IAction action, IWorkbenchPart targetPart)
           
 
Methods inherited from class com.ibm.etools.iseries.rse.ui.actions.QSYSSystemBaseAction
getIBMiConnection, isAvailableOffline, updateSelection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT

public static final String COPYRIGHT
See Also:
Constant Field Values
Constructor Detail

RSEMakeOfflineAction

public RSEMakeOfflineAction(Shell shell)

RSEMakeOfflineAction

public RSEMakeOfflineAction()
Method Detail

selectionChanged

public void selectionChanged(IAction action,
                             ISelection selection)

run

public void run(IAction a)

setActivePart

public void setActivePart(IAction action,
                          IWorkbenchPart targetPart)

run

public void run()
Creates local iSeries source physical files and members from the selected RSE source physical files and members. The selected libraries and the RSE connection are obtained from the parent libraries of the selected source files and members. If an iSeries project that matches these two properties is not found, the method will create the iSeries project for it. If multiple projects are found, a selection dialog is presented.


findProjects

protected AbstractISeriesProject[] findProjects(Properties projectProperties)
Returns projects that match the criteria presented in the properties. The specific properties used are left to the implementation. This operation may be replaced by subclasses.

This implementation tries to find iSeries projects with the library and connection. that are specified in the properties. If any are found they are returned.

Parameters:
projectProperties - contains the properties to match. Matches the connection name and the library and potentially the user.
Returns:
the array of found projects. If none are found the empty array is returned.

doDownloadAction

protected void doDownloadAction(List<IQSYSResource> objectsToDownload,
                                AbstractISeriesProject project,
                                Properties projectProperties)

scheduleDownloadJob

public static void scheduleDownloadJob(Object[] objectsToDownload,
                                       IProject project,
                                       Properties projectProperties,
                                       Shell shell)

selectInISeriesPerspective

protected void selectInISeriesPerspective(IResource resource)
This method will open the iSeries Project perspective, and select the given resource.

Parameters:
resource - The IResource to select.

getEnabled

public boolean getEnabled(Object[] currentlySelected)
The user has selected one or more objects. We should only get here for RSE source files or members. Multiple source files or members can be selected as long as they belong to the same parent object. In some filters, they can belong to different parent library.


checkLibraryName

protected boolean checkLibraryName(String libraryName)
Test if the parent library is valid using ISeriesNativeLibraryModelValidator


Rational Developer for Power Systems Software
V7.6

Copyright © 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.