Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Rainer7000 authored May 12, 2023
2 parents 989f9c2 + 1e60584 commit 23aa8e9
Show file tree
Hide file tree
Showing 25 changed files with 383 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
package org.eclipse.e4.ui.workbench.renderers.swt;

import java.util.HashMap;
import java.util.Set;
import javax.annotation.PostConstruct;
import org.eclipse.e4.core.contexts.ContextInjectionFactory;
import org.eclipse.e4.core.contexts.IEclipseContext;
Expand Down Expand Up @@ -149,7 +148,7 @@ protected void initRenderer(AbstractPartRenderer renderer) {
@PostConstruct
public void init(IEclipseContext context) {
this.context = context;
this.context.set(SHARED_ELEMENTS_STORE, new HashMap<MUIElement, Set<MPlaceholder>>());
this.context.set(SHARED_ELEMENTS_STORE, new HashMap<>());
}

}
19 changes: 19 additions & 0 deletions bundles/org.eclipse.jface/.settings/.api_filters
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<component id="org.eclipse.jface" version="2">
<resource path="src/org/eclipse/jface/wizard/IWizard.java" type="org.eclipse.jface.wizard.IWizard">
<filter comment="https://github.com/eclipse-platform/eclipse.platform.ui/issues/516" id="404000815">
<message_arguments>
<message_argument value="org.eclipse.jface.wizard.IWizard"/>
<message_argument value="getMinimumWizardSize()"/>
</message_arguments>
</filter>
</resource>
<resource path="src/org/eclipse/jface/wizard/IWizardPage.java" type="org.eclipse.jface.wizard.IWizardPage">
<filter comment="https://github.com/eclipse-platform/eclipse.platform.ui/issues/516" id="404000815">
<message_arguments>
<message_argument value="org.eclipse.jface.wizard.IWizardPage"/>
<message_argument value="getMinimumPageSize()"/>
</message_arguments>
</filter>
</resource>
</component>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2015 IBM Corporation and others.
* Copyright (c) 2000, 2023 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand All @@ -16,6 +16,7 @@
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.dialogs.TrayDialog;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.widgets.Composite;

Expand Down Expand Up @@ -112,6 +113,19 @@ public interface IWizard {
*/
IWizardPage getNextPage(IWizardPage page);

/**
* Returns the minimum size of this wizard. The minimum size is calculated using
* the minimum page sizes of all wizard pages. May return {@code null} if none
* of the wizard pages specify a minimum size.
*
* @see IWizardPage#getMinimumPageSize()
* @return the minimum size encoded as {@code new Point(width,height)}
* @since 3.30
*/
default Point getMinimumWizardSize() {
return null;
}

/**
* Returns the wizard page with the given name belonging to this wizard.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2015 IBM Corporation and others.
* Copyright (c) 2000, 2023 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand All @@ -14,6 +14,7 @@
package org.eclipse.jface.wizard;

import org.eclipse.jface.dialogs.IDialogPage;
import org.eclipse.swt.graphics.Point;

/**
* Interface for a wizard page.
Expand All @@ -32,6 +33,18 @@ public interface IWizardPage extends IDialogPage {
*/
public boolean canFlipToNextPage();

/**
* Returns the minimum page size used of this page. May return {@code null} if
* this page doesn't specify a minimum size..
*
* @see IWizard#getMinimumWizardSize()
* @return the minimum page size encoded as <code>new Point(width,height)</code>
* @since 3.30
*/
default Point getMinimumPageSize() {
return null;
}

/**
* Returns this page's name.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2015 IBM Corporation and others.
* Copyright (c) 2000, 2023 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand All @@ -26,7 +26,9 @@
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.util.Policy;
import org.eclipse.jface.window.IShellProvider;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
Expand Down Expand Up @@ -301,6 +303,27 @@ public String getWindowTitle() {
return windowTitle;
}

@Override
public Point getMinimumWizardSize() {
int minWidth = SWT.DEFAULT;
int minHeight = SWT.DEFAULT;

for (IWizardPage page : pages) {
Point minPageSize = page.getMinimumPageSize();

if (minPageSize != null) {
minWidth = Math.max(minWidth, minPageSize.x);
minHeight = Math.max(minHeight, minPageSize.y);
}
}

if (minWidth == SWT.DEFAULT || minHeight == SWT.DEFAULT) {
return null;
}

return new Point(minWidth, minHeight);
}

@Override
public boolean isHelpAvailable() {
return isHelpAvailable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2018 IBM Corporation and others.
* Copyright (c) 2000, 2023 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand Down Expand Up @@ -749,6 +749,10 @@ private void createPageControls() {
page.getControl().setVisible(false);
}
}
Point minWizardSize = wizard.getMinimumWizardSize();
if (minWizardSize != null) {
getShell().setMinimumSize(minWizardSize);
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ public SmartImportJob(File rootDirectory, Set<IWorkingSet> workingSets, boolean
setWorkingSets(workingSets);
this.configureProjects = configureProjects;
this.deepChildrenDetection = recuriveChildrenDetection;
this.report = Collections.synchronizedMap(new HashMap<IProject, List<ProjectConfigurator>>());
this.errors = Collections.synchronizedMap(new HashMap<IPath, Exception>());
this.report = Collections.synchronizedMap(new HashMap<>());
this.errors = Collections.synchronizedMap(new HashMap<>());
this.crawlerJobGroup = new JobGroup(DataTransferMessages.SmartImportJob_detectAndConfigureProjects, 0, 1);
}

Expand Down Expand Up @@ -350,7 +350,7 @@ private Set<IProject> searchAndImportChildrenProjectsRecursively(final IContaine
}
parentContainer.refreshLocal(IResource.DEPTH_ONE, progressMonitor); // make sure we know all children
Set<IFolder> childrenToProcess = new HashSet<>();
final Set<IProject> res = Collections.synchronizedSet(new HashSet<IProject>());
final Set<IProject> res = Collections.synchronizedSet(new HashSet<>());
for (IResource childResource : parentContainer.members()) {
if (childResource.getType() == IResource.FOLDER && !childResource.isDerived()) {
IPath location = childResource.getLocation();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -674,4 +674,15 @@ public interface IWorkbenchPreferenceConstants {
*/
String RESOURCE_RENAME_MODE_DIALOG = "dialog"; //$NON-NLS-1$

/**
* Preference for the <i>advised</i> time (in ms) after a closed browser hover
* is to be disposed.
* <p>
* The integer default value for this preference is: <code>-1</code>.
* Non-positive values indicate closed hovers are not disposed automatically.
* </p>
*
* @since 3.129
*/
String DISPOSE_CLOSED_BROWSER_HOVER_TIMEOUT = "disposeClosedBrowserHoverTimeout"; //$NON-NLS-1$
}
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ public void initializeDefaultPreferences() {
node.putBoolean(IPreferenceConstants.SHOW_KEYS_ENABLED_FOR_MOUSE_EVENTS, false);
node.putInt(IPreferenceConstants.SHOW_KEYS_TIME_TO_CLOSE, 3000);

node.putInt(IWorkbenchPreferenceConstants.DISPOSE_CLOSED_BROWSER_HOVER_TIMEOUT, -1);

node.put(IWorkbenchPreferenceConstants.RESOURCE_RENAME_MODE,
IWorkbenchPreferenceConstants.RESOURCE_RENAME_MODE_INLINE);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import java.util.ArrayList;
import org.eclipse.e4.core.contexts.IEclipseContext;
import org.eclipse.e4.ui.model.application.MApplication;
import org.eclipse.e4.ui.model.application.ui.basic.MTrimElement;
import org.eclipse.e4.ui.model.application.ui.basic.MTrimmedWindow;
import org.eclipse.e4.ui.model.application.ui.basic.MWindow;
import org.eclipse.e4.ui.model.application.ui.menu.MMenu;
Expand Down Expand Up @@ -96,7 +95,7 @@ public CustomizeActionBars(IWorkbenchWindowConfigurer configurer, IEclipseContex
menuRenderer.linkModelToManager(mainMenu, menuManager);
windowModel.setMainMenu(mainMenu);

coolBarManager = new CoolBarToTrimManager(app, windowModel, new ArrayList<MTrimElement>(), rendererFactory);
coolBarManager = new CoolBarToTrimManager(app, windowModel, new ArrayList<>(), rendererFactory);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ public class TaskBarProgressManager {

private boolean isAnimated = false;

private List<Job> jobs = Collections.synchronizedList(new ArrayList<Job>());
private List<Job> jobs = Collections.synchronizedList(new ArrayList<>());

private Map<Job, JobInfo> jobInfoMap = Collections.synchronizedMap(new HashMap<Job, JobInfo>());
private Map<Job, JobInfo> jobInfoMap = Collections.synchronizedMap(new HashMap<>());

private final TaskItem taskItem;

Expand Down
14 changes: 0 additions & 14 deletions features/org.eclipse.e4.rcp/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -143,20 +143,6 @@
version="0.0.0"
unpack="false"/>

<plugin
id="javax.inject"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>

<plugin
id="javax.annotation"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>

<plugin
id="org.eclipse.e4.core.di"
download-size="0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.eclipse.e4.ui.tests.css.core
Bundle-Version: 1.302.0.qualifier
Bundle-Version: 1.302.100.qualifier
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.swt,
org.eclipse.e4.ui.css.core,
Expand Down
2 changes: 1 addition & 1 deletion tests/org.eclipse.e4.ui.tests.css.swt/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.eclipse.e4.ui.tests.css.swt; singleton:=true
Bundle-Version: 0.12.100.qualifier
Bundle-Version: 0.12.200.qualifier
Require-Bundle: org.eclipse.e4.ui.css.core,
org.eclipse.e4.ui.css.swt,
org.w3c.css.sac,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
*/
public class EventLoopMonitorThreadTests {
/* NOTE: All time-related values in this class are in milliseconds. */
private static final long MAX_TIMEOUT_MS = 1 * 1000; // 1 second
private static final long MAX_TIMEOUT_MS = 3 * 1000; // 3 seconds
private static final int FREEZE_THRESHOLD_MS = 100;
private static final int SAMPLE_INTERVAL_MS = FREEZE_THRESHOLD_MS * 2 / 3;
public static final int FORCE_DEADLOCK_LOG_TIME_MS = 10 * 60 * 1000; // == 10 minutes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@
Bug407422Test.class,
MultipleWindowsTest.class,
Bug543609Test.class,
SaveablesListTest.class
SaveablesListTest.class,
PerspectiveExtensionReaderTest.class,
ModeledPageLayoutTest.class,

})
public class ApiTestSuite {

Expand Down
Loading

0 comments on commit 23aa8e9

Please sign in to comment.