Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.Preferences


        foldingSizeText.setText( getPreferenceStore().getDefaultString(
            BrowserCommonConstants.PREFERENCE_BROWSER_FOLDING_SIZE ) );

        expandBaseEntriesButton.setSelection( getPreferenceStore().getDefaultBoolean(
            BrowserCommonConstants.PREFERENCE_BROWSER_EXPAND_BASE_ENTRIES ) );
        Preferences coreStore = BrowserCorePlugin.getDefault().getPluginPreferences();
        checkForChildrenButton.setSelection( coreStore
            .getDefaultBoolean( BrowserCoreConstants.PREFERENCE_CHECK_FOR_CHILDREN ) );

        updateEnabled();

        super.performDefaults();
View Full Code Here


        useLdaps = connection.getConnectionParameter().getEncryptionMethod() == ConnectionParameter.EncryptionMethod.LDAPS;
        useStartTLS = connection.getConnectionParameter().getEncryptionMethod() == ConnectionParameter.EncryptionMethod.START_TLS;

        environment = new Hashtable<String, String>();
        Preferences preferences = ConnectionCorePlugin.getDefault().getPluginPreferences();
        final boolean validateCertificates = preferences
            .getBoolean( ConnectionCoreConstants.PREFERENCE_VALIDATE_CERTIFICATES );
        String ldapCtxFactory = preferences.getString( ConnectionCoreConstants.PREFERENCE_LDAP_CONTEXT_FACTORY );
        environment.put( Context.INITIAL_CONTEXT_FACTORY, ldapCtxFactory );
        environment.put( JAVA_NAMING_LDAP_VERSION, "3" ); //$NON-NLS-1$

        // timeouts
        // Don't use a timeout when using ldaps: JNDI throws a SocketException
View Full Code Here

    private void doGssapiBind( final InnerRunnable innerRunnable ) throws NamingException
    {
        File configFile = null;
        try
        {
            Preferences preferences = ConnectionCorePlugin.getDefault().getPluginPreferences();
            boolean useKrb5SystemProperties = preferences
                .getBoolean( ConnectionCoreConstants.PREFERENCE_USE_KRB5_SYSTEM_PROPERTIES );
            String krb5LoginModule = preferences.getString( ConnectionCoreConstants.PREFERENCE_KRB5_LOGIN_MODULE );

            if ( !useKrb5SystemProperties )
            {

                // Kerberos Configuration
View Full Code Here

        BaseWidgetUtils.createSpacer( composite, 1 );
        BaseWidgetUtils.createSpacer( composite, 1 );

        Group ldapContextFactoryGroup = BaseWidgetUtils.createGroup( BaseWidgetUtils.createColumnContainer( composite,
            1, 1 ), Messages.getString( "ConnectionsPreferencePage.ContextFactory" ), 1 ); //$NON-NLS-1$
        Preferences preferences = ConnectionCorePlugin.getDefault().getPluginPreferences();
        String ldapCtxFactory = preferences.getString( ConnectionCoreConstants.PREFERENCE_LDAP_CONTEXT_FACTORY );
        String defaultLdapCtxFactory = preferences
            .getDefaultString( ConnectionCoreConstants.PREFERENCE_LDAP_CONTEXT_FACTORY );
        String ldapCtxFactoryNote = NLS.bind( Messages
            .getString( "ConnectionsPreferencePage.SystemDetectedContextFactory" ), defaultLdapCtxFactory ); //$NON-NLS-1$
        ldapContextFactoryText = BaseWidgetUtils.createText( ldapContextFactoryGroup, ldapCtxFactory, 1 );
        BaseWidgetUtils.createWrappedLabel( ldapContextFactoryGroup, ldapCtxFactoryNote, 1 );

        Group krb5SettingsGroup = BaseWidgetUtils.createGroup(
            BaseWidgetUtils.createColumnContainer( composite, 1, 1 ), Messages
                .getString( "ConnectionsPreferencePage.Krb5Settings" ), 1 ); //$NON-NLS-1$

        boolean useKrb5SystemProperties = preferences
            .getBoolean( ConnectionCoreConstants.PREFERENCE_USE_KRB5_SYSTEM_PROPERTIES );
        useKrb5SystemPropertiesButton = BaseWidgetUtils.createCheckbox( krb5SettingsGroup, Messages
            .getString( "ConnectionsPreferencePage.UseKrb5SystemProperties" ), 1 ); //$NON-NLS-1$
        useKrb5SystemPropertiesButton.setToolTipText( Messages
            .getString( "ConnectionsPreferencePage.UseKrb5SystemPropertiesTooltip" ) ); //$NON-NLS-1$
        useKrb5SystemPropertiesButton.setSelection( useKrb5SystemProperties );

        krb5LoginModuleLabel = BaseWidgetUtils.createLabel( krb5SettingsGroup, Messages
            .getString( "ConnectionsPreferencePage.Krb5LoginModule" ), 1 );
        String krb5LoginModule = preferences.getString( ConnectionCoreConstants.PREFERENCE_KRB5_LOGIN_MODULE );
        String defaultKrb5LoginModule = preferences
            .getDefaultString( ConnectionCoreConstants.PREFERENCE_KRB5_LOGIN_MODULE );
        String krb5LoginModuleNote = NLS.bind( Messages
            .getString( "ConnectionsPreferencePage.SystemDetectedContextFactory" ), defaultKrb5LoginModule ); //$NON-NLS-1$
        krb5LoginModuleText = BaseWidgetUtils.createText( krb5SettingsGroup, krb5LoginModule, 1 );
        krb5LoginModuleNoteLabel = BaseWidgetUtils.createWrappedLabel( krb5SettingsGroup, krb5LoginModuleNote, 1 );
View Full Code Here

    protected Control createContents( Composite parent )
    {
        Composite composite = BaseWidgetUtils.createColumnContainer( parent, 1, 1 );

        // enable/disable certificate validation
        Preferences preferences = ConnectionCorePlugin.getDefault().getPluginPreferences();
        boolean validateCertificates = preferences
            .getBoolean( ConnectionCoreConstants.PREFERENCE_VALIDATE_CERTIFICATES );
        verifyCertificatesButton = BaseWidgetUtils.createCheckbox( composite, Messages
            .getString( "CertificateValidationPreferencePage.ValidateCertificates" ), 1 ); //$NON-NLS-1$
        verifyCertificatesButton.setSelection( validateCertificates );
        verifyCertificatesButton.addSelectionListener( new SelectionAdapter()
View Full Code Here

    LayoutEntity[] array = entities.toArray(new LayoutEntity[entities.size()]);

    List<LayoutRelationship> relationships = layoutGraph.getRelationships();
    LayoutRelationship[] array2 = relationships.toArray(new LayoutRelationship[relationships.size()]);

    Preferences pluginPreferences = Activator.getDefault().getPluginPreferences();
    final int maxCoste = pluginPreferences.getInt(PreferenceConstants.HID_CONNECTION_BY_COST);

    try {
      algorithm.setFilter(new Filter() {

        /**
         * @see org.eclipse.zest.layouts.Filter#isObjectFiltered(java.lang.Object)
         */
        public boolean isObjectFiltered(Object object) {
          if (object instanceof IConnector) {
            IConnector connector = (IConnector) object;
            return !connector.isInCycle() && connector.getCost() > maxCoste;
          }
          return false;
        }

      });
      algorithm.applyLayout(array, array2, 0, 0, pluginPreferences.getDouble(PreferenceConstants.LAYOUT_AREA_WIDTH),
          pluginPreferences.getDouble(PreferenceConstants.LAYOUT_AREA_HEIGHT), false, false);
      // Compute new location delta
      double dx = Double.MAX_VALUE;
      double dy = Double.MAX_VALUE;
      for (LayoutEntity entity : entities) {
        dx = Math.min(dx, entity.getXInLayout());
View Full Code Here

   * @param result
   * @param connections
   * @return
   */
  private List<IConnector> applyFilters(Collection<IConnector> connections) {
    Preferences pluginPreferences = Activator.getDefault().getPluginPreferences();
    int maxCoste = pluginPreferences.getInt(PreferenceConstants.HID_CONNECTION_BY_COST);

    List<IConnector> result = new ArrayList<IConnector>();
    Collection<IConnector> synchronizedCollection = Collections.synchronizedCollection(connections);
    synchronized (synchronizedCollection) {
      for (IConnector connector : synchronizedCollection) {
View Full Code Here

   */
  @Override
  public void activate() {
    if (!isActive()) {
      super.activate();
      Preferences pluginPreferences = Activator.getDefault().getPluginPreferences();
      pluginPreferences.addPropertyChangeListener(pluginPreferencesChangeListener);
    }
  }
View Full Code Here

   */
  @Override
  public void deactivate() {
    if (isActive()) {
      super.deactivate();
      Preferences pluginPreferences = Activator.getDefault().getPluginPreferences();
      pluginPreferences.removePropertyChangeListener(pluginPreferencesChangeListener);
    }
  }
View Full Code Here

    autoJCasAction = new Action() {
      // The run action is simply to toggle the setting in the prefs page, and
      //   to update the checked status to correspond to that
      public void run() {
        TAEConfiguratorPlugin plugin = TAEConfiguratorPlugin.getDefault();
        Preferences prefs = plugin.getPluginPreferences();
        boolean bAutoJCasGen = !prefs.getBoolean(PreferencePage.P_JCAS); //$NON-NLS-1$
        autoJCasAction.setChecked(bAutoJCasGen);
        prefs.setValue(PreferencePage.P_JCAS, bAutoJCasGen); //$NON-NLS-1$
      }
    };
   
    limitJCasGenToProject = new Action () {
      // The run action is simply to toggle the setting in the prefs page, and
      //   to update the checked status to correspond to that
      public void run() {
        TAEConfiguratorPlugin plugin = TAEConfiguratorPlugin.getDefault();
        Preferences prefs = plugin.getPluginPreferences();
        boolean bJCasLimit = !prefs.getBoolean(PreferencePage.P_JCAS_LIMIT_TO_PROJECT_SCOPE); //$NON-NLS-1$
        limitJCasGenToProject.setChecked(bJCasLimit);
        prefs.setValue(PreferencePage.P_JCAS_LIMIT_TO_PROJECT_SCOPE, bJCasLimit); //$NON-NLS-1$
      }
    };

    runJCasGenAction = new Action() {
      public void run() {
        ((MultiPageEditor) activeEditorPart).doJCasGenChkSrc(null); // don't know how to get
        // progress monitor
      }
    };

    qualifiedTypesAction = new Action() {
      public void run() {
        TAEConfiguratorPlugin plugin = TAEConfiguratorPlugin.getDefault();
        Preferences prefs = plugin.getPluginPreferences();
        boolean bFullyQualifiedTypeNames = !prefs
                .getBoolean(PreferencePage.P_SHOW_FULLY_QUALIFIED_NAMES); //$NON-NLS-1$
        qualifiedTypesAction.setChecked(bFullyQualifiedTypeNames);
        prefs.setValue(PreferencePage.P_SHOW_FULLY_QUALIFIED_NAMES, bFullyQualifiedTypeNames); //$NON-NLS-1$

        // mark all pages as stale for all editors, since this is a global setting
        IWorkbenchPage[] pages = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getPages();
        for (int i = 0; i < pages.length; i++) {
          IWorkbenchPart[] editors = pages[i].getEditors();
View Full Code Here

TOP

Related Classes of org.eclipse.core.runtime.Preferences

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.