/* * (non-Javadoc) * @see org.eclipse.debug.core.model.IValueModification#setValue(java.lang.String) */ public void setValue(String expression) throws DebugException { // assume never called unless supportsValueModification is true // also assume that will only be called if been verified // BUG in eclipse 3.2: Cell modification doesn't call verify Value and it should. // It does if you use the editor pane. if (!verifyValue(expression)) { // setValue called, but verifyValue failed Status stat = new Status( Status.WARNING, PHPDebugEPLPlugin.PLUGIN_ID, 0, PHPDebugCoreMessages.XDebug_DBGpVariable_0, null); throw new DebugException(stat); // DebugUIPlugin.errorDialog(Display.getDefault().getActiveShell(), // ActionMessages.AssignValueAction_2, // MessageFormat.format(ActionMessages.AssignValueAction_3, new String[] {expression, name}), // new StatusInfo(IStatus.ERROR, ActionMessages.AssignValueAction_4)); } else { // attempt to set the property if (((DBGpTarget) getDebugTarget()).setProperty(this, expression)) { value.setValue(expression); fireChangeEvent(DebugEvent.CONTENT); } else { // program under debug rejected value change throw new DebugException( new Status( IStatus.ERROR, PHPDebugEPLPlugin.PLUGIN_ID, DebugException.TARGET_REQUEST_FAILED, PHPDebugCoreMessages.XDebug_DBGpVariable_1, null)); } } }
/* * (non-Javadoc) * @see org.eclipse.debug.core.model.IValueModification#verifyValue(java.lang.String) */ public boolean verifyValue(String expression) throws DebugException { return value.verifyValue(expression); }
/* * (non-Javadoc) * @see org.eclipse.debug.core.model.IValueModification#supportsValueModification() */ public boolean supportsValueModification() { return value.isModifiable() && getFullName() != null && getFullName().trim().length() != 0; }