Author: estherbin
Date: 2008-08-11 09:49:06 -0400 (Mon, 11 Aug 2008)
New Revision: 9638
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/ELVariablesPreferencePage.java
Log:
Add "Restore Default" and "Apply" buttons functionality for the
JBIDE-2594
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/ELVariablesPreferencePage.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/ELVariablesPreferencePage.java 2008-08-11
13:49:01 UTC (rev 9637)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/ELVariablesPreferencePage.java 2008-08-11
13:49:06 UTC (rev 9638)
@@ -23,7 +23,9 @@
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.jboss.tools.common.model.options.PreferenceModelUtilities;
+import org.jboss.tools.vpe.editor.css.GlobalELReferenceList;
import org.jboss.tools.vpe.editor.css.GlobalElVariablesComposite;
+import org.jboss.tools.vpe.editor.css.ResourceReference;
import org.jboss.tools.vpe.editor.css.VpeResourcesDialog;
/**
@@ -33,9 +35,24 @@
*/
public class ELVariablesPreferencePage extends PreferencePage implements
IWorkbenchPreferencePage {
+
+ private static final ResourceReference[] EMPTY_RESOURCE = new ResourceReference[0];
/** The el. */
private GlobalElVariablesComposite el = new GlobalElVariablesComposite();
+ @Override
+ protected void performApply() {
+ super.performApply();
+ this.performOk();
+ }
+
+ @Override
+ protected void performDefaults() {
+ super.performDefaults();
+ el.clearAll();
+ el.update();
+ }
+
/**
* Creates the contents.
*
@@ -71,6 +88,7 @@
@Override
public boolean performOk() {
boolean rst = super.performOk();
+
el.commit();
return rst;
}
@@ -84,9 +102,9 @@
final VpeResourcesDialog dialog = new VpeResourcesDialog();
final Properties p = new Properties();
- p.setProperty("help", "VpeResourcesDialog");
- p.put("path", Platform.getLocation());
- p.put("model", PreferenceModelUtilities.getPreferenceModel());
+ p.setProperty("help", "VpeResourcesDialog"); //$NON-NLS-1$
//$NON-NLS-2$
+ p.put("path", Platform.getLocation()); //$NON-NLS-1$
+ p.put("model", PreferenceModelUtilities.getPreferenceModel());
//$NON-NLS-1$
dialog.setObject(p);
el.setObject(p);
}
Show replies by date