1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Bug # 197121 : Project properties are not saved when changed by mouse "paste"

This commit is contained in:
Oleg Krasilnikov 2007-09-11 10:55:29 +00:00
parent 44d45a6142
commit fbdd549259
2 changed files with 45 additions and 1 deletions

View file

@ -34,6 +34,8 @@ import org.eclipse.jface.preference.FieldEditor;
import org.eclipse.jface.preference.FileFieldEditor;
import org.eclipse.jface.preference.StringFieldEditor;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Composite;
@ -104,7 +106,13 @@ public class BuildOptionSettingsUI extends AbstractToolSettingUI {
} break;
case IOption.BROWSE_NONE: {
stringField = new StringFieldEditor(optId, opt.getName(), fieldEditorParent);
final StringFieldEditorM local = new StringFieldEditorM(optId, opt.getName(), fieldEditorParent);
stringField = local;
local.getTextControl().addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
local.valueChanged();
}
});
} break;
default: {

View file

@ -0,0 +1,36 @@
/*******************************************************************************
* Copyright (c) 2007 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Intel Corporation - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.managedbuilder.ui.properties;
import org.eclipse.jface.preference.StringFieldEditor;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Text;
/**
* This class behaves in the same way as its parent,
* but gives public access to its Text widget, and
* valueChanged() can be called outside.
*
* It allows to add extra listeners to Text widget.
*/
public class StringFieldEditorM extends StringFieldEditor {
public StringFieldEditorM(String name, String labelText, Composite parent) {
super(name, labelText, parent);
}
public Text getTextControl() {
return super.getTextControl();
}
public void valueChanged() {
super.valueChanged();
}
}