Skip to content

Commit

Permalink
Store properties dialog bounds. (eclipse-platform#1282)
Browse files Browse the repository at this point in the history
Properties dialog is created and shown when 'Properties' action is
performed while an object is selected. (e.g. in Project Explorer)

Issue eclipse-platform#949
  • Loading branch information
marcushoepfner authored Dec 7, 2023
1 parent 01ae9f9 commit 8abe1b1
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

import java.util.Iterator;
import org.eclipse.core.runtime.Adapters;
import org.eclipse.jface.dialogs.DialogSettings;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.preference.IPreferenceNode;
import org.eclipse.jface.preference.PreferenceManager;
Expand All @@ -29,8 +31,10 @@
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.internal.IWorkbenchHelpContextIds;
import org.eclipse.ui.internal.WorkbenchMessages;
import org.eclipse.ui.internal.WorkbenchPlugin;
import org.eclipse.ui.model.IContributionService;
import org.eclipse.ui.model.IWorkbenchAdapter;
import org.osgi.framework.Bundle;

/**
* This dialog is created and shown when 'Properties' action is performed while
Expand Down Expand Up @@ -180,4 +184,11 @@ protected String getContributionType() {
return IContributionService.TYPE_PROPERTY;
}

@Override
protected IDialogSettings getDialogBoundsSettings() {
Bundle bundle = WorkbenchPlugin.getDefault().getBundle();
IDialogSettings settings = PlatformUI.getDialogSettingsProvider(bundle).getDialogSettings();
String name = getClass().getSimpleName() + ".dialogBounds"; //$NON-NLS-1$
return DialogSettings.getOrCreateSection(settings, name);
}
}

0 comments on commit 8abe1b1

Please sign in to comment.