Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2019-05-17 15:52:48 +0000
committerAlexander Kurtakov2019-05-17 16:18:55 +0000
commit82ee759c46e993f9c425316f04046950851a5b34 (patch)
tree6bf00f8f29d2a681739c03d3ff0a8bafe4905521 /org.eclipse.m2e.core.ui/src/org/eclipse
parentc081ed2886990acffc27592cdb901f3950584c45 (diff)
downloadm2e-core-82ee759c46e993f9c425316f04046950851a5b34.tar.gz
m2e-core-82ee759c46e993f9c425316f04046950851a5b34.tar.xz
m2e-core-82ee759c46e993f9c425316f04046950851a5b34.zip
Fix various deprecation usages.
Change-Id: I2609f865d94a73e2410aa6c3c8e38e6d7766cf7c Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'org.eclipse.m2e.core.ui/src/org/eclipse')
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/M2EUIPluginActivator.java2
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/editing/ChangeCreator.java2
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/util/ProposalUtil.java3
3 files changed, 4 insertions, 3 deletions
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/M2EUIPluginActivator.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/M2EUIPluginActivator.java
index 4cb6d17a..6bbd3a72 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/M2EUIPluginActivator.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/M2EUIPluginActivator.java
@@ -60,7 +60,7 @@ public class M2EUIPluginActivator extends AbstractUIPlugin {
// Create the preference store lazily.
if(preferenceStore == null) {
// InstanceScope.INSTANCE added in 3.7
- preferenceStore = new ScopedPreferenceStore(new InstanceScope(), IMavenConstants.PLUGIN_ID);
+ preferenceStore = new ScopedPreferenceStore(InstanceScope.INSTANCE, IMavenConstants.PLUGIN_ID);
}
return preferenceStore;
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/editing/ChangeCreator.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/editing/ChangeCreator.java
index 4b473879..f1e9f727 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/editing/ChangeCreator.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/editing/ChangeCreator.java
@@ -141,7 +141,7 @@ public class ChangeCreator {
IRegion lineRegion;
lineRegion = document.getLineInformation(line);
String lineContents = document.get(lineRegion.getOffset(), lineRegion.getLength());
- hash = new Integer(computeDJBHash(lineContents));
+ hash = Integer.valueOf(computeDJBHash(lineContents));
hashes.set(line, hash);
}
return hash;
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/util/ProposalUtil.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/util/ProposalUtil.java
index e8d735c8..54fa901b 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/util/ProposalUtil.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/util/ProposalUtil.java
@@ -29,6 +29,7 @@ import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.IWorkbenchCommandConstants;
import org.eclipse.ui.fieldassist.ContentAssistCommandAdapter;
import org.apache.lucene.queryParser.QueryParser;
@@ -113,7 +114,7 @@ public class ProposalUtil {
ContentAssistCommandAdapter adapter = new ContentAssistCommandAdapter( //
control, contentAdapter, proposalProvider, //
- ContentAssistCommandAdapter.CONTENT_PROPOSAL_COMMAND, null);
+ IWorkbenchCommandConstants.EDIT_CONTENT_ASSIST, null);
// ContentProposalAdapter adapter = new ContentProposalAdapter(control, contentAdapter, //
// proposalProvider, KeyStroke.getInstance(SWT.MOD1, ' '), null);
adapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);

Back to the top