Java Code Examples for org.eclipse.jface.dialogs.IDialogSettings#getSection()
The following examples show how to use
org.eclipse.jface.dialogs.IDialogSettings#getSection() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TmfTableColumnUtils.java From tracecompass with Eclipse Public License 2.0 | 6 votes |
private static void saveColumnElementBoolean(String traceTypeId, String sectionName, boolean[] data) { if (traceTypeId == null) { return; } if (data == null) { clearColumnElement(traceTypeId, sectionName); return; } IDialogSettings settings = Activator.getDefault().getDialogSettings(); IDialogSettings section = settings.getSection(ROOT_SECTION_NAME); if (section == null) { section = settings.addNewSection(ROOT_SECTION_NAME); } IDialogSettings columnSection = section.getSection(sectionName); if (columnSection == null) { columnSection = section.addNewSection(sectionName); } columnSection.put(traceTypeId, Arrays.toString(data)); }
Example 2
Source File: ExportRepositoryWizard.java From bonita-studio with GNU General Public License v2.0 | 6 votes |
public ExportRepositoryWizard(final List<IRepositoryStore<? extends IRepositoryFileStore>> stores, final boolean isZip, final Set<Object> defaultSelectedFiles, final String defaultFileName, final String wizardTitle) { this.stores = stores; setDefaultPageImageDescriptor(Pics.getWizban()); setNeedsProgressMonitor(true); this.isZip = isZip; this.wizardTitle = wizardTitle; this.defaultSelectedFiles = defaultSelectedFiles; this.defaultFileName = defaultFileName; setWindowTitle(wizardTitle); final IDialogSettings workbenchSettings = WorkbenchPlugin.getDefault() .getDialogSettings(); IDialogSettings wizardSettings = workbenchSettings .getSection("ExportRepositoryWizard"); //$NON-NLS-1$ if (wizardSettings == null) { wizardSettings = workbenchSettings.addNewSection("ExportRepositoryWizard"); //$NON-NLS-1$ } setDialogSettings(wizardSettings); }
Example 3
Source File: AbstractXmlViewInfo.java From tracecompass with Eclipse Public License 2.0 | 6 votes |
/** * Get this view property section from the settings. The property section is * per view ID and view name if available. * * @return The property section */ protected IDialogSettings getPersistentPropertyStore() { IDialogSettings settings = Activator.getDefault().getDialogSettings(); IDialogSettings section = settings.getSection(fViewId); if (section == null) { section = settings.addNewSection(fViewId); if (section == null) { throw new IllegalStateException("The persistent property section could not be added " + fViewId); //$NON-NLS-1$ } } if (fSubsectionName == null) { return section; } // FIXME: when a file is removed from TraceCompass, its view section should also be deleted IDialogSettings subSection = section.getSection(fSubsectionName); if (subSection == null) { subSection = section.addNewSection(fSubsectionName); if (subSection == null) { throw new IllegalStateException("The persistent property section could not be added: " + fSubsectionName); //$NON-NLS-1$ } } return subSection; }
Example 4
Source File: ImportProjectWizard.java From translationstudio8 with GNU General Public License v2.0 | 6 votes |
/** * Constructor for ExternalProjectImportWizard. * * @param initialPath Default path for wizard to import * @since 3.5 */ public ImportProjectWizard(String initialPath) { super(); this.initialPath = initialPath; setWindowTitle(DataTransferMessages.DataTransfer_importTitle); setNeedsProgressMonitor(true); IDialogSettings workbenchSettings = IDEWorkbenchPlugin.getDefault() .getDialogSettings(); IDialogSettings wizardSettings = workbenchSettings .getSection(IMPORT_PROJECT_SECTION); if (wizardSettings == null) { wizardSettings = workbenchSettings .addNewSection(IMPORT_PROJECT_SECTION); } setDialogSettings(wizardSettings); }
Example 5
Source File: TmfTableColumnUtils.java From tracecompass with Eclipse Public License 2.0 | 6 votes |
private static String loadSection(String traceTypeId, String sectionName) { if (traceTypeId == null) { return null; } IDialogSettings settings = Activator.getDefault().getDialogSettings(); IDialogSettings section = settings.getSection(ROOT_SECTION_NAME); if (section == null) { return null; } IDialogSettings columnSection = section.getSection(sectionName); if (columnSection == null) { return null; } String string = columnSection.get(traceTypeId); if (string == null || string.length() < 3) { return null; } if (string.charAt(0) != '[' || string.charAt(string.length() - 1) != ']') { return null; } return string; }
Example 6
Source File: SearchIndexDataHistory.java From Pydev with Eclipse Public License 1.0 | 5 votes |
public SearchIndexDataHistory(IDialogSettings dialogSettings) { IDialogSettings section = dialogSettings.getSection(PAGE_NAME); if (section == null) { section = dialogSettings.addNewSection(PAGE_NAME); } this.settings = section; }
Example 7
Source File: CordovaPluginWizard.java From thym with Eclipse Public License 1.0 | 5 votes |
private void savePageSettings() { IDialogSettings workbenchSettings = HybridUI.getDefault() .getDialogSettings(); IDialogSettings section = workbenchSettings .getSection(DIALOG_SETTINGS_KEY); if (section == null) { section = workbenchSettings.addNewSection(DIALOG_SETTINGS_KEY); } setDialogSettings(section); pageOne.saveWidgetValues(); }
Example 8
Source File: FlameGraphView.java From tracecompass with Eclipse Public License 2.0 | 5 votes |
private void loadContentPresentationOption() { IDialogSettings settings = Activator.getDefault().getDialogSettings(); IDialogSettings section = settings.getSection(getClass().getName()); ContentPresentation contentPresentation = fContentPresentation; if (section != null) { String contentPresentationOption = section.get(CONTENT_PRESENTATION_OPTION_KEY); if (contentPresentationOption != null) { contentPresentation = ContentPresentation.fromName(contentPresentationOption); } } VIEW_BY_THREAD.setChecked(contentPresentation == ContentPresentation.BY_THREAD); VIEW_AGGREGATE.setChecked(contentPresentation == ContentPresentation.AGGREGATE_THREADS); fContentPresentation = contentPresentation; }
Example 9
Source File: ConcordanceSearchDialog.java From translationstudio8 with GNU General Public License v2.0 | 5 votes |
private IDialogSettings getDialogSettings() { IDialogSettings settings = Activator.getDefault().getDialogSettings(); IDialogSettings fDialogSettings = settings.getSection(getClass().getName()); if (fDialogSettings == null) fDialogSettings = settings.addNewSection(getClass().getName()); return fDialogSettings; }
Example 10
Source File: JobCamelScriptsExportWizard.java From tesb-studio-se with Apache License 2.0 | 5 votes |
public JobCamelScriptsExportWizard() { setWindowTitle(Messages.getString("JobScriptsExportWizard.buildRounte")); //$NON-NLS-1$ setDefaultPageImageDescriptor(IDEWorkbenchPlugin.getIDEImageDescriptor("wizban/exportzip_wiz.png"));//$NON-NLS-1$ setNeedsProgressMonitor(true); IDialogSettings workbenchSettings = CamelDesignerPlugin.getDefault().getDialogSettings(); IDialogSettings section = workbenchSettings.getSection("JobCamelScriptsExportWizard"); //$NON-NLS-1$ if (section == null) { section = workbenchSettings.addNewSection("JobCamelScriptsExportWizard"); //$NON-NLS-1$ } setDialogSettings(section); }
Example 11
Source File: FatJarPackageWizard.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
/** * Creates a wizard for exporting workspace resources to a JAR file. */ public FatJarPackageWizard() { IDialogSettings workbenchSettings= JavaPlugin.getDefault().getDialogSettings(); IDialogSettings section= workbenchSettings.getSection(DIALOG_SETTINGS_KEY); if (section == null) fHasNewDialogSettings= true; else { fHasNewDialogSettings= false; setDialogSettings(section); } }
Example 12
Source File: BaseOutputDialog.java From workspacemechanic with Eclipse Public License 1.0 | 5 votes |
@Override protected IDialogSettings getDialogBoundsSettings() { String dialogSettingsSection = getDialogSettingsSection(); if (dialogSettingsSection == null) { return null; } IDialogSettings settings = MechanicPlugin.getDefault().getDialogSettings(); IDialogSettings section = settings.getSection(dialogSettingsSection); if (section == null) section = settings.addNewSection(dialogSettingsSection); return section; }
Example 13
Source File: ADocSpecExportWizard.java From n4js with Eclipse Public License 1.0 | 5 votes |
/** * Default constructor */ public ADocSpecExportWizard() { IDialogSettings workbenchSettings = WorkbenchPlugin.getDefault().getDialogSettings(); IDialogSettings section = workbenchSettings.getSection(WIZARD_NAME);// $NON-NLS-1$ if (section == null) { section = workbenchSettings.addNewSection(WIZARD_NAME);// $NON-NLS-1$ } setDialogSettings(section); }
Example 14
Source File: OptionalMessageDialog.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
/** * Returns this dialog * * @return the settings to be used */ private static IDialogSettings getDialogSettings() { IDialogSettings settings= JavaPlugin.getDefault().getDialogSettings(); settings= settings.getSection(STORE_ID); if (settings == null) settings= JavaPlugin.getDefault().getDialogSettings().addNewSection(STORE_ID); return settings; }
Example 15
Source File: AbstractTimeGraphView.java From tracecompass with Eclipse Public License 2.0 | 5 votes |
/** * Get the dialog settings for this view * * @param force * true to create the section if it doesn't exist * @return the dialog settings */ private IDialogSettings getDialogSettings(boolean force) { IDialogSettings settings = Activator.getDefault().getDialogSettings(); String sectionName = getViewSite().getId(); IDialogSettings section = settings.getSection(sectionName); if (section == null && force) { section = settings.addNewSection(sectionName); } return section; }
Example 16
Source File: CheckstyleMarkerFilter.java From eclipse-cs with GNU Lesser General Public License v2.1 | 5 votes |
/** * Saves the state of the filter into the given dialog settings. * * @param dialogSettings * the dialog settings */ public void saveState(IDialogSettings dialogSettings) { if (dialogSettings != null) { IDialogSettings settings = dialogSettings.getSection(TAG_DIALOG_SECTION); if (settings == null) { settings = dialogSettings.addNewSection(TAG_DIALOG_SECTION); } settings.put(TAG_ENABLED, mEnabled); settings.put(TAG_ON_RESOURCE, mOnResource); if (mWorkingSet != null) { settings.put(TAG_WORKING_SET, mWorkingSet.getName()); } settings.put(TAG_SELECT_BY_SEVERITY, mSelectBySeverity); settings.put(TAG_SEVERITY, mSeverity); settings.put(TAG_SELECT_BY_REGEX, mFilterByRegex); if (mFilterRegex != null) { settings.put(TAG_REGULAR_EXPRESSIONS, mFilterRegex.toArray(new String[mFilterRegex.size()])); } } }
Example 17
Source File: ImportProjectWizard.java From gama with GNU General Public License v3.0 | 5 votes |
public ImportProjectWizard(final String initialPath) { this.initialPath = initialPath; setNeedsProgressMonitor(true); final IDialogSettings workbenchSettings = IDEWorkbenchPlugin.getDefault().getDialogSettings(); IDialogSettings wizardSettings = workbenchSettings.getSection(EXTERNAL_PROJECT_SECTION); if (wizardSettings == null) { wizardSettings = workbenchSettings.addNewSection(EXTERNAL_PROJECT_SECTION); } setDialogSettings(wizardSettings); }
Example 18
Source File: ControlFlowView.java From tracecompass with Eclipse Public License 2.0 | 4 votes |
@Override protected void fillLocalToolBar(IToolBarManager manager) { // add "Optimization" Button to local tool bar of Controlflow IAction optimizationAction = getOptimizationAction(); manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS, optimizationAction); // add a separator to local tool bar manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS, new Separator()); super.fillLocalToolBar(manager); IDialogSettings settings = Activator.getDefault().getDialogSettings(); IDialogSettings section = settings.getSection(getClass().getName()); if (section == null) { section = settings.addNewSection(getClass().getName()); } IAction hideArrowsAction = getTimeGraphViewer().getHideArrowsAction(section); manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS, hideArrowsAction); IAction followArrowBwdAction = getTimeGraphViewer().getFollowArrowBwdAction(); followArrowBwdAction.setText(Messages.ControlFlowView_followCPUBwdText); followArrowBwdAction.setToolTipText(Messages.ControlFlowView_followCPUBwdText); manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS, followArrowBwdAction); IAction followArrowFwdAction = getTimeGraphViewer().getFollowArrowFwdAction(); followArrowFwdAction.setText(Messages.ControlFlowView_followCPUFwdText); followArrowFwdAction.setToolTipText(Messages.ControlFlowView_followCPUFwdText); manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS, followArrowFwdAction); IAction previousEventAction = new SearchEventAction(false, PackageMessages.ControlFlowView_PreviousEventJobName); previousEventAction.setText(PackageMessages.ControlFlowView_PreviousEventActionName); previousEventAction.setToolTipText(PackageMessages.ControlFlowView_PreviousEventActionTooltip); previousEventAction.setImageDescriptor(Activator.getDefault().getImageDescripterFromPath(PREV_EVENT_ICON_PATH)); manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS, previousEventAction); IAction nextEventAction = new SearchEventAction(true, PackageMessages.ControlFlowView_NextEventJobName); nextEventAction.setText(PackageMessages.ControlFlowView_NextEventActionName); nextEventAction.setToolTipText(PackageMessages.ControlFlowView_NextEventActionTooltip); nextEventAction.setImageDescriptor(Activator.getDefault().getImageDescripterFromPath(NEXT_EVENT_ICON_PATH)); manager.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS, nextEventAction); }
Example 19
Source File: MarkerStatsView.java From eclipse-cs with GNU Lesser General Public License v2.1 | 3 votes |
@Override public IDialogSettings getTableSettings() { IDialogSettings mainSettings = getDialogSettings(); IDialogSettings settings = mainSettings.getSection(TAG_SECTION_DETAIL); if (settings == null) { settings = mainSettings.addNewSection(TAG_SECTION_DETAIL); } return settings; }
Example 20
Source File: MarkerStatsView.java From eclipse-cs with GNU Lesser General Public License v2.1 | 3 votes |
@Override public IDialogSettings getTableSettings() { IDialogSettings mainSettings = getDialogSettings(); IDialogSettings settings = mainSettings.getSection(TAG_SECTION_MASTER); if (settings == null) { settings = mainSettings.addNewSection(TAG_SECTION_MASTER); } return settings; }