Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

RSE
Release 3.0

org.eclipse.rse.ui.actions
Class SystemCopyToClipboardAction

java.lang.Object
  extended by 

org.eclipse.core.commands.common.EventManager
      extended by 

org.eclipse.jface.action.AbstractAction
          extended by 

org.eclipse.jface.action.Action
              extended by 

org.eclipse.rse.ui.actions.SystemBaseAction
                  extended by 
org.eclipse.rse.ui.actions.SystemCopyToClipboardAction
All Implemented Interfaces:
IAction, ISelectionChangedListener, ISystemAction, IValidatorRemoteSelection

public class SystemCopyToClipboardAction
extends SystemBaseAction
implements IValidatorRemoteSelection

Copy selected objects to clipboard action.


Field Summary
 
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
SystemCopyToClipboardAction ( Shell shell, Clipboard clipboard)
          Constructor
 
Method Summary
protected   String getTextTransferAppend ( Object obj, ISystemViewElementAdapter adapter)
          Returns the string to append for the selected object for text transfer.
protected   String getTextTransferPrepend ( Object obj, ISystemViewElementAdapter adapter)
          Returns the string to prepend for the selected object for text transfer.
  SystemMessage isValid ( IHost selectedConnection, Object[] selectedObjects, ISystemRemoteElementAdapter[] remoteAdaptersForSelectedObjects)
          The user has selected a remote object.
 void run ()
          This is the method called when the user selects this action.
 boolean updateSelection ( IStructuredSelection selection)
          We override from parent to do unique checking...
 
Methods inherited from class org.eclipse.rse.ui.actions. SystemBaseAction
allowOnMultipleSelection, checkObjectType, getContextMenuGroup, getCurrentTreeView, getFirstSelection, getHelpContextId, getNextSelection, getRemoteAdapter, getSelection, getSelectionProvider, getShell, getShell, getSystemConnection, getViewAdapter, getViewer, isDummy, isEnabled, isSelectionSensitive, issueTraceMessage, selectionChanged, setAvailableOffline, setBusyCursor, setContextMenuGroup, setDisplayCursor, setDisplayCursor, setHelp, setHost, setInputs, setSelection, setSelectionProvider, setSelectionSensitive, setShell, setTracing, setTracing, setViewer
 
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
 

Constructor Detail

SystemCopyToClipboardAction

public SystemCopyToClipboardAction(
Shell shell,
                                   
Clipboard clipboard)
Constructor

Method Detail

run

public void run()
Description copied from class: SystemBaseAction
This is the method called when the user selects this action. Child classes need to override this. If you need the parent shell, call getShell. If you need to know the current selection, call getSelection(), or getFirstSelection() followed by getNextSelection() until null is returned.

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

getTextTransferPrepend

protected 
String getTextTransferPrepend(
Object obj,
                                        
ISystemViewElementAdapter adapter)
Returns the string to prepend for the selected object for text transfer. Default implementation returns the empty string.

Parameters:
obj - the selected object.
adapter - the adapter of the selected object.
Returns:
the string to prepend for the selected object.

getTextTransferAppend

protected 
String getTextTransferAppend(
Object obj,
                                       
ISystemViewElementAdapter adapter)
Returns the string to append for the selected object for text transfer. Default implementation returns the system line separator (i.e. the line.separator property).

Parameters:
obj - the selected object.
adapter - the adapter of the selected object.
Returns:
the string to append for the selected object.

isValid

public 
SystemMessage isValid(
IHost selectedConnection,
                             
Object[] selectedObjects,
                             
ISystemRemoteElementAdapter[] remoteAdaptersForSelectedObjects)
The user has selected a remote object. Return null if OK is to be enabled, or a SystemMessage if it is not to be enabled. The message will be displayed on the message line.

This is overridden in SystemMoveRemoteFileAction

Specified by:
isValid in interface IValidatorRemoteSelection

updateSelection

public boolean updateSelection(
IStructuredSelection selection)
We override from parent to do unique checking...

We simply ensure every selected object has a system view element adapter.

Overrides:
updateSelection in class SystemBaseAction
See Also:
SystemBaseAction.updateSelection(IStructuredSelection)

RSE
Release 3.0

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

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire