Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--web/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/resources/ContentTypeSpecs.java10
-rw-r--r--xml/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/AbstractXMLCompletionProposalComputer.java2
2 files changed, 6 insertions, 6 deletions
diff --git a/web/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/resources/ContentTypeSpecs.java b/web/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/resources/ContentTypeSpecs.java
index 7f28306a96..ed49b86db1 100644
--- a/web/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/resources/ContentTypeSpecs.java
+++ b/web/bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/resources/ContentTypeSpecs.java
@@ -49,16 +49,16 @@ public class ContentTypeSpecs {
filenames.add(names[j]);
}
Arrays.sort(baseExtensions);
- IContentType[] allContentTypes1 = Platform.getContentTypeManager().getAllContentTypes();
- for (int i = 0, length = allContentTypes1.length; i < length; i++) {
- if (allContentTypes1[i].isKindOf(baseContentType)) {
- String[] fileExtension = allContentTypes1[i].getFileSpecs(IContentType.FILE_EXTENSION_SPEC);
+ IContentType[] allContentTypes = Platform.getContentTypeManager().getAllContentTypes();
+ for (int i = 0, length = allContentTypes.length; i < length; i++) {
+ if (!baseContentType.equals(allContentTypes[i]) && allContentTypes[i].isKindOf(baseContentType)) {
+ String[] fileExtension = allContentTypes[i].getFileSpecs(IContentType.FILE_EXTENSION_SPEC);
for (int j = 0; j < fileExtension.length; j++) {
if (!filenameExtensions.contains(fileExtension[j])) {
filenameExtensions.add(fileExtension[j]);
}
}
- names = allContentTypes1[i].getFileSpecs(IContentType.FILE_NAME_SPEC);
+ names = allContentTypes[i].getFileSpecs(IContentType.FILE_NAME_SPEC);
for (int j = 0; j < names.length; j++) {
filenames.add(names[j]);
}
diff --git a/xml/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/AbstractXMLCompletionProposalComputer.java b/xml/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/AbstractXMLCompletionProposalComputer.java
index 2a282c3404..1e620d2ac0 100644
--- a/xml/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/AbstractXMLCompletionProposalComputer.java
+++ b/xml/bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/AbstractXMLCompletionProposalComputer.java
@@ -1057,7 +1057,7 @@ public abstract class AbstractXMLCompletionProposalComputer implements ICompleti
int end = offset;
IDocument document = parent.getParentDocument();
try {
- while (start >= 0 && !Character.isWhitespace(document.getChar(start - 1))) {
+ while (start > 0 && !Character.isWhitespace(document.getChar(start - 1))) {
start--;
}
matchString = document.get(start, end - start);

Back to the top