Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/com.windriver.tcf.rse.ui/src/com/windriver/tcf/rse/ui/TCFFileAdapter.java')
-rw-r--r--plugins/com.windriver.tcf.rse.ui/src/com/windriver/tcf/rse/ui/TCFFileAdapter.java36
1 files changed, 36 insertions, 0 deletions
diff --git a/plugins/com.windriver.tcf.rse.ui/src/com/windriver/tcf/rse/ui/TCFFileAdapter.java b/plugins/com.windriver.tcf.rse.ui/src/com/windriver/tcf/rse/ui/TCFFileAdapter.java
new file mode 100644
index 000000000..e5164df66
--- /dev/null
+++ b/plugins/com.windriver.tcf.rse.ui/src/com/windriver/tcf/rse/ui/TCFFileAdapter.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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 com.windriver.tcf.rse.ui;
+
+import org.eclipse.rse.services.files.IHostFile;
+import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystem;
+import org.eclipse.rse.subsystems.files.core.subsystems.IHostFileToRemoteFileAdapter;
+import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
+import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileContext;
+
+public class TCFFileAdapter implements IHostFileToRemoteFileAdapter {
+
+ public IRemoteFile convertToRemoteFile(FileServiceSubSystem ss,
+ IRemoteFileContext ctx, IRemoteFile parent, IHostFile node) {
+ return new TCFRemoteFile(ss, ctx, parent, node);
+ }
+
+ public IRemoteFile[] convertToRemoteFiles(FileServiceSubSystem ss,
+ IRemoteFileContext ctx, IRemoteFile parent, IHostFile[] nodes) {
+ if (nodes == null) return null;
+ IRemoteFile[] res = new IRemoteFile[nodes.length];
+ for (int i = 0; i < res.length; i++) {
+ res[i] = new TCFRemoteFile(ss, ctx, parent, nodes[i]);
+ }
+ return res;
+ }
+
+}

Back to the top