Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Chen2012-04-09 03:39:51 +0000
committerWilliam Chen2012-04-09 03:39:51 +0000
commit269b0de82efcebe8a3bfe28fb3ee8b34377a3ba1 (patch)
treead372a6a4a790a58a2aaefad1e6b273a50106a41
parent8cf67b56f88b061faca8dc5d89cc267d2f2fb015 (diff)
downloadorg.eclipse.tcf-269b0de82efcebe8a3bfe28fb3ee8b34377a3ba1.tar.gz
org.eclipse.tcf-269b0de82efcebe8a3bfe28fb3ee8b34377a3ba1.tar.xz
org.eclipse.tcf-269b0de82efcebe8a3bfe28fb3ee8b34377a3ba1.zip
Target Explorer: Refactoring: Split filesystem to core and ui.
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/.classpath7
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/.project28
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/META-INF/MANIFEST.MF30
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/build.properties6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/plugin.properties12
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/plugin.xml47
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/activator/CorePlugin.java75
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/interfaces/IConfirmCallback.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/interfaces/IConfirmCallback.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/interfaces/IOperation.java34
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/interfaces/IWindowsFileAttributes.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/interfaces/IWindowsFileAttributes.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/UserAccount.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/UserAccount.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/callbacks/QueryDoneOpen.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/callbacks/QueryDoneOpen.java)8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/callbacks/QueryDoneOpenChannel.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/callbacks/QueryDoneOpenChannel.java)12
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/callbacks/QueryDoneReadDir.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/callbacks/QueryDoneReadDir.java)10
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/callbacks/QueryDoneRoots.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/callbacks/QueryDoneRoots.java)8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/exceptions/TCFChannelException.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/exceptions/TCFChannelException.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/exceptions/TCFException.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/exceptions/TCFException.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/exceptions/TCFFileSystemException.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/exceptions/TCFFileSystemException.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpCacheCommit.java137
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpCacheUpdate.java84
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpClipboard.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSClipboard.java)84
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpCopy.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSCopy.java)38
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpCreate.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSCreate.java)14
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpCreateFile.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSCreateFile.java)12
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpCreateFolder.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSCreateFolder.java)10
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpCreateRoot.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSCreateRoot.java)16
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpDelete.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSDelete.java)63
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpJob.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/RunnableJob.java)18
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpMove.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSMove.java)28
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpOutStreamOp.java35
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpRefresh.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSRefresh.java)29
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpRename.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSRename.java)49
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpStreamOp.java156
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpUpload.java348
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/Operation.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSOperation.java)117
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/testers/FSTreeNodePropertyTester.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/testers/FSTreeNodePropertyTester.java)12
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/testers/TargetPropertyTester.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/testers/TargetPropertyTester.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/url/TcfInputStream.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/url/TcfInputStream.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/url/TcfOutputStream.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/url/TcfOutputStream.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/url/TcfURLConnection.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/url/TcfURLConnection.java)12
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/url/TcfURLStreamHandlerService.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/url/TcfURLStreamHandlerService.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/utils/CacheManager.java248
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/utils/ContentTypeHelper.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/utils/ContentTypeHelper.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/utils/PersistenceManager.java213
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/utils/StateManager.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/utils/StateManager.java)22
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/utils/URIKeyMapPersistenceDelegate.java130
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/utils/UserManager.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/utils/UserManager.java)22
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/model/CacheState.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/model/CacheState.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/model/FSModel.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/model/FSModel.java)29
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/model/FSTreeNode.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/model/FSTreeNode.java)16
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/nls/Messages.java354
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/nls/Messages.properties (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/nls/Messages.properties)0
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/.project4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/META-INF/MANIFEST.MF59
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/plugin.xml234
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/adapters/DeleteHandlerDelegate.java128
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSUpload.java283
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/utils/CacheManager.java621
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/utils/PersistenceManager.java559
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/activator/UIPlugin.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/activator/UIPlugin.java)83
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/controls/FSNavigatorContentProvider.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/controls/FSNavigatorContentProvider.java)12
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/controls/FSTreeContentProvider.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/controls/FSTreeContentProvider.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/controls/FSTreeViewerSorter.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/controls/FSTreeViewerSorter.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/dialogs/FSFolderSelectionDialog.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/dialogs/FSFolderSelectionDialog.java)18
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/dialogs/FSOpenFileDialog.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/dialogs/FSOpenFileDialog.java)16
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/dialogs/TimeTriggeredProgressMonitorDialog.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/dialogs/TimeTriggeredProgressMonitorDialog.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/filters/HiddenFilesViewerFilter.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/filters/HiddenFilesViewerFilter.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/filters/SystemFilesViewerFilter.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/filters/SystemFilesViewerFilter.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/help/IContextHelpIds.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/help/IContextHelpIds.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/interfaces/IFSConstants.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/interfaces/IFSConstants.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/interfaces/preferences/IPreferenceKeys.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/interfaces/preferences/IPreferenceKeys.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/ImageConsts.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/ImageConsts.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/adapters/DeleteHandlerDelegate.java182
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/adapters/FSTreeNodeAdapterFactory.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/adapters/FSTreeNodeAdapterFactory.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/adapters/NodeStateFilter.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/adapters/NodeStateFilter.java)20
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/adapters/PeerModelViewerInput.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/adapters/PeerModelViewerInput.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/adapters/RefreshHandlerDelegate.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/adapters/RefreshHandlerDelegate.java)26
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/adapters/ViewerInputAdapterFactory.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/adapters/ViewerInputAdapterFactory.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/autosave/SaveAllListener.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/autosave/SaveAllListener.java)21
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/autosave/SaveListener.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/autosave/SaveListener.java)20
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/celleditor/FSCellListener.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/celleditor/FSCellListener.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/celleditor/FSCellModifier.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/celleditor/FSCellModifier.java)14
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/celleditor/FSCellValidator.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/celleditor/FSCellValidator.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/celleditor/FSViewerCellEditorFactory.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/celleditor/FSViewerCellEditorFactory.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/AccessTimeComparator.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/AccessTimeComparator.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/AccessTimeLabelProvider.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/AccessTimeLabelProvider.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/CacheFileImageUpdater.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/CacheFileImageUpdater.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/DefaultImageProvider.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/DefaultImageProvider.java)8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/FSTreeElementComparator.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/FSTreeElementComparator.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/FSTreeElementLabelProvider.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/FSTreeElementLabelProvider.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/FSTreeNodeComparator.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/FSTreeNodeComparator.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/FileExtBasedImageUpdater.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/FileExtBasedImageUpdater.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/FileTypeComparator.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/FileTypeComparator.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/FileTypeLabelProvider.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/FileTypeLabelProvider.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/ImageProvider.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/ImageProvider.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/ImageUpdateAdapter.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/ImageUpdateAdapter.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/LabelProviderUpdateDaemon.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/LabelProviderUpdateDaemon.java)8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/ModificationTimeComparator.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/ModificationTimeComparator.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/ModificationTimeLabelProvider.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/ModificationTimeLabelProvider.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/SizeComparator.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/SizeComparator.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/SizeLabelProvider.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/SizeLabelProvider.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/WindowsImageProvider.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/WindowsImageProvider.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/compare/EditableSharedDocumentAdapter.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/EditableSharedDocumentAdapter.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/compare/LocalFileSaveable.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/LocalFileSaveable.java)14
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/compare/LocalTypedElement.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/LocalTypedElement.java)12
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/compare/MergeEditorInput.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/MergeEditorInput.java)8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/compare/MergeInput.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/MergeInput.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/compare/MergeTypedElement.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/MergeTypedElement.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/compare/RemoteTypedElement.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/RemoteTypedElement.java)34
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/decorators/PhantomDecorator.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/decorators/PhantomDecorator.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/decorators/PhantomImageDescriptor.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/decorators/PhantomImageDescriptor.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/dnd/CommonDnD.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/dnd/CommonDnD.java)108
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/dnd/FSDragAdapterAssistant.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/dnd/FSDragAdapterAssistant.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/dnd/FSDragSourceListener.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/dnd/FSDragSourceListener.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/dnd/FSDropAdapterAssistant.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/dnd/FSDropAdapterAssistant.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/dnd/FSDropTargetListener.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/dnd/FSDropTargetListener.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/CommitHandler.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/CommitHandler.java)12
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/CopyFilesHandler.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/CopyFilesHandler.java)10
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/CutFilesHandler.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/CutFilesHandler.java)10
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/MergeHandler.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/MergeHandler.java)10
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/MoveCopyCallback.java55
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/MoveFilesHandler.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/MoveFilesHandler.java)23
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/NewFileHandler.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/NewFileHandler.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/NewFolderHandler.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/NewFolderHandler.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/NewNodeHandler.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/NewNodeHandler.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/OpenFileHandler.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/OpenFileHandler.java)20
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/OpenWithContribution.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/OpenWithContribution.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/OpenWithMenu.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/OpenWithMenu.java)22
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/PasteFilesHandler.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/PasteFilesHandler.java)50
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/RefreshViewerHandler.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/RefreshViewerHandler.java)16
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/RenameCallback.java33
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/RenameFilesHandler.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/RenameFilesHandler.java)21
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/UpdateHandler.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/UpdateHandler.java)12
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/operations/FsClipboard.java114
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/operations/IOpExecutor.java20
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/operations/JobExecutor.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSJobOperation.java)24
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/operations/UiExecutor.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSUIOperation.java)48
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/preferences/PreferencePage.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/preferences/PreferencePage.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/preferences/PreferencesInitializer.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/preferences/PreferencesInitializer.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/properties/AdvancedAttributesDialog.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/properties/AdvancedAttributesDialog.java)12
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/properties/GeneralInformationPage.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/properties/GeneralInformationPage.java)8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/tabbed/BasicFileSection.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/BasicFileSection.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/tabbed/BasicFolderSection.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/BasicFolderSection.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/tabbed/FileFilter.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/FileFilter.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/tabbed/FolderFilter.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/FolderFilter.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/tabbed/LinuxFilter.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/LinuxFilter.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/tabbed/LinuxPermissionsSection.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/LinuxPermissionsSection.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/tabbed/WindowsAttributesCESection.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsAttributesCESection.java)8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/tabbed/WindowsAttributesSection.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsAttributesSection.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/tabbed/WindowsFileAISection.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsFileAISection.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/tabbed/WindowsFileFilter.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsFileFilter.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/tabbed/WindowsFilter.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsFilter.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/tabbed/WindowsFolderAISection.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsFolderAISection.java)8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/tabbed/WindowsFolderFilter.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsFolderFilter.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/testers/CachePropertyTester.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/testers/CachePropertyTester.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/testers/ClipboardPropertyTester.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/testers/ClipboardPropertyTester.java)15
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/testers/EditorActivationEventPropertyTester.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/testers/EditorActivationEventPropertyTester.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/FolderValidator.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/FolderValidator.java)6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/NameValidator.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NameValidator.java)12
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/NewFileWizard.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NewFileWizard.java)14
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/NewFileWizardPage.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NewFileWizardPage.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/NewFolderWizard.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NewFolderWizard.java)14
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/NewFolderWizardPage.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NewFolderWizardPage.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/NewNodeWizard.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NewNodeWizard.java)19
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/NewNodeWizardPage.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NewNodeWizardPage.java)18
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/TargetContentProvider.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/TargetContentProvider.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/TargetPatternFilter.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/TargetPatternFilter.java)2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/TargetSelectionPage.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/TargetSelectionPage.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/nls/Messages.java (renamed from target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/nls/Messages.java)4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/nls/Messages.properties279
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/META-INF/MANIFEST.MF5
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/LaunchConfigurationMainTabSection.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/filetransfer/AddEditFileTransferDialog.java6
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/META-INF/MANIFEST.MF5
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/dialogs/LaunchObjectDialog.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/META-INF/MANIFEST.MF5
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/FSPeerTestCase.java23
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/adapters/DeleteHandlerDelegateTest.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/callbacks/QueryChildrenCallbackTest.java3
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/controls/ContentProviderTest.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/controls/ViewerComparatorTest.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/dnd/CommonDnDTest.java4
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/filters/HiddenFilesViewerFilterTest.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/filters/SystemFilesViewerFilterTest.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/FSCacheCommitTest.java62
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/FSCacheUpdateTest.java60
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/FSCopyTests.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/FSCreateFileTests.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/FSCreateFolderTests.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/FSMoveTests.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/FSRefreshTests.java7
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/FSRenameTests.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/FSUploadTest.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/OperationTestBase.java39
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/OperationTests.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/testers/CachePropertyTesterTest.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/testers/ClipboardPropertyTesterTest.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/testers/FSTreeNodePropertyTesterTest.java3
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/testers/TargetPropertyTesterTest.java3
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/url/URLTestBase.java3
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/utils/CacheManagerTest.java33
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/utils/ContentTypeHelperTest.java13
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/utils/StateManagerTest.java5
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/utils/UserManagerTest.java5
205 files changed, 3866 insertions, 2735 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/.classpath b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/.classpath
new file mode 100644
index 000000000..8a8f1668c
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/.project b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/.project
new file mode 100644
index 000000000..b092fa5f5
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tcf.te.tcf.filesystem.core</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/.settings/org.eclipse.jdt.core.prefs b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..f287d53cf
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..e3c6458a3
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/META-INF/MANIFEST.MF
@@ -0,0 +1,30 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.tcf.te.tcf.filesystem.core;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.eclipse.tcf.te.tcf.filesystem.core.activator.CorePlugin
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.tcf.te.tcf.locator;bundle-version="1.0.0",
+ org.eclipse.tcf.core;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.core;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime.model;bundle-version="1.0.0",
+ org.eclipse.tcf.te.core;bundle-version="1.0.0",
+ org.eclipse.core.expressions;bundle-version="3.4.300",
+ org.eclipse.core.filesystem;bundle-version="1.3.100",
+ org.eclipse.tcf.te.runtime.persistence;bundle-version="1.0.0",
+ org.eclipse.tcf.te.runtime.services;bundle-version="1.0.0"
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Export-Package: org.eclipse.tcf.te.tcf.filesystem.core.interfaces,
+ org.eclipse.tcf.te.tcf.filesystem.core.internal;x-friends:="org.eclipse.tcf.te.tests",
+ org.eclipse.tcf.te.tcf.filesystem.core.internal.callbacks;x-friends:="org.eclipse.tcf.te.tests",
+ org.eclipse.tcf.te.tcf.filesystem.core.internal.exceptions;x-friends:="org.eclipse.tcf.te.tcf.filesystem.ui,org.eclipse.tcf.te.tests",
+ org.eclipse.tcf.te.tcf.filesystem.core.internal.operations;x-friends:="org.eclipse.tcf.te.tcf.filesystem.ui,org.eclipse.tcf.te.tests",
+ org.eclipse.tcf.te.tcf.filesystem.core.internal.testers;x-friends:="org.eclipse.tcf.te.tests",
+ org.eclipse.tcf.te.tcf.filesystem.core.internal.url;x-friends:="org.eclipse.tcf.te.tests",
+ org.eclipse.tcf.te.tcf.filesystem.core.internal.utils;x-friends:="org.eclipse.tcf.te.tcf.filesystem.ui,org.eclipse.tcf.te.tests",
+ org.eclipse.tcf.te.tcf.filesystem.core.model
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/build.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/build.properties
new file mode 100644
index 000000000..73a5119ed
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/build.properties
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties,\
+ plugin.xml
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/plugin.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/plugin.properties
new file mode 100644
index 000000000..dd62ff569
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/plugin.properties
@@ -0,0 +1,12 @@
+##################################################################################
+# Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved.
+# This program and the accompanying materials are made available under the terms
+# of the Eclipse Public License v1.0 which accompanies this distribution, and is
+# available at http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Wind River Systems - initial API and implementation
+##################################################################################
+
+providerName = Eclipse.org - TCF
+pluginName = Target Explorer, TCF File System Extensions Core \ No newline at end of file
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/plugin.xml
new file mode 100644
index 000000000..132a6becd
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/plugin.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.tcf.te.runtime.persistence.delegates">
+ <delegate
+ class="org.eclipse.tcf.te.tcf.filesystem.core.internal.utils.URIKeyMapPersistenceDelegate"
+ id="org.eclipse.tcf.te.tcf.filesystem.core.map">
+ </delegate>
+ </extension>
+ <extension
+ point="org.eclipse.tcf.te.runtime.persistence.bindings">
+ <binding
+ delegateId="org.eclipse.tcf.te.tcf.filesystem.core.map"
+ id="org.eclipse.tcf.te.tcf.filesystem.core.map.binding">
+ <enablement>
+ <with variable="container">
+ <instanceof
+ value="java.net.URI">
+ </instanceof>
+ </with>
+ <with variable="context">
+ <instanceof
+ value="java.util.Map">
+ </instanceof>
+ </with>
+ </enablement>
+ </binding>
+ </extension>
+ <extension point="org.eclipse.core.expressions.propertyTesters">
+ <propertyTester
+ class="org.eclipse.tcf.te.tcf.filesystem.core.internal.testers.FSTreeNodePropertyTester"
+ id="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode"
+ namespace="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode"
+ properties="isFile,isDirectory,isBinaryFile,isReadable,isWritable,isExecutable,isRoot,isReadOnly,isHidden,isWindows,testParent,getCacheState,isSystemRoot"
+ type="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode">
+ </propertyTester>
+ <propertyTester
+ class="org.eclipse.tcf.te.tcf.filesystem.core.internal.testers.TargetPropertyTester"
+ id="org.eclipse.tcf.te.tcf.filesystem.propertytester.peer"
+ namespace="org.eclipse.tcf.te.tcf.filesystem.propertytester.peer"
+ properties="isWindows"
+ type="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel">
+ </propertyTester>
+ </extension>
+
+</plugin>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/activator/CorePlugin.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/activator/CorePlugin.java
new file mode 100644
index 000000000..4e6f0a769
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/activator/CorePlugin.java
@@ -0,0 +1,75 @@
+package org.eclipse.tcf.te.tcf.filesystem.core.activator;
+
+import java.util.Hashtable;
+
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.url.TcfURLConnection;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.url.TcfURLStreamHandlerService;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.utils.PersistenceManager;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceRegistration;
+import org.osgi.service.url.URLConstants;
+import org.osgi.service.url.URLStreamHandlerService;
+
+public class CorePlugin extends Plugin {
+
+ private static BundleContext context;
+ // The shared instance of this plug-in.
+ private static CorePlugin plugin;
+ // The service registration for the "tcf" URL stream handler.
+ private ServiceRegistration<?> regURLStreamHandlerService;
+
+
+ static BundleContext getContext() {
+ return context;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext bundleContext) throws Exception {
+ super.start(bundleContext);
+ CorePlugin.context = bundleContext;
+ plugin = this;
+ // Register the "tcf" URL stream handler service.
+ Hashtable<String, String[]> properties = new Hashtable<String, String[]>();
+ properties.put(URLConstants.URL_HANDLER_PROTOCOL, new String[] { TcfURLConnection.PROTOCOL_SCHEMA });
+ regURLStreamHandlerService = context.registerService(URLStreamHandlerService.class.getName(), new TcfURLStreamHandlerService(), properties);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext bundleContext) throws Exception {
+ if (PersistenceManager.needsDisposal()) PersistenceManager.getInstance().dispose();
+ if (regURLStreamHandlerService != null) {
+ // When URL stream handler service is unregistered, any URL related operation will be invalid.
+ regURLStreamHandlerService.unregister();
+ regURLStreamHandlerService = null;
+ }
+ CorePlugin.context = null;
+ plugin = null;
+ super.stop(bundleContext);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static CorePlugin getDefault() {
+ return plugin;
+ }
+
+ /**
+ * Convenience method which returns the unique identifier of this plugin.
+ */
+ public static String getUniqueIdentifier() {
+ if (getContext() != null && getContext().getBundle() != null) {
+ return getContext().getBundle().getSymbolicName();
+ }
+ return null;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/interfaces/IConfirmCallback.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/interfaces/IConfirmCallback.java
index 062c9dc63..db4742ed7 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/interfaces/IConfirmCallback.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/interfaces/IConfirmCallback.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.interfaces;
+package org.eclipse.tcf.te.tcf.filesystem.core.interfaces;
/**
* A confirmation callback used to get UI confirmation from user for a long process
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/interfaces/IOperation.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/interfaces/IOperation.java
new file mode 100644
index 000000000..ff1b67231
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/interfaces/IOperation.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.core.interfaces;
+
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+
+public interface IOperation {
+
+ /**
+ * Runs this operation. Progress should be reported to the given progress monitor.
+ * A request to cancel the operation should be honored and acknowledged
+ * by throwing <code>InterruptedException</code>.
+ *
+ * @param monitor the progress monitor to use to display progress and receive
+ * requests for cancelation
+ * @exception InvocationTargetException if the run method must propagate a checked exception,
+ * it should wrap it inside an <code>InvocationTargetException</code>; runtime exceptions are automatically
+ * wrapped in an <code>InvocationTargetException</code> by the calling context
+ * @exception InterruptedException if the operation detects a request to cancel,
+ * using <code>IProgressMonitor.isCanceled()</code>, it should exit by throwing
+ * <code>InterruptedException</code>
+ *
+ */
+ public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException;
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/interfaces/IWindowsFileAttributes.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/interfaces/IWindowsFileAttributes.java
index 6d6a6d882..a88e3e215 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/interfaces/IWindowsFileAttributes.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/interfaces/IWindowsFileAttributes.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.interfaces;
+package org.eclipse.tcf.te.tcf.filesystem.core.interfaces;
/**
* Windows specific file system attribute definitions.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/UserAccount.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/UserAccount.java
index f4fc867ec..6c0391e5c 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/UserAccount.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/UserAccount.java
@@ -9,7 +9,7 @@
* William Chen (Wind River) - [352302]Opening a file in an editor depending on
* the client's permissions.
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal;
+package org.eclipse.tcf.te.tcf.filesystem.core.internal;
/**
* The data model of a user account.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/callbacks/QueryDoneOpen.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/callbacks/QueryDoneOpen.java
index 867534166..9cdeae15f 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/callbacks/QueryDoneOpen.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/callbacks/QueryDoneOpen.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.callbacks;
+package org.eclipse.tcf.te.tcf.filesystem.core.internal.callbacks;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
@@ -18,8 +18,8 @@ import org.eclipse.tcf.services.IFileSystem.DoneOpen;
import org.eclipse.tcf.services.IFileSystem.FileSystemException;
import org.eclipse.tcf.services.IFileSystem.IFileHandle;
import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
-import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.activator.CorePlugin;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
/**
* The callback handler that handles the event that a directory is opened.
@@ -60,7 +60,7 @@ public class QueryDoneOpen implements DoneOpen {
service.readdir(handle, new QueryDoneReadDir(callback, channel, service, handle, parentNode));
}
else if (callback != null) {
- IStatus status = new Status(IStatus.ERROR, UIPlugin.getUniqueIdentifier(), error.getLocalizedMessage(), error);
+ IStatus status = new Status(IStatus.ERROR, CorePlugin.getUniqueIdentifier(), error.getLocalizedMessage(), error);
callback.done(this, status);
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/callbacks/QueryDoneOpenChannel.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/callbacks/QueryDoneOpenChannel.java
index 5fc9aac34..021f734fe 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/callbacks/QueryDoneOpenChannel.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/callbacks/QueryDoneOpenChannel.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.callbacks;
+package org.eclipse.tcf.te.tcf.filesystem.core.internal.callbacks;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IStatus;
@@ -19,9 +19,9 @@ import org.eclipse.tcf.te.runtime.callback.Callback;
import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
import org.eclipse.tcf.te.tcf.core.Tcf;
import org.eclipse.tcf.te.tcf.core.interfaces.IChannelManager.DoneOpenChannel;
-import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.filesystem.core.activator.CorePlugin;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.nls.Messages;
/**
* The callback handler that handles the event when the channel opens.
@@ -80,11 +80,11 @@ public class QueryDoneOpenChannel implements DoneOpenChannel {
service.opendir(absPath, new QueryDoneOpen(proxy, channel, service, parentNode));
}
} else {
- Status status = new Status(IStatus.ERROR, UIPlugin.getUniqueIdentifier(), Messages.QueryDoneOpenChannel_NoFService, null);
+ Status status = new Status(IStatus.ERROR, CorePlugin.getUniqueIdentifier(), Messages.QueryDoneOpenChannel_NoFService, null);
proxy.done(this, status);
}
} else {
- IStatus status = error == null ? Status.OK_STATUS : new Status(IStatus.ERROR, UIPlugin.getUniqueIdentifier(), error.getLocalizedMessage(), error);
+ IStatus status = error == null ? Status.OK_STATUS : new Status(IStatus.ERROR, CorePlugin.getUniqueIdentifier(), error.getLocalizedMessage(), error);
proxy.done(this, status);
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/callbacks/QueryDoneReadDir.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/callbacks/QueryDoneReadDir.java
index 84e7831a7..8aeb053aa 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/callbacks/QueryDoneReadDir.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/callbacks/QueryDoneReadDir.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.callbacks;
+package org.eclipse.tcf.te.tcf.filesystem.core.internal.callbacks;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
@@ -19,8 +19,8 @@ import org.eclipse.tcf.services.IFileSystem.DoneClose;
import org.eclipse.tcf.services.IFileSystem.DoneReadDir;
import org.eclipse.tcf.services.IFileSystem.FileSystemException;
import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
-import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.activator.CorePlugin;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
/**
* The callback handler that handles the event when a directory is read.
@@ -73,7 +73,7 @@ public class QueryDoneReadDir implements DoneReadDir {
@Override
public void doneClose(IToken token, FileSystemException error) {
if(callback != null) {
- IStatus status = error == null ? Status.OK_STATUS : new Status(IStatus.ERROR, UIPlugin.getUniqueIdentifier(), error.getLocalizedMessage(), error);
+ IStatus status = error == null ? Status.OK_STATUS : new Status(IStatus.ERROR, CorePlugin.getUniqueIdentifier(), error.getLocalizedMessage(), error);
callback.done(this, status);
}
}});
@@ -83,7 +83,7 @@ public class QueryDoneReadDir implements DoneReadDir {
service.readdir(handle, new QueryDoneReadDir(callback, channel, service, handle, parentNode));
}
} else if(callback != null) {
- Status status = new Status(IStatus.ERROR, UIPlugin.getUniqueIdentifier(), error.getLocalizedMessage(), error);
+ Status status = new Status(IStatus.ERROR, CorePlugin.getUniqueIdentifier(), error.getLocalizedMessage(), error);
callback.done(this, status);
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/callbacks/QueryDoneRoots.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/callbacks/QueryDoneRoots.java
index 7a1b01a9d..3872d0c99 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/callbacks/QueryDoneRoots.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/callbacks/QueryDoneRoots.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.callbacks;
+package org.eclipse.tcf.te.tcf.filesystem.core.internal.callbacks;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
@@ -16,8 +16,8 @@ import org.eclipse.tcf.services.IFileSystem.DirEntry;
import org.eclipse.tcf.services.IFileSystem.DoneRoots;
import org.eclipse.tcf.services.IFileSystem.FileSystemException;
import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
-import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.activator.CorePlugin;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
/**
* The callback handler that handles the event when the roots are listed.
@@ -57,7 +57,7 @@ public class QueryDoneRoots implements DoneRoots {
}
}
if(callback != null) {
- IStatus status = error == null ? Status.OK_STATUS : new Status(IStatus.ERROR, UIPlugin.getUniqueIdentifier(), error.getLocalizedMessage(), error);
+ IStatus status = error == null ? Status.OK_STATUS : new Status(IStatus.ERROR, CorePlugin.getUniqueIdentifier(), error.getLocalizedMessage(), error);
callback.done(this, status);
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/exceptions/TCFChannelException.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/exceptions/TCFChannelException.java
index cfc089bd9..10347b24e 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/exceptions/TCFChannelException.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/exceptions/TCFChannelException.java
@@ -8,7 +8,7 @@
* Wind River Systems - initial API and implementation
* William Chen (Wind River)- [345552] Edit the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.exceptions;
+package org.eclipse.tcf.te.tcf.filesystem.core.internal.exceptions;
/**
* TCF channel exception.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/exceptions/TCFException.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/exceptions/TCFException.java
index 2ec9120fe..18eee9612 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/exceptions/TCFException.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/exceptions/TCFException.java
@@ -8,7 +8,7 @@
* Wind River Systems - initial API and implementation
* William Chen (Wind River)- [345552] Edit the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.exceptions;
+package org.eclipse.tcf.te.tcf.filesystem.core.internal.exceptions;
/**
* TCF file system implementation base exception.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/exceptions/TCFFileSystemException.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/exceptions/TCFFileSystemException.java
index c6857422a..c7512e9d9 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/exceptions/TCFFileSystemException.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/exceptions/TCFFileSystemException.java
@@ -8,7 +8,7 @@
* Wind River Systems - initial API and implementation
* William Chen (Wind River)- [345552] Edit the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.exceptions;
+package org.eclipse.tcf.te.tcf.filesystem.core.internal.exceptions;
/**
* TCF remote file system exception.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpCacheCommit.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpCacheCommit.java
new file mode 100644
index 000000000..91da821a8
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpCacheCommit.java
@@ -0,0 +1,137 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.core.internal.operations;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.net.URL;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.ISafeRunnable;
+import org.eclipse.core.runtime.SafeRunner;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.url.TcfURLConnection;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.utils.CacheManager;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.utils.PersistenceManager;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.utils.StateManager;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.nls.Messages;
+
+public class OpCacheCommit extends OpStreamOp {
+ protected FSTreeNode[] nodes;
+ private boolean sync;
+ public OpCacheCommit(FSTreeNode[] nodes, boolean sync) {
+ this.nodes = nodes;
+ this.sync = sync;
+ }
+
+ @Override
+ public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+ File[] files = new File[nodes.length];
+ URL[] urls = new URL[nodes.length];
+ for (int i = 0; i < nodes.length; i++) {
+ files[i] = CacheManager.getInstance().getCacheFile(nodes[i]);
+ urls[i] = nodes[i].getLocationURL();
+ }
+ try {
+ // Upload the files to the remote location by the specified URLs.
+ uploadFiles(monitor, files, urls);
+ }
+ catch(IOException e) {
+ throw new InvocationTargetException(e);
+ } finally {
+ // Once upload is successful, synchronize the modified time.
+ for (int i = 0; i < nodes.length; i++) {
+ final FSTreeNode node = nodes[i];
+ SafeRunner.run(new ISafeRunnable() {
+ @Override
+ public void handleException(Throwable e) {
+ // Ignore exception
+ }
+
+ @Override
+ public void run() throws Exception {
+ PersistenceManager.getInstance().setBaseTimestamp(node.getLocationURI(), node.attr.mtime);
+ if (sync) {
+ File file = CacheManager.getInstance().getCacheFile(node);
+ setLastModifiedChecked(file, node.attr.mtime);
+ }
+ StateManager.getInstance().refreshState(node);
+ }
+ });
+ }
+ }
+ }
+
+ public void uploadFiles(IProgressMonitor monitor, File[] files, URL[] urls) throws IOException {
+ BufferedInputStream input = null;
+ BufferedOutputStream output = null;
+ // The buffer used to download the file.
+ byte[] data = new byte[DEFAULT_CHUNK_SIZE];
+ // Calculate the total size.
+ long totalSize = 0;
+ for (File file:files) {
+ totalSize += file.length();
+ }
+ // Calculate the chunk size of one percent.
+ int chunk_size = (int) totalSize / 100;
+ // The current reading percentage.
+ int percentRead = 0;
+ // The current length of read bytes.
+ long bytesRead = 0;
+ for (int i = 0; i < files.length && !monitor.isCanceled(); i++) {
+ File file = files[i];
+ try {
+ URL url = urls[i];
+ TcfURLConnection connection = (TcfURLConnection) url.openConnection();
+ connection.setDoInput(false);
+ connection.setDoOutput(true);
+ input = new BufferedInputStream(new FileInputStream(file));
+ output = new BufferedOutputStream(connection.getOutputStream());
+
+ // Total size displayed on the progress dialog.
+ String fileLength = formatSize(file.length());
+ int length;
+ while ((length = input.read(data)) >= 0 && !monitor.isCanceled()) {
+ output.write(data, 0, length);
+ output.flush();
+ bytesRead += length;
+ if (chunk_size != 0) {
+ int percent = (int) bytesRead / chunk_size;
+ if (percent != percentRead) { // Update the progress.
+ monitor.worked(percent - percentRead);
+ percentRead = percent; // Remember the percentage.
+ // Report the progress.
+ monitor.subTask(NLS.bind(Messages.CacheManager_UploadingProgress, new Object[]{file.getName(), formatSize(bytesRead), fileLength}));
+ }
+ }
+ }
+ } finally {
+ if (output != null) {
+ try {
+ output.close();
+ } catch (Exception e) {
+ }
+ }
+ if (input != null) {
+ try {
+ input.close();
+ } catch (Exception e) {
+ }
+ }
+ }
+ }
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpCacheUpdate.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpCacheUpdate.java
new file mode 100644
index 000000000..151cee7ef
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpCacheUpdate.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.core.internal.operations;
+
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.ISafeRunnable;
+import org.eclipse.core.runtime.SafeRunner;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.utils.CacheManager;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.utils.PersistenceManager;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.utils.StateManager;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.nls.Messages;
+
+public class OpCacheUpdate extends OpStreamOp {
+
+ protected FSTreeNode node;
+
+ public OpCacheUpdate(FSTreeNode node) {
+ this.node = node;
+ }
+
+ @Override
+ public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+ monitor.beginTask(NLS.bind(Messages.CacheManager_DowloadingFile, node.name), 100);
+ OutputStream output = null;
+ try {
+ // Write the data to its local cache file.
+ File file = CacheManager.getInstance().getCachePath(node).toFile();
+ if(file.exists() && !file.canWrite()){
+ // If the file exists and is read-only, delete it.
+ deleteFileChecked(file);
+ }
+ output = new BufferedOutputStream(new FileOutputStream(file));
+ download2OutputStream(node, output, monitor);
+ if (monitor.isCanceled())
+ throw new InterruptedException();
+ } catch (IOException e) {
+ throw new InvocationTargetException(e);
+ } finally {
+ if (output != null) {
+ try {
+ output.close();
+ } catch (Exception e) {
+ }
+ }
+ if(!monitor.isCanceled()){
+ SafeRunner.run(new ISafeRunnable() {
+ @Override
+ public void handleException(Throwable e) {
+ // Ignore exception
+ }
+ @Override
+ public void run() throws Exception {
+ File file = CacheManager.getInstance().getCachePath(node).toFile();
+ if (file.exists()) {
+ // If downloading is successful, update the attributes of the file and
+ // set the last modified time to that of its corresponding file.
+ PersistenceManager.getInstance().setBaseTimestamp(node.getLocationURI(), node.attr.mtime);
+ setLastModifiedChecked(file, node.attr.mtime);
+ if (!node.isWritable()) setReadOnlyChecked(file);
+ StateManager.getInstance().refreshState(node);
+ }
+ }
+ });
+ }
+ monitor.done();
+ }
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSClipboard.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpClipboard.java
index e2e305fce..1e2fdc07a 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSClipboard.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpClipboard.java
@@ -7,39 +7,40 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.operations;
+package org.eclipse.tcf.te.tcf.filesystem.core.internal.operations;
+import java.beans.PropertyChangeEvent;
import java.util.List;
-import java.beans.PropertyChangeEvent;
-import org.eclipse.swt.SWTException;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.widgets.Display;
import org.eclipse.tcf.te.core.utils.PropertyChangeProvider;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.ui.PlatformUI;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
/**
* The clip board to which copy or cut files/folders.
*/
-public class FSClipboard extends PropertyChangeProvider {
+public class OpClipboard extends PropertyChangeProvider {
// The constants to define the current operation type of the clip board.
- public static final int NONE = -1;
- public static final int CUT = 0;
- public static final int COPY = 1;
+ private static final int NONE = -1;
+ private static final int CUT = 0;
+ private static final int COPY = 1;
// The operation type, CUT, COPY or NONE.
private int operation;
// The currently selected files/folders.
private List<FSTreeNode> files;
- // The system clipboard.
- private Clipboard clipboard;
/**
* Create a clip board instance.
*/
- public FSClipboard() {
+ public OpClipboard() {
operation = NONE;
- clipboard = new Clipboard(PlatformUI.getWorkbench().getDisplay());
+ }
+
+ public boolean isCutOp() {
+ return operation == CUT;
+ }
+
+ public boolean isCopyOp() {
+ return operation == COPY;
}
/**
@@ -52,15 +53,6 @@ public class FSClipboard extends PropertyChangeProvider {
}
/**
- * Return the current operation type.
- *
- * @return The operation of the current clip board content.
- */
- public int getOperation() {
- return operation;
- }
-
- /**
* Get the currently selected files/folders to operated.
*
* @return The file/folder list using their location URLs.
@@ -77,7 +69,6 @@ public class FSClipboard extends PropertyChangeProvider {
public void cutFiles(List<FSTreeNode> files) {
operation = CUT;
this.files = files;
- clearSystemClipboard();
PropertyChangeEvent event = new PropertyChangeEvent(this, "cut", null, null); //$NON-NLS-1$
firePropertyChange(event);
}
@@ -90,7 +81,6 @@ public class FSClipboard extends PropertyChangeProvider {
public void copyFiles(List<FSTreeNode> files) {
operation = COPY;
this.files = files;
- clearSystemClipboard();
PropertyChangeEvent event = new PropertyChangeEvent(this, "copy", null, null); //$NON-NLS-1$
firePropertyChange(event);
}
@@ -101,55 +91,13 @@ public class FSClipboard extends PropertyChangeProvider {
public void clear() {
operation = NONE;
this.files = null;
- clearSystemClipboard();
PropertyChangeEvent event = new PropertyChangeEvent(this, "clear", null, null); //$NON-NLS-1$
firePropertyChange(event);
}
/**
- * Make sure the system clip board is cleared in a UI thread.
- */
- void clearSystemClipboard() {
- if (Display.getCurrent() != null) {
- clipboard.clearContents();
- }
- else {
- PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable(){
- @Override
- public void run() {
- clearSystemClipboard();
- }});
- }
- }
-
- /**
* Dispose the clipboard.
*/
public void dispose() {
- if(Display.getCurrent() != null) {
- if (!clipboard.isDisposed()) {
- try {
- clipboard.dispose();
- }
- catch (SWTException e) {
- }
- }
- }
- else {
- PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable(){
- @Override
- public void run() {
- dispose();
- }});
- }
- }
-
- /**
- * Get the system clipboard.
- *
- * @return The system clipboard.
- */
- public Clipboard getSystemClipboard() {
- return clipboard;
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSCopy.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpCopy.java
index de5a0a914..23f106d46 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSCopy.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpCopy.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.operations;
+package org.eclipse.tcf.te.tcf.filesystem.core.internal.operations;
import java.lang.reflect.InvocationTargetException;
import java.util.List;
@@ -20,20 +20,29 @@ import org.eclipse.tcf.services.IFileSystem;
import org.eclipse.tcf.services.IFileSystem.DoneCopy;
import org.eclipse.tcf.services.IFileSystem.FileSystemException;
import org.eclipse.tcf.te.tcf.core.Tcf;
-import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFException;
-import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFFileSystemException;
-import org.eclipse.tcf.te.tcf.filesystem.internal.utils.PersistenceManager;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.filesystem.core.interfaces.IConfirmCallback;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.exceptions.TCFException;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.exceptions.TCFFileSystemException;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.nls.Messages;
/**
* FSCopy copies selected FSTreeNodes to a specify destination folder.
*/
-public class FSCopy extends FSUIOperation {
+public class OpCopy extends Operation {
// The nodes to be copied.
List<FSTreeNode> nodes;
// The destination folder to be copied to.
FSTreeNode dest;
+ //
+ IConfirmCallback confirmCallback;
+ //
+ boolean cpPermission;
+ boolean cpOwnership;
+
+ public OpCopy(List<FSTreeNode> nodes, FSTreeNode dest) {
+ this(nodes, dest, false, false, null);
+ }
/**
* Create a copy operation using the specified nodes and destination folder.
@@ -41,10 +50,13 @@ public class FSCopy extends FSUIOperation {
* @param nodes The file/folder nodes to be copied.
* @param dest The destination folder to be copied to.
*/
- public FSCopy(List<FSTreeNode> nodes, FSTreeNode dest) {
- super(Messages.FSCopy_CopyFileFolderTitle);
+ public OpCopy(List<FSTreeNode> nodes, FSTreeNode dest, boolean cpPerm, boolean cpOwn, IConfirmCallback confirmCallback) {
+ super();
this.nodes = getTopNodes(nodes);
this.dest = dest;
+ this.cpOwnership = cpOwn;
+ this.cpPermission = cpPerm;
+ this.confirmCallback = confirmCallback;
}
/*
@@ -124,12 +136,12 @@ public class FSCopy extends FSUIOperation {
mkdir(service, copy);
copyChildren(monitor, service, node, copy);
}
- else if (node == copy) {
+ else if (node.equals(copy)) {
copy = createCopyDestination(service, node, dest);
mkdir(service, copy);
copyChildren(monitor, service, node, copy);
}
- else if (confirmReplace(node)) {
+ else if (confirmReplace(node, confirmCallback)) {
copyChildren(monitor, service, node, copy);
}
monitor.worked(1);
@@ -174,9 +186,7 @@ public class FSCopy extends FSUIOperation {
String dst_path = copy.getLocation(true);
final TCFFileSystemException[] errors = new TCFFileSystemException[1];
// Get the options of copy permission and ownership.
- boolean copyPermission = PersistenceManager.getInstance().isCopyPermission();
- boolean copyOwnership = PersistenceManager.getInstance().isCopyOwnership();
- service.copy(src_path, dst_path, copyPermission, copyOwnership, new DoneCopy() {
+ service.copy(src_path, dst_path, cpPermission, cpOwnership, new DoneCopy() {
@Override
public void doneCopy(IToken token, FileSystemException error) {
if (error != null) {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSCreate.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpCreate.java
index a45508ea8..c310fe2da 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSCreate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpCreate.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.operations;
+package org.eclipse.tcf.te.tcf.filesystem.core.internal.operations;
import java.lang.reflect.InvocationTargetException;
@@ -21,16 +21,16 @@ import org.eclipse.tcf.services.IFileSystem.DoneStat;
import org.eclipse.tcf.services.IFileSystem.FileAttrs;
import org.eclipse.tcf.services.IFileSystem.FileSystemException;
import org.eclipse.tcf.te.tcf.core.Tcf;
-import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFException;
-import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFFileSystemException;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.exceptions.TCFException;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.exceptions.TCFFileSystemException;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.nls.Messages;
/**
* The base file operation class for creating a file or a folder in the file system of Target
* Explorer.
*/
-public abstract class FSCreate extends FSOperation {
+public abstract class OpCreate extends Operation {
// The folder in which a file/folder is going to be created.
protected FSTreeNode folder;
// The node that is created after the operation.
@@ -44,7 +44,7 @@ public abstract class FSCreate extends FSOperation {
* @param folder The folder in which the new node is going to be created.
* @param name The new node's name.
*/
- public FSCreate(FSTreeNode folder, String name) {
+ public OpCreate(FSTreeNode folder, String name) {
this.folder = folder;
this.name = name;
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSCreateFile.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpCreateFile.java
index 409c0e734..a8054e38b 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSCreateFile.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpCreateFile.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.operations;
+package org.eclipse.tcf.te.tcf.filesystem.core.internal.operations;
import org.eclipse.tcf.protocol.IToken;
import org.eclipse.tcf.services.IFileSystem;
@@ -15,14 +15,14 @@ import org.eclipse.tcf.services.IFileSystem.DoneClose;
import org.eclipse.tcf.services.IFileSystem.DoneOpen;
import org.eclipse.tcf.services.IFileSystem.FileSystemException;
import org.eclipse.tcf.services.IFileSystem.IFileHandle;
-import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFFileSystemException;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.exceptions.TCFFileSystemException;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.nls.Messages;
/**
* The file operation class to create a file in the file system of Target Explorer.
*/
-public class FSCreateFile extends FSCreate {
+public class OpCreateFile extends OpCreate {
/**
* Create an instance to create a file with the name in the folder.
@@ -30,7 +30,7 @@ public class FSCreateFile extends FSCreate {
* @param folder The folder in which the file is to be created.
* @param name The new file's name.
*/
- public FSCreateFile(FSTreeNode folder, String name) {
+ public OpCreateFile(FSTreeNode folder, String name) {
super(folder, name);
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSCreateFolder.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpCreateFolder.java
index 9eae99d3c..cec5153bc 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSCreateFolder.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpCreateFolder.java
@@ -7,19 +7,19 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.operations;
+package org.eclipse.tcf.te.tcf.filesystem.core.internal.operations;
import org.eclipse.tcf.protocol.IToken;
import org.eclipse.tcf.services.IFileSystem;
import org.eclipse.tcf.services.IFileSystem.DoneMkDir;
import org.eclipse.tcf.services.IFileSystem.FileSystemException;
-import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFFileSystemException;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.exceptions.TCFFileSystemException;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
/**
* The file operation class to create a folder in the file system of Target Explorer.
*/
-public class FSCreateFolder extends FSCreate {
+public class OpCreateFolder extends OpCreate {
/**
* Create an instance to create a folder with the name in the folder.
@@ -27,7 +27,7 @@ public class FSCreateFolder extends FSCreate {
* @param folder The folder in which the new folder is to be created.
* @param name The name of the new folder.
*/
- public FSCreateFolder(FSTreeNode folder, String name) {
+ public OpCreateFolder(FSTreeNode folder, String name) {
super(folder, name);
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSCreateRoot.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpCreateRoot.java
index efa957222..f85d7f68a 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSCreateRoot.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpCreateRoot.java
@@ -7,14 +7,14 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.operations;
+package org.eclipse.tcf.te.tcf.filesystem.core.internal.operations;
/**
* The file operation class to create the root node in the file system of Target Explorer.
*/
import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.ISafeRunnable;
import org.eclipse.core.runtime.SafeRunner;
-import org.eclipse.jface.util.SafeRunnable;
import org.eclipse.tcf.protocol.IChannel;
import org.eclipse.tcf.protocol.IToken;
import org.eclipse.tcf.protocol.Protocol;
@@ -22,12 +22,12 @@ import org.eclipse.tcf.services.IFileSystem;
import org.eclipse.tcf.services.IFileSystem.DirEntry;
import org.eclipse.tcf.services.IFileSystem.FileSystemException;
import org.eclipse.tcf.te.tcf.core.Tcf;
-import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFChannelException;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSModel;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.exceptions.TCFChannelException;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSModel;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
-public class FSCreateRoot extends FSOperation {
+public class OpCreateRoot extends Operation {
// The peer model in which the file system root is going to be created.
/* default */IPeerModel peerModel;
@@ -36,7 +36,7 @@ public class FSCreateRoot extends FSOperation {
*
* @param peerModel The peer model.
*/
- public FSCreateRoot(IPeerModel peerModel) {
+ public OpCreateRoot(IPeerModel peerModel) {
this.peerModel = peerModel;
}
@@ -55,7 +55,7 @@ public class FSCreateRoot extends FSOperation {
FSModel.getFSModel(peerModel).setRoot(result[0]);
}
});
- SafeRunner.run(new SafeRunnable() {
+ SafeRunner.run(new ISafeRunnable() {
@Override
public void handleException(Throwable e) {
// Ignore exception
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSDelete.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpDelete.java
index f0783bab2..5c91adde1 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSDelete.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpDelete.java
@@ -7,49 +7,44 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.operations;
+package org.eclipse.tcf.te.tcf.filesystem.core.internal.operations;
import java.lang.reflect.InvocationTargetException;
import java.util.List;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.ISafeRunnable;
import org.eclipse.core.runtime.SafeRunner;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.util.SafeRunnable;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
import org.eclipse.tcf.protocol.IChannel;
import org.eclipse.tcf.protocol.IToken;
import org.eclipse.tcf.services.IFileSystem;
import org.eclipse.tcf.services.IFileSystem.DoneRemove;
import org.eclipse.tcf.services.IFileSystem.FileSystemException;
import org.eclipse.tcf.te.tcf.core.Tcf;
-import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
-import org.eclipse.tcf.te.tcf.filesystem.internal.ImageConsts;
-import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFException;
-import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFFileSystemException;
-import org.eclipse.tcf.te.tcf.filesystem.internal.utils.StateManager;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
-import org.eclipse.ui.PlatformUI;
+import org.eclipse.tcf.te.tcf.filesystem.core.interfaces.IConfirmCallback;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.exceptions.TCFException;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.exceptions.TCFFileSystemException;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.utils.StateManager;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.nls.Messages;
/**
* FSDelete deletes the selected FSTreeNode list.
*/
-public class FSDelete extends FSUIOperation {
+public class OpDelete extends Operation {
//The nodes to be deleted.
List<FSTreeNode> nodes;
+ IConfirmCallback confirmCallback;
/**
* Create a delete operation using the specified nodes.
*
* @param nodes The nodes to be deleted.
*/
- public FSDelete(List<FSTreeNode> nodes) {
- super(Messages.FSDelete_DeleteFileFolderTitle);
+ public OpDelete(List<FSTreeNode> nodes, IConfirmCallback confirmCallback) {
this.nodes = getTopNodes(nodes);
+ this.confirmCallback = confirmCallback;
}
/*
@@ -171,9 +166,9 @@ public class FSDelete extends FSUIOperation {
if (monitor.isCanceled()) throw new InterruptedException();
monitor.subTask(NLS.bind(Messages.FSDelete_RemovingFileFolder, node.name));
// If the file is read only on windows or not writable on unix, then make it deletable.
- if (node.isWindowsNode() && node.isReadOnly() || !node.isWindowsNode() && !node.isWritable()) {
+ if (confirmCallback != null && confirmCallback.requires(node)) {
if (!yes2All) {
- int result = confirmDelete(node);
+ int result = confirmCallback.confirms(node);
if (result == 1) {
yes2All = true;
}
@@ -195,7 +190,7 @@ public class FSDelete extends FSUIOperation {
clone.setWritable(true);
}
// Make the file writable.
- SafeRunner.run(new SafeRunnable() {
+ SafeRunner.run(new ISafeRunnable() {
@Override
public void handleException(Throwable e) {
// Ignore exception
@@ -209,32 +204,4 @@ public class FSDelete extends FSUIOperation {
removeFile(node, service);
monitor.worked(1);
}
-
- /**
- * Confirm deleting the read only file.
- *
- * @param node The read only file node.
- * @return The confirming result, 0-yes, 1-yes to all, 2-no, 3-cancel.
- */
- private int confirmDelete(final FSTreeNode node) {
- final int[] results = new int[1];
- Display display = PlatformUI.getWorkbench().getDisplay();
- display.syncExec(new Runnable() {
- @Override
- public void run() {
- Shell parent = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- String title = Messages.FSDelete_ConfirmDelete;
- String message = NLS.bind(Messages.FSDelete_ConfirmMessage, node.name);
- final Image titleImage = UIPlugin.getImage(ImageConsts.DELETE_READONLY_CONFIRM);
- MessageDialog qDialog = new MessageDialog(parent, title, null, message, MessageDialog.QUESTION, new String[] { Messages.FSDelete_ButtonYes, Messages.FSDelete_ButtonYes2All, Messages.FSDelete_ButtonNo, Messages.FSDelete_ButtonCancel }, 0) {
- @Override
- public Image getQuestionImage() {
- return titleImage;
- }
- };
- results[0] = qDialog.open();
- }
- });
- return results[0];
- }
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/RunnableJob.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpJob.java
index c14b9b108..f25cdca2f 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/RunnableJob.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpJob.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.operations;
+package org.eclipse.tcf.te.tcf.filesystem.core.internal.operations;
import java.lang.reflect.InvocationTargetException;
@@ -15,15 +15,15 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.core.activator.CorePlugin;
+import org.eclipse.tcf.te.tcf.filesystem.core.interfaces.IOperation;
/**
* The job that wraps an IRunnableWithProgress object.
*/
-public class RunnableJob extends Job {
+public class OpJob extends Job {
// The runnable object.
- private IRunnableWithProgress runnable;
+ private IOperation operation;
/**
* Create a job with the specified name and the runnable object.
@@ -31,9 +31,9 @@ public class RunnableJob extends Job {
* @param name The job's name.
* @param runnable The runnable object.
*/
- public RunnableJob(String name, IRunnableWithProgress runnable) {
+ public OpJob(String name, IOperation runnable) {
super(name);
- this.runnable = runnable;
+ this.operation = runnable;
}
/*
@@ -43,10 +43,10 @@ public class RunnableJob extends Job {
@Override
protected IStatus run(IProgressMonitor monitor) {
try {
- runnable.run(monitor);
+ operation.run(monitor);
}
catch (InvocationTargetException e) {
- return new Status(IStatus.ERROR, UIPlugin.getUniqueIdentifier(), e.getLocalizedMessage(), e);
+ return new Status(IStatus.ERROR, CorePlugin.getUniqueIdentifier(), e.getLocalizedMessage(), e);
}
catch (InterruptedException e) {
return Status.CANCEL_STATUS;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSMove.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpMove.java
index 740ca5b48..02f13e7b5 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSMove.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpMove.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.operations;
+package org.eclipse.tcf.te.tcf.filesystem.core.internal.operations;
import java.lang.reflect.InvocationTargetException;
import java.util.List;
@@ -20,31 +20,37 @@ import org.eclipse.tcf.services.IFileSystem;
import org.eclipse.tcf.services.IFileSystem.DoneRename;
import org.eclipse.tcf.services.IFileSystem.FileSystemException;
import org.eclipse.tcf.te.tcf.core.Tcf;
-import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
-import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFException;
-import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFFileSystemException;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.filesystem.core.interfaces.IConfirmCallback;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.exceptions.TCFException;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.exceptions.TCFFileSystemException;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.nls.Messages;
/**
* FSMove moves specified tree nodes to a destination folder.
*/
-public class FSMove extends FSUIOperation {
+public class OpMove extends Operation {
// The file/folder nodes to be moved.
List<FSTreeNode> nodes;
// The destination folder to be moved to.
FSTreeNode dest;
+ //
+ IConfirmCallback confirmCallback;
+ public OpMove(List<FSTreeNode> nodes, FSTreeNode dest) {
+ this(nodes, dest, null);
+ }
/**
* Create a move operation to move the specified nodes to the destination folder.
*
* @param nodes The nodes to be moved.
* @param dest the destination folder to move to.
*/
- public FSMove(List<FSTreeNode> nodes, FSTreeNode dest) {
- super(Messages.FSMove_MovingFile);
+ public OpMove(List<FSTreeNode> nodes, FSTreeNode dest, IConfirmCallback confirmCallback) {
+ super();
this.nodes = getTopNodes(nodes);
this.dest = dest;
+ this.confirmCallback = confirmCallback;
}
/*
@@ -82,8 +88,6 @@ public class FSMove extends FSUIOperation {
throw new InvocationTargetException(e, e.getLocalizedMessage());
}
finally {
- // Clear the clip board.
- UIPlugin.getDefault().getClipboard().clear();
if (channel != null) Tcf.getChannelManager().closeChannel(channel);
monitor.done();
}
@@ -103,7 +107,7 @@ public class FSMove extends FSUIOperation {
if (monitor.isCanceled()) throw new InterruptedException();
monitor.subTask(NLS.bind(Messages.FSMove_Moving, node.name));
FSTreeNode copy = findChild(service, dest, node.name);
- if (copy == null || !copy.equals(node) && confirmReplace(node)) {
+ if (copy == null || !copy.equals(node) && confirmReplace(node, confirmCallback)) {
if (copy != null && copy.isDirectory() && node.isDirectory()) {
List<FSTreeNode> children = getChildren(node, service);
for (FSTreeNode child : children) {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpOutStreamOp.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpOutStreamOp.java
new file mode 100644
index 000000000..723556668
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpOutStreamOp.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.core.internal.operations;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+
+public class OpOutStreamOp extends OpStreamOp {
+ private OutputStream output;
+ private FSTreeNode node;
+ public OpOutStreamOp(FSTreeNode node, OutputStream output) {
+ this.node = node;
+ this.output = output;
+ }
+ @Override
+ public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+ try {
+ download2OutputStream(node, output, monitor);
+ }
+ catch (IOException e) {
+ throw new InvocationTargetException(e);
+ }
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSRefresh.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpRefresh.java
index 1b8c3d31b..dc8d812e6 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSRefresh.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpRefresh.java
@@ -7,29 +7,28 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.operations;
+package org.eclipse.tcf.te.tcf.filesystem.core.internal.operations;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.ISafeRunnable;
import org.eclipse.core.runtime.SafeRunner;
-import org.eclipse.jface.util.SafeRunnable;
import org.eclipse.osgi.util.NLS;
import org.eclipse.tcf.protocol.IChannel;
import org.eclipse.tcf.services.IFileSystem;
-import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
import org.eclipse.tcf.te.tcf.core.Tcf;
-import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFException;
-import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFFileSystemException;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.exceptions.TCFException;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.exceptions.TCFFileSystemException;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.nls.Messages;
/**
* FSRefresh refreshes a specified tree node and its children and grand children recursively.
*/
-public class FSRefresh extends FSJobOperation {
+public class OpRefresh extends Operation {
/**
* The root node to be refreshed.
*/
@@ -39,19 +38,9 @@ public class FSRefresh extends FSJobOperation {
* Create an FSRefresh to refresh the specified node and its descendants.
*
* @param node The root node to be refreshed.
- */
- public FSRefresh(FSTreeNode node) {
- this(node, null);
- }
-
- /**
- * Create an FSRefresh to refresh the specified node and its descendants.
- *
- * @param node The root node to be refreshed.
* @param callback The callback
*/
- public FSRefresh(FSTreeNode node, ICallback callback) {
- super(NLS.bind(Messages.RefreshDirectoryHandler_RefreshJobTitle, node.name), callback);
+ public OpRefresh(FSTreeNode node) {
this.node = node;
}
@@ -95,7 +84,7 @@ public class FSRefresh extends FSJobOperation {
void refresh(final FSTreeNode node, final IFileSystem service) {
if ((node.isSystemRoot() || node.isDirectory()) && node.childrenQueried) {
if (!node.isSystemRoot()) {
- SafeRunner.run(new SafeRunnable(){
+ SafeRunner.run(new ISafeRunnable(){
@Override
public void handleException(Throwable e) {
// Ignore exception
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSRename.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpRename.java
index 99e4778ee..686dc2c45 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSRename.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpRename.java
@@ -7,38 +7,31 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.operations;
+package org.eclipse.tcf.te.tcf.filesystem.core.internal.operations;
import java.io.File;
import java.lang.reflect.InvocationTargetException;
-import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
import org.eclipse.tcf.protocol.IChannel;
import org.eclipse.tcf.protocol.IToken;
import org.eclipse.tcf.services.IFileSystem;
import org.eclipse.tcf.services.IFileSystem.DoneRename;
import org.eclipse.tcf.services.IFileSystem.FileSystemException;
-import org.eclipse.tcf.te.runtime.callback.Callback;
import org.eclipse.tcf.te.tcf.core.Tcf;
-import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFException;
-import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFFileSystemException;
-import org.eclipse.tcf.te.tcf.filesystem.internal.utils.CacheManager;
-import org.eclipse.tcf.te.tcf.filesystem.internal.utils.PersistenceManager;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
-import org.eclipse.ui.PlatformUI;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.exceptions.TCFException;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.exceptions.TCFFileSystemException;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.utils.CacheManager;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.utils.PersistenceManager;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.nls.Messages;
/**
* FSRename renames the specified file/folder to a
* new name.
*
*/
-public class FSRename extends FSJobOperation {
+public class OpRename extends Operation {
// The file/folder node to be renamed.
FSTreeNode node;
// The new name the file/folder is renamed to.
@@ -50,26 +43,10 @@ public class FSRename extends FSJobOperation {
* @param node The file/folder node to be renamed.
* @param newName The new name of this node.
*/
- public FSRename(FSTreeNode node, String newName) {
- super(Messages.FSRename_JobTitle, new RenameCallback());
+ public OpRename(FSTreeNode node, String newName) {
this.node = node;
this.newName = newName;
}
-
- /**
- * The callback called after the renaming is done.
- */
- static class RenameCallback extends Callback {
- @Override
- protected void internalDone(Object caller, IStatus status) {
- Assert.isNotNull(Display.getCurrent());
- if (!status.isOK()) {
- String message = status.getMessage();
- Shell parent = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- MessageDialog.openError(parent, Messages.FSRename_RenameFileFolderTitle, message);
- }
- }
- }
/*
* (non-Javadoc)
@@ -123,13 +100,7 @@ public class FSRename extends FSJobOperation {
final File file = CacheManager.getInstance().getCacheFile(node);
if (file.exists()) {
if (node.isFile()) {
- Display display = PlatformUI.getWorkbench().getDisplay();
- display.asyncExec(new Runnable(){
- @Override
- public void run() {
- closeEditor(file);
- }
- });
+ closeEditor(file);
PersistenceManager.getInstance().removeBaseTimestamp(node.getLocationURI());
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpStreamOp.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpStreamOp.java
new file mode 100644
index 000000000..03201bfac
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpStreamOp.java
@@ -0,0 +1,156 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.core.internal.operations;
+
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.URL;
+import java.text.DecimalFormat;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.ISafeRunnable;
+import org.eclipse.core.runtime.SafeRunner;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.nls.Messages;
+
+public class OpStreamOp extends Operation {
+ // The formatter used to format the size displayed while downloading.
+ protected static final DecimalFormat SIZE_FORMAT = new DecimalFormat("#,##0.##"); //$NON-NLS-1$
+ // The default chunk size of the buffer used during downloading files.
+ protected static final int DEFAULT_CHUNK_SIZE = 5 * 1024;
+
+ public OpStreamOp() {
+ }
+
+ /**
+ * Check if the file exists and set its last modified time if it does. Record
+ * the failure message if it fails.
+ *
+ * @param file The file to be set.
+ * @param lastModified the last modified time.
+ */
+ protected void setLastModifiedChecked(final File file, final long lastModified) {
+ if (file.exists()) {
+ SafeRunner.run(new ISafeRunnable(){
+ @Override
+ public void run() throws Exception {
+ if (!file.setLastModified(lastModified)) {
+ throw new Exception(NLS.bind(Messages.CacheManager_SetLastModifiedFailed, file.getAbsolutePath()));
+ }
+ }
+ @Override
+ public void handleException(Throwable exception) {
+ // Ignore on purpose
+ }});
+ }
+ }
+
+ /**
+ * Download the specified file into an output stream using the monitor to report the progress.
+ *
+ * @param node
+ * The file to be downloaded.
+ * @param output
+ * The output stream.
+ * @param monitor
+ * The monitor used to report the progress.
+ * @throws IOException
+ * an IOException thrown during downloading and storing data.
+ */
+ protected void download2OutputStream(FSTreeNode node, OutputStream output, IProgressMonitor monitor) throws IOException {
+ InputStream input = null;
+ // Open the input stream of the node using the tcf stream protocol.
+ try{
+ URL url = node.getLocationURL();
+ InputStream in = url.openStream();
+ input = new BufferedInputStream(in);
+ // The buffer used to download the file.
+ byte[] data = new byte[DEFAULT_CHUNK_SIZE];
+ // Calculate the chunk size of one percent.
+ int chunk_size = (int) node.attr.size / 100;
+ // Total size displayed on the progress dialog.
+ String total_size = formatSize(node.attr.size);
+
+ int percentRead = 0;
+ long bytesRead = 0;
+ int length;
+ while ((length = input.read(data)) >= 0 && !monitor.isCanceled()) {
+ output.write(data, 0, length);
+ output.flush();
+ bytesRead += length;
+ if (chunk_size != 0) {
+ int percent = (int) bytesRead / chunk_size;
+ if (percent != percentRead) { // Update the progress.
+ monitor.worked(percent - percentRead);
+ percentRead = percent; // Remember the percentage.
+ // Report the progress.
+ monitor.subTask(NLS.bind(Messages.CacheManager_DownloadingProgress, formatSize(bytesRead), total_size));
+ }
+ }
+ }
+ }finally{
+ if (input != null) {
+ try {
+ input.close();
+ } catch (Exception e) {
+ }
+ }
+ }
+ }
+
+ /**
+ * Check if the file exists and set its read-only attribute if it does. Record
+ * the failure message if it fails.
+ *
+ * @param file The file to be set.
+ */
+ protected void setReadOnlyChecked(final File file) {
+ if (file.exists()) {
+ SafeRunner.run(new ISafeRunnable(){
+ @Override
+ public void run() throws Exception {
+ if (!file.setReadOnly()) {
+ throw new Exception(NLS.bind(Messages.CacheManager_SetReadOnlyFailed, file.getAbsolutePath()));
+ }
+ }
+
+ @Override
+ public void handleException(Throwable exception) {
+ // Ignore on purpose
+ }});
+ }
+ }
+
+ /**
+ * Use the SIZE_FORMAT to format the file's size. The rule is: 1. If the
+ * size is less than 1024 bytes, then show it as "####" bytes. 2. If the
+ * size is less than 1024 KBs, while more than 1 KB, then show it as
+ * "####.##" KBs. 3. If the size is more than 1 MB, then show it as
+ * "####.##" MBs.
+ *
+ * @param size
+ * The file size to be displayed.
+ * @return The string representation of the size.
+ */
+ protected String formatSize(long size) {
+ double kbSize = size / 1024.0;
+ if (kbSize < 1.0) {
+ return SIZE_FORMAT.format(size) + Messages.CacheManager_Bytes;
+ }
+ double mbSize = kbSize / 1024.0;
+ if (mbSize < 1.0)
+ return SIZE_FORMAT.format(kbSize) + Messages.CacheManager_KBs;
+ return SIZE_FORMAT.format(mbSize) + Messages.CacheManager_MBs;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpUpload.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpUpload.java
new file mode 100644
index 000000000..3f622711f
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/OpUpload.java
@@ -0,0 +1,348 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.core.internal.operations;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicReference;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.ISafeRunnable;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.SafeRunner;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.tcf.te.tcf.filesystem.core.interfaces.IConfirmCallback;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.url.TcfURLConnection;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.nls.Messages;
+
+/**
+ * Upload multiple files from local system to a remote system.
+ */
+public class OpUpload extends OpStreamOp {
+ // The source files to be uploaded.
+ File[] srcFiles;
+ //
+ URL[] dstURLs;
+ // The confirm callback
+ IConfirmCallback confirmCallback;
+ //
+ Map<File, FSTreeNode> parentFolders;
+
+ public OpUpload(File srcFile, URL dstURL) {
+ this(new File[]{srcFile}, new URL[]{dstURL});
+ }
+
+ public OpUpload(File[] srcFiles, URL[] dstURLs) {
+ this(srcFiles, dstURLs, null);
+ }
+
+ public OpUpload(File[] srcFiles, URL[] dstURLs, IConfirmCallback confirmCallback) {
+ super();
+ this.srcFiles = srcFiles;
+ this.dstURLs = dstURLs;
+ this.confirmCallback = confirmCallback;
+ }
+
+ public OpUpload(String[]sourceFiles, final FSTreeNode targetFolder) {
+ this(sourceFiles, targetFolder, null);
+ }
+
+ /**
+ * Create an instance with specified files, target folder and a callback.
+ *
+ * @param sourceFiles the source files being uploaded.
+ * @param targetFolder the target folder to upload the files to.
+ * @param callback the callback that is invoked after uploading.
+ */
+ public OpUpload(String[] sourceFiles, final FSTreeNode targetFolder, IConfirmCallback confirmCallback) {
+ super();
+ this.confirmCallback = confirmCallback;
+ List<File> fileList = new ArrayList<File>();
+ List<URL> urlList = new ArrayList<URL>();
+ prepareDirStruct(sourceFiles, fileList, urlList, targetFolder);
+ srcFiles = fileList.toArray(new File[fileList.size()]);
+ dstURLs = urlList.toArray(new URL[urlList.size()]);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSOperation#run(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ @Override
+ public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+ try {
+ String message;
+ if(srcFiles.length==1)
+ message = NLS.bind(Messages.CacheManager_UploadSingleFile, srcFiles[0].getName());
+ else
+ message = NLS.bind(Messages.CacheManager_UploadNFiles, Long.valueOf(srcFiles.length));
+ monitor.beginTask(message, 100);
+ uploadFiles(monitor, srcFiles, dstURLs);
+ } catch (MalformedURLException e) {
+ throw new InvocationTargetException(e);
+ } catch (IOException e) {
+ throw new InvocationTargetException(e);
+ } finally {
+ monitor.done();
+ }
+ }
+
+ private boolean requireConfirmation(File file) {
+ return parentFolders != null && confirmCallback != null && !yes2All && confirmCallback.requires(file) && findNode(file) != null;
+ }
+
+ private void uploadFiles(IProgressMonitor monitor, File[] files, URL[] urls) throws IOException {
+ BufferedInputStream input = null;
+ BufferedOutputStream output = null;
+ // The buffer used to download the file.
+ byte[] data = new byte[DEFAULT_CHUNK_SIZE];
+ // Calculate the total size.
+ long totalSize = 0;
+ for (File file:files) {
+ totalSize += file.length();
+ }
+ // Calculate the chunk size of one percent.
+ int chunk_size = (int) totalSize / 100;
+ // The current reading percentage.
+ int percentRead = 0;
+ // The current length of read bytes.
+ long bytesRead = 0;
+ for (int i = 0; i < files.length && !monitor.isCanceled(); i++) {
+ File file = files[i];
+ if (requireConfirmation(file)) {
+ int result = confirmCallback.confirms(file);
+ switch (result) {
+ case IConfirmCallback.YES:
+ break;
+ case IConfirmCallback.YES_TO_ALL:
+ yes2All = true;
+ break;
+ case IConfirmCallback.NO:
+ bytesRead += file.length();
+ if (chunk_size != 0) {
+ int percent = (int) bytesRead / chunk_size;
+ if (percent != percentRead) { // Update the progress.
+ monitor.worked(percent - percentRead);
+ percentRead = percent; // Remember the percentage.
+ // Report the progress.
+ monitor.subTask(NLS
+ .bind(Messages.CacheManager_UploadingProgress, new Object[] { file
+ .getName(), formatSize(bytesRead), formatSize(file
+ .length()) }));
+ }
+ }
+ continue;
+ case IConfirmCallback.CANCEL:
+ monitor.setCanceled(true);
+ continue;
+ }
+ }
+ try {
+ URL url = urls[i];
+ TcfURLConnection connection = (TcfURLConnection) url.openConnection();
+ connection.setDoInput(false);
+ connection.setDoOutput(true);
+ input = new BufferedInputStream(new FileInputStream(file));
+ output = new BufferedOutputStream(connection.getOutputStream());
+
+ // Total size displayed on the progress dialog.
+ String fileLength = formatSize(file.length());
+ int length;
+ while ((length = input.read(data)) >= 0 && !monitor.isCanceled()) {
+ output.write(data, 0, length);
+ output.flush();
+ bytesRead += length;
+ if (chunk_size != 0) {
+ int percent = (int) bytesRead / chunk_size;
+ if (percent != percentRead) { // Update the progress.
+ monitor.worked(percent - percentRead);
+ percentRead = percent; // Remember the percentage.
+ // Report the progress.
+ monitor.subTask(NLS.bind(Messages.CacheManager_UploadingProgress, new Object[]{file.getName(), formatSize(bytesRead), fileLength}));
+ }
+ }
+ }
+ } finally {
+ if (output != null) {
+ try {
+ output.close();
+ } catch (Exception e) {
+ }
+ }
+ if (input != null) {
+ try {
+ input.close();
+ } catch (Exception e) {
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Prepare the directory structure on the remote target, creating necessary intermediate directories
+ * and found all files that should be uploaded. The resulting files to be uploaded should be stored
+ * to the file list. The resulting corresponding target file URLs should be stored in the url list.
+ *
+ * @param fileList The file list to store the files that should be uploaded.
+ * @param urlList The list containing the corresponding urls.
+ */
+ private void prepareDirStruct(String[] sourceFiles, List<File> fileList, List<URL> urlList, FSTreeNode targetFolder) {
+ parentFolders = Collections.synchronizedMap(new HashMap<File, FSTreeNode>());
+ List<File> files = new ArrayList<File>();
+ for(String path: sourceFiles) {
+ files.add(new File(path));
+ }
+ // Find the root nodes of these files.
+ List<File> topFiles = getTopFiles(files);
+ for(File topFile : topFiles) {
+ appendFile(topFile, fileList, urlList, targetFolder);
+ }
+ }
+
+ /**
+ * Append the specified file object to the file list and url list. If the file object is a file
+ * then append it to the two lists. If the file object is a directory, then recursively
+ * add its children and grand children to the two list. During this process, the parents of
+ * these files and directories traversed should be put into the parent folders map so that
+ * it could be queried to check if it has a file/directory with a same name.
+ *
+ * @param file The file to be added
+ * @param fileList The file list
+ * @param urlList The url list
+ * @param parent The current parent node
+ */
+ private void appendFile(final File file, final List<File> fileList, final List<URL> urlList, final FSTreeNode parent) {
+ parentFolders.put(file, parent);
+ if(file.isFile()) {
+ SafeRunner.run(new ISafeRunnable(){
+ @Override
+ public void run() throws Exception {
+ URL folderURL = parent.getLocationURL();
+ URL url = new URL(folderURL, file.getName());
+ fileList.add(file);
+ urlList.add(url);
+ }
+ @Override
+ public void handleException(Throwable exception) {
+ // Ignore on purpose
+ }});
+ } else if(file.isDirectory()) {
+ FSTreeNode node = findNode(file);
+ if(node == null) {
+ final AtomicReference<FSTreeNode> reference = new AtomicReference<FSTreeNode>();
+ SafeRunner.run(new ISafeRunnable(){
+ @Override
+ public void run() throws Exception {
+ OpCreateFolder create = new OpCreateFolder(parent, file.getName());
+ create.run(new NullProgressMonitor());
+ reference.set(create.getNode());
+ }
+ @Override
+ public void handleException(Throwable exception) {
+ // Ignore on purpose
+ }});
+ node = reference.get();
+ }
+ File[] children = file.listFiles();
+ for(File child : children) {
+ appendFile(child, fileList, urlList, node);
+ }
+ }
+ }
+
+ /**
+ * Get the root files of the specified files/folders in the list.
+ *
+ * @param files The files to be checked.
+ * @return Root nodes of these files that has no parent.
+ */
+ private List<File> getTopFiles(List<File>files) {
+ List<File> result = new ArrayList<File>();
+ for(File file : files) {
+ if(!hasFileAncestor(file, files)) {
+ result.add(file);
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Check if the target file has an ancestral parent in the specified list.
+ *
+ * @param target The target file to be checked.
+ * @param files The file list to be searched.
+ * @return true if it has an ancestral parent.
+ */
+ private boolean hasFileAncestor(File target, List<File> files) {
+ for(File file : files) {
+ if(isFileAncestor(file, target)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Check if the specified "file" is an ancestral parent of the "target" file.
+ *
+ * @param file The ancestral file.
+ * @param target The target file.
+ * @return true if "file" is an ancestral parent of "target"
+ */
+ private boolean isFileAncestor(File file, File target) {
+ if(target == null) return false;
+ File parent = target.getParentFile();
+ if(file.equals(parent)) return true;
+ return isFileAncestor(file, parent);
+ }
+
+ /**
+ * Check if the specified file has a same-named file under its corresponding
+ * parent folder.
+ *
+ * @param file The file to checked.
+ * @return the node that has the same name with the file.
+ */
+ private FSTreeNode findNode(File file) {
+ final FSTreeNode parent = parentFolders.get(file);
+ if (parent != null) {
+ final List<FSTreeNode> targetChildren = new ArrayList<FSTreeNode>();
+ SafeRunner.run(new ISafeRunnable() {
+ @Override
+ public void run() throws Exception {
+ targetChildren.addAll(getChildren(parent));
+ }
+
+ @Override
+ public void handleException(Throwable exception) {
+ // Ignore on purpose
+ }
+ });
+ String name = file.getName();
+ for (FSTreeNode child : targetChildren) {
+ if (name.equals(child.name)) return child;
+ }
+ }
+ return null;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSOperation.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/Operation.java
index 84495a5ff..9d64c0b2d 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSOperation.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/operations/Operation.java
@@ -7,27 +7,18 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.operations;
+package org.eclipse.tcf.te.tcf.filesystem.core.internal.operations;
import java.io.File;
import java.lang.reflect.InvocationTargetException;
import java.net.ConnectException;
-import java.net.URI;
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.ISafeRunnable;
import org.eclipse.core.runtime.SafeRunner;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.util.SafeRunnable;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
import org.eclipse.tcf.protocol.IChannel;
import org.eclipse.tcf.protocol.IPeer;
import org.eclipse.tcf.protocol.IToken;
@@ -44,34 +35,28 @@ import org.eclipse.tcf.te.tcf.core.Tcf;
import org.eclipse.tcf.te.tcf.core.concurrent.BlockingCallProxy;
import org.eclipse.tcf.te.tcf.core.interfaces.IChannelManager;
import org.eclipse.tcf.te.tcf.core.interfaces.IChannelManager.DoneOpenChannel;
-import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
-import org.eclipse.tcf.te.tcf.filesystem.internal.ImageConsts;
-import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFChannelException;
-import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFException;
-import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFFileSystemException;
-import org.eclipse.tcf.te.tcf.filesystem.internal.utils.CacheManager;
-import org.eclipse.tcf.te.tcf.filesystem.internal.utils.PersistenceManager;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IEditorReference;
-import org.eclipse.ui.IURIEditorInput;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PlatformUI;
+import org.eclipse.tcf.te.tcf.filesystem.core.interfaces.IConfirmCallback;
+import org.eclipse.tcf.te.tcf.filesystem.core.interfaces.IOperation;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.exceptions.TCFChannelException;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.exceptions.TCFException;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.exceptions.TCFFileSystemException;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.utils.CacheManager;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.utils.PersistenceManager;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.nls.Messages;
/**
* FSOperation is the base class of file system operation classes including FSCopy, FSDelete, FSMove
* and FSRename.
*/
-public class FSOperation implements IRunnableWithProgress{
+public class Operation implements IOperation {
// The flag indicating if the following action should be executed without asking.
protected boolean yes2All;
/**
* Create an instance.
*/
- public FSOperation() {
+ public Operation() {
this.yes2All = false;
}
@@ -131,12 +116,17 @@ public class FSOperation implements IRunnableWithProgress{
*/
protected void deleteFileChecked(final File file) {
if (file.exists()) {
- SafeRunner.run(new SafeRunnable(){
+ SafeRunner.run(new ISafeRunnable(){
@Override
public void run() throws Exception {
if (!file.delete()) {
throw new Exception(NLS.bind(Messages.FSOperation_DeletingFileFailed, file.getAbsolutePath()));
}
+ }
+
+ @Override
+ public void handleException(Throwable exception) {
+ // Ignore on purpose
}});
}
}
@@ -149,30 +139,6 @@ public class FSOperation implements IRunnableWithProgress{
* @param file The file that is opened.
*/
protected void closeEditor(final File file) {
- Assert.isNotNull(Display.getCurrent());
- final IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- IEditorReference[] refs = page.getEditorReferences();
- for (IEditorReference ref : refs) {
- final IEditorReference editorRef = ref;
- SafeRunner.run(new SafeRunnable() {
- @Override
- public void handleException(Throwable e) {
- // Ignore exception
- }
- @Override
- public void run() throws Exception {
- IEditorInput input = editorRef.getEditorInput();
- if (input instanceof IURIEditorInput) {
- IURIEditorInput editorInput = (IURIEditorInput) input;
- URI uri = editorInput.getURI();
- if (file.toURI().equals(uri)) {
- IEditorPart editor = editorRef.getEditor(true);
- page.closeEditor(editor, false);
- }
- }
- }
- });
- }
}
/**
@@ -183,13 +149,7 @@ public class FSOperation implements IRunnableWithProgress{
protected void cleanUpFile(FSTreeNode node) {
final File file = CacheManager.getInstance().getCacheFile(node);
if (file.exists()) {
- Display display = PlatformUI.getWorkbench().getDisplay();
- display.asyncExec(new Runnable(){
- @Override
- public void run() {
- closeEditor(file);
- }
- });
+ closeEditor(file);
}
deleteFileChecked(file);
PersistenceManager.getInstance().removeBaseTimestamp(node.getLocationURI());
@@ -518,27 +478,11 @@ public class FSOperation implements IRunnableWithProgress{
* @return The confirming result. true yes, false no.
* @throws InterruptedException Thrown when canceled.
*/
- protected boolean confirmReplace(final FSTreeNode node) throws InterruptedException {
+ protected boolean confirmReplace(final FSTreeNode node, IConfirmCallback confirmCallback) throws InterruptedException {
+ if(confirmCallback == null) return true;
if (yes2All) return true;
- final int[] results = new int[1];
- Display display = PlatformUI.getWorkbench().getDisplay();
- display.syncExec(new Runnable() {
- @Override
- public void run() {
- Shell parent = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- String title = node.isDirectory() ? Messages.FSOperation_ConfirmFolderReplaceTitle : Messages.FSOperation_ConfirmFileReplace;
- String message = NLS.bind(node.isDirectory() ? Messages.FSOperation_ConfirmFolderReplaceMessage : Messages.FSOperation_ConfirmFileReplaceMessage, node.name);
- final Image titleImage = UIPlugin.getImage(ImageConsts.REPLACE_FOLDER_CONFIRM);
- MessageDialog qDialog = new MessageDialog(parent, title, null, message, MessageDialog.QUESTION, new String[] { Messages.FSOperation_ConfirmDialogYes, Messages.FSOperation_ConfirmDialogYesToAll, Messages.FSOperation_ConfirmDialogNo, Messages.FSOperation_ConfirmDialogCancel }, 0) {
- @Override
- public Image getQuestionImage() {
- return titleImage;
- }
- };
- results[0] = qDialog.open();
- }
- });
- switch (results[0]) {
+ int result = confirmCallback.confirms(node);
+ switch (result) {
case 0:
return true;
case 1:
@@ -640,19 +584,6 @@ public class FSOperation implements IRunnableWithProgress{
}
}
- /**
- * Do the actual operation.
- *
- * @return Status.OK_STATUS if it is successful.
- */
- public IStatus doit(){
- return Status.OK_STATUS;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.operation.IRunnableWithProgress#run(org.eclipse.core.runtime.IProgressMonitor)
- */
@Override
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/testers/FSTreeNodePropertyTester.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/testers/FSTreeNodePropertyTester.java
index 145ad8fbf..f3e007f70 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/testers/FSTreeNodePropertyTester.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/testers/FSTreeNodePropertyTester.java
@@ -10,17 +10,17 @@
* William Chen (Wind River) - [352302]Opening a file in an editor depending on
* the client's permissions.
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.testers;
+package org.eclipse.tcf.te.tcf.filesystem.core.internal.testers;
import java.io.File;
import org.eclipse.core.expressions.PropertyTester;
import org.eclipse.core.runtime.Assert;
-import org.eclipse.tcf.te.tcf.filesystem.internal.utils.CacheManager;
-import org.eclipse.tcf.te.tcf.filesystem.internal.utils.ContentTypeHelper;
-import org.eclipse.tcf.te.tcf.filesystem.internal.utils.StateManager;
-import org.eclipse.tcf.te.tcf.filesystem.model.CacheState;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.utils.CacheManager;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.utils.ContentTypeHelper;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.utils.StateManager;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.CacheState;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
/**
* The property tester of an FSTreeNode. The properties include "isFile"
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/testers/TargetPropertyTester.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/testers/TargetPropertyTester.java
index 1e4b6c3e0..a99526894 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/testers/TargetPropertyTester.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/testers/TargetPropertyTester.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.testers;
+package org.eclipse.tcf.te.tcf.filesystem.core.internal.testers;
import org.eclipse.core.expressions.PropertyTester;
import org.eclipse.tcf.protocol.Protocol;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/url/TcfInputStream.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/url/TcfInputStream.java
index 07d3cad60..890fc55d4 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/url/TcfInputStream.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/url/TcfInputStream.java
@@ -7,7 +7,7 @@
* Contributors:
* William Chen (Wind River)- [345387]Open the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.url;
+package org.eclipse.tcf.te.tcf.filesystem.core.internal.url;
import java.io.IOException;
import java.io.InputStream;
@@ -15,7 +15,7 @@ import java.io.InputStream;
import org.eclipse.tcf.protocol.IToken;
import org.eclipse.tcf.services.IFileSystem.DoneRead;
import org.eclipse.tcf.services.IFileSystem.FileSystemException;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.filesystem.core.nls.Messages;
/**
* The TCF input stream returned by {@link TcfURLConnection#getInputStream()}.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/url/TcfOutputStream.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/url/TcfOutputStream.java
index 90f0dcacc..17a476b43 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/url/TcfOutputStream.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/url/TcfOutputStream.java
@@ -7,7 +7,7 @@
* Contributors:
* William Chen (Wind River) - [345552] Edit the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.url;
+package org.eclipse.tcf.te.tcf.filesystem.core.internal.url;
import java.io.IOException;
import java.io.OutputStream;
@@ -15,7 +15,7 @@ import java.io.OutputStream;
import org.eclipse.tcf.protocol.IToken;
import org.eclipse.tcf.services.IFileSystem.DoneWrite;
import org.eclipse.tcf.services.IFileSystem.FileSystemException;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.filesystem.core.nls.Messages;
/**
* The TCF output stream returned by {@link TcfURLConnection#getOutputStream()}.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/url/TcfURLConnection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/url/TcfURLConnection.java
index 2c1258d4c..f9f5f0a5a 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/url/TcfURLConnection.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/url/TcfURLConnection.java
@@ -7,7 +7,7 @@
* Contributors:
* William Chen (Wind River)- [345387]Open the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.url;
+package org.eclipse.tcf.te.tcf.filesystem.core.internal.url;
import java.io.Closeable;
import java.io.IOException;
@@ -28,9 +28,9 @@ import org.eclipse.tcf.services.IFileSystem.DoneOpen;
import org.eclipse.tcf.services.IFileSystem.FileSystemException;
import org.eclipse.tcf.services.IFileSystem.IFileHandle;
import org.eclipse.tcf.te.tcf.core.Tcf;
-import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFChannelException;
-import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSOperation;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.exceptions.TCFChannelException;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.Operation;
+import org.eclipse.tcf.te.tcf.filesystem.core.nls.Messages;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
import org.eclipse.tcf.te.tcf.locator.model.Model;
@@ -165,12 +165,12 @@ public class TcfURLConnection extends URLConnection {
throw new IOException(Messages.TcfURLConnection_NoSuchTcfAgent);
try {
// Open the channel
- channel = FSOperation.openChannel(peer);
+ channel = Operation.openChannel(peer);
} catch (TCFChannelException e) {
throw new IOException(e.getLocalizedMessage());
}
if (channel != null) {
- service = FSOperation.getBlockingFileSystem(channel);
+ service = Operation.getBlockingFileSystem(channel);
if (service != null) {
final FileSystemException[] errors = new FileSystemException[1];
// Open the file.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/url/TcfURLStreamHandlerService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/url/TcfURLStreamHandlerService.java
index 28bbe9590..558a8765c 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/url/TcfURLStreamHandlerService.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/url/TcfURLStreamHandlerService.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.url;
+package org.eclipse.tcf.te.tcf.filesystem.core.internal.url;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
@@ -21,8 +21,8 @@ import java.util.concurrent.atomic.AtomicReference;
import org.eclipse.core.runtime.ISafeRunnable;
import org.eclipse.core.runtime.SafeRunner;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.nls.Messages;
import org.osgi.service.url.AbstractURLStreamHandlerService;
/**
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/utils/CacheManager.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/utils/CacheManager.java
new file mode 100644
index 000000000..93949e1a7
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/utils/CacheManager.java
@@ -0,0 +1,248 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ * William Chen (Wind River)- [345387] Open the remote files with a proper editor
+ * William Chen (Wind River)- [345552] Edit the remote files with a proper editor
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.core.internal.utils;
+
+import java.io.File;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.ISafeRunnable;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.SafeRunner;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.tcf.te.tcf.filesystem.core.activator.CorePlugin;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.nls.Messages;
+
+/**
+ * The local file system cache used to manage the temporary files downloaded
+ * from a remote file system.
+ */
+public class CacheManager {
+ public static final char PATH_ESCAPE_CHAR = '$';
+
+ // The singleton instance.
+ private static volatile CacheManager instance;
+
+ /**
+ * Get the singleton cache manager.
+ *
+ * @return The singleton cache manager.
+ */
+ public static CacheManager getInstance() {
+ if (instance == null) {
+ instance = new CacheManager();
+ }
+ return instance;
+ }
+
+ /**
+ * Create a cache manager.
+ */
+ private CacheManager() {
+ }
+
+ /**
+ * Get the local path of a node's cached file.
+ * <p>
+ * The preferred location is within the plugin's state location, in
+ * example <code>&lt;state location&gt;agent_<hashcode_of_peerId>/remote/path/to/the/file...</code>.
+ * <p>
+ * If the plug-in is loaded in a RCP workspace-less environment, the
+ * fall back strategy is to use the users home directory.
+ *
+ * @param node
+ * The file/folder node.
+ * @return The local path of the node's cached file.
+ */
+ public IPath getCachePath(FSTreeNode node) {
+ File location = getCacheRoot();
+ String agentId = node.peerNode.getPeerId();
+ // Use Math.abs to avoid negative hash value.
+ String agent = agentId.replace(':', PATH_ESCAPE_CHAR);
+ IPath agentDir = new Path(location.getAbsolutePath()).append(agent);
+ File agentDirFile = agentDir.toFile();
+ mkdirChecked(agentDirFile);
+ return appendNodePath(agentDir, node);
+ }
+
+ /**
+ * Check and make a directory if it does not exist. Record
+ * the failure message if making fails.
+ *
+ * @param file The file to be deleted.
+ */
+ void mkdirChecked(final File dir) {
+ if(!dir.exists()) {
+ SafeRunner.run(new ISafeRunnable(){
+ @Override
+ public void run() throws Exception {
+ if (!dir.mkdir()) {
+ throw new Exception(NLS.bind(Messages.CacheManager_MkdirFailed, dir.getAbsolutePath()));
+ }
+ }
+
+ @Override
+ public void handleException(Throwable exception) {
+ // Ignore on purpose
+ }});
+ }
+ }
+
+ /**
+ * Check if the file exists and delete if it does. Record
+ * the failure message if deleting fails.
+ *
+ * @param file The file to be deleted.
+ */
+ void deleteFileChecked(final File file) {
+ if (file.exists()) {
+ SafeRunner.run(new ISafeRunnable(){
+ @Override
+ public void run() throws Exception {
+ if (!file.delete()) {
+ throw new Exception(NLS.bind(Messages.FSOperation_DeletingFileFailed, file.getAbsolutePath()));
+ }
+ }
+
+ @Override
+ public void handleException(Throwable exception) {
+ // Ignore on purpose
+ }});
+ }
+ }
+
+ /**
+ * Check if the file exists and set its last modified time if it does. Record
+ * the failure message if it fails.
+ *
+ * @param file The file to be set.
+ * @param lastModified the last modified time.
+ */
+ void setLastModifiedChecked(final File file, final long lastModified) {
+ if (file.exists()) {
+ SafeRunner.run(new ISafeRunnable(){
+ @Override
+ public void run() throws Exception {
+ if (!file.setLastModified(lastModified)) {
+ throw new Exception(NLS.bind(Messages.CacheManager_SetLastModifiedFailed, file.getAbsolutePath()));
+ }
+ }
+ @Override
+ public void handleException(Throwable exception) {
+ // Ignore on purpose
+ }});
+ }
+ }
+
+ /**
+ * Check if the file exists and set its read-only attribute if it does. Record
+ * the failure message if it fails.
+ *
+ * @param file The file to be set.
+ */
+ void setReadOnlyChecked(final File file) {
+ if (file.exists()) {
+ SafeRunner.run(new ISafeRunnable(){
+ @Override
+ public void run() throws Exception {
+ if (!file.setReadOnly()) {
+ throw new Exception(NLS.bind(Messages.CacheManager_SetReadOnlyFailed, file.getAbsolutePath()));
+ }
+ }
+
+ @Override
+ public void handleException(Throwable exception) {
+ // Ignore on purpose
+ }});
+ }
+ }
+
+ /**
+ * Get the local file of the specified node.
+ *
+ * <p>
+ * The preferred location is within the plugin's state location, in
+ * example <code>&lt;state location&gt;agent_<hashcode_of_peerId>/remote/path/to/the/file...</code>.
+ * <p>
+ * If the plug-in is loaded in a RCP workspace-less environment, the
+ * fall back strategy is to use the users home directory.
+ *
+ * @param node
+ * The file/folder node.
+ * @return The file object of the node's local cache.
+ */
+ public File getCacheFile(FSTreeNode node){
+ return getCachePath(node).toFile();
+ }
+
+ /**
+ * Get the cache file system's root directory on the local host's
+ * file system.
+ *
+ * @return The root folder's location of the cache file system.
+ */
+ public File getCacheRoot() {
+ File location;
+ try {
+ location = CorePlugin.getDefault().getStateLocation().toFile();
+ }catch (IllegalStateException e) {
+ // An RCP workspace-less environment (-data @none)
+ location = new File(System.getProperty("user.home"), ".tcf"); //$NON-NLS-1$ //$NON-NLS-2$
+ location = new File(location, "fs"); //$NON-NLS-1$
+ }
+
+ // Create the location if it not exist
+ mkdirChecked(location);
+ return location;
+ }
+
+ /**
+ * Append the path with the specified node's context path.
+ *
+ * @param path
+ * The path to be appended.
+ * @param node
+ * The file/folder node.
+ * @return The path to the node.
+ */
+ private IPath appendNodePath(IPath path, FSTreeNode node) {
+ if (!node.isRoot() && node.parent!=null) {
+ path = appendNodePath(path, node.parent);
+ return appendPathSegment(node, path, node.name);
+ }
+ if (node.isWindowsNode()) {
+ String name = node.name;
+ name = name.substring(0, name.length()-1);
+ name = name.replace(':', PATH_ESCAPE_CHAR);
+ return appendPathSegment(node, path, name);
+ }
+ return path;
+ }
+
+ /**
+ * Append the path with the segment "name". Create a directory
+ * if the node is a directory which does not yet exist.
+ *
+ * @param node The file/folder node.
+ * @param path The path to appended.
+ * @param name The segment's name.
+ * @return The path with the segment "name" appended.
+ */
+ private IPath appendPathSegment(FSTreeNode node, IPath path, String name) {
+ IPath newPath = path.append(name);
+ File newFile = newPath.toFile();
+ if (node.isDirectory()) {
+ mkdirChecked(newFile);
+ }
+ return newPath;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/utils/ContentTypeHelper.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/utils/ContentTypeHelper.java
index 078e68b05..e07cca0a6 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/utils/ContentTypeHelper.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/utils/ContentTypeHelper.java
@@ -9,7 +9,7 @@
* William Chen (Wind River) [360494]Provide an "Open With" action in the pop
* up menu of file system nodes of Target Explorer.
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.utils;
+package org.eclipse.tcf.te.tcf.filesystem.core.internal.utils;
import java.io.File;
import java.io.IOException;
@@ -22,7 +22,7 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
/**
* The content type helper used to provide helping methods about the content
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/utils/PersistenceManager.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/utils/PersistenceManager.java
new file mode 100644
index 000000000..c5fec2811
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/utils/PersistenceManager.java
@@ -0,0 +1,213 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * William Chen (Wind River) [360494]Provide an "Open With" action in the pop
+ * up menu of file system nodes of Target Explorer.
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.core.internal.utils;
+
+import java.io.File;
+import java.net.URI;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.QualifiedName;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.tcf.te.runtime.persistence.interfaces.IURIPersistenceService;
+import org.eclipse.tcf.te.runtime.services.ServiceManager;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+
+/**
+ * A facility class to load and save persistent data such including resolved content types, file's
+ * properties, and time stamps etc.
+ */
+public class PersistenceManager {
+ // The singleton instance.
+ private static volatile PersistenceManager instance;
+
+ // The time stamp for each file.
+ private Map<URI, Long> timestamps;
+
+ // Already known resolved content type of file nodes specified by their URIs.
+ private Map<URI, IContentType> resolved;
+
+ // Already known unresolvable file nodes specified by their URIs.
+ private Map<URI, URI> unresolved;
+
+ // The persistent properties of the files.
+ private Map<URI, Map<QualifiedName, String>> properties;
+
+ // The file used to store persistent properties of each file.
+ private static final String PERSISTENT_FILE = "persistent.ini"; //$NON-NLS-1$
+
+ /**
+ * Get the singleton cache manager.
+ *
+ * @return The singleton cache manager.
+ */
+ public static PersistenceManager getInstance() {
+ if (instance == null) {
+ instance = new PersistenceManager();
+ }
+ return instance;
+ }
+
+ /**
+ * Create a Persistent Manager instance.
+ */
+ @SuppressWarnings("unchecked")
+ private PersistenceManager() {
+ try {
+ IURIPersistenceService service = ServiceManager.getInstance()
+ .getService(IURIPersistenceService.class);
+ File location = CacheManager.getInstance().getCacheRoot();
+ File resolvedFile = new File(location, "resolved.ini");
+ resolved = new HashMap<URI, IContentType>();
+ if (resolvedFile.exists()) {
+ resolved = (Map<URI, IContentType>) service.read(resolved, resolvedFile
+ .getAbsoluteFile().toURI());
+ }
+ File unresolvedFile = new File(location, "unresolved.ini");
+ unresolved = new HashMap<URI, URI>();
+ if (unresolvedFile.exists()) {
+ unresolved = (Map<URI, URI>) service.read(unresolved, unresolvedFile
+ .getAbsoluteFile().toURI());
+ }
+ File timestampFile = new File(location, "timestamps.ini");
+ timestamps = new HashMap<URI, Long>();
+ if (timestampFile.exists()) {
+ timestamps = (Map<URI, Long>) service.read(timestamps, timestampFile
+ .getAbsoluteFile().toURI());
+ }
+ File persistentFile = new File(location, PERSISTENT_FILE);
+ properties = new HashMap<URI, Map<QualifiedName, String>>();
+ if (persistentFile.exists()) {
+ properties = (Map<URI, Map<QualifiedName, String>>) service.read(properties, persistentFile.getAbsoluteFile().toURI());
+ }
+ }
+ catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * If the node is already considered unresolvable.
+ *
+ * @param node The file node.
+ * @return true if it is not resolvable or else false.
+ */
+ public boolean isUnresovled(FSTreeNode node) {
+ return unresolved.get(node.getLocationURI()) != null;
+ }
+
+ /**
+ * Get the resolved content type of the node.
+ *
+ * @param node The file node.
+ * @return the content type of the node if it is resolvable or null.
+ */
+ public IContentType getResolved(FSTreeNode node) {
+ return resolved.get(node.getLocationURI());
+ }
+
+ /**
+ * Add the node and its content type to the resolved list.
+ *
+ * @param node The file node.
+ * @param contentType Its content type.
+ */
+ public void addResovled(FSTreeNode node, IContentType contentType) {
+ resolved.put(node.getLocationURI(), contentType);
+ }
+
+ /**
+ * Add the node as an unresolvable node.
+ *
+ * @param node The file node.
+ */
+ public void addUnresolved(FSTreeNode node) {
+ unresolved.put(node.getLocationURI(), node.getLocationURI());
+ }
+
+ /**
+ * Set the time stamp of the FSTreeNode with the specified location.
+ *
+ * @param uri The FSTreeNode's location URI.
+ * @param timestamp The new base time stamp to be set.
+ */
+ public void setBaseTimestamp(URI uri, long timestamp) {
+ timestamps.put(uri, Long.valueOf(timestamp));
+ }
+
+ /**
+ * Remove the time stamp entry with the specified URI.
+ *
+ * @param uri The URI key.
+ */
+ public void removeBaseTimestamp(URI uri) {
+ timestamps.remove(uri);
+ }
+
+ /**
+ * Get the time stamp of the FSTreeNode with the specified location.
+ *
+ * @param uri The FSTreeNode's location URI.
+ * @return The FSTreeNode's base time stamp.
+ */
+ public long getBaseTimestamp(URI uri) {
+ Long timestamp = timestamps.get(uri);
+ return timestamp == null ? 0L : timestamp.longValue();
+ }
+
+ /**
+ * Get the file properties of the specified node from the properties map.
+ *
+ * @param node The file node.
+ * @return The file properties object or empty properties object if it does not exist.
+ */
+ public Map<QualifiedName, String> getPersistentProperties(FSTreeNode node) {
+ Map<QualifiedName, String> nodeProperties = properties.get(node.getLocationURI());
+ if (nodeProperties == null) {
+ nodeProperties = Collections.synchronizedMap(new HashMap<QualifiedName, String>());
+ properties.put(node.getLocationURI(), nodeProperties);
+ }
+ return nodeProperties;
+ }
+
+ /**
+ * Dispose the cache manager so that it has a chance to save the timestamps and the persistent
+ * properties.
+ */
+ public void dispose() {
+ try {
+ IURIPersistenceService service = ServiceManager.getInstance()
+ .getService(IURIPersistenceService.class);
+ File location = CacheManager.getInstance().getCacheRoot();
+ File resolvedFile = new File(location, "resolved.ini");
+ service.write(resolved, resolvedFile.getAbsoluteFile().toURI());
+ File unresolvedFile = new File(location, "unresolved.ini");
+ service.write(unresolved, unresolvedFile.getAbsoluteFile().toURI());
+ File timestampFile = new File(location, "timestamps.ini");
+ service.write(timestamps, timestampFile.getAbsoluteFile().toURI());
+ File persistentFile = new File(location, PERSISTENT_FILE);
+ service.write(properties, persistentFile.getAbsoluteFile().toURI());
+ }
+ catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Returns if or if not the persistence manager needs to be disposed.
+ *
+ * @return <code>True</code> if the persistence manager needs disposal, <code>false</code> otherwise.
+ */
+ public final static boolean needsDisposal() {
+ return instance != null;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/utils/StateManager.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/utils/StateManager.java
index 7870dc12c..66f7f1695 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/utils/StateManager.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/utils/StateManager.java
@@ -8,7 +8,7 @@
* Wind River Systems - initial API and implementation
* William Chen (Wind River)- [345552] Edit the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.utils;
+package org.eclipse.tcf.te.tcf.filesystem.core.internal.utils;
import java.io.File;
@@ -21,12 +21,12 @@ import org.eclipse.tcf.services.IFileSystem.DoneStat;
import org.eclipse.tcf.services.IFileSystem.FileAttrs;
import org.eclipse.tcf.services.IFileSystem.FileSystemException;
import org.eclipse.tcf.te.tcf.core.Tcf;
-import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFException;
-import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFFileSystemException;
-import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSOperation;
-import org.eclipse.tcf.te.tcf.filesystem.model.CacheState;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.exceptions.TCFException;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.exceptions.TCFFileSystemException;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.Operation;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.CacheState;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.nls.Messages;
/**
* This class provides several utility methods to get, update, commit
@@ -65,9 +65,9 @@ public class StateManager {
public void refreshState(final FSTreeNode node) throws TCFException {
IChannel channel = null;
try {
- channel = FSOperation.openChannel(node.peerNode.getPeer());
+ channel = Operation.openChannel(node.peerNode.getPeer());
if (channel != null) {
- IFileSystem service = FSOperation.getBlockingFileSystem(channel);
+ IFileSystem service = Operation.getBlockingFileSystem(channel);
if (service != null) {
final TCFFileSystemException[] errors = new TCFFileSystemException[1];
String path = node.getLocation(true);
@@ -105,9 +105,9 @@ public class StateManager {
public void setFileAttrs(final FSTreeNode node, final IFileSystem.FileAttrs attrs) throws TCFException {
IChannel channel = null;
try {
- channel = FSOperation.openChannel(node.peerNode.getPeer());
+ channel = Operation.openChannel(node.peerNode.getPeer());
if (channel != null) {
- IFileSystem service = FSOperation.getBlockingFileSystem(channel);
+ IFileSystem service = Operation.getBlockingFileSystem(channel);
if (service != null) {
final TCFFileSystemException[] errors = new TCFFileSystemException[1];
String path = node.getLocation(true);
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/utils/URIKeyMapPersistenceDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/utils/URIKeyMapPersistenceDelegate.java
new file mode 100644
index 000000000..860a62783
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/utils/URIKeyMapPersistenceDelegate.java
@@ -0,0 +1,130 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.core.internal.utils;
+
+import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.QualifiedName;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.tcf.te.runtime.persistence.AbstractGsonMapPersistenceDelegate;
+
+public class URIKeyMapPersistenceDelegate extends AbstractGsonMapPersistenceDelegate {
+
+ @Override
+ public Class<?> getPersistedClass(Object context) {
+ return Map.class;
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ protected Map<String, Object> toMap(Object context) throws IOException {
+ Map<URI, ?> attrs = (Map<URI, ?>) context;
+ Map<String, Object> result = new HashMap<String, Object>();
+ if (attrs != null) {
+ for (URI key : attrs.keySet()) {
+ Object object = attrs.get(key);
+ if (object instanceof URI) {
+ String value = "uri:" + object.toString();
+ result.put(key.toString(), value);
+ }
+ else if (object instanceof IContentType) {
+ String value = "contenttype:" + ((IContentType) object).getId();
+ result.put(key.toString(), value);
+ }
+ else if (object instanceof Map) {
+ Map<QualifiedName, String> map = (Map<QualifiedName, String>) object;
+ Map<String, Object> valueMap = translate2Map(map);
+ result.put(key.toString(), valueMap);
+ }
+ else {
+ result.put(key.toString(), object);
+ }
+ }
+ }
+ return result;
+ }
+
+ private Map<String, Object> translate2Map(Map<QualifiedName, String> map) {
+ Map<String, Object> result = new HashMap<String, Object>();
+ for (QualifiedName name : map.keySet()) {
+ result.put(name.toString(), map.get(name));
+ }
+ return result;
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ protected Object fromMap(Map<String, Object> map, Object context) throws IOException {
+ if (context == null) {
+ context = new HashMap<URI, Object>();
+ }
+ Map<URI, Object> result = (Map<URI, Object>) context;
+ for (String key : map.keySet()) {
+ Object v = map.get(key);
+ URI uri = toURI(key);
+ Assert.isNotNull(uri);
+ if (v instanceof String) {
+ String value = (String) map.get(key);
+ Object object = null;
+ if (value.startsWith("uri:")) {
+ value = value.substring("uri:".length());
+ object = toURI(value);
+ Assert.isNotNull(object);
+ result.put(uri, object);
+ }
+ else if (value.startsWith("contenttype:")) {
+ value = value.substring("contenttype:".length());
+ object = Platform.getContentTypeManager().getContentType(value);
+ result.put(uri, object);
+ }
+ }
+ else if (v instanceof Number) {
+ result.put(uri, Long.valueOf(((Number) v).longValue()));
+ }
+ else if (v instanceof Map) {
+ Map<QualifiedName, String> valueMap = reverse((Map<String, String>) v);
+ result.put(uri, valueMap);
+ }
+ }
+ return result;
+ }
+
+ private Map<QualifiedName, String> reverse(Map<String, String> v) {
+ Map<QualifiedName, String> result = new HashMap<QualifiedName, String>();
+ for (String key : v.keySet()) {
+ int dot = key.lastIndexOf(":");
+ String qualifier = null;
+ String local = key;
+ if(dot != -1) {
+ qualifier = key.substring(0, dot);
+ local = key.substring(dot + 1);
+ }
+ QualifiedName name = new QualifiedName(qualifier, local);
+ result.put(name, v.get(key));
+ }
+ return result;
+ }
+
+ private URI toURI(String string) {
+ try {
+ return new URI(string);
+ }
+ catch (URISyntaxException e) {
+ e.printStackTrace();
+ return null;
+ }
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/utils/UserManager.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/utils/UserManager.java
index eaa251a38..456ecf1a0 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/utils/UserManager.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/internal/utils/UserManager.java
@@ -8,11 +8,11 @@
* Wind River Systems - initial API and implementation
* William Chen (Wind River)- [345552] Edit the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.utils;
+package org.eclipse.tcf.te.tcf.filesystem.core.internal.utils;
import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.ISafeRunnable;
import org.eclipse.core.runtime.SafeRunner;
-import org.eclipse.jface.util.SafeRunnable;
import org.eclipse.osgi.util.NLS;
import org.eclipse.tcf.protocol.IChannel;
import org.eclipse.tcf.protocol.IToken;
@@ -21,11 +21,11 @@ import org.eclipse.tcf.services.IFileSystem;
import org.eclipse.tcf.services.IFileSystem.DoneUser;
import org.eclipse.tcf.services.IFileSystem.FileSystemException;
import org.eclipse.tcf.te.tcf.core.Tcf;
-import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
-import org.eclipse.tcf.te.tcf.filesystem.internal.UserAccount;
-import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFFileSystemException;
-import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSOperation;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.filesystem.core.activator.CorePlugin;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.UserAccount;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.exceptions.TCFFileSystemException;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.Operation;
+import org.eclipse.tcf.te.tcf.filesystem.core.nls.Messages;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
/**
@@ -33,7 +33,7 @@ import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
*/
public class UserManager {
// The key to save and retrieve the user account in a peer model.
- /* default */ static final String USER_ACCOUNT_KEY = UIPlugin.getUniqueIdentifier()+".user.account"; //$NON-NLS-1$
+ /* default */ static final String USER_ACCOUNT_KEY = CorePlugin.getUniqueIdentifier()+".user.account"; //$NON-NLS-1$
// The singleton fInstance.
private static volatile UserManager instance;
@@ -62,7 +62,7 @@ public class UserManager {
* @return The user account information or null if it fails.
*/
UserAccount getUserByChannel(final IChannel channel) throws TCFFileSystemException {
- IFileSystem service = FSOperation.getBlockingFileSystem(channel);
+ IFileSystem service = Operation.getBlockingFileSystem(channel);
if (service != null) {
final TCFFileSystemException[] errors = new TCFFileSystemException[1];
final UserAccount[] accounts = new UserAccount[1];
@@ -96,7 +96,7 @@ public class UserManager {
UserAccount account = getUserFromPeer(peerNode);
if (account == null) {
final UserAccount[] accounts = new UserAccount[1];
- SafeRunner.run(new SafeRunnable(){
+ SafeRunner.run(new ISafeRunnable(){
@Override
public void handleException(Throwable e) {
// Just ignore it.
@@ -105,7 +105,7 @@ public class UserManager {
public void run() throws Exception {
IChannel channel = null;
try {
- channel = FSOperation.openChannel(peerNode.getPeer());
+ channel = Operation.openChannel(peerNode.getPeer());
if (channel != null) {
accounts[0] = getUserByChannel(channel);
if (accounts[0] != null) setUserToPeer(peerNode, accounts[0]);
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/model/CacheState.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/model/CacheState.java
index a30ecae3d..21f055fbe 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/model/CacheState.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/model/CacheState.java
@@ -8,7 +8,7 @@
* Wind River Systems - initial API and implementation
* William Chen (Wind River)- [345552] Edit the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.model;
+package org.eclipse.tcf.te.tcf.filesystem.core.model;
/**
* The enumeration that defines the states of a file's local cache, including "consistent", "modified",
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/model/FSModel.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/model/FSModel.java
index ac30354e5..e66f1f49e 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/model/FSModel.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/model/FSModel.java
@@ -7,26 +7,26 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.model;
+package org.eclipse.tcf.te.tcf.filesystem.core.model;
import java.io.File;
import java.util.List;
import java.util.Map;
import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.ISafeRunnable;
import org.eclipse.core.runtime.SafeRunner;
-import org.eclipse.jface.util.SafeRunnable;
import org.eclipse.tcf.protocol.IPeer;
import org.eclipse.tcf.protocol.Protocol;
import org.eclipse.tcf.te.runtime.utils.Host;
import org.eclipse.tcf.te.tcf.core.Tcf;
-import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
-import org.eclipse.tcf.te.tcf.filesystem.internal.callbacks.QueryDoneOpenChannel;
-import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFException;
-import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSCreateRoot;
-import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSOperation;
-import org.eclipse.tcf.te.tcf.filesystem.internal.testers.TargetPropertyTester;
-import org.eclipse.tcf.te.tcf.filesystem.internal.utils.CacheManager;
+import org.eclipse.tcf.te.tcf.filesystem.core.activator.CorePlugin;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.callbacks.QueryDoneOpenChannel;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.exceptions.TCFException;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.OpCreateRoot;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.Operation;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.testers.TargetPropertyTester;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.utils.CacheManager;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
import org.eclipse.tcf.te.tcf.locator.model.Model;
@@ -34,7 +34,7 @@ import org.eclipse.tcf.te.tcf.locator.model.Model;
* The file system model implementation.
*/
public final class FSModel {
- /* default */static final String FSMODEL_KEY = UIPlugin.getUniqueIdentifier() + ".file.system"; //$NON-NLS-1$
+ /* default */static final String FSMODEL_KEY = CorePlugin.getUniqueIdentifier() + ".file.system"; //$NON-NLS-1$
/**
* Get the file system model of the peer model. If it does not
@@ -97,7 +97,8 @@ public final class FSModel {
* @param filePath The local cache's file path.
* @return The FSTreeNode.
*/
- public static FSTreeNode getTreeNode(String filePath) {
+ @SuppressWarnings("unchecked")
+ public static FSTreeNode getTreeNode(String filePath) {
String cache_root = CacheManager.getInstance().getCacheRoot().getAbsolutePath();
if (filePath.startsWith(cache_root)) {
filePath = filePath.substring(cache_root.length() + 1);
@@ -158,7 +159,7 @@ public final class FSModel {
FSModel fsModel = getFSModel(peer);
FSTreeNode root = fsModel.getRoot();
if (root == null) {
- FSCreateRoot fsRoot = new FSCreateRoot(peer);
+ OpCreateRoot fsRoot = new OpCreateRoot(peer);
root = fsRoot.create();
fsModel.setRoot(root);
}
@@ -167,7 +168,7 @@ public final class FSModel {
final FSTreeNode[] children = new FSTreeNode[elements.length];
System.arraycopy(elements, 0, children, 0, elements.length);
final FSTreeNode[] result = new FSTreeNode[1];
- SafeRunner.run(new SafeRunnable() {
+ SafeRunner.run(new ISafeRunnable() {
@Override
public void handleException(Throwable e) {
// Ignore exception
@@ -217,7 +218,7 @@ public final class FSModel {
}
else if (node != null) {
if (node.isDirectory()) {
- List<FSTreeNode> nodes= new FSOperation().getChildren(node);
+ List<FSTreeNode> nodes= new Operation().getChildren(node);
children = nodes.toArray(new FSTreeNode[nodes.size()]);
}
else {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/model/FSTreeNode.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/model/FSTreeNode.java
index 89dce95ea..fac2df6f1 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/model/FSTreeNode.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/model/FSTreeNode.java
@@ -10,7 +10,7 @@
* William Chen (Wind River) - [352302]Opening a file in an editor depending on
* the client's permissions.
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.model;
+package org.eclipse.tcf.te.tcf.filesystem.core.model;
import java.beans.PropertyChangeEvent;
import java.net.MalformedURLException;
@@ -37,13 +37,13 @@ import org.eclipse.tcf.services.IFileSystem;
import org.eclipse.tcf.services.IFileSystem.DirEntry;
import org.eclipse.tcf.services.IFileSystem.FileAttrs;
import org.eclipse.tcf.te.core.interfaces.IViewerInput;
-import org.eclipse.tcf.te.tcf.filesystem.interfaces.IWindowsFileAttributes;
-import org.eclipse.tcf.te.tcf.filesystem.internal.UserAccount;
-import org.eclipse.tcf.te.tcf.filesystem.internal.testers.TargetPropertyTester;
-import org.eclipse.tcf.te.tcf.filesystem.internal.url.TcfURLConnection;
-import org.eclipse.tcf.te.tcf.filesystem.internal.url.TcfURLStreamHandlerService;
-import org.eclipse.tcf.te.tcf.filesystem.internal.utils.UserManager;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.filesystem.core.interfaces.IWindowsFileAttributes;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.UserAccount;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.testers.TargetPropertyTester;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.url.TcfURLConnection;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.url.TcfURLStreamHandlerService;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.utils.UserManager;
+import org.eclipse.tcf.te.tcf.filesystem.core.nls.Messages;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModelProvider;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/nls/Messages.java
new file mode 100644
index 000000000..f23a01bf0
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/nls/Messages.java
@@ -0,0 +1,354 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ * William Chen (Wind River) - [345384] Provide property pages for remote file system nodes
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.core.nls;
+
+import java.lang.reflect.Field;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * File System plug-in externalized strings management.
+ */
+public class Messages extends NLS {
+
+ // The plug-in resource bundle name
+ private static final String BUNDLE_NAME = "org.eclipse.tcf.te.tcf.filesystem.core.nls.Messages"; //$NON-NLS-1$
+
+ /**
+ * Static constructor.
+ */
+ static {
+ // Load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ /**
+ * Returns if or if not this NLS manager contains a constant for
+ * the given externalized strings key.
+ *
+ * @param key The externalized strings key or <code>null</code>.
+ * @return <code>True</code> if a constant for the given key exists, <code>false</code> otherwise.
+ */
+ public static boolean hasString(String key) {
+ if (key != null) {
+ try {
+ Field field = Messages.class.getDeclaredField(key);
+ return field != null;
+ } catch (NoSuchFieldException e) { /* ignored on purpose */ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Returns the corresponding string for the given externalized strings
+ * key or <code>null</code> if the key does not exist.
+ *
+ * @param key The externalized strings key or <code>null</code>.
+ * @return The corresponding string or <code>null</code>.
+ */
+ public static String getString(String key) {
+ if (key != null) {
+ try {
+ Field field = Messages.class.getDeclaredField(key);
+ if (field != null) {
+ return (String)field.get(null);
+ }
+ } catch (Exception e) { /* ignored on purpose */ }
+ }
+
+ return null;
+ }
+
+ // **** Declare externalized string id's down here *****
+
+ public static String AdvancedAttributesDialog_Archive;
+ public static String AdvancedAttributesDialog_ArchiveIndex;
+ public static String AdvancedAttributesDialog_Compress;
+ public static String AdvancedAttributesDialog_Compressed;
+ public static String AdvancedAttributesDialog_CompressEncrypt;
+ public static String AdvancedAttributesDialog_Device;
+ public static String AdvancedAttributesDialog_Directory;
+ public static String AdvancedAttributesDialog_Encrypt;
+ public static String AdvancedAttributesDialog_Encrypted;
+ public static String AdvancedAttributesDialog_FileArchive;
+ public static String AdvancedAttributesDialog_FileBanner;
+ public static String AdvancedAttributesDialog_FolderArchive;
+ public static String AdvancedAttributesDialog_FolderBanner;
+ public static String AdvancedAttributesDialog_Hidden;
+ public static String AdvancedAttributesDialog_Indexed;
+ public static String AdvancedAttributesDialog_IndexFile;
+ public static String AdvancedAttributesDialog_IndexFolder;
+ public static String AdvancedAttributesDialog_Normal;
+ public static String AdvancedAttributesDialog_Offline;
+ public static String AdvancedAttributesDialog_ReadOnly;
+ public static String AdvancedAttributesDialog_Reparse;
+ public static String AdvancedAttributesDialog_ShellTitle;
+ public static String AdvancedAttributesDialog_Sparse;
+ public static String AdvancedAttributesDialog_System;
+ public static String AdvancedAttributesDialog_Temporary;
+ public static String AdvancedAttributesDialog_Virtual;
+ public static String BasicFolderSection_BasicInfoText;
+
+ public static String CacheManager_Bytes;
+ public static String CacheManager_DowloadingFile;
+ public static String CacheManager_DownloadingError;
+ public static String CacheManager_DownloadingProgress;
+ public static String CacheManager_KBs;
+ public static String CacheManager_MBs;
+ public static String CacheManager_MkdirFailed;
+ public static String CacheManager_SetLastModifiedFailed;
+ public static String CacheManager_SetReadOnlyFailed;
+ public static String CacheManager_UploadingProgress;
+ public static String CacheManager_UploadNFiles;
+ public static String CacheManager_UploadSingleFile;
+
+ public static String CmmitHandler_Cancel;
+ public static String CmmitHandler_CommitAnyway;
+ public static String CmmitHandler_ErrorTitle;
+ public static String CmmitHandler_FileDeleted;
+ public static String CmmitHandler_Merge;
+ public static String CmmitHandler_StateChangedDialogTitle;
+ public static String CmmitHandler_StateChangedMessage;
+
+ public static String FolderValidator_DirNotExist;
+ public static String FolderValidator_NotWritable;
+ public static String FolderValidator_SpecifyFolder;
+ public static String FSDelete_ButtonCancel;
+ public static String FSDelete_ButtonNo;
+ public static String FSDelete_ButtonYes;
+ public static String FSDelete_ButtonYes2All;
+ public static String FSDelete_CannotRemoveFile;
+ public static String FSDelete_CannotRemoveFolder;
+ public static String FSDelete_ConfirmDelete;
+ public static String FSDelete_ConfirmMessage;
+ public static String FSDelete_Deleting;
+ public static String FSDelete_PrepareToDelete;
+ public static String FSDelete_RemovingFileFolder;
+
+ public static String DeleteFilesHandler_DeleteMultipleFilesConfirmation;
+ public static String DeleteFilesHandler_DeleteOneFileConfirmation;
+ public static String DeleteFilesHandler_ConfirmDialogTitle;
+
+ public static String GeneralInformationPage_Accessed;
+ public static String GeneralInformationPage_Advanced;
+ public static String GeneralInformationPage_Attributes;
+ public static String GeneralInformationPage_Computer;
+ public static String GeneralInformationPage_File;
+ public static String GeneralInformationPage_FileSizeInfo;
+ public static String GeneralInformationPage_Folder;
+ public static String GeneralInformationPage_Hidden;
+ public static String GeneralInformationPage_Location;
+ public static String GeneralInformationPage_Modified;
+ public static String GeneralInformationPage_Name;
+ public static String GeneralInformationPage_ReadOnly;
+ public static String GeneralInformationPage_Size;
+ public static String GeneralInformationPage_Type;
+ public static String GeneralInformationPage_PermissionText;
+ public static String GeneralInformationPage_PropertiesChangeFailure;
+ public static String GeneralInformationPage_PropertiesChangeTitle;
+ public static String GeneralInformationPage_UnknownFileType;
+
+ public static String FSExplorerTreeControl_section_title;
+
+ public static String FSFolderSelectionDialog_MoveDialogMessage;
+ public static String FSFolderSelectionDialog_MoveDialogTitle;
+
+ public static String FSTreeControl_column_name_label;
+ public static String FSTreeControl_column_size_label;
+ public static String FSTreeControl_column_modified_label;
+
+ public static String FSTreeNode_TypeFile;
+ public static String FSTreeNode_TypeFileFolder;
+ public static String FSTreeNode_TypeLocalDisk;
+ public static String FSTreeNode_TypeSystemFile;
+
+ public static String FSTreeNodeContentProvider_rootNode_label;
+
+ public static String FSOpenFileDialog_message;
+ public static String FSOpenFileDialog_title;
+ public static String FSOperation_CopyNOfFile;
+ public static String FSOperation_CopyOfFile;
+
+ public static String LinuxPermissionsSection_Permissions;
+ public static String LocalTypedElement_SavingFile;
+
+ public static String OpenFileHandler_Cancel;
+ public static String OpenFileHandler_ConflictingMessage;
+ public static String OpenFileHandler_ConflictingTitle;
+ public static String OpenFileHandler_Merge;
+ public static String OpenFileHandler_OpenAnyway;
+ public static String OpenFileHandler_OpeningBinaryNotSupported;
+ public static String OpenFileHandler_Warning;
+
+ public static String OpenWithMenu_ChooseEditorForOpening;
+ public static String OpenWithMenu_DefaultEditor;
+ public static String OpenWithMenu_NoEditorFound;
+ public static String OpenWithMenu_OpenWith;
+
+ public static String FSCopy_CannotCopyFile;
+ public static String FSCopy_CopyFileFolderTitle;
+ public static String FSCopy_Copying;
+ public static String FSCopy_CopyingFile;
+ public static String FSCopy_PrepareToCopy;
+
+ public static String FSCreate_CreationFailed;
+ public static String FSCreate_JobTitle;
+ public static String FSCreate_TaskName;
+ public static String FSMove_CannotMove;
+ public static String FSMove_FileExistsError;
+ public static String FSMove_FolderExistsError;
+ public static String FSMove_MovingFile;
+ public static String FSMove_Moving;
+ public static String FSMove_PrepareToMove;
+ public static String FSMove_MoveFileFolderTitle;
+
+ public static String FSDelete_DeleteFileFolderTitle;
+
+ public static String FSDropTargetListener_ConfirmMoveTitle;
+ public static String FSDropTargetListener_MovingWarningMultiple;
+ public static String FSDropTargetListener_MovingWarningSingle;
+ public static String FSRename_CannotRename;
+ public static String FSRename_JobTitle;
+ public static String FSRename_RenameFileFolderTitle;
+
+ public static String FSOperation_CannotCreateDirectory;
+ public static String FSOperation_ConfirmDialogCancel;
+ public static String FSOperation_ConfirmDialogNo;
+ public static String FSOperation_ConfirmDialogYes;
+ public static String FSOperation_ConfirmDialogYesToAll;
+ public static String FSOperation_ConfirmFileReplace;
+ public static String FSOperation_ConfirmFileReplaceMessage;
+ public static String FSOperation_ConfirmFolderReplaceMessage;
+ public static String FSOperation_ConfirmFolderReplaceTitle;
+ public static String FSOperation_NoFileSystemError;
+ public static String FSOperation_NotResponding;
+ public static String FSOperation_CannotOpenDir;
+ public static String FSOperation_CannotReadDir;
+ public static String FSOperation_DeletingFileFailed;
+ public static String FSOperation_TimedOutWhenOpening;
+
+ public static String PermissionsGroup_Executable;
+ public static String PermissionsGroup_GroupPermissions;
+ public static String PermissionsGroup_OtherPermissions;
+ public static String PermissionsGroup_Readable;
+ public static String PermissionsGroup_UserPermissions;
+ public static String PermissionsGroup_Writable;
+
+ public static String RefreshDirectoryHandler_RefreshJobTitle;
+ public static String RefreshViewerHandler_RefreshJobTitle;
+ public static String RemoteTypedElement_GettingRemoteContent;
+ public static String RenameFilesHandler_PromptNewName;
+ public static String RenameFilesHandler_RenamePromptMessage;
+ public static String RenameFilesHandler_TitleRename;
+ public static String RenameFilesHandler_TitleRenameFile;
+ public static String RenameFilesHandler_TitleRenameFolder;
+ public static String FSRenamingAssistant_NameAlreadyExists;
+ public static String FSRenamingAssistant_NoNodeSelected;
+ public static String FSRenamingAssistant_SpecifyNonEmptyName;
+ public static String FSRenamingAssistant_UnixIllegalCharacters;
+ public static String FSRenamingAssistant_WinIllegalCharacters;
+ public static String FSUpload_Cancel;
+ public static String FSUpload_No;
+ public static String FSUpload_OverwriteConfirmation;
+ public static String FSUpload_OverwriteTitle;
+ public static String FSUpload_UploadTitle;
+ public static String FSUpload_Yes;
+ public static String FSUpload_YesToAll;
+
+ public static String SaveAllListener_Cancel;
+ public static String SaveAllListener_Merge;
+ public static String SaveAllListener_SaveAnyway;
+ public static String SaveAllListener_SingularMessage;
+ public static String SaveAllListener_StateChangedDialogTitle;
+
+ public static String SaveListener_Cancel;
+ public static String SaveListener_Merge;
+ public static String SaveListener_SaveAnyway;
+ public static String SaveListener_StateChangedDialogTitle;
+ public static String SaveListener_StateChangedMessage;
+
+ public static String StateManager_CannotGetFileStateMessage2;
+ public static String StateManager_CannotGetFileStatMessage;
+ public static String StateManager_CannotSetFileStateMessage;
+ public static String StateManager_CannotSetFileStateMessage2;
+ public static String StateManager_CommitFailureTitle;
+ public static String StateManager_RefreshFailureTitle;
+ public static String StateManager_TCFNotProvideFSMessage;
+ public static String StateManager_TCFNotProvideFSMessage2;
+ public static String StateManager_UpdateFailureTitle;
+
+ public static String PreferencePage_AutoSavingText;
+ public static String PreferencePage_CopyOwnershipText;
+ public static String PreferencePage_CopyPermissionText;
+ public static String PreferencePage_RenamingOptionText;
+
+ public static String TargetSelectionPage_Description;
+ public static String TargetSelectionPage_Targets;
+ public static String TargetSelectionPage_Title;
+
+ public static String TcfInputStream_CloseTimeout;
+ public static String TcfInputStream_NoDataAvailable;
+ public static String TcfInputStream_NoFileReturned;
+ public static String TcfInputStream_NoFSServiceAvailable;
+ public static String TcfInputStream_OpenFileTimeout;
+ public static String TcfInputStream_OpenTCFTimeout;
+ public static String TcfInputStream_ReadTimeout;
+ public static String TcfInputStream_StreamClosed;
+
+ public static String TcfOutputStream_StreamClosed;
+ public static String TcfOutputStream_WriteTimeout;
+
+ public static String TcfURLConnection_CloseFileTimeout;
+ public static String TcfURLConnection_NoFileHandleReturned;
+ public static String TcfURLConnection_NoFSServiceAvailable;
+ public static String TcfURLConnection_NoPeerFound;
+ public static String TcfURLConnection_NoSuchTcfAgent;
+ public static String TcfURLConnection_OpenFileTimeout;
+ public static String TcfURLConnection_OpenTCFChannelTimeout;
+ public static String TcfURLStreamHandlerService_ErrorURLFormat;
+ public static String TcfURLStreamHandlerService_IllegalCharacter;
+ public static String TcfURLStreamHandlerService_OnlyDiskPartError;
+
+ public static String OpeningChannelFailureMessage;
+ public static String OpeningChannelFailureTitle;
+
+ public static String UpdateHandler_Cancel;
+ public static String UpdateHandler_Merge;
+ public static String UpdateHandler_StateChangedDialogTitle;
+ public static String UpdateHandler_StateChangedMessage;
+ public static String UpdateHandler_UpdateAnyway;
+
+ public static String UserManager_CannotGetUserAccountMessage;
+ public static String UserManager_CannotGetUserAccountMessage2;
+ public static String UserManager_TCFNotProvideFSMessage;
+ public static String UserManager_UserAccountTitle;
+
+ public static String MergeEditorInput_CompareLeftAndRight;
+ public static String MergeEditorInput_CompareWithLocalCache;
+ public static String MergeEditorInput_LocalFile;
+ public static String MergeEditorInput_RemoteFile;
+ public static String MergeInput_CopyNotSupported;
+ public static String NameValidator_SpecifyFolder;
+ public static String NewFileWizard_NewFileWizardTitle;
+ public static String NewFileWizardPage_NewFileWizardPageDescription;
+ public static String NewFileWizardPage_NewFileWizardPageNameLabel;
+ public static String NewFileWizardPage_NewFileWizardPageTitle;
+ public static String NewFolderWizard_NewFolderWizardTitle;
+ public static String NewFolderWizardPage_NewFolderWizardPageDescription;
+ public static String NewFolderWizardPage_NewFolderWizardPageNameLabel;
+ public static String NewFolderWizardPage_NewFolderWizardPageTitle;
+ public static String NewNodeWizardPage_LstatTimedout;
+ public static String NewNodeWizardPage_PromptFolderLabel;
+ public static String WindowsAttributesSection_Attributes;
+ public static String PendingOperation_label;
+ public static String QueryDoneOpenChannel_NoFService;
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/nls/Messages.properties
index e149108a3..e149108a3 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/nls/Messages.properties
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem.core/src/org/eclipse/tcf/te/tcf/filesystem/core/nls/Messages.properties
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/.project b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/.project
index bda28b03d..ab596bd29 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/.project
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.tcf.te.tcf.filesystem</name>
+ <name>org.eclipse.tcf.te.tcf.filesystem.ui</name>
<comment></comment>
<projects>
</projects>
@@ -27,7 +27,7 @@
</natures>
<filteredResources>
<filter>
- <id>1311579479467</id>
+ <id>0</id>
<name></name>
<type>10</type>
<matcher>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/META-INF/MANIFEST.MF
index 335869803..bde30a596 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/META-INF/MANIFEST.MF
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/META-INF/MANIFEST.MF
@@ -1,16 +1,15 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.tcf.te.tcf.filesystem;singleton:=true
+Bundle-SymbolicName: org.eclipse.tcf.te.tcf.filesystem.ui;singleton:=true
Bundle-Version: 1.0.0.qualifier
-Bundle-Activator: org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin
+Bundle-Activator: org.eclipse.tcf.te.tcf.filesystem.ui.activator.UIPlugin
Bundle-Vendor: %providerName
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
org.eclipse.ui.navigator;bundle-version="3.5.100",
org.eclipse.tcf.core;bundle-version="1.0.0",
org.eclipse.tcf.te.runtime;bundle-version="1.0.0",
org.eclipse.tcf.te.runtime.model;bundle-version="1.0.0",
- org.eclipse.tcf.te.tcf.core;bundle-version="1.0.0",
org.eclipse.tcf.te.ui;bundle-version="1.0.0",
org.eclipse.tcf.te.ui.forms;bundle-version="1.0.0",
org.eclipse.tcf.te.ui.swt;bundle-version="1.0.0",
@@ -25,35 +24,31 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
org.eclipse.tcf.te.ui.controls;bundle-version="1.0.0",
org.eclipse.tcf.te.tcf.ui;bundle-version="1.0.0",
org.eclipse.ui.views.properties.tabbed;bundle-version="3.5.200",
- org.eclipse.tcf.te.core;bundle-version="1.0.0"
+ org.eclipse.tcf.te.core;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.filesystem.core;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
-Export-Package: org.eclipse.tcf.te.tcf.filesystem.activator;x-internal:=true,
- org.eclipse.tcf.te.tcf.filesystem.controls,
- org.eclipse.tcf.te.tcf.filesystem.dialogs,
- org.eclipse.tcf.te.tcf.filesystem.filters,
- org.eclipse.tcf.te.tcf.filesystem.help;x-internal:=true,
- org.eclipse.tcf.te.tcf.filesystem.interfaces,
- org.eclipse.tcf.te.tcf.filesystem.interfaces.preferences,
- org.eclipse.tcf.te.tcf.filesystem.internal;x-internal:=true,
- org.eclipse.tcf.te.tcf.filesystem.internal.adapters;x-internal:=true,
- org.eclipse.tcf.te.tcf.filesystem.internal.autosave;x-internal:=true,
- org.eclipse.tcf.te.tcf.filesystem.internal.callbacks;x-internal:=true,
- org.eclipse.tcf.te.tcf.filesystem.internal.celleditor;x-internal:=true,
- org.eclipse.tcf.te.tcf.filesystem.internal.columns;x-internal:=true,
- org.eclipse.tcf.te.tcf.filesystem.internal.compare;x-internal:=true,
- org.eclipse.tcf.te.tcf.filesystem.internal.decorators;x-internal:=true,
- org.eclipse.tcf.te.tcf.filesystem.internal.dnd;x-internal:=true,
- org.eclipse.tcf.te.tcf.filesystem.internal.exceptions;x-internal:=true,
- org.eclipse.tcf.te.tcf.filesystem.internal.handlers;x-internal:=true,
- org.eclipse.tcf.te.tcf.filesystem.internal.operations;x-internal:=true,
- org.eclipse.tcf.te.tcf.filesystem.internal.preferences;x-internal:=true,
- org.eclipse.tcf.te.tcf.filesystem.internal.properties;x-internal:=true,
- org.eclipse.tcf.te.tcf.filesystem.internal.tabbed;x-internal:=true,
- org.eclipse.tcf.te.tcf.filesystem.internal.testers;x-internal:=true,
- org.eclipse.tcf.te.tcf.filesystem.internal.url;x-internal:=true,
- org.eclipse.tcf.te.tcf.filesystem.internal.utils;x-internal:=true,
- org.eclipse.tcf.te.tcf.filesystem.internal.wizards;x-internal:=true,
- org.eclipse.tcf.te.tcf.filesystem.model,
- org.eclipse.tcf.te.tcf.filesystem.nls;x-internal:=true
+Export-Package: org.eclipse.tcf.te.tcf.filesystem.ui.activator;x-internal:=true,
+ org.eclipse.tcf.te.tcf.filesystem.ui.controls,
+ org.eclipse.tcf.te.tcf.filesystem.ui.dialogs,
+ org.eclipse.tcf.te.tcf.filesystem.ui.filters,
+ org.eclipse.tcf.te.tcf.filesystem.ui.help;x-internal:=true,
+ org.eclipse.tcf.te.tcf.filesystem.ui.interfaces,
+ org.eclipse.tcf.te.tcf.filesystem.ui.interfaces.preferences,
+ org.eclipse.tcf.te.tcf.filesystem.ui.internal;x-internal:=true,
+ org.eclipse.tcf.te.tcf.filesystem.ui.internal.adapters;x-internal:=true,
+ org.eclipse.tcf.te.tcf.filesystem.ui.internal.autosave;x-internal:=true,
+ org.eclipse.tcf.te.tcf.filesystem.ui.internal.celleditor;x-internal:=true,
+ org.eclipse.tcf.te.tcf.filesystem.ui.internal.columns;x-internal:=true,
+ org.eclipse.tcf.te.tcf.filesystem.ui.internal.compare;x-internal:=true,
+ org.eclipse.tcf.te.tcf.filesystem.ui.internal.decorators;x-internal:=true,
+ org.eclipse.tcf.te.tcf.filesystem.ui.internal.dnd;x-internal:=true,
+ org.eclipse.tcf.te.tcf.filesystem.ui.internal.handlers;x-internal:=true,
+ org.eclipse.tcf.te.tcf.filesystem.ui.internal.operations;x-internal:=true,
+ org.eclipse.tcf.te.tcf.filesystem.ui.internal.preferences;x-internal:=true,
+ org.eclipse.tcf.te.tcf.filesystem.ui.internal.properties;x-internal:=true,
+ org.eclipse.tcf.te.tcf.filesystem.ui.internal.tabbed;x-internal:=true,
+ org.eclipse.tcf.te.tcf.filesystem.ui.internal.testers;x-internal:=true,
+ org.eclipse.tcf.te.tcf.filesystem.ui.internal.wizards;x-internal:=true,
+ org.eclipse.tcf.te.tcf.filesystem.ui.nls;x-internal:=true
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/plugin.xml b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/plugin.xml
index 0d885cbb5..e5325aa3d 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/plugin.xml
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/plugin.xml
@@ -11,7 +11,7 @@
</includes>
</viewerContentBinding>
<dragAssistant
- class="org.eclipse.tcf.te.tcf.filesystem.internal.dnd.FSDragAdapterAssistant"
+ class="org.eclipse.tcf.te.tcf.filesystem.ui.internal.dnd.FSDragAdapterAssistant"
viewerId="org.eclipse.tcf.te.ui.views.View">
</dragAssistant>
</extension>
@@ -19,10 +19,10 @@
<extension point="org.eclipse.ui.navigator.navigatorContent">
<navigatorContent
activeByDefault="false"
- contentProvider="org.eclipse.tcf.te.tcf.filesystem.controls.FSNavigatorContentProvider"
+ contentProvider="org.eclipse.tcf.te.tcf.filesystem.ui.controls.FSNavigatorContentProvider"
icon="icons/obj16/rootdrive.gif"
id="org.eclipse.tcf.te.tcf.filesystem.navigator.content"
- labelProvider="org.eclipse.tcf.te.tcf.filesystem.internal.columns.FSTreeElementLabelProvider"
+ labelProvider="org.eclipse.tcf.te.tcf.filesystem.ui.internal.columns.FSTreeElementLabelProvider"
name="%navigatorContent.name"
priority="normal">
<triggerPoints>
@@ -35,18 +35,18 @@
</test>
</triggerPoints>
<possibleChildren>
- <instanceof value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode"/>
+ <instanceof value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode"/>
</possibleChildren>
<commonSorter
- class="org.eclipse.tcf.te.tcf.filesystem.controls.FSTreeViewerSorter"
+ class="org.eclipse.tcf.te.tcf.filesystem.ui.controls.FSTreeViewerSorter"
id="org.eclipse.tcf.te.tcf.filesystem.navigator.sorter">
</commonSorter>
<dropAssistant
- class="org.eclipse.tcf.te.tcf.filesystem.internal.dnd.FSDropAdapterAssistant"
+ class="org.eclipse.tcf.te.tcf.filesystem.ui.internal.dnd.FSDropAdapterAssistant"
id="org.eclipse.tcf.te.tcf.filesystem.dropAssistant">
<possibleDropTargets>
<instanceof
- value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode">
</instanceof></possibleDropTargets>
</dropAssistant>
<commonWizard
@@ -54,7 +54,7 @@
wizardId="org.eclipse.tcf.te.tcf.filesystem.wizards.NewFileWizard">
<enablement>
<instanceof
- value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode">
</instanceof>
<test
property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isDirectory">
@@ -68,7 +68,7 @@
wizardId="org.eclipse.tcf.te.tcf.filesystem.wizards.NewFolderWizard">
<enablement>
<instanceof
- value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode">
</instanceof>
<test
property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isDirectory">
@@ -81,14 +81,14 @@
</navigatorContent>
<commonFilter
activeByDefault="true"
- class="org.eclipse.tcf.te.tcf.filesystem.filters.HiddenFilesViewerFilter"
+ class="org.eclipse.tcf.te.tcf.filesystem.ui.filters.HiddenFilesViewerFilter"
id="org.eclipse.tcf.te.tcf.filesystem.navigator.filter.hiddenFiles"
name="%FSTreeViewerFilter.hiddenFiles"
visibleInUI="true">
</commonFilter>
<commonFilter
activeByDefault="true"
- class="org.eclipse.tcf.te.tcf.filesystem.filters.SystemFilesViewerFilter"
+ class="org.eclipse.tcf.te.tcf.filesystem.ui.filters.SystemFilesViewerFilter"
id="org.eclipse.tcf.te.tcf.filesystem.navigator.filter.systemFiles"
name="%FSTreeViewerFilter.systemFiles"
visibleInUI="true">
@@ -116,7 +116,7 @@
<test property="org.eclipse.tcf.te.tcf.locator.hasRemoteService" value="FileSystem"/>
<test
property="org.eclipse.tcf.te.runtime.preference"
- args="bundleId=org.eclipse.tcf.te.tcf.filesystem,key=te.tcf.filesystem.core.feature.editor.content.enable"
+ args="bundleId=org.eclipse.tcf.te.tcf.filesystem.ui,key=te.tcf.filesystem.core.feature.editor.content.enable"
value="true">
</test>
</and>
@@ -142,7 +142,7 @@
</count>
<iterate>
<instanceof
- value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode">
</instanceof>
</iterate>
</with>
@@ -173,7 +173,7 @@
<with variable="selection">
<count value="1"/>
<iterate>
- <instanceof value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode"/>
+ <instanceof value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode"/>
<test property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isFile"/>
<test
property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isReadable">
@@ -196,7 +196,7 @@
</count>
<iterate>
<instanceof
- value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode">
</instanceof>
<test
property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isFile">
@@ -213,7 +213,7 @@
</with>
</visibleWhen>
<dynamic
- class="org.eclipse.tcf.te.tcf.filesystem.internal.handlers.OpenWithContribution"
+ class="org.eclipse.tcf.te.tcf.filesystem.ui.internal.handlers.OpenWithContribution"
id="openWithMenu">
</dynamic>
</menu>
@@ -238,7 +238,7 @@
</count>
<iterate>
<instanceof
- value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode">
</instanceof>
</iterate>
</with>
@@ -261,7 +261,7 @@
</count>
<iterate>
<instanceof
- value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode">
</instanceof>
</iterate>
</with>
@@ -284,7 +284,7 @@
</count>
<iterate>
<instanceof
- value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode">
</instanceof>
</iterate>
</with>
@@ -310,7 +310,7 @@
</count>
<iterate>
<instanceof
- value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode">
</instanceof>
</iterate>
</with>
@@ -332,7 +332,7 @@
</count>
<iterate>
<instanceof
- value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode">
</instanceof>
</iterate>
</with>
@@ -415,7 +415,7 @@
</count>
<iterate>
<instanceof
- value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode">
</instanceof>
<test
property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isFile">
@@ -446,7 +446,7 @@
</count>
<iterate>
<instanceof
- value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode">
</instanceof>
<test
property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isFile">
@@ -477,7 +477,7 @@
</count>
<iterate>
<instanceof
- value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode">
</instanceof>
<test
property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isFile">
@@ -508,7 +508,7 @@
</count>
<iterate>
<instanceof
- value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode">
</instanceof>
<test
property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isFile">
@@ -536,7 +536,7 @@
<iterate operator="and" ifEmpty="false">
<and>
<instanceof
- value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode">
</instanceof>
<not>
<test
@@ -562,7 +562,7 @@
<iterate operator="and" ifEmpty="false">
<and>
<instanceof
- value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode">
</instanceof>
<not>
<test
@@ -586,7 +586,7 @@
<with variable="selection">
<count value="1"/>
<iterate>
- <instanceof value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode"/>
+ <instanceof value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode"/>
<test property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isFile"/>
<test
property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isReadable">
@@ -609,7 +609,7 @@
</count>
<iterate>
<instanceof
- value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode">
</instanceof>
<test
property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isFile">
@@ -626,7 +626,7 @@
</with>
</visibleWhen>
<dynamic
- class="org.eclipse.tcf.te.tcf.filesystem.internal.handlers.OpenWithContribution"
+ class="org.eclipse.tcf.te.tcf.filesystem.ui.internal.handlers.OpenWithContribution"
id="openWithMenu">
</dynamic>
</menu>
@@ -651,7 +651,7 @@
</count>
<iterate>
<instanceof
- value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode">
</instanceof>
</iterate>
</with>
@@ -674,7 +674,7 @@
</count>
<iterate>
<instanceof
- value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode">
</instanceof>
</iterate>
</with>
@@ -697,7 +697,7 @@
</count>
<iterate>
<instanceof
- value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode">
</instanceof>
</iterate>
</with>
@@ -723,7 +723,7 @@
</count>
<iterate>
<instanceof
- value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode">
</instanceof>
</iterate>
</with>
@@ -745,7 +745,7 @@
</count>
<iterate>
<instanceof
- value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode">
</instanceof>
</iterate>
</with>
@@ -771,7 +771,7 @@
</count>
<iterate>
<instanceof
- value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode">
</instanceof>
<test
property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isFile">
@@ -802,7 +802,7 @@
</count>
<iterate>
<instanceof
- value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode">
</instanceof>
<test
property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isFile">
@@ -833,7 +833,7 @@
</count>
<iterate>
<instanceof
- value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode">
</instanceof>
<test
property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isFile">
@@ -864,7 +864,7 @@
</count>
<iterate>
<instanceof
- value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode">
</instanceof>
<test
property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isFile">
@@ -895,13 +895,13 @@
<!-- Property page contributions -->
<extension point="org.eclipse.ui.propertyPages">
<page
- class="org.eclipse.tcf.te.tcf.filesystem.internal.properties.GeneralInformationPage"
+ class="org.eclipse.tcf.te.tcf.filesystem.ui.internal.properties.GeneralInformationPage"
id="org.eclipse.tcf.te.tcf.filesystem.pages.basic"
name="%GeneralInformationPage.name">
<enabledWhen>
<and>
<instanceof
- value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode">
</instanceof>
<not>
<test
@@ -916,40 +916,26 @@
<!-- Property tester contributions -->
<extension point="org.eclipse.core.expressions.propertyTesters">
<propertyTester
- class="org.eclipse.tcf.te.tcf.filesystem.internal.testers.FSTreeNodePropertyTester"
- id="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode"
- namespace="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode"
- properties="isFile,isDirectory,isBinaryFile,isReadable,isWritable,isExecutable,isRoot,isReadOnly,isHidden,isWindows,testParent,getCacheState,isSystemRoot"
- type="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
- </propertyTester>
- <propertyTester
- class="org.eclipse.tcf.te.tcf.filesystem.internal.testers.CachePropertyTester"
+ class="org.eclipse.tcf.te.tcf.filesystem.ui.internal.testers.CachePropertyTester"
id="org.eclipse.tcf.te.tcf.filesystem.propertytester.cache"
namespace="org.eclipse.tcf.te.tcf.filesystem.propertytester.cache"
properties="isAutoSavingOn"
type="java.lang.Object">
</propertyTester>
<propertyTester
- class="org.eclipse.tcf.te.tcf.filesystem.internal.testers.ClipboardPropertyTester"
+ class="org.eclipse.tcf.te.tcf.filesystem.ui.internal.testers.ClipboardPropertyTester"
id="org.eclipse.tcf.te.tcf.filesystem.propertytester.clipboard"
namespace="org.eclipse.tcf.te.tcf.filesystem.propertytester.clipboard"
properties="canPaste"
type="org.eclipse.jface.viewers.IStructuredSelection">
</propertyTester>
<propertyTester
- class="org.eclipse.tcf.te.tcf.filesystem.internal.testers.EditorActivationEventPropertyTester"
+ class="org.eclipse.tcf.te.tcf.filesystem.ui.internal.testers.EditorActivationEventPropertyTester"
id="org.eclipse.tcf.te.tcf.filesystem.propertytester.event"
namespace="org.eclipse.tcf.te.tcf.filesystem.propertytester.event"
properties="isEditorActivation"
type="org.eclipse.jface.viewers.ColumnViewerEditorActivationEvent">
</propertyTester>
- <propertyTester
- class="org.eclipse.tcf.te.tcf.filesystem.internal.testers.TargetPropertyTester"
- id="org.eclipse.tcf.te.tcf.filesystem.propertytester.peer"
- namespace="org.eclipse.tcf.te.tcf.filesystem.propertytester.peer"
- properties="isWindows"
- type="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel">
- </propertyTester>
</extension>
<!-- Command contributions -->
@@ -989,7 +975,7 @@
<!-- This handler contribution is for the double click behaviour in the
Target Explore tree view -->
<handler
- class="org.eclipse.tcf.te.tcf.filesystem.internal.handlers.OpenFileHandler"
+ class="org.eclipse.tcf.te.tcf.filesystem.ui.internal.handlers.OpenFileHandler"
commandId="org.eclipse.ui.navigator.Open">
<activeWhen>
<and>
@@ -1011,7 +997,7 @@
</count>
<iterate>
<instanceof
- value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode">
</instanceof>
<test
forcePluginActivation="true"
@@ -1039,7 +1025,7 @@
</count>
<iterate>
<instanceof
- value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode">
</instanceof>
<test
forcePluginActivation="true"
@@ -1060,7 +1046,7 @@
</enabledWhen>
</handler>
<handler
- class="org.eclipse.tcf.te.tcf.filesystem.internal.handlers.UpdateHandler"
+ class="org.eclipse.tcf.te.tcf.filesystem.ui.internal.handlers.UpdateHandler"
commandId="org.eclipse.tcf.te.tcf.filesystem.commands.update">
<activeWhen>
<with
@@ -1084,7 +1070,7 @@
</count>
<iterate>
<instanceof
- value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode">
</instanceof>
<test
property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isFile">
@@ -1104,7 +1090,7 @@
</enabledWhen>
</handler>
<handler
- class="org.eclipse.tcf.te.tcf.filesystem.internal.handlers.CommitHandler"
+ class="org.eclipse.tcf.te.tcf.filesystem.ui.internal.handlers.CommitHandler"
commandId="org.eclipse.tcf.te.tcf.filesystem.commands.commit">
<activeWhen>
<with
@@ -1128,7 +1114,7 @@
</count>
<iterate>
<instanceof
- value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode">
</instanceof>
<test
property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isFile">
@@ -1148,7 +1134,7 @@
</enabledWhen>
</handler>
<handler
- class="org.eclipse.tcf.te.tcf.filesystem.internal.handlers.MergeHandler"
+ class="org.eclipse.tcf.te.tcf.filesystem.ui.internal.handlers.MergeHandler"
commandId="org.eclipse.tcf.te.tcf.filesystem.commands.merge">
<activeWhen>
<with
@@ -1172,7 +1158,7 @@
</count>
<iterate>
<instanceof
- value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode">
</instanceof>
<test
property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isFile">
@@ -1192,7 +1178,7 @@
</enabledWhen>
</handler>
<handler
- class="org.eclipse.tcf.te.tcf.filesystem.internal.handlers.UpdateHandler"
+ class="org.eclipse.tcf.te.tcf.filesystem.ui.internal.handlers.UpdateHandler"
commandId="org.eclipse.tcf.te.tcf.filesystem.commands.revert">
<activeWhen>
<with
@@ -1216,7 +1202,7 @@
</count>
<iterate>
<instanceof
- value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode">
</instanceof>
<test
property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isFile">
@@ -1244,7 +1230,7 @@
<handler
- class="org.eclipse.tcf.te.tcf.filesystem.internal.handlers.CutFilesHandler"
+ class="org.eclipse.tcf.te.tcf.filesystem.ui.internal.handlers.CutFilesHandler"
commandId="org.eclipse.ui.edit.cut">
<activeWhen>
<with
@@ -1267,7 +1253,7 @@
</count>
<iterate>
<instanceof
- value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode">
</instanceof>
<not>
<test
@@ -1301,7 +1287,7 @@
</enabledWhen>
</handler>
<handler
- class="org.eclipse.tcf.te.tcf.filesystem.internal.handlers.CopyFilesHandler"
+ class="org.eclipse.tcf.te.tcf.filesystem.ui.internal.handlers.CopyFilesHandler"
commandId="org.eclipse.ui.edit.copy">
<activeWhen>
<with
@@ -1324,7 +1310,7 @@
</count>
<iterate>
<instanceof
- value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode">
</instanceof>
<test
property="org.eclipse.tcf.te.tcf.filesystem.propertytester.treenode.isReadable">
@@ -1339,7 +1325,7 @@
</enabledWhen>
</handler>
<handler
- class="org.eclipse.tcf.te.tcf.filesystem.internal.handlers.PasteFilesHandler"
+ class="org.eclipse.tcf.te.tcf.filesystem.ui.internal.handlers.PasteFilesHandler"
commandId="org.eclipse.ui.edit.paste">
<activeWhen>
<with
@@ -1363,7 +1349,7 @@
</count>
<iterate>
<instanceof
- value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode">
</instanceof>
</iterate>
<test
@@ -1374,7 +1360,7 @@
</enabledWhen>
</handler>
<handler
- class="org.eclipse.tcf.te.tcf.filesystem.internal.handlers.MoveFilesHandler"
+ class="org.eclipse.tcf.te.tcf.filesystem.ui.internal.handlers.MoveFilesHandler"
commandId="org.eclipse.ui.edit.move">
<activeWhen>
<with
@@ -1397,7 +1383,7 @@
</count>
<iterate>
<instanceof
- value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode">
</instanceof>
<not>
<test
@@ -1431,7 +1417,7 @@
</enabledWhen>
</handler>
<handler
- class="org.eclipse.tcf.te.tcf.filesystem.internal.handlers.RenameFilesHandler"
+ class="org.eclipse.tcf.te.tcf.filesystem.ui.internal.handlers.RenameFilesHandler"
commandId="org.eclipse.ui.edit.rename">
<activeWhen>
<with
@@ -1454,7 +1440,7 @@
</count>
<iterate>
<instanceof
- value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode">
</instanceof>
<not>
<test
@@ -1488,7 +1474,7 @@
</enabledWhen>
</handler>
<handler
- class="org.eclipse.tcf.te.tcf.filesystem.internal.handlers.NewFileHandler"
+ class="org.eclipse.tcf.te.tcf.filesystem.ui.internal.handlers.NewFileHandler"
commandId="org.eclipse.tcf.te.tcf.filesystem.commands.newFile">
<activeWhen>
<with
@@ -1506,7 +1492,7 @@
</count>
<iterate>
<instanceof
- value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode">
</instanceof>
<or>
<and>
@@ -1532,7 +1518,7 @@
</enabledWhen>
</handler>
<handler
- class="org.eclipse.tcf.te.tcf.filesystem.internal.handlers.NewFolderHandler"
+ class="org.eclipse.tcf.te.tcf.filesystem.ui.internal.handlers.NewFolderHandler"
commandId="org.eclipse.tcf.te.tcf.filesystem.commands.newFolder">
<activeWhen>
<with
@@ -1550,7 +1536,7 @@
</count>
<iterate>
<instanceof
- value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode">
</instanceof>
<or>
<and>
@@ -1576,7 +1562,7 @@
</enabledWhen>
</handler>
<handler
- class="org.eclipse.tcf.te.tcf.filesystem.internal.handlers.RefreshViewerHandler"
+ class="org.eclipse.tcf.te.tcf.filesystem.ui.internal.handlers.RefreshViewerHandler"
commandId="org.eclipse.tcf.te.tcf.filesystem.commands.refreshViewer">
</handler>
</extension>
@@ -1626,7 +1612,7 @@
</enablement>
</decorator>
<decorator
- class="org.eclipse.tcf.te.tcf.filesystem.internal.decorators.PhantomDecorator"
+ class="org.eclipse.tcf.te.tcf.filesystem.ui.internal.decorators.PhantomDecorator"
id="org.eclipse.tcf.te.tcf.filesystem.decorators.cut"
label="%decorator.label.cut"
state="true">
@@ -1638,7 +1624,7 @@
</enablement>
</decorator>
<decorator
- class="org.eclipse.tcf.te.tcf.filesystem.internal.decorators.PhantomDecorator"
+ class="org.eclipse.tcf.te.tcf.filesystem.ui.internal.decorators.PhantomDecorator"
id="org.eclipse.tcf.te.tcf.filesystem.decorators.hidden"
label="%decorator.hidden.label"
state="true">
@@ -1653,14 +1639,14 @@
<!-- Preference contributions -->
<extension point="org.eclipse.core.runtime.preferences">
- <initializer class="org.eclipse.tcf.te.tcf.filesystem.internal.preferences.PreferencesInitializer"/>
+ <initializer class="org.eclipse.tcf.te.tcf.filesystem.ui.internal.preferences.PreferencesInitializer"/>
</extension>
<!-- Preference page contributions -->
<extension point="org.eclipse.ui.preferencePages">
<page
category="org.eclipse.tcf.te.ui.preferences.general"
- class="org.eclipse.tcf.te.tcf.filesystem.internal.preferences.PreferencePage"
+ class="org.eclipse.tcf.te.tcf.filesystem.ui.internal.preferences.PreferencePage"
id="org.eclipse.tcf.te.ui.preferences.tcf.filesystem"
name="%preference.page.name">
</page>
@@ -1669,8 +1655,8 @@
<!-- Adapter contributions -->
<extension point="org.eclipse.core.runtime.adapters">
<factory
- adaptableType="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode"
- class="org.eclipse.tcf.te.tcf.filesystem.internal.adapters.FSTreeNodeAdapterFactory">
+ adaptableType="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode"
+ class="org.eclipse.tcf.te.tcf.filesystem.ui.internal.adapters.FSTreeNodeAdapterFactory">
<adapter
type="org.eclipse.ui.IActionFilter">
</adapter>
@@ -1689,7 +1675,7 @@
<!-- CellEditor factory contributions -->
<extension point="org.eclipse.tcf.te.ui.cellEditors">
<cellEditor
- editorFactory="org.eclipse.tcf.te.tcf.filesystem.internal.celleditor.FSViewerCellEditorFactory">
+ editorFactory="org.eclipse.tcf.te.tcf.filesystem.ui.internal.celleditor.FSViewerCellEditorFactory">
<activation>
<and>
<with
@@ -1699,7 +1685,7 @@
</count>
<iterate>
<instanceof
- value="org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode">
+ value="org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode">
</instanceof>
</iterate>
</with>
@@ -1725,7 +1711,7 @@
<wizard
canFinishEarly="false"
category="org.eclipse.tcf.te.tcf.ui.newWizards.category"
- class="org.eclipse.tcf.te.tcf.filesystem.internal.wizards.NewFileWizard"
+ class="org.eclipse.tcf.te.tcf.filesystem.ui.internal.wizards.NewFileWizard"
hasPages="true"
icon="icons/obj16/newfile_wiz.gif"
id="org.eclipse.tcf.te.tcf.filesystem.wizards.NewFileWizard"
@@ -1737,7 +1723,7 @@
<wizard
canFinishEarly="false"
category="org.eclipse.tcf.te.tcf.ui.newWizards.category"
- class="org.eclipse.tcf.te.tcf.filesystem.internal.wizards.NewFolderWizard"
+ class="org.eclipse.tcf.te.tcf.filesystem.ui.internal.wizards.NewFolderWizard"
hasPages="true"
icon="icons/obj16/newfolder_wiz.gif"
id="org.eclipse.tcf.te.tcf.filesystem.wizards.NewFolderWizard"
@@ -1751,7 +1737,7 @@
<extension point="org.eclipse.tcf.te.ui.viewers">
<viewer
autoExpandLevel="0"
- contentProvider="org.eclipse.tcf.te.tcf.filesystem.controls.FSTreeContentProvider"
+ contentProvider="org.eclipse.tcf.te.tcf.filesystem.ui.controls.FSTreeContentProvider"
doubleClickCommand="org.eclipse.ui.navigator.Open"
helpId="org.eclipse.tcf.te.tcf.filesystem.FSExplorerEditorPage"
id="org.eclipse.tcf.te.ui.controls.viewer.fs"
@@ -1762,7 +1748,7 @@
<style name="SWT.MULTI" />
</creation>
<dragSupport
- class="org.eclipse.tcf.te.tcf.filesystem.internal.dnd.FSDragSourceListener">
+ class="org.eclipse.tcf.te.tcf.filesystem.ui.internal.dnd.FSDragSourceListener">
<operations>
<operation name="DND.DROP_COPY" />
<operation name="DND.DROP_MOVE" />
@@ -1773,7 +1759,7 @@
</transferTypes>
</dragSupport>
<dropSupport
- class="org.eclipse.tcf.te.tcf.filesystem.internal.dnd.FSDropTargetListener">
+ class="org.eclipse.tcf.te.tcf.filesystem.ui.internal.dnd.FSDropTargetListener">
<operations>
<operation name="DND.DROP_COPY" />
<operation name="DND.DROP_MOVE" />
@@ -1790,9 +1776,9 @@
<columnContribution viewerId="org.eclipse.tcf.te.ui.controls.viewer.fs">
<column
alignment="SWT.LEFT"
- comparator="org.eclipse.tcf.te.tcf.filesystem.internal.columns.FSTreeElementComparator"
+ comparator="org.eclipse.tcf.te.tcf.filesystem.ui.internal.columns.FSTreeElementComparator"
id="name"
- labelProvider="org.eclipse.tcf.te.tcf.filesystem.internal.columns.FSTreeElementLabelProvider"
+ labelProvider="org.eclipse.tcf.te.tcf.filesystem.ui.internal.columns.FSTreeElementLabelProvider"
moveable="true"
name="%column.name.name"
resizable="true"
@@ -1802,9 +1788,9 @@
</column>
<column
alignment="SWT.RIGHT"
- comparator="org.eclipse.tcf.te.tcf.filesystem.internal.columns.SizeComparator"
+ comparator="org.eclipse.tcf.te.tcf.filesystem.ui.internal.columns.SizeComparator"
id="size"
- labelProvider="org.eclipse.tcf.te.tcf.filesystem.internal.columns.SizeLabelProvider"
+ labelProvider="org.eclipse.tcf.te.tcf.filesystem.ui.internal.columns.SizeLabelProvider"
moveable="true"
name="%column.name.size"
resizable="true"
@@ -1814,9 +1800,9 @@
</column>
<column
alignment="SWT.LEFT"
- comparator="org.eclipse.tcf.te.tcf.filesystem.internal.columns.FileTypeComparator"
+ comparator="org.eclipse.tcf.te.tcf.filesystem.ui.internal.columns.FileTypeComparator"
id="type"
- labelProvider="org.eclipse.tcf.te.tcf.filesystem.internal.columns.FileTypeLabelProvider"
+ labelProvider="org.eclipse.tcf.te.tcf.filesystem.ui.internal.columns.FileTypeLabelProvider"
moveable="true"
name="%column.name.type"
resizable="true"
@@ -1826,9 +1812,9 @@
</column>
<column
alignment="SWT.RIGHT"
- comparator="org.eclipse.tcf.te.tcf.filesystem.internal.columns.ModificationTimeComparator"
+ comparator="org.eclipse.tcf.te.tcf.filesystem.ui.internal.columns.ModificationTimeComparator"
id="modified"
- labelProvider="org.eclipse.tcf.te.tcf.filesystem.internal.columns.ModificationTimeLabelProvider"
+ labelProvider="org.eclipse.tcf.te.tcf.filesystem.ui.internal.columns.ModificationTimeLabelProvider"
moveable="true"
name="%column.name.modified"
resizable="true"
@@ -1838,9 +1824,9 @@
</column>
<column
alignment="SWT.RIGHT"
- comparator="org.eclipse.tcf.te.tcf.filesystem.internal.columns.AccessTimeComparator"
+ comparator="org.eclipse.tcf.te.tcf.filesystem.ui.internal.columns.AccessTimeComparator"
id="accessed"
- labelProvider="org.eclipse.tcf.te.tcf.filesystem.internal.columns.AccessTimeLabelProvider"
+ labelProvider="org.eclipse.tcf.te.tcf.filesystem.ui.internal.columns.AccessTimeLabelProvider"
moveable="true"
name="%column.name.accessed"
resizable="true"
@@ -1852,7 +1838,7 @@
<filterContribution viewerId="org.eclipse.tcf.te.ui.controls.viewer.fs">
<filter
- class="org.eclipse.tcf.te.tcf.filesystem.filters.HiddenFilesViewerFilter"
+ class="org.eclipse.tcf.te.tcf.filesystem.ui.filters.HiddenFilesViewerFilter"
description="%filter.description.hidden"
enabled="true"
id="org.eclipse.tcf.te.tcf.filesystem.navigator.filter.hiddenFiles"
@@ -1861,7 +1847,7 @@
visibleInUI="true">
</filter>
<filter
- class="org.eclipse.tcf.te.tcf.filesystem.filters.SystemFilesViewerFilter"
+ class="org.eclipse.tcf.te.tcf.filesystem.ui.filters.SystemFilesViewerFilter"
description="%filter.description.system"
enabled="true"
id="org.eclipse.tcf.te.tcf.filesystem.navigator.filter.systemFiles"
@@ -1880,7 +1866,7 @@
point="org.eclipse.core.runtime.adapters">
<factory
adaptableType="org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel"
- class="org.eclipse.tcf.te.tcf.filesystem.internal.adapters.ViewerInputAdapterFactory">
+ class="org.eclipse.tcf.te.tcf.filesystem.ui.internal.adapters.ViewerInputAdapterFactory">
<adapter
type="org.eclipse.tcf.te.core.interfaces.IViewerInput">
</adapter>
@@ -1914,53 +1900,53 @@
<propertySections
contributorId="org.eclipse.tcf.te.ui">
<propertySection
- class="org.eclipse.tcf.te.tcf.filesystem.internal.tabbed.BasicFolderSection"
+ class="org.eclipse.tcf.te.tcf.filesystem.ui.internal.tabbed.BasicFolderSection"
enablesFor="1"
- filter="org.eclipse.tcf.te.tcf.filesystem.internal.tabbed.FolderFilter"
+ filter="org.eclipse.tcf.te.tcf.filesystem.ui.internal.tabbed.FolderFilter"
id="org.eclipse.tcf.te.tcf.filesystem.propertysection.folder.basic"
tab="org.eclipse.tcf.te.tcf.filesystem.propertytab.general">
</propertySection>
<propertySection
- class="org.eclipse.tcf.te.tcf.filesystem.internal.tabbed.BasicFileSection"
+ class="org.eclipse.tcf.te.tcf.filesystem.ui.internal.tabbed.BasicFileSection"
enablesFor="1"
- filter="org.eclipse.tcf.te.tcf.filesystem.internal.tabbed.FileFilter"
+ filter="org.eclipse.tcf.te.tcf.filesystem.ui.internal.tabbed.FileFilter"
id="org.eclipse.tcf.te.tcf.filesystem.propertysection.file.basic"
tab="org.eclipse.tcf.te.tcf.filesystem.propertytab.general">
</propertySection>
<propertySection
afterSection="org.eclipse.tcf.te.tcf.filesystem.propertysection.folder.basic,org.eclipse.tcf.te.tcf.filesystem.propertysection.file.basic"
- class="org.eclipse.tcf.te.tcf.filesystem.internal.tabbed.WindowsAttributesSection"
+ class="org.eclipse.tcf.te.tcf.filesystem.ui.internal.tabbed.WindowsAttributesSection"
enablesFor="1"
- filter="org.eclipse.tcf.te.tcf.filesystem.internal.tabbed.WindowsFilter"
+ filter="org.eclipse.tcf.te.tcf.filesystem.ui.internal.tabbed.WindowsFilter"
id="org.eclipse.tcf.te.tcf.filesystem.propertysection.windows.attributes"
tab="org.eclipse.tcf.te.tcf.filesystem.propertytab.general">
</propertySection>
<propertySection
- class="org.eclipse.tcf.te.tcf.filesystem.internal.tabbed.LinuxPermissionsSection"
+ class="org.eclipse.tcf.te.tcf.filesystem.ui.internal.tabbed.LinuxPermissionsSection"
enablesFor="1"
- filter="org.eclipse.tcf.te.tcf.filesystem.internal.tabbed.LinuxFilter"
+ filter="org.eclipse.tcf.te.tcf.filesystem.ui.internal.tabbed.LinuxFilter"
id="org.eclipse.tcf.te.tcf.filesystem.propertysection.linux.permissions"
tab="org.eclipse.tcf.te.tcf.filesystem.propertytab.permissions">
</propertySection>
<propertySection
- class="org.eclipse.tcf.te.tcf.filesystem.internal.tabbed.WindowsFolderAISection"
+ class="org.eclipse.tcf.te.tcf.filesystem.ui.internal.tabbed.WindowsFolderAISection"
enablesFor="1"
- filter="org.eclipse.tcf.te.tcf.filesystem.internal.tabbed.WindowsFolderFilter"
+ filter="org.eclipse.tcf.te.tcf.filesystem.ui.internal.tabbed.WindowsFolderFilter"
id="org.eclipse.tcf.te.tcf.filesystem.propertysection.windows.folderAI"
tab="org.eclipse.tcf.te.tcf.filesystem.propertytab.advanced">
</propertySection>
<propertySection
- class="org.eclipse.tcf.te.tcf.filesystem.internal.tabbed.WindowsFileAISection"
+ class="org.eclipse.tcf.te.tcf.filesystem.ui.internal.tabbed.WindowsFileAISection"
enablesFor="1"
- filter="org.eclipse.tcf.te.tcf.filesystem.internal.tabbed.WindowsFileFilter"
+ filter="org.eclipse.tcf.te.tcf.filesystem.ui.internal.tabbed.WindowsFileFilter"
id="org.eclipse.tcf.te.tcf.filesystem.propertysection.windows.fileAI"
tab="org.eclipse.tcf.te.tcf.filesystem.propertytab.advanced">
</propertySection>
<propertySection
afterSection="org.eclipse.tcf.te.tcf.filesystem.propertysection.windows.folderAI,"
- class="org.eclipse.tcf.te.tcf.filesystem.internal.tabbed.WindowsAttributesCESection"
+ class="org.eclipse.tcf.te.tcf.filesystem.ui.internal.tabbed.WindowsAttributesCESection"
enablesFor="1"
- filter="org.eclipse.tcf.te.tcf.filesystem.internal.tabbed.WindowsFilter"
+ filter="org.eclipse.tcf.te.tcf.filesystem.ui.internal.tabbed.WindowsFilter"
id="org.eclipse.tcf.te.tcf.filesystem.propertysection.windows.attributesCE"
tab="org.eclipse.tcf.te.tcf.filesystem.propertytab.advanced">
</propertySection>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/adapters/DeleteHandlerDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/adapters/DeleteHandlerDelegate.java
deleted file mode 100644
index 0b7888343..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/adapters/DeleteHandlerDelegate.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.adapters;
-
-import java.util.List;
-import java.util.UUID;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
-import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
-import org.eclipse.tcf.te.tcf.filesystem.interfaces.IConfirmCallback;
-import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSDelete;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
-import org.eclipse.tcf.te.ui.views.interfaces.handler.IDeleteHandlerDelegate;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * File System tree node delete handler delegate implementation.
- */
-public class DeleteHandlerDelegate implements IDeleteHandlerDelegate, IConfirmCallback {
-
- // The key to access the selection in the state.
- private static final String KEY_SELECTION = "selection"; //$NON-NLS-1$
- // The key to access the processed state in the state.
- private static final String KEY_PROCESSED = "processed"; //$NON-NLS-1$
- // The confirmation callback
- private IConfirmCallback confirmCallback;
-
- /**
- * Constructor
- */
- public DeleteHandlerDelegate() {
- confirmCallback = this;
- }
-
- /**
- * Set the confirmation callback
- *
- * @param confirmCallback The confirmation callback
- */
- public void setConfirmCallback(IConfirmCallback confirmCallback) {
- this.confirmCallback = confirmCallback;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.views.interfaces.handler.IDeleteHandlerDelegate#canDelete(java.lang.Object)
- */
- @Override
- public boolean canDelete(Object element) {
- if (element instanceof FSTreeNode) {
- FSTreeNode node = (FSTreeNode) element;
- if (!node.isSystemRoot() && !node.isRoot()) {
- return node.isWindowsNode() && !node.isReadOnly()
- || !node.isWindowsNode() && node.isWritable();
- }
- }
- return false;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.tcf.te.ui.views.interfaces.handler.IDeleteHandlerDelegate#delete(java.lang.Object, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tcf.te.runtime.interfaces.callback.ICallback)
- */
- @Override
- public void delete(Object element, IPropertiesContainer state, ICallback callback) {
- Assert.isNotNull(element);
- Assert.isNotNull(state);
-
- UUID lastProcessed = (UUID) state.getProperty(KEY_PROCESSED);
- if (lastProcessed == null || !lastProcessed.equals(state.getUUID())) {
- state.setProperty(KEY_PROCESSED, state.getUUID());
- if(confirmCallback != null) {
- IStructuredSelection selection = (IStructuredSelection) state.getProperty(KEY_SELECTION);
- if(!confirmCallback.requires(selection) || confirmCallback.confirms(selection) == IConfirmCallback.YES) {
- List<FSTreeNode> nodes = selection.toList();
- FSDelete delete = new FSDelete(nodes);
- delete.doit();
- }
- }
- }
- if (callback != null) callback.done(this, Status.OK_STATUS);
- }
-
- /*
- *
- */
- @Override
- public boolean requires(Object object) {
- return true;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.tcf.te.tcf.filesystem.interfaces.IConfirmCallback#confirms(java.lang.Object)
- */
- @Override
- public int confirms(Object object) {
- IStructuredSelection selection = (IStructuredSelection) object;
- List<FSTreeNode> nodes = selection.toList();
- String question;
- if (nodes.size() == 1) {
- FSTreeNode node = nodes.get(0);
- question = NLS.bind(Messages.DeleteFilesHandler_DeleteOneFileConfirmation, node.name);
- }
- else {
- question = NLS.bind(Messages.DeleteFilesHandler_DeleteMultipleFilesConfirmation, Integer.valueOf(nodes.size()));
- }
- Shell parent = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- if (MessageDialog.openQuestion(parent, Messages.DeleteFilesHandler_ConfirmDialogTitle, question)) {
- return IConfirmCallback.YES;
- }
- return IConfirmCallback.NO;
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSUpload.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSUpload.java
deleted file mode 100644
index bb15b5a80..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSUpload.java
+++ /dev/null
@@ -1,283 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- *******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.operations;
-
-import java.io.File;
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.atomic.AtomicReference;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.SafeRunner;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.util.SafeRunnable;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
-import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
-import org.eclipse.tcf.te.tcf.filesystem.interfaces.IConfirmCallback;
-import org.eclipse.tcf.te.tcf.filesystem.internal.ImageConsts;
-import org.eclipse.tcf.te.tcf.filesystem.internal.utils.CacheManager;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Upload multiple files from local system to a remote system.
- */
-public class FSUpload extends FSUIOperation implements IConfirmCallback {
- // The source files to be uploaded.
- String[] sourceFiles;
- // The target folder to which these files are moved to.
- FSTreeNode targetFolder;
- // The callback invoked after uploading.
- ICallback callback;
- // The current children
- Map<File, FSTreeNode> parentFolders;
-
- /**
- * Create an instance with specified files, target folder and a callback.
- *
- * @param sourceFiles the source files being uploaded.
- * @param targetFolder the target folder to upload the files to.
- * @param callback the callback that is invoked after uploading.
- */
- public FSUpload(String[] sourceFiles, final FSTreeNode targetFolder, ICallback callback) {
- super(Messages.FSUpload_UploadTitle);
- this.sourceFiles = new String[sourceFiles.length];
- System.arraycopy(sourceFiles, 0, this.sourceFiles, 0, sourceFiles.length);
- this.targetFolder = targetFolder;
- this.callback = callback;
- parentFolders = Collections.synchronizedMap(new HashMap<File, FSTreeNode>());
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSOperation#run(org.eclipse.core.runtime.IProgressMonitor)
- */
- @Override
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- String message;
- if(sourceFiles.length==1)
- message = NLS.bind(Messages.CacheManager_UploadSingleFile, sourceFiles[0]);
- else
- message = NLS.bind(Messages.CacheManager_UploadNFiles, Long.valueOf(sourceFiles.length));
- monitor.beginTask(message, 100);
- List<File> fileList = new ArrayList<File>();
- List<URL> urlList = new ArrayList<URL>();
- prepareDirStruct(fileList, urlList);
- File[] files = fileList.toArray(new File[fileList.size()]);
- URL[] urls = urlList.toArray(new URL[urlList.size()]);
- CacheManager.getInstance().uploadFiles(monitor, files, urls, this);
- } catch (MalformedURLException e) {
- throw new InvocationTargetException(e);
- } catch (IOException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
-
- /**
- * Prepare the directory structure on the remote target, creating necessary intermediate directories
- * and found all files that should be uploaded. The resulting files to be uploaded should be stored
- * to the file list. The resulting corresponding target file URLs should be stored in the url list.
- *
- * @param fileList The file list to store the files that should be uploaded.
- * @param urlList The list containing the corresponding urls.
- */
- private void prepareDirStruct(List<File> fileList, List<URL> urlList) {
- List<File> files = new ArrayList<File>();
- for(String path: sourceFiles) {
- files.add(new File(path));
- }
- // Find the root nodes of these files.
- List<File> topFiles = getTopFiles(files);
- for(File topFile : topFiles) {
- appendFile(topFile, fileList, urlList, targetFolder);
- }
- }
-
- /**
- * Append the specified file object to the file list and url list. If the file object is a file
- * then append it to the two lists. If the file object is a directory, then recursively
- * add its children and grand children to the two list. During this process, the parents of
- * these files and directories traversed should be put into the parent folders map so that
- * it could be queried to check if it has a file/directory with a same name.
- *
- * @param file The file to be added
- * @param fileList The file list
- * @param urlList The url list
- * @param parent The current parent node
- */
- private void appendFile(final File file, final List<File> fileList, final List<URL> urlList, final FSTreeNode parent) {
- parentFolders.put(file, parent);
- if(file.isFile()) {
- SafeRunner.run(new SafeRunnable(){
- @Override
- public void run() throws Exception {
- URL folderURL = parent.getLocationURL();
- URL url = new URL(folderURL, file.getName());
- fileList.add(file);
- urlList.add(url);
- }});
- } else if(file.isDirectory()) {
- FSTreeNode node = findNode(file);
- if(node == null) {
- final AtomicReference<FSTreeNode> reference = new AtomicReference<FSTreeNode>();
- SafeRunner.run(new SafeRunnable(){
- @Override
- public void run() throws Exception {
- FSCreateFolder create = new FSCreateFolder(parent, file.getName());
- create.run(new NullProgressMonitor());
- reference.set(create.getNode());
- }});
- node = reference.get();
- }
- File[] children = file.listFiles();
- for(File child : children) {
- appendFile(child, fileList, urlList, node);
- }
- }
- }
-
- /**
- * Get the root files of the specified files/folders in the list.
- *
- * @param files The files to be checked.
- * @return Root nodes of these files that has no parent.
- */
- private List<File> getTopFiles(List<File>files) {
- List<File> result = new ArrayList<File>();
- for(File file : files) {
- if(!hasFileAncestor(file, files)) {
- result.add(file);
- }
- }
- return result;
- }
-
- /**
- * Check if the target file has an ancestral parent in the specified list.
- *
- * @param target The target file to be checked.
- * @param files The file list to be searched.
- * @return true if it has an ancestral parent.
- */
- private boolean hasFileAncestor(File target, List<File> files) {
- for(File file : files) {
- if(isFileAncestor(file, target)) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Check if the specified "file" is an ancestral parent of the "target" file.
- *
- * @param file The ancestral file.
- * @param target The target file.
- * @return true if "file" is an ancestral parent of "target"
- */
- private boolean isFileAncestor(File file, File target) {
- if(target == null) return false;
- File parent = target.getParentFile();
- if(file.equals(parent)) return true;
- return isFileAncestor(file, parent);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSUIOperation#doit()
- */
- @Override
- public IStatus doit() {
- IStatus status = super.doit();
- if(callback != null) {
- callback.done(this, status);
- }
- return status;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.tcf.te.tcf.filesystem.interfaces.IConfirmCallback#requires(java.lang.Object)
- */
- @Override
- public boolean requires(Object object) {
- return findNode((File) object) != null;
- }
-
- /**
- * Check if the specified file has a same-named file under its corresponding
- * parent folder.
- *
- * @param file The file to checked.
- * @return the node that has the same name with the file.
- */
- private FSTreeNode findNode(File file) {
- final FSTreeNode parent = parentFolders.get(file);
- final List<FSTreeNode> targetChildren = new ArrayList<FSTreeNode>();
- SafeRunner.run(new SafeRunnable(){
- @Override
- public void run() throws Exception {
- targetChildren.addAll(getChildren(parent));
- }});
- String name = file.getName();
- for(FSTreeNode child:targetChildren) {
- if(name.equals(child.name))
- return child;
- }
- return null;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.tcf.te.tcf.filesystem.interfaces.IConfirmCallback#confirms(java.lang.Object)
- */
- @Override
- public int confirms(Object object) {
- final int[] results = new int[1];
- final File file = (File) object;
- Display display = PlatformUI.getWorkbench().getDisplay();
- display.syncExec(new Runnable() {
- @Override
- public void run() {
- Shell parent = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- String title = Messages.FSUpload_OverwriteTitle;
- String message = NLS.bind(Messages.FSUpload_OverwriteConfirmation, file.getName());
- final Image titleImage = UIPlugin.getImage(ImageConsts.DELETE_READONLY_CONFIRM);
- MessageDialog qDialog = new MessageDialog(parent, title, null, message,
- MessageDialog.QUESTION, new String[] {Messages.FSUpload_Yes,
- Messages.FSUpload_YesToAll, Messages.FSUpload_No, Messages.FSUpload_Cancel}, 0) {
- @Override
- public Image getQuestionImage() {
- return titleImage;
- }
- };
- results[0] = qDialog.open();
- }
- });
- return results[0];
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/utils/CacheManager.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/utils/CacheManager.java
deleted file mode 100644
index b1c9d52a1..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/utils/CacheManager.java
+++ /dev/null
@@ -1,621 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Wind River Systems - initial API and implementation
- * William Chen (Wind River)- [345387] Open the remote files with a proper editor
- * William Chen (Wind River)- [345552] Edit the remote files with a proper editor
- *******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.utils;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.lang.reflect.InvocationTargetException;
-import java.net.URL;
-import java.text.DecimalFormat;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.SafeRunner;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.util.SafeRunnable;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
-import org.eclipse.tcf.te.tcf.filesystem.dialogs.TimeTriggeredProgressMonitorDialog;
-import org.eclipse.tcf.te.tcf.filesystem.interfaces.IConfirmCallback;
-import org.eclipse.tcf.te.tcf.filesystem.internal.url.TcfURLConnection;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * The local file system cache used to manage the temporary files downloaded
- * from a remote file system.
- */
-public class CacheManager {
- public static final char PATH_ESCAPE_CHAR = '$';
-
- // The default chunk size of the buffer used during downloading files.
- private static final int DEFAULT_CHUNK_SIZE = 5 * 1024;
-
- // The formatter used to format the size displayed while downloading.
- private static final DecimalFormat SIZE_FORMAT = new DecimalFormat("#,##0.##"); //$NON-NLS-1$
-
- // The singleton instance.
- private static volatile CacheManager instance;
-
- /**
- * Get the singleton cache manager.
- *
- * @return The singleton cache manager.
- */
- public static CacheManager getInstance() {
- if (instance == null) {
- instance = new CacheManager();
- }
- return instance;
- }
-
- /**
- * Create a cache manager.
- */
- private CacheManager() {
- }
-
- /**
- * Get the local path of a node's cached file.
- * <p>
- * The preferred location is within the plugin's state location, in
- * example <code>&lt;state location&gt;agent_<hashcode_of_peerId>/remote/path/to/the/file...</code>.
- * <p>
- * If the plug-in is loaded in a RCP workspace-less environment, the
- * fall back strategy is to use the users home directory.
- *
- * @param node
- * The file/folder node.
- * @return The local path of the node's cached file.
- */
- public IPath getCachePath(FSTreeNode node) {
- File location = getCacheRoot();
- String agentId = node.peerNode.getPeerId();
- // Use Math.abs to avoid negative hash value.
- String agent = agentId.replace(':', PATH_ESCAPE_CHAR);
- IPath agentDir = new Path(location.getAbsolutePath()).append(agent);
- File agentDirFile = agentDir.toFile();
- mkdirChecked(agentDirFile);
- return appendNodePath(agentDir, node);
- }
-
- /**
- * Check and make a directory if it does not exist. Record
- * the failure message if making fails.
- *
- * @param file The file to be deleted.
- */
- void mkdirChecked(final File dir) {
- if(!dir.exists()) {
- SafeRunner.run(new SafeRunnable(){
- @Override
- public void run() throws Exception {
- if (!dir.mkdir()) {
- throw new Exception(NLS.bind(Messages.CacheManager_MkdirFailed, dir.getAbsolutePath()));
- }
- }});
- }
- }
-
- /**
- * Check if the file exists and delete if it does. Record
- * the failure message if deleting fails.
- *
- * @param file The file to be deleted.
- */
- void deleteFileChecked(final File file) {
- if (file.exists()) {
- SafeRunner.run(new SafeRunnable(){
- @Override
- public void run() throws Exception {
- if (!file.delete()) {
- throw new Exception(NLS.bind(Messages.FSOperation_DeletingFileFailed, file.getAbsolutePath()));
- }
- }});
- }
- }
-
- /**
- * Check if the file exists and set its last modified time if it does. Record
- * the failure message if it fails.
- *
- * @param file The file to be set.
- * @param lastModified the last modified time.
- */
- void setLastModifiedChecked(final File file, final long lastModified) {
- if (file.exists()) {
- SafeRunner.run(new SafeRunnable(){
- @Override
- public void run() throws Exception {
- if (!file.setLastModified(lastModified)) {
- throw new Exception(NLS.bind(Messages.CacheManager_SetLastModifiedFailed, file.getAbsolutePath()));
- }
- }});
- }
- }
-
- /**
- * Check if the file exists and set its read-only attribute if it does. Record
- * the failure message if it fails.
- *
- * @param file The file to be set.
- */
- void setReadOnlyChecked(final File file) {
- if (file.exists()) {
- SafeRunner.run(new SafeRunnable(){
- @Override
- public void run() throws Exception {
- if (!file.setReadOnly()) {
- throw new Exception(NLS.bind(Messages.CacheManager_SetReadOnlyFailed, file.getAbsolutePath()));
- }
- }});
- }
- }
-
- /**
- * Get the local file of the specified node.
- *
- * <p>
- * The preferred location is within the plugin's state location, in
- * example <code>&lt;state location&gt;agent_<hashcode_of_peerId>/remote/path/to/the/file...</code>.
- * <p>
- * If the plug-in is loaded in a RCP workspace-less environment, the
- * fall back strategy is to use the users home directory.
- *
- * @param node
- * The file/folder node.
- * @return The file object of the node's local cache.
- */
- public File getCacheFile(FSTreeNode node){
- return getCachePath(node).toFile();
- }
-
- /**
- * Get the cache file system's root directory on the local host's
- * file system.
- *
- * @return The root folder's location of the cache file system.
- */
- public File getCacheRoot() {
- File location;
- try {
- location = UIPlugin.getDefault().getStateLocation().toFile();
- }catch (IllegalStateException e) {
- // An RCP workspace-less environment (-data @none)
- location = new File(System.getProperty("user.home"), ".tcf"); //$NON-NLS-1$ //$NON-NLS-2$
- location = new File(location, "fs"); //$NON-NLS-1$
- }
-
- // Create the location if it not exist
- mkdirChecked(location);
- return location;
- }
-
- /**
- * Append the path with the specified node's context path.
- *
- * @param path
- * The path to be appended.
- * @param node
- * The file/folder node.
- * @return The path to the node.
- */
- private IPath appendNodePath(IPath path, FSTreeNode node) {
- if (!node.isRoot() && node.parent!=null) {
- path = appendNodePath(path, node.parent);
- return appendPathSegment(node, path, node.name);
- }
- if (node.isWindowsNode()) {
- String name = node.name;
- name = name.substring(0, name.length()-1);
- name = name.replace(':', PATH_ESCAPE_CHAR);
- return appendPathSegment(node, path, name);
- }
- return path;
- }
-
- /**
- * Append the path with the segment "name". Create a directory
- * if the node is a directory which does not yet exist.
- *
- * @param node The file/folder node.
- * @param path The path to appended.
- * @param name The segment's name.
- * @return The path with the segment "name" appended.
- */
- private IPath appendPathSegment(FSTreeNode node, IPath path, String name) {
- IPath newPath = path.append(name);
- File newFile = newPath.toFile();
- if (node.isDirectory()) {
- mkdirChecked(newFile);
- }
- return newPath;
- }
-
- /**
- * Download the data of the file from the remote file system.
- * Must be called within a UI thread.
- * @param node
- * The file node.
- *
- * @return true if it is successful, false there're errors or it is
- * canceled.
- */
- public boolean download(final FSTreeNode node) {
- Assert.isNotNull(Display.getCurrent());
- IRunnableWithProgress runnable = getDownloadRunnable(node);
- Shell parent = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- TimeTriggeredProgressMonitorDialog dialog = new TimeTriggeredProgressMonitorDialog(
- parent, 250);
- dialog.setCancelable(true);
- File file = getCachePath(node).toFile();
- try {
- dialog.run(true, true, runnable);
- return true;
- } catch (InvocationTargetException e) {
- // Something's gone wrong. Roll back the downloading and display the
- // error.
- deleteFileChecked(file);
- PersistenceManager.getInstance().removeBaseTimestamp(node.getLocationURI());
- displayError(parent, e);
- } catch (InterruptedException e) {
- // It is canceled. Just roll back the downloading result.
- deleteFileChecked(file);
- PersistenceManager.getInstance().removeBaseTimestamp(node.getLocationURI());
- }
- return false;
- }
-
- public IRunnableWithProgress getDownloadRunnable(final FSTreeNode node) {
- return new IRunnableWithProgress() {
- @Override
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- monitor.beginTask(NLS.bind(Messages.CacheManager_DowloadingFile, node.name), 100);
- OutputStream output = null;
- try {
- // Write the data to its local cache file.
- File file = getCachePath(node).toFile();
- if(file.exists() && !file.canWrite()){
- // If the file exists and is read-only, delete it.
- deleteFileChecked(file);
- }
- output = new BufferedOutputStream(new FileOutputStream(file));
- download2OutputStream(node, output, monitor);
- if (monitor.isCanceled())
- throw new InterruptedException();
- } catch (IOException e) {
- throw new InvocationTargetException(e);
- } finally {
- if (output != null) {
- try {
- output.close();
- } catch (Exception e) {
- }
- }
- if(!monitor.isCanceled()){
- SafeRunner.run(new SafeRunnable() {
- @Override
- public void handleException(Throwable e) {
- // Ignore exception
- }
- @Override
- public void run() throws Exception {
- File file = getCachePath(node).toFile();
- if (file.exists()) {
- // If downloading is successful, update the attributes of the file and
- // set the last modified time to that of its corresponding file.
- PersistenceManager.getInstance().setBaseTimestamp(node.getLocationURI(), node.attr.mtime);
- setLastModifiedChecked(file, node.attr.mtime);
- if (!node.isWritable()) setReadOnlyChecked(file);
- StateManager.getInstance().refreshState(node);
- }
- }
- });
- }
- monitor.done();
- }
- }
- };
- }
-
- /**
- * Upload the local files to the remote file system.
- * Must be called within UI thread.
- * @param nodes
- * The files' location. Not null.
- *
- * @return true if it is successful, false there're errors or it is
- * canceled.
- */
- public boolean upload(final FSTreeNode[] nodes, final boolean sync) {
- Assert.isNotNull(Display.getCurrent());
- Shell parent = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- try {
- IRunnableWithProgress runnable = new IRunnableWithProgress() {
- @Override
- public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
- try {
- String message;
- if(nodes.length==1)
- message = NLS.bind(Messages.CacheManager_UploadSingleFile, nodes[0].name);
- else
- message = NLS.bind(Messages.CacheManager_UploadNFiles, Long.valueOf(nodes.length));
- monitor.beginTask(message, 100);
- uploadFiles(monitor, sync, nodes);
- if (monitor.isCanceled())
- throw new InterruptedException();
- } catch(IOException e) {
- throw new InvocationTargetException(e);
- } finally {
- monitor.done();
- }
- }
- };
- TimeTriggeredProgressMonitorDialog dialog = new TimeTriggeredProgressMonitorDialog(parent, 250);
- dialog.setCancelable(true);
- dialog.run(true, true, runnable);
- return true;
- } catch (InvocationTargetException e) {
- // Something's gone wrong. Roll back the downloading and display the error.
- displayError(parent, e);
- } catch (InterruptedException e) {
- // It is canceled. Just roll back the downloading result.
- }
- return false;
- }
-
- /**
- * Display the error in an error dialog.
- *
- * @param parentNode
- * the file node.
- * @param parent
- * the parent shell.
- * @param e
- * The error exception.
- */
- private void displayError(Shell parent, InvocationTargetException e) {
- Throwable throwable = e.getTargetException() != null ? e.getTargetException() : e;
- MessageDialog.openError(parent, Messages.CacheManager_DownloadingError, throwable.getLocalizedMessage());
- }
-
- /**
- * Upload the specified files using the monitor to report the progress.
- *
- * @param peers
- * The local files' peer files.
- * @param locals
- * The local files to be uploaded.
- * @param monitor
- * The monitor used to report the progress.
- * @throws Exception
- * an Exception thrown during downloading and storing data.
- */
- void uploadFiles(IProgressMonitor monitor, final boolean sync, final FSTreeNode[] nodes) throws IOException {
- File[] files = new File[nodes.length];
- URL[] urls = new URL[nodes.length];
- for (int i = 0; i < nodes.length; i++) {
- files[i] = getCacheFile(nodes[i]);
- urls[i] = nodes[i].getLocationURL();
- }
- try {
- // Upload the files to the remote location by the specified URLs.
- uploadFiles(monitor, files, urls, null);
- }
- finally {
- // Once upload is successful, synchronize the modified time.
- for (int i = 0; i < nodes.length; i++) {
- final FSTreeNode node = nodes[i];
- SafeRunner.run(new SafeRunnable() {
- @Override
- public void handleException(Throwable e) {
- // Ignore exception
- }
-
- @Override
- public void run() throws Exception {
- PersistenceManager.getInstance().setBaseTimestamp(node.getLocationURI(), node.attr.mtime);
- if (sync) {
- File file = getCacheFile(node);
- setLastModifiedChecked(file, node.attr.mtime);
- }
- StateManager.getInstance().refreshState(node);
- }
- });
- }
- }
- }
-
- /**
- * Upload the specified files using the monitor to report the progress.
- *
- * @param files The local file objects.
- * @param urls The remote file's URL location.
- * @param monitor The monitor used to report the progress.
- * @param callback confirmation callback.
- * @throws Exception an Exception thrown during downloading and storing data.
- */
- public void uploadFiles(IProgressMonitor monitor, File[] files, URL[] urls, IConfirmCallback callback) throws IOException {
- BufferedInputStream input = null;
- BufferedOutputStream output = null;
- // The buffer used to download the file.
- byte[] data = new byte[DEFAULT_CHUNK_SIZE];
- // Calculate the total size.
- long totalSize = 0;
- for (File file:files) {
- totalSize += file.length();
- }
- // Calculate the chunk size of one percent.
- int chunk_size = (int) totalSize / 100;
- // The current reading percentage.
- int percentRead = 0;
- // The current length of read bytes.
- long bytesRead = 0;
- boolean yes2all = false;
- for (int i = 0; i < files.length && !monitor.isCanceled(); i++) {
- File file = files[i];
- if(callback != null && !yes2all) {
- if(callback.requires(file)) {
- int result = callback.confirms(file);
- switch(result) {
- case IConfirmCallback.YES:
- break;
- case IConfirmCallback.YES_TO_ALL:
- yes2all = true;
- break;
- case IConfirmCallback.NO:
- bytesRead += file.length();
- if (chunk_size != 0) {
- int percent = (int) bytesRead / chunk_size;
- if (percent != percentRead) { // Update the progress.
- monitor.worked(percent - percentRead);
- percentRead = percent; // Remember the percentage.
- // Report the progress.
- monitor.subTask(NLS.bind(Messages.CacheManager_UploadingProgress, new Object[]{file.getName(), formatSize(bytesRead), formatSize(file.length())}));
- }
- }
- continue;
- case IConfirmCallback.CANCEL:
- monitor.setCanceled(true);
- continue;
- }
- }
- }
- try {
- URL url = urls[i];
- TcfURLConnection connection = (TcfURLConnection) url.openConnection();
- connection.setDoInput(false);
- connection.setDoOutput(true);
- input = new BufferedInputStream(new FileInputStream(file));
- output = new BufferedOutputStream(connection.getOutputStream());
-
- // Total size displayed on the progress dialog.
- String fileLength = formatSize(file.length());
- int length;
- while ((length = input.read(data)) >= 0 && !monitor.isCanceled()) {
- output.write(data, 0, length);
- output.flush();
- bytesRead += length;
- if (chunk_size != 0) {
- int percent = (int) bytesRead / chunk_size;
- if (percent != percentRead) { // Update the progress.
- monitor.worked(percent - percentRead);
- percentRead = percent; // Remember the percentage.
- // Report the progress.
- monitor.subTask(NLS.bind(Messages.CacheManager_UploadingProgress, new Object[]{file.getName(), formatSize(bytesRead), fileLength}));
- }
- }
- }
- } finally {
- if (output != null) {
- try {
- output.close();
- } catch (Exception e) {
- }
- }
- if (input != null) {
- try {
- input.close();
- } catch (Exception e) {
- }
- }
- }
- }
- }
-
- /**
- * Download the specified file into an output stream using the monitor to report the progress.
- *
- * @param node
- * The file to be downloaded.
- * @param output
- * The output stream.
- * @param monitor
- * The monitor used to report the progress.
- * @throws IOException
- * an IOException thrown during downloading and storing data.
- */
- public void download2OutputStream(FSTreeNode node, OutputStream output, IProgressMonitor monitor) throws IOException {
- InputStream input = null;
- // Open the input stream of the node using the tcf stream protocol.
- try{
- URL url = node.getLocationURL();
- InputStream in = url.openStream();
- input = new BufferedInputStream(in);
- // The buffer used to download the file.
- byte[] data = new byte[DEFAULT_CHUNK_SIZE];
- // Calculate the chunk size of one percent.
- int chunk_size = (int) node.attr.size / 100;
- // Total size displayed on the progress dialog.
- String total_size = formatSize(node.attr.size);
-
- int percentRead = 0;
- long bytesRead = 0;
- int length;
- while ((length = input.read(data)) >= 0 && !monitor.isCanceled()) {
- output.write(data, 0, length);
- output.flush();
- bytesRead += length;
- if (chunk_size != 0) {
- int percent = (int) bytesRead / chunk_size;
- if (percent != percentRead) { // Update the progress.
- monitor.worked(percent - percentRead);
- percentRead = percent; // Remember the percentage.
- // Report the progress.
- monitor.subTask(NLS.bind(Messages.CacheManager_DownloadingProgress, formatSize(bytesRead), total_size));
- }
- }
- }
- }finally{
- if (input != null) {
- try {
- input.close();
- } catch (Exception e) {
- }
- }
- }
- }
-
- /**
- * Use the SIZE_FORMAT to format the file's size. The rule is: 1. If the
- * size is less than 1024 bytes, then show it as "####" bytes. 2. If the
- * size is less than 1024 KBs, while more than 1 KB, then show it as
- * "####.##" KBs. 3. If the size is more than 1 MB, then show it as
- * "####.##" MBs.
- *
- * @param size
- * The file size to be displayed.
- * @return The string representation of the size.
- */
- private static String formatSize(long size) {
- double kbSize = size / 1024.0;
- if (kbSize < 1.0) {
- return SIZE_FORMAT.format(size) + Messages.CacheManager_Bytes;
- }
- double mbSize = kbSize / 1024.0;
- if (mbSize < 1.0)
- return SIZE_FORMAT.format(kbSize) + Messages.CacheManager_KBs;
- return SIZE_FORMAT.format(mbSize) + Messages.CacheManager_MBs;
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/utils/PersistenceManager.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/utils/PersistenceManager.java
deleted file mode 100644
index 199fb16e9..000000000
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/utils/PersistenceManager.java
+++ /dev/null
@@ -1,559 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * William Chen (Wind River) [360494]Provide an "Open With" action in the pop
- * up menu of file system nodes of Target Explorer.
- *******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.utils;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Properties;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.QualifiedName;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
-import org.eclipse.tcf.te.tcf.filesystem.internal.preferences.PreferencePage;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.WorkbenchException;
-import org.eclipse.ui.XMLMemento;
-
-/**
- * A facility class to load and save persistent data such including resolved content types, file's
- * properties, and time stamps etc.
- */
-public class PersistenceManager {
- // The XML element of unresolvable.
- private static final String ELEMENT_UNRESOLVABLE = "unresolvable"; //$NON-NLS-1$
-
- // The root element of "unresolvables"
- private static final String ELEMENT_UNRESOLVED = "unresolved"; //$NON-NLS-1$
-
- // The attribute "contentType" to specify the content type id of the file.
- private static final String ATTR_CONTENT_TYPE = "contentType"; //$NON-NLS-1$
-
- // The XML element of resolvable.
- private static final String ELEMENT_RESOLVABLE = "resolvable"; //$NON-NLS-1$
-
- // The root element of "resolvables"
- private static final String ELEMENT_RESOLVED = "resolved"; //$NON-NLS-1$
-
- // The root element of the memento for content type resolving.
- private static final String CONTENT_TYPE_ROOT = "contentTypes"; //$NON-NLS-1$
-
- // The XML file name used to store the resolved content types.
- private static final String CONTENT_TYPE_FILE = "contentTypes.xml"; //$NON-NLS-1$
-
- // The attribute "value"
- private static final String ATTR_VALUE = "value"; //$NON-NLS-1$
-
- // The attribute "local name" of a qualified name.
- private static final String ATTR_LOCAL_NAME = "localName"; //$NON-NLS-1$
-
- // The attribute "qualifier" of a qualified name.
- private static final String ATTR_QUALIFIER = "qualifier"; //$NON-NLS-1$
-
- // The attribute of a node's URI
- private static final String ATTR_URI = "URI"; //$NON-NLS-1$
-
- // The element "property" to record a file's property
- private static final String ELEMENT_PROPERTY = "property"; //$NON-NLS-1$
-
- // The element "file" to specify a file's entry.
- private static final String ELEMENT_FILE = "file"; //$NON-NLS-1$
-
- // The root element of properties.
- private static final String PERSISTENT_ROOT = "properties"; //$NON-NLS-1$
-
- // Time stamp file used to persist the time stamps of each file.
- private static final String TIMESTAMP_FILE = "timestamps.xml"; //$NON-NLS-1$
-
- // The file used to store persistent properties of each file.
- private static final String PERSISTENT_FILE = "persistent.xml"; //$NON-NLS-1$
-
- // The singleton instance.
- private static volatile PersistenceManager instance;
-
- // The time stamp for each file.
- private Map<URI, Long> timestamps;
-
- // The persistent properties of the files.
- private Map<URI, Map<QualifiedName, String>> properties;
-
- // Already known resolved content type of file nodes specified by their URIs.
- private Map<URI, IContentType> resolved;
-
- // Already known unresolvable file nodes specified by their URIs.
- private Map<URI, URI> unresolved;
-
- /**
- * Get the singleton cache manager.
- *
- * @return The singleton cache manager.
- */
- public static PersistenceManager getInstance() {
- if (instance == null) {
- instance = new PersistenceManager();
- }
- return instance;
- }
-
- /**
- * Create a Persistent Manager instance.
- */
- private PersistenceManager() {
- loadTimestamps();
- loadPersistentProperties();
- loadContentTypes();
- }
-
- /**
- * If the node is already considered unresolvable.
- *
- * @param node The file node.
- * @return true if it is not resolvable or else false.
- */
- public boolean isUnresovled(FSTreeNode node) {
- return unresolved.get(node.getLocationURI()) != null;
- }
-
- /**
- * Get the resolved content type of the node.
- *
- * @param node The file node.
- * @return the content type of the node if it is resolvable or null.
- */
- public IContentType getResolved(FSTreeNode node) {
- return resolved.get(node.getLocationURI());
- }
-
- /**
- * Add the node and its content type to the resolved list.
- *
- * @param node The file node.
- * @param contentType Its content type.
- */
- public void addResovled(FSTreeNode node, IContentType contentType) {
- resolved.put(node.getLocationURI(), contentType);
- }
-
- /**
- * Add the node as an unresolvable node.
- *
- * @param node The file node.
- */
- public void addUnresolved(FSTreeNode node) {
- unresolved.put(node.getLocationURI(), node.getLocationURI());
- }
-
- /**
- * If the option of "autosaving" is set to on.
- *
- * @return true if it is auto saving or else false.
- */
- public boolean isAutoSaving() {
- IPreferenceStore preferenceStore = UIPlugin.getDefault().getPreferenceStore();
- boolean autoSaving = preferenceStore
- .getBoolean(PreferencePage.PREF_AUTOSAVING);
- return autoSaving;
- }
-
- /**
- * If the option of "in-place editor" is set to on.
- *
- * @return true if it uses in-place editor when renaming files/folders.
- */
- public boolean isInPlaceEditor() {
- IPreferenceStore preferenceStore = UIPlugin.getDefault().getPreferenceStore();
- boolean autoSaving = preferenceStore
- .getBoolean(PreferencePage.PREF_RENAMING_IN_PLACE_EDITOR);
- return autoSaving;
- }
-
- /**
- * If the option of "copy permissions" is set to on.
- *
- * @return true if it should copy source file permissions.
- */
- public boolean isCopyPermission() {
- IPreferenceStore preferenceStore = UIPlugin.getDefault().getPreferenceStore();
- boolean autoSaving = preferenceStore
- .getBoolean(PreferencePage.PREF_COPY_PERMISSION);
- return autoSaving;
- }
-
- /**
- * If the option of "copy ownership" is set to on.
- *
- * @return true if it should copy source file ownership.
- */
- public boolean isCopyOwnership() {
- IPreferenceStore preferenceStore = UIPlugin.getDefault().getPreferenceStore();
- boolean autoSaving = preferenceStore
- .getBoolean(PreferencePage.PREF_COPY_OWNERSHIP);
- return autoSaving;
- }
-
- /**
- * Load the persistent properties from the persistent file in the cache's root directory.
- */
- private void loadPersistentProperties() {
- IMemento memento = readMemento(PERSISTENT_FILE, PERSISTENT_ROOT);
- properties = Collections.synchronizedMap(new HashMap<URI, Map<QualifiedName, String>>());
- IMemento[] children = memento.getChildren(ELEMENT_FILE);
- if (children != null && children.length > 0) {
- for (IMemento child : children) {
- try {
- String str = child.getString(ATTR_URI);
- URI uri = new URI(str);
- Map<QualifiedName, String> nodeProperties = loadFileProperties(child);
- properties.put(uri, nodeProperties);
- }
- catch (URISyntaxException e) {
- }
- }
- }
- }
-
- /**
- * Load the content type information from the content type file.
- */
- private void loadContentTypes() {
- IMemento memento = readMemento(CONTENT_TYPE_FILE, CONTENT_TYPE_ROOT);
- resolved = Collections.synchronizedMap(new HashMap<URI, IContentType>());
- unresolved = Collections.synchronizedMap(new HashMap<URI, URI>());
- IMemento mResolved = memento.getChild(ELEMENT_RESOLVED);
- if (mResolved != null) {
- IMemento[] children = mResolved.getChildren(ELEMENT_RESOLVABLE);
- if (children != null && children.length > 0) {
- for (IMemento child : children) {
- try {
- String str = child.getString(ATTR_URI);
- URI uri = new URI(str);
- String id = child.getString(ATTR_CONTENT_TYPE);
- IContentType contentType = Platform.getContentTypeManager()
- .getContentType(id);
- if (contentType != null) {
- resolved.put(uri, contentType);
- }
- }
- catch (URISyntaxException e) {
- }
- }
- }
- }
- IMemento mUnresolved = memento.getChild(ELEMENT_UNRESOLVED);
- if (mUnresolved != null) {
- IMemento[] children = mUnresolved.getChildren(ELEMENT_UNRESOLVABLE);
- if (children != null && children.length > 0) {
- for (IMemento child : children) {
- try {
- String str = child.getString(ATTR_URI);
- URI uri = new URI(str);
- unresolved.put(uri, uri);
- }
- catch (URISyntaxException e) {
- }
- }
- }
- }
- }
-
- /**
- * Save the content type information to the content type file.
- */
- private void saveContentTypes() {
- XMLMemento memento = XMLMemento.createWriteRoot(CONTENT_TYPE_ROOT);
- IMemento mResolved = memento.createChild(ELEMENT_RESOLVED);
- for (Entry<URI, IContentType> entry : resolved.entrySet()) {
- IMemento mResolvable = mResolved.createChild(ELEMENT_RESOLVABLE);
- URI key = entry.getKey();
- mResolvable.putString(ATTR_URI, key.toString());
- IContentType iContentType = entry.getValue();
- mResolvable.putString(ATTR_CONTENT_TYPE, iContentType.getId());
- }
- IMemento mUnresolved = memento.createChild(ELEMENT_UNRESOLVED);
- for (Entry<URI, URI> entry : unresolved.entrySet()) {
- IMemento mUnresolvable = mUnresolved.createChild(ELEMENT_UNRESOLVABLE);
- mUnresolvable.putString(ATTR_URI, entry.getKey().toString());
- }
- writeMemento(memento, CONTENT_TYPE_FILE);
- }
-
- /**
- * Load a file's properties from the memento node.
- *
- * @param memento The memento node.
- * @return The properties as a map.
- */
- private Map<QualifiedName, String> loadFileProperties(IMemento memento) {
- Map<QualifiedName, String> properties = Collections
- .synchronizedMap(new HashMap<QualifiedName, String>());
- IMemento[] children = memento.getChildren(ELEMENT_PROPERTY);
- if (children != null && children.length > 0) {
- for (IMemento child : children) {
- String qualifier = child.getString(ATTR_QUALIFIER);
- String localName = child.getString(ATTR_LOCAL_NAME);
- QualifiedName name = new QualifiedName(qualifier, localName);
- String value = child.getString(ATTR_VALUE);
- properties.put(name, value);
- }
- }
- return properties;
- }
-
- /**
- * Read the memento from a memento file using the specified root element name.
- *
- * @param mementoFile The memento file.
- * @param mementoRoot The memento's root element name.
- * @return A memento of this file or an empty memento if the file does not exist.
- */
- private IMemento readMemento(String mementoFile, String mementoRoot) {
- File location = CacheManager.getInstance().getCacheRoot();
- File stateFile = new File(location, mementoFile);
- if (stateFile.exists()) {
- BufferedReader reader = null;
- try {
- FileInputStream input = new FileInputStream(stateFile);
- reader = new BufferedReader(new InputStreamReader(input, "utf-8")); //$NON-NLS-1$
- IMemento memento = XMLMemento.createReadRoot(reader);
- return memento;
- }
- catch (IOException e) {
- }
- catch (WorkbenchException e) {
- }
- finally {
- if (reader != null) {
- try {
- reader.close();
- }
- catch (Exception e) {
- }
- }
- }
- }
- return XMLMemento.createWriteRoot(mementoRoot);
- }
-
- /**
- * Save the time stamps to the persistent file.
- */
- private void savePersistentProperties() {
- XMLMemento memento = XMLMemento.createWriteRoot(PERSISTENT_ROOT);
- for (Entry<URI, Map<QualifiedName, String>> entry : properties.entrySet()) {
- Map<QualifiedName, String> nodeProperties = entry.getValue();
- if (!nodeProperties.isEmpty()) {
- IMemento mFile = memento.createChild(ELEMENT_FILE);
- mFile.putString(ATTR_URI, entry.getKey().toString());
- saveFileProperties(mFile, nodeProperties);
- }
- }
- writeMemento(memento, PERSISTENT_FILE);
- }
-
- /**
- * Save the file's properties to a memento.
- *
- * @param memento The memento object.
- * @param properties The file properties.
- */
- private void saveFileProperties(IMemento memento, Map<QualifiedName, String> properties) {
- for (Entry<QualifiedName, String> entry : properties.entrySet()) {
- QualifiedName name = entry.getKey();
- IMemento mProperty = memento.createChild(ELEMENT_PROPERTY);
- mProperty.putString(ATTR_QUALIFIER, name.getQualifier());
- mProperty.putString(ATTR_LOCAL_NAME, name.getLocalName());
- mProperty.putString(ATTR_VALUE, entry.getValue());
- }
- }
-
- /**
- * Write the memento to a memento file.
- *
- * @param memento The memento object.
- * @param mementoFile The file to write to.
- */
- private void writeMemento(XMLMemento memento, String mementoFile) {
- OutputStreamWriter writer = null;
- try {
- File location = CacheManager.getInstance().getCacheRoot();
- File stateFile = new File(location, mementoFile);
- FileOutputStream stream = new FileOutputStream(stateFile);
- writer = new OutputStreamWriter(stream, "utf-8"); //$NON-NLS-1$
- memento.save(writer);
- }
- catch (IOException e) {
- e.printStackTrace();
- }
- finally {
- if (writer != null) {
- try {
- writer.close();
- }
- catch (IOException e) {
- }
- }
- }
- }
-
- /**
- * Get the file properties of the specified node from the properties map.
- *
- * @param node The file node.
- * @return The file properties object or empty properties object if it does not exist.
- */
- public Map<QualifiedName, String> getPersistentProperties(FSTreeNode node) {
- Map<QualifiedName, String> nodeProperties = properties.get(node.getLocationURI());
- if (nodeProperties == null) {
- nodeProperties = Collections.synchronizedMap(new HashMap<QualifiedName, String>());
- properties.put(node.getLocationURI(), nodeProperties);
- }
- return nodeProperties;
- }
-
- /**
- * Load the time stamps from the time stamps file in the cache's root directory.
- */
- private void loadTimestamps() {
- timestamps = Collections.synchronizedMap(new HashMap<URI, Long>());
- File location = CacheManager.getInstance().getCacheRoot();
- File tsFile = new File(location, TIMESTAMP_FILE);
- if (tsFile.exists()) {
- Properties properties = new Properties();
- InputStream input = null;
- try {
- input = new BufferedInputStream(new FileInputStream(tsFile));
- properties.loadFromXML(input);
- }
- catch (IOException e) {
- e.printStackTrace();
- }
- finally {
- if (input != null) {
- try {
- input.close();
- }
- catch (IOException e) {
- }
- }
- }
- Enumeration<String> keys = (Enumeration<String>) properties.propertyNames();
- while (keys.hasMoreElements()) {
- String key = keys.nextElement();
- String value = properties.getProperty(key);
- long timestamp = 0L;
- try {
- timestamp = Long.parseLong(value);
- timestamps.put(new URI(key), Long.valueOf(timestamp));
- }
- catch (NumberFormatException nfe) {
- }
- catch (URISyntaxException e) {
- }
- }
- }
- }
-
- /**
- * Save the time stamps to the time stamps file.
- */
- private void saveTimestamps() {
- Properties properties = new Properties();
- for (Entry<URI, Long> entry : timestamps.entrySet()) {
- properties.setProperty(entry.getKey().toString(), entry.getValue().toString());
- }
- File location = CacheManager.getInstance().getCacheRoot();
- File fTimestamp = new File(location, TIMESTAMP_FILE);
- OutputStream output = null;
- try {
- output = new BufferedOutputStream(new FileOutputStream(fTimestamp));
- properties.storeToXML(output, null);
- }
- catch (IOException e) {
- e.printStackTrace();
- }
- finally {
- if (output != null) {
- try {
- output.close();
- }
- catch (Exception e) {
- }
- }
- }
- }
-
- /**
- * Set the time stamp of the FSTreeNode with the specified location.
- *
- * @param uri The FSTreeNode's location URI.
- * @param timestamp The new base time stamp to be set.
- */
- public void setBaseTimestamp(URI uri, long timestamp) {
- timestamps.put(uri, Long.valueOf(timestamp));
- }
-
- /**
- * Remove the time stamp entry with the specified URI.
- *
- * @param uri The URI key.
- */
- public void removeBaseTimestamp(URI uri) {
- timestamps.remove(uri);
- }
-
- /**
- * Get the time stamp of the FSTreeNode with the specified location.
- *
- * @param uri The FSTreeNode's location URI.
- * @return The FSTreeNode's base time stamp.
- */
- public long getBaseTimestamp(URI uri) {
- Long timestamp = timestamps.get(uri);
- return timestamp == null ? 0L : timestamp.longValue();
- }
-
- /**
- * Dispose the cache manager so that it has a chance to save the timestamps and the persistent
- * properties.
- */
- public void dispose() {
- saveTimestamps();
- savePersistentProperties();
- saveContentTypes();
- }
-
- /**
- * Returns if or if not the persistence manager needs to be disposed.
- *
- * @return <code>True</code> if the persistence manager needs disposal, <code>false</code> otherwise.
- */
- public final static boolean needsDisposal() {
- return instance != null;
- }
-}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/activator/UIPlugin.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/activator/UIPlugin.java
index 4068fad8e..ed0bb2315 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/activator/UIPlugin.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/activator/UIPlugin.java
@@ -9,33 +9,28 @@
* William Chen (Wind River) - [345387] Open the remote files with a proper editor
* William Chen (Wind River) - [345552] Edit the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.activator;
+package org.eclipse.tcf.te.tcf.filesystem.ui.activator;
import java.net.URL;
-import java.util.Hashtable;
import org.eclipse.core.commands.Command;
import org.eclipse.core.commands.IExecutionListener;
+import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.swt.SWTException;
import org.eclipse.swt.graphics.Image;
-import org.eclipse.tcf.te.tcf.filesystem.internal.ImageConsts;
-import org.eclipse.tcf.te.tcf.filesystem.internal.autosave.SaveAllListener;
-import org.eclipse.tcf.te.tcf.filesystem.internal.autosave.SaveListener;
-import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSClipboard;
-import org.eclipse.tcf.te.tcf.filesystem.internal.url.TcfURLConnection;
-import org.eclipse.tcf.te.tcf.filesystem.internal.url.TcfURLStreamHandlerService;
-import org.eclipse.tcf.te.tcf.filesystem.internal.utils.PersistenceManager;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.ImageConsts;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.autosave.SaveAllListener;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.autosave.SaveListener;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.operations.FsClipboard;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.preferences.PreferencePage;
import org.eclipse.tcf.te.ui.jface.images.AbstractImageDescriptor;
import org.eclipse.ui.IWorkbenchCommandConstants;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.commands.ICommandService;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceRegistration;
-import org.osgi.service.url.URLConstants;
-import org.osgi.service.url.URLStreamHandlerService;
/**
* The activator class controls the plug-in life cycle
@@ -43,14 +38,12 @@ import org.osgi.service.url.URLStreamHandlerService;
public class UIPlugin extends AbstractUIPlugin {
// The shared instance of this plug-in.
private static UIPlugin plugin;
- // The service registration for the "tcf" URL stream handler.
- private ServiceRegistration<?> regURLStreamHandlerService;
// The listener which listens to command "SAVE" and synchronize the local file with the target.
private IExecutionListener saveListener;
// The listener which listens to command "SAVE ALL" and synchronize the local file with the target.
private IExecutionListener saveAllListener;
// The shared instance of Clipboard
- private FSClipboard clipboard;
+ private FsClipboard clipboard;
/**
* The constructor
@@ -84,12 +77,8 @@ public class UIPlugin extends AbstractUIPlugin {
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
- clipboard = new FSClipboard();
+ clipboard = new FsClipboard();
- // Register the "tcf" URL stream handler service.
- Hashtable<String, String[]> properties = new Hashtable<String, String[]>();
- properties.put(URLConstants.URL_HANDLER_PROTOCOL, new String[] { TcfURLConnection.PROTOCOL_SCHEMA });
- regURLStreamHandlerService = context.registerService(URLStreamHandlerService.class.getName(), new TcfURLStreamHandlerService(), properties);
// Add the two execution listeners to command "SAVE" and "SAVE ALL".
ICommandService commandService = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class);
if (commandService != null) {
@@ -105,8 +94,8 @@ public class UIPlugin extends AbstractUIPlugin {
/**
* Get the shared instance of clipboard
*/
- public FSClipboard getClipboard() {
- return clipboard;
+ public static FsClipboard getClipboard() {
+ return plugin.clipboard;
}
/* (non-Javadoc)
@@ -114,12 +103,6 @@ public class UIPlugin extends AbstractUIPlugin {
*/
@Override
public void stop(BundleContext context) throws Exception {
- if (PersistenceManager.needsDisposal()) PersistenceManager.getInstance().dispose();
- if (regURLStreamHandlerService != null) {
- // When URL stream handler service is unregistered, any URL related operation will be invalid.
- regURLStreamHandlerService.unregister();
- regURLStreamHandlerService = null;
- }
// Remove the two execution listeners.
ICommandService commandService = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class);
if (commandService != null) {
@@ -212,4 +195,48 @@ public class UIPlugin extends AbstractUIPlugin {
return image;
}
+
+ /**
+ * If the option of "autosaving" is set to on.
+ *
+ * @return true if it is auto saving or else false.
+ */
+ public static boolean isAutoSaving() {
+ IPreferenceStore preferenceStore = getDefault().getPreferenceStore();
+ boolean autoSaving = preferenceStore.getBoolean(PreferencePage.PREF_AUTOSAVING);
+ return autoSaving;
+ }
+
+ /**
+ * If the option of "in-place editor" is set to on.
+ *
+ * @return true if it uses in-place editor when renaming files/folders.
+ */
+ public static boolean isInPlaceEditor() {
+ IPreferenceStore preferenceStore = getDefault().getPreferenceStore();
+ boolean inPlaceEditor = preferenceStore.getBoolean(PreferencePage.PREF_RENAMING_IN_PLACE_EDITOR);
+ return inPlaceEditor;
+ }
+
+ /**
+ * If the option of "copy permissions" is set to on.
+ *
+ * @return true if it should copy source file permissions.
+ */
+ public static boolean isCopyPermission() {
+ IPreferenceStore preferenceStore = getDefault().getPreferenceStore();
+ boolean copyPermission = preferenceStore.getBoolean(PreferencePage.PREF_COPY_PERMISSION);
+ return copyPermission;
+ }
+
+ /**
+ * If the option of "copy ownership" is set to on.
+ *
+ * @return true if it should copy source file ownership.
+ */
+ public static boolean isCopyOwnership() {
+ IPreferenceStore preferenceStore = getDefault().getPreferenceStore();
+ boolean copyOwnership = preferenceStore.getBoolean(PreferencePage.PREF_COPY_OWNERSHIP);
+ return copyOwnership;
+ }
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/controls/FSNavigatorContentProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/controls/FSNavigatorContentProvider.java
index a5165e277..f4954f236 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/controls/FSNavigatorContentProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/controls/FSNavigatorContentProvider.java
@@ -7,14 +7,14 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.controls;
+package org.eclipse.tcf.te.tcf.filesystem.ui.controls;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSModel;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSModel;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.activator.UIPlugin;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
import org.eclipse.tcf.te.ui.trees.TreeContentProvider;
@@ -43,8 +43,8 @@ public class FSNavigatorContentProvider extends TreeContentProvider {
@Override
public void inputChanged(final Viewer viewer, Object oldInput, Object newInput) {
super.inputChanged(viewer, oldInput, newInput);
+ UIPlugin.getClipboard().addPropertyChangeListener(commonViewerListener);
UIPlugin plugin = UIPlugin.getDefault();
- plugin.getClipboard().addPropertyChangeListener(commonViewerListener);
IPreferenceStore preferenceStore = plugin.getPreferenceStore();
preferenceStore.addPropertyChangeListener(commonViewerListener);
}
@@ -55,8 +55,8 @@ public class FSNavigatorContentProvider extends TreeContentProvider {
*/
@Override
public void dispose() {
+ UIPlugin.getClipboard().removePropertyChangeListener(commonViewerListener);
UIPlugin plugin = UIPlugin.getDefault();
- plugin.getClipboard().removePropertyChangeListener(commonViewerListener);
IPreferenceStore preferenceStore = plugin.getPreferenceStore();
preferenceStore.removePropertyChangeListener(commonViewerListener);
super.dispose();
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/controls/FSTreeContentProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/controls/FSTreeContentProvider.java
index 3a61b0161..9f4288ee3 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/controls/FSTreeContentProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/controls/FSTreeContentProvider.java
@@ -7,9 +7,9 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.controls;
+package org.eclipse.tcf.te.tcf.filesystem.ui.controls;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/controls/FSTreeViewerSorter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/controls/FSTreeViewerSorter.java
index d0fe29a6e..b58011b40 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/controls/FSTreeViewerSorter.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/controls/FSTreeViewerSorter.java
@@ -7,12 +7,12 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.controls;
+package org.eclipse.tcf.te.tcf.filesystem.ui.controls;
import org.eclipse.jface.viewers.TreePathViewerSorter;
import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.tcf.te.tcf.filesystem.internal.columns.FSTreeElementComparator;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.columns.FSTreeElementComparator;
/**
* File system tree control viewer sorter implementation.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/dialogs/FSFolderSelectionDialog.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/dialogs/FSFolderSelectionDialog.java
index 3cc6b5980..ed9dd296f 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/dialogs/FSFolderSelectionDialog.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/dialogs/FSFolderSelectionDialog.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.dialogs;
+package org.eclipse.tcf.te.tcf.filesystem.ui.dialogs;
import java.util.List;
@@ -22,14 +22,14 @@ import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
-import org.eclipse.tcf.te.tcf.filesystem.controls.FSTreeContentProvider;
-import org.eclipse.tcf.te.tcf.filesystem.controls.FSTreeViewerSorter;
-import org.eclipse.tcf.te.tcf.filesystem.interfaces.IFSConstants;
-import org.eclipse.tcf.te.tcf.filesystem.internal.columns.FSTreeElementLabelProvider;
-import org.eclipse.tcf.te.tcf.filesystem.internal.handlers.MoveFilesHandler;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.ui.controls.FSTreeContentProvider;
+import org.eclipse.tcf.te.tcf.filesystem.ui.controls.FSTreeViewerSorter;
+import org.eclipse.tcf.te.tcf.filesystem.ui.interfaces.IFSConstants;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.columns.FSTreeElementLabelProvider;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.handlers.MoveFilesHandler;
+import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
import org.eclipse.tcf.te.ui.trees.FilterDescriptor;
import org.eclipse.tcf.te.ui.trees.ViewerStateManager;
import org.eclipse.ui.IDecoratorManager;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/dialogs/FSOpenFileDialog.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/dialogs/FSOpenFileDialog.java
index abf8f5c0e..89004bbf2 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/dialogs/FSOpenFileDialog.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/dialogs/FSOpenFileDialog.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.dialogs;
+package org.eclipse.tcf.te.tcf.filesystem.ui.dialogs;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
@@ -18,13 +18,13 @@ import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
-import org.eclipse.tcf.te.tcf.filesystem.controls.FSTreeContentProvider;
-import org.eclipse.tcf.te.tcf.filesystem.controls.FSTreeViewerSorter;
-import org.eclipse.tcf.te.tcf.filesystem.interfaces.IFSConstants;
-import org.eclipse.tcf.te.tcf.filesystem.internal.columns.FSTreeElementLabelProvider;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.ui.controls.FSTreeContentProvider;
+import org.eclipse.tcf.te.tcf.filesystem.ui.controls.FSTreeViewerSorter;
+import org.eclipse.tcf.te.tcf.filesystem.ui.interfaces.IFSConstants;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.columns.FSTreeElementLabelProvider;
+import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
import org.eclipse.tcf.te.ui.trees.FilterDescriptor;
import org.eclipse.tcf.te.ui.trees.ViewerStateManager;
import org.eclipse.ui.IDecoratorManager;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/dialogs/TimeTriggeredProgressMonitorDialog.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/dialogs/TimeTriggeredProgressMonitorDialog.java
index 9a880c534..cc2547980 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/dialogs/TimeTriggeredProgressMonitorDialog.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/dialogs/TimeTriggeredProgressMonitorDialog.java
@@ -8,7 +8,7 @@
* Contributors:
* IBM - Initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.dialogs;
+package org.eclipse.tcf.te.tcf.filesystem.ui.dialogs;
import java.lang.reflect.InvocationTargetException;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/filters/HiddenFilesViewerFilter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/filters/HiddenFilesViewerFilter.java
index 955878049..18c299ccf 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/filters/HiddenFilesViewerFilter.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/filters/HiddenFilesViewerFilter.java
@@ -7,11 +7,11 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.filters;
+package org.eclipse.tcf.te.tcf.filesystem.ui.filters;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
/**
* A filter implementation filtering hidden files or directories.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/filters/SystemFilesViewerFilter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/filters/SystemFilesViewerFilter.java
index 8f9c9f640..bb15d12c9 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/filters/SystemFilesViewerFilter.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/filters/SystemFilesViewerFilter.java
@@ -7,11 +7,11 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.filters;
+package org.eclipse.tcf.te.tcf.filesystem.ui.filters;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
/**
* A filter implementation filtering system files or directories.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/help/IContextHelpIds.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/help/IContextHelpIds.java
index ba3b7714b..6e5ed32d5 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/help/IContextHelpIds.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/help/IContextHelpIds.java
@@ -7,9 +7,9 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.help;
+package org.eclipse.tcf.te.tcf.filesystem.ui.help;
-import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.ui.activator.UIPlugin;
/**
* Plugin context help id definitions.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/interfaces/IFSConstants.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/interfaces/IFSConstants.java
index b5a568530..33c9f988e 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/interfaces/IFSConstants.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/interfaces/IFSConstants.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.interfaces;
+package org.eclipse.tcf.te.tcf.filesystem.ui.interfaces;
/**
* UIConstants for file system.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/interfaces/preferences/IPreferenceKeys.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/interfaces/preferences/IPreferenceKeys.java
index 3cc898f7f..69792d607 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/interfaces/preferences/IPreferenceKeys.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/interfaces/preferences/IPreferenceKeys.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.interfaces.preferences;
+package org.eclipse.tcf.te.tcf.filesystem.ui.interfaces.preferences;
/**
* The bundle's preference key identifiers.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/ImageConsts.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/ImageConsts.java
index 65a24fc1e..66b80e311 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/ImageConsts.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/ImageConsts.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal;
/**
* File system plug-in Image registry constants.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/adapters/DeleteHandlerDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/adapters/DeleteHandlerDelegate.java
new file mode 100644
index 000000000..e1e664630
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/adapters/DeleteHandlerDelegate.java
@@ -0,0 +1,182 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.adapters;
+
+import java.util.List;
+import java.util.UUID;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
+import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.tcf.filesystem.core.interfaces.IConfirmCallback;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.OpDelete;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.ImageConsts;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.operations.IOpExecutor;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.operations.UiExecutor;
+import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
+import org.eclipse.tcf.te.ui.views.interfaces.handler.IDeleteHandlerDelegate;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * File System tree node delete handler delegate implementation.
+ */
+public class DeleteHandlerDelegate implements IDeleteHandlerDelegate {
+
+ // The key to access the selection in the state.
+ private static final String KEY_SELECTION = "selection"; //$NON-NLS-1$
+ // The key to access the processed state in the state.
+ private static final String KEY_PROCESSED = "processed"; //$NON-NLS-1$
+ // The deletion confirmation callback
+ private IConfirmCallback confirmCallback;
+ // The confirmation call for read only files.
+ private IConfirmCallback readonlyCallback;
+
+ /**
+ * Constructor
+ */
+ public DeleteHandlerDelegate() {
+ confirmCallback = new DeletionConfirmCallback();
+ readonlyCallback = new ReadOnlyConfirmCallback();
+ }
+
+ /**
+ * Set the confirmation callback
+ *
+ * @param confirmCallback The confirmation callback
+ */
+ public void setConfirmCallback(IConfirmCallback confirmCallback) {
+ this.confirmCallback = confirmCallback;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.interfaces.handler.IDeleteHandlerDelegate#canDelete(java.lang.Object)
+ */
+ @Override
+ public boolean canDelete(Object element) {
+ if (element instanceof FSTreeNode) {
+ FSTreeNode node = (FSTreeNode) element;
+ if (!node.isSystemRoot() && !node.isRoot()) {
+ return node.isWindowsNode() && !node.isReadOnly()
+ || !node.isWindowsNode() && node.isWritable();
+ }
+ }
+ return false;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.ui.views.interfaces.handler.IDeleteHandlerDelegate#delete(java.lang.Object, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.tcf.te.runtime.interfaces.callback.ICallback)
+ */
+ @Override
+ public void delete(Object element, IPropertiesContainer state, ICallback callback) {
+ Assert.isNotNull(element);
+ Assert.isNotNull(state);
+
+ UUID lastProcessed = (UUID) state.getProperty(KEY_PROCESSED);
+ if (lastProcessed == null || !lastProcessed.equals(state.getUUID())) {
+ state.setProperty(KEY_PROCESSED, state.getUUID());
+ if(confirmCallback != null) {
+ IStructuredSelection selection = (IStructuredSelection) state.getProperty(KEY_SELECTION);
+ if(!confirmCallback.requires(selection) || confirmCallback.confirms(selection) == IConfirmCallback.YES) {
+ List<FSTreeNode> nodes = selection.toList();
+ IOpExecutor executor = new UiExecutor(Messages.FSDelete_Deleting, callback);
+ executor.execute(new OpDelete(nodes, readonlyCallback));
+ }
+ }
+ }
+ }
+
+ static class ReadOnlyConfirmCallback implements IConfirmCallback {
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.filesystem.core.interfaces.IConfirmCallback#requires(java.lang.Object)
+ */
+ @Override
+ public boolean requires(Object object) {
+ if(object instanceof FSTreeNode) {
+ FSTreeNode node = (FSTreeNode) object;
+ return node.isWindowsNode() && node.isReadOnly() || !node.isWindowsNode() && !node.isWritable();
+ }
+ return false;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.filesystem.core.interfaces.IConfirmCallback#confirms(java.lang.Object)
+ */
+ @Override
+ public int confirms(Object object) {
+ final FSTreeNode node = (FSTreeNode) object;
+ final int[] results = new int[1];
+ Display display = PlatformUI.getWorkbench().getDisplay();
+ display.syncExec(new Runnable() {
+ @Override
+ public void run() {
+ Shell parent = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
+ String title = Messages.FSDelete_ConfirmDelete;
+ String message = NLS.bind(Messages.FSDelete_ConfirmMessage, node.name);
+ final Image titleImage = UIPlugin.getImage(ImageConsts.DELETE_READONLY_CONFIRM);
+ MessageDialog qDialog = new MessageDialog(parent, title, null, message, MessageDialog.QUESTION, new String[] { Messages.FSDelete_ButtonYes, Messages.FSDelete_ButtonYes2All, Messages.FSDelete_ButtonNo, Messages.FSDelete_ButtonCancel }, 0) {
+ @Override
+ public Image getQuestionImage() {
+ return titleImage;
+ }
+ };
+ results[0] = qDialog.open();
+ }
+ });
+ return results[0];
+ }
+
+ }
+
+ static class DeletionConfirmCallback implements IConfirmCallback {
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.filesystem.core.interfaces.IConfirmCallback#requires(java.lang.Object)
+ */
+ @Override
+ public boolean requires(Object object) {
+ return true;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.filesystem.interfaces.IConfirmCallback#confirms(java.lang.Object)
+ */
+ @Override
+ public int confirms(Object object) {
+ IStructuredSelection selection = (IStructuredSelection) object;
+ List<FSTreeNode> nodes = selection.toList();
+ String question;
+ if (nodes.size() == 1) {
+ FSTreeNode node = nodes.get(0);
+ question = NLS.bind(Messages.DeleteFilesHandler_DeleteOneFileConfirmation, node.name);
+ }
+ else {
+ question = NLS.bind(Messages.DeleteFilesHandler_DeleteMultipleFilesConfirmation, Integer.valueOf(nodes.size()));
+ }
+ Shell parent = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
+ if (MessageDialog.openQuestion(parent, Messages.DeleteFilesHandler_ConfirmDialogTitle, question)) {
+ return IConfirmCallback.YES;
+ }
+ return IConfirmCallback.NO;
+ }
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/adapters/FSTreeNodeAdapterFactory.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/adapters/FSTreeNodeAdapterFactory.java
index 65f7ee7c2..a498c8357 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/adapters/FSTreeNodeAdapterFactory.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/adapters/FSTreeNodeAdapterFactory.java
@@ -8,7 +8,7 @@
* Wind River Systems - initial API and implementation
* William Chen (Wind River)- [345552] Edit the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.adapters;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.adapters;
import java.util.Collections;
import java.util.HashMap;
@@ -16,8 +16,8 @@ import java.util.Map;
import org.eclipse.core.runtime.IAdapterFactory;
import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.tcf.te.tcf.filesystem.internal.columns.FSTreeElementLabelProvider;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.columns.FSTreeElementLabelProvider;
import org.eclipse.tcf.te.ui.views.interfaces.handler.IDeleteHandlerDelegate;
import org.eclipse.tcf.te.ui.views.interfaces.handler.IRefreshHandlerDelegate;
import org.eclipse.ui.IActionFilter;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/adapters/NodeStateFilter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/adapters/NodeStateFilter.java
index 51ddc113e..b263de90f 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/adapters/NodeStateFilter.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/adapters/NodeStateFilter.java
@@ -8,17 +8,16 @@
* Wind River Systems - initial API and implementation
* William Chen (Wind River)- [345552] Edit the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.adapters;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.adapters;
import java.util.List;
import org.eclipse.core.runtime.Assert;
-import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
-import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSClipboard;
-import org.eclipse.tcf.te.tcf.filesystem.internal.utils.PersistenceManager;
-import org.eclipse.tcf.te.tcf.filesystem.internal.utils.StateManager;
-import org.eclipse.tcf.te.tcf.filesystem.model.CacheState;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.OpClipboard;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.utils.StateManager;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.CacheState;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.activator.UIPlugin;
import org.eclipse.ui.IActionFilter;
/**
@@ -45,7 +44,7 @@ public class NodeStateFilter implements IActionFilter {
@Override
public boolean testAttribute(Object target, String name, String value) {
if (name.equals("cache.state") && node.isFile()) { //$NON-NLS-1$
- if(PersistenceManager.getInstance().isAutoSaving())
+ if(UIPlugin.isAutoSaving())
return false;
CacheState state = StateManager.getInstance().getCacheState(node);
if (value == null)
@@ -53,10 +52,9 @@ public class NodeStateFilter implements IActionFilter {
return value.equals(state.name());
}
else if (name.equals("edit.cut")) { //$NON-NLS-1$
- FSClipboard cb = UIPlugin.getDefault().getClipboard();
+ OpClipboard cb = UIPlugin.getClipboard();
if (!cb.isEmpty()) {
- int operation = cb.getOperation();
- if (operation == FSClipboard.CUT) {
+ if (cb.isCutOp()) {
List<FSTreeNode> files = cb.getFiles();
for (FSTreeNode file : files) {
if (node == file) return true;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/adapters/PeerModelViewerInput.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/adapters/PeerModelViewerInput.java
index e88f086fd..2131c2847 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/adapters/PeerModelViewerInput.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/adapters/PeerModelViewerInput.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.adapters;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.adapters;
import org.eclipse.tcf.te.core.interfaces.IViewerInput;
import org.eclipse.tcf.te.core.utils.PropertyChangeProvider;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/adapters/RefreshHandlerDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/adapters/RefreshHandlerDelegate.java
index 715fc72c9..dd5f5a5f8 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/adapters/RefreshHandlerDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/adapters/RefreshHandlerDelegate.java
@@ -7,20 +7,22 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.adapters;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.adapters;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
-import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
-import org.eclipse.tcf.te.tcf.filesystem.internal.exceptions.TCFException;
-import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSRefresh;
-import org.eclipse.tcf.te.tcf.filesystem.internal.utils.PersistenceManager;
-import org.eclipse.tcf.te.tcf.filesystem.internal.utils.StateManager;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.exceptions.TCFException;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.OpRefresh;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.utils.StateManager;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.operations.JobExecutor;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.operations.IOpExecutor;
+import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
import org.eclipse.tcf.te.ui.views.interfaces.handler.IRefreshHandlerDelegate;
/**
@@ -36,7 +38,7 @@ public class RefreshHandlerDelegate implements IRefreshHandlerDelegate {
if (element instanceof FSTreeNode) {
FSTreeNode node = (FSTreeNode) element;
return node.isSystemRoot() || node.isRoot() || node.isDirectory()
- || node.isFile() && !PersistenceManager.getInstance().isAutoSaving();
+ || node.isFile() && !UIPlugin.isAutoSaving();
}
return false;
}
@@ -52,10 +54,10 @@ public class RefreshHandlerDelegate implements IRefreshHandlerDelegate {
if (canRefresh(element)) {
FSTreeNode node = (FSTreeNode) element;
if (node.isSystemRoot() || node.isRoot() || node.isDirectory()) {
- FSRefresh refresh = new FSRefresh(node, callback);
- refresh.doit();
+ IOpExecutor executor = new JobExecutor(NLS.bind(Messages.RefreshDirectoryHandler_RefreshJobTitle, node.name), callback);
+ executor.execute(new OpRefresh(node));
}
- else if (node.isFile() && !PersistenceManager.getInstance().isAutoSaving()) {
+ else if (node.isFile() && !UIPlugin.isAutoSaving()) {
IStatus status = Status.OK_STATUS;
try {
StateManager.getInstance().refreshState(node);
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/adapters/ViewerInputAdapterFactory.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/adapters/ViewerInputAdapterFactory.java
index 8ef09aee4..8da22cdc4 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/adapters/ViewerInputAdapterFactory.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/adapters/ViewerInputAdapterFactory.java
@@ -7,14 +7,14 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.adapters;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.adapters;
import java.util.concurrent.atomic.AtomicReference;
import org.eclipse.core.runtime.IAdapterFactory;
import org.eclipse.tcf.protocol.Protocol;
import org.eclipse.tcf.te.core.interfaces.IViewerInput;
-import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.ui.activator.UIPlugin;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
/**
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/autosave/SaveAllListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/autosave/SaveAllListener.java
index cd8f32100..448073d60 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/autosave/SaveAllListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/autosave/SaveAllListener.java
@@ -7,7 +7,7 @@
* Contributors:
* William Chen (Wind River) - [345552] Edit the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.autosave;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.autosave;
import java.io.File;
import java.net.URI;
@@ -24,11 +24,14 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.SafeRunner;
import org.eclipse.jface.util.SafeRunnable;
-import org.eclipse.tcf.te.tcf.filesystem.internal.utils.CacheManager;
-import org.eclipse.tcf.te.tcf.filesystem.internal.utils.PersistenceManager;
-import org.eclipse.tcf.te.tcf.filesystem.internal.utils.StateManager;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSModel;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.OpCacheCommit;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.utils.StateManager;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSModel;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.operations.IOpExecutor;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.operations.UiExecutor;
+import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IURIEditorInput;
@@ -55,8 +58,10 @@ public class SaveAllListener implements IExecutionListener {
@Override
public void postExecuteSuccess(String commandId, Object returnValue) {
if (!fDirtyNodes.isEmpty()) {
- if (PersistenceManager.getInstance().isAutoSaving()) {
- CacheManager.getInstance().upload(fDirtyNodes.toArray(new FSTreeNode[fDirtyNodes.size()]), false);
+ if (UIPlugin.isAutoSaving()) {
+ FSTreeNode[] nodes = fDirtyNodes.toArray(new FSTreeNode[fDirtyNodes.size()]);
+ IOpExecutor executor = new UiExecutor(Messages.CacheManager_UploadingProgress);
+ executor.execute(new OpCacheCommit(nodes, false));
}
else {
SafeRunner.run(new SafeRunnable(){
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/autosave/SaveListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/autosave/SaveListener.java
index b2a3f8102..9fc3ddfef 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/autosave/SaveListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/autosave/SaveListener.java
@@ -7,7 +7,7 @@
* Contributors:
* William Chen (Wind River) - [345552] Edit the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.autosave;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.autosave;
import java.io.File;
import java.net.URI;
@@ -22,11 +22,14 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.SafeRunner;
import org.eclipse.jface.util.SafeRunnable;
-import org.eclipse.tcf.te.tcf.filesystem.internal.utils.CacheManager;
-import org.eclipse.tcf.te.tcf.filesystem.internal.utils.PersistenceManager;
-import org.eclipse.tcf.te.tcf.filesystem.internal.utils.StateManager;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSModel;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.OpCacheCommit;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.utils.StateManager;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSModel;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.operations.IOpExecutor;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.operations.UiExecutor;
+import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IURIEditorInput;
import org.eclipse.ui.handlers.HandlerUtil;
@@ -51,8 +54,9 @@ public class SaveListener implements IExecutionListener {
@Override
public void postExecuteSuccess(String commandId, Object returnValue) {
if (dirtyNode != null) {
- if (PersistenceManager.getInstance().isAutoSaving()) {
- CacheManager.getInstance().upload(new FSTreeNode[]{dirtyNode}, false);
+ if (UIPlugin.isAutoSaving()) {
+ IOpExecutor executor = new UiExecutor(Messages.CacheManager_UploadingProgress);
+ executor.execute(new OpCacheCommit(new FSTreeNode[]{dirtyNode}, false));
}
else {
SafeRunner.run(new SafeRunnable(){
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/celleditor/FSCellListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/celleditor/FSCellListener.java
index 3d40a3d55..2d3fbfabb 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/celleditor/FSCellListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/celleditor/FSCellListener.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.celleditor;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.celleditor;
import org.eclipse.jface.viewers.ICellEditorListener;
import org.eclipse.jface.viewers.TextCellEditor;
@@ -15,8 +15,8 @@ import org.eclipse.jface.window.DefaultToolTip;
import org.eclipse.jface.window.ToolTip;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Control;
-import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
-import org.eclipse.tcf.te.tcf.filesystem.internal.ImageConsts;
+import org.eclipse.tcf.te.tcf.filesystem.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.ImageConsts;
/**
* FSCellListener is an <code>ICellEditorListener</code> that listens to the modification event and displays
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/celleditor/FSCellModifier.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/celleditor/FSCellModifier.java
index 3a8c56b0d..3ee3d5d29 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/celleditor/FSCellModifier.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/celleditor/FSCellModifier.java
@@ -7,13 +7,17 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.celleditor;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.celleditor;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.viewers.ICellModifier;
import org.eclipse.swt.widgets.Item;
-import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSRename;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.OpRename;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.handlers.RenameCallback;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.operations.JobExecutor;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.operations.IOpExecutor;
+import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
/**
* FSCellModifier is an <code>ICellModifier</code> of the file system tree of the target explorer.
@@ -79,8 +83,8 @@ public class FSCellModifier implements ICellModifier {
Assert.isTrue(value != null && value instanceof String);
String newName = (String) value;
// Rename the node with the new name using an FSRename.
- FSRename op = new FSRename(node, newName);
- op.doit();
+ IOpExecutor executor = new JobExecutor(Messages.FSRename_JobTitle, new RenameCallback());
+ executor.execute(new OpRename(node, newName));
}
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/celleditor/FSCellValidator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/celleditor/FSCellValidator.java
index 4e105a7af..902efa7db 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/celleditor/FSCellValidator.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/celleditor/FSCellValidator.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.celleditor;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.celleditor;
import java.util.List;
@@ -15,8 +15,8 @@ import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.viewers.ICellEditorValidator;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
/**
* FSCellValidator is an <code>ICellEditorValidator</code> that validates the name input in the file system
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/celleditor/FSViewerCellEditorFactory.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/celleditor/FSViewerCellEditorFactory.java
index 81a28bb19..67d84f867 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/celleditor/FSViewerCellEditorFactory.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/celleditor/FSViewerCellEditorFactory.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.celleditor;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.celleditor;
import org.eclipse.jface.viewers.CellEditor;
import org.eclipse.jface.viewers.ICellModifier;
@@ -17,7 +17,7 @@ import org.eclipse.swt.SWT;
import org.eclipse.swt.events.FocusEvent;
import org.eclipse.swt.events.FocusListener;
import org.eclipse.swt.widgets.Tree;
-import org.eclipse.tcf.te.tcf.filesystem.internal.handlers.RenameFilesHandler;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.handlers.RenameFilesHandler;
import org.eclipse.tcf.te.ui.interfaces.IViewerCellEditorFactory;
/**
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/AccessTimeComparator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/AccessTimeComparator.java
index 7b9453c85..093a6bfa8 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/AccessTimeComparator.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/AccessTimeComparator.java
@@ -7,9 +7,9 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.columns;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.columns;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
/**
* The comparator for the tree column "Date Accessed".
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/AccessTimeLabelProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/AccessTimeLabelProvider.java
index 5761eb328..7b2be11ef 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/AccessTimeLabelProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/AccessTimeLabelProvider.java
@@ -7,13 +7,13 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.columns;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.columns;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
/**
* The label provider for the tree column "Date Accessed".
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/CacheFileImageUpdater.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/CacheFileImageUpdater.java
index cba035c21..cef5820ba 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/CacheFileImageUpdater.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/CacheFileImageUpdater.java
@@ -7,12 +7,12 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.columns;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.columns;
import java.io.File;
-import org.eclipse.tcf.te.tcf.filesystem.internal.utils.CacheManager;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.utils.CacheManager;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
/**
* The image update adapter that updates the images of the file which
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/DefaultImageProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/DefaultImageProvider.java
index 9538d5e79..a727db640 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/DefaultImageProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/DefaultImageProvider.java
@@ -7,13 +7,13 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.columns;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.columns;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.graphics.Image;
-import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
-import org.eclipse.tcf.te.tcf.filesystem.internal.ImageConsts;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.ImageConsts;
import org.eclipse.ui.IEditorRegistry;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/FSTreeElementComparator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/FSTreeElementComparator.java
index 36b574369..dbecb7f4f 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/FSTreeElementComparator.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/FSTreeElementComparator.java
@@ -7,9 +7,9 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.columns;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.columns;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
/**
* The comparator for the tree column "name".
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/FSTreeElementLabelProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/FSTreeElementLabelProvider.java
index ca4e53415..73a09043d 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/FSTreeElementLabelProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/FSTreeElementLabelProvider.java
@@ -7,12 +7,12 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.columns;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.columns;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.swt.graphics.Image;
import org.eclipse.tcf.te.runtime.utils.Host;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
/**
* The label provider for the tree column "name".
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/FSTreeNodeComparator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/FSTreeNodeComparator.java
index bc04ed5ea..82c803de4 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/FSTreeNodeComparator.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/FSTreeNodeComparator.java
@@ -7,12 +7,12 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.columns;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.columns;
import java.io.Serializable;
import java.util.Comparator;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
/**
* The base comparator for all the file system tree column.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/FileExtBasedImageUpdater.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/FileExtBasedImageUpdater.java
index e45f274bf..ca1e56f75 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/FileExtBasedImageUpdater.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/FileExtBasedImageUpdater.java
@@ -7,12 +7,12 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.columns;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.columns;
import java.io.File;
import java.io.IOException;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
/**
* The image update adapter that updates the images of the file which does
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/FileTypeComparator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/FileTypeComparator.java
index de7da2360..c7c341e0d 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/FileTypeComparator.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/FileTypeComparator.java
@@ -7,9 +7,9 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.columns;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.columns;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
/**
* The comparator for the tree column "type".
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/FileTypeLabelProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/FileTypeLabelProvider.java
index 38ce8bdd8..30d7d64ce 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/FileTypeLabelProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/FileTypeLabelProvider.java
@@ -7,10 +7,10 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.columns;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.columns;
import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
/**
* The label provider for the tree column "type".
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/ImageProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/ImageProvider.java
index 2d37eeda8..d345d9b8a 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/ImageProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/ImageProvider.java
@@ -7,10 +7,10 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.columns;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.columns;
import org.eclipse.swt.graphics.Image;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
/**
* An image provider provides platform specific images for each files/folders.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/ImageUpdateAdapter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/ImageUpdateAdapter.java
index 810de263d..4855e49c6 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/ImageUpdateAdapter.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/ImageUpdateAdapter.java
@@ -7,11 +7,11 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.columns;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.columns;
import java.io.File;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
/**
* The interface to adapt the process of providing the image for two kinds of
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/LabelProviderUpdateDaemon.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/LabelProviderUpdateDaemon.java
index 33af27a53..d2fe740dc 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/LabelProviderUpdateDaemon.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/LabelProviderUpdateDaemon.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.columns;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.columns;
import java.awt.Component;
import java.awt.Graphics;
@@ -29,9 +29,9 @@ import org.eclipse.core.runtime.SafeRunner;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.graphics.Image;
import org.eclipse.tcf.te.core.interfaces.IViewerInput;
-import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
-import org.eclipse.tcf.te.tcf.filesystem.internal.utils.CacheManager;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.utils.CacheManager;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.activator.UIPlugin;
/**
* The background daemon that updates the images of the file system using
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/ModificationTimeComparator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/ModificationTimeComparator.java
index 75c7e1e46..c04f36320 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/ModificationTimeComparator.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/ModificationTimeComparator.java
@@ -7,9 +7,9 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.columns;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.columns;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
/**
* The comparator for the tree column "Date Modified".
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/ModificationTimeLabelProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/ModificationTimeLabelProvider.java
index 25c1687bd..0180e1eb1 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/ModificationTimeLabelProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/ModificationTimeLabelProvider.java
@@ -7,13 +7,13 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.columns;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.columns;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
/**
* The label provider for the tree column "Date Modified".
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/SizeComparator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/SizeComparator.java
index c786836da..adbc140c3 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/SizeComparator.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/SizeComparator.java
@@ -7,9 +7,9 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.columns;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.columns;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
/**
* The comparator for the tree column "size".
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/SizeLabelProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/SizeLabelProvider.java
index fe18a12dd..848516c5b 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/SizeLabelProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/SizeLabelProvider.java
@@ -7,12 +7,12 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.columns;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.columns;
import java.text.DecimalFormat;
import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
/**
* The label provider for the tree column "size".
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/WindowsImageProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/WindowsImageProvider.java
index c8f652a30..227b57413 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/columns/WindowsImageProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/columns/WindowsImageProvider.java
@@ -7,10 +7,10 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.columns;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.columns;
import org.eclipse.swt.graphics.Image;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
/**
* Windows specific image provider extending the default image provider
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/EditableSharedDocumentAdapter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/compare/EditableSharedDocumentAdapter.java
index e6bd99e3f..0b59e7402 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/EditableSharedDocumentAdapter.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/compare/EditableSharedDocumentAdapter.java
@@ -8,7 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.compare;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.compare;
import org.eclipse.compare.SharedDocumentAdapter;
import org.eclipse.core.runtime.CoreException;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/LocalFileSaveable.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/compare/LocalFileSaveable.java
index dae76ab1d..d80d5c153 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/LocalFileSaveable.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/compare/LocalFileSaveable.java
@@ -8,7 +8,7 @@
* Wind River Systems - initial API and implementation
* William Chen (Wind River)- [345552] Edit the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.compare;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.compare;
import org.eclipse.compare.CompareEditorInput;
import org.eclipse.compare.ICompareContainer;
@@ -30,9 +30,12 @@ import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.jface.util.SafeRunnable;
import org.eclipse.swt.graphics.Image;
-import org.eclipse.tcf.te.tcf.filesystem.internal.compare.EditableSharedDocumentAdapter.ISharedDocumentAdapterListener;
-import org.eclipse.tcf.te.tcf.filesystem.internal.utils.CacheManager;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.OpCacheCommit;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.compare.EditableSharedDocumentAdapter.ISharedDocumentAdapterListener;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.operations.IOpExecutor;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.operations.UiExecutor;
+import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IPropertyListener;
import org.eclipse.ui.ISaveablesLifecycleListener;
@@ -132,7 +135,8 @@ public class LocalFileSaveable extends Saveable implements
monitor.done();
//Trigger upload action
FSTreeNode node = fileElement.getFSTreeNode();
- CacheManager.getInstance().upload(new FSTreeNode[]{node}, true);
+ IOpExecutor executor = new UiExecutor(Messages.CacheManager_UploadingProgress);
+ executor.execute(new OpCacheCommit(new FSTreeNode[]{node}, true));
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/LocalTypedElement.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/compare/LocalTypedElement.java
index 8c8c09a0a..af6805e74 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/LocalTypedElement.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/compare/LocalTypedElement.java
@@ -8,7 +8,7 @@
* Wind River Systems - initial API and implementation
* William Chen (Wind River)- [345552] Edit the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.compare;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.compare;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
@@ -31,11 +31,11 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
-import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
-import org.eclipse.tcf.te.tcf.filesystem.internal.compare.EditableSharedDocumentAdapter.ISharedDocumentAdapterListener;
-import org.eclipse.tcf.te.tcf.filesystem.internal.utils.CacheManager;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.utils.CacheManager;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.compare.EditableSharedDocumentAdapter.ISharedDocumentAdapterListener;
+import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.ide.FileStoreEditorInput;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/MergeEditorInput.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/compare/MergeEditorInput.java
index f4c35d586..cb2ce82d9 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/MergeEditorInput.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/compare/MergeEditorInput.java
@@ -8,7 +8,7 @@
* Wind River Systems - initial API and implementation
* William Chen (Wind River)- [345552] Edit the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.compare;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.compare;
import java.lang.reflect.InvocationTargetException;
@@ -34,9 +34,9 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
-import org.eclipse.tcf.te.tcf.filesystem.internal.ImageConsts;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.filesystem.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.ImageConsts;
+import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IPropertyListener;
import org.eclipse.ui.ISaveablesSource;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/MergeInput.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/compare/MergeInput.java
index 614d123a3..47e2942be 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/MergeInput.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/compare/MergeInput.java
@@ -8,7 +8,7 @@
* Wind River Systems - initial API and implementation
* William Chen (Wind River)- [345552] Edit the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.compare;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.compare;
import org.eclipse.compare.ITypedElement;
import org.eclipse.compare.structuremergeviewer.Differencer;
@@ -19,7 +19,7 @@ import org.eclipse.core.runtime.ListenerList;
import org.eclipse.core.runtime.SafeRunner;
import org.eclipse.jface.util.SafeRunnable;
import org.eclipse.swt.graphics.Image;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
/**
* An abstract compare input whose purpose is to support change notification
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/MergeTypedElement.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/compare/MergeTypedElement.java
index f1e0c3bfa..9055be0c0 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/MergeTypedElement.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/compare/MergeTypedElement.java
@@ -8,13 +8,13 @@
* Wind River Systems - initial API and implementation
* William Chen (Wind River)- [345552] Edit the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.compare;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.compare;
import org.eclipse.compare.BufferedContent;
import org.eclipse.compare.CompareUI;
import org.eclipse.compare.ITypedElement;
import org.eclipse.swt.graphics.Image;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
/**
* A <code>MergeTypedElement</code> wraps an <code>FSTreeNode</code> so that it
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/RemoteTypedElement.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/compare/RemoteTypedElement.java
index 96f7e48fc..7036a1133 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/compare/RemoteTypedElement.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/compare/RemoteTypedElement.java
@@ -8,7 +8,7 @@
* Wind River Systems - initial API and implementation
* William Chen (Wind River)- [345552] Edit the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.compare;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.compare;
import java.io.BufferedOutputStream;
import java.io.ByteArrayOutputStream;
@@ -22,10 +22,11 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
-import org.eclipse.tcf.te.tcf.filesystem.internal.utils.CacheManager;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.filesystem.core.interfaces.IOperation;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.OpOutStreamOp;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
/**
* A <code>RemoteTypedElement</code> wraps an <code>FSTreeNode</code> so that it
@@ -74,21 +75,16 @@ public class RemoteTypedElement extends MergeTypedElement {
* throws when an exception occurs during downloading.
*/
public void cacheContents(IProgressMonitor monitor)
- throws InvocationTargetException {
- monitor.beginTask(
- NLS.bind(Messages.CacheManager_DowloadingFile, node.name), 100);
+ throws InvocationTargetException, InterruptedException {
+ monitor.beginTask(NLS.bind(Messages.CacheManager_DowloadingFile, node.name), 100);
OutputStream output = null;
- try {
- final ByteArrayOutputStream baos = new ByteArrayOutputStream();
- output = new BufferedOutputStream(baos);
- monitor.beginTask(Messages.RemoteTypedElement_GettingRemoteContent
- + node.name, 100);
- CacheManager.getInstance().download2OutputStream(node, output, monitor);
- if (!monitor.isCanceled()) {
- setContent(baos.toByteArray());
- }
- } catch (IOException e) {
- throw new InvocationTargetException(e);
+ final ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ output = new BufferedOutputStream(baos);
+ monitor.beginTask(Messages.RemoteTypedElement_GettingRemoteContent + node.name, 100);
+ IOperation operation = new OpOutStreamOp(node, output);
+ operation.run(monitor);
+ if (!monitor.isCanceled()) {
+ setContent(baos.toByteArray());
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/decorators/PhantomDecorator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/decorators/PhantomDecorator.java
index 6e0f41837..e10952b86 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/decorators/PhantomDecorator.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/decorators/PhantomDecorator.java
@@ -7,13 +7,13 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.decorators;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.decorators;
import org.eclipse.jface.viewers.ILabelDecorator;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.swt.graphics.Image;
-import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.activator.UIPlugin;
import org.eclipse.tcf.te.ui.jface.images.AbstractImageDescriptor;
/**
* The label decorator to decorate the FSTreeNodes that are cut or hidden.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/decorators/PhantomImageDescriptor.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/decorators/PhantomImageDescriptor.java
index 7cd4eec95..58cc90889 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/decorators/PhantomImageDescriptor.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/decorators/PhantomImageDescriptor.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.decorators;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.decorators;
import org.eclipse.core.runtime.Assert;
import org.eclipse.swt.graphics.Image;
@@ -15,7 +15,7 @@ import org.eclipse.swt.graphics.ImageData;
import org.eclipse.swt.graphics.PaletteData;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.RGB;
-import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.ui.activator.UIPlugin;
import org.eclipse.tcf.te.ui.jface.images.AbstractImageDescriptor;
/**
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/dnd/CommonDnD.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/dnd/CommonDnD.java
index 09f1e995c..f72505a16 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/dnd/CommonDnD.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/dnd/CommonDnD.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.dnd;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.dnd;
import java.io.File;
import java.util.ArrayList;
@@ -24,23 +24,31 @@ import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.dnd.DND;
import org.eclipse.swt.dnd.FileTransfer;
import org.eclipse.swt.dnd.TransferData;
+import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.tcf.te.runtime.callback.Callback;
import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
-import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSCopy;
-import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSMove;
-import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSOperation;
-import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSRefresh;
-import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSUpload;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSModel;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.filesystem.core.interfaces.IConfirmCallback;
+import org.eclipse.tcf.te.tcf.filesystem.core.interfaces.IOperation;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.OpCopy;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.OpMove;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.OpRefresh;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.OpUpload;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSModel;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.ImageConsts;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.handlers.MoveCopyCallback;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.operations.JobExecutor;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.operations.IOpExecutor;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.operations.UiExecutor;
+import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
import org.eclipse.ui.PlatformUI;
/**
* Common DnD operations shared by File Explorer and Target Explorer.
*/
-public class CommonDnD {
+public class CommonDnD implements IConfirmCallback {
/**
* If the current selection is draggable.
@@ -85,7 +93,7 @@ public class CommonDnD {
* @return true if the dropping is successful.
*/
public boolean dropFiles(TreeViewer viewer, String[] files, int operations, FSTreeNode target) {
- FSOperation operation = null;
+ IOpExecutor executor = null;
if ((operations & DND.DROP_MOVE) != 0) {
String question;
if (files.length == 1) {
@@ -96,14 +104,16 @@ public class CommonDnD {
}
Shell parent = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
if (MessageDialog.openQuestion(parent, Messages.FSDropTargetListener_ConfirmMoveTitle, question)) {
- operation = new FSUpload(files, target, getMoveCallback(viewer, files, target));
+ ICallback callback = getMoveCallback(viewer, files, target);
+ executor = new UiExecutor(Messages.FSUpload_UploadTitle, callback);
}
}
else if ((operations & DND.DROP_COPY) != 0) {
- operation = new FSUpload(files, target, getCopyCallback(viewer, files, target));
+ ICallback callback = getCopyCallback(viewer, files, target);
+ executor = new UiExecutor(Messages.FSUpload_UploadTitle, callback);
}
- if (operation != null) {
- IStatus status = operation.doit();
+ if (executor != null) {
+ IStatus status = executor.execute(new OpUpload(files, target, this));
return status != null && status.isOK();
}
return false;
@@ -122,8 +132,8 @@ public class CommonDnD {
return new Callback() {
@Override
protected void internalDone(Object caller, IStatus status) {
- FSRefresh refresh = new FSRefresh(target, getSelectionCallback(viewer, files, target));
- refresh.doit();
+ IOpExecutor executor = new JobExecutor(NLS.bind(Messages.RefreshDirectoryHandler_RefreshJobTitle, target.name), getSelectionCallback(viewer, files, target));
+ executor.execute(new OpRefresh(target));
}
};
}
@@ -150,8 +160,8 @@ public class CommonDnD {
}
if (successful) {
FSTreeNode root = FSModel.getFSModel(target.peerNode).getRoot();
- FSRefresh refresh = new FSRefresh(root, getSelectionCallback(viewer, files, target));
- refresh.doit();
+ IOpExecutor executor = new JobExecutor(NLS.bind(Messages.RefreshDirectoryHandler_RefreshJobTitle, target.name), getSelectionCallback(viewer, files, target));
+ executor.execute(new OpRefresh(root));
}
}
};
@@ -201,16 +211,27 @@ public class CommonDnD {
*/
public boolean dropLocalSelection(FSTreeNode target, int operations, IStructuredSelection selection) {
List<FSTreeNode> nodes = selection.toList();
- FSOperation operation = null;
+ ICallback callback = new Callback(){
+ @Override
+ protected void internalDone(Object caller, IStatus status) {
+ UIPlugin.getClipboard().clear();
+ }
+ };
+ IOperation operation = null;
+ IOpExecutor executor = null;
if ((operations & DND.DROP_MOVE) != 0) {
- operation = new FSMove(nodes, target);
+ operation = new OpMove(nodes, target, new MoveCopyCallback());
+ executor = new UiExecutor(Messages.FSMove_MovingFile, callback);
}
else if ((operations & DND.DROP_COPY) != 0) {
FSTreeNode dest = getCopyDestination(target, nodes);
- operation = new FSCopy(nodes, dest);
+ boolean cpPerm = UIPlugin.isCopyPermission();
+ boolean cpOwn = UIPlugin.isCopyOwnership();
+ operation = new OpCopy(nodes, dest, cpPerm, cpOwn, new MoveCopyCallback());
+ executor = new UiExecutor(Messages.FSCopy_CopyingFile, callback);
}
- if (operation != null) {
- IStatus status = operation.doit();
+ if (executor != null) {
+ IStatus status = executor.execute(operation);
return status != null && status.isOK();
}
return false;
@@ -297,4 +318,43 @@ public class CommonDnD {
}
return false;
}
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.filesystem.interfaces.IConfirmCallback#requires(java.lang.Object)
+ */
+ @Override
+ public boolean requires(Object object) {
+ return true;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.tcf.te.tcf.filesystem.interfaces.IConfirmCallback#confirms(java.lang.Object)
+ */
+ @Override
+ public int confirms(Object object) {
+ final int[] results = new int[1];
+ final File file = (File) object;
+ Display display = PlatformUI.getWorkbench().getDisplay();
+ display.syncExec(new Runnable() {
+ @Override
+ public void run() {
+ Shell parent = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
+ String title = Messages.FSUpload_OverwriteTitle;
+ String message = NLS.bind(Messages.FSUpload_OverwriteConfirmation, file.getName());
+ final Image titleImage = UIPlugin.getImage(ImageConsts.DELETE_READONLY_CONFIRM);
+ MessageDialog qDialog = new MessageDialog(parent, title, null, message,
+ MessageDialog.QUESTION, new String[] {Messages.FSUpload_Yes,
+ Messages.FSUpload_YesToAll, Messages.FSUpload_No, Messages.FSUpload_Cancel}, 0) {
+ @Override
+ public Image getQuestionImage() {
+ return titleImage;
+ }
+ };
+ results[0] = qDialog.open();
+ }
+ });
+ return results[0];
+ }
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/dnd/FSDragAdapterAssistant.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/dnd/FSDragAdapterAssistant.java
index 1b9d7dd18..d066d77bc 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/dnd/FSDragAdapterAssistant.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/dnd/FSDragAdapterAssistant.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.dnd;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.dnd;
import org.eclipse.jface.util.LocalSelectionTransfer;
import org.eclipse.jface.viewers.IStructuredSelection;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/dnd/FSDragSourceListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/dnd/FSDragSourceListener.java
index 15b469d63..95de0e244 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/dnd/FSDragSourceListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/dnd/FSDragSourceListener.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.dnd;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.dnd;
import org.eclipse.jface.util.LocalSelectionTransfer;
import org.eclipse.jface.viewers.IStructuredSelection;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/dnd/FSDropAdapterAssistant.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/dnd/FSDropAdapterAssistant.java
index 7d5d03825..6dc06e660 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/dnd/FSDropAdapterAssistant.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/dnd/FSDropAdapterAssistant.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.dnd;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.dnd;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IStatus;
@@ -19,7 +19,7 @@ import org.eclipse.swt.dnd.DropTargetEvent;
import org.eclipse.swt.dnd.FileTransfer;
import org.eclipse.swt.dnd.TransferData;
import org.eclipse.swt.widgets.Display;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
import org.eclipse.tcf.te.ui.views.interfaces.IUIConstants;
import org.eclipse.ui.IViewReference;
import org.eclipse.ui.IWorkbenchWindow;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/dnd/FSDropTargetListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/dnd/FSDropTargetListener.java
index dbe84f20d..cc6505905 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/dnd/FSDropTargetListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/dnd/FSDropTargetListener.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.dnd;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.dnd;
import org.eclipse.jface.util.LocalSelectionTransfer;
import org.eclipse.jface.viewers.IStructuredSelection;
@@ -17,7 +17,7 @@ import org.eclipse.swt.dnd.DND;
import org.eclipse.swt.dnd.DropTargetEvent;
import org.eclipse.swt.dnd.FileTransfer;
import org.eclipse.swt.dnd.TransferData;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
/**
* The drop target listener for the file tree of Target Explorer.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/CommitHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/CommitHandler.java
index 21b22291b..2772317c7 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/CommitHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/CommitHandler.java
@@ -8,14 +8,17 @@
* Wind River Systems - initial API and implementation
* William Chen (Wind River)- [345552] Edit the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.handlers;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.handlers;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.tcf.te.tcf.filesystem.internal.utils.CacheManager;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.OpCacheCommit;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.operations.IOpExecutor;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.operations.UiExecutor;
+import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
import org.eclipse.ui.handlers.HandlerUtil;
/**
@@ -30,7 +33,8 @@ public class CommitHandler extends AbstractHandler {
public Object execute(ExecutionEvent event) throws ExecutionException {
IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelectionChecked(event);
FSTreeNode node = (FSTreeNode) selection.getFirstElement();
- CacheManager.getInstance().upload(new FSTreeNode[]{node}, true);
+ IOpExecutor executor = new UiExecutor(Messages.CacheManager_UploadingProgress);
+ executor.execute(new OpCacheCommit(new FSTreeNode[]{node}, true));
return null;
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/CopyFilesHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/CopyFilesHandler.java
index d36344b28..1ee448cb9 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/CopyFilesHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/CopyFilesHandler.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.handlers;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.handlers;
import java.util.List;
@@ -15,9 +15,9 @@ import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
-import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSClipboard;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.OpClipboard;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.activator.UIPlugin;
import org.eclipse.ui.handlers.HandlerUtil;
/**
* The handler that copies the selected files or folders to the clip board.
@@ -29,7 +29,7 @@ public class CopyFilesHandler extends AbstractHandler {
*/
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
- FSClipboard cb = UIPlugin.getDefault().getClipboard();
+ OpClipboard cb = UIPlugin.getClipboard();
IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
if (!selection.isEmpty()) {
List<FSTreeNode> nodes = selection.toList();
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/CutFilesHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/CutFilesHandler.java
index 2960a557e..188da3742 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/CutFilesHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/CutFilesHandler.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.handlers;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.handlers;
import java.util.List;
@@ -15,9 +15,9 @@ import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
-import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSClipboard;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.OpClipboard;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.activator.UIPlugin;
import org.eclipse.ui.handlers.HandlerUtil;
/**
@@ -30,7 +30,7 @@ public class CutFilesHandler extends AbstractHandler {
*/
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
- FSClipboard cb = UIPlugin.getDefault().getClipboard();
+ OpClipboard cb = UIPlugin.getClipboard();
IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
if (!selection.isEmpty()) {
List<FSTreeNode> nodes = selection.toList();
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/MergeHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/MergeHandler.java
index 4963ff6ae..f360598d3 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/MergeHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/MergeHandler.java
@@ -8,17 +8,17 @@
* Wind River Systems - initial API and implementation
* William Chen (Wind River)- [345552] Edit the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.handlers;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.handlers;
import org.eclipse.compare.CompareUI;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.tcf.te.tcf.filesystem.internal.compare.LocalTypedElement;
-import org.eclipse.tcf.te.tcf.filesystem.internal.compare.MergeEditorInput;
-import org.eclipse.tcf.te.tcf.filesystem.internal.compare.RemoteTypedElement;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.compare.LocalTypedElement;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.compare.MergeEditorInput;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.compare.RemoteTypedElement;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.handlers.HandlerUtil;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/MoveCopyCallback.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/MoveCopyCallback.java
new file mode 100644
index 000000000..fc314532a
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/MoveCopyCallback.java
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.handlers;
+
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.tcf.te.tcf.filesystem.core.interfaces.IConfirmCallback;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.ImageConsts;
+import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
+import org.eclipse.ui.PlatformUI;
+
+public class MoveCopyCallback implements IConfirmCallback {
+
+ @Override
+ public boolean requires(Object object) {
+ return true;
+ }
+
+ @Override
+ public int confirms(Object object) {
+ final FSTreeNode node = (FSTreeNode) object;
+ final int[] results = new int[1];
+ Display display = PlatformUI.getWorkbench().getDisplay();
+ display.syncExec(new Runnable() {
+ @Override
+ public void run() {
+ Shell parent = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
+ String title = node.isDirectory() ? Messages.FSOperation_ConfirmFolderReplaceTitle : Messages.FSOperation_ConfirmFileReplace;
+ String message = NLS.bind(node.isDirectory() ? Messages.FSOperation_ConfirmFolderReplaceMessage : Messages.FSOperation_ConfirmFileReplaceMessage, node.name);
+ final Image titleImage = UIPlugin.getImage(ImageConsts.REPLACE_FOLDER_CONFIRM);
+ MessageDialog qDialog = new MessageDialog(parent, title, null, message, MessageDialog.QUESTION, new String[] { Messages.FSOperation_ConfirmDialogYes, Messages.FSOperation_ConfirmDialogYesToAll, Messages.FSOperation_ConfirmDialogNo, Messages.FSOperation_ConfirmDialogCancel }, 0) {
+ @Override
+ public Image getQuestionImage() {
+ return titleImage;
+ }
+ };
+ results[0] = qDialog.open();
+ }
+ });
+ return results[0];
+ }
+
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/MoveFilesHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/MoveFilesHandler.java
index b5e394335..d8946ce29 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/MoveFilesHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/MoveFilesHandler.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.handlers;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.handlers;
import java.util.List;
@@ -15,12 +15,18 @@ import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tcf.te.tcf.filesystem.dialogs.FSFolderSelectionDialog;
-import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSMove;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.runtime.callback.Callback;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.OpMove;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.ui.dialogs.FSFolderSelectionDialog;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.operations.IOpExecutor;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.operations.UiExecutor;
+import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
import org.eclipse.ui.handlers.HandlerUtil;
/**
@@ -44,8 +50,13 @@ public class MoveFilesHandler extends AbstractHandler {
Object obj = dialog.getFirstResult();
Assert.isTrue(obj instanceof FSTreeNode);
FSTreeNode dest = (FSTreeNode) obj;
- FSMove fsop = new FSMove(nodes, dest);
- fsop.doit();
+ IOpExecutor executor = new UiExecutor(Messages.FSMove_MovingFile, new Callback(){
+ @Override
+ protected void internalDone(Object caller, IStatus status) {
+ UIPlugin.getClipboard().clear();
+ }
+ });
+ executor.execute(new OpMove(nodes, dest, new MoveCopyCallback()));
}
return null;
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/NewFileHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/NewFileHandler.java
index 31a502ab1..4d6f5fa2a 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/NewFileHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/NewFileHandler.java
@@ -7,9 +7,9 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.handlers;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.handlers;
-import org.eclipse.tcf.te.tcf.filesystem.internal.wizards.NewFileWizard;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.wizards.NewFileWizard;
import org.eclipse.ui.IWorkbenchWizard;
/**
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/NewFolderHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/NewFolderHandler.java
index b20fbc349..63dd3116e 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/NewFolderHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/NewFolderHandler.java
@@ -7,9 +7,9 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.handlers;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.handlers;
-import org.eclipse.tcf.te.tcf.filesystem.internal.wizards.NewFolderWizard;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.wizards.NewFolderWizard;
import org.eclipse.ui.IWorkbenchWizard;
/**
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/NewNodeHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/NewNodeHandler.java
index f511fb0da..d14eb0a01 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/NewNodeHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/NewNodeHandler.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.handlers;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.handlers;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/OpenFileHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/OpenFileHandler.java
index bba203c86..1cfee21b3 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/OpenFileHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/OpenFileHandler.java
@@ -7,7 +7,7 @@
* Contributors:
* William Chen (Wind River)- [345387]Open the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.handlers;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.handlers;
import java.io.File;
@@ -17,15 +17,19 @@ import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.filesystem.EFS;
import org.eclipse.core.filesystem.IFileStore;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tcf.te.tcf.filesystem.internal.utils.CacheManager;
-import org.eclipse.tcf.te.tcf.filesystem.internal.utils.ContentTypeHelper;
-import org.eclipse.tcf.te.tcf.filesystem.internal.utils.PersistenceManager;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.OpCacheUpdate;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.utils.CacheManager;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.utils.ContentTypeHelper;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.utils.PersistenceManager;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.operations.IOpExecutor;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.operations.UiExecutor;
+import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.handlers.HandlerUtil;
@@ -71,7 +75,9 @@ public class OpenFileHandler extends AbstractHandler {
File file = CacheManager.getInstance().getCacheFile(node);
if (!file.exists()) {
// If the file node's local cache does not exist yet, download it.
- if (!CacheManager.getInstance().download(node)) {
+ IOpExecutor executor = new UiExecutor(Messages.CacheManager_DowloadingFile);
+ IStatus status = executor.execute(new OpCacheUpdate(node));
+ if (!status.isOK()) {
return;
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/OpenWithContribution.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/OpenWithContribution.java
index 92c7f5b81..943bd3e78 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/OpenWithContribution.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/OpenWithContribution.java
@@ -8,14 +8,14 @@
* William Chen (Wind River) [360494]Provide an "Open With" action in the pop
* up menu of file system nodes of Target Explorer.
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.handlers;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.handlers;
import org.eclipse.core.expressions.IEvaluationContext;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.action.IContributionItem;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
import org.eclipse.ui.ISources;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PlatformUI;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/OpenWithMenu.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/OpenWithMenu.java
index e7ef2c6e9..1203f9052 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/OpenWithMenu.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/OpenWithMenu.java
@@ -8,7 +8,7 @@
* William Chen (Wind River) [360494]Provide an "Open With" action in the pop
* up menu of file system nodes of Target Explorer.
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.handlers;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.handlers;
import java.io.File;
import java.text.Collator;
@@ -21,6 +21,7 @@ import java.util.Map;
import org.eclipse.core.filesystem.EFS;
import org.eclipse.core.filesystem.IFileStore;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.QualifiedName;
import org.eclipse.core.runtime.content.IContentType;
import org.eclipse.jface.action.ContributionItem;
@@ -33,12 +34,15 @@ import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.MenuItem;
-import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
-import org.eclipse.tcf.te.tcf.filesystem.internal.utils.CacheManager;
-import org.eclipse.tcf.te.tcf.filesystem.internal.utils.ContentTypeHelper;
-import org.eclipse.tcf.te.tcf.filesystem.internal.utils.PersistenceManager;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.OpCacheUpdate;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.utils.CacheManager;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.utils.ContentTypeHelper;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.utils.PersistenceManager;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.operations.IOpExecutor;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.operations.UiExecutor;
+import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
import org.eclipse.ui.IEditorDescriptor;
import org.eclipse.ui.IEditorRegistry;
import org.eclipse.ui.IWorkbenchPage;
@@ -375,7 +379,9 @@ public class OpenWithMenu extends ContributionItem {
File file = CacheManager.getInstance().getCacheFile(node);
if (!file.exists()) {
// If the file node's local cache does not exist yet, download it.
- if (!CacheManager.getInstance().download(node)) {
+ IOpExecutor executor = new UiExecutor(Messages.CacheManager_DowloadingFile);
+ IStatus status = executor.execute(new OpCacheUpdate(node));
+ if (!status.isOK()) {
return;
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/PasteFilesHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/PasteFilesHandler.java
index 20140ea8a..ff21a7236 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/PasteFilesHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/PasteFilesHandler.java
@@ -7,24 +7,30 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.handlers;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.handlers;
import java.util.List;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.dnd.Clipboard;
import org.eclipse.swt.dnd.DND;
import org.eclipse.swt.dnd.FileTransfer;
-import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
-import org.eclipse.tcf.te.tcf.filesystem.internal.dnd.CommonDnD;
-import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSClipboard;
-import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSCopy;
-import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSMove;
-import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSOperation;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.runtime.callback.Callback;
+import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
+import org.eclipse.tcf.te.tcf.filesystem.core.interfaces.IOperation;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.OpCopy;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.OpMove;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.dnd.CommonDnD;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.operations.FsClipboard;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.operations.IOpExecutor;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.operations.UiExecutor;
+import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
import org.eclipse.ui.handlers.HandlerUtil;
/**
@@ -39,7 +45,7 @@ public class PasteFilesHandler extends AbstractHandler {
*/
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
- FSClipboard cb = UIPlugin.getDefault().getClipboard();
+ FsClipboard cb = UIPlugin.getClipboard();
Clipboard clipboard = cb.getSystemClipboard();
Object contents = clipboard.getContents(FileTransfer.getInstance());
if(contents != null) {
@@ -52,20 +58,32 @@ public class PasteFilesHandler extends AbstractHandler {
}
else if (!cb.isEmpty()) {
// Get the files/folders from the clip board.
- int operations = cb.getOperation();
IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelectionChecked(event);
List<FSTreeNode> nodes = cb.getFiles();
- FSOperation operation = null;
- if (operations == FSClipboard.CUT) {
+ ICallback callback = new Callback(){
+ @Override
+ protected void internalDone(Object caller, IStatus status) {
+ UIPlugin.getClipboard().clear();
+ }
+ };
+ IOpExecutor executor = null;
+ IOperation operation = null;
+ if (cb.isCutOp()) {
FSTreeNode dest = (FSTreeNode) selection.getFirstElement();
- operation = new FSMove(nodes, dest);
+ operation = new OpMove(nodes, dest, new MoveCopyCallback());
+ executor = new UiExecutor(Messages.FSMove_MovingFile, callback);
}
- else if (operations == FSClipboard.COPY) {
+ else if (cb.isCopyOp()) {
FSTreeNode hovered = (FSTreeNode) selection.getFirstElement();
FSTreeNode dest = getCopyDestination(hovered, nodes);
- operation = new FSCopy(nodes, dest);
+ boolean cpPerm = UIPlugin.isCopyPermission();
+ boolean cpOwn = UIPlugin.isCopyOwnership();
+ operation = new OpCopy(nodes, dest, cpPerm, cpOwn, new MoveCopyCallback());
+ executor = new UiExecutor(Messages.FSCopy_CopyingFile, callback);
+ }
+ if (executor != null) {
+ executor.execute(operation);
}
- if (operation != null) operation.doit();
}
return null;
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/RefreshViewerHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/RefreshViewerHandler.java
index 4cf78c865..0b12e51d7 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/RefreshViewerHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/RefreshViewerHandler.java
@@ -7,14 +7,18 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.handlers;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.handlers;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSRefresh;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSModel;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.OpRefresh;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSModel;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.operations.JobExecutor;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.operations.IOpExecutor;
+import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.handlers.HandlerUtil;
@@ -35,8 +39,8 @@ public class RefreshViewerHandler extends AbstractHandler {
if (peer != null) {
FSTreeNode root = FSModel.getFSModel(peer).getRoot();
if (root != null) {
- FSRefresh refresh = new FSRefresh(root);
- refresh.doit();
+ IOpExecutor executor = new JobExecutor(NLS.bind(Messages.RefreshDirectoryHandler_RefreshJobTitle, root.name));
+ executor.execute(new OpRefresh(root));
}
}
return null;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/RenameCallback.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/RenameCallback.java
new file mode 100644
index 000000000..8aee4a209
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/RenameCallback.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.handlers;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.tcf.te.runtime.callback.Callback;
+import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
+import org.eclipse.ui.PlatformUI;
+
+public class RenameCallback extends Callback implements Runnable {
+ private String message;
+ @Override
+ protected void internalDone(Object caller, IStatus status) {
+ if (!status.isOK()) {
+ message = status.getMessage();
+ PlatformUI.getWorkbench().getDisplay().asyncExec(this);
+ }
+ }
+ @Override
+ public void run() {
+ Shell parent = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
+ MessageDialog.openError(parent, Messages.FSRename_RenameFileFolderTitle, message);
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/RenameFilesHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/RenameFilesHandler.java
index f94c9a589..a20fbe238 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/RenameFilesHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/RenameFilesHandler.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.handlers;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.handlers;
import java.util.ArrayList;
import java.util.List;
@@ -20,11 +20,13 @@ import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tcf.te.tcf.filesystem.internal.celleditor.FSCellValidator;
-import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSRename;
-import org.eclipse.tcf.te.tcf.filesystem.internal.utils.PersistenceManager;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.OpRename;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.celleditor.FSCellValidator;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.operations.JobExecutor;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.operations.IOpExecutor;
+import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
import org.eclipse.tcf.te.ui.dialogs.RenameDialog;
import org.eclipse.ui.handlers.HandlerUtil;
@@ -44,7 +46,7 @@ public class RenameFilesHandler extends AbstractHandler {
IStructuredSelection sel = (IStructuredSelection) HandlerUtil.getCurrentSelectionChecked(event);
if (!sel.isEmpty()) {
FSTreeNode node = (FSTreeNode) sel.getFirstElement();
- boolean inPlaceEditor = PersistenceManager.getInstance().isInPlaceEditor();
+ boolean inPlaceEditor = UIPlugin.isInPlaceEditor();
if (inPlaceEditor) {
// If it is configured to use in-place editor, then invoke the editor.
if (currentViewer != null) {
@@ -61,8 +63,9 @@ public class RenameFilesHandler extends AbstractHandler {
if (ok == Window.OK) {
// Do the renaming.
String newName = dialog.getNewName();
- FSRename op = new FSRename(node, newName);
- op.doit();
+ // Rename the node with the new name using an FSRename.
+ IOpExecutor executor = new JobExecutor(Messages.FSRename_JobTitle, new RenameCallback());
+ executor.execute(new OpRename(node, newName));
}
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/UpdateHandler.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/UpdateHandler.java
index 0aa51236f..ce9c5f247 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/handlers/UpdateHandler.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/handlers/UpdateHandler.java
@@ -8,14 +8,17 @@
* Wind River Systems - initial API and implementation
* William Chen (Wind River)- [345552] Edit the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.handlers;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.handlers;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.tcf.te.tcf.filesystem.internal.utils.CacheManager;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.OpCacheUpdate;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.operations.IOpExecutor;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.operations.UiExecutor;
+import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
import org.eclipse.ui.handlers.HandlerUtil;
/**
@@ -32,7 +35,8 @@ public class UpdateHandler extends AbstractHandler {
public Object execute(ExecutionEvent event) throws ExecutionException {
IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelectionChecked(event);
FSTreeNode node = (FSTreeNode) selection.getFirstElement();
- CacheManager.getInstance().download(node);
+ IOpExecutor executor = new UiExecutor(Messages.CacheManager_DowloadingFile);
+ executor.execute(new OpCacheUpdate(node));
return null;
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/operations/FsClipboard.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/operations/FsClipboard.java
new file mode 100644
index 000000000..0d3de85bc
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/operations/FsClipboard.java
@@ -0,0 +1,114 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.operations;
+
+import java.util.List;
+
+import org.eclipse.swt.SWTException;
+import org.eclipse.swt.dnd.Clipboard;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.OpClipboard;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * The clip board to which copy or cut files/folders.
+ */
+public class FsClipboard extends OpClipboard {
+ // The system clipboard.
+ private Clipboard clipboard;
+
+ /**
+ * Create a clip board instance.
+ */
+ public FsClipboard() {
+ super();
+ clipboard = new Clipboard(PlatformUI.getWorkbench().getDisplay());
+ }
+
+ /**
+ * Cut the specified files/folders to the clip board.
+ *
+ * @param files The file/folder nodes.
+ */
+ @Override
+ public void cutFiles(List<FSTreeNode> files) {
+ super.cutFiles(files);
+ clearSystemClipboard();
+ }
+
+ /**
+ * Copy the specified files/folders to the clip board.
+ *
+ * @param files The file/folder nodes.
+ */
+ @Override
+ public void copyFiles(List<FSTreeNode> files) {
+ super.copyFiles(files);
+ clearSystemClipboard();
+ }
+
+ /**
+ * Clear the clip board.
+ */
+ @Override
+ public void clear() {
+ super.clear();
+ clearSystemClipboard();
+ }
+
+ /**
+ * Make sure the system clip board is cleared in a UI thread.
+ */
+ void clearSystemClipboard() {
+ if (Display.getCurrent() != null) {
+ clipboard.clearContents();
+ }
+ else {
+ PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable(){
+ @Override
+ public void run() {
+ clearSystemClipboard();
+ }});
+ }
+ }
+
+ /**
+ * Dispose the clipboard.
+ */
+ @Override
+ public void dispose() {
+ if(Display.getCurrent() != null) {
+ if (!clipboard.isDisposed()) {
+ try {
+ clipboard.dispose();
+ }
+ catch (SWTException e) {
+ }
+ }
+ }
+ else {
+ PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable(){
+ @Override
+ public void run() {
+ dispose();
+ }});
+ }
+ }
+
+ /**
+ * Get the system clipboard.
+ *
+ * @return The system clipboard.
+ */
+ public Clipboard getSystemClipboard() {
+ return clipboard;
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/operations/IOpExecutor.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/operations/IOpExecutor.java
new file mode 100644
index 000000000..dac885d4d
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/operations/IOpExecutor.java
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.operations;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.tcf.te.tcf.filesystem.core.interfaces.IOperation;
+
+/**
+ * The operation that is executed as a back ground job.
+ */
+public interface IOpExecutor {
+ public IStatus execute(IOperation operation);
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSJobOperation.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/operations/JobExecutor.java
index 8d91fa497..6e8f744b7 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSJobOperation.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/operations/JobExecutor.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.operations;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.operations;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IStatus;
@@ -17,40 +17,44 @@ import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.core.runtime.jobs.JobChangeAdapter;
import org.eclipse.swt.widgets.Display;
import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
+import org.eclipse.tcf.te.tcf.filesystem.core.interfaces.IOperation;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.OpJob;
import org.eclipse.ui.PlatformUI;
/**
* The operation that is executed as a back ground job.
*/
-public class FSJobOperation extends FSOperation {
+public class JobExecutor implements IOpExecutor{
// The callback
- private ICallback callback;
- // Job title
+ protected ICallback callback;
private String jobName;
+ public JobExecutor(String jobName) {
+ this(jobName, null);
+ }
+
/**
* Create an instance with the specified callback.
*
* @param callback called when the creation is done.
*/
- public FSJobOperation(String jobName, ICallback callback) {
+ public JobExecutor(String jobName, ICallback callback) {
this.jobName = jobName;
this.callback = callback;
}
+
/*
* (non-Javadoc)
* @see org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSOperation#doit()
*/
@Override
- public IStatus doit() {
- Assert.isNotNull(Display.getCurrent());
- Job job = new RunnableJob(jobName, this);
+ public IStatus execute(IOperation operation) {
+ Job job = new OpJob(jobName, operation);
job.addJobChangeListener(new JobChangeAdapter(){
@Override
public void done(final IJobChangeEvent event) {
- Display display = PlatformUI.getWorkbench().getDisplay();
- display.asyncExec(new Runnable(){
+ PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable(){
@Override
public void run() {
doCallback(event);
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSUIOperation.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/operations/UiExecutor.java
index ede8ef677..1613062d5 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/operations/FSUIOperation.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/operations/UiExecutor.java
@@ -7,52 +7,74 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.operations;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.operations;
import java.lang.reflect.InvocationTargetException;
import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
-import org.eclipse.tcf.te.tcf.filesystem.dialogs.TimeTriggeredProgressMonitorDialog;
+import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
+import org.eclipse.tcf.te.tcf.filesystem.core.interfaces.IOperation;
+import org.eclipse.tcf.te.tcf.filesystem.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.ui.dialogs.TimeTriggeredProgressMonitorDialog;
import org.eclipse.ui.PlatformUI;
/**
* The operation that is executed in an interactive progress dialog.
*/
-public class FSUIOperation extends FSOperation {
-
- private String msgDialogTitle;
+public class UiExecutor implements IOpExecutor {
+ // The callback
+ protected ICallback callback;
+ private String opName;
+
+ public UiExecutor(String opName) {
+ this(opName, null);
+ }
- public FSUIOperation(String msgDialogTitle) {
- this.msgDialogTitle = msgDialogTitle;
+ public UiExecutor(String opName, ICallback callback) {
+ this.opName = opName;
+ this.callback = callback;
}
+
/*
* (non-Javadoc)
* @see org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSOperation#doit()
*/
@Override
- public IStatus doit() {
+ public IStatus execute(final IOperation operation) {
Assert.isNotNull(Display.getCurrent());
Shell parent = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
TimeTriggeredProgressMonitorDialog dialog = new TimeTriggeredProgressMonitorDialog(parent, 250);
+ final IRunnableWithProgress runnable = new IRunnableWithProgress() {
+ @Override
+ public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+ operation.run(monitor);
+ }};
dialog.setCancelable(true);
+ IStatus status = null;
try {
- dialog.run(true, true, this);
+ dialog.run(true, true, runnable);
+ status = Status.OK_STATUS;
}
catch (InvocationTargetException e) {
// Display the error during copy.
Throwable throwable = e.getTargetException() != null ? e.getTargetException() : e;
- MessageDialog.openError(parent, msgDialogTitle, throwable.getLocalizedMessage());
- return new Status(IStatus.ERROR, UIPlugin.getUniqueIdentifier(), throwable.getLocalizedMessage(), throwable);
+ MessageDialog.openError(parent, opName, throwable.getLocalizedMessage());
+ status = new Status(IStatus.ERROR, UIPlugin.getUniqueIdentifier(), throwable.getLocalizedMessage(), throwable);
}
catch (InterruptedException e) {
// It is canceled.
+ status = Status.OK_STATUS;
+ }
+ if(callback != null) {
+ callback.done(this, status);
}
- return Status.OK_STATUS;
+ return status;
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/preferences/PreferencePage.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/preferences/PreferencePage.java
index 431b85656..6206db5e3 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/preferences/PreferencePage.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/preferences/PreferencePage.java
@@ -8,13 +8,13 @@
* Wind River Systems - initial API and implementation
* William Chen (Wind River)- [345552] Edit the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.preferences;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.preferences;
import org.eclipse.jface.preference.BooleanFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.filesystem.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/preferences/PreferencesInitializer.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/preferences/PreferencesInitializer.java
index 1a01f1c4a..935e02b9e 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/preferences/PreferencesInitializer.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/preferences/PreferencesInitializer.java
@@ -7,14 +7,14 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.preferences;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.preferences;
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
import org.eclipse.core.runtime.preferences.DefaultScope;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
-import org.eclipse.tcf.te.tcf.filesystem.interfaces.preferences.IPreferenceKeys;
+import org.eclipse.tcf.te.tcf.filesystem.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.ui.interfaces.preferences.IPreferenceKeys;
/**
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/properties/AdvancedAttributesDialog.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/properties/AdvancedAttributesDialog.java
index f1c4a43e8..4303e5ef2 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/properties/AdvancedAttributesDialog.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/properties/AdvancedAttributesDialog.java
@@ -7,7 +7,7 @@
* Contributors:
* William Chen (Wind River) - [345384]Provide property pages for remote file system nodes
*********************************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.properties;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.properties;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.swt.SWT;
@@ -22,11 +22,11 @@ import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
-import org.eclipse.tcf.te.tcf.filesystem.interfaces.IWindowsFileAttributes;
-import org.eclipse.tcf.te.tcf.filesystem.internal.ImageConsts;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.filesystem.core.interfaces.IWindowsFileAttributes;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.ImageConsts;
+import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
/**
* The dialog used to display the advanced attributes of a Windows file or
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/properties/GeneralInformationPage.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/properties/GeneralInformationPage.java
index 9d69809bd..fb0fe7a10 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/properties/GeneralInformationPage.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/properties/GeneralInformationPage.java
@@ -8,7 +8,7 @@
* William Chen (Wind River) - [345384]Provide property pages for remote file system nodes
* [361322]Minor improvements to the properties dialog of a file.
*********************************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.properties;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.properties;
import java.text.DateFormat;
import java.text.DecimalFormat;
@@ -31,9 +31,9 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
-import org.eclipse.tcf.te.tcf.filesystem.internal.utils.StateManager;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.utils.StateManager;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
import org.eclipse.ui.dialogs.PropertyPage;
/**
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/BasicFileSection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/tabbed/BasicFileSection.java
index 0555c4cb8..bba1e4e67 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/BasicFileSection.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/tabbed/BasicFileSection.java
@@ -7,11 +7,11 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.tabbed;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.tabbed;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Text;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
/**
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/BasicFolderSection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/tabbed/BasicFolderSection.java
index b35b92b45..d494824f5 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/BasicFolderSection.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/tabbed/BasicFolderSection.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.tabbed;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.tabbed;
import java.text.DateFormat;
import java.text.DecimalFormat;
@@ -17,8 +17,8 @@ import org.eclipse.core.runtime.Assert;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Text;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModelProvider;
import org.eclipse.tcf.te.ui.views.tabbed.BaseTitledSection;
import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/FileFilter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/tabbed/FileFilter.java
index c8557f4de..7f7686558 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/FileFilter.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/tabbed/FileFilter.java
@@ -7,10 +7,10 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.tabbed;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.tabbed;
import org.eclipse.jface.viewers.IFilter;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
/**
* The filter to test if a object is a file.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/FolderFilter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/tabbed/FolderFilter.java
index 89ee01817..06627fd92 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/FolderFilter.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/tabbed/FolderFilter.java
@@ -7,10 +7,10 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.tabbed;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.tabbed;
import org.eclipse.jface.viewers.IFilter;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
/**
* The filter to select the folder from the file system.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/LinuxFilter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/tabbed/LinuxFilter.java
index 11bd974f6..409b30f70 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/LinuxFilter.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/tabbed/LinuxFilter.java
@@ -7,10 +7,10 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.tabbed;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.tabbed;
import org.eclipse.jface.viewers.IFilter;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
/**
* A filter to test if a object is a linux (non-Windows) node.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/LinuxPermissionsSection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/tabbed/LinuxPermissionsSection.java
index 1011d8b83..c0ddc5612 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/LinuxPermissionsSection.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/tabbed/LinuxPermissionsSection.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.tabbed;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.tabbed;
import org.eclipse.core.runtime.Assert;
import org.eclipse.swt.SWT;
@@ -17,8 +17,8 @@ import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModelProvider;
import org.eclipse.tcf.te.ui.views.tabbed.BaseTitledSection;
import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsAttributesCESection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/tabbed/WindowsAttributesCESection.java
index a85d65773..fff7dff89 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsAttributesCESection.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/tabbed/WindowsAttributesCESection.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.tabbed;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.tabbed;
import org.eclipse.core.runtime.Assert;
import org.eclipse.swt.SWT;
@@ -15,9 +15,9 @@ import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.tcf.te.tcf.filesystem.interfaces.IWindowsFileAttributes;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.filesystem.core.interfaces.IWindowsFileAttributes;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModelProvider;
import org.eclipse.tcf.te.ui.views.tabbed.BaseTitledSection;
import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsAttributesSection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/tabbed/WindowsAttributesSection.java
index 6b1b4a4c8..05bfca7ec 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsAttributesSection.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/tabbed/WindowsAttributesSection.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.tabbed;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.tabbed;
import org.eclipse.core.runtime.Assert;
import org.eclipse.swt.SWT;
@@ -15,8 +15,8 @@ import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModelProvider;
import org.eclipse.tcf.te.ui.views.tabbed.BaseTitledSection;
import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsFileAISection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/tabbed/WindowsFileAISection.java
index 1b55d6a86..738b13af0 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsFileAISection.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/tabbed/WindowsFileAISection.java
@@ -7,9 +7,9 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.tabbed;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.tabbed;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
/**
* The property section to display the file's archive and index attributes on Windows.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsFileFilter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/tabbed/WindowsFileFilter.java
index 847b48183..cae1ebfbe 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsFileFilter.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/tabbed/WindowsFileFilter.java
@@ -7,10 +7,10 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.tabbed;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.tabbed;
import org.eclipse.jface.viewers.IFilter;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
/**
* The filter to test if a object is a Windows file.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsFilter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/tabbed/WindowsFilter.java
index 1c2e9a3b5..a7cdd53d1 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsFilter.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/tabbed/WindowsFilter.java
@@ -7,10 +7,10 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.tabbed;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.tabbed;
import org.eclipse.jface.viewers.IFilter;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
/**
* The filter to test if a object is a Windows node.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsFolderAISection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/tabbed/WindowsFolderAISection.java
index da127b407..dd67a8c81 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsFolderAISection.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/tabbed/WindowsFolderAISection.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.tabbed;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.tabbed;
import org.eclipse.core.runtime.Assert;
import org.eclipse.swt.SWT;
@@ -15,9 +15,9 @@ import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.tcf.te.tcf.filesystem.interfaces.IWindowsFileAttributes;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.filesystem.core.interfaces.IWindowsFileAttributes;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModelProvider;
import org.eclipse.tcf.te.ui.views.tabbed.BaseTitledSection;
import org.eclipse.ui.views.properties.tabbed.ITabbedPropertyConstants;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsFolderFilter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/tabbed/WindowsFolderFilter.java
index 918bbb995..53ce06ebb 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/tabbed/WindowsFolderFilter.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/tabbed/WindowsFolderFilter.java
@@ -7,10 +7,10 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.tabbed;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.tabbed;
import org.eclipse.jface.viewers.IFilter;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
/**
* The filter to test if the object is a Windows folder.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/testers/CachePropertyTester.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/testers/CachePropertyTester.java
index 75e1f2be4..5ab7a7c5a 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/testers/CachePropertyTester.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/testers/CachePropertyTester.java
@@ -8,10 +8,10 @@
* Wind River Systems - initial API and implementation
* William Chen (Wind River)- [345552] Edit the remote files with a proper editor
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.testers;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.testers;
import org.eclipse.core.expressions.PropertyTester;
-import org.eclipse.tcf.te.tcf.filesystem.internal.utils.PersistenceManager;
+import org.eclipse.tcf.te.tcf.filesystem.ui.activator.UIPlugin;
/**
* Provide a tester to test if the current auto saving mode is on or off.
@@ -30,7 +30,7 @@ public class CachePropertyTester extends PropertyTester {
@Override
public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
if(property.equals("isAutoSavingOn")){ //$NON-NLS-1$
- return PersistenceManager.getInstance().isAutoSaving();
+ return UIPlugin.isAutoSaving();
}
return false;
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/testers/ClipboardPropertyTester.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/testers/ClipboardPropertyTester.java
index 57dee255b..d300f4a0f 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/testers/ClipboardPropertyTester.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/testers/ClipboardPropertyTester.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.testers;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.testers;
import java.util.List;
@@ -16,9 +16,9 @@ import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.dnd.Clipboard;
import org.eclipse.swt.dnd.FileTransfer;
-import org.eclipse.tcf.te.tcf.filesystem.activator.UIPlugin;
-import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSClipboard;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.activator.UIPlugin;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.operations.FsClipboard;
/**
* Provide a tester to test if the paste operation is enabled.
*/
@@ -38,7 +38,7 @@ public class ClipboardPropertyTester extends PropertyTester {
public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
Assert.isTrue(receiver instanceof IStructuredSelection);
if (property.equals("canPaste")) { //$NON-NLS-1$
- FSClipboard cb = UIPlugin.getDefault().getClipboard();
+ FsClipboard cb = UIPlugin.getClipboard();
Clipboard clipboard = cb.getSystemClipboard();
Object contents = clipboard.getContents(FileTransfer.getInstance());
if(contents != null) {
@@ -67,9 +67,8 @@ public class ClipboardPropertyTester extends PropertyTester {
}
else if (!cb.isEmpty()) {
List<FSTreeNode> nodes = cb.getFiles();
- int operation = cb.getOperation();
- boolean moving = operation == FSClipboard.CUT;
- boolean copying = operation == FSClipboard.COPY;
+ boolean moving = cb.isCutOp();
+ boolean copying = cb.isCopyOp();
List<FSTreeNode> selection = ((IStructuredSelection) receiver).toList();
FSTreeNode hovered = null;
Assert.isTrue(!selection.isEmpty());
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/testers/EditorActivationEventPropertyTester.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/testers/EditorActivationEventPropertyTester.java
index d53dc7f01..cc02faf5a 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/testers/EditorActivationEventPropertyTester.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/testers/EditorActivationEventPropertyTester.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.testers;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.testers;
import org.eclipse.core.expressions.PropertyTester;
import org.eclipse.core.runtime.Assert;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/FolderValidator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/FolderValidator.java
index 59e677fbd..48580c487 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/FolderValidator.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/FolderValidator.java
@@ -7,12 +7,12 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.wizards;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.wizards;
import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
import org.eclipse.tcf.te.ui.controls.validator.Validator;
/**
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NameValidator.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/NameValidator.java
index 031ece0af..33aefd3e1 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NameValidator.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/NameValidator.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.wizards;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.wizards;
import java.util.ArrayList;
import java.util.List;
@@ -15,10 +15,10 @@ import java.util.List;
import org.eclipse.core.runtime.SafeRunner;
import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.util.SafeRunnable;
-import org.eclipse.tcf.te.tcf.filesystem.internal.celleditor.FSCellValidator;
-import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSOperation;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.Operation;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.celleditor.FSCellValidator;
+import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
import org.eclipse.tcf.te.ui.controls.validator.Validator;
/**
@@ -104,7 +104,7 @@ public class NameValidator extends Validator {
}
@Override
public void run() throws Exception {
- result.addAll(new FSOperation().getChildren(folder));
+ result.addAll(new Operation().getChildren(folder));
}
});
return result;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NewFileWizard.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/NewFileWizard.java
index b1a6aafaf..4f6f6e569 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NewFileWizard.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/NewFileWizard.java
@@ -7,12 +7,12 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.wizards;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.wizards;
-import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSCreate;
-import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSCreateFile;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.OpCreate;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.OpCreateFile;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
/**
* The wizard to create a new file in the file system of Target Explorer.
@@ -33,8 +33,8 @@ public class NewFileWizard extends NewNodeWizard {
* @see org.eclipse.tcf.te.tcf.filesystem.internal.wizards.NewNodeWizard#getCreateOp(org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode, java.lang.String, org.eclipse.tcf.te.runtime.interfaces.callback.ICallback)
*/
@Override
- protected FSCreate getCreateOp(FSTreeNode folder, String name) {
- return new FSCreateFile(folder, name);
+ protected OpCreate getCreateOp(FSTreeNode folder, String name) {
+ return new OpCreateFile(folder, name);
}
/*
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NewFileWizardPage.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/NewFileWizardPage.java
index 0fbbb02c9..b2f812442 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NewFileWizardPage.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/NewFileWizardPage.java
@@ -7,9 +7,9 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.wizards;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.wizards;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
/**
* The wizard page to create a new file in the file system of Target Explorer.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NewFolderWizard.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/NewFolderWizard.java
index d93b72938..296efabbe 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NewFolderWizard.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/NewFolderWizard.java
@@ -7,12 +7,12 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.wizards;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.wizards;
-import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSCreate;
-import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSCreateFolder;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.OpCreate;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.OpCreateFolder;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
/**
* The wizard to create a new folder in the file system of Target Explorer.
@@ -33,8 +33,8 @@ public class NewFolderWizard extends NewNodeWizard {
* @see org.eclipse.tcf.te.tcf.filesystem.internal.wizards.NewNodeWizard#getCreateOp(org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode, java.lang.String, org.eclipse.tcf.te.runtime.interfaces.callback.ICallback)
*/
@Override
- protected FSCreate getCreateOp(FSTreeNode folder, String name) {
- return new FSCreateFolder(folder, name);
+ protected OpCreate getCreateOp(FSTreeNode folder, String name) {
+ return new OpCreateFolder(folder, name);
}
/*
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NewFolderWizardPage.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/NewFolderWizardPage.java
index c3e699b56..8e495f031 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NewFolderWizardPage.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/NewFolderWizardPage.java
@@ -7,9 +7,9 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.wizards;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.wizards;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
/**
* The wizard page to create a new folder in the file system of Target Explorer.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NewNodeWizard.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/NewNodeWizard.java
index 1c2fbb294..343ea1d62 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NewNodeWizard.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/NewNodeWizard.java
@@ -7,17 +7,19 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.wizards;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.wizards;
import java.lang.reflect.InvocationTargetException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.tcf.protocol.Protocol;
-import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSCreate;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.OpCreate;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModelProperties;
import org.eclipse.tcf.te.ui.views.editor.pages.TreeViewerExplorerEditorPage;
@@ -131,9 +133,14 @@ public abstract class NewNodeWizard extends AbstractWizard implements INewWizard
// Get the new name and create the node.
String name = newPage.getNodeName();
FSTreeNode dest = newPage.getInputDir();
- FSCreate create = getCreateOp(dest, name);
+ final OpCreate create = getCreateOp(dest, name);
+ IRunnableWithProgress runnable = new IRunnableWithProgress() {
+ @Override
+ public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+ create.run(monitor);
+ }};
try {
- getContainer().run(false, false, create);
+ getContainer().run(false, false, runnable);
final FSTreeNode newNode = create.getNode();
getShell().getDisplay().asyncExec(new Runnable(){
@Override
@@ -206,7 +213,7 @@ public abstract class NewNodeWizard extends AbstractWizard implements INewWizard
* @param name The name of the new node.
* @return a FSCreate instance to do the creation.
*/
- protected abstract FSCreate getCreateOp(FSTreeNode folder, String name);
+ protected abstract OpCreate getCreateOp(FSTreeNode folder, String name);
/**
* The wizard's title to be used.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NewNodeWizardPage.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/NewNodeWizardPage.java
index e851e7cae..1ed6d275e 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/NewNodeWizardPage.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/NewNodeWizardPage.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.wizards;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.wizards;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.dialogs.Dialog;
@@ -26,14 +26,14 @@ import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
-import org.eclipse.tcf.te.tcf.filesystem.controls.FSTreeContentProvider;
-import org.eclipse.tcf.te.tcf.filesystem.controls.FSTreeViewerSorter;
-import org.eclipse.tcf.te.tcf.filesystem.help.IContextHelpIds;
-import org.eclipse.tcf.te.tcf.filesystem.interfaces.IFSConstants;
-import org.eclipse.tcf.te.tcf.filesystem.internal.columns.FSTreeElementLabelProvider;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSModel;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSModel;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.controls.FSTreeContentProvider;
+import org.eclipse.tcf.te.tcf.filesystem.ui.controls.FSTreeViewerSorter;
+import org.eclipse.tcf.te.tcf.filesystem.ui.help.IContextHelpIds;
+import org.eclipse.tcf.te.tcf.filesystem.ui.interfaces.IFSConstants;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.columns.FSTreeElementLabelProvider;
+import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
import org.eclipse.tcf.te.ui.controls.BaseEditBrowseTextControl;
import org.eclipse.tcf.te.ui.forms.FormLayoutFactory;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/TargetContentProvider.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/TargetContentProvider.java
index 2526bdc26..0592a2dc1 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/TargetContentProvider.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/TargetContentProvider.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.wizards;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.wizards;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.Viewer;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/TargetPatternFilter.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/TargetPatternFilter.java
index ed16bf508..78b71b7ed 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/TargetPatternFilter.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/TargetPatternFilter.java
@@ -1,4 +1,4 @@
-package org.eclipse.tcf.te.tcf.filesystem.internal.wizards;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.wizards;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/TargetSelectionPage.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/TargetSelectionPage.java
index 30fd1a3f2..785b2bf2a 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/internal/wizards/TargetSelectionPage.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/internal/wizards/TargetSelectionPage.java
@@ -7,7 +7,7 @@
* Contributors:
* Wind River Systems - initial API and implementation
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.internal.wizards;
+package org.eclipse.tcf.te.tcf.filesystem.ui.internal.wizards;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogSettings;
@@ -30,7 +30,7 @@ import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
-import org.eclipse.tcf.te.tcf.filesystem.nls.Messages;
+import org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
import org.eclipse.tcf.te.tcf.locator.model.Model;
import org.eclipse.tcf.te.tcf.ui.navigator.LabelProvider;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/nls/Messages.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/nls/Messages.java
index 6b662fb84..8e659d1d6 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/nls/Messages.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/nls/Messages.java
@@ -8,7 +8,7 @@
* Wind River Systems - initial API and implementation
* William Chen (Wind River) - [345384] Provide property pages for remote file system nodes
*******************************************************************************/
-package org.eclipse.tcf.te.tcf.filesystem.nls;
+package org.eclipse.tcf.te.tcf.filesystem.ui.nls;
import java.lang.reflect.Field;
@@ -20,7 +20,7 @@ import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
// The plug-in resource bundle name
- private static final String BUNDLE_NAME = "org.eclipse.tcf.te.tcf.filesystem.nls.Messages"; //$NON-NLS-1$
+ private static final String BUNDLE_NAME = "org.eclipse.tcf.te.tcf.filesystem.ui.nls.Messages"; //$NON-NLS-1$
/**
* Static constructor.
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/nls/Messages.properties b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/nls/Messages.properties
new file mode 100644
index 000000000..e149108a3
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.filesystem/src/org/eclipse/tcf/te/tcf/filesystem/ui/nls/Messages.properties
@@ -0,0 +1,279 @@
+FolderValidator_SpecifyFolder=Please specify the folder where the file/folder is going to be created.
+#
+# org.eclipse.tcf.te.tcf.filesystem
+# Externalized Strings.
+#
+
+FolderValidator_DirNotExist=The directory {0} does not exist in the current target.
+FolderValidator_NotWritable=The directory {0} is not writable. Please choose a different one.
+
+FSExplorerTreeControl_section_title=Exploring File System
+
+FSFolderSelectionDialog_MoveDialogMessage=Choose destination for the files to be moved:
+FSFolderSelectionDialog_MoveDialogTitle=Move Files and Folders
+
+FSTreeControl_column_name_label=Name
+FSTreeControl_column_size_label=Size
+FSTreeControl_column_modified_label=Date Modified
+
+FSTreeNode_TypeFile=file
+FSTreeNode_TypeFileFolder=File Folder
+FSTreeNode_TypeLocalDisk=Local Disk
+FSTreeNode_TypeSystemFile=System file
+
+FSTreeNodeContentProvider_rootNode_label=File System
+
+FSOpenFileDialog_message=Please select an image file for the process.
+FSOpenFileDialog_title=Select Process Image
+
+FSOperation_CopyNOfFile=Copy ({0}) of {1}
+FSOperation_CopyOfFile=Copy of {0}
+
+GeneralInformationPage_Accessed=Accessed:
+GeneralInformationPage_Advanced=\ A&dvanced...
+GeneralInformationPage_Attributes=Attributes:
+GeneralInformationPage_File=File ({0})
+GeneralInformationPage_FileSizeInfo={0} KB ({1} bytes)
+GeneralInformationPage_Folder=Folder
+GeneralInformationPage_Hidden=Hidden
+GeneralInformationPage_ReadOnly=Read-only
+GeneralInformationPage_Computer=computer
+GeneralInformationPage_Location=Location:
+GeneralInformationPage_Modified=Modified:
+GeneralInformationPage_Name=Name:
+GeneralInformationPage_Size=Size:
+GeneralInformationPage_Type=Type:
+GeneralInformationPage_PermissionText=Permissions:
+GeneralInformationPage_PropertiesChangeFailure=Properties changes to {0} failed due to the following reason:{1}
+GeneralInformationPage_PropertiesChangeTitle=Properties Change
+GeneralInformationPage_UnknownFileType=Unknown File
+
+AdvancedAttributesDialog_Archive=Archive
+AdvancedAttributesDialog_ArchiveIndex=Archive and Index attributes
+AdvancedAttributesDialog_Compress=Compress contents to save disk space
+AdvancedAttributesDialog_Compressed=Compressed
+AdvancedAttributesDialog_CompressEncrypt=Compress or Encrypt attributes
+AdvancedAttributesDialog_Device=Device
+AdvancedAttributesDialog_Directory=Directory
+AdvancedAttributesDialog_Encrypt=Encrypt contents to secure data
+AdvancedAttributesDialog_Encrypted=Encrypted
+AdvancedAttributesDialog_FileArchive=File is ready for archiving
+AdvancedAttributesDialog_FileBanner=Choose the options you want for this file.
+AdvancedAttributesDialog_FolderArchive=Folder is ready for archiving
+AdvancedAttributesDialog_FolderBanner=Choose the settings you want for this folder.\n\nWhen you apply these changes you will be asked if you want the\n changes to affect all subfolders and files as well.
+AdvancedAttributesDialog_Hidden=Hidden
+AdvancedAttributesDialog_Indexed=Indexed
+AdvancedAttributesDialog_IndexFile=For fast searching, allow Indexing Service to index this file
+AdvancedAttributesDialog_IndexFolder=For fast searching, allow Indexing Service to index this folder
+AdvancedAttributesDialog_Normal=Normal
+AdvancedAttributesDialog_Offline=Offline
+AdvancedAttributesDialog_ReadOnly=Read-only
+AdvancedAttributesDialog_Reparse=Reparse
+AdvancedAttributesDialog_ShellTitle=Advanced Attributes
+AdvancedAttributesDialog_Sparse=Sparse
+AdvancedAttributesDialog_System=System
+AdvancedAttributesDialog_Temporary=Temporary
+AdvancedAttributesDialog_Virtual=Virtual
+BasicFolderSection_BasicInfoText=Basic Information
+
+CacheManager_Bytes=\ bytes
+CacheManager_DowloadingFile=Downloading file {0}...
+CacheManager_DownloadingError=Downloading Error
+CacheManager_DownloadingProgress=Downloading {0}/{1}.
+CacheManager_KBs=\ KBs
+CacheManager_MBs=\ MBs
+CacheManager_MkdirFailed=Making directory {0} failed
+CacheManager_SetLastModifiedFailed=Setting the last modified time of {0} failed\!
+CacheManager_SetReadOnlyFailed=Setting the read-only attribute of {0} failed\!
+CacheManager_UploadingProgress=Uploading file {0}: {1}/{2}
+CacheManager_UploadNFiles=Uploading {0} files...
+CacheManager_UploadSingleFile=Uploading file {0}...
+
+CmmitHandler_Cancel=Cancel
+CmmitHandler_CommitAnyway=Commit anyway
+CmmitHandler_ErrorTitle=File Deleted
+CmmitHandler_FileDeleted=The local file {0} that you are trying to commit has been deleted\!
+CmmitHandler_Merge=Merge
+CmmitHandler_StateChangedDialogTitle=State Changed
+CmmitHandler_StateChangedMessage={0} on the target has changed and is conflicting with the local file. What do you want?
+FSDelete_ButtonCancel=Cancel
+FSDelete_ButtonNo=&No
+FSDelete_ButtonYes=&Yes
+FSDelete_ButtonYes2All=Yes to &All
+FSDelete_CannotRemoveFile=Cannot remove the file {0}\!. Caused by {1}
+FSDelete_CannotRemoveFolder=Cannot remove the folder {0}\!. Caused by {1}
+FSDelete_ConfirmDelete=Confirm Delete
+DeleteFilesHandler_ConfirmDialogTitle=Confirm Delete
+FSDelete_ConfirmMessage=Are you sure you want to remove the read-only file {0}?
+DeleteFilesHandler_DeleteMultipleFilesConfirmation=Are you sure you want to delete these {0} files/folders?
+DeleteFilesHandler_DeleteOneFileConfirmation=Are you sure you want to delete {0}?
+FSDelete_Deleting=Deleting files
+FSDelete_PrepareToDelete=Prepare to delete files ...
+FSDelete_RemovingFileFolder=Removing {0} ...
+
+LinuxPermissionsSection_Permissions=Permissions
+LocalTypedElement_SavingFile=Saving file:
+
+OpenFileHandler_Cancel=Cancel
+OpenFileHandler_ConflictingMessage=The local {0} is conflicting with the remote version. What do you want?
+OpenFileHandler_ConflictingTitle=Conflicting content
+OpenFileHandler_Merge=Merge
+OpenFileHandler_OpenAnyway=Open anyway
+OpenFileHandler_OpeningBinaryNotSupported=Opening a binary file is not supported yet.
+OpenFileHandler_Warning=Warning
+
+OpenWithMenu_ChooseEditorForOpening=Choose the editor for opening {0}
+OpenWithMenu_DefaultEditor=&Default Editor
+OpenWithMenu_NoEditorFound=No editor found to edit the file resource.
+OpenWithMenu_OpenWith=Open With
+
+FSCopy_CannotCopyFile=Cannot copy file {0} because: {1}
+FSOperation_CannotCreateDirectory=Cannot create the directory {0} because: {1}
+FSMove_CannotMove=Cannot move {0} because {1}
+FSMove_FileExistsError=Cannot replace {0}: There is already a file with the same name as the folder you are moving.
+FSMove_FolderExistsError=Cannot replace {0}: There is already a folder with the same name as the file you are moving.
+FSRename_CannotRename=Cannot rename {0} because {1}
+FSRename_JobTitle=Renaming
+FSOperation_ConfirmDialogCancel=Cancel
+FSOperation_ConfirmDialogNo=&No
+FSOperation_ConfirmDialogYes=&Yes
+FSOperation_ConfirmDialogYesToAll=Yes to &All
+FSOperation_ConfirmFileReplace=Confirm File Replace
+FSOperation_ConfirmFileReplaceMessage=This folder already contains a file named {0}.\n\n If the files in the existing folder have the same name as files in the folder you are moving or copying, they will be replaced. Do you still want to move or copy the file?
+FSOperation_ConfirmFolderReplaceMessage=This folder already contains a folder named {0}.\n\n If the files in the existing folder have the same name as files in the folder you are moving or copying, they will be replaced. Do you still want to move or copy the folder?
+FSOperation_ConfirmFolderReplaceTitle=Confirm Folder Replace
+FSCopy_CopyFileFolderTitle=Error Copying File or Folder
+FSMove_MoveFileFolderTitle=Error Moving File or Folder
+FSRename_RenameFileFolderTitle=Error Renaming File or Folder
+FSDelete_DeleteFileFolderTitle=Error Deleting File or Folder
+FSDropTargetListener_ConfirmMoveTitle=Confirm Move
+FSDropTargetListener_MovingWarningMultiple=This operation will delete the files after moving. You can copy them without deletion by ctrl + dragging. \n\nAre you sure you want to move these {0} files/folders?
+FSDropTargetListener_MovingWarningSingle=This operation will delete the file after moving. You can copy it without deletion by ctrl + dragging. \n\nAre you sure you want to move {0}?
+FSCopy_Copying=Copying {0} ...
+FSCopy_CopyingFile=Copying files
+FSMove_MovingFile=Moving files
+FSMove_Moving=Moving {0} ...
+FSOperation_NoFileSystemError=This TCF agent, {0}, does not provide a file system service\!
+FSOperation_NotResponding=The TCF agent on the target {0} is probably down. It is not responding.
+FSCopy_PrepareToCopy=Prepare to copy files ...
+FSCreate_CreationFailed=Creation Failed
+FSCreate_JobTitle=Create file or folder
+FSCreate_TaskName=Creating {0}...
+FSMove_PrepareToMove=Prepare to move files...
+PermissionsGroup_Executable=Executable
+PermissionsGroup_GroupPermissions=Group:
+PermissionsGroup_OtherPermissions=Other:
+PermissionsGroup_Readable=Readable
+PermissionsGroup_UserPermissions=User:
+PermissionsGroup_Writable=Writable
+
+RefreshDirectoryHandler_RefreshJobTitle=Refresh {0}
+RefreshViewerHandler_RefreshJobTitle=Refresh the file system
+RemoteTypedElement_GettingRemoteContent=Getting content from the remote file:
+RenameFilesHandler_PromptNewName=New name:
+RenameFilesHandler_RenamePromptMessage=Please enter a new name
+RenameFilesHandler_TitleRename=Rename
+RenameFilesHandler_TitleRenameFile=Rename File
+RenameFilesHandler_TitleRenameFolder=Rename Folder
+FSRenamingAssistant_NameAlreadyExists=A file/folder with the name you specified already exists\! Specify a different name.
+FSRenamingAssistant_NoNodeSelected=No node is selected.
+FSRenamingAssistant_SpecifyNonEmptyName=Specify a non-empty name.
+FSRenamingAssistant_UnixIllegalCharacters=A file/folder name cannot contain any of the following characters:\n/
+FSRenamingAssistant_WinIllegalCharacters=A file/folder name cannot contain any of the following characters:\n\\/:*?<>|
+
+SaveAllListener_Cancel=Cancel
+SaveAllListener_Merge=Merge
+SaveAllListener_SaveAnyway=Save anyway
+SaveAllListener_SingularMessage=The file {0} on the target has changed and is conflicting with the local file. What do you want?
+SaveAllListener_StateChangedDialogTitle=State Changed
+
+SaveListener_Cancel=Cancel
+SaveListener_Merge=Merge
+SaveListener_SaveAnyway=Save anyway
+SaveListener_StateChangedDialogTitle=State Changed
+SaveListener_StateChangedMessage={0} on the target has changed and is conflicting with the local file. What do you want?
+
+StateManager_CannotGetFileStateMessage2=Cannot get the file's stat of {0}\!. Caused by {1}
+StateManager_CannotGetFileStatMessage=Cannot get the file's stat of {0}\!. Caused by {1}
+StateManager_CannotSetFileStateMessage=Cannot set the file's stat of {0}\!. Caused by {1}
+StateManager_CannotSetFileStateMessage2=Cannot set the file's stat of {0}\!. Caused by {1}
+StateManager_CommitFailureTitle=Commit Failure
+StateManager_RefreshFailureTitle=Refresh Failure
+StateManager_TCFNotProvideFSMessage=This TCF agent, {0}, does not provide a file system service\!
+StateManager_TCFNotProvideFSMessage2=This TCF agent, {0}, does not provide a file system service\!
+StateManager_UpdateFailureTitle=Update Failure
+
+PreferencePage_AutoSavingText=Automatically upload files to targets upon saving
+PreferencePage_CopyOwnershipText=Copy source UID and GID when copying files
+PreferencePage_CopyPermissionText=Copy source permissions when copying files
+PreferencePage_RenamingOptionText=Use In-place Editor when renaming a file/folder
+TargetSelectionPage_Description=Please select the target where the new file/folder is created.
+TargetSelectionPage_Targets=Targets:
+TargetSelectionPage_Title=Select the target.
+TcfInputStream_CloseTimeout=Closing has timed out\!
+TcfInputStream_NoDataAvailable=No data available
+TcfInputStream_NoFileReturned=No file handle returned\!
+TcfInputStream_NoFSServiceAvailable=No remote File System Service available\!
+TcfInputStream_OpenFileTimeout=Opening file has timed out\!
+TcfInputStream_OpenTCFTimeout=Opening TCF channel has timed out\!
+TcfInputStream_ReadTimeout=Reading has timed out\!
+TcfInputStream_StreamClosed=Stream is already closed\!
+
+TcfOutputStream_StreamClosed=Stream is already closed\!
+TcfOutputStream_WriteTimeout=Writing has timed out\!
+
+TcfURLConnection_CloseFileTimeout=Closing has timed out\!
+TcfURLConnection_NoFileHandleReturned=No file handle returned\!
+TcfURLConnection_NoFSServiceAvailable=No remote File System Service available\!
+TcfURLConnection_NoPeerFound=Cound find the specified peer with the ID {0}
+TcfURLConnection_NoSuchTcfAgent=TCF agent is already disconnected\!
+TcfURLConnection_OpenFileTimeout=Opening file has timed out\!
+TcfURLConnection_OpenTCFChannelTimeout=Opening TCF channel has timed out\!
+TcfURLStreamHandlerService_ErrorURLFormat=Error TCF URL format\!
+TcfURLStreamHandlerService_IllegalCharacter=A Windows path does not permit character {0}.
+TcfURLStreamHandlerService_OnlyDiskPartError=A Windows path should not contain only disk part.
+
+OpeningChannelFailureMessage=We cannot open a TCF channel to the target: {0}. It is caused by {1}.
+OpeningChannelFailureTitle=Opening Channel
+
+UpdateHandler_Cancel=Cancel
+UpdateHandler_Merge=Merge
+UpdateHandler_StateChangedDialogTitle=State Changed
+UpdateHandler_StateChangedMessage=The local {0} has changed and is conflicting with the remote file. What do you want?
+UpdateHandler_UpdateAnyway=Update anyway
+
+UserManager_CannotGetUserAccountMessage=Cannot get the user account from the agent {0}
+UserManager_CannotGetUserAccountMessage2=Cannot get the user account from the agent {0}. Caused by: networking too slow.
+UserManager_TCFNotProvideFSMessage=This TCF agent, {0}, does not provide a file system service\!
+UserManager_UserAccountTitle=User Account
+
+FSOperation_CannotOpenDir=Cannot open directory {0} because {1}
+FSOperation_CannotReadDir=Cannot read directory {0} because {1}
+FSOperation_DeletingFileFailed=Deleting {0} failed\!
+FSOperation_TimedOutWhenOpening=it has timed out when opening the directory\!
+FSUpload_Cancel=Cancel
+FSUpload_No=No
+FSUpload_OverwriteConfirmation=A file with a same name already exists. Are you sure to overwrite {0}?
+FSUpload_OverwriteTitle=Confirm Overwrite
+FSUpload_UploadTitle=Upload Files
+FSUpload_Yes=Yes
+FSUpload_YesToAll=Yes to All
+MergeEditorInput_CompareLeftAndRight=Compare {0} and {1}
+MergeEditorInput_CompareWithLocalCache=Compare {0} with Local Cache
+MergeEditorInput_LocalFile=Local: {0}
+MergeEditorInput_RemoteFile=Remote: {0}
+MergeInput_CopyNotSupported=Copy is not support by this type of compare input
+NameValidator_SpecifyFolder=Please specify the folder where the file/folder is going to be created.
+NewFileWizard_NewFileWizardTitle=New File Wizard
+NewFileWizardPage_NewFileWizardPageDescription=Create a new file in the directory.
+NewFileWizardPage_NewFileWizardPageNameLabel=File name:
+NewFileWizardPage_NewFileWizardPageTitle=New File
+NewFolderWizard_NewFolderWizardTitle=New Folder Wizard
+NewFolderWizardPage_NewFolderWizardPageDescription=Create a new folder in the directory.
+NewFolderWizardPage_NewFolderWizardPageNameLabel=Folder name:
+NewFolderWizardPage_NewFolderWizardPageTitle=New Folder
+NewNodeWizardPage_LstatTimedout=lstat timed out\!
+NewNodeWizardPage_PromptFolderLabel=Enter or select the parent folder:
+WindowsAttributesSection_Attributes=Attributes
+PendingOperation_label=Pending...
+QueryDoneOpenChannel_NoFService=No File System service\!
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/META-INF/MANIFEST.MF
index caf33a6c3..5b5f09e4b 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/META-INF/MANIFEST.MF
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/META-INF/MANIFEST.MF
@@ -18,10 +18,11 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
org.eclipse.tcf.te.tcf.locator;bundle-version="1.0.0",
org.eclipse.tcf.te.ui.forms;bundle-version="1.0.0",
org.eclipse.ui.forms;bundle-version="3.5.100",
- org.eclipse.tcf.te.tcf.filesystem;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.filesystem.ui;bundle-version="1.0.0",
org.eclipse.tcf.te.tcf.processes.core;bundle-version="1.0.0",
org.eclipse.tcf.te.ui.controls;bundle-version="1.0.0",
- org.eclipse.tcf.te.runtime.model;bundle-version="1.0.0"
+ org.eclipse.tcf.te.runtime.model;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.filesystem.core;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/LaunchConfigurationMainTabSection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/LaunchConfigurationMainTabSection.java
index ff4132bbc..971775257 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/LaunchConfigurationMainTabSection.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/LaunchConfigurationMainTabSection.java
@@ -22,8 +22,8 @@ import org.eclipse.tcf.te.launch.core.persistence.DefaultPersistenceDelegate;
import org.eclipse.tcf.te.launch.core.persistence.launchcontext.LaunchContextsPersistenceDelegate;
import org.eclipse.tcf.te.launch.ui.interfaces.ILaunchConfigurationTabFormPart;
import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode;
-import org.eclipse.tcf.te.tcf.filesystem.dialogs.FSOpenFileDialog;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.dialogs.FSOpenFileDialog;
import org.eclipse.tcf.te.tcf.launch.core.interfaces.IRemoteAppLaunchAttributes;
import org.eclipse.tcf.te.tcf.launch.ui.nls.Messages;
import org.eclipse.tcf.te.ui.controls.BaseEditBrowseTextControl;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/filetransfer/AddEditFileTransferDialog.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/filetransfer/AddEditFileTransferDialog.java
index 3b2793969..1e0a5e978 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/filetransfer/AddEditFileTransferDialog.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/remote/app/filetransfer/AddEditFileTransferDialog.java
@@ -34,9 +34,9 @@ import org.eclipse.tcf.te.launch.core.interfaces.IFileTransferItem;
import org.eclipse.tcf.te.launch.core.persistence.filetransfer.FileTransferItem;
import org.eclipse.tcf.te.launch.core.persistence.filetransfer.FileTransferItemValidator;
import org.eclipse.tcf.te.runtime.model.interfaces.IModelNode;
-import org.eclipse.tcf.te.tcf.filesystem.dialogs.FSFolderSelectionDialog;
-import org.eclipse.tcf.te.tcf.filesystem.dialogs.FSOpenFileDialog;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.dialogs.FSFolderSelectionDialog;
+import org.eclipse.tcf.te.tcf.filesystem.ui.dialogs.FSOpenFileDialog;
import org.eclipse.tcf.te.tcf.launch.ui.nls.Messages;
import org.eclipse.tcf.te.ui.controls.BaseEditBrowseTextControl;
import org.eclipse.tcf.te.ui.jface.dialogs.CustomTitleAreaDialog;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/META-INF/MANIFEST.MF
index ce412cfd8..e1fe52301 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/META-INF/MANIFEST.MF
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/META-INF/MANIFEST.MF
@@ -17,11 +17,12 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
org.eclipse.tcf.te.ui.views;bundle-version="1.0.0",
org.eclipse.tcf.te.tcf.core;bundle-version="1.0.0",
org.eclipse.tcf.te.tcf.locator;bundle-version="1.0.0",
- org.eclipse.tcf.te.tcf.filesystem;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.filesystem.ui;bundle-version="1.0.0",
org.eclipse.tcf.te.tcf.processes.core;bundle-version="1.0.0",
org.eclipse.ui.navigator,
org.eclipse.core.expressions,
- org.eclipse.ui.views.properties.tabbed;bundle-version="3.5.200"
+ org.eclipse.ui.views.properties.tabbed;bundle-version="3.5.200",
+ org.eclipse.tcf.te.tcf.filesystem.core;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/dialogs/LaunchObjectDialog.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/dialogs/LaunchObjectDialog.java
index a02e2620c..45f7049c6 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/dialogs/LaunchObjectDialog.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.processes.ui/src/org/eclipse/tcf/te/tcf/processes/ui/internal/dialogs/LaunchObjectDialog.java
@@ -33,8 +33,8 @@ import org.eclipse.swt.widgets.Text;
import org.eclipse.tcf.te.core.utils.text.StringUtil;
import org.eclipse.tcf.te.runtime.services.interfaces.constants.ILineSeparatorConstants;
import org.eclipse.tcf.te.runtime.services.interfaces.constants.ITerminalsConnectorConstants;
-import org.eclipse.tcf.te.tcf.filesystem.dialogs.FSOpenFileDialog;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.dialogs.FSOpenFileDialog;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModel;
import org.eclipse.tcf.te.tcf.processes.core.interfaces.launcher.IProcessLauncher;
import org.eclipse.tcf.te.tcf.processes.ui.help.IContextHelpIds;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/META-INF/MANIFEST.MF b/target_explorer/plugins/org.eclipse.tcf.te.tests/META-INF/MANIFEST.MF
index f39092cd4..1654f15c2 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/META-INF/MANIFEST.MF
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/META-INF/MANIFEST.MF
@@ -15,12 +15,13 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
org.eclipse.tcf.te.runtime.statushandler;bundle-version="1.0.0",
org.eclipse.tcf.te.runtime.stepper;bundle-version="1.0.0",
org.eclipse.tcf.te.tcf.locator;bundle-version="1.0.0",
- org.eclipse.tcf.te.tcf.filesystem;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.filesystem.ui;bundle-version="1.0.0",
org.eclipse.tcf.te.tcf.core;bundle-version="1.0.0",
org.eclipse.tcf.te.ui.views;bundle-version="1.0.0",
org.eclipse.tcf.te.ui;bundle-version="1.0.0",
org.eclipse.core.expressions;bundle-version="3.4.300",
- org.eclipse.tcf.te.tcf.processes.ui;bundle-version="1.0.0"
+ org.eclipse.tcf.te.tcf.processes.ui;bundle-version="1.0.0",
+ org.eclipse.tcf.te.tcf.filesystem.core;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/FSPeerTestCase.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/FSPeerTestCase.java
index 323914a5e..0849638e0 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/FSPeerTestCase.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/FSPeerTestCase.java
@@ -19,15 +19,14 @@ import org.eclipse.tcf.services.IFileSystem.DoneStat;
import org.eclipse.tcf.services.IFileSystem.FileAttrs;
import org.eclipse.tcf.services.IFileSystem.FileSystemException;
import org.eclipse.tcf.te.tcf.core.Tcf;
-import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSCreateFile;
-import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSCreateFolder;
-import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSOperation;
-import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSRefresh;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSModel;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.OpCreateFile;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.OpCreateFolder;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.Operation;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.OpRefresh;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSModel;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
import org.eclipse.tcf.te.tests.tcf.TcfTestCase;
-@SuppressWarnings("restriction")
public class FSPeerTestCase extends TcfTestCase {
protected FSTreeNode testRoot;
@@ -89,7 +88,7 @@ public class FSPeerTestCase extends TcfTestCase {
printDebugMessage("Prepare folder " + folderPath); //$NON-NLS-1$
FSTreeNode testFolder = getFSNode(folderPath);
if (testFolder == null) {
- FSCreateFolder fs = new FSCreateFolder(parentFolder, folderName);
+ OpCreateFolder fs = new OpCreateFolder(parentFolder, folderName);
fs.run(new NullProgressMonitor());
testFolder = getFSNode(folderPath);
}
@@ -99,9 +98,9 @@ public class FSPeerTestCase extends TcfTestCase {
protected boolean pathExists(String path) {
IChannel channel = null;
try {
- channel = FSOperation.openChannel(peer);
+ channel = Operation.openChannel(peer);
if (channel != null) {
- IFileSystem service = FSOperation.getBlockingFileSystem(channel);
+ IFileSystem service = Operation.getBlockingFileSystem(channel);
if (service != null) {
final boolean[] exists = new boolean[1];
service.lstat(path, new DoneStat() {
@@ -125,7 +124,7 @@ public class FSPeerTestCase extends TcfTestCase {
protected FSTreeNode getFSNode(String path) {
FSTreeNode node = FSModel.findTreeNode(peerModel, path);
if (node == null) {
- FSRefresh refresh = new FSRefresh(testRoot, null);
+ OpRefresh refresh = new OpRefresh(testRoot);
try {
refresh.run(new NullProgressMonitor());
} catch (Exception e) {}
@@ -139,7 +138,7 @@ public class FSPeerTestCase extends TcfTestCase {
printDebugMessage("Prepare file " + filePath); //$NON-NLS-1$
FSTreeNode testFile = getFSNode(filePath);
if (testFile == null) {
- FSCreateFile fs = new FSCreateFile(parentFolder, fileName);
+ OpCreateFile fs = new OpCreateFile(parentFolder, fileName);
fs.run(new NullProgressMonitor());
testFile = getFSNode(filePath);
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/adapters/DeleteHandlerDelegateTest.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/adapters/DeleteHandlerDelegateTest.java
index cf7a83c38..5461c86b9 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/adapters/DeleteHandlerDelegateTest.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/adapters/DeleteHandlerDelegateTest.java
@@ -16,8 +16,8 @@ import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.tcf.te.runtime.callback.Callback;
import org.eclipse.tcf.te.runtime.properties.PropertiesContainer;
-import org.eclipse.tcf.te.tcf.filesystem.interfaces.IConfirmCallback;
-import org.eclipse.tcf.te.tcf.filesystem.internal.adapters.DeleteHandlerDelegate;
+import org.eclipse.tcf.te.tcf.filesystem.core.interfaces.IConfirmCallback;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.adapters.DeleteHandlerDelegate;
import org.eclipse.tcf.te.tests.tcf.filesystem.FSPeerTestCase;
import org.eclipse.tcf.te.ui.views.interfaces.handler.IDeleteHandlerDelegate;
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/callbacks/QueryChildrenCallbackTest.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/callbacks/QueryChildrenCallbackTest.java
index bfec631d8..16ce959a1 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/callbacks/QueryChildrenCallbackTest.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/callbacks/QueryChildrenCallbackTest.java
@@ -16,10 +16,9 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.tcf.te.runtime.callback.Callback;
import org.eclipse.tcf.te.tcf.core.Tcf;
-import org.eclipse.tcf.te.tcf.filesystem.internal.callbacks.QueryDoneOpenChannel;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.callbacks.QueryDoneOpenChannel;
import org.eclipse.tcf.te.tests.tcf.filesystem.FSPeerTestCase;
-@SuppressWarnings("restriction")
public class QueryChildrenCallbackTest extends FSPeerTestCase {
public void testQueryChildren() throws Exception {
Assert.isNotNull(testRoot);
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/controls/ContentProviderTest.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/controls/ContentProviderTest.java
index 51a3108e3..22fa9cb0e 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/controls/ContentProviderTest.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/controls/ContentProviderTest.java
@@ -9,7 +9,7 @@
*******************************************************************************/
package org.eclipse.tcf.te.tests.tcf.filesystem.controls;
-import org.eclipse.tcf.te.tcf.filesystem.controls.FSNavigatorContentProvider;
+import org.eclipse.tcf.te.tcf.filesystem.ui.controls.FSNavigatorContentProvider;
import org.eclipse.tcf.te.tests.tcf.filesystem.FSPeerTestCase;
public class ContentProviderTest extends FSPeerTestCase {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/controls/ViewerComparatorTest.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/controls/ViewerComparatorTest.java
index daec6b73c..71316cd19 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/controls/ViewerComparatorTest.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/controls/ViewerComparatorTest.java
@@ -9,7 +9,7 @@
*******************************************************************************/
package org.eclipse.tcf.te.tests.tcf.filesystem.controls;
-import org.eclipse.tcf.te.tcf.filesystem.controls.FSTreeViewerSorter;
+import org.eclipse.tcf.te.tcf.filesystem.ui.controls.FSTreeViewerSorter;
import org.eclipse.tcf.te.tests.tcf.filesystem.FSPeerTestCase;
public class ViewerComparatorTest extends FSPeerTestCase {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/dnd/CommonDnDTest.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/dnd/CommonDnDTest.java
index 8a49a3af7..b5e641ef2 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/dnd/CommonDnDTest.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/dnd/CommonDnDTest.java
@@ -14,8 +14,8 @@ import java.io.File;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.swt.dnd.DND;
-import org.eclipse.tcf.te.tcf.filesystem.internal.dnd.CommonDnD;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.dnd.CommonDnD;
import org.eclipse.tcf.te.tests.tcf.filesystem.operations.OperationTestBase;
@SuppressWarnings("restriction")
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/filters/HiddenFilesViewerFilterTest.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/filters/HiddenFilesViewerFilterTest.java
index 217f37393..b9482c891 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/filters/HiddenFilesViewerFilterTest.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/filters/HiddenFilesViewerFilterTest.java
@@ -10,7 +10,7 @@
package org.eclipse.tcf.te.tests.tcf.filesystem.filters;
import org.eclipse.tcf.te.runtime.utils.Host;
-import org.eclipse.tcf.te.tcf.filesystem.filters.HiddenFilesViewerFilter;
+import org.eclipse.tcf.te.tcf.filesystem.ui.filters.HiddenFilesViewerFilter;
import org.eclipse.tcf.te.tests.tcf.filesystem.FSPeerTestCase;
public class HiddenFilesViewerFilterTest extends FSPeerTestCase {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/filters/SystemFilesViewerFilterTest.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/filters/SystemFilesViewerFilterTest.java
index 07122e7e6..06346a67b 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/filters/SystemFilesViewerFilterTest.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/filters/SystemFilesViewerFilterTest.java
@@ -10,7 +10,7 @@
package org.eclipse.tcf.te.tests.tcf.filesystem.filters;
import org.eclipse.tcf.te.runtime.utils.Host;
-import org.eclipse.tcf.te.tcf.filesystem.filters.SystemFilesViewerFilter;
+import org.eclipse.tcf.te.tcf.filesystem.ui.filters.SystemFilesViewerFilter;
import org.eclipse.tcf.te.tests.tcf.filesystem.FSPeerTestCase;
public class SystemFilesViewerFilterTest extends FSPeerTestCase {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/FSCacheCommitTest.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/FSCacheCommitTest.java
new file mode 100644
index 000000000..d3a8f39c3
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/FSCacheCommitTest.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tests.tcf.filesystem.operations;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.net.URL;
+
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.utils.CacheManager;
+
+public class FSCacheCommitTest extends OperationTestBase {
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ File file = CacheManager.getInstance().getCacheFile(testFile);
+ BufferedWriter writer = new BufferedWriter(new FileWriter(file));
+ writer.write("Hello, world, this is called from client!"); //$NON-NLS-1$
+ writer.close();
+ }
+
+ protected String readFileContent() throws IOException {
+ printDebugMessage("Read file " + testFile.getLocation() + "..."); //$NON-NLS-1$ //$NON-NLS-2$
+ URL url = testFile.getLocationURL();
+ BufferedReader reader = null;
+ try {
+ reader = new BufferedReader(new InputStreamReader(url.openStream()));
+ StringBuilder buffer = new StringBuilder();
+ String line;
+ while ((line = reader.readLine()) != null) {
+ buffer.append(line);
+ }
+ return buffer.toString();
+ }
+ finally {
+ if (reader != null) {
+ try {
+ reader.close();
+ }
+ catch (Exception e) {
+ }
+ }
+ }
+ }
+
+ public void testCommit() throws Exception {
+ commitCache(testFile);
+ String content = readFileContent();
+ assertEquals("Hello, world, this is called from client!", content); //$NON-NLS-1$
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/FSCacheUpdateTest.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/FSCacheUpdateTest.java
new file mode 100644
index 000000000..17cb14e80
--- /dev/null
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/FSCacheUpdateTest.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Wind River Systems, Inc. and others. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.te.tests.tcf.filesystem.operations;
+
+import java.io.BufferedOutputStream;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.net.URL;
+
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.url.TcfURLConnection;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.utils.CacheManager;
+
+public class FSCacheUpdateTest extends OperationTestBase {
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ printDebugMessage("Write file " + testFile.getLocation() + "..."); //$NON-NLS-1$ //$NON-NLS-2$
+ BufferedOutputStream output = null;
+ try {
+ URL url = testFile.getLocationURL();
+ TcfURLConnection connection = (TcfURLConnection) url.openConnection();
+ connection.setDoInput(false);
+ connection.setDoOutput(true);
+ output = new BufferedOutputStream(connection.getOutputStream());
+ output.write("Hello, world!".getBytes()); //$NON-NLS-1$
+ output.flush();
+ }
+ finally {
+ if (output != null) {
+ try {
+ output.close();
+ }
+ catch (Exception e) {
+ }
+ }
+ }
+ }
+
+ public void testUpdate() throws Exception {
+ updateCache(testFile);
+ File file = CacheManager.getInstance().getCacheFile(testFile);
+ BufferedReader reader = new BufferedReader(new FileReader(file));
+ String content=""; //$NON-NLS-1$
+ String line;
+ while ((line = reader.readLine()) != null) {
+ content += line;
+ }
+ reader.close();
+ assertEquals("Hello, world!", content); //$NON-NLS-1$
+ }
+}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/FSCopyTests.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/FSCopyTests.java
index 9d2b4cfb6..d4fa4e639 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/FSCopyTests.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/FSCopyTests.java
@@ -9,7 +9,7 @@
*******************************************************************************/
package org.eclipse.tcf.te.tests.tcf.filesystem.operations;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
public class FSCopyTests extends OperationTestBase {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/FSCreateFileTests.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/FSCreateFileTests.java
index d95ed992d..8d008d3eb 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/FSCreateFileTests.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/FSCreateFileTests.java
@@ -9,7 +9,7 @@
*******************************************************************************/
package org.eclipse.tcf.te.tests.tcf.filesystem.operations;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
public class FSCreateFileTests extends OperationTestBase {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/FSCreateFolderTests.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/FSCreateFolderTests.java
index 02de06f87..21b1c21a6 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/FSCreateFolderTests.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/FSCreateFolderTests.java
@@ -9,7 +9,7 @@
*******************************************************************************/
package org.eclipse.tcf.te.tests.tcf.filesystem.operations;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
public class FSCreateFolderTests extends OperationTestBase {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/FSMoveTests.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/FSMoveTests.java
index 9a6d67f6d..2c203ca98 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/FSMoveTests.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/FSMoveTests.java
@@ -9,7 +9,7 @@
*******************************************************************************/
package org.eclipse.tcf.te.tests.tcf.filesystem.operations;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
public class FSMoveTests extends OperationTestBase {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/FSRefreshTests.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/FSRefreshTests.java
index 9d1e5a152..2c77d9aab 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/FSRefreshTests.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/FSRefreshTests.java
@@ -12,10 +12,9 @@ package org.eclipse.tcf.te.tests.tcf.filesystem.operations;
import java.io.File;
import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSRefresh;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.OpRefresh;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
-@SuppressWarnings("restriction")
public class FSRefreshTests extends OperationTestBase {
@Override
@@ -28,7 +27,7 @@ public class FSRefreshTests extends OperationTestBase {
}
public void testRefresh() throws Exception {
- FSRefresh refresh = new FSRefresh(testRoot, null);
+ OpRefresh refresh = new OpRefresh(testRoot);
refresh.run(new NullProgressMonitor());
String path = getTestRoot() + getPathSep() + getTestPath()+getPathSep()+"newdir"; //$NON-NLS-1$
FSTreeNode node = getFSNode(path);
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/FSRenameTests.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/FSRenameTests.java
index 846e33f13..b45a8563e 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/FSRenameTests.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/FSRenameTests.java
@@ -9,7 +9,7 @@
*******************************************************************************/
package org.eclipse.tcf.te.tests.tcf.filesystem.operations;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
public class FSRenameTests extends OperationTestBase {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/FSUploadTest.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/FSUploadTest.java
index 9cf9f9555..10cb52d0f 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/FSUploadTest.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/FSUploadTest.java
@@ -11,7 +11,7 @@ package org.eclipse.tcf.te.tests.tcf.filesystem.operations;
import java.io.File;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
public class FSUploadTest extends OperationTestBase {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/OperationTestBase.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/OperationTestBase.java
index fdba408a9..ea8078798 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/OperationTestBase.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/OperationTestBase.java
@@ -13,23 +13,24 @@ import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSCopy;
-import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSCreateFile;
-import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSCreateFolder;
-import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSDelete;
-import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSMove;
-import org.eclipse.tcf.te.tcf.filesystem.internal.operations.FSRename;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.OpCacheCommit;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.OpCacheUpdate;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.OpCopy;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.OpCreateFile;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.OpCreateFolder;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.OpDelete;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.OpMove;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.OpRename;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
import org.eclipse.tcf.te.tests.tcf.filesystem.FSPeerTestCase;
-@SuppressWarnings("restriction")
public class OperationTestBase extends FSPeerTestCase {
protected FSTreeNode copy(FSTreeNode file, FSTreeNode folder) throws Exception {
printDebugMessage("Copy " + file.getLocation() + " to " + folder.getLocation() + "..."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
List<FSTreeNode> files = new ArrayList<FSTreeNode>();
files.add(file);
- FSCopy copy = new FSCopy(files, folder);
+ OpCopy copy = new OpCopy(files, folder);
copy.run(new NullProgressMonitor());
String location = folder.getLocation();
String path = location + getPathSep() + file.name;
@@ -38,7 +39,7 @@ public class OperationTestBase extends FSPeerTestCase {
protected FSTreeNode createFile(String fileName, FSTreeNode folder) throws Exception {
printDebugMessage("Create " + fileName + " at " + folder.getLocation()); //$NON-NLS-1$ //$NON-NLS-2$
- FSCreateFile create = new FSCreateFile(folder, fileName);
+ OpCreateFile create = new OpCreateFile(folder, fileName);
create.run(new NullProgressMonitor());
String location = folder.getLocation();
String path = location + getPathSep() + fileName;
@@ -47,7 +48,7 @@ public class OperationTestBase extends FSPeerTestCase {
protected FSTreeNode createFolder(String folderName, FSTreeNode folder) throws Exception {
printDebugMessage("Create " + folderName + " at " + folder.getLocation()); //$NON-NLS-1$ //$NON-NLS-2$
- FSCreateFolder create = new FSCreateFolder(folder, folderName);
+ OpCreateFolder create = new OpCreateFolder(folder, folderName);
create.run(new NullProgressMonitor());
String location = folder.getLocation();
String path = location + getPathSep() + folderName;
@@ -58,7 +59,7 @@ public class OperationTestBase extends FSPeerTestCase {
printDebugMessage("Move " + src.getLocation() + " to " + dest.getLocation()); //$NON-NLS-1$ //$NON-NLS-2$
List<FSTreeNode> nodes = new ArrayList<FSTreeNode>();
nodes.add(src);
- FSMove fsmove = new FSMove(nodes, dest);
+ OpMove fsmove = new OpMove(nodes, dest);
fsmove.run(new NullProgressMonitor());
String path = dest.getLocation() + getPathSep() + src.name;
return getFSNode(path);
@@ -66,17 +67,27 @@ public class OperationTestBase extends FSPeerTestCase {
protected FSTreeNode rename(FSTreeNode node, String newName) throws Exception {
printDebugMessage("Rename " + node.name + " to " + newName); //$NON-NLS-1$ //$NON-NLS-2$
- FSRename fsmove = new FSRename(node, newName);
+ OpRename fsmove = new OpRename(node, newName);
fsmove.run(new NullProgressMonitor());
String newPath = node.parent.getLocation()+getPathSep()+newName;
return getFSNode(newPath);
}
+ protected void updateCache(FSTreeNode testFile) throws Exception {
+ OpCacheUpdate update = new OpCacheUpdate(testFile);
+ update.run(new NullProgressMonitor());
+ }
+
+ protected void commitCache(FSTreeNode testFile) throws Exception {
+ OpCacheCommit commit = new OpCacheCommit(new FSTreeNode[]{testFile}, false);
+ commit.run(new NullProgressMonitor());
+ }
+
protected void delete(FSTreeNode node) throws Exception {
printDebugMessage("Delete " + node.getLocation() + "..."); //$NON-NLS-1$ //$NON-NLS-2$
List<FSTreeNode> files = new ArrayList<FSTreeNode>();
files.add(node);
- FSDelete delete = new FSDelete(files);
+ OpDelete delete = new OpDelete(files, null);
delete.run(new NullProgressMonitor());
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/OperationTests.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/OperationTests.java
index 998ec2f64..902f6a8a9 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/OperationTests.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/operations/OperationTests.java
@@ -23,6 +23,8 @@ public class OperationTests {
suite.addTestSuite(FSRefreshTests.class);
suite.addTestSuite(FSRenameTests.class);
suite.addTestSuite(FSUploadTest.class);
+ suite.addTestSuite(FSCacheCommitTest.class);
+ suite.addTestSuite(FSCacheUpdateTest.class);
return suite;
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/testers/CachePropertyTesterTest.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/testers/CachePropertyTesterTest.java
index 0ce0e9773..94229e25d 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/testers/CachePropertyTesterTest.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/testers/CachePropertyTesterTest.java
@@ -9,7 +9,7 @@
*******************************************************************************/
package org.eclipse.tcf.te.tests.tcf.filesystem.testers;
-import org.eclipse.tcf.te.tcf.filesystem.internal.testers.CachePropertyTester;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.testers.CachePropertyTester;
import org.eclipse.tcf.te.tests.tcf.filesystem.FSPeerTestCase;
@SuppressWarnings("restriction")
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/testers/ClipboardPropertyTesterTest.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/testers/ClipboardPropertyTesterTest.java
index 3b3e58033..a4ed8364a 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/testers/ClipboardPropertyTesterTest.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/testers/ClipboardPropertyTesterTest.java
@@ -11,7 +11,7 @@ package org.eclipse.tcf.te.tests.tcf.filesystem.testers;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.tcf.te.tcf.filesystem.internal.testers.ClipboardPropertyTester;
+import org.eclipse.tcf.te.tcf.filesystem.ui.internal.testers.ClipboardPropertyTester;
import org.eclipse.tcf.te.tests.tcf.filesystem.FSPeerTestCase;
@SuppressWarnings("restriction")
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/testers/FSTreeNodePropertyTesterTest.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/testers/FSTreeNodePropertyTesterTest.java
index 6ac706dd0..11c91a42d 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/testers/FSTreeNodePropertyTesterTest.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/testers/FSTreeNodePropertyTesterTest.java
@@ -10,10 +10,9 @@
package org.eclipse.tcf.te.tests.tcf.filesystem.testers;
import org.eclipse.tcf.te.runtime.utils.Host;
-import org.eclipse.tcf.te.tcf.filesystem.internal.testers.FSTreeNodePropertyTester;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.testers.FSTreeNodePropertyTester;
import org.eclipse.tcf.te.tests.tcf.filesystem.FSPeerTestCase;
-@SuppressWarnings("restriction")
public class FSTreeNodePropertyTesterTest extends FSPeerTestCase {
private FSTreeNodePropertyTester tester;
@Override
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/testers/TargetPropertyTesterTest.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/testers/TargetPropertyTesterTest.java
index 5b77e4774..898ada6fd 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/testers/TargetPropertyTesterTest.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/testers/TargetPropertyTesterTest.java
@@ -10,10 +10,9 @@
package org.eclipse.tcf.te.tests.tcf.filesystem.testers;
import org.eclipse.tcf.te.runtime.utils.Host;
-import org.eclipse.tcf.te.tcf.filesystem.internal.testers.TargetPropertyTester;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.testers.TargetPropertyTester;
import org.eclipse.tcf.te.tests.tcf.filesystem.FSPeerTestCase;
-@SuppressWarnings("restriction")
public class TargetPropertyTesterTest extends FSPeerTestCase {
public void testIsWindows() {
TargetPropertyTester tester = new TargetPropertyTester();
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/url/URLTestBase.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/url/URLTestBase.java
index 1323b286c..c15f0d5ea 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/url/URLTestBase.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/url/URLTestBase.java
@@ -15,10 +15,9 @@ import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URL;
-import org.eclipse.tcf.te.tcf.filesystem.internal.url.TcfURLConnection;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.url.TcfURLConnection;
import org.eclipse.tcf.te.tests.tcf.filesystem.FSPeerTestCase;
-@SuppressWarnings("restriction")
public class URLTestBase extends FSPeerTestCase {
protected String readFileContent() throws IOException {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/utils/CacheManagerTest.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/utils/CacheManagerTest.java
index 449b6b635..35d978434 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/utils/CacheManagerTest.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/utils/CacheManagerTest.java
@@ -9,18 +9,11 @@
*******************************************************************************/
package org.eclipse.tcf.te.tests.tcf.filesystem.utils;
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
import java.io.File;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.net.URL;
import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.tcf.te.tcf.filesystem.internal.utils.CacheManager;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.utils.CacheManager;
-@SuppressWarnings("restriction")
public class CacheManagerTest extends UtilsTestBase {
public void testCachePath() throws Exception {
@@ -41,28 +34,4 @@ public class CacheManagerTest extends UtilsTestBase {
String abspath = file.getAbsolutePath();
assertNotNull(abspath);
}
-
- public void testDownload() throws Exception {
- writeFileContent("Hello, world!"); //$NON-NLS-1$
- CacheManager.getInstance().download(testFile);
- File file = CacheManager.getInstance().getCacheFile(testFile);
- BufferedReader reader = new BufferedReader(new FileReader(file));
- String content=""; //$NON-NLS-1$
- String line;
- while ((line = reader.readLine()) != null) {
- content += line;
- }
- reader.close();
- assertEquals("Hello, world!", content); //$NON-NLS-1$
- }
-
- public void testUpload() throws Exception {
- File file = CacheManager.getInstance().getCacheFile(testFile);
- BufferedWriter writer = new BufferedWriter(new FileWriter(file));
- writer.write("Hello, world, this is called from client!"); //$NON-NLS-1$
- writer.close();
- CacheManager.getInstance().uploadFiles(new NullProgressMonitor(), new File[]{file}, new URL[]{testFile.getLocationURL()}, null);
- String content = readFileContent();
- assertEquals("Hello, world, this is called from client!", content); //$NON-NLS-1$
- }
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/utils/ContentTypeHelperTest.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/utils/ContentTypeHelperTest.java
index 3aeb3fffc..d48f780c9 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/utils/ContentTypeHelperTest.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/utils/ContentTypeHelperTest.java
@@ -11,7 +11,6 @@ package org.eclipse.tcf.te.tests.tcf.filesystem.utils;
import java.io.File;
import java.io.IOException;
-import java.net.MalformedURLException;
import java.net.URL;
import org.eclipse.core.runtime.FileLocator;
@@ -20,13 +19,12 @@ import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.tcf.te.tcf.filesystem.internal.utils.CacheManager;
-import org.eclipse.tcf.te.tcf.filesystem.internal.utils.ContentTypeHelper;
-import org.eclipse.tcf.te.tcf.filesystem.model.FSTreeNode;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.operations.OpUpload;
+import org.eclipse.tcf.te.tcf.filesystem.core.internal.utils.ContentTypeHelper;
+import org.eclipse.tcf.te.tcf.filesystem.core.model.FSTreeNode;
import org.eclipse.tcf.te.tests.activator.UIPlugin;
import org.osgi.framework.Bundle;
-@SuppressWarnings("restriction")
public class ContentTypeHelperTest extends UtilsTestBase {
private FSTreeNode agentNode;
@Override
@@ -43,7 +41,7 @@ public class ContentTypeHelperTest extends UtilsTestBase {
writeFileContent(content.toString());
}
- private void uploadAgent() throws MalformedURLException, IOException {
+ private void uploadAgent() throws Exception {
IPath path = getWin32Agent();
assertNotNull("Cannot find Windows agent!", path); //$NON-NLS-1$
assertTrue("Invalid agent location: " + path.toString(), path.toFile().isFile()); //$NON-NLS-1$
@@ -53,7 +51,8 @@ public class ContentTypeHelperTest extends UtilsTestBase {
if (agentNode == null) {
URL rootURL = testRoot.getLocationURL();
URL agentURL = new URL(rootURL, agentFile.getName());
- CacheManager.getInstance().uploadFiles(new NullProgressMonitor(), new File[] { agentFile }, new URL[] { agentURL }, null);
+ OpUpload upload = new OpUpload(agentFile, agentURL);
+ upload.run(new NullProgressMonitor());
agentNode = getFSNode(agentPath);
assertNotNull(agentNode);
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/utils/StateManagerTest.java b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/utils/StateManagerTest.java
index a7fc86085..a930fb73a 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/utils/StateManagerTest.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tests/src/org/eclipse/tcf/te/tests/tcf/filesystem/utils/StateManagerTest.java
@@ -9,10 +9,9 @@
*******************************************************************************/
package org.eclipse.tcf.te.tests.tcf.filesystem.utils;
-import org.eclipse.tcf.te.tcf.filesystem.internal.utils.StateManager;