@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)); }
@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); } } }
@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) }); } } } } }
public SaveParticipantConfigurationBlock(IScopeContext context, PreferencePage preferencePage) { Assert.isNotNull(context); Assert.isNotNull(preferencePage); fContext= context; fPreferencePage= preferencePage; fConfigurations= new ArrayList<ISaveParticipantPreferenceConfiguration>(); }
public JavaEditorHoverConfigurationBlock(PreferencePage mainPreferencePage, OverlayPreferenceStore store) { Assert.isNotNull(mainPreferencePage); Assert.isNotNull(store); fMainPreferencePage= mainPreferencePage; fStore= store; fStore.addKeys(createOverlayStoreKeys()); }
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( ); }
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); } }
@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 ); }
public static void setPrefPageStatus(PreferencePage prefPage, IStatusMessage status) { if(!SWTUtil.isOkToUse(prefPage.getControl())) { return; } prefPage.setValid(status == null || !status.getSeverity().isError()); setDialogPageStatus(prefPage, status); }
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())); } }
public AbstractConfigurationBlock(OverlayPreferenceStore store, PreferencePage mainPreferencePage) { Assert.isNotNull(store); Assert.isNotNull(mainPreferencePage); fStore = store; fMainPage = mainPreferencePage; }
@Override public PreferencePage getRootPreferencePage() { // TODO Auto-generated method stub return null; }
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() { } }; }
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; }
@Override public PreferencePage getPreferencePage() { return null; }
@Override public PreferencePage getPreferencePage() { return new CSVExporterPreferencePage(); }
@Override public PreferencePage getPreferencePage() { return new XMLExporterPreferencePage(); }
@Override public PreferencePage getPreferencePage() { return new TextExporterPreferencePage(); }
@Override public PreferencePage getPreferencePage() { return new CSVMetadataExporterPreferencePage(); }
@Override public PreferencePage getPreferencePage() { return new HTMLExporterPreferencePage(); }
@Override public PreferencePage getPreferencePage() { return new ExcelExporterPreferencePage(); }
@Override public PreferencePage getPreferencePage() { return new DOCXExporterPreferencePage(); }
@Override public PreferencePage getPreferencePage() { return new PDFExporterPreferencePage(); }
public PropertiesPageValidationProcessor(PreferencePage page, IValidateable validateable) { super(); this.page = page; this.validateable = validateable; }
public JavaEditorAppearanceConfigurationBlock(PreferencePage mainPreferencePage, OverlayPreferenceStore store) { super(store, mainPreferencePage); getPreferenceStore().addKeys(createOverlayStoreKeys()); }
public AbstractConfigurationBlock(OverlayPreferenceStore store, PreferencePage mainPreferencePage) { Assert.isNotNull(store); Assert.isNotNull(mainPreferencePage); fStore= store; fMainPage= mainPreferencePage; }
SampleDbSelectionPageHelper( PreferencePage page ) { m_propertyPage = page; }
public HiveSelectionPageHelper( PreferencePage page, String odaDesignerID ) { m_propertyPage = page; setDefaultMessage( odaDesignerID ); }
public MongoDBDataSourcePageHelper( PreferencePage page ) { propertyPage = page; isPropertyPage = true; }
public PyEditorHoverConfigurationBlock(PreferencePage mainPreferencePage) { Assert.isNotNull(mainPreferencePage); fMainPreferencePage = mainPreferencePage; }
public CustomPreferencePageSupport(PreferencePage preferencePage, DataBindingContext dbc) { super(preferencePage, dbc); }