Skip to content

Commit

Permalink
Use DefaultScope instead of InstanceScope for full screen preference
Browse files Browse the repository at this point in the history
- This is better as it doesn't need to write to the org.eclipse.ui.workbench.prefs file
  • Loading branch information
Phillipus committed Dec 21, 2024
1 parent ad3cfcc commit 57b00d3
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
*/
package com.archimatetool.editor;

import org.eclipse.core.runtime.preferences.DefaultScope;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.jface.dialogs.TrayDialog;
import org.eclipse.jface.preference.IPreferenceNode;
import org.eclipse.jface.preference.PreferenceManager;
Expand Down Expand Up @@ -88,8 +88,8 @@ public void initialize(IWorkbenchConfigurer configurer) {

// We use Eclipse's org.eclipse.ui.internal.handlers.FullScreenHandler which shows
// a popup with a message to tell you this and a "do not show again" checkbox.
// This is hard to see and unnecessary, so set this preference now so it doesn't show.
IEclipsePreferences prefs = InstanceScope.INSTANCE.getNode("org.eclipse.ui.workbench");
// This is hard to see and unnecessary, so set the default preference to false now so it doesn't show.
IEclipsePreferences prefs = DefaultScope.INSTANCE.getNode("org.eclipse.ui.workbench");
if(prefs != null) {
prefs.putBoolean("org.eclipse.ui.window.fullscreenmode.donotshowinfoagain", true);
}
Expand Down

0 comments on commit 57b00d3

Please sign in to comment.