blob: 0243b971bdd7826148f7677e19acf74942d0f3c3 [file] [log] [blame]
<HTML><HEAD><META CONTENT="text/html; charset=UTF-8" HTTP-EQUIV="Content-Type"/><TITLE>EMMA Coverage Report</TITLE><STYLE TYPE="text/css"> TABLE,TD,TH {border-style:solid; border-color:black;} TD,TH {background:white;margin:0;line-height:100%;padding-left:0.5em;padding-right:0.5em;} TD {border-width:0 1px 0 0;} TH {border-width:1px 1px 1px 0;} TR TD.h {color:red;} TABLE {border-spacing:0; border-collapse:collapse;border-width:0 0 1px 1px;} P,H1,H2,H3,TH {font-family:verdana,arial,sans-serif;font-size:10pt;} TD {font-family:courier,monospace;font-size:10pt;} TABLE.hdft {border-spacing:0;border-collapse:collapse;border-style:none;} TABLE.hdft TH,TABLE.hdft TD {border-style:none;line-height:normal;} TABLE.hdft TH.tl,TABLE.hdft TD.tl {background:#6699CC;color:white;} TABLE.hdft TD.nv {background:#6633DD;color:white;} .nv A:link {color:white;} .nv A:visited {color:white;} .nv A:active {color:yellow;} TABLE.hdft A:link {color:white;} TABLE.hdft A:visited {color:white;} TABLE.hdft A:active {color:yellow;} .in {color:#356085;} TABLE.s TD {padding-left:0.25em;padding-right:0.25em;} TABLE.s TD.l {padding-left:0.25em;padding-right:0.25em;text-align:right;background:#F0F0F0;} TABLE.s TR.z TD {background:#FF9999;} TABLE.s TR.p TD {background:#FFFF88;} TABLE.s TR.c TD {background:#CCFFCC;} A:link {color:#0000EE;text-decoration:none;} A:visited {color:#0000EE;text-decoration:none;} A:hover {color:#0000EE;text-decoration:underline;} TABLE.cn {border-width:0 0 1px 0;} TABLE.s {border-width:1px 0 1px 1px;} TD.h {color:red;border-width:0 1px 0 0;} TD.f {border-width:0 1px 0 1px;} TD.hf {color:red;border-width:0 1px 0 1px;} TH.f {border-width:1px 1px 1px 1px;} TR.cis TD {background:#F0F0F0;} TR.cis TD {border-width:1px 1px 1px 0;} TR.cis TD.h {color:red;border-width:1px 1px 1px 0;} TR.cis TD.f {border-width:1px 1px 1px 1px;} TR.cis TD.hf {color:red;border-width:1px 1px 1px 1px;} TD.b {border-style:none;background:transparent;line-height:50%;} TD.bt {border-width:1px 0 0 0;background:transparent;line-height:50%;} TR.o TD {background:#F0F0F0;}TABLE.it {border-style:none;}TABLE.it TD,TABLE.it TH {border-style:none;}</STYLE></HEAD><BODY><TABLE CLASS="hdft" CELLSPACING="0" WIDTH="100%"><TR><TH CLASS="tl"><A HREF="http://www.eclemma.org/">EMMA</A> Coverage Report (generated Fri Feb 20 18:44:54 GMT 2009)</TH></TR><TR><TD CLASS="nv">[<A HREF="../xslUnitTestCoverage.html">all classes</A>][<A HREF="35.html">org.eclipse.wst.xml.ui.internal.correction</A>]</TD></TR></TABLE><H2>COVERAGE SUMMARY FOR SOURCE FILE [<SPAN CLASS="in">RenameInFileQuickAssistProposal.java</SPAN>]</H2><TABLE CELLSPACING="0" WIDTH="100%"><TR><TH>name</TH><TH>class, %</TH><TH>method, %</TH><TH>block, %</TH><TH>line, %</TH></TR><TR><TD>RenameInFileQuickAssistProposal.java</TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/11)</TD><TD CLASS="h">0%   (0/211)</TD><TD CLASS="h">0%   (0/42)</TD></TR></TABLE><H3>COVERAGE BREAKDOWN BY CLASS AND METHOD</H3><TABLE CLASS="cn" CELLSPACING="0" WIDTH="100%"><TR><TH CLASS="f">name</TH><TH>class, %</TH><TH>method, %</TH><TH>block, %</TH><TH>line, %</TH></TR><TR><TD CLASS="b"> </TD><TD CLASS="b"> </TD><TD CLASS="b"> </TD><TD CLASS="b"> </TD><TD CLASS="b"> </TD></TR><TR CLASS="cis"><TD CLASS="f">class <A HREF="#0">RenameInFileQuickAssistProposal</A></TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/11)</TD><TD CLASS="h">0%   (0/211)</TD><TD CLASS="h">0%   (0/42)</TD></TR><TR><TD CLASS="f"><A HREF="#0">RenameInFileQuickAssistProposal (): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/3)</TD><TD CLASS="h">0%   (0/1)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#2">apply (IDocument): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/1)</TD></TR><TR><TD CLASS="f"><A HREF="#3">apply (ITextViewer, char, int, int): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/183)</TD><TD CLASS="h">0%   (0/32)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#4">getAdditionalProposalInfo (): String</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/2)</TD><TD CLASS="h">0%   (0/1)</TD></TR><TR><TD CLASS="f"><A HREF="#5">getContextInformation (): IContextInformation</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/2)</TD><TD CLASS="h">0%   (0/1)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#6">getDisplayString (): String</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/2)</TD><TD CLASS="h">0%   (0/1)</TD></TR><TR><TD CLASS="f"><A HREF="#7">getImage (): Image</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/4)</TD><TD CLASS="h">0%   (0/1)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#8">getSelection (IDocument): Point</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/10)</TD><TD CLASS="h">0%   (0/1)</TD></TR><TR><TD CLASS="f"><A HREF="#9">selected (ITextViewer, boolean): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/1)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#a">unselected (ITextViewer): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/1)</TD></TR><TR><TD CLASS="f"><A HREF="#b">validate (IDocument, int, DocumentEvent): boolean</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/2)</TD><TD CLASS="h">0%   (0/1)</TD></TR></TABLE><P></P><TABLE CLASS="s" CELLSPACING="0" WIDTH="100%"><TR><TD CLASS="l">1</TD><TD>/*******************************************************************************</TD></TR><TR><TD CLASS="l">2</TD><TD> * Copyright (c) 2001, 2006 IBM Corporation and others.</TD></TR><TR><TD CLASS="l">3</TD><TD> * All rights reserved. This program and the accompanying materials</TD></TR><TR><TD CLASS="l">4</TD><TD> * are made available under the terms of the Eclipse Public License v1.0</TD></TR><TR><TD CLASS="l">5</TD><TD> * which accompanies this distribution, and is available at</TD></TR><TR><TD CLASS="l">6</TD><TD> * http://www.eclipse.org/legal/epl-v10.html</TD></TR><TR><TD CLASS="l">7</TD><TD> *</TD></TR><TR><TD CLASS="l">8</TD><TD> * Contributors:</TD></TR><TR><TD CLASS="l">9</TD><TD> *     IBM Corporation - initial API and implementation</TD></TR><TR><TD CLASS="l">10</TD><TD> *     Jens Lukowski/Innoopract - initial renaming/restructuring</TD></TR><TR><TD CLASS="l">11</TD><TD> *     </TD></TR><TR><TD CLASS="l">12</TD><TD> *******************************************************************************/</TD></TR><TR><TD CLASS="l">13</TD><TD>package org.eclipse.wst.xml.ui.internal.correction;</TD></TR><TR><TD CLASS="l">14</TD><TD> </TD></TR><TR><TD CLASS="l">15</TD><TD>import org.eclipse.jface.text.BadLocationException;</TD></TR><TR><TD CLASS="l">16</TD><TD>import org.eclipse.jface.text.DocumentEvent;</TD></TR><TR><TD CLASS="l">17</TD><TD>import org.eclipse.jface.text.IDocument;</TD></TR><TR><TD CLASS="l">18</TD><TD>import org.eclipse.jface.text.IRegion;</TD></TR><TR><TD CLASS="l">19</TD><TD>import org.eclipse.jface.text.ITextViewer;</TD></TR><TR><TD CLASS="l">20</TD><TD>import org.eclipse.jface.text.contentassist.ICompletionProposal;</TD></TR><TR><TD CLASS="l">21</TD><TD>import org.eclipse.jface.text.contentassist.ICompletionProposalExtension2;</TD></TR><TR><TD CLASS="l">22</TD><TD>import org.eclipse.jface.text.contentassist.IContextInformation;</TD></TR><TR><TD CLASS="l">23</TD><TD>import org.eclipse.jface.text.link.LinkedModeModel;</TD></TR><TR><TD CLASS="l">24</TD><TD>import org.eclipse.jface.text.link.LinkedModeUI;</TD></TR><TR><TD CLASS="l">25</TD><TD>import org.eclipse.jface.text.link.LinkedPosition;</TD></TR><TR><TD CLASS="l">26</TD><TD>import org.eclipse.jface.text.link.LinkedPositionGroup;</TD></TR><TR><TD CLASS="l">27</TD><TD>import org.eclipse.swt.graphics.Image;</TD></TR><TR><TD CLASS="l">28</TD><TD>import org.eclipse.swt.graphics.Point;</TD></TR><TR><TD CLASS="l">29</TD><TD>import org.eclipse.ui.texteditor.link.EditorLinkedModeUI;</TD></TR><TR><TD CLASS="l">30</TD><TD>import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;</TD></TR><TR><TD CLASS="l">31</TD><TD>import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;</TD></TR><TR><TD CLASS="l">32</TD><TD>import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;</TD></TR><TR><TD CLASS="l">33</TD><TD>import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;</TD></TR><TR><TD CLASS="l">34</TD><TD>import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;</TD></TR><TR><TD CLASS="l">35</TD><TD>import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;</TD></TR><TR><TD CLASS="l">36</TD><TD>import org.eclipse.wst.xml.ui.internal.Logger;</TD></TR><TR><TD CLASS="l"><A NAME="0">37</A></TD><TD>import org.eclipse.wst.xml.ui.internal.XMLUIMessages;</TD></TR><TR><TD CLASS="l">38</TD><TD>import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImageHelper;</TD></TR><TR><TD CLASS="l">39</TD><TD>import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImages;</TD></TR><TR><TD CLASS="l">40</TD><TD> </TD></TR><TR CLASS="z"><TD CLASS="l">41</TD><TD>public class RenameInFileQuickAssistProposal implements ICompletionProposal, ICompletionProposalExtension2 {</TD></TR><TR><TD CLASS="l">42</TD><TD>        protected IRegion fSelectedRegion; // initialized by apply()</TD></TR><TR><TD CLASS="l">43</TD><TD> </TD></TR><TR><TD CLASS="l">44</TD><TD>        /*</TD></TR><TR><TD CLASS="l">45</TD><TD>         * (non-Javadoc)</TD></TR><TR><TD CLASS="l"><A NAME="2">46</A></TD><TD>         * </TD></TR><TR><TD CLASS="l">47</TD><TD>         * @see org.eclipse.jface.text.contentassist.ICompletionProposal#apply(org.eclipse.jface.text.IDocument)</TD></TR><TR><TD CLASS="l">48</TD><TD>         */</TD></TR><TR><TD CLASS="l">49</TD><TD>        public void apply(IDocument document) {</TD></TR><TR CLASS="z"><TD CLASS="l">50</TD><TD>        }</TD></TR><TR><TD CLASS="l">51</TD><TD> </TD></TR><TR><TD CLASS="l">52</TD><TD>        /*</TD></TR><TR><TD CLASS="l">53</TD><TD>         * (non-Javadoc)</TD></TR><TR><TD CLASS="l">54</TD><TD>         * </TD></TR><TR><TD CLASS="l"><A NAME="3">55</A></TD><TD>         * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension2#apply(org.eclipse.jface.text.ITextViewer,</TD></TR><TR><TD CLASS="l">56</TD><TD>         *      char, int, int)</TD></TR><TR><TD CLASS="l">57</TD><TD>         */</TD></TR><TR><TD CLASS="l">58</TD><TD>        public void apply(ITextViewer viewer, char trigger, int stateMask, int offset) {</TD></TR><TR CLASS="z"><TD CLASS="l">59</TD><TD>                IDocument document = viewer.getDocument();</TD></TR><TR CLASS="z"><TD CLASS="l">60</TD><TD>                LinkedPositionGroup group = new LinkedPositionGroup();</TD></TR><TR><TD CLASS="l">61</TD><TD>                try {</TD></TR><TR CLASS="z"><TD CLASS="l">62</TD><TD>                        if (viewer instanceof StructuredTextViewer) {</TD></TR><TR CLASS="z"><TD CLASS="l">63</TD><TD>                                IDOMNode node = (IDOMNode) ContentAssistUtils.getNodeAt(viewer, offset);</TD></TR><TR CLASS="z"><TD CLASS="l">64</TD><TD>                                IStructuredDocumentRegion startStructuredDocumentRegion = node.getStartStructuredDocumentRegion();</TD></TR><TR CLASS="z"><TD CLASS="l">65</TD><TD>                                ITextRegion region = (startStructuredDocumentRegion == null) ? null : startStructuredDocumentRegion.getRegionAtCharacterOffset(offset);</TD></TR><TR CLASS="z"><TD CLASS="l">66</TD><TD>                                if (region != null) {</TD></TR><TR CLASS="z"><TD CLASS="l">67</TD><TD>                                        group.addPosition(new LinkedPosition(document, startStructuredDocumentRegion.getStartOffset() + region.getStart(), region.getTextLength(), 0));</TD></TR><TR><TD CLASS="l">68</TD><TD> </TD></TR><TR CLASS="z"><TD CLASS="l">69</TD><TD>                                        if ((region.getType() == DOMRegionContext.XML_TAG_NAME) &amp;&amp; (node.getEndStructuredDocumentRegion() != null)) {</TD></TR><TR CLASS="z"><TD CLASS="l">70</TD><TD>                                                region = node.getEndStructuredDocumentRegion().getRegions().get(1);</TD></TR><TR CLASS="z"><TD CLASS="l">71</TD><TD>                                                if (region != null) {</TD></TR><TR CLASS="z"><TD CLASS="l">72</TD><TD>                                                        group.addPosition(new LinkedPosition(document, node.getEndStructuredDocumentRegion().getStartOffset() + region.getStart(), region.getTextLength(), 1));</TD></TR><TR><TD CLASS="l">73</TD><TD>                                                }</TD></TR><TR><TD CLASS="l">74</TD><TD>                                        }</TD></TR><TR><TD CLASS="l">75</TD><TD>                                }</TD></TR><TR><TD CLASS="l">76</TD><TD>                                else {</TD></TR><TR CLASS="z"><TD CLASS="l">77</TD><TD>                                        IStructuredDocumentRegion endStructuredDocumentRegion = node.getEndStructuredDocumentRegion();</TD></TR><TR CLASS="z"><TD CLASS="l">78</TD><TD>                                        region = (endStructuredDocumentRegion == null) ? null : endStructuredDocumentRegion.getRegionAtCharacterOffset(offset);</TD></TR><TR CLASS="z"><TD CLASS="l">79</TD><TD>                                        if (region != null) {</TD></TR><TR CLASS="z"><TD CLASS="l">80</TD><TD>                                                if ((region.getType() == DOMRegionContext.XML_TAG_NAME) &amp;&amp; (node.getStartStructuredDocumentRegion() != null)) {</TD></TR><TR CLASS="z"><TD CLASS="l">81</TD><TD>                                                        ITextRegion startTagNameRegion = node.getStartStructuredDocumentRegion().getRegions().get(1);</TD></TR><TR CLASS="z"><TD CLASS="l">82</TD><TD>                                                        if (region != null) {</TD></TR><TR CLASS="z"><TD CLASS="l">83</TD><TD>                                                                group.addPosition(new LinkedPosition(document, node.getStartStructuredDocumentRegion().getStartOffset() + startTagNameRegion.getStart(), startTagNameRegion.getTextLength(), 0));</TD></TR><TR CLASS="z"><TD CLASS="l">84</TD><TD>                                                                group.addPosition(new LinkedPosition(document, endStructuredDocumentRegion.getStartOffset() + region.getStart(), region.getTextLength(), 1));</TD></TR><TR><TD CLASS="l">85</TD><TD>                                                        }</TD></TR><TR><TD CLASS="l">86</TD><TD>                                                }</TD></TR><TR><TD CLASS="l">87</TD><TD>                                                else {</TD></TR><TR CLASS="z"><TD CLASS="l">88</TD><TD>                                                        group.addPosition(new LinkedPosition(document, endStructuredDocumentRegion.getStartOffset() + region.getStart(), region.getTextLength(), 0));</TD></TR><TR><TD CLASS="l">89</TD><TD>                                                }</TD></TR><TR><TD CLASS="l">90</TD><TD>                                        }</TD></TR><TR><TD CLASS="l">91</TD><TD>                                }</TD></TR><TR><TD CLASS="l">92</TD><TD> </TD></TR><TR><TD CLASS="l">93</TD><TD>                                // TODO CompletionProposalPopup#insertProposal() calls</TD></TR><TR><TD CLASS="l">94</TD><TD>                                // IRewriteTarget.beginCompoundChange()</TD></TR><TR><TD CLASS="l">95</TD><TD>                                // which disables redraw in ITextViewer. Workaround for now.</TD></TR><TR CLASS="z"><TD CLASS="l">96</TD><TD>                                ((StructuredTextViewer) viewer).setRedraw(true);</TD></TR><TR><TD CLASS="l">97</TD><TD>                        }</TD></TR><TR><TD CLASS="l">98</TD><TD> </TD></TR><TR CLASS="z"><TD CLASS="l">99</TD><TD>                        LinkedModeModel linkedModeModel = new LinkedModeModel();</TD></TR><TR CLASS="z"><TD CLASS="l">100</TD><TD>                        linkedModeModel.addGroup(group);</TD></TR><TR CLASS="z"><TD CLASS="l">101</TD><TD>                        linkedModeModel.forceInstall();</TD></TR><TR><TD CLASS="l">102</TD><TD> </TD></TR><TR CLASS="z"><TD CLASS="l">103</TD><TD>                        LinkedModeUI ui = new EditorLinkedModeUI(linkedModeModel, viewer);</TD></TR><TR CLASS="z"><TD CLASS="l">104</TD><TD>                        ui.setExitPosition(viewer, offset, 0, LinkedPositionGroup.NO_STOP);</TD></TR><TR CLASS="z"><TD CLASS="l">105</TD><TD>                        ui.enter();</TD></TR><TR><TD CLASS="l">106</TD><TD> </TD></TR><TR CLASS="z"><TD CLASS="l">107</TD><TD>                        fSelectedRegion = ui.getSelectedRegion();</TD></TR><TR><TD CLASS="l">108</TD><TD>                }</TD></TR><TR CLASS="z"><TD CLASS="l">109</TD><TD>                catch (BadLocationException e) {</TD></TR><TR><TD CLASS="l">110</TD><TD>                        // log for now, unless find reason not to</TD></TR><TR CLASS="z"><TD CLASS="l">111</TD><TD>                        Logger.log(Logger.INFO, e.getMessage());</TD></TR><TR><TD CLASS="l">112</TD><TD>                }</TD></TR><TR CLASS="z"><TD CLASS="l">113</TD><TD>        }</TD></TR><TR><TD CLASS="l">114</TD><TD> </TD></TR><TR><TD CLASS="l">115</TD><TD>        /*</TD></TR><TR><TD CLASS="l">116</TD><TD>         * (non-Javadoc)</TD></TR><TR><TD CLASS="l"><A NAME="4">117</A></TD><TD>         * </TD></TR><TR><TD CLASS="l">118</TD><TD>         * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getAdditionalProposalInfo()</TD></TR><TR><TD CLASS="l">119</TD><TD>         */</TD></TR><TR><TD CLASS="l">120</TD><TD>        public String getAdditionalProposalInfo() {</TD></TR><TR CLASS="z"><TD CLASS="l">121</TD><TD>                return XMLUIMessages.RenameInFileQuickAssistProposal_0;</TD></TR><TR><TD CLASS="l">122</TD><TD>        }</TD></TR><TR><TD CLASS="l">123</TD><TD> </TD></TR><TR><TD CLASS="l">124</TD><TD>        /*</TD></TR><TR><TD CLASS="l">125</TD><TD>         * (non-Javadoc)</TD></TR><TR><TD CLASS="l"><A NAME="5">126</A></TD><TD>         * </TD></TR><TR><TD CLASS="l">127</TD><TD>         * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getContextInformation()</TD></TR><TR><TD CLASS="l">128</TD><TD>         */</TD></TR><TR><TD CLASS="l">129</TD><TD>        public IContextInformation getContextInformation() {</TD></TR><TR CLASS="z"><TD CLASS="l">130</TD><TD>                return null;</TD></TR><TR><TD CLASS="l">131</TD><TD>        }</TD></TR><TR><TD CLASS="l">132</TD><TD> </TD></TR><TR><TD CLASS="l">133</TD><TD>        /*</TD></TR><TR><TD CLASS="l">134</TD><TD>         * (non-Javadoc)</TD></TR><TR><TD CLASS="l"><A NAME="6">135</A></TD><TD>         * </TD></TR><TR><TD CLASS="l">136</TD><TD>         * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getDisplayString()</TD></TR><TR><TD CLASS="l">137</TD><TD>         */</TD></TR><TR><TD CLASS="l">138</TD><TD>        public String getDisplayString() {</TD></TR><TR CLASS="z"><TD CLASS="l">139</TD><TD>                return XMLUIMessages.RenameInFileQuickAssistProposal_1;</TD></TR><TR><TD CLASS="l">140</TD><TD>        }</TD></TR><TR><TD CLASS="l">141</TD><TD> </TD></TR><TR><TD CLASS="l">142</TD><TD>        /*</TD></TR><TR><TD CLASS="l">143</TD><TD>         * (non-Javadoc)</TD></TR><TR><TD CLASS="l">144</TD><TD>         * </TD></TR><TR><TD CLASS="l"><A NAME="7">145</A></TD><TD>         * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getImage()</TD></TR><TR><TD CLASS="l">146</TD><TD>         */</TD></TR><TR><TD CLASS="l">147</TD><TD>        public Image getImage() {</TD></TR><TR><TD CLASS="l">148</TD><TD>                // return JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_LOCAL);</TD></TR><TR CLASS="z"><TD CLASS="l">149</TD><TD>                return XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_LOCAL_VARIABLE);</TD></TR><TR><TD CLASS="l">150</TD><TD>        }</TD></TR><TR><TD CLASS="l">151</TD><TD> </TD></TR><TR><TD CLASS="l">152</TD><TD>        /*</TD></TR><TR><TD CLASS="l">153</TD><TD>         * (non-Javadoc)</TD></TR><TR><TD CLASS="l"><A NAME="8">154</A></TD><TD>         * </TD></TR><TR><TD CLASS="l">155</TD><TD>         * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getSelection(org.eclipse.jface.text.IDocument)</TD></TR><TR><TD CLASS="l">156</TD><TD>         */</TD></TR><TR><TD CLASS="l">157</TD><TD>        public Point getSelection(IDocument document) {</TD></TR><TR CLASS="z"><TD CLASS="l">158</TD><TD>                return new Point(fSelectedRegion.getOffset(), fSelectedRegion.getLength());</TD></TR><TR><TD CLASS="l">159</TD><TD>        }</TD></TR><TR><TD CLASS="l">160</TD><TD> </TD></TR><TR><TD CLASS="l">161</TD><TD>        /*</TD></TR><TR><TD CLASS="l">162</TD><TD>         * (non-Javadoc)</TD></TR><TR><TD CLASS="l">163</TD><TD>         * </TD></TR><TR><TD CLASS="l"><A NAME="9">164</A></TD><TD>         * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension2#selected(org.eclipse.jface.text.ITextViewer,</TD></TR><TR><TD CLASS="l">165</TD><TD>         *      boolean)</TD></TR><TR><TD CLASS="l">166</TD><TD>         */</TD></TR><TR><TD CLASS="l">167</TD><TD>        public void selected(ITextViewer viewer, boolean smartToggle) {</TD></TR><TR CLASS="z"><TD CLASS="l">168</TD><TD>        }</TD></TR><TR><TD CLASS="l">169</TD><TD> </TD></TR><TR><TD CLASS="l">170</TD><TD>        /*</TD></TR><TR><TD CLASS="l">171</TD><TD>         * (non-Javadoc)</TD></TR><TR><TD CLASS="l"><A NAME="a">172</A></TD><TD>         * </TD></TR><TR><TD CLASS="l">173</TD><TD>         * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension2#unselected(org.eclipse.jface.text.ITextViewer)</TD></TR><TR><TD CLASS="l">174</TD><TD>         */</TD></TR><TR><TD CLASS="l">175</TD><TD>        public void unselected(ITextViewer viewer) {</TD></TR><TR CLASS="z"><TD CLASS="l">176</TD><TD>        }</TD></TR><TR><TD CLASS="l">177</TD><TD> </TD></TR><TR><TD CLASS="l">178</TD><TD>        /*</TD></TR><TR><TD CLASS="l">179</TD><TD>         * (non-Javadoc)</TD></TR><TR><TD CLASS="l">180</TD><TD>         * </TD></TR><TR><TD CLASS="l"><A NAME="b">181</A></TD><TD>         * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension2#validate(org.eclipse.jface.text.IDocument,</TD></TR><TR><TD CLASS="l">182</TD><TD>         *      int, org.eclipse.jface.text.DocumentEvent)</TD></TR><TR><TD CLASS="l">183</TD><TD>         */</TD></TR><TR><TD CLASS="l">184</TD><TD>        public boolean validate(IDocument document, int offset, DocumentEvent event) {</TD></TR><TR CLASS="z"><TD CLASS="l">185</TD><TD>                return false;</TD></TR><TR><TD CLASS="l">186</TD><TD>        }</TD></TR><TR><TD CLASS="l">187</TD><TD> </TD></TR><TR><TD CLASS="l">188</TD><TD>}</TD></TR></TABLE><P></P><TABLE CLASS="hdft" CELLSPACING="0" WIDTH="100%"><TR><TD CLASS="nv">[<A HREF="../xslUnitTestCoverage.html">all classes</A>][<A HREF="35.html">org.eclipse.wst.xml.ui.internal.correction</A>]</TD></TR><TR><TD CLASS="tl"><A HREF="http://www.eclemma.org/support.html">EMMA 2.0.5312 EclEmma Fix 1</A> (C) Vladimir Roubtsov</TD></TR></TABLE></BODY></HTML>