Java 类org.eclipse.jface.preference.PreferencePage 实例源码

项目:e4-cookbook-migration-guide    文件:ContributedPreferenceNode.java   
@Override
public void createPage() {
    try {
        setPage(this.pageClass.newInstance());
    } catch (InstantiationException|IllegalAccessException e) {
        e.printStackTrace();
    }

    if (getLabelImage() != null) {
        getPage().setImageDescriptor(getImageDescriptor());
    }
       getPage().setTitle(getLabelText());

       ((PreferencePage)getPage()).setPreferenceStore(
            new ScopedPreferenceStore(InstanceScope.INSTANCE, this.nodeQualifier));
}
项目:e4-preferences    文件:ContributedPreferenceNode.java   
@Override
public void createPage() {
    // create the page via DI using the OSGi service context
    try {
        IPreferencePage page = ContextInjectionFactory.make(this.pageClass, this.context);
        setPage(page);

        if (getLabelImage() != null) {
            getPage().setImageDescriptor(getImageDescriptor());
        }
        getPage().setTitle(getLabelText());

        ((PreferencePage) getPage()).setPreferenceStore(this.store);
    }
    catch (Exception e) {
        if (this.logger != null) {
            this.logger.log(
                    LogService.LOG_ERROR, 
                    "Error on creating instance of " + this.pageClass.getName(), 
                    e);
        }
    }
}
项目:JFaceUtils    文件:EnhancedPreferenceDialog.java   
@Override
protected void handleSave() {
    final Iterator<IPreferenceNode> nodes = getPreferenceManager().getElements(PreferenceManager.PRE_ORDER).iterator();
    while (nodes.hasNext()) {
        final IPreferenceNode node = nodes.next();
        final IPreferencePage page = node.getPage();
        if (page instanceof PreferencePage) {
            final IPreferenceStore store = ((PreferencePage) page).getPreferenceStore();
            if (store != null && store.needsSaving() && store instanceof IPersistentPreferenceStore) {
                try {
                    ((IPersistentPreferenceStore) store).save();
                }
                catch (final IOException ioe) {
                    final String message = JFaceMessages.get("err.preferences.save");
                    logger.log(Level.SEVERE, message, ioe);
                    EnhancedErrorDialog.openError(getShell(), title, message, IStatus.ERROR, ioe, new Image[] { Display.getCurrent().getSystemImage(SWT.ICON_ERROR) });
                }
            }
        }
    }
}
项目:Eclipse-Postfix-Code-Completion    文件:SaveParticipantConfigurationBlock.java   
public SaveParticipantConfigurationBlock(IScopeContext context, PreferencePage preferencePage) {
    Assert.isNotNull(context);
    Assert.isNotNull(preferencePage);

    fContext= context;
    fPreferencePage= preferencePage;
    fConfigurations= new ArrayList<ISaveParticipantPreferenceConfiguration>();
}
项目:Eclipse-Postfix-Code-Completion    文件:JavaEditorHoverConfigurationBlock.java   
public JavaEditorHoverConfigurationBlock(PreferencePage mainPreferencePage, OverlayPreferenceStore store) {
    Assert.isNotNull(mainPreferencePage);
    Assert.isNotNull(store);
    fMainPreferencePage= mainPreferencePage;
    fStore= store;
    fStore.addKeys(createOverlayStoreKeys());
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:SaveParticipantConfigurationBlock.java   
public SaveParticipantConfigurationBlock(IScopeContext context, PreferencePage preferencePage) {
    Assert.isNotNull(context);
    Assert.isNotNull(preferencePage);

    fContext= context;
    fPreferencePage= preferencePage;
    fConfigurations= new ArrayList<ISaveParticipantPreferenceConfiguration>();
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:JavaEditorHoverConfigurationBlock.java   
public JavaEditorHoverConfigurationBlock(PreferencePage mainPreferencePage, OverlayPreferenceStore store) {
    Assert.isNotNull(mainPreferencePage);
    Assert.isNotNull(store);
    fMainPreferencePage= mainPreferencePage;
    fStore= store;
    fStore.addKeys(createOverlayStoreKeys());
}
项目:birt    文件:JDBCSelectionPageHelper.java   
JDBCSelectionPageHelper( PreferencePage page )
{
    DEFAULT_MESSAGE = JdbcPlugin.getResourceString( "wizard.message.editDataSource" ); //$NON-NLS-1$
    m_propertyPage = page;
    if ( page instanceof JDBCPropertyPage ) // bidi_hcg
        bidiSupportObj = ( (JDBCPropertyPage) page ).getBidiSupport( );
}
项目:e4Preferences    文件:E4PreferenceRegistry.java   
private void setPreferenceStore(String bundleId, PreferencePage page)
{
    // Affect preference store to this page if this is a
    // PreferencePage, else, must manage it internally
    // Set the issue#1 on github :
    // https://github.com/opcoach/e4Preferences/issues/1
    // And manage the extensions of IP
    initialisePreferenceStoreProviders();

    IPreferenceStore store = null;

    // Get the preference store according to policy.
    Object data = psProviders.get(bundleId);
    if (data != null)
    {
        if (data instanceof IPreferenceStore)
            store = (IPreferenceStore) data;
        else if (data instanceof IPreferenceStoreProvider)
            store = ((IPreferenceStoreProvider) data).getPreferenceStore();
        else if (data instanceof String)
            store = (IPreferenceStore) context.get((String) data);

    } else
    {
        // Default behavior : create a preference store for this bundle and remember of it
        store = new ScopedPreferenceStore(InstanceScope.INSTANCE, bundleId);
        psProviders.put(bundleId, store);
    }


    if (store != null)
        page.setPreferenceStore(store);
    else
    {
        logger.warn("Unable to set the preferenceStore for page " + page.getTitle() + " defined in bundle " + bundleId);
    }

}
项目:xiliary    文件:ScrollbarPreferencePagePDETest.java   
@Test
@ConditionalIgnore( condition = CocoaPlatform.class )
public void pageCreation() {
  IWorkbenchPreferencePage actual = new RegistryAdapter()
      .createExecutableExtension( PREFERENCE_PAGES_EP, IWorkbenchPreferencePage.class )
      .thatMatches( attribute( "id", PAGE_ID ) )
      .process();

  assertThat( actual )
    .isInstanceOf( PreferencePage.class );
}
项目:goclipse    文件:DialogPageUtils.java   
public static void setPrefPageStatus(PreferencePage prefPage, IStatusMessage status) {
    if(!SWTUtil.isOkToUse(prefPage.getControl())) {
        return;
    }

    prefPage.setValid(status == null || !status.getSeverity().isError());

    setDialogPageStatus(prefPage, status);
}
项目:goclipse    文件:DialogPageUtils.java   
public static void setDialogPageStatus(PreferencePage prefPage, IStatusMessage status) {
    if(!SWTUtil.isOkToUse(prefPage.getControl())) {
        return;
    }

    if(status == null) {
        prefPage.setMessage(null);
    } else {
        prefPage.setMessage(status.getMessage(), severityToMessageType(status.getSeverity()));
    }
}
项目:fluentmark    文件:AbstractConfigurationBlock.java   
public AbstractConfigurationBlock(OverlayPreferenceStore store, PreferencePage mainPreferencePage) {
    Assert.isNotNull(store);
    Assert.isNotNull(mainPreferencePage);
    fStore = store;
    fMainPage = mainPreferencePage;
}
项目:raptor-chess-interface    文件:IcsConnector.java   
@Override
public PreferencePage getRootPreferencePage() {
    // TODO Auto-generated method stub
    return null;
}
项目:raptor-chess-interface    文件:BicsConnector.java   
protected void initBics2() {
    bics2 = new BicsConnector(new BicsConnectorContext() {
        @Override
        public String getDescription() {
            return local.getString("bicsConnector19");
        }

        @Override
        public String getShortName() {
            return "bics2";
        }
    }) {

        /**
         * Override not needed.
         */
        @Override
        public PreferencePage getRootPreferencePage() {
            return null;
        }

        /**
         * Override not needed.
         */
        @Override
        public PreferenceNode[] getSecondaryPreferenceNodes() {
            return null;
        }

        /**
         * Override not needed.
         */
        @Override
        protected void createMenuActions() {
        }

        /**
         * Override the initFics2 method to do nothing to avoid the
         * recursion.
         */
        @Override
        protected void initBics2() {

        }

    };
}
项目:raptor-chess-interface    文件:FicsConnector.java   
protected void initFics2() {
    fics2 = new FicsConnector(
            new IcsConnectorContext(new IcsParser(false)) {
                @Override
                public String getDescription() {
                    return local.getString("ficsConn26");
                }

                @Override
                public String getShortName() {
                    return "fics2";
                }
            }) {

        /**
         * Override not needed.
         */
        @Override
        public PreferencePage getRootPreferencePage() {
            return null;
        }

        /**
         * Override not needed.
         */
        @Override
        public PreferenceNode[] getSecondaryPreferenceNodes() {
            return null;
        }

        /**
         * Override not needed.
         */
        @Override
        protected void createMenuActions() {
        }

        /**
         * Override the initFics2 method to do nothing to avoid the
         * recursion.
         */
        @Override
        protected void initFics2() {

        }

    };
    fics2.fics1 = this;
}
项目:PDFReporter-Studio    文件:SWTViewer.java   
@Override
public PreferencePage getPreferencePage() {
    return null;
}
项目:PDFReporter-Studio    文件:CSVViewer.java   
@Override
public PreferencePage getPreferencePage() {
    return new CSVExporterPreferencePage();
}
项目:PDFReporter-Studio    文件:XMLImagesViewer.java   
@Override
public PreferencePage getPreferencePage() {
    return new XMLExporterPreferencePage();
}
项目:PDFReporter-Studio    文件:TXTViewer.java   
@Override
public PreferencePage getPreferencePage() {
    return new TextExporterPreferencePage();
}
项目:PDFReporter-Studio    文件:CSVMetadataViewer.java   
@Override
public PreferencePage getPreferencePage() {
    return new CSVMetadataExporterPreferencePage();
}
项目:PDFReporter-Studio    文件:XMLViewer.java   
@Override
public PreferencePage getPreferencePage() {
    return new XMLExporterPreferencePage();
}
项目:PDFReporter-Studio    文件:HTMLViewer.java   
@Override
public PreferencePage getPreferencePage() {
    return new HTMLExporterPreferencePage();
}
项目:PDFReporter-Studio    文件:XlsMetadataViewer.java   
@Override
public PreferencePage getPreferencePage() {
    return new ExcelExporterPreferencePage();
}
项目:PDFReporter-Studio    文件:DocxViewer.java   
@Override
public PreferencePage getPreferencePage() {
    return new DOCXExporterPreferencePage();
}
项目:PDFReporter-Studio    文件:PdfViewer.java   
@Override
public PreferencePage getPreferencePage() {
    return new PDFExporterPreferencePage();
}
项目:PDFReporter-Studio    文件:OdsViewer.java   
@Override
public PreferencePage getPreferencePage() {
    return new ExcelExporterPreferencePage();
}
项目:PDFReporter-Studio    文件:ExcelAPIViewer.java   
@Override
public PreferencePage getPreferencePage() {
    return new ExcelExporterPreferencePage();
}
项目:PDFReporter-Studio    文件:XlsxViewer.java   
@Override
public PreferencePage getPreferencePage() {
    return new ExcelExporterPreferencePage();
}
项目:PDFReporter-Studio    文件:XlsViewer.java   
@Override
public PreferencePage getPreferencePage() {
    return new ExcelExporterPreferencePage();
}
项目:CooperateModelingEnvironment    文件:PropertiesPageValidationProcessor.java   
public PropertiesPageValidationProcessor(PreferencePage page, IValidateable validateable) {
    super();
    this.page = page;
    this.validateable = validateable;
}
项目:Eclipse-Postfix-Code-Completion    文件:JavaEditorAppearanceConfigurationBlock.java   
public JavaEditorAppearanceConfigurationBlock(PreferencePage mainPreferencePage, OverlayPreferenceStore store) {
    super(store, mainPreferencePage);
    getPreferenceStore().addKeys(createOverlayStoreKeys());
}
项目:Eclipse-Postfix-Code-Completion    文件:AbstractConfigurationBlock.java   
public AbstractConfigurationBlock(OverlayPreferenceStore store, PreferencePage mainPreferencePage) {
    Assert.isNotNull(store);
    Assert.isNotNull(mainPreferencePage);
    fStore= store;
    fMainPage= mainPreferencePage;
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:JavaEditorAppearanceConfigurationBlock.java   
public JavaEditorAppearanceConfigurationBlock(PreferencePage mainPreferencePage, OverlayPreferenceStore store) {
    super(store, mainPreferencePage);
    getPreferenceStore().addKeys(createOverlayStoreKeys());
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:AbstractConfigurationBlock.java   
public AbstractConfigurationBlock(OverlayPreferenceStore store, PreferencePage mainPreferencePage) {
    Assert.isNotNull(store);
    Assert.isNotNull(mainPreferencePage);
    fStore= store;
    fMainPage= mainPreferencePage;
}
项目:birt    文件:SampleDbSelectionPageHelper.java   
SampleDbSelectionPageHelper( PreferencePage page )
{
    m_propertyPage = page;
}
项目:birt    文件:HiveSelectionPageHelper.java   
public HiveSelectionPageHelper( PreferencePage page, String odaDesignerID )
{
    m_propertyPage = page;
    setDefaultMessage( odaDesignerID );
}
项目:birt    文件:MongoDBDataSourcePageHelper.java   
public MongoDBDataSourcePageHelper( PreferencePage page )
{
    propertyPage = page;
    isPropertyPage = true;
}
项目:Pydev    文件:PyEditorHoverConfigurationBlock.java   
public PyEditorHoverConfigurationBlock(PreferencePage mainPreferencePage) {
    Assert.isNotNull(mainPreferencePage);
    fMainPreferencePage = mainPreferencePage;
}
项目:version-tiger    文件:CustomPreferencePageSupport.java   
public CustomPreferencePageSupport(PreferencePage preferencePage, DataBindingContext dbc) {
    super(preferencePage, dbc);
}