[580783] Fix compiler errors against Platform 3.26 PopupDialog
Change-Id: I5dad50aea67c1b7f525063dbc6e55493f4b96f98
diff --git a/bundles/org.eclipse.wst.jsdt.core/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.jsdt.core/META-INF/MANIFEST.MF
index f082725..a85c1a3 100644
--- a/bundles/org.eclipse.wst.jsdt.core/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.jsdt.core/META-INF/MANIFEST.MF
@@ -1,6 +1,6 @@
Manifest-Version: 1.0
Bundle-SymbolicName: org.eclipse.wst.jsdt.core; singleton:=true
-Bundle-Version: 2.0.303.qualifier
+Bundle-Version: 2.0.400.qualifier
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
diff --git a/bundles/org.eclipse.wst.jsdt.core/pom.xml b/bundles/org.eclipse.wst.jsdt.core/pom.xml
index 772064d..eb45568 100644
--- a/bundles/org.eclipse.wst.jsdt.core/pom.xml
+++ b/bundles/org.eclipse.wst.jsdt.core/pom.xml
@@ -22,6 +22,6 @@
<groupId>org.eclipse.webtools.jsdt.bundles</groupId>
<artifactId>org.eclipse.wst.jsdt.core</artifactId>
- <version>2.0.303-SNAPSHOT</version>
+ <version>2.0.400-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/bundles/org.eclipse.wst.jsdt.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.jsdt.ui/META-INF/MANIFEST.MF
index f233228..7335c9d 100755
--- a/bundles/org.eclipse.wst.jsdt.ui/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.wst.jsdt.ui/META-INF/MANIFEST.MF
@@ -1,6 +1,6 @@
Manifest-Version: 1.0
Bundle-SymbolicName: org.eclipse.wst.jsdt.ui; singleton:=true
-Bundle-Version: 2.1.400.qualifier
+Bundle-Version: 2.1.500.qualifier
Bundle-Activator: org.eclipse.wst.jsdt.internal.ui.JavaScriptPlugin
Import-Package: com.ibm.icu.text,
com.ibm.icu.util,
@@ -110,6 +110,7 @@
Require-Bundle: org.eclipse.ui;bundle-version="[3.5.0,4.0.0)",
org.eclipse.ui.console;bundle-version="[3.4.0,4.0.0)",
org.eclipse.help;bundle-version="[3.4.0,4.0.0)",
+ org.eclipse.core.commands;bundle-version="[3.10.0,4.0.0)",
org.eclipse.core.expressions;bundle-version="[3.4.100,4.0.0)",
org.eclipse.core.filesystem;bundle-version="[1.2.0,2.0.0)",
org.eclipse.core.resources;bundle-version="[3.5.0,4.0.0)",
diff --git a/bundles/org.eclipse.wst.jsdt.ui/pom.xml b/bundles/org.eclipse.wst.jsdt.ui/pom.xml
index 4eca301..03010f0 100644
--- a/bundles/org.eclipse.wst.jsdt.ui/pom.xml
+++ b/bundles/org.eclipse.wst.jsdt.ui/pom.xml
@@ -22,7 +22,7 @@
<groupId>org.eclipse.webtools.jsdt.bundles</groupId>
<artifactId>org.eclipse.wst.jsdt.ui</artifactId>
- <version>2.1.400-SNAPSHOT</version>
+ <version>2.1.500-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<build>
diff --git a/bundles/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/ui/text/AbstractInformationControl.java b/bundles/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/ui/text/AbstractInformationControl.java
index 820dcc8..8cf9087 100644
--- a/bundles/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/ui/text/AbstractInformationControl.java
+++ b/bundles/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/ui/text/AbstractInformationControl.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2022 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
@@ -10,12 +10,13 @@
*******************************************************************************/
package org.eclipse.wst.jsdt.internal.ui.text;
-import java.util.List;
-
+import org.eclipse.core.commands.Command;
+import org.eclipse.core.commands.CommandManager;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.bindings.TriggerSequence;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.dialogs.PopupDialog;
@@ -57,11 +58,8 @@
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.commands.ActionHandler;
import org.eclipse.ui.commands.HandlerSubmission;
-import org.eclipse.ui.commands.ICommand;
-import org.eclipse.ui.commands.ICommandManager;
-import org.eclipse.ui.commands.IKeySequenceBinding;
import org.eclipse.ui.commands.Priority;
-import org.eclipse.ui.keys.KeySequence;
+import org.eclipse.ui.keys.IBindingService;
import org.eclipse.wst.jsdt.core.IJavaScriptElement;
import org.eclipse.wst.jsdt.core.IParent;
import org.eclipse.wst.jsdt.internal.ui.JavaScriptPlugin;
@@ -120,8 +118,8 @@
private TreeViewer fTreeViewer;
/** The current string matcher */
protected StringMatcher fStringMatcher;
- private ICommand fInvokingCommand;
- private KeySequence[] fInvokingCommandKeySequences;
+ private Command fInvokingCommand;
+ private TriggerSequence[] fInvokingCommandKeySequences;
/**
* Fields that support the dialog menu
@@ -153,9 +151,9 @@
* @param showStatusField <code>true</code> iff the control has a status field at the bottom
*/
public AbstractInformationControl(Shell parent, int shellStyle, int treeStyle, String invokingCommandId, boolean showStatusField) {
- super(parent, shellStyle, true, true, true, true, null, null);
+ super(parent, shellStyle, true, true, true, true, true, null, null);
if (invokingCommandId != null) {
- ICommandManager commandManager= PlatformUI.getWorkbench().getCommandSupport().getCommandManager();
+ CommandManager commandManager= PlatformUI.getWorkbench().getActiveWorkbenchWindow().getService(CommandManager.class);
fInvokingCommand= commandManager.getCommand(invokingCommandId);
if (fInvokingCommand != null && !fInvokingCommand.isDefined())
fInvokingCommand= null;
@@ -617,7 +615,7 @@
* the call to constrainShellSize in PopupDialog.open will still ensure that the shell is
* entirely visible.
*/
- if (!getPersistBounds() || getDialogSettings() == null)
+ if (!getPersistLocation() || getDialogSettings() == null)
getShell().setLocation(location);
}
@@ -685,21 +683,16 @@
getShell().removeFocusListener(listener);
}
- final protected ICommand getInvokingCommand() {
+ final protected Command getInvokingCommand() {
return fInvokingCommand;
}
- final protected KeySequence[] getInvokingCommandKeySequences() {
+ final protected TriggerSequence[] getInvokingCommandKeySequences() {
if (fInvokingCommandKeySequences == null) {
if (getInvokingCommand() != null) {
- List list= getInvokingCommand().getKeySequenceBindings();
- if (!list.isEmpty()) {
- fInvokingCommandKeySequences= new KeySequence[list.size()];
- for (int i= 0; i < fInvokingCommandKeySequences.length; i++) {
- fInvokingCommandKeySequences[i]= ((IKeySequenceBinding) list.get(i)).getKeySequence();
- }
- return fInvokingCommandKeySequences;
- }
+ IBindingService bindingService = PlatformUI.getWorkbench().getAdapter(IBindingService.class);
+ fInvokingCommandKeySequences = bindingService.getActiveBindingsFor(getInvokingCommand().getId());
+ return fInvokingCommandKeySequences;
}
}
return fInvokingCommandKeySequences;
diff --git a/bundles/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/ui/text/JavaOutlineInformationControl.java b/bundles/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/ui/text/JavaOutlineInformationControl.java
index cb29ad4..f597dd1 100644
--- a/bundles/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/ui/text/JavaOutlineInformationControl.java
+++ b/bundles/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/ui/text/JavaOutlineInformationControl.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2022 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
@@ -22,6 +22,9 @@
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.bindings.TriggerSequence;
+import org.eclipse.jface.bindings.keys.KeySequence;
+import org.eclipse.jface.bindings.keys.KeyStroke;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.viewers.AbstractTreeViewer;
import org.eclipse.jface.viewers.TreeViewer;
@@ -43,12 +46,11 @@
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.keys.KeySequence;
import org.eclipse.ui.keys.SWTKeySupport;
-import org.eclipse.wst.jsdt.core.IJavaScriptUnit;
-import org.eclipse.wst.jsdt.core.IJavaScriptElement;
-import org.eclipse.wst.jsdt.core.IMember;
import org.eclipse.wst.jsdt.core.IFunction;
+import org.eclipse.wst.jsdt.core.IJavaScriptElement;
+import org.eclipse.wst.jsdt.core.IJavaScriptUnit;
+import org.eclipse.wst.jsdt.core.IMember;
import org.eclipse.wst.jsdt.core.IType;
import org.eclipse.wst.jsdt.core.ITypeHierarchy;
import org.eclipse.wst.jsdt.core.ITypeRoot;
@@ -57,8 +59,8 @@
import org.eclipse.wst.jsdt.internal.corext.util.MethodOverrideTester;
import org.eclipse.wst.jsdt.internal.corext.util.SuperTypeHierarchyCache;
import org.eclipse.wst.jsdt.internal.ui.IJavaHelpContextIds;
-import org.eclipse.wst.jsdt.internal.ui.JavaScriptPlugin;
import org.eclipse.wst.jsdt.internal.ui.JavaPluginImages;
+import org.eclipse.wst.jsdt.internal.ui.JavaScriptPlugin;
import org.eclipse.wst.jsdt.internal.ui.JavaUIMessages;
import org.eclipse.wst.jsdt.internal.ui.actions.CategoryFilterActionGroup;
import org.eclipse.wst.jsdt.internal.ui.typehierarchy.AbstractHierarchyViewerSorter;
@@ -584,7 +586,7 @@
* {@inheritDoc}
*/
protected String getStatusFieldText() {
- KeySequence[] sequences= getInvokingCommandKeySequences();
+ TriggerSequence[] sequences= getInvokingCommandKeySequences();
if (sequences == null || sequences.length == 0)
return ""; //$NON-NLS-1$
@@ -629,8 +631,8 @@
fKeyAdapter= new KeyAdapter() {
public void keyPressed(KeyEvent e) {
int accelerator = SWTKeySupport.convertEventToUnmodifiedAccelerator(e);
- KeySequence keySequence = KeySequence.getInstance(SWTKeySupport.convertAcceleratorToKeyStroke(accelerator));
- KeySequence[] sequences= getInvokingCommandKeySequences();
+ TriggerSequence keySequence = KeySequence.getInstance (KeyStroke.getInstance(e.stateMask, (char) accelerator));
+ TriggerSequence[] sequences= getInvokingCommandKeySequences();
if (sequences == null)
return;
for (int i= 0; i < sequences.length; i++) {
diff --git a/bundles/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/ui/typehierarchy/HierarchyInformationControl.java b/bundles/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/ui/typehierarchy/HierarchyInformationControl.java
index 65fbd8d..47274a6 100644
--- a/bundles/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/ui/typehierarchy/HierarchyInformationControl.java
+++ b/bundles/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/ui/typehierarchy/HierarchyInformationControl.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2022 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
@@ -12,6 +12,7 @@
import java.lang.reflect.InvocationTargetException;
+import org.eclipse.jface.bindings.TriggerSequence;
import org.eclipse.jface.viewers.AbstractTreeViewer;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer;
@@ -81,7 +82,7 @@
public void keyPressed(KeyEvent e) {
int accelerator = SWTKeySupport.convertEventToUnmodifiedAccelerator(e);
KeySequence keySequence = KeySequence.getInstance(SWTKeySupport.convertAcceleratorToKeyStroke(accelerator));
- KeySequence[] sequences= getInvokingCommandKeySequences();
+ TriggerSequence[] sequences= getInvokingCommandKeySequences();
if (sequences == null)
return;
@@ -332,7 +333,7 @@
}
protected String getStatusFieldText() {
- KeySequence[] sequences= getInvokingCommandKeySequences();
+ TriggerSequence[] sequences= getInvokingCommandKeySequences();
String keyName= ""; //$NON-NLS-1$
if (sequences != null && sequences.length > 0)
keyName= sequences[0].format();
diff --git a/features/org.eclipse.wst.jsdt.feature/feature.xml b/features/org.eclipse.wst.jsdt.feature/feature.xml
index 949d09d..0d2826a 100644
--- a/features/org.eclipse.wst.jsdt.feature/feature.xml
+++ b/features/org.eclipse.wst.jsdt.feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.wst.jsdt.feature"
label="%featureName"
- version="2.4.200.qualifier"
+ version="2.4.300.qualifier"
provider-name="%providerName"
plugin="org.eclipse.wst.jsdt.ui"
license-feature="org.eclipse.license"
diff --git a/features/org.eclipse.wst.jsdt.feature/pom.xml b/features/org.eclipse.wst.jsdt.feature/pom.xml
index bd19e21..99113ed 100644
--- a/features/org.eclipse.wst.jsdt.feature/pom.xml
+++ b/features/org.eclipse.wst.jsdt.feature/pom.xml
@@ -22,7 +22,7 @@
<groupId>org.eclipse.webtools.jsdt.features</groupId>
<artifactId>org.eclipse.wst.jsdt.feature</artifactId>
- <version>2.4.200-SNAPSHOT</version>
+ <version>2.4.300-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
<build>
diff --git a/features/org.eclipse.wst.jsdt_sdk.feature/feature.xml b/features/org.eclipse.wst.jsdt_sdk.feature/feature.xml
index 89d9541..8b5a9f9 100644
--- a/features/org.eclipse.wst.jsdt_sdk.feature/feature.xml
+++ b/features/org.eclipse.wst.jsdt_sdk.feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.wst.jsdt_sdk.feature"
label="%featureName"
- version="2.4.200.qualifier"
+ version="2.4.300.qualifier"
provider-name="%providerName"
license-feature="org.eclipse.license"
license-feature-version="0.0.0">
diff --git a/features/org.eclipse.wst.jsdt_sdk.feature/pom.xml b/features/org.eclipse.wst.jsdt_sdk.feature/pom.xml
index ac37e77..8d80daa 100644
--- a/features/org.eclipse.wst.jsdt_sdk.feature/pom.xml
+++ b/features/org.eclipse.wst.jsdt_sdk.feature/pom.xml
@@ -22,6 +22,6 @@
<groupId>org.eclipse.webtools.jsdt.features</groupId>
<artifactId>org.eclipse.wst.jsdt_sdk.feature</artifactId>
- <version>2.4.200-SNAPSHOT</version>
+ <version>2.4.300-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
</project>
diff --git a/features/org.eclipse.wst.jsdt_tests.feature/feature.xml b/features/org.eclipse.wst.jsdt_tests.feature/feature.xml
index ce6169d..fbd9fc5 100644
--- a/features/org.eclipse.wst.jsdt_tests.feature/feature.xml
+++ b/features/org.eclipse.wst.jsdt_tests.feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.wst.jsdt_tests.feature"
label="%featureName"
- version="2.2.100.qualifier"
+ version="2.2.200.qualifier"
provider-name="%providerName"
license-feature="org.eclipse.license"
license-feature-version="0.0.0">
diff --git a/features/org.eclipse.wst.jsdt_tests.feature/pom.xml b/features/org.eclipse.wst.jsdt_tests.feature/pom.xml
index a85a3f9..652b2ac 100644
--- a/features/org.eclipse.wst.jsdt_tests.feature/pom.xml
+++ b/features/org.eclipse.wst.jsdt_tests.feature/pom.xml
@@ -22,6 +22,6 @@
<groupId>org.eclipse.webtools.jsdt.features</groupId>
<artifactId>org.eclipse.wst.jsdt_tests.feature</artifactId>
- <version>2.2.100-SNAPSHOT</version>
+ <version>2.2.200-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
</project>