private void evalProposals() { try { IRegion info= fDocument.getLineInformationOfOffset(fCurrentPos); int lineBeginPos= info.getOffset(); int word1Begin= findCharBeforeWord(fDocument, lineBeginPos, fCurrentPos); if (word1Begin == fCurrentPos) return; char firstChar= fDocument.getChar(word1Begin); if (firstChar == '<') { String prefix= fDocument.get(word1Begin, fCurrentPos - word1Begin); addProposals(prefix, fgHTMLProposals, JavaPluginImages.IMG_OBJS_HTMLTAG); return; } else if (!Character.isWhitespace(firstChar)) { return; } // TODO really show all tags when there is no prefix? // TODO find any unclosed open tag and offer the corresponding close tag String prefix= fDocument.get(word1Begin + 1, fCurrentPos - word1Begin - 1); addAllTags(prefix); } catch (BadLocationException e) { // ignore } }
private void evalProposals() throws JavaModelException { try { IRegion info= fDocument.getLineInformationOfOffset(fCurrentPos); int lineBeginPos= info.getOffset(); int word1Begin= findCharBeforeWord(fDocument, lineBeginPos, fCurrentPos); if (word1Begin == fCurrentPos) return; char firstChar= fDocument.getChar(word1Begin); if (firstChar == '<') { String prefix= fDocument.get(word1Begin, fCurrentPos - word1Begin); addProposals(prefix, fgHTMLProposals, JavaPluginImages.IMG_OBJS_HTMLTAG); return; } else if (!Character.isWhitespace(firstChar)) { return; } // TODO really show all tags when there is no prefix? // TODO find any unclosed open tag and offer the corresponding close tag String prefix= fDocument.get(word1Begin + 1, fCurrentPos - word1Begin - 1); addAllTags(prefix); } catch (BadLocationException e) { // ignore } }
private void evalProposals() { try { IRegion info= fDocument.getLineInformationOfOffset(fCurrentPos); int lineBeginPos= info.getOffset(); int word1Begin= findCharBeforeWord(fDocument, lineBeginPos, fCurrentPos); if (word1Begin == fCurrentPos) return; char firstChar= fDocument.getChar(word1Begin); if (firstChar == '<') { String prefix= fDocument.get(word1Begin, fCurrentPos - word1Begin); addProposals(prefix, fgHTMLProposals, JavaPluginImages.IMG_OBJS_HTMLTAG); return; } else if (!Character.isWhitespace(firstChar)) { return; } // TODO really show all tags when there is no prefix? // TODO find any unclosed open tag and offer the corresponding close tag String prefix= fDocument.get(word1Begin + 1, fCurrentPos - word1Begin - 1); addAllTags(prefix); } catch (BadLocationException e) { // ignore } }