Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2013-09-14 15:10:53 +0000
committerSteffen Pingel2013-09-26 17:10:04 +0000
commit848e3d4d4a2f9d13e9fd98069384f3792966e977 (patch)
treec67b44635b175c38dae46a53d8387176346938c9
parent9d3ecc1be8ab17136e7c81581dccca1b26fb24cc (diff)
downloadorg.eclipse.mylyn.commons-848e3d4d4a2f9d13e9fd98069384f3792966e977.tar.gz
org.eclipse.mylyn.commons-848e3d4d4a2f9d13e9fd98069384f3792966e977.tar.xz
org.eclipse.mylyn.commons-848e3d4d4a2f9d13e9fd98069384f3792966e977.zip
417262: set base target to Eclipse 3.6
Change-Id: If8a3ee13b95e34ddf4b23380d9c5991c175aa4dd Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=417262
-rw-r--r--org.eclipse.mylyn.commons.core/src/org/eclipse/mylyn/commons/core/CoreUtil.java6
-rw-r--r--org.eclipse.mylyn.commons.identity.ui/src/org/eclipse/mylyn/internal/commons/identity/ui/PeopleView.java7
-rw-r--r--org.eclipse.mylyn.commons.notifications.ui/src/org/eclipse/mylyn/internal/commons/notifications/ui/popup/NotificationPopup.java5
-rw-r--r--org.eclipse.mylyn.commons.sdk.util/src/org/eclipse/mylyn/commons/sdk/util/CommonTestUtil.java10
-rw-r--r--org.eclipse.mylyn.commons.tests/src/org/eclipse/mylyn/commons/tests/support/CommonTestUtil.java10
-rw-r--r--org.eclipse.mylyn.commons.ui/src/org/eclipse/mylyn/commons/ui/CommonUiUtil.java6
-rw-r--r--org.eclipse.mylyn.commons.ui/src/org/eclipse/mylyn/commons/ui/PlatformUiUtil.java5
-rw-r--r--org.eclipse.mylyn.commons.workbench/src/org/eclipse/mylyn/commons/workbench/AbstractFilteredTree.java1
-rw-r--r--org.eclipse.mylyn.commons.workbench/src/org/eclipse/mylyn/commons/workbench/EnhancedFilteredTree.java3
-rw-r--r--org.eclipse.mylyn.commons.workbench/src/org/eclipse/mylyn/commons/workbench/InPlaceCheckBoxTreeDialog.java5
-rw-r--r--org.eclipse.mylyn.commons.workbench/src/org/eclipse/mylyn/commons/workbench/WorkbenchActionSupport.java16
-rw-r--r--org.eclipse.mylyn.commons.workbench/src/org/eclipse/mylyn/commons/workbench/WorkbenchUtil.java23
-rw-r--r--org.eclipse.mylyn.commons.workbench/src/org/eclipse/mylyn/commons/workbench/browser/WebBrowserDialog.java11
13 files changed, 46 insertions, 62 deletions
diff --git a/org.eclipse.mylyn.commons.core/src/org/eclipse/mylyn/commons/core/CoreUtil.java b/org.eclipse.mylyn.commons.core/src/org/eclipse/mylyn/commons/core/CoreUtil.java
index 40bdf6c1..2b49baae 100644
--- a/org.eclipse.mylyn.commons.core/src/org/eclipse/mylyn/commons/core/CoreUtil.java
+++ b/org.eclipse.mylyn.commons.core/src/org/eclipse/mylyn/commons/core/CoreUtil.java
@@ -100,11 +100,11 @@ public class CoreUtil {
* Returns the version of the bundle.
*
* @since 3.7
+ * @deprecated use {@link Bundle#getVersion()} instead
*/
- // TODO e3.5 remove this method and replace with bundle.getVersion()
+ @Deprecated
public static Version getVersion(Bundle bundle) {
- String header = (String) bundle.getHeaders().get("Bundle-Version"); //$NON-NLS-1$
- return (header != null) ? Version.parseVersion(header) : null;
+ return bundle.getVersion();
}
/**
diff --git a/org.eclipse.mylyn.commons.identity.ui/src/org/eclipse/mylyn/internal/commons/identity/ui/PeopleView.java b/org.eclipse.mylyn.commons.identity.ui/src/org/eclipse/mylyn/internal/commons/identity/ui/PeopleView.java
index c6720d30..fd6f6a21 100644
--- a/org.eclipse.mylyn.commons.identity.ui/src/org/eclipse/mylyn/internal/commons/identity/ui/PeopleView.java
+++ b/org.eclipse.mylyn.commons.identity.ui/src/org/eclipse/mylyn/internal/commons/identity/ui/PeopleView.java
@@ -29,10 +29,13 @@ public class PeopleView extends CommonNavigator {
}
@Override
+ protected Object getInitialInput() {
+ return rootCategory;
+ }
+
+ @Override
public void createPartControl(Composite aParent) {
super.createPartControl(aParent);
- // TODO e3.5 replace by overriding getInitialInput()
- getCommonViewer().setInput(rootCategory);
getCommonViewer().expandAll();
}
diff --git a/org.eclipse.mylyn.commons.notifications.ui/src/org/eclipse/mylyn/internal/commons/notifications/ui/popup/NotificationPopup.java b/org.eclipse.mylyn.commons.notifications.ui/src/org/eclipse/mylyn/internal/commons/notifications/ui/popup/NotificationPopup.java
index eb276653..88922885 100644
--- a/org.eclipse.mylyn.commons.notifications.ui/src/org/eclipse/mylyn/internal/commons/notifications/ui/popup/NotificationPopup.java
+++ b/org.eclipse.mylyn.commons.notifications.ui/src/org/eclipse/mylyn/internal/commons/notifications/ui/popup/NotificationPopup.java
@@ -18,7 +18,6 @@ import org.eclipse.jface.action.LegacyActionTools;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.mylyn.commons.notifications.core.AbstractNotification;
import org.eclipse.mylyn.commons.notifications.ui.AbstractUiNotification;
-import org.eclipse.mylyn.commons.ui.CommonUiUtil;
import org.eclipse.mylyn.commons.ui.compatibility.CommonColors;
import org.eclipse.mylyn.commons.workbench.AbstractWorkbenchNotificationPopup;
import org.eclipse.mylyn.commons.workbench.forms.CommonFormUtil;
@@ -91,7 +90,7 @@ public class NotificationPopup extends AbstractWorkbenchNotificationPopup {
GridDataFactory.fillDefaults().grab(true, false).align(SWT.FILL, SWT.TOP).applyTo(itemLink);
itemLink.setForeground(CommonColors.HYPERLINK_WIDGET);
itemLink.registerMouseTrackListener();
- itemLink.setText(CommonUiUtil.toLabel(notification.getLabel()));
+ itemLink.setText(LegacyActionTools.escapeMnemonics(notification.getLabel()));
if (notification instanceof AbstractUiNotification) {
itemLink.setImage(((AbstractUiNotification) notification).getNotificationImage());
}
@@ -123,7 +122,7 @@ public class NotificationPopup extends AbstractWorkbenchNotificationPopup {
}
if (descriptionText != null && !descriptionText.trim().equals("")) { //$NON-NLS-1$
Label descriptionLabel = new Label(notificationComposite, SWT.NO_FOCUS);
- descriptionLabel.setText(CommonUiUtil.toLabel(descriptionText));
+ descriptionLabel.setText(LegacyActionTools.escapeMnemonics(descriptionText));
descriptionLabel.setBackground(parent.getBackground());
GridDataFactory.fillDefaults()
.span(2, SWT.DEFAULT)
diff --git a/org.eclipse.mylyn.commons.sdk.util/src/org/eclipse/mylyn/commons/sdk/util/CommonTestUtil.java b/org.eclipse.mylyn.commons.sdk.util/src/org/eclipse/mylyn/commons/sdk/util/CommonTestUtil.java
index bc8d4711..52cb81ac 100644
--- a/org.eclipse.mylyn.commons.sdk.util/src/org/eclipse/mylyn/commons/sdk/util/CommonTestUtil.java
+++ b/org.eclipse.mylyn.commons.sdk.util/src/org/eclipse/mylyn/commons/sdk/util/CommonTestUtil.java
@@ -46,7 +46,7 @@ import org.eclipse.mylyn.commons.net.WebUtil;
import org.eclipse.mylyn.commons.repositories.core.auth.CertificateCredentials;
import org.eclipse.mylyn.commons.repositories.core.auth.UserCredentials;
import org.eclipse.mylyn.internal.commons.net.CommonsNetPlugin;
-import org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader;
+import org.eclipse.osgi.framework.adaptor.BundleClassLoader;
import org.eclipse.osgi.service.resolver.VersionRange;
import org.eclipse.osgi.util.NLS;
@@ -257,12 +257,8 @@ public class CommonTestUtil {
Class<?> clazz = (source instanceof Class<?>) ? (Class<?>) source : source.getClass();
if (Platform.isRunning()) {
ClassLoader classLoader = clazz.getClassLoader();
- if (classLoader instanceof DefaultClassLoader) {
- // TODO e3.5 replace with: URL url = ((BundleClassLoader) classLoader).getBundle().getEntry(filename);
- URL url = ((DefaultClassLoader) classLoader).getClasspathManager()
- .getBaseData()
- .getBundle()
- .getEntry(filename);
+ if (classLoader instanceof BundleClassLoader) {
+ URL url = ((BundleClassLoader) classLoader).getBundle().getEntry(filename);
if (url != null) {
URL localURL = FileLocator.toFileURL(url);
return new File(localURL.getFile());
diff --git a/org.eclipse.mylyn.commons.tests/src/org/eclipse/mylyn/commons/tests/support/CommonTestUtil.java b/org.eclipse.mylyn.commons.tests/src/org/eclipse/mylyn/commons/tests/support/CommonTestUtil.java
index b2039352..1f3bb71a 100644
--- a/org.eclipse.mylyn.commons.tests/src/org/eclipse/mylyn/commons/tests/support/CommonTestUtil.java
+++ b/org.eclipse.mylyn.commons.tests/src/org/eclipse/mylyn/commons/tests/support/CommonTestUtil.java
@@ -33,7 +33,7 @@ import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Plugin;
-import org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader;
+import org.eclipse.osgi.framework.adaptor.BundleClassLoader;
import org.eclipse.osgi.util.NLS;
/**
@@ -170,12 +170,8 @@ public class CommonTestUtil {
Class<?> clazz = (source instanceof Class<?>) ? (Class<?>) source : source.getClass();
if (Platform.isRunning()) {
ClassLoader classLoader = clazz.getClassLoader();
- if (classLoader instanceof DefaultClassLoader) {
- // TODO e3.5 replace with: URL url = ((BundleClassLoader) classLoader).getBundle().getEntry(filename);
- URL url = ((DefaultClassLoader) classLoader).getClasspathManager()
- .getBaseData()
- .getBundle()
- .getEntry(filename);
+ if (classLoader instanceof BundleClassLoader) {
+ URL url = ((BundleClassLoader) classLoader).getBundle().getEntry(filename);
if (url != null) {
URL localURL = FileLocator.toFileURL(url);
return new File(localURL.getFile());
diff --git a/org.eclipse.mylyn.commons.ui/src/org/eclipse/mylyn/commons/ui/CommonUiUtil.java b/org.eclipse.mylyn.commons.ui/src/org/eclipse/mylyn/commons/ui/CommonUiUtil.java
index 0e66cf6d..859b5334 100644
--- a/org.eclipse.mylyn.commons.ui/src/org/eclipse/mylyn/commons/ui/CommonUiUtil.java
+++ b/org.eclipse.mylyn.commons.ui/src/org/eclipse/mylyn/commons/ui/CommonUiUtil.java
@@ -165,9 +165,9 @@ public class CommonUiUtil {
/**
* Returns text masking the &amp;-character from decoration as an accelerator in SWT labels.
*
- * @see LegacyActionTools#escapeMnemonics(String)
+ * @deprecated use LegacyActionTools#escapeMnemonics(String) instead
*/
- // TODO e3.6 deprecate and replace with LegacyActionTools#escapeMnemonics(String)
+ @Deprecated
public static String toLabel(String text) {
return (text != null) ? text.replaceAll("&", "&&") : null; // mask & from SWT //$NON-NLS-1$ //$NON-NLS-2$
}
@@ -184,7 +184,7 @@ public class CommonUiUtil {
if (label.contains("@")) { //$NON-NLS-1$
label += "\t"; //$NON-NLS-1$
}
- return CommonUiUtil.toLabel(label);
+ return LegacyActionTools.escapeMnemonics(label);
}
public static String getProductName() {
diff --git a/org.eclipse.mylyn.commons.ui/src/org/eclipse/mylyn/commons/ui/PlatformUiUtil.java b/org.eclipse.mylyn.commons.ui/src/org/eclipse/mylyn/commons/ui/PlatformUiUtil.java
index 3ee5cbf2..4c0d43d7 100644
--- a/org.eclipse.mylyn.commons.ui/src/org/eclipse/mylyn/commons/ui/PlatformUiUtil.java
+++ b/org.eclipse.mylyn.commons.ui/src/org/eclipse/mylyn/commons/ui/PlatformUiUtil.java
@@ -103,7 +103,10 @@ public class PlatformUiUtil {
return "carbon".equals(SWT.getPlatform()) || "cocoa".equals(SWT.getPlatform()); //$NON-NLS-1$ //$NON-NLS-2$
}
- // TODO e3.5: remove, platform has been fixed, see bug 272046
+ /**
+ * @deprecated no longer required as platform bug 272046 has been fixed
+ */
+ @Deprecated
public static boolean isPaintItemClippingRequired() {
return "gtk".equals(SWT.getPlatform()); //$NON-NLS-1$
}
diff --git a/org.eclipse.mylyn.commons.workbench/src/org/eclipse/mylyn/commons/workbench/AbstractFilteredTree.java b/org.eclipse.mylyn.commons.workbench/src/org/eclipse/mylyn/commons/workbench/AbstractFilteredTree.java
index 4671d9f9..1596928c 100644
--- a/org.eclipse.mylyn.commons.workbench/src/org/eclipse/mylyn/commons/workbench/AbstractFilteredTree.java
+++ b/org.eclipse.mylyn.commons.workbench/src/org/eclipse/mylyn/commons/workbench/AbstractFilteredTree.java
@@ -36,6 +36,7 @@ import org.eclipse.ui.progress.WorkbenchJob;
* @author Mik Kersten
* @since 3.7
*/
+@SuppressWarnings("deprecation")
public abstract class AbstractFilteredTree extends EnhancedFilteredTree {
private static final int FILTER_WIDTH_MIN = 60;
diff --git a/org.eclipse.mylyn.commons.workbench/src/org/eclipse/mylyn/commons/workbench/EnhancedFilteredTree.java b/org.eclipse.mylyn.commons.workbench/src/org/eclipse/mylyn/commons/workbench/EnhancedFilteredTree.java
index 69feb8c3..cc1bd6af 100644
--- a/org.eclipse.mylyn.commons.workbench/src/org/eclipse/mylyn/commons/workbench/EnhancedFilteredTree.java
+++ b/org.eclipse.mylyn.commons.workbench/src/org/eclipse/mylyn/commons/workbench/EnhancedFilteredTree.java
@@ -34,8 +34,9 @@ import org.eclipse.ui.dialogs.PatternFilter;
*
* @author Hiroyuki Inaba
* @since 3.7
+ * @deprecated use {@link FilteredTree} instead
*/
-// TODO e3.5 remove this class and replace with FilteredTree
+@Deprecated
public class EnhancedFilteredTree extends FilteredTree {
protected boolean useNewLook;
diff --git a/org.eclipse.mylyn.commons.workbench/src/org/eclipse/mylyn/commons/workbench/InPlaceCheckBoxTreeDialog.java b/org.eclipse.mylyn.commons.workbench/src/org/eclipse/mylyn/commons/workbench/InPlaceCheckBoxTreeDialog.java
index 986118de..bdc5aed4 100644
--- a/org.eclipse.mylyn.commons.workbench/src/org/eclipse/mylyn/commons/workbench/InPlaceCheckBoxTreeDialog.java
+++ b/org.eclipse.mylyn.commons.workbench/src/org/eclipse/mylyn/commons/workbench/InPlaceCheckBoxTreeDialog.java
@@ -32,6 +32,7 @@ import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.dialogs.FilteredTree;
import org.eclipse.ui.dialogs.PatternFilter;
import org.eclipse.ui.progress.WorkbenchJob;
@@ -49,10 +50,10 @@ public class InPlaceCheckBoxTreeDialog extends AbstractInPlaceDialog {
private final String dialogLabel;
- private class CheckboxFilteredTree extends EnhancedFilteredTree {
+ private class CheckboxFilteredTree extends FilteredTree {
public CheckboxFilteredTree(Composite parent, int treeStyle, PatternFilter filter) {
- super(parent, treeStyle, filter);
+ super(parent, treeStyle, filter, true);
}
@Override
diff --git a/org.eclipse.mylyn.commons.workbench/src/org/eclipse/mylyn/commons/workbench/WorkbenchActionSupport.java b/org.eclipse.mylyn.commons.workbench/src/org/eclipse/mylyn/commons/workbench/WorkbenchActionSupport.java
index 4bfccb70..f4129e8e 100644
--- a/org.eclipse.mylyn.commons.workbench/src/org/eclipse/mylyn/commons/workbench/WorkbenchActionSupport.java
+++ b/org.eclipse.mylyn.commons.workbench/src/org/eclipse/mylyn/commons/workbench/WorkbenchActionSupport.java
@@ -24,12 +24,12 @@ import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.IWorkbenchCommandConstants;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.actions.ActionFactory;
import org.eclipse.ui.internal.WorkbenchImages;
import org.eclipse.ui.internal.WorkbenchMessages;
-import org.eclipse.ui.texteditor.IWorkbenchActionDefinitionIds;
/**
* Manages commons workbench actions for editing text.
@@ -114,7 +114,7 @@ public class WorkbenchActionSupport implements ISelectionChangedListener {
cutAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_CUT));
cutAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_CUT));
cutAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_CUT_DISABLED));
- cutAction.setActionDefinitionId(IWorkbenchActionDefinitionIds.CUT);
+ cutAction.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_CUT);
pasteAction = new GlobalAction(ActionFactory.PASTE.getId());
pasteAction.setText(WorkbenchMessages.Workbench_paste);
@@ -122,38 +122,38 @@ public class WorkbenchActionSupport implements ISelectionChangedListener {
pasteAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE));
pasteAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE));
pasteAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE_DISABLED));
- pasteAction.setActionDefinitionId(IWorkbenchActionDefinitionIds.PASTE);
+ pasteAction.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_PASTE);
copyAction = new GlobalAction(ActionFactory.COPY.getId());
copyAction.setText(WorkbenchMessages.Workbench_copy);
copyAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_COPY));
copyAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_COPY));
copyAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_COPY_DISABLED));
- copyAction.setActionDefinitionId(IWorkbenchActionDefinitionIds.COPY);
+ copyAction.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_COPY);
undoAction = new GlobalAction(ActionFactory.UNDO.getId());
undoAction.setText(WorkbenchMessages.Workbench_undo);
undoAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_UNDO));
undoAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_UNDO));
undoAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_UNDO_DISABLED));
- undoAction.setActionDefinitionId(IWorkbenchActionDefinitionIds.UNDO);
+ undoAction.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_UNDO);
redoAction = new GlobalAction(ActionFactory.REDO.getId());
redoAction.setText(WorkbenchMessages.Workbench_redo);
redoAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_REDO));
redoAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_REDO));
redoAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_REDO_DISABLED));
- redoAction.setActionDefinitionId(IWorkbenchActionDefinitionIds.REDO);
+ redoAction.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_REDO);
selectAllAction = new GlobalAction(ActionFactory.SELECT_ALL.getId());
selectAllAction.setText(WorkbenchMessages.Workbench_selectAll);
- selectAllAction.setActionDefinitionId(IWorkbenchActionDefinitionIds.SELECT_ALL);
+ selectAllAction.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_SELECT_ALL);
selectAllAction.setEnabled(true);
findAction = new GlobalAction(ActionFactory.FIND.getId());
findAction.setText(WorkbenchMessages.Workbench_findReplace);
findAction.setImageDescriptor(CommonImages.FIND);
- findAction.setActionDefinitionId(IWorkbenchActionDefinitionIds.FIND_REPLACE);
+ findAction.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_FIND_AND_REPLACE);
}
public void contributeActions(IMenuManager manager) {
diff --git a/org.eclipse.mylyn.commons.workbench/src/org/eclipse/mylyn/commons/workbench/WorkbenchUtil.java b/org.eclipse.mylyn.commons.workbench/src/org/eclipse/mylyn/commons/workbench/WorkbenchUtil.java
index 669c36d7..95aecab5 100644
--- a/org.eclipse.mylyn.commons.workbench/src/org/eclipse/mylyn/commons/workbench/WorkbenchUtil.java
+++ b/org.eclipse.mylyn.commons.workbench/src/org/eclipse/mylyn/commons/workbench/WorkbenchUtil.java
@@ -36,6 +36,7 @@ import org.eclipse.ui.IPluginContribution;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchActionConstants;
+import org.eclipse.ui.IWorkbenchCommandConstants;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
@@ -43,8 +44,8 @@ import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.activities.IIdentifier;
import org.eclipse.ui.activities.IWorkbenchActivitySupport;
import org.eclipse.ui.handlers.IHandlerService;
+import org.eclipse.ui.progress.IProgressConstants2;
import org.eclipse.ui.services.IServiceLocator;
-import org.eclipse.ui.texteditor.IWorkbenchActionDefinitionIds;
/**
* @author Mik Kersten
@@ -73,19 +74,11 @@ public class WorkbenchUtil {
public static final String GROUP_RUN = "group.run"; //$NON-NLS-1$
- // TODO e3.6 IProgressConstants2#SHOW_IN_TASKBAR_ICON_PROPERTY
- public static final QualifiedName SHOW_IN_TASKBAR_ICON_PROPERTY = new QualifiedName(
- "org.eclipse.ui.workbench.progress", "inTaskBarIcon"); //$NON-NLS-1$//$NON-NLS-2$
-
-// public static IViewPart getFromActivePerspective(String viewId) {
-// if (PlatformUI.isWorkbenchRunning()) {
-// IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
-// if (activePage != null) {
-// return activePage.findView(viewId);
-// }
-// }
-// return null;
-// }
+ /**
+ * @deprecated use {@link IProgressConstants2#SHOW_IN_TASKBAR_ICON_PROPERTY} instead
+ */
+ @Deprecated
+ public static final QualifiedName SHOW_IN_TASKBAR_ICON_PROPERTY = IProgressConstants2.SHOW_IN_TASKBAR_ICON_PROPERTY;
/**
* @since 3.9
@@ -250,7 +243,7 @@ public class WorkbenchUtil {
IHandlerService service = (IHandlerService) serviceLocator.getService(IHandlerService.class);
if (service != null) {
try {
- return service.executeCommand(IWorkbenchActionDefinitionIds.PROPERTIES, null);
+ return service.executeCommand(IWorkbenchCommandConstants.FILE_PROPERTIES, null);
} catch (NotEnabledException e) {
// ignore
} catch (Exception e) {
diff --git a/org.eclipse.mylyn.commons.workbench/src/org/eclipse/mylyn/commons/workbench/browser/WebBrowserDialog.java b/org.eclipse.mylyn.commons.workbench/src/org/eclipse/mylyn/commons/workbench/browser/WebBrowserDialog.java
index 56f0452b..ebad9c5d 100644
--- a/org.eclipse.mylyn.commons.workbench/src/org/eclipse/mylyn/commons/workbench/browser/WebBrowserDialog.java
+++ b/org.eclipse.mylyn.commons.workbench/src/org/eclipse/mylyn/commons/workbench/browser/WebBrowserDialog.java
@@ -15,7 +15,6 @@ import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
-import java.lang.reflect.Method;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
@@ -79,15 +78,7 @@ public class WebBrowserDialog extends MessageDialog {
}
public boolean setUrl(String url, String postData, String[] headers) {
- // TODO e3.6 replace reflection with call to setUrl(...)
- Method method;
- try {
- method = Browser.class.getDeclaredMethod("setUrl", String.class, String.class, //$NON-NLS-1$
- String[].class);
- return (Boolean) method.invoke(getBrowser(), url, postData, headers);
- } catch (Exception e) {
- return false;
- }
+ return getBrowser().setUrl(url, postData, headers);
}
public static int openText(Shell parent, String title, String message, String text) {

Back to the top