Importing the XDebugProxy code in the HEAD. The repo was tagged with T_BEFORE_XDEBUGP...
[phpeclipse.git] / net.sourceforge.phpeclipse.xdebug.ui / src / net / sourceforge / phpeclipse / xdebug / ui / preference / XDebugPreferencePage.java
index 58580b8..dfec826 100644 (file)
@@ -17,6 +17,8 @@ public class XDebugPreferencePage extends FieldEditorPreferencePage implements
 
        /* Preference page for the default XDebug-Settings */
        
+       private IntegerFieldEditor debugPort;
+
        public XDebugPreferencePage() {
                super(FieldEditorPreferencePage.GRID);
 
@@ -35,8 +37,9 @@ public class XDebugPreferencePage extends FieldEditorPreferencePage implements
        }
 
        protected void createFieldEditors() {
-               IntegerFieldEditor debugPort = new IntegerFieldEditor(IXDebugPreferenceConstants.DEBUGPORT_PREFERENCE, "&Debugport:", getFieldEditorParent(),5);
+               debugPort = new IntegerFieldEditor(IXDebugPreferenceConstants.DEBUGPORT_PREFERENCE, "&Debugport:", getFieldEditorParent(),5);
                debugPort.setValidRange(1025,65535);
+               
                debugPort.setErrorMessage("Debugport must be between 1024 and 65536");
                addField(debugPort);
                
@@ -45,6 +48,11 @@ public class XDebugPreferencePage extends FieldEditorPreferencePage implements
                addField(phpInterpreter);
                
        }
+       
+       public void performApply() {
+               super.performApply();
+               XDebugCorePlugin.getDefault().setProxyPort(debugPort.getIntValue());
+       }