Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNitin Dahyabhai2020-04-30 01:42:13 +0000
committerNitin Dahyabhai2020-04-30 02:59:05 +0000
commit04b55496af6dff15c0f3d0994d38cfef7bb3e434 (patch)
tree6405f2f494f609641f632f35397482aa4ac5798c
parentf64bfc5488b57c0abdf40c2bf2e22c06a4853305 (diff)
downloadwebtools.sourceediting-04b55496af6dff15c0f3d0994d38cfef7bb3e434.tar.gz
webtools.sourceediting-04b55496af6dff15c0f3d0994d38cfef7bb3e434.tar.xz
webtools.sourceediting-04b55496af6dff15c0f3d0994d38cfef7bb3e434.zip
[nobug] Enable the generic proposals, migrate to generics
Signed-off-by: Nitin Dahyabhai <thatnitind@gmail.com>
-rw-r--r--core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ExtendedConfigurationBuilder.java50
-rwxr-xr-xweb/bundles/org.eclipse.wst.html.ui/plugin.xml2
-rwxr-xr-xweb/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/GenericCompletionProposalComputer.java12
-rw-r--r--web/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/HTMLUIPreferenceInitializer.java8
-rw-r--r--web/bundles/org.eclipse.wst.web.ui/static_web_ui/org/eclipse/wst/web/ui/internal/ModuleCoreValidatorMarkerResolutions.java3
-rw-r--r--web/tests/org.eclipse.wst.html.ui.tests/src/org/eclipse/wst/html/ui/tests/contentassist/TestEmbededCSSContentAssistComputers.java30
-rw-r--r--web/tests/org.eclipse.wst.html.ui.tests/src/org/eclipse/wst/html/ui/tests/contentassist/TestHTMLContentAssistComputers.java24
7 files changed, 67 insertions, 62 deletions
diff --git a/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ExtendedConfigurationBuilder.java b/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ExtendedConfigurationBuilder.java
index 68f999d7de..5d109f149a 100644
--- a/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ExtendedConfigurationBuilder.java
+++ b/core/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ExtendedConfigurationBuilder.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2001, 2010 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
@@ -78,7 +78,7 @@ public class ExtendedConfigurationBuilder extends RegistryReader {
private static final String ATT_TARGET = "target"; //$NON-NLS-1$
private static final String ATT_TYPE = "type"; //$NON-NLS-1$
private static final String CONFIGURATION = "provisionalConfiguration"; //$NON-NLS-1$
- private static Map configurationMap = null;
+ private static Map<String, List<IConfigurationElement>> configurationMap = null;
private final static boolean debugTime = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.wst.sse.ui/extendedconfigurationbuilder/time")); //$NON-NLS-1$ //$NON-NLS-2$
private static final String DEFINITION = "provisionalDefinition"; //$NON-NLS-1$
private static final String EP_EXTENDEDCONFIGURATION = "editorConfiguration"; //$NON-NLS-1$
@@ -94,10 +94,11 @@ public class ExtendedConfigurationBuilder extends RegistryReader {
* @param classAttribute
* the name of the attribute carrying the class
* @returns the extension object if successful. If an error occurs when
- * createing executable extension, the exception is logged, and
+ * creating executable extension, the exception is logged, and
* null returned.
*/
- static Object createExtension(final IConfigurationElement element, final String classAttribute, final String targetID) {
+ @SuppressWarnings("unchecked")
+ static <T> T createExtension(final IConfigurationElement element, final String classAttribute, final String targetID) {
final Object[] result = new Object[1];
String pluginId = element.getDeclaringExtension().getNamespace();
Bundle bundle = Platform.getBundle(pluginId);
@@ -123,7 +124,7 @@ public class ExtendedConfigurationBuilder extends RegistryReader {
}
});
}
- return result[0];
+ return (T) result[0];
}
public synchronized static ExtendedConfigurationBuilder getInstance() {
@@ -138,17 +139,17 @@ public class ExtendedConfigurationBuilder extends RegistryReader {
super();
}
- private List createConfigurations(List configurations, String extensionType, String targetID) {
+ private <T> List<T> createConfigurations(List<IConfigurationElement> configurations, String extensionType, String targetID) {
if (configurations == null)
- return new ArrayList(0);
- List result = new ArrayList(1);
+ return new ArrayList<>(0);
+ List<T> result = new ArrayList<>(1);
for (int i = 0; i < configurations.size(); i++) {
- IConfigurationElement element = (IConfigurationElement) configurations.get(i);
+ IConfigurationElement element = configurations.get(i);
if ((element.getName().equals(extensionType) || (element.getName().equals(CONFIGURATION) && extensionType.equals(element.getAttribute(ATT_TYPE))))) {
String[] targets = StringUtils.unpack(element.getAttribute(ATT_TARGET));
for (int j = 0; j < targets.length; j++) {
if (targetID.equals(targets[j].trim())) {
- Object o = createExtension(element, ATT_CLASS, targetID);
+ T o = createExtension(element, ATT_CLASS, targetID);
if (o != null) {
result.add(o);
}
@@ -159,12 +160,12 @@ public class ExtendedConfigurationBuilder extends RegistryReader {
return result;
}
- private IConfigurationElement[] findConfigurationElements(List configurations, String extensionType, String targetID) {
+ private IConfigurationElement[] findConfigurationElements(List<IConfigurationElement> configurations, String extensionType, String targetID) {
if (configurations == null)
return new IConfigurationElement[0];
- List result = new ArrayList(1);
+ List<IConfigurationElement> result = new ArrayList<>(1);
for (int i = 0; i < configurations.size(); i++) {
- IConfigurationElement element = (IConfigurationElement) configurations.get(i);
+ IConfigurationElement element = configurations.get(i);
if ((element.getName().equals(extensionType) || (element.getName().equals(DEFINITION) && extensionType.equals(element.getAttribute(ATT_TYPE))))) {
String[] targets = StringUtils.unpack(element.getAttribute(ATT_TARGET));
for (int j = 0; j < targets.length; j++) {
@@ -174,7 +175,7 @@ public class ExtendedConfigurationBuilder extends RegistryReader {
}
}
}
- return (IConfigurationElement[]) result.toArray(new IConfigurationElement[0]);
+ return result.toArray(new IConfigurationElement[0]);
}
/**
@@ -189,7 +190,7 @@ public class ExtendedConfigurationBuilder extends RegistryReader {
public Object getConfiguration(String extensionType, String targetID) {
if (targetID == null || targetID.length() == 0)
return null;
- List configurations = getConfigurations(extensionType, targetID);
+ List<IConfigurationElement> configurations = getConfigurations(extensionType, targetID);
if (configurations.isEmpty())
return null;
return configurations.get(0);
@@ -198,16 +199,17 @@ public class ExtendedConfigurationBuilder extends RegistryReader {
/**
* Returns all configurations for the given extensionType matching the
* targetID, if any are available.
+ * @param <T>
*
* @param extensionType
* @param targetID
* @return a List of configuration objects, which may or may not be empty
*/
- public List getConfigurations(String extensionType, String targetID) {
+ public <T> List<T> getConfigurations(String extensionType, String targetID) {
if (targetID == null || targetID.length() == 0)
- return new ArrayList(0);
+ return new ArrayList<>(0);
if (configurationMap == null) {
- configurationMap = new HashMap(0);
+ configurationMap = new HashMap<>(0);
synchronized (configurationMap) {
readRegistry(Platform.getExtensionRegistry(), SSEUIPlugin.ID, EP_EXTENDEDCONFIGURATION);
if (debugTime) {
@@ -216,8 +218,8 @@ public class ExtendedConfigurationBuilder extends RegistryReader {
}
}
}
- List extensions = (List) configurationMap.get(extensionType);
- List configurations = createConfigurations(extensions, extensionType, targetID);
+ List<IConfigurationElement> extensions = configurationMap.get(extensionType);
+ List<T> configurations = createConfigurations(extensions, extensionType, targetID);
if (debugTime) {
if (!configurations.isEmpty())
System.out.println(getClass().getName() + "#getConfiguration(" + extensionType + ", " + targetID + "): configurations loaded in " + (System.currentTimeMillis() - time0) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
@@ -243,7 +245,7 @@ public class ExtendedConfigurationBuilder extends RegistryReader {
time0 = System.currentTimeMillis();
}
if (configurationMap == null) {
- configurationMap = new HashMap(0);
+ configurationMap = new HashMap<>(0);
synchronized (configurationMap) {
readRegistry(Platform.getExtensionRegistry(), SSEUIPlugin.ID, EP_EXTENDEDCONFIGURATION);
if (debugTime) {
@@ -252,7 +254,7 @@ public class ExtendedConfigurationBuilder extends RegistryReader {
}
}
}
- List definitions = (List) configurationMap.get(extensionType);
+ List<IConfigurationElement> definitions = configurationMap.get(extensionType);
IConfigurationElement[] elements = findConfigurationElements(definitions, extensionType, targetID);
String[] values = new String[elements.length];
for (int i = 0; i < values.length; i++) {
@@ -271,9 +273,9 @@ public class ExtendedConfigurationBuilder extends RegistryReader {
String name = element.getName();
if (name.equals(CONFIGURATION) || name.equals(DEFINITION))
name = element.getAttribute(ATT_TYPE);
- List configurations = (List) configurationMap.get(name);
+ List<IConfigurationElement> configurations = configurationMap.get(name);
if (configurations == null) {
- configurations = new ArrayList(1);
+ configurations = new ArrayList<>(1);
configurationMap.put(name, configurations);
}
configurations.add(element);
diff --git a/web/bundles/org.eclipse.wst.html.ui/plugin.xml b/web/bundles/org.eclipse.wst.html.ui/plugin.xml
index 1ddd1bbdf6..ab0d21dee0 100755
--- a/web/bundles/org.eclipse.wst.html.ui/plugin.xml
+++ b/web/bundles/org.eclipse.wst.html.ui/plugin.xml
@@ -671,7 +671,6 @@
id="org.eclipse.wst.html.ui.proposalCategory.htmlAttributeValues"
name="%proposalCategory.htmlAttributeValues">
</proposalCategory>
- <!--
<proposalCategory
icon="platform:/plugin/org.eclipse.ui.genericeditor/icons/full/obj16/generic_editor.png"
id="org.eclipse.wst.html.ui.proposalCategory.generic"
@@ -689,7 +688,6 @@
<partitionType id="org.eclipse.wst.html.SCRIPT.EVENTHANDLER"/>
</contentType>
</proposalComputer>
- -->
<proposalComputer
activate="false"
categoryId="org.eclipse.wst.html.ui.proposalCategory.htmlTags"
diff --git a/web/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/GenericCompletionProposalComputer.java b/web/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/GenericCompletionProposalComputer.java
index 44d51cedef..9999799167 100755
--- a/web/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/GenericCompletionProposalComputer.java
+++ b/web/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/GenericCompletionProposalComputer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2019 IBM Corporation and others.
+ * Copyright (c) 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 v2.0
* which accompanies this distribution, and is available at
@@ -28,6 +28,7 @@ import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.ui.internal.genericeditor.ContentAssistProcessorRegistry;
import org.eclipse.ui.internal.genericeditor.GenericEditorPlugin;
import org.eclipse.wst.html.core.internal.provisional.contenttype.ContentTypeIdForHTML;
+import org.eclipse.wst.html.ui.internal.Logger;
import org.eclipse.wst.sse.ui.contentassist.CompletionProposalInvocationContext;
import org.eclipse.wst.sse.ui.contentassist.ICompletionProposalComputer;
@@ -54,9 +55,16 @@ public class GenericCompletionProposalComputer implements ICompletionProposalCom
Set<IContentType> types = new HashSet<>();
IContentType contentType = contentTypeManager.getContentType(ContentTypeIdForHTML.ContentTypeID_HTML);
types.add(contentType);
+ contentType = contentTypeManager.getContentType("org.eclipse.wildwebdeveloper.html");
+ types.add(contentType);
contentType = contentTypeManager.getContentType("org.eclipse.core.runtime.text");
types.add(contentType);
- fContentAssistProcessors = contentAssistProcessorRegistry.getContentAssistProcessors(viewer, null, types);
+ try {
+ fContentAssistProcessors = contentAssistProcessorRegistry.getContentAssistProcessors(viewer, null, types);
+ }
+ catch (NoClassDefFoundError e) {
+ Logger.logException(e);
+ }
}
List<ICompletionProposal> proposals = new ArrayList<>();
for (IContentAssistProcessor processor : fContentAssistProcessors) {
diff --git a/web/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/HTMLUIPreferenceInitializer.java b/web/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/HTMLUIPreferenceInitializer.java
index 71c85cc569..ab83930ade 100644
--- a/web/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/HTMLUIPreferenceInitializer.java
+++ b/web/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/HTMLUIPreferenceInitializer.java
@@ -124,17 +124,16 @@ public class HTMLUIPreferenceInitializer extends AbstractPreferenceInitializer {
store.setDefault(HTMLUIPreferenceNames.CONTENT_ASSIST_DO_NOT_DISPLAY_ON_OWN_PAGE, "");
store.setDefault(HTMLUIPreferenceNames.CONTENT_ASSIST_DEFAULT_PAGE_SORT_ORDER,
"org.eclipse.wst.html.ui.proposalCategory.htmlTags\0" +
+ "org.eclipse.wst.html.ui.proposalCategory.generic\0" +
"org.eclipse.wst.css.ui.proposalCategory.css\0" +
"org.eclipse.wst.html.ui.proposalCategory.htmlTemplates\0" +
"org.eclipse.wst.css.ui.proposalCategory.cssTemplates");
-// "org.eclipse.wst.css.ui.proposalCategory.cssTemplates\0" +
-// "org.eclipse.wst.html.ui.proposalCategory.generic");
store.setDefault(HTMLUIPreferenceNames.CONTENT_ASSIST_OWN_PAGE_SORT_ORDER,
-// "org.eclipse.wst.html.ui.proposalCategory.generic\0" +
"org.eclipse.wst.html.ui.proposalCategory.htmlTemplates\0"+
"org.eclipse.wst.css.ui.proposalCategory.cssTemplates\0" +
"org.eclipse.wst.html.ui.proposalCategory.htmlTags\0" +
- "org.eclipse.wst.css.ui.proposalCategory.css");
+ "org.eclipse.wst.css.ui.proposalCategory.css\0" +
+ "org.eclipse.wst.html.ui.proposalCategory.generic");
initAppearancePreferences(store, registry);
}
@@ -169,5 +168,4 @@ public class HTMLUIPreferenceInitializer extends AbstractPreferenceInitializer {
*/
store.setDefault(AppearancePreferenceNames.EDITOR_TEXT_HOVER_MODIFIERS, "combinationHover|true|0;problemHover|false|0;documentationHover|false|0;annotationHover|true|" + mod2Name); //$NON-NLS-1$
}
-
}
diff --git a/web/bundles/org.eclipse.wst.web.ui/static_web_ui/org/eclipse/wst/web/ui/internal/ModuleCoreValidatorMarkerResolutions.java b/web/bundles/org.eclipse.wst.web.ui/static_web_ui/org/eclipse/wst/web/ui/internal/ModuleCoreValidatorMarkerResolutions.java
index de5557a287..c81dbb99e5 100644
--- a/web/bundles/org.eclipse.wst.web.ui/static_web_ui/org/eclipse/wst/web/ui/internal/ModuleCoreValidatorMarkerResolutions.java
+++ b/web/bundles/org.eclipse.wst.web.ui/static_web_ui/org/eclipse/wst/web/ui/internal/ModuleCoreValidatorMarkerResolutions.java
@@ -1,5 +1,5 @@
/******************************************************************************
- * Copyright (c) 2005, 2018 BEA Systems, Inc.
+ * Copyright (c) 2005, 2020 BEA Systems, Inc.
* 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
@@ -26,7 +26,6 @@ import org.eclipse.ui.IMarkerResolution;
import org.eclipse.ui.IMarkerResolutionGenerator;
import org.eclipse.ui.views.markers.WorkbenchMarkerResolution;
import org.eclipse.wst.common.componentcore.internal.ModuleMigratorManager;
-import org.eclipse.wst.web.ui.internal.WSTWebUIPlugin;
/**
* This has been deprecated since WTP 3.1.2 and will be deleted post WTP 3.2.
diff --git a/web/tests/org.eclipse.wst.html.ui.tests/src/org/eclipse/wst/html/ui/tests/contentassist/TestEmbededCSSContentAssistComputers.java b/web/tests/org.eclipse.wst.html.ui.tests/src/org/eclipse/wst/html/ui/tests/contentassist/TestEmbededCSSContentAssistComputers.java
index 5a72f552bd..53dae4dda2 100644
--- a/web/tests/org.eclipse.wst.html.ui.tests/src/org/eclipse/wst/html/ui/tests/contentassist/TestEmbededCSSContentAssistComputers.java
+++ b/web/tests/org.eclipse.wst.html.ui.tests/src/org/eclipse/wst/html/ui/tests/contentassist/TestEmbededCSSContentAssistComputers.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2017 IBM Corporation and others.
+ * Copyright (c) 2010, 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
@@ -97,85 +97,85 @@ public class TestEmbededCSSContentAssistComputers extends TestCase {
public void testSelectorProposals_StyleTag() throws Exception {
// default page, templates page, standard page, default page again
- int[] expectedProposalCounts = new int[] {90, 0, 90, 90};
+ int[] expectedProposalCounts = new int[] {90, 0, 90, 0, 90};
runProposalTest("test3.html", 9, 0, expectedProposalCounts);
}
public void testDeclarationPropertyProposals_StyleTag() throws Exception {
// default page, templates page, standard page, default page again
- int[] expectedProposalCounts = new int[] {122, 0, 122, 122};
+ int[] expectedProposalCounts = new int[] {122, 0, 122, 0, 122};
runProposalTest("test3.html", 12, 0, expectedProposalCounts);
}
public void testDeclarationValueProposals_StyleTag() throws Exception {
// default page, templates page, standard page, default page again
- int[] expectedProposalCounts = new int[] {11, 0, 11, 11};
+ int[] expectedProposalCounts = new int[] {11, 0, 11, 0, 11};
runProposalTest("test3.html", 13, 16, expectedProposalCounts);
}
public void testFinishSelectorProposals_StyleTag() throws Exception {
// default page, templates page, standard page, default page again
- int[] expectedProposalCounts = new int[] {20, 0, 20, 20};
+ int[] expectedProposalCounts = new int[] {20, 0, 20, 0, 20};
runProposalTest("test3.html", 24, 1, expectedProposalCounts);
}
public void testFinishDeclarationProposals_StyleTag() throws Exception {
// default page, templates page, standard page, default page again
- int[] expectedProposalCounts = new int[] {4, 0, 4, 4};
+ int[] expectedProposalCounts = new int[] {4, 0, 4, 0, 4};
runProposalTest("test3.html", 17, 14, expectedProposalCounts);
}
public void testFinishDeclarationValueProposals_StyleTag() throws Exception {
// default page, templates page, standard page, default page again
- int[] expectedProposalCounts = new int[] {4, 0, 4, 4};
+ int[] expectedProposalCounts = new int[] {4, 0, 4, 0, 4};
runProposalTest("test3.html", 21, 23, expectedProposalCounts);
}
public void testDeclarationPropertyProposals_SpacedQuotes_StyleAttribute() throws Exception {
// default page, templates page, standard page, default page again
- int[] expectedProposalCounts = new int[] {122, 0, 122, 122};
+ int[] expectedProposalCounts = new int[] {122, 0, 122, 0, 122};
runProposalTest("test3.html", 31, 14, expectedProposalCounts);
}
public void testDeclarationPropertyProposals_EmptyQuotes_StyleAttribute() throws Exception {
// default page, templates page, standard page, default page again
- int[] expectedProposalCounts = new int[] {122, 0, 122, 122};
+ int[] expectedProposalCounts = new int[] {122, 0, 122, 0, 122};
runProposalTest("test3.html", 33, 12, expectedProposalCounts);
}
public void testDeclarationValueProposals_StyleAttribute() throws Exception {
// default page, templates page, standard page, default page again
- int[] expectedProposalCounts = new int[] {11, 0, 11, 11};
+ int[] expectedProposalCounts = new int[] {11, 0, 11, 0, 11};
runProposalTest("test3.html", 35, 26, expectedProposalCounts);
}
public void testFinishDeclarationProposals_StyleAttribute() throws Exception {
// default page, templates page, standard page, default page again
- int[] expectedProposalCounts = new int[] {4, 0, 4, 4};
+ int[] expectedProposalCounts = new int[] {4, 0, 4, 0, 4};
runProposalTest("test3.html", 37, 25, expectedProposalCounts);
}
public void testFinishDeclarationValueProposals_StyleAttribute() throws Exception {
// default page, templates page, standard page, default page again
- int[] expectedProposalCounts = new int[] {4, 0, 4, 4};
+ int[] expectedProposalCounts = new int[] {4, 0, 4, 0, 4};
runProposalTest("test3.html", 39, 34, expectedProposalCounts);
}
public void testDeclarationPropertyProposals_AfterSemicolon_NoSpace_StyleAttribute() throws Exception {
// default page, templates page, standard page, default page again
- int[] expectedProposalCounts = new int[] {122, 0, 122, 122};
+ int[] expectedProposalCounts = new int[] {122, 0, 122, 0, 122};
runProposalTest("test3.html", 41, 40, expectedProposalCounts);
}
public void testDeclarationPropertyProposals_AfterSemicolon_BeforeSpace_StyleAttribute() throws Exception {
// default page, templates page, standard page, default page again
- int[] expectedProposalCounts = new int[] {122, 0, 122, 122};
+ int[] expectedProposalCounts = new int[] {122, 0, 122, 0, 122};
runProposalTest("test3.html", 43, 40, expectedProposalCounts);
}
public void testDeclarationPropertyProposals_AfterSemicolon_AfterSpace_StyleAttribute() throws Exception {
// default page, templates page, standard page, default page again
- int[] expectedProposalCounts = new int[] {122, 0, 122, 122};
+ int[] expectedProposalCounts = new int[] {122, 0, 122, 0, 122};
runProposalTest("test3.html", 43, 41, expectedProposalCounts);
}
diff --git a/web/tests/org.eclipse.wst.html.ui.tests/src/org/eclipse/wst/html/ui/tests/contentassist/TestHTMLContentAssistComputers.java b/web/tests/org.eclipse.wst.html.ui.tests/src/org/eclipse/wst/html/ui/tests/contentassist/TestHTMLContentAssistComputers.java
index e0beb1b5e2..f5a913e69a 100644
--- a/web/tests/org.eclipse.wst.html.ui.tests/src/org/eclipse/wst/html/ui/tests/contentassist/TestHTMLContentAssistComputers.java
+++ b/web/tests/org.eclipse.wst.html.ui.tests/src/org/eclipse/wst/html/ui/tests/contentassist/TestHTMLContentAssistComputers.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010, 2019 IBM Corporation and others.
+ * Copyright (c) 2010, 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
@@ -105,37 +105,37 @@ public class TestHTMLContentAssistComputers extends TestCase {
public void testEmptyDocument() throws Exception {
// default page, templates page, tags page, default page again
- int[] expectedProposalCounts = new int[] {7, 6, 1, 0, 7};
+ int[] expectedProposalCounts = new int[] {7, 6, 1, 0, 0, 7};
runProposalTest("test0.html", 0, 0, expectedProposalCounts);
}
public void testAfterDocTypeBeforeHTMLTagProposals() throws Exception {
// default page, templates page, tags page, default page again
- int[] expectedProposalCounts = new int[] {8, 8, 0, 0, 8};
+ int[] expectedProposalCounts = new int[] {8, 8, 0, 0, 0, 8};
runProposalTest("test1.html", 1, 0, expectedProposalCounts);
}
public void testAfterDocTypeBeforeEmptyDocProposals() throws Exception {
// default page, templates page, tags page, default page again
- int[] expectedProposalCounts = new int[] {9, 8, 1, 0, 9};
+ int[] expectedProposalCounts = new int[] {9, 8, 1, 0, 0, 9};
runProposalTest("test2.html", 1, 0, expectedProposalCounts);
}
public void testBodyTagChildElementProposals() throws Exception {
// default page, templates page, tags page, default page again
- int[] expectedProposalCounts = new int[] {78, 8, 70, 0, 78};
+ int[] expectedProposalCounts = new int[] {78, 8, 70, 0, 0, 78};
runProposalTest("test1.html", 8, 0, expectedProposalCounts);
}
public void testPTagChildElementProposals() throws Exception {
// default page, templates page, tags page, default page again
- int[] expectedProposalCounts = new int[] {54, 8, 46, 0, 54};
+ int[] expectedProposalCounts = new int[] {54, 8, 46, 0, 0, 54};
runProposalTest("test1.html", 14, 0, expectedProposalCounts);
}
public void testDIVTagChildElementProposals() throws Exception {
// default page, templates page, tags page, default page again
- int[] expectedProposalCounts = new int[] {78, 8, 70, 0, 78};
+ int[] expectedProposalCounts = new int[] {78, 8, 70, 0, 0, 78};
runProposalTest("test1.html", 18, 0, expectedProposalCounts);
}
@@ -149,31 +149,31 @@ public class TestHTMLContentAssistComputers extends TestCase {
public void testDIVTagAttributeNameProposals() throws Exception {
// default page, templates page, tags page, default page again
- int[] expectedProposalCounts = new int[] {18, 0, 18, 0, 18};
+ int[] expectedProposalCounts = new int[] {18, 0, 18, 0, 0, 18};
runProposalTest("test1.html", 17, 5, expectedProposalCounts);
}
public void testFinishClosingTagNameProposals() throws Exception {
// default page, templates page, tags page, default page again
- int[] expectedProposalCounts = new int[] {1, 0, 1, 0, 1};
+ int[] expectedProposalCounts = new int[] {1, 0, 1, 0, 0, 1};
runProposalTest("test4.html", 9, 9, expectedProposalCounts);
}
public void testFinishClosingTagProposals() throws Exception {
// default page, templates page, tags page, default page again
- int[] expectedProposalCounts = new int[] {2, 0, 2, 0, 2};
+ int[] expectedProposalCounts = new int[] {2, 0, 2, 0, 0, 2};
runProposalTest("test4.html", 10, 0, expectedProposalCounts);
}
public void testFinishClosingTagNameProposalsXHTML() throws Exception {
// default page, templates page, tags page, default page again
- int[] expectedProposalCounts = new int[] {1, 0, 1, 0, 1};
+ int[] expectedProposalCounts = new int[] {1, 0, 1, 0, 0, 1};
runProposalTest("test5.xhtml", 9, 9, expectedProposalCounts);
}
public void testFinishClosingTagProposalsXHTML() throws Exception {
// default page, templates page, tags page, default page again
- int[] expectedProposalCounts = new int[] {1, 0, 2, 0, 2};
+ int[] expectedProposalCounts = new int[] {1, 0, 2, 0, 0, 2};
runProposalTest("test5.xhtml", 10, 0, expectedProposalCounts);
}

Back to the top