[nobug] Update to use generics
diff --git a/core/bundles/org.eclipse.wst.sse.ui/src-tasktags/org/eclipse/wst/sse/ui/internal/preferences/ui/PropertyPreferencePage.java b/core/bundles/org.eclipse.wst.sse.ui/src-tasktags/org/eclipse/wst/sse/ui/internal/preferences/ui/PropertyPreferencePage.java index 2bfa678..99c6095 100644 --- a/core/bundles/org.eclipse.wst.sse.ui/src-tasktags/org/eclipse/wst/sse/ui/internal/preferences/ui/PropertyPreferencePage.java +++ b/core/bundles/org.eclipse.wst.sse.ui/src-tasktags/org/eclipse/wst/sse/ui/internal/preferences/ui/PropertyPreferencePage.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2001, 2011 IBM Corporation and others. + * Copyright (c) 2001, 2020 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -176,9 +176,9 @@ protected IScopeContext[] createPreferenceScopes() { IProject project = getProject(); if (project != null) { - return new IScopeContext[]{new ProjectScope(project), new InstanceScope(), new DefaultScope()}; + return new IScopeContext[]{new ProjectScope(project), InstanceScope.INSTANCE, DefaultScope.INSTANCE}; } - return new IScopeContext[]{new InstanceScope(), new DefaultScope()}; + return new IScopeContext[]{InstanceScope.INSTANCE, DefaultScope.INSTANCE}; } protected abstract String getPreferenceNodeQualifier();
diff --git a/core/bundles/org.eclipse.wst.sse.ui/src-tasktags/org/eclipse/wst/sse/ui/internal/preferences/ui/TaskTagPreferencePage.java b/core/bundles/org.eclipse.wst.sse.ui/src-tasktags/org/eclipse/wst/sse/ui/internal/preferences/ui/TaskTagPreferencePage.java index 84bae66..be8d0e1 100644 --- a/core/bundles/org.eclipse.wst.sse.ui/src-tasktags/org/eclipse/wst/sse/ui/internal/preferences/ui/TaskTagPreferencePage.java +++ b/core/bundles/org.eclipse.wst.sse.ui/src-tasktags/org/eclipse/wst/sse/ui/internal/preferences/ui/TaskTagPreferencePage.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2001, 2005 IBM Corporation and others. + * Copyright (c) 2001, 2020 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -86,7 +86,7 @@ fRedetectButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { Job redetectJob = new Job(SSEUIMessages.TaskTagPreferenceTab_27) { //$NON-NLS-1$ - public Object getAdapter(Class adapter) { + public <T> T getAdapter(Class<T> adapter) { return null; } @@ -281,7 +281,7 @@ int button = dialog.open(); if (button == 0) { Job redetectJob = new Job(SSEUIMessages.TaskTagPreferenceTab_27) { //$NON-NLS-1$ - public Object getAdapter(Class adapter) { + public <T> T getAdapter(Class<T> adapter) { return null; }
diff --git a/web/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/GenericCompletionProposalComputer.java b/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/GenericCompletionProposalComputer.java similarity index 100% rename from web/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/GenericCompletionProposalComputer.java rename to core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/GenericCompletionProposalComputer.java
diff --git a/xml/tests/org.eclipse.wst.xml.validation.tests/src/org/eclipse/wst/xml/validation/tests/internal/BugFixesTest.java b/xml/tests/org.eclipse.wst.xml.validation.tests/src/org/eclipse/wst/xml/validation/tests/internal/BugFixesTest.java index 21575c2..12fb7d8 100644 --- a/xml/tests/org.eclipse.wst.xml.validation.tests/src/org/eclipse/wst/xml/validation/tests/internal/BugFixesTest.java +++ b/xml/tests/org.eclipse.wst.xml.validation.tests/src/org/eclipse/wst/xml/validation/tests/internal/BugFixesTest.java
@@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2001, 2017 IBM Corporation and others. + * Copyright (c) 2001, 2020 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -43,7 +43,7 @@ { String testname = "RootNoNSChildNS"; String testfile = FILE_PROTOCOL + PLUGIN_ABSOLUTE_PATH + SAMPLES_DIR + BUGFIXES_DIR + "RootNoNSChildNS/" + testname + ".xml"; - List keys = new ArrayList(); + List<String> keys = new ArrayList<>(); int numErrors = 0; int numWarnings = 0; @@ -57,7 +57,7 @@ { String testname = "Empty"; String testfile = FILE_PROTOCOL + PLUGIN_ABSOLUTE_PATH + SAMPLES_DIR + BUGFIXES_DIR + "EmptyFile/" + testname + ".xml"; - List keys = new ArrayList(); + List<String> keys = new ArrayList<>(); int numErrors = 0; int numWarnings = 0; @@ -71,7 +71,7 @@ { String testname = "ValidateWithDTDValid"; String testfile = FILE_PROTOCOL + PLUGIN_ABSOLUTE_PATH + SAMPLES_DIR + BUGFIXES_DIR + "ValidateWithDTD/" + testname + ".xml"; - List keys = new ArrayList(); + List<String> keys = new ArrayList<>(); int numErrors = 0; int numWarnings = 0; @@ -85,7 +85,7 @@ { String testname = "ValidateWithDTDInvalid"; String testfile = FILE_PROTOCOL + PLUGIN_ABSOLUTE_PATH + SAMPLES_DIR + BUGFIXES_DIR + "ValidateWithDTD/" + testname + ".xml"; - List keys = new ArrayList(); + List<String> keys = new ArrayList<>(); keys.add("MSG_CONTENT_INVALID"); int numErrors = 1; int numWarnings = 0; @@ -100,7 +100,7 @@ { String testname = "NotWellFormed"; String testfile = FILE_PROTOCOL + PLUGIN_ABSOLUTE_PATH + SAMPLES_DIR + BUGFIXES_DIR + "NotWellFormed/" + testname + ".xml"; - List keys = new ArrayList(); + List<String> keys = new ArrayList<>(); keys.add("ETagRequired"); int numErrors = 1; int numWarnings = 0; @@ -115,7 +115,7 @@ { String testname = "InvalidHost"; String testfile = FILE_PROTOCOL + PLUGIN_ABSOLUTE_PATH + SAMPLES_DIR + BUGFIXES_DIR + "CannotLocateDTD/" + testname + ".xml"; - List keys = new ArrayList(); + List<String> keys = new ArrayList<>(); keys.add("FILE_NOT_FOUND"); int numErrors = 0; int numWarnings = 1; @@ -130,7 +130,7 @@ { String testname = "InvalidLocation"; String testfile = FILE_PROTOCOL + PLUGIN_ABSOLUTE_PATH + SAMPLES_DIR + BUGFIXES_DIR + "CannotLocateDTD/" + testname + ".xml"; - List keys = new ArrayList(); + List<String> keys = new ArrayList<>(); keys.add("FILE_NOT_FOUND"); int numErrors = 0; int numWarnings = 1; @@ -145,7 +145,7 @@ { String testname = "NoGrammar"; String testfile = FILE_PROTOCOL + PLUGIN_ABSOLUTE_PATH + SAMPLES_DIR + BUGFIXES_DIR + "NoGrammar/" + testname + ".xml"; - List keys = new ArrayList(); + List<String> keys = new ArrayList<>(); keys.add("NO_GRAMMAR_FOUND"); int numErrors = 0; int numWarnings = 1; @@ -178,7 +178,7 @@ { String testname = "NoNamespaceSchema"; String testfile = FILE_PROTOCOL + PLUGIN_ABSOLUTE_PATH + SAMPLES_DIR + BUGFIXES_DIR + "NoNamespaceSchema/" + testname + ".xml"; - List keys = new ArrayList(); + List<String> keys = new ArrayList<>(); keys.add("cvc-complex-type.2.4.b"); int numErrors = 1; int numWarnings = 0;