Search in sources :

Example 1 with M2EUIPluginActivator

use of org.eclipse.m2e.core.ui.internal.M2EUIPluginActivator in project m2e-core by eclipse-m2e.

the class AbstractMavenDialog method getDialogSettings.

private static IDialogSettings getDialogSettings(String settingsSection) {
    // activator is null inside WindowBuilder design editor
    M2EUIPluginActivator activator = M2EUIPluginActivator.getDefault();
    IDialogSettings pluginSettings = activator != null ? activator.getDialogSettings() : null;
    IDialogSettings settings = pluginSettings != null ? pluginSettings.getSection(settingsSection) : null;
    if (settings == null) {
        settings = new DialogSettings(settingsSection);
        settings.put(KEY_WIDTH, 480);
        settings.put(KEY_HEIGHT, 450);
        if (pluginSettings != null) {
            pluginSettings.addSection(settings);
        }
    }
    return settings;
}
Also used : IDialogSettings(org.eclipse.jface.dialogs.IDialogSettings) DialogSettings(org.eclipse.jface.dialogs.DialogSettings) IDialogSettings(org.eclipse.jface.dialogs.IDialogSettings) M2EUIPluginActivator(org.eclipse.m2e.core.ui.internal.M2EUIPluginActivator)

Aggregations

DialogSettings (org.eclipse.jface.dialogs.DialogSettings)1 IDialogSettings (org.eclipse.jface.dialogs.IDialogSettings)1 M2EUIPluginActivator (org.eclipse.m2e.core.ui.internal.M2EUIPluginActivator)1