RSE
Release 1.0

org.eclipse.rse.files.ui.actions
Class SystemDownloadConflictAction

java.lang.Object
  extended byorg.eclipse.core.commands.common.EventManager
      extended byorg.eclipse.jface.action.AbstractAction
          extended byorg.eclipse.jface.action.Action
              extended byorg.eclipse.rse.ui.actions.SystemBaseAction
                  extended byorg.eclipse.rse.files.ui.actions.SystemDownloadConflictAction
All Implemented Interfaces:
IAction, ISelectionChangedListener, ISystemAction, Runnable

public class SystemDownloadConflictAction
extends SystemBaseAction
implements Runnable

This is the default action used to handle download conflicts


Nested Class Summary
protected  class SystemDownloadConflictAction.DownloadConflictDialog
          This is the default dialog used to handle download conflicts
 
Field Summary
protected  boolean _remoteNewer
           
protected  int _state
           
protected  IFile _tempFile
           
static int CANCELLED
           
static int OPEN_WITH_LOCAL
           
static int REPLACE_WITH_REMOTE
           
 
Fields inherited from class org.eclipse.rse.ui.actions.SystemBaseAction
allowOnMultipleSelection, arrowCursor, helpId, selectionSensitive, shell, sSelection, traceSelections, traceTarget, viewer, waitCursor
 
Fields inherited from interface org.eclipse.jface.action.IAction
AS_CHECK_BOX, AS_DROP_DOWN_MENU, AS_PUSH_BUTTON, AS_RADIO_BUTTON, AS_UNSPECIFIED, CHECKED, DESCRIPTION, ENABLED, HANDLED, IMAGE, RESULT, TEXT, TOOL_TIP_TEXT
 
Constructor Summary
SystemDownloadConflictAction(IFile tempFile, boolean remoteNewer)
          Constructor.
SystemDownloadConflictAction(String title, IFile tempFile, boolean remoteNewer)
          Constructor.
 
Method Summary
protected  SystemDownloadConflictAction.DownloadConflictDialog getConflictDialog()
          Returns the dialog used to prompt a user on how to resolve a conflict.
 int getState()
          Returns the action taken in response to the conflict.
 void run()
          Called when this action is invoked
 
Methods inherited from class org.eclipse.rse.ui.actions.SystemBaseAction
allowOnMultipleSelection, checkObjectType, getAdapter, getContextMenuGroup, getCurrentTreeView, getFirstSelection, getHelpContextId, getNextSelection, getRemoteAdapter, getSelection, getSelectionProvider, getShell, getShell, getSystemConnection, getViewer, isDummy, isEnabled, isSelectionSensitive, issueTraceMessage, selectionChanged, setAvailableOffline, setBusyCursor, setContextMenuGroup, setDisplayCursor, setDisplayCursor, setHelp, setHost, setInputs, setSelection, setSelectionProvider, setSelectionSensitive, setShell, setTracing, setTracing, setViewer, updateSelection
 
Methods inherited from class org.eclipse.jface.action.Action
convertAccelerator, convertAccelerator, findKeyCode, findKeyString, findModifier, findModifierString, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isHandled, notifyResult, removeAcceleratorText, removeMnemonics, runWithEvent, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText
 
Methods inherited from class org.eclipse.jface.action.AbstractAction
addPropertyChangeListener, firePropertyChange, firePropertyChange, removePropertyChangeListener
 
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.jface.action.IAction
addPropertyChangeListener, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isHandled, removePropertyChangeListener, runWithEvent, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText
 

Field Detail

_tempFile

protected IFile _tempFile

_remoteNewer

protected boolean _remoteNewer

_state

protected int _state

REPLACE_WITH_REMOTE

public static final int REPLACE_WITH_REMOTE
See Also:
Constant Field Values

OPEN_WITH_LOCAL

public static final int OPEN_WITH_LOCAL
See Also:
Constant Field Values

CANCELLED

public static final int CANCELLED
See Also:
Constant Field Values
Constructor Detail

SystemDownloadConflictAction

public SystemDownloadConflictAction(IFile tempFile,
                                    boolean remoteNewer)
Constructor.

Parameters:
tempFile - the cached local file that is in conflict with the remote file
remoteNewer - indicates whether the remote file has changed since it was last downloaded

SystemDownloadConflictAction

public SystemDownloadConflictAction(String title,
                                    IFile tempFile,
                                    boolean remoteNewer)
Constructor.

Parameters:
title - the title for the action
tempFile - the cached local file that is in conflict with the remote file
remoteNewer - indicates whether the remote file has changed since it was last downloaded
Method Detail

getState

public int getState()
Returns the action taken in response to the conflict. The state may be one of the following:

Returns:
the response to the conflict

getConflictDialog

protected SystemDownloadConflictAction.DownloadConflictDialog getConflictDialog()
Returns the dialog used to prompt a user on how to resolve a conflict.

Returns:
the dialog

run

public void run()
Called when this action is invoked

Specified by:
run in interface Runnable
Overrides:
run in class SystemBaseAction
See Also:
Action.run()

RSE
Release 1.0

Copyright (c) IBM Corporation and others 2000, 2006. All Rights Reserved.