@Override
 public boolean performOk() {
   boolean res = super.performOk();
   if (res) {
     PluginActivator.getDefault().preferencesUpdated();
   }
   return res;
 }
Beispiel #2
0
  public GraphLayout() {

    initialize();

    PluginActivator.getDefault()
        .addPreferencesUpdateListener(
            new PreferencesUpdateListener() {
              public void preferencesUpdated() {
                initialize();
              }
            });
  }
  public PreferencePageBase() {
    super(GRID);
    setPreferenceStore(PluginActivator.getDefault().getPreferenceStore());
    PluginActivator.getDefault().addPreferencesUpdateListener(this);

    parentData = new GridData(GridData.FILL_HORIZONTAL);
    parentData.horizontalSpan = 2;
    parentData.verticalIndent = 5;

    defaultAligmentData = new GridData();
    defaultAligmentData.horizontalSpan = 2;
    defaultAligmentData.horizontalIndent = 9;
    defaultAligmentData.verticalIndent = 5;

    groupLayout = new GridLayout();
    groupLayout.marginWidth = 10;
    groupLayout.marginHeight = 10;
    groupLayout.numColumns = 2;

    cellData = new GridData();
    cellData.widthHint = 200;
    cellData.heightHint = 32;
  }
 @Override
 public void dispose() {
   PluginActivator.getDefault().removePreferencesUpdateListener(this);
   super.dispose();
 }