Package org.eclipse.jface.commands

Examples of org.eclipse.jface.commands.PersistentState


      final String[] stateIds = command.getStateIds();
      for (int j = 0; j < stateIds.length; j++) {
        final String stateId = stateIds[j];
        final State state = command.getState(stateId);
        if (state instanceof PersistentState) {
          final PersistentState persistentState = (PersistentState) state;
          if (persistentState.shouldPersist()) {
            persistentState.save(PrefUtil
                .getInternalPreferenceStore(),
                createPreferenceKey(command, stateId));
          }
        }
      }
View Full Code Here


  public final void dispose() {
    if (state != null) {
      state.dispose();
      if (state instanceof PersistentState) {
        final PersistentState persistableState = (PersistentState) state;
        if (persistableState.shouldPersist() && preferenceStore != null
            && preferenceKey != null) {
          persistableState.save(preferenceStore, preferenceKey);
        }
      }
    }
  }
View Full Code Here

  }

  public final void load(final IPreferenceStore store,
      final String preferenceKey) {
    if (loadState() && state instanceof PersistentState) {
      final PersistentState persistableState = (PersistentState) state;
      if (persistableState.shouldPersist() && preferenceStore != null
          && preferenceKey != null) {
        persistableState.load(preferenceStore, preferenceKey);
      }
    }
  }
View Full Code Here

        state.setId(getId());
        configurationElement = null;

        // Try to load the persistent state, if possible.
        if (readPersistence && state instanceof PersistentState) {
          final PersistentState persistentState = (PersistentState) state;
          persistentState.setShouldPersist(true);
        }
        load(preferenceStore, preferenceKey);

        // Transfer the local listeners to the real state.
        final Object[] listenerArray = getListeners();
View Full Code Here

TOP

Related Classes of org.eclipse.jface.commands.PersistentState

Copyright © 2018 www.massapicom. 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.