mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-22 22:22:11 +02:00
Validate breakpoint string fields also on mouse clicks
This commit is contained in:
parent
02026595cc
commit
e78acb4fdf
1 changed files with 17 additions and 0 deletions
|
@ -63,6 +63,8 @@ import org.eclipse.jface.viewers.ISelection;
|
||||||
import org.eclipse.jface.viewers.IStructuredSelection;
|
import org.eclipse.jface.viewers.IStructuredSelection;
|
||||||
import org.eclipse.jface.window.Window;
|
import org.eclipse.jface.window.Window;
|
||||||
import org.eclipse.swt.SWT;
|
import org.eclipse.swt.SWT;
|
||||||
|
import org.eclipse.swt.events.MouseAdapter;
|
||||||
|
import org.eclipse.swt.events.MouseEvent;
|
||||||
import org.eclipse.swt.events.SelectionAdapter;
|
import org.eclipse.swt.events.SelectionAdapter;
|
||||||
import org.eclipse.swt.events.SelectionEvent;
|
import org.eclipse.swt.events.SelectionEvent;
|
||||||
import org.eclipse.swt.events.SelectionListener;
|
import org.eclipse.swt.events.SelectionListener;
|
||||||
|
@ -155,6 +157,19 @@ public class CBreakpointPropertyPage extends FieldEditorPreferencePage implement
|
||||||
super( name, labelText, parent );
|
super( name, labelText, parent );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void doFillIntoGrid(Composite parent, int numColumns) {
|
||||||
|
super.doFillIntoGrid(parent, numColumns);
|
||||||
|
// also validate on mouse clicks, eg. middle-mouse-paste
|
||||||
|
Text textControl = getTextControl();
|
||||||
|
textControl.addMouseListener(new MouseAdapter() {
|
||||||
|
@Override
|
||||||
|
public void mouseUp(MouseEvent e) {
|
||||||
|
valueChanged();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see StringFieldEditor#checkState()
|
* @see StringFieldEditor#checkState()
|
||||||
*/
|
*/
|
||||||
|
@ -175,6 +190,7 @@ public class CBreakpointPropertyPage extends FieldEditorPreferencePage implement
|
||||||
super.doStore();
|
super.doStore();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
protected void doLoad() {
|
protected void doLoad() {
|
||||||
String value = getPreferenceStore().getString(getPreferenceName());
|
String value = getPreferenceStore().getString(getPreferenceName());
|
||||||
setStringValue(value);
|
setStringValue(value);
|
||||||
|
@ -922,6 +938,7 @@ public class CBreakpointPropertyPage extends FieldEditorPreferencePage implement
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IPreferenceStore getPreferenceStore() {
|
public IPreferenceStore getPreferenceStore() {
|
||||||
IAdaptable element = getElement();
|
IAdaptable element = getElement();
|
||||||
if (element instanceof ICBreakpointContext) {
|
if (element instanceof ICBreakpointContext) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue