Example usage for org.eclipse.jface.preference FieldEditor VALUE

List of usage examples for org.eclipse.jface.preference FieldEditor VALUE

Introduction

In this page you can find the example usage for org.eclipse.jface.preference FieldEditor VALUE.

Prototype

String VALUE

To view the source code for org.eclipse.jface.preference FieldEditor VALUE.

Click Source Link

Document

Property name constant (value "field_editor_value") to signal a change in the value of this field editor.

Usage

From source file:sernet.gs.ui.rcp.main.preferences.GSImportRestorePreferencePage.java

License:Open Source License

@Override
public void propertyChange(PropertyChangeEvent event) {
    super.propertyChange(event);
    if (event.getSource().equals(toDirField) && toDirField.getStringValue() != null
            && toDirField.getStringValue().length() > 0) {

        String url = Activator.getDefault().getPluginPreferences().getString(PreferenceConstants.GS_DB_URL);

        if (showDirWarning && !(url.indexOf("localhost") > -1 || url.indexOf("127.0.0.1") > -1)) { //$NON-NLS-1$ //$NON-NLS-2$
            showDirWarning = false;// w  w  w.  j av  a 2  s  . c  o m
            MessageDialog.openWarning(getShell(), Messages.getString("GSImportRestorePreferencePage.28"), //$NON-NLS-1$
                    Messages.getString("GSImportRestorePreferencePage.29")); //$NON-NLS-1$
        }

    }

    if (event.getSource().equals(this.gstoolDumpFile) && gstoolDumpFile.getStringValue() != null
            && gstoolDumpFile.getStringValue().length() > 0) {

        String url = Activator.getDefault().getPluginPreferences().getString(PreferenceConstants.GS_DB_URL);

        if (showWarning && !(url.indexOf("localhost") > -1 || url.indexOf("127.0.0.1") > -1)) { //$NON-NLS-1$ //$NON-NLS-2$
            showWarning = false;
            MessageDialog.openWarning(getShell(), Messages.getString("GSImportRestorePreferencePage.32"), //$NON-NLS-1$
                    Messages.getString("GSImportRestorePreferencePage.33")); //$NON-NLS-1$
        }
    }

    if (event.getProperty().equals(FieldEditor.VALUE)) {
        checkState();
    }
}

From source file:sernet.gs.ui.rcp.main.preferences.KatalogePreferencePage.java

License:Open Source License

@Override
public void propertyChange(PropertyChangeEvent event) {
    super.propertyChange(event);
    if (event.getProperty().equals(FieldEditor.VALUE)) {
        checkState();//from  ww  w . j  ava2 s  .  c om
        IInternalServer internalServer = Activator.getDefault().getInternalServer();
        Preferences prefs = Activator.getDefault().getPluginPreferences();
        String accessMethod = prefs.getString(PreferenceConstants.GSACCESS);

        if (event.getSource() == zipfilePath && accessMethod.equals(PreferenceConstants.GSACCESS_ZIP)) {
            try {
                internalServer.setGSCatalogURL(new File(zipfilePath.getStringValue()).toURI().toURL());
            } catch (MalformedURLException e) {
                LOG.warn("GS catalog zip file path is an invalid URL."); //$NON-NLS-1$
            }
        } else if (event.getSource() == datenschutzZipPath) {
            try {
                internalServer.setDSCatalogURL(new File(datenschutzZipPath.getStringValue()).toURI().toURL());
            } catch (MalformedURLException e) {
                LOG.warn("DS catalog zip file path is an invalid URL."); //$NON-NLS-1$
            }
        }
    }
}

From source file:sernet.verinice.oda.driver.preferences.ReportPreferencePage.java

License:Open Source License

@Override
public void propertyChange(PropertyChangeEvent event) {
    super.propertyChange(event);
    if (event.getProperty().equals(FieldEditor.VALUE)) {
        checkState();//from   w ww . ja  va 2 s.  c  o  m
    }

    if (event.getSource() == localTemplateEditor) {
        Activator.getDefault().getIReportTemplateDirectoryService().setDirectory((String) event.getNewValue());
    }
}