Examples of DirectoryFieldEditor


Examples of ptolemy.backtrack.eclipse.plugin.widgets.DirectoryFieldEditor

     *  created for the path of Ptolemy home.
     */
    public void createFieldEditors() {
        Composite parent = getFieldEditorParent();

        DirectoryFieldEditor directoryFieldEditor = new DirectoryFieldEditor(
                PreferenceConstants.PTII, "&Ptolemy home:",
                getFieldEditorParent(), true) {
            protected void fireValueChanged(String property, Object oldValue,
                    Object newValue) {
                if ((property.equals(VALUE)) && isValid()) {
                    String PTII = getStringValue();
                    File sourceList = new File(PTII
                            + "/ptolemy/backtrack/automatic/source.lst");

                    if (sourceList.exists()) {
                        IPreferenceStore store = EclipsePlugin.getDefault()
                                .getPreferenceStore();
                        store.setValue(
                                PreferenceConstants.BACKTRACK_SOURCE_LIST,
                                sourceList.getPath());
                    }
                }

                super.fireValueChanged(property, oldValue, newValue);
            }
        };

        directoryFieldEditor.setWorkspaceOnly(false);
        addField(directoryFieldEditor);

        Label space = new Label(parent, 0);
        GridData gridData = new GridData();
        gridData.horizontalSpan = 3;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.