Initial version from the webtools project; sligthly modified for phpeclipse
[phpeclipse.git] / net.sourceforge.phpeclipse.webbrowser / src / org / eclipse / webbrowser / internal / StandardURLMap.java
diff --git a/net.sourceforge.phpeclipse.webbrowser/src/org/eclipse/webbrowser/internal/StandardURLMap.java b/net.sourceforge.phpeclipse.webbrowser/src/org/eclipse/webbrowser/internal/StandardURLMap.java
new file mode 100644 (file)
index 0000000..400da31
--- /dev/null
@@ -0,0 +1,29 @@
+/**
+ * Copyright (c) 2003 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ *    IBM - Initial API and implementation
+ */
+package org.eclipse.webbrowser.internal;
+
+import org.eclipse.webbrowser.IURLMap;
+/**
+ * Standard URL mappings.
+ */
+public class StandardURLMap implements IURLMap {
+       /**
+        * @see IURLMap#getMappedURL(String)
+        */
+       public String getMappedURL(String url) {
+               if (url.equalsIgnoreCase("eclipse"))
+                       return "http://www.eclipse.org";
+               else if (url.equalsIgnoreCase("webtools"))
+                       return "http://www.eclipse.org/webtools/";
+               else
+                       return null;
+       }
+}
\ No newline at end of file