Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Gvozdev2012-04-12 01:01:23 -0400
committerAndrew Gvozdev2012-04-12 01:01:23 -0400
commitb1b320f94e5081bcd17089efa202205900f0cbf1 (patch)
treeb1150a44a428f01d1a5220987d94d8e350a241dc /core/org.eclipse.cdt.core.tests
parent1a0bdf2d5d4f59a1afb73b772fcb459eea9c9ff0 (diff)
downloadorg.eclipse.cdt-b1b320f94e5081bcd17089efa202205900f0cbf1.tar.gz
org.eclipse.cdt-b1b320f94e5081bcd17089efa202205900f0cbf1.tar.xz
org.eclipse.cdt-b1b320f94e5081bcd17089efa202205900f0cbf1.zip
bug 371797: [sd90] Implement language settings providers in build
plugins
Diffstat (limited to 'core/org.eclipse.cdt.core.tests')
-rw-r--r--core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/tests/filesystem/ram/MemoryEFSExtensionProvider.java33
-rw-r--r--core/org.eclipse.cdt.core.tests/plugin.xml7
2 files changed, 40 insertions, 0 deletions
diff --git a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/tests/filesystem/ram/MemoryEFSExtensionProvider.java b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/tests/filesystem/ram/MemoryEFSExtensionProvider.java
new file mode 100644
index 0000000000..279f507aae
--- /dev/null
+++ b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/tests/filesystem/ram/MemoryEFSExtensionProvider.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2010, 2011 Andrew Gvozdev 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:
+ * Andrew Gvozdev - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.core.internal.tests.filesystem.ram;
+
+import java.net.URI;
+
+import org.eclipse.cdt.core.EFSExtensionProvider;
+
+/**
+ * Test stub to test EFSExtensionProvider mappings.
+ *
+ */
+public class MemoryEFSExtensionProvider extends EFSExtensionProvider {
+
+ public String getMappedPath(URI locationURI) {
+
+ String path = locationURI.getPath();
+ if (path.contains("/BeingMappedFrom/Folder")) {
+ return path.replaceFirst("/BeingMappedFrom/Folder", "/LocallyMappedTo/Folder");
+ }
+
+ return super.getMappedPath(locationURI);
+ }
+
+}
diff --git a/core/org.eclipse.cdt.core.tests/plugin.xml b/core/org.eclipse.cdt.core.tests/plugin.xml
index 019bccf959..1302c39e66 100644
--- a/core/org.eclipse.cdt.core.tests/plugin.xml
+++ b/core/org.eclipse.cdt.core.tests/plugin.xml
@@ -241,6 +241,13 @@
</filesystem>
</extension>
<extension
+ point="org.eclipse.cdt.core.EFSExtensionProvider">
+ <EFSExtensionProvider
+ class="org.eclipse.cdt.core.internal.tests.filesystem.ram.MemoryEFSExtensionProvider"
+ scheme="mem">
+ </EFSExtensionProvider>
+ </extension>
+ <extension
id="RegexErrorParserId"
name="Test Plugin RegexErrorParser"
point="org.eclipse.cdt.core.ErrorParser">

Back to the top