Created a separated 'externaltools' plugin: initial check-in
[phpeclipse.git] / net.sourceforge.phpeclipse.externaltools / src / net / sourceforge / phpdt / externaltools / variable / LocalhostExpander.java
1 package net.sourceforge.phpdt.externaltools.variable;
2
3 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
4 import net.sourceforge.phpeclipse.ui.WebUI;
5
6 import org.eclipse.jface.preference.IPreferenceStore;
7
8 /**
9  * Expands a variable into the predefined localhost.
10  * <p>
11  * This class is not intended to be extended by clients.
12  * </p>
13  */
14 public class LocalhostExpander implements IVariableTextExpander {
15
16   public String getText(String varTag, String varValue, ExpandVariableContext context) {
17     IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore(); 
18     return store.getString(WebUI.PHP_LOCALHOST_PREF);
19   }
20
21 }