Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative/src/org/eclipse/papyrus/team/collaborative/core/utils/funtions/IFileToFile.java')
-rw-r--r--extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative/src/org/eclipse/papyrus/team/collaborative/core/utils/funtions/IFileToFile.java41
1 files changed, 41 insertions, 0 deletions
diff --git a/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative/src/org/eclipse/papyrus/team/collaborative/core/utils/funtions/IFileToFile.java b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative/src/org/eclipse/papyrus/team/collaborative/core/utils/funtions/IFileToFile.java
new file mode 100644
index 00000000000..58b9388fa89
--- /dev/null
+++ b/extraplugins/team.collaborative/org.eclipse.papyrus.team.collaborative/src/org/eclipse/papyrus/team/collaborative/core/utils/funtions/IFileToFile.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Atos
+ * 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:
+ * Arthur Daussy - initial implementation
+ *******************************************************************************/
+package org.eclipse.papyrus.team.collaborative.utils.funtions;
+
+import java.io.File;
+
+import org.eclipse.core.resources.IResource;
+
+import com.google.common.base.Function;
+
+
+/**
+ * The Class IFileToFile.
+ * Function used to convert {@link IResource} to {@link File}
+ *
+ * @param <T>
+ * the generic type
+ */
+public class IFileToFile<T extends IResource> implements Function<T, File> {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.google.common.base.Function#apply(java.lang.Object)
+ */
+ @Override
+ public File apply(T from) {
+ return from.getFullPath().toFile();
+ }
+
+
+
+}

Back to the top