Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 264246 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/wst/xml/ui/internal/contentassist/MarkupCompletionProposal.java (-12 / +2 lines)
Lines 60-66 Link Here
60
		final String replacement = getReplacementString();
60
		final String replacement = getReplacementString();
61
		final IDocument document = viewer.getDocument();
61
		final IDocument document = viewer.getDocument();
62
		final int length = replacement.length();
62
		final int length = replacement.length();
63
		boolean inAttribute = false, hasGroup = false, inEndTag = false;
63
		boolean inAttribute = false, hasGroup = false;
64
		int offset = 0;
64
		int offset = 0;
65
		char attType = 0;
65
		char attType = 0;
66
		int exitPosition = -1;
66
		int exitPosition = -1;
Lines 89-111 Link Here
89
						}
89
						}
90
						break;
90
						break;
91
					case '/':
91
					case '/':
92
							if (!inAttribute) {
93
								inEndTag = i > 0 && replacement.charAt(i - 1) == '<';
94
							}
95
						break;
92
						break;
96
					case '>':
93
					case '>':
97
						if (!inAttribute) {
94
						if (!inAttribute) {
98
							if (i == length - 1) {
95
							if (i == length - 1) {
99
								exitPosition = getReplacementOffset() + i + 1;
100
								if (!inEndTag) { // Don't add a position within the end-tag
101
									addPosition(model, document, getReplacementOffset() + i, 0); // position within start tag
102
									hasGroup = true;
103
								}
104
							}
96
							}
105
							else {
97
							else {
106
								addPosition(model, document, getReplacementOffset() + i, 0); // position within start tag
98
								exitPosition = getReplacementOffset() + i + 1;
107
								addPosition(model, document, getReplacementOffset() + i + 1, 0); // position after start tag
108
								hasGroup = true;
109
							}
99
							}
110
						}
100
						}
111
						break;
101
						break;

Return to bug 264246