Package org.eclipse.jface.preference

Examples of org.eclipse.jface.preference.IPreferenceStore


        }


        void savePreferences()
        {
            IPreferenceStore store = LdifEditorActivator.getDefault().getPreferenceStore();
            PreferenceConverter
                .setValue( store, key + LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_RGB_SUFFIX, rgb );
            store.setValue( key + LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_STYLE_SUFFIX, getStyle() );
        }
View Full Code Here


        }


        void loadDefaultPreferences()
        {
            IPreferenceStore store = LdifEditorActivator.getDefault().getPreferenceStore();
            this.rgb = PreferenceConverter.getDefaultColor( store, key
                + LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_RGB_SUFFIX );
            int style = store.getDefaultInt( key + LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_STYLE_SUFFIX );
            setStyle( style );
        }
View Full Code Here

    public void run()
    {
        IBrowserConnection connection = editor.getConnection();
        String ldif = editor.getLdifModel().toRawString();

        IPreferenceStore preferenceStore = LdifEditorActivator.getDefault().getPreferenceStore();
        boolean updateIfEntryExistsButton = preferenceStore
            .getBoolean( LdifEditorConstants.PREFERENCE_LDIFEDITOR_OPTIONS_UPDATEIFENTRYEXISTS );
        boolean continueOnErrorButton = preferenceStore
            .getBoolean( LdifEditorConstants.PREFERENCE_LDIFEDITOR_OPTIONS_CONTINUEONERROR );

        ExecuteLdifRunnable runnable = new ExecuteLdifRunnable( connection, ldif, updateIfEntryExistsButton,
            continueOnErrorButton );
        StudioBrowserJob job = new StudioBrowserJob( runnable );
View Full Code Here

        super();

        setSourceViewerConfiguration( new LdifSourceViewerConfiguration( this, true ) );
        setDocumentProvider( new LdifDocumentProvider() );

        IPreferenceStore editorStore = EditorsUI.getPreferenceStore();
        IPreferenceStore browserStore = LdifEditorActivator.getDefault().getPreferenceStore();
        IPreferenceStore combinedStore = new ChainedPreferenceStore( new IPreferenceStore[]
            { browserStore, editorStore } );
        setPreferenceStore( combinedStore );

        setHelpContextId( LdifEditorConstants.PLUGIN_ID + "." + "tools_ldif_editor" ); //$NON-NLS-1$ //$NON-NLS-2$
    }
View Full Code Here

        boolean isIDE = BrowserCommonActivator.isIDEEnvironment();

        if ( isIDE )
        {
            // Just call super implementation for now
            IPreferenceStore store = EditorsUI.getPreferenceStore();
            String key = getEditorSite().getId() + ".internal.delegateSaveAs"; // $NON-NLS-1$ //$NON-NLS-1$
            store.setValue( key, true );
            super.performSaveAs( progressMonitor );
        }
        else
        {
            // Open FileDialog
View Full Code Here


    public ICompletionProposal[] computeCompletionProposals( ITextViewer viewer, int offset )
    {

        IPreferenceStore store = LdifEditorActivator.getDefault().getPreferenceStore();
        contentAssistant.enableAutoInsert( store
            .getBoolean( LdifEditorConstants.PREFERENCE_LDIFEDITOR_CONTENTASSIST_INSERTSINGLEPROPOSALAUTO ) );
        contentAssistant.enableAutoActivation( store
            .getBoolean( LdifEditorConstants.PREFERENCE_LDIFEDITOR_CONTENTASSIST_ENABLEAUTOACTIVATION ) );
        contentAssistant.setAutoActivationDelay( store
            .getInt( LdifEditorConstants.PREFERENCE_LDIFEDITOR_CONTENTASSIST_AUTOACTIVATIONDELAY ) );

        List<ICompletionProposal> proposalList = new ArrayList<ICompletionProposal>();

        LdifFile model = editor.getLdifModel();
View Full Code Here

                this.contentAssistant.setDocumentPartitioning( LdifDocumentSetupParticipant.LDIF_PARTITIONING );

                this.contentAssistant.setContextInformationPopupOrientation( IContentAssistant.CONTEXT_INFO_ABOVE );
                this.contentAssistant.setInformationControlCreator( getInformationControlCreator( sourceViewer ) );

                IPreferenceStore store = LdifEditorActivator.getDefault().getPreferenceStore();
                this.contentAssistant.enableAutoInsert( store
                    .getBoolean( LdifEditorConstants.PREFERENCE_LDIFEDITOR_CONTENTASSIST_INSERTSINGLEPROPOSALAUTO ) );
                this.contentAssistant.enableAutoActivation( store
                    .getBoolean( LdifEditorConstants.PREFERENCE_LDIFEDITOR_CONTENTASSIST_ENABLEAUTOACTIVATION ) );
                this.contentAssistant.setAutoActivationDelay( store
                    .getInt( LdifEditorConstants.PREFERENCE_LDIFEDITOR_CONTENTASSIST_AUTOACTIVATIONDELAY ) );
                // this.contentAssistant.enableAutoInsert(true);
                // this.contentAssistant.enableAutoActivation(true);
                // this.contentAssistant.setAutoActivationDelay(100);
            }
View Full Code Here

    private Map textAttributeKeyToValueMap;


    private TextAttribute geTextAttribute( String key )
    {
        IPreferenceStore store = LdifEditorActivator.getDefault().getPreferenceStore();

        RGB rgb = PreferenceConverter.getColor( store, key
            + LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_RGB_SUFFIX );
        int style = store.getInt( key + LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_STYLE_SUFFIX );

        if ( textAttributeKeyToValueMap != null )
        {
            if ( textAttributeKeyToValueMap.containsKey( key
                + LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_RGB_SUFFIX ) )
View Full Code Here

//    private BooleanFieldEditor zoomToSelection;
    private BooleanFieldEditor navigateSelection;
   
    public SelectionToolPreferencePage() {
        super(GRID);
        IPreferenceStore store = SelectPlugin.getDefault().getPreferenceStore();
        setPreferenceStore(store);
        setTitle(Messages.Select_Title);
        setDescription(Messages.Select_Description);
    }
View Full Code Here

       
        private boolean openWarning( final Command command ) {
            final boolean[] runCommand=new boolean[1];
            if (!(command instanceof UndoableCommand)
                    && ProjectPlugin.getPlugin().getUndoableCommandWarning()) {
                final IPreferenceStore preferenceStore = ProjectPlugin.getPlugin()
                        .getPreferenceStore();
                if (!preferenceStore.getBoolean(PreferenceConstants.P_WARN_IRREVERSIBLE_COMMAND)) {
                    return preferenceStore
                            .getBoolean(PreferenceConstants.P_IRREVERSIBLE_COMMAND_VALUE);
                }
                PlatformGIS.syncInDisplayThread(new Runnable(){
                    public void run() {
                        String string = Messages.CommandManager_warning + command.getName();
                        if ( command instanceof RollbackCommand ||
                                command instanceof CommitCommand )
                            string += "?"; //$NON-NLS-1$
                        else
                            string+=Messages.CommandManager_warning2;
                        MessageDialogWithToggle dialog = MessageDialogWithToggle
                                .openOkCancelConfirm(
                                        PlatformUI.getWorkbench().getActiveWorkbenchWindow()
                                                .getShell(),
                                        Messages.CommandManager_warningTitle, string, 
                                        Messages.CommandManager_toggleMessage, false, preferenceStore, PreferenceConstants.P_WARN_IRREVERSIBLE_COMMAND);
                        runCommand[0] = dialog.getReturnCode() == IDialogConstants.OK_ID;
                        if (dialog.getToggleState()) {
                            preferenceStore
                                    .setValue(PreferenceConstants.P_IRREVERSIBLE_COMMAND_VALUE,
                                            runCommand[0]);
                        }
                    }
                });
View Full Code Here

TOP

Related Classes of org.eclipse.jface.preference.IPreferenceStore

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.