1) Moved net.sourceforge.phpeclipse.ui\src\net\sourceforge\phpdt back to net.sourcefo...
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / ui / text / template / contentassist / MultiVariable.java
index c9a6572..695e4ad 100644 (file)
@@ -13,41 +13,45 @@ package net.sourceforge.phpdt.internal.ui.text.template.contentassist;
 import java.util.HashMap;
 import java.util.Map;
 
-import org.eclipse.jface.text.Assert;
+//incastrix
+//import org.eclipse.jface.text.Assert;
+import org.eclipse.core.runtime.Assert;
 import org.eclipse.jface.text.templates.TemplateVariable;
 
-
 /**
  * 
  */
 public class MultiVariable extends TemplateVariable {
-       private final Map fValueMap= new HashMap();
+       private final Map fValueMap = new HashMap();
+
        private Object fSet;
-       private Object fDefaultKey= null;
-       
+
+       private Object fDefaultKey = null;
+
        public MultiVariable(String type, String defaultValue, int[] offsets) {
                super(type, defaultValue, offsets);
                fValueMap.put(fDefaultKey, new String[] { defaultValue });
-               fSet= getDefaultValue();
+               fSet = getDefaultValue();
        }
-       
+
        /**
         * Sets the values of this variable under a specific set.
         * 
-        * @param set the set identifier for which the values are valid
-        * @param values the possible values of this variable
+        * @param set
+        *            the set identifier for which the values are valid
+        * @param values
+        *            the possible values of this variable
         */
-       public void setValues(Object set, String[] values) {
-               Assert.isNotNull(set);
-               Assert.isTrue(values.length > 0);
-               fValueMap.put(set, values);
-               if (fDefaultKey == null) {
-                       fDefaultKey= set;
-                       fSet= getDefaultValue();
-               }
-       }
-       
-       
+//     public void setValues(Object set, String[] values) {
+//             Assert.isNotNull(set);
+//             Assert.isTrue(values.length > 0);
+//             fValueMap.put(set, values);
+//             if (fDefaultKey == null) {
+//                     fDefaultKey = set;
+//                     fSet = getDefaultValue();
+//             }
+//     }
+
        /*
         * @see org.eclipse.jface.text.templates.TemplateVariable#setValues(java.lang.String[])
         */
@@ -56,22 +60,22 @@ public class MultiVariable extends TemplateVariable {
                        Assert.isNotNull(values);
                        Assert.isTrue(values.length > 0);
                        fValueMap.put(fDefaultKey, values);
-                       fSet= getDefaultValue();
+                       fSet = getDefaultValue();
                }
        }
-       
-       
+
        /*
         * @see org.eclipse.jface.text.templates.TemplateVariable#getValues()
         */
        public String[] getValues() {
                return (String[]) fValueMap.get(fDefaultKey);
        }
-       
+
        /**
         * Returns the choices for the set identified by <code>set</code>.
         * 
-        * @param set the set identifier
+        * @param set
+        *            the set identifier
         * @return the choices for this variable and the given set, or
         *         <code>null</code> if the set is not defined.
         */
@@ -85,9 +89,9 @@ public class MultiVariable extends TemplateVariable {
        public Object getSet() {
                return fSet;
        }
-       
+
        public void setSet(Object set) {
-               fSet= set;
+               fSet = set;
        }
 
 }