blob: 801c34b5417c2c3f2d0521adceb598ac5733a726 [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="d.html">org.eclipse.wst.sse.ui.internal.debug</A>]</TD></TR></TABLE><H2>COVERAGE SUMMARY FOR SOURCE FILE [<SPAN CLASS="in">DebugTextEditor.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>DebugTextEditor.java</TD><TD CLASS="h">0%   (0/4)</TD><TD CLASS="h">0%   (0/27)</TD><TD CLASS="h">0%   (0/764)</TD><TD CLASS="h">0%   (0/163)</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">DebugTextEditor</A></TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/13)</TD><TD CLASS="h">0%   (0/561)</TD><TD CLASS="h">0%   (0/115)</TD></TR><TR><TD CLASS="f"><A HREF="#0">DebugTextEditor (): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/21)</TD><TD CLASS="h">0%   (0/5)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#2">createActions (): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/37)</TD><TD CLASS="h">0%   (0/8)</TD></TR><TR><TD CLASS="f"><A HREF="#3">createShowInTargetIds (): String []</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/80)</TD><TD CLASS="h">0%   (0/16)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#4">detectContentType (IPath): IContentType</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/86)</TD><TD CLASS="h">0%   (0/28)</TD></TR><TR><TD CLASS="f"><A HREF="#5">editorContextMenuAboutToShow (IMenuManager): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/33)</TD><TD CLASS="h">0%   (0/10)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#6">getAdapter (Class): Object</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/25)</TD><TD CLASS="h">0%   (0/3)</TD></TR><TR><TD CLASS="f"><A HREF="#7">getConfigurationPoints (): String []</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/23)</TD><TD CLASS="h">0%   (0/1)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#8">getEditorInputContentTypes (IEditorInput): IContentType []</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/114)</TD><TD CLASS="h">0%   (0/15)</TD></TR><TR><TD CLASS="f"><A HREF="#9">getInputContentType (IEditorInput): String</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/13)</TD><TD CLASS="h">0%   (0/4)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#a">isDebuggingAvailable (): boolean</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/35)</TD><TD CLASS="h">0%   (0/5)</TD></TR><TR><TD CLASS="f"><A HREF="#b">rulerContextMenuAboutToShow (IMenuManager): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/40)</TD><TD CLASS="h">0%   (0/8)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#c">setDocumentProvider (IEditorInput): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/24)</TD><TD CLASS="h">0%   (0/6)</TD></TR><TR><TD CLASS="f"><A HREF="#d">updateContentDependentActions (): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/30)</TD><TD CLASS="h">0%   (0/6)</TD></TR><TR><TD CLASS="bt"> </TD><TD CLASS="bt"> </TD><TD CLASS="bt"> </TD><TD CLASS="bt"> </TD><TD CLASS="bt"> </TD></TR><TR CLASS="cis"><TD CLASS="f">class <A HREF="#e">DebugTextEditor$1</A></TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/2)</TD><TD CLASS="h">0%   (0/62)</TD><TD CLASS="h">0%   (0/10)</TD></TR><TR><TD CLASS="f"><A HREF="#e">DebugTextEditor$1 (DebugTextEditor, ITextEditor, IVerticalRulerInfo): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/8)</TD><TD CLASS="h">0%   (0/2)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#10">getContentType (IDocument): String</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/54)</TD><TD CLASS="h">0%   (0/8)</TD></TR><TR><TD CLASS="bt"> </TD><TD CLASS="bt"> </TD><TD CLASS="bt"> </TD><TD CLASS="bt"> </TD><TD CLASS="bt"> </TD></TR><TR CLASS="cis"><TD CLASS="f">class <A HREF="#11">DebugTextEditor$ShowInTargetLister</A></TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/2)</TD><TD CLASS="h">0%   (0/10)</TD><TD CLASS="h">0%   (0/2)</TD></TR><TR><TD CLASS="f"><A HREF="#11">DebugTextEditor$ShowInTargetLister (DebugTextEditor): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/6)</TD><TD CLASS="h">0%   (0/1)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#13">getShowInTargetIds (): String []</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><TD CLASS="bt"> </TD><TD CLASS="bt"> </TD><TD CLASS="bt"> </TD><TD CLASS="bt"> </TD><TD CLASS="bt"> </TD></TR><TR CLASS="cis"><TD CLASS="f">class <A HREF="#14">DebugTextEditor$StorageInputDocumentProvider</A></TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/10)</TD><TD CLASS="h">0%   (0/131)</TD><TD CLASS="h">0%   (0/37)</TD></TR><TR><TD CLASS="f"><A HREF="#14">DebugTextEditor$StorageInputDocumentProvider (DebugTextEditor): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/6)</TD><TD CLASS="h">0%   (0/1)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#16">createAnnotationModel (Object): IAnnotationModel</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/71)</TD><TD CLASS="h">0%   (0/17)</TD></TR><TR><TD CLASS="f"><A HREF="#17">createElementInfo (Object): AbstractDocumentProvider$ElementInfo</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/11)</TD><TD CLASS="h">0%   (0/3)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#18">disposeElementInfo (Object, AbstractDocumentProvider$ElementInfo): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/12)</TD><TD CLASS="h">0%   (0/4)</TD></TR><TR><TD CLASS="f"><A HREF="#19">doSaveDocument (IProgressMonitor, Object, IDocument, boolean): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/9)</TD><TD CLASS="h">0%   (0/2)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#1a">elementContentAboutToBeReplaced (Object): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/4)</TD><TD CLASS="h">0%   (0/2)</TD></TR><TR><TD CLASS="f"><A HREF="#1b">elementContentReplaced (Object): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/4)</TD><TD CLASS="h">0%   (0/2)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#1c">elementDeleted (Object): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/4)</TD><TD CLASS="h">0%   (0/2)</TD></TR><TR><TD CLASS="f"><A HREF="#1d">elementDirtyStateChanged (Object, boolean): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/5)</TD><TD CLASS="h">0%   (0/2)</TD></TR><TR CLASS="o"><TD CLASS="f"><A HREF="#1e">elementMoved (Object, Object): void</A></TD><TD> </TD><TD CLASS="h">0%   (0/1)</TD><TD CLASS="h">0%   (0/5)</TD><TD CLASS="h">0%   (0/2)</TD></TR></TABLE><P></P><TABLE CLASS="s" CELLSPACING="0" WIDTH="100%"><TR CLASS="z"><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.sse.ui.internal.debug;</TD></TR><TR><TD CLASS="l">14</TD><TD> </TD></TR><TR><TD CLASS="l">15</TD><TD>import java.io.File;</TD></TR><TR><TD CLASS="l">16</TD><TD>import java.io.FileInputStream;</TD></TR><TR><TD CLASS="l">17</TD><TD>import java.io.FileNotFoundException;</TD></TR><TR><TD CLASS="l">18</TD><TD>import java.io.IOException;</TD></TR><TR><TD CLASS="l">19</TD><TD>import java.io.InputStream;</TD></TR><TR><TD CLASS="l">20</TD><TD>import java.util.ArrayList;</TD></TR><TR><TD CLASS="l">21</TD><TD>import java.util.List;</TD></TR><TR><TD CLASS="l">22</TD><TD> </TD></TR><TR><TD CLASS="l">23</TD><TD>import org.eclipse.core.filebuffers.FileBuffers;</TD></TR><TR><TD CLASS="l">24</TD><TD>import org.eclipse.core.resources.IFile;</TD></TR><TR><TD CLASS="l">25</TD><TD>import org.eclipse.core.resources.IMarker;</TD></TR><TR><TD CLASS="l">26</TD><TD>import org.eclipse.core.resources.IResource;</TD></TR><TR><TD CLASS="l">27</TD><TD>import org.eclipse.core.resources.ResourcesPlugin;</TD></TR><TR><TD CLASS="l">28</TD><TD>import org.eclipse.core.runtime.CoreException;</TD></TR><TR><TD CLASS="l">29</TD><TD>import org.eclipse.core.runtime.IPath;</TD></TR><TR><TD CLASS="l">30</TD><TD>import org.eclipse.core.runtime.IProgressMonitor;</TD></TR><TR><TD CLASS="l">31</TD><TD>import org.eclipse.core.runtime.Platform;</TD></TR><TR><TD CLASS="l">32</TD><TD>import org.eclipse.core.runtime.content.IContentDescription;</TD></TR><TR><TD CLASS="l">33</TD><TD>import org.eclipse.core.runtime.content.IContentType;</TD></TR><TR><TD CLASS="l">34</TD><TD>import org.eclipse.core.runtime.content.IContentTypeManager;</TD></TR><TR><TD CLASS="l">35</TD><TD>import org.eclipse.jface.action.IAction;</TD></TR><TR><TD CLASS="l">36</TD><TD>import org.eclipse.jface.action.IMenuManager;</TD></TR><TR><TD CLASS="l">37</TD><TD>import org.eclipse.jface.action.Separator;</TD></TR><TR><TD CLASS="l">38</TD><TD>import org.eclipse.jface.text.IDocument;</TD></TR><TR><TD CLASS="l">39</TD><TD>import org.eclipse.jface.text.source.IAnnotationModel;</TD></TR><TR><TD CLASS="l">40</TD><TD>import org.eclipse.ui.IEditorActionBarContributor;</TD></TR><TR><TD CLASS="l">41</TD><TD>import org.eclipse.ui.IEditorInput;</TD></TR><TR><TD CLASS="l">42</TD><TD>import org.eclipse.ui.IFileEditorInput;</TD></TR><TR><TD CLASS="l">43</TD><TD>import org.eclipse.ui.IPageLayout;</TD></TR><TR><TD CLASS="l">44</TD><TD>import org.eclipse.ui.IPathEditorInput;</TD></TR><TR><TD CLASS="l">45</TD><TD>import org.eclipse.ui.IStorageEditorInput;</TD></TR><TR><TD CLASS="l">46</TD><TD>import org.eclipse.ui.editors.text.FileDocumentProvider;</TD></TR><TR><TD CLASS="l">47</TD><TD>import org.eclipse.ui.editors.text.ILocationProvider;</TD></TR><TR><TD CLASS="l">48</TD><TD>import org.eclipse.ui.editors.text.StorageDocumentProvider;</TD></TR><TR><TD CLASS="l">49</TD><TD>import org.eclipse.ui.editors.text.TextEditor;</TD></TR><TR><TD CLASS="l">50</TD><TD>import org.eclipse.ui.part.IShowInTargetList;</TD></TR><TR><TD CLASS="l">51</TD><TD>import org.eclipse.ui.texteditor.AbstractDocumentProvider;</TD></TR><TR><TD CLASS="l">52</TD><TD>import org.eclipse.ui.texteditor.IDocumentProvider;</TD></TR><TR><TD CLASS="l">53</TD><TD>import org.eclipse.ui.texteditor.IElementStateListener;</TD></TR><TR><TD CLASS="l">54</TD><TD>import org.eclipse.ui.texteditor.ITextEditorActionConstants;</TD></TR><TR><TD CLASS="l">55</TD><TD>import org.eclipse.ui.texteditor.MarkerRulerAction;</TD></TR><TR><TD CLASS="l">56</TD><TD>import org.eclipse.wst.sse.core.utils.StringUtils;</TD></TR><TR><TD CLASS="l">57</TD><TD>import org.eclipse.wst.sse.ui.internal.ExtendedConfigurationBuilder;</TD></TR><TR><TD CLASS="l">58</TD><TD>import org.eclipse.wst.sse.ui.internal.ExtendedEditorActionBuilder;</TD></TR><TR><TD CLASS="l">59</TD><TD>import org.eclipse.wst.sse.ui.internal.IExtendedContributor;</TD></TR><TR><TD CLASS="l">60</TD><TD>import org.eclipse.wst.sse.ui.internal.IPopupMenuContributor;</TD></TR><TR><TD CLASS="l">61</TD><TD>import org.eclipse.wst.sse.ui.internal.Logger;</TD></TR><TR><TD CLASS="l">62</TD><TD>import org.eclipse.wst.sse.ui.internal.SSEUIMessages;</TD></TR><TR><TD CLASS="l">63</TD><TD>import org.eclipse.wst.sse.ui.internal.StructuredResourceMarkerAnnotationModel;</TD></TR><TR><TD CLASS="l">64</TD><TD>import org.eclipse.wst.sse.ui.internal.actions.ActionDefinitionIds;</TD></TR><TR><TD CLASS="l">65</TD><TD>import org.eclipse.wst.sse.ui.internal.extension.BreakpointProviderBuilder;</TD></TR><TR><TD CLASS="l">66</TD><TD>import org.eclipse.wst.sse.ui.internal.provisional.extensions.ConfigurationPointCalculator;</TD></TR><TR><TD CLASS="l">67</TD><TD>import org.eclipse.wst.sse.ui.internal.provisional.extensions.breakpoint.IExtendedStorageEditorInput;</TD></TR><TR><TD CLASS="l">68</TD><TD> </TD></TR><TR><TD CLASS="l">69</TD><TD> </TD></TR><TR><TD CLASS="l">70</TD><TD>/**</TD></TR><TR><TD CLASS="l">71</TD><TD> * @author nitin</TD></TR><TR><TD CLASS="l">72</TD><TD> * </TD></TR><TR><TD CLASS="l">73</TD><TD> * A text editor capable of using the IBreakpointProvider framework.</TD></TR><TR><TD CLASS="l">74</TD><TD> * </TD></TR><TR><TD CLASS="l">75</TD><TD> * This class is intended to be used by clients who wish to use the</TD></TR><TR><TD CLASS="l">76</TD><TD> * IBreakpointProvider framework but not the StructuredTextEditor, e.g. VBS</TD></TR><TR><TD CLASS="l">77</TD><TD> * source editors. It is provided AS-IS and marked internal as it is</TD></TR><TR><TD CLASS="l"><A NAME="11">78</A></TD><TD> * unsupported and subject to change at any time.</TD></TR><TR><TD CLASS="l">79</TD><TD> */</TD></TR><TR><TD CLASS="l"><A NAME="13">80</A></TD><TD>public class DebugTextEditor extends TextEditor {</TD></TR><TR><TD CLASS="l">81</TD><TD> </TD></TR><TR CLASS="z"><TD CLASS="l">82</TD><TD>        private class ShowInTargetLister implements IShowInTargetList {</TD></TR><TR><TD CLASS="l">83</TD><TD>                public String[] getShowInTargetIds() {</TD></TR><TR CLASS="z"><TD CLASS="l">84</TD><TD>                        return fShowInTargetIds;</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> </TD></TR><TR><TD CLASS="l">88</TD><TD>        /**</TD></TR><TR><TD CLASS="l"><A NAME="14">89</A></TD><TD>         * DocumentProvider for IStorageEditorInputs - supports</TD></TR><TR><TD CLASS="l">90</TD><TD>         * IExtendedStorageEditorInput notifications and assigning breakpoint</TD></TR><TR><TD CLASS="l"><A NAME="16">91</A></TD><TD>         * markers.</TD></TR><TR><TD CLASS="l">92</TD><TD>         */</TD></TR><TR CLASS="z"><TD CLASS="l">93</TD><TD>        class StorageInputDocumentProvider extends StorageDocumentProvider implements IElementStateListener {</TD></TR><TR><TD CLASS="l">94</TD><TD>                protected IAnnotationModel createAnnotationModel(Object element) throws CoreException {</TD></TR><TR CLASS="z"><TD CLASS="l">95</TD><TD>                        IAnnotationModel model = null;</TD></TR><TR CLASS="z"><TD CLASS="l">96</TD><TD>                        IStorageEditorInput storageInput = (IStorageEditorInput) element;</TD></TR><TR CLASS="z"><TD CLASS="l">97</TD><TD>                        String ext = BreakpointRulerAction.getFileExtension(storageInput);</TD></TR><TR CLASS="z"><TD CLASS="l">98</TD><TD>                        IContentType[] types = getEditorInputContentTypes(storageInput);</TD></TR><TR CLASS="z"><TD CLASS="l">99</TD><TD>                        IResource res = null;</TD></TR><TR CLASS="z"><TD CLASS="l">100</TD><TD>                        for (int i = 0; res == null &amp;&amp; i &lt; types.length; i++) {</TD></TR><TR CLASS="z"><TD CLASS="l">101</TD><TD>                                res = BreakpointProviderBuilder.getInstance().getResource(storageInput, types[i].getId(), ext);</TD></TR><TR><TD CLASS="l">102</TD><TD>                        }</TD></TR><TR CLASS="z"><TD CLASS="l">103</TD><TD>                        String id = storageInput.getName();</TD></TR><TR CLASS="z"><TD CLASS="l">104</TD><TD>                        if (storageInput.getStorage() != null) {</TD></TR><TR CLASS="z"><TD CLASS="l">105</TD><TD>                                IPath fullPath = storageInput.getStorage().getFullPath();</TD></TR><TR CLASS="z"><TD CLASS="l">106</TD><TD>                                if (fullPath != null)</TD></TR><TR CLASS="z"><TD CLASS="l">107</TD><TD>                                        id = fullPath.toString();</TD></TR><TR><TD CLASS="l">108</TD><TD>                                else</TD></TR><TR CLASS="z"><TD CLASS="l">109</TD><TD>                                        id = storageInput.getName();</TD></TR><TR><TD CLASS="l">110</TD><TD>                        }</TD></TR><TR CLASS="z"><TD CLASS="l">111</TD><TD>                        if (res != null)</TD></TR><TR CLASS="z"><TD CLASS="l">112</TD><TD>                                model = new StructuredResourceMarkerAnnotationModel(res, id);</TD></TR><TR><TD CLASS="l">113</TD><TD>                        else</TD></TR><TR CLASS="z"><TD CLASS="l">114</TD><TD>                                model = new StructuredResourceMarkerAnnotationModel(ResourcesPlugin.getWorkspace().getRoot(), id);</TD></TR><TR><TD CLASS="l">115</TD><TD> </TD></TR><TR CLASS="z"><TD CLASS="l"><A NAME="17">116</A></TD><TD>                        return model;</TD></TR><TR><TD CLASS="l">117</TD><TD>                }</TD></TR><TR><TD CLASS="l">118</TD><TD> </TD></TR><TR><TD CLASS="l">119</TD><TD>                protected AbstractDocumentProvider.ElementInfo createElementInfo(Object element) throws CoreException {</TD></TR><TR CLASS="z"><TD CLASS="l">120</TD><TD>                        if (element instanceof IExtendedStorageEditorInput) {</TD></TR><TR CLASS="z"><TD CLASS="l">121</TD><TD>                                ((IExtendedStorageEditorInput) element).addElementStateListener(this);</TD></TR><TR><TD CLASS="l">122</TD><TD>                        }</TD></TR><TR CLASS="z"><TD CLASS="l"><A NAME="18">123</A></TD><TD>                        return super.createElementInfo(element);</TD></TR><TR><TD CLASS="l">124</TD><TD>                }</TD></TR><TR><TD CLASS="l">125</TD><TD> </TD></TR><TR><TD CLASS="l">126</TD><TD>                protected void disposeElementInfo(Object element, ElementInfo info) {</TD></TR><TR CLASS="z"><TD CLASS="l">127</TD><TD>                        if (element instanceof IExtendedStorageEditorInput) {</TD></TR><TR CLASS="z"><TD CLASS="l">128</TD><TD>                                ((IExtendedStorageEditorInput) element).removeElementStateListener(this);</TD></TR><TR><TD CLASS="l">129</TD><TD>                        }</TD></TR><TR CLASS="z"><TD CLASS="l">130</TD><TD>                        super.disposeElementInfo(element, info);</TD></TR><TR CLASS="z"><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">135</TD><TD>                 * </TD></TR><TR><TD CLASS="l">136</TD><TD>                 * @see org.eclipse.ui.editors.text.StorageDocumentProvider#doSaveDocument(org.eclipse.core.runtime.IProgressMonitor,</TD></TR><TR><TD CLASS="l"><A NAME="19">137</A></TD><TD>                 *      java.lang.Object, org.eclipse.jface.text.IDocument, boolean)</TD></TR><TR><TD CLASS="l">138</TD><TD>                 */</TD></TR><TR><TD CLASS="l">139</TD><TD>                protected void doSaveDocument(IProgressMonitor monitor, Object element, IDocument document, boolean overwrite) throws CoreException {</TD></TR><TR><TD CLASS="l">140</TD><TD>                        // untested</TD></TR><TR CLASS="z"><TD CLASS="l"><A NAME="1a">141</A></TD><TD>                        new FileDocumentProvider().saveDocument(monitor, element, document, overwrite);</TD></TR><TR CLASS="z"><TD CLASS="l">142</TD><TD>                }</TD></TR><TR><TD CLASS="l">143</TD><TD> </TD></TR><TR><TD CLASS="l">144</TD><TD>                public void elementContentAboutToBeReplaced(Object element) {</TD></TR><TR CLASS="z"><TD CLASS="l"><A NAME="1b">145</A></TD><TD>                        fireElementContentAboutToBeReplaced(element);</TD></TR><TR CLASS="z"><TD CLASS="l">146</TD><TD>                }</TD></TR><TR><TD CLASS="l">147</TD><TD> </TD></TR><TR><TD CLASS="l">148</TD><TD>                public void elementContentReplaced(Object element) {</TD></TR><TR CLASS="z"><TD CLASS="l"><A NAME="1c">149</A></TD><TD>                        fireElementContentReplaced(element);</TD></TR><TR CLASS="z"><TD CLASS="l">150</TD><TD>                }</TD></TR><TR><TD CLASS="l">151</TD><TD> </TD></TR><TR><TD CLASS="l">152</TD><TD>                public void elementDeleted(Object element) {</TD></TR><TR CLASS="z"><TD CLASS="l"><A NAME="1d">153</A></TD><TD>                        fireElementDeleted(element);</TD></TR><TR CLASS="z"><TD CLASS="l">154</TD><TD>                }</TD></TR><TR><TD CLASS="l">155</TD><TD> </TD></TR><TR><TD CLASS="l">156</TD><TD>                public void elementDirtyStateChanged(Object element, boolean isDirty) {</TD></TR><TR CLASS="z"><TD CLASS="l"><A NAME="1e">157</A></TD><TD>                        fireElementDirtyStateChanged(element, isDirty);</TD></TR><TR CLASS="z"><TD CLASS="l">158</TD><TD>                }</TD></TR><TR><TD CLASS="l">159</TD><TD> </TD></TR><TR><TD CLASS="l">160</TD><TD>                public void elementMoved(Object originalElement, Object movedElement) {</TD></TR><TR CLASS="z"><TD CLASS="l">161</TD><TD>                        fireElementMoved(originalElement, movedElement);</TD></TR><TR CLASS="z"><TD CLASS="l">162</TD><TD>                }</TD></TR><TR><TD CLASS="l">163</TD><TD>        }</TD></TR><TR><TD CLASS="l">164</TD><TD> </TD></TR><TR CLASS="z"><TD CLASS="l">165</TD><TD>        String[] fShowInTargetIds = new String[]{IPageLayout.ID_RES_NAV};</TD></TR><TR CLASS="z"><TD CLASS="l">166</TD><TD>        private IShowInTargetList fShowInTargetListAdapter = new ShowInTargetLister();</TD></TR><TR><TD CLASS="l"><A NAME="0">167</A></TD><TD> </TD></TR><TR CLASS="z"><TD CLASS="l">168</TD><TD>        IDocumentProvider fStorageInputDocumentProvider = null;</TD></TR><TR><TD CLASS="l">169</TD><TD> </TD></TR><TR><TD CLASS="l">170</TD><TD>        public DebugTextEditor() {</TD></TR><TR CLASS="z"><TD CLASS="l">171</TD><TD>                super();</TD></TR><TR CLASS="z"><TD CLASS="l">172</TD><TD>        }</TD></TR><TR><TD CLASS="l">173</TD><TD> </TD></TR><TR><TD CLASS="l">174</TD><TD>        /*</TD></TR><TR><TD CLASS="l">175</TD><TD>         * (non-Javadoc)</TD></TR><TR><TD CLASS="l"><A NAME="2">176</A></TD><TD>         * </TD></TR><TR><TD CLASS="l">177</TD><TD>         * @see org.eclipse.ui.editors.text.TextEditor#createActions()</TD></TR><TR><TD CLASS="l">178</TD><TD>         */</TD></TR><TR><TD CLASS="l"><A NAME="e">179</A></TD><TD>        protected void createActions() {</TD></TR><TR CLASS="z"><TD CLASS="l">180</TD><TD>                super.createActions();</TD></TR><TR><TD CLASS="l"><A NAME="10">181</A></TD><TD> </TD></TR><TR><TD CLASS="l">182</TD><TD>                // StructuredTextEditor Action - toggle breakpoints</TD></TR><TR CLASS="z"><TD CLASS="l">183</TD><TD>                IAction action = new ToggleBreakpointAction(this, getVerticalRuler()) {</TD></TR><TR><TD CLASS="l">184</TD><TD>                        protected String getContentType(IDocument document) {</TD></TR><TR CLASS="z"><TD CLASS="l">185</TD><TD>                                ILocationProvider provider = (ILocationProvider) getEditorInput().getAdapter(ILocationProvider.class);</TD></TR><TR CLASS="z"><TD CLASS="l">186</TD><TD>                                if (provider != null) {</TD></TR><TR CLASS="z"><TD CLASS="l">187</TD><TD>                                        IPath location = provider.getPath(getEditorInput());</TD></TR><TR CLASS="z"><TD CLASS="l">188</TD><TD>                                        return detectContentType(location).getId();</TD></TR><TR><TD CLASS="l">189</TD><TD>                                }</TD></TR><TR CLASS="z"><TD CLASS="l">190</TD><TD>                                else if (getEditorInput() instanceof IPathEditorInput) {</TD></TR><TR CLASS="z"><TD CLASS="l">191</TD><TD>                                        IPath location = ((IPathEditorInput) getEditorInput()).getPath();</TD></TR><TR CLASS="z"><TD CLASS="l">192</TD><TD>                                        return detectContentType(location).getId();</TD></TR><TR><TD CLASS="l">193</TD><TD>                                }</TD></TR><TR CLASS="z"><TD CLASS="l">194</TD><TD>                                return IContentTypeManager.CT_TEXT;</TD></TR><TR><TD CLASS="l">195</TD><TD>                        }</TD></TR><TR><TD CLASS="l">196</TD><TD>                };</TD></TR><TR CLASS="z"><TD CLASS="l">197</TD><TD>                setAction(ActionDefinitionIds.TOGGLE_BREAKPOINTS, action);</TD></TR><TR><TD CLASS="l">198</TD><TD>                // StructuredTextEditor Action - manage breakpoints</TD></TR><TR CLASS="z"><TD CLASS="l">199</TD><TD>                action = new ManageBreakpointAction(this, getVerticalRuler());</TD></TR><TR CLASS="z"><TD CLASS="l">200</TD><TD>                setAction(ActionDefinitionIds.MANAGE_BREAKPOINTS, action);</TD></TR><TR><TD CLASS="l">201</TD><TD>                // StructuredTextEditor Action - edit breakpoints</TD></TR><TR CLASS="z"><TD CLASS="l">202</TD><TD>                action = new EditBreakpointAction(this, getVerticalRuler());</TD></TR><TR CLASS="z"><TD CLASS="l">203</TD><TD>                setAction(ActionDefinitionIds.EDIT_BREAKPOINTS, action);</TD></TR><TR CLASS="z"><TD CLASS="l">204</TD><TD>        }</TD></TR><TR><TD CLASS="l">205</TD><TD> </TD></TR><TR><TD CLASS="l">206</TD><TD>        /**</TD></TR><TR><TD CLASS="l">207</TD><TD>         * Loads the Show In Target IDs from the Extended Configuration extension</TD></TR><TR><TD CLASS="l">208</TD><TD>         * point.</TD></TR><TR><TD CLASS="l"><A NAME="3">209</A></TD><TD>         * </TD></TR><TR><TD CLASS="l">210</TD><TD>         * @return</TD></TR><TR><TD CLASS="l">211</TD><TD>         */</TD></TR><TR><TD CLASS="l">212</TD><TD>        protected String[] createShowInTargetIds() {</TD></TR><TR CLASS="z"><TD CLASS="l">213</TD><TD>                List allIds = new ArrayList(0);</TD></TR><TR CLASS="z"><TD CLASS="l">214</TD><TD>                ExtendedConfigurationBuilder builder = ExtendedConfigurationBuilder.getInstance();</TD></TR><TR CLASS="z"><TD CLASS="l">215</TD><TD>                String[] configurationIds = getConfigurationPoints();</TD></TR><TR CLASS="z"><TD CLASS="l">216</TD><TD>                for (int i = 0; i &lt; configurationIds.length; i++) {</TD></TR><TR CLASS="z"><TD CLASS="l">217</TD><TD>                        String[] definitions = builder.getDefinitions(&#34;showintarget&#34;, configurationIds[i]); //$NON-NLS-1$</TD></TR><TR CLASS="z"><TD CLASS="l">218</TD><TD>                        for (int j = 0; j &lt; definitions.length; j++) {</TD></TR><TR CLASS="z"><TD CLASS="l">219</TD><TD>                                String someIds = definitions[j];</TD></TR><TR CLASS="z"><TD CLASS="l">220</TD><TD>                                if (someIds != null &amp;&amp; someIds.length() &gt; 0) {</TD></TR><TR CLASS="z"><TD CLASS="l">221</TD><TD>                                        String[] ids = StringUtils.unpack(someIds);</TD></TR><TR CLASS="z"><TD CLASS="l">222</TD><TD>                                        for (int k = 0; k &lt; ids.length; k++) {</TD></TR><TR><TD CLASS="l">223</TD><TD>                                                // trim, just to keep things clean</TD></TR><TR CLASS="z"><TD CLASS="l">224</TD><TD>                                                String id = ids[k].trim();</TD></TR><TR CLASS="z"><TD CLASS="l">225</TD><TD>                                                if (!allIds.contains(id)) {</TD></TR><TR CLASS="z"><TD CLASS="l">226</TD><TD>                                                        allIds.add(id);</TD></TR><TR><TD CLASS="l">227</TD><TD>                                                }</TD></TR><TR><TD CLASS="l">228</TD><TD>                                        }</TD></TR><TR><TD CLASS="l">229</TD><TD>                                }</TD></TR><TR><TD CLASS="l">230</TD><TD>                        }</TD></TR><TR><TD CLASS="l">231</TD><TD>                }</TD></TR><TR><TD CLASS="l">232</TD><TD> </TD></TR><TR CLASS="z"><TD CLASS="l">233</TD><TD>                if (!allIds.contains(IPageLayout.ID_RES_NAV)) {</TD></TR><TR CLASS="z"><TD CLASS="l">234</TD><TD>                        allIds.add(IPageLayout.ID_RES_NAV);</TD></TR><TR><TD CLASS="l">235</TD><TD>                }</TD></TR><TR CLASS="z"><TD CLASS="l"><A NAME="4">236</A></TD><TD>                return (String[]) allIds.toArray(new String[0]);</TD></TR><TR><TD CLASS="l">237</TD><TD>        }</TD></TR><TR><TD CLASS="l">238</TD><TD> </TD></TR><TR><TD CLASS="l">239</TD><TD>        IContentType detectContentType(IPath location) {</TD></TR><TR CLASS="z"><TD CLASS="l">240</TD><TD>                IContentType type = null;</TD></TR><TR><TD CLASS="l">241</TD><TD> </TD></TR><TR CLASS="z"><TD CLASS="l">242</TD><TD>                IResource resource = FileBuffers.getWorkspaceFileAtLocation(location);</TD></TR><TR CLASS="z"><TD CLASS="l">243</TD><TD>                if (resource != null) {</TD></TR><TR CLASS="z"><TD CLASS="l">244</TD><TD>                        if (resource.getType() == IResource.FILE &amp;&amp; resource.isAccessible()) {</TD></TR><TR CLASS="z"><TD CLASS="l">245</TD><TD>                                IContentDescription d = null;</TD></TR><TR><TD CLASS="l">246</TD><TD>                                try {</TD></TR><TR><TD CLASS="l">247</TD><TD>                                        // Optimized description lookup, might not succeed</TD></TR><TR CLASS="z"><TD CLASS="l">248</TD><TD>                                        d = ((IFile) resource).getContentDescription();</TD></TR><TR CLASS="z"><TD CLASS="l">249</TD><TD>                                        if (d != null) {</TD></TR><TR CLASS="z"><TD CLASS="l">250</TD><TD>                                                type = d.getContentType();</TD></TR><TR><TD CLASS="l">251</TD><TD>                                        }</TD></TR><TR><TD CLASS="l">252</TD><TD>                                }</TD></TR><TR CLASS="z"><TD CLASS="l">253</TD><TD>                                catch (CoreException e) {</TD></TR><TR><TD CLASS="l">254</TD><TD>                                        // Should not be possible given the accessible and file</TD></TR><TR><TD CLASS="l">255</TD><TD>                                        // type check above</TD></TR><TR><TD CLASS="l">256</TD><TD>                                }</TD></TR><TR CLASS="z"><TD CLASS="l">257</TD><TD>                                if (type == null) {</TD></TR><TR CLASS="z"><TD CLASS="l">258</TD><TD>                                        type = Platform.getContentTypeManager().findContentTypeFor(resource.getName());</TD></TR><TR><TD CLASS="l">259</TD><TD>                                }</TD></TR><TR><TD CLASS="l">260</TD><TD>                        }</TD></TR><TR><TD CLASS="l">261</TD><TD>                }</TD></TR><TR><TD CLASS="l">262</TD><TD>                else {</TD></TR><TR CLASS="z"><TD CLASS="l">263</TD><TD>                        File file = FileBuffers.getSystemFileAtLocation(location);</TD></TR><TR CLASS="z"><TD CLASS="l">264</TD><TD>                        if (file != null) {</TD></TR><TR CLASS="z"><TD CLASS="l">265</TD><TD>                                InputStream input = null;</TD></TR><TR><TD CLASS="l">266</TD><TD>                                try {</TD></TR><TR CLASS="z"><TD CLASS="l">267</TD><TD>                                        input = new FileInputStream(file);</TD></TR><TR CLASS="z"><TD CLASS="l">268</TD><TD>                                        type = Platform.getContentTypeManager().findContentTypeFor(input, location.toOSString());</TD></TR><TR><TD CLASS="l">269</TD><TD>                                }</TD></TR><TR CLASS="z"><TD CLASS="l">270</TD><TD>                                catch (FileNotFoundException e) {</TD></TR><TR><TD CLASS="l">271</TD><TD>                                }</TD></TR><TR CLASS="z"><TD CLASS="l">272</TD><TD>                                catch (IOException e) {</TD></TR><TR><TD CLASS="l">273</TD><TD>                                }</TD></TR><TR CLASS="z"><TD CLASS="l">274</TD><TD>                                finally {</TD></TR><TR CLASS="z"><TD CLASS="l">275</TD><TD>                                        if (input != null) {</TD></TR><TR><TD CLASS="l">276</TD><TD>                                                try {</TD></TR><TR CLASS="z"><TD CLASS="l">277</TD><TD>                                                        input.close();</TD></TR><TR><TD CLASS="l">278</TD><TD>                                                }</TD></TR><TR CLASS="z"><TD CLASS="l">279</TD><TD>                                                catch (IOException e1) {</TD></TR><TR><TD CLASS="l">280</TD><TD>                                                }</TD></TR><TR><TD CLASS="l">281</TD><TD>                                        }</TD></TR><TR CLASS="z"><TD CLASS="l">282</TD><TD>                                }</TD></TR><TR CLASS="z"><TD CLASS="l">283</TD><TD>                                if (type == null) {</TD></TR><TR CLASS="z"><TD CLASS="l">284</TD><TD>                                        type = Platform.getContentTypeManager().findContentTypeFor(file.getName());</TD></TR><TR><TD CLASS="l">285</TD><TD>                                }</TD></TR><TR><TD CLASS="l">286</TD><TD>                        }</TD></TR><TR><TD CLASS="l">287</TD><TD>                }</TD></TR><TR CLASS="z"><TD CLASS="l">288</TD><TD>                if (type == null) {</TD></TR><TR CLASS="z"><TD CLASS="l">289</TD><TD>                        type = Platform.getContentTypeManager().getContentType(IContentTypeManager.CT_TEXT);</TD></TR><TR><TD CLASS="l">290</TD><TD>                }</TD></TR><TR CLASS="z"><TD CLASS="l">291</TD><TD>                return type;</TD></TR><TR><TD CLASS="l">292</TD><TD>        }</TD></TR><TR><TD CLASS="l">293</TD><TD> </TD></TR><TR><TD CLASS="l">294</TD><TD>        /*</TD></TR><TR><TD CLASS="l">295</TD><TD>         * (non-Javadoc)</TD></TR><TR><TD CLASS="l"><A NAME="5">296</A></TD><TD>         * </TD></TR><TR><TD CLASS="l">297</TD><TD>         * @see org.eclipse.ui.texteditor.AbstractTextEditor#editorContextMenuAboutToShow(org.eclipse.jface.action.IMenuManager)</TD></TR><TR><TD CLASS="l">298</TD><TD>         */</TD></TR><TR><TD CLASS="l">299</TD><TD>        protected void editorContextMenuAboutToShow(IMenuManager menu) {</TD></TR><TR CLASS="z"><TD CLASS="l">300</TD><TD>                super.editorContextMenuAboutToShow(menu);</TD></TR><TR><TD CLASS="l">301</TD><TD> </TD></TR><TR CLASS="z"><TD CLASS="l">302</TD><TD>                IEditorActionBarContributor c = getEditorSite().getActionBarContributor();</TD></TR><TR CLASS="z"><TD CLASS="l">303</TD><TD>                if (c instanceof IPopupMenuContributor) {</TD></TR><TR CLASS="z"><TD CLASS="l">304</TD><TD>                        ((IPopupMenuContributor) c).contributeToPopupMenu(menu);</TD></TR><TR><TD CLASS="l">305</TD><TD>                }</TD></TR><TR><TD CLASS="l">306</TD><TD>                else {</TD></TR><TR CLASS="z"><TD CLASS="l">307</TD><TD>                        ExtendedEditorActionBuilder builder = new ExtendedEditorActionBuilder();</TD></TR><TR CLASS="z"><TD CLASS="l">308</TD><TD>                        IExtendedContributor pmc = builder.readActionExtensions(getConfigurationPoints());</TD></TR><TR CLASS="z"><TD CLASS="l">309</TD><TD>                        if (pmc != null) {</TD></TR><TR CLASS="z"><TD CLASS="l">310</TD><TD>                                pmc.setActiveEditor(this);</TD></TR><TR CLASS="z"><TD CLASS="l">311</TD><TD>                                pmc.contributeToPopupMenu(menu);</TD></TR><TR><TD CLASS="l">312</TD><TD>                        }</TD></TR><TR><TD CLASS="l">313</TD><TD>                }</TD></TR><TR CLASS="z"><TD CLASS="l">314</TD><TD>        }</TD></TR><TR><TD CLASS="l">315</TD><TD> </TD></TR><TR><TD CLASS="l">316</TD><TD>        /**</TD></TR><TR><TD CLASS="l"><A NAME="6">317</A></TD><TD>         * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)</TD></TR><TR><TD CLASS="l">318</TD><TD>         */</TD></TR><TR><TD CLASS="l">319</TD><TD>        public Object getAdapter(Class required) {</TD></TR><TR><TD CLASS="l">320</TD><TD>                // Navigate action set menu</TD></TR><TR CLASS="z"><TD CLASS="l">321</TD><TD>                if (IShowInTargetList.class.equals(required))</TD></TR><TR CLASS="z"><TD CLASS="l">322</TD><TD>                        return fShowInTargetListAdapter;</TD></TR><TR CLASS="z"><TD CLASS="l">323</TD><TD>                return super.getAdapter(required);</TD></TR><TR><TD CLASS="l"><A NAME="7">324</A></TD><TD>        }</TD></TR><TR><TD CLASS="l">325</TD><TD> </TD></TR><TR><TD CLASS="l">326</TD><TD> </TD></TR><TR><TD CLASS="l">327</TD><TD>        protected String[] getConfigurationPoints() {</TD></TR><TR CLASS="z"><TD CLASS="l"><A NAME="8">328</A></TD><TD>                return ConfigurationPointCalculator.getConfigurationPoints(this, getInputContentType(getEditorInput()), ConfigurationPointCalculator.SOURCE, DebugTextEditor.class);</TD></TR><TR><TD CLASS="l">329</TD><TD>        }</TD></TR><TR><TD CLASS="l">330</TD><TD> </TD></TR><TR><TD CLASS="l">331</TD><TD>        IContentType[] getEditorInputContentTypes(IEditorInput input) {</TD></TR><TR CLASS="z"><TD CLASS="l">332</TD><TD>                IContentType[] types = null;</TD></TR><TR CLASS="z"><TD CLASS="l">333</TD><TD>                IResource resource = null;</TD></TR><TR><TD CLASS="l">334</TD><TD> </TD></TR><TR CLASS="z"><TD CLASS="l">335</TD><TD>                if (input.getAdapter(IFile.class) != null) {</TD></TR><TR CLASS="z"><TD CLASS="l">336</TD><TD>                        resource = (IFile) input.getAdapter(IFile.class);</TD></TR><TR><TD CLASS="l">337</TD><TD>                }</TD></TR><TR CLASS="z"><TD CLASS="l">338</TD><TD>                else if (input.getAdapter(IFile.class) != null) {</TD></TR><TR CLASS="z"><TD CLASS="l">339</TD><TD>                        resource = (IResource) input.getAdapter(IResource.class);</TD></TR><TR><TD CLASS="l">340</TD><TD>                }</TD></TR><TR CLASS="z"><TD CLASS="l">341</TD><TD>                if (resource.getType() == IResource.FILE &amp;&amp; resource.isAccessible()) {</TD></TR><TR CLASS="z"><TD CLASS="l">342</TD><TD>                        IContentDescription d = null;</TD></TR><TR><TD CLASS="l">343</TD><TD>                        try {</TD></TR><TR><TD CLASS="l">344</TD><TD>                                // optimized description lookup, might not succeed</TD></TR><TR CLASS="z"><TD CLASS="l">345</TD><TD>                                d = ((IFile) resource).getContentDescription();</TD></TR><TR CLASS="z"><TD CLASS="l">346</TD><TD>                                if (d != null) {</TD></TR><TR CLASS="z"><TD CLASS="l">347</TD><TD>                                        types = new IContentType[]{d.getContentType()};</TD></TR><TR><TD CLASS="l">348</TD><TD>                                }</TD></TR><TR><TD CLASS="l">349</TD><TD>                        }</TD></TR><TR CLASS="z"><TD CLASS="l">350</TD><TD>                        catch (CoreException e) {</TD></TR><TR><TD CLASS="l">351</TD><TD>                                // should not be possible given the accessible and file type</TD></TR><TR><TD CLASS="l">352</TD><TD>                                // check above</TD></TR><TR><TD CLASS="l">353</TD><TD>                        }</TD></TR><TR><TD CLASS="l">354</TD><TD>                }</TD></TR><TR CLASS="z"><TD CLASS="l">355</TD><TD>                if (types == null) {</TD></TR><TR CLASS="z"><TD CLASS="l">356</TD><TD>                        types = Platform.getContentTypeManager().findContentTypesFor(input.getName());</TD></TR><TR><TD CLASS="l">357</TD><TD>                }</TD></TR><TR CLASS="z"><TD CLASS="l">358</TD><TD>                return types;</TD></TR><TR><TD CLASS="l">359</TD><TD>        }</TD></TR><TR><TD CLASS="l">360</TD><TD> </TD></TR><TR><TD CLASS="l">361</TD><TD>        /**</TD></TR><TR><TD CLASS="l"><A NAME="9">362</A></TD><TD>         * @param editorInput</TD></TR><TR><TD CLASS="l">363</TD><TD>         * @return</TD></TR><TR><TD CLASS="l">364</TD><TD>         */</TD></TR><TR><TD CLASS="l">365</TD><TD>        private String getInputContentType(IEditorInput editorInput) {</TD></TR><TR CLASS="z"><TD CLASS="l">366</TD><TD>                IContentType[] types = getEditorInputContentTypes(editorInput);</TD></TR><TR CLASS="z"><TD CLASS="l">367</TD><TD>                if (types != null) {</TD></TR><TR CLASS="z"><TD CLASS="l">368</TD><TD>                        return types[0].getId();</TD></TR><TR><TD CLASS="l">369</TD><TD>                }</TD></TR><TR CLASS="z"><TD CLASS="l">370</TD><TD>                return null;</TD></TR><TR><TD CLASS="l">371</TD><TD>        }</TD></TR><TR><TD CLASS="l">372</TD><TD> </TD></TR><TR><TD CLASS="l">373</TD><TD>        /**</TD></TR><TR><TD CLASS="l"><A NAME="a">374</A></TD><TD>         * </TD></TR><TR><TD CLASS="l">375</TD><TD>         * @return</TD></TR><TR><TD CLASS="l">376</TD><TD>         */</TD></TR><TR><TD CLASS="l">377</TD><TD>        private boolean isDebuggingAvailable() {</TD></TR><TR CLASS="z"><TD CLASS="l">378</TD><TD>                boolean debuggingAvailable = false;</TD></TR><TR CLASS="z"><TD CLASS="l">379</TD><TD>                IContentType[] types = getEditorInputContentTypes(getEditorInput());</TD></TR><TR CLASS="z"><TD CLASS="l">380</TD><TD>                for (int i = 0; !debuggingAvailable &amp;&amp; i &lt; types.length; i++) {</TD></TR><TR CLASS="z"><TD CLASS="l">381</TD><TD>                        debuggingAvailable = debuggingAvailable || BreakpointProviderBuilder.getInstance().isAvailable(types[i].getId(), BreakpointRulerAction.getFileExtension(getEditorInput()));</TD></TR><TR><TD CLASS="l">382</TD><TD>                }</TD></TR><TR CLASS="z"><TD CLASS="l"><A NAME="b">383</A></TD><TD>                return debuggingAvailable;</TD></TR><TR><TD CLASS="l">384</TD><TD>        }</TD></TR><TR><TD CLASS="l">385</TD><TD> </TD></TR><TR><TD CLASS="l">386</TD><TD>        protected void rulerContextMenuAboutToShow(IMenuManager menu) {</TD></TR><TR CLASS="z"><TD CLASS="l">387</TD><TD>                if (isDebuggingAvailable()) {</TD></TR><TR CLASS="z"><TD CLASS="l">388</TD><TD>                        menu.add(getAction(ActionDefinitionIds.TOGGLE_BREAKPOINTS));</TD></TR><TR CLASS="z"><TD CLASS="l">389</TD><TD>                        menu.add(getAction(ActionDefinitionIds.MANAGE_BREAKPOINTS));</TD></TR><TR CLASS="z"><TD CLASS="l">390</TD><TD>                        menu.add(getAction(ActionDefinitionIds.EDIT_BREAKPOINTS));</TD></TR><TR CLASS="z"><TD CLASS="l">391</TD><TD>                        menu.add(new Separator());</TD></TR><TR><TD CLASS="l">392</TD><TD>                }</TD></TR><TR><TD CLASS="l">393</TD><TD>                else {</TD></TR><TR CLASS="z"><TD CLASS="l">394</TD><TD>                        Logger.log(Logger.INFO, getClass().getName() + &#34; could not enable debugging actions&#34;); //$NON-NLS-1$</TD></TR><TR><TD CLASS="l">395</TD><TD>                }</TD></TR><TR CLASS="z"><TD CLASS="l">396</TD><TD>                super.rulerContextMenuAboutToShow(menu);</TD></TR><TR CLASS="z"><TD CLASS="l">397</TD><TD>        }</TD></TR><TR><TD CLASS="l">398</TD><TD> </TD></TR><TR><TD CLASS="l">399</TD><TD>        /**</TD></TR><TR><TD CLASS="l">400</TD><TD>         * Ensure that the correct IDocumentProvider is used. For IFile and Files,</TD></TR><TR><TD CLASS="l">401</TD><TD>         * the default provider with a specified AnnotationModelFactory is used.</TD></TR><TR><TD CLASS="l">402</TD><TD>         * For StorageEditorInputs, use a custom provider that creates a usable</TD></TR><TR><TD CLASS="l">403</TD><TD>         * ResourceAnnotationModel</TD></TR><TR><TD CLASS="l"><A NAME="c">404</A></TD><TD>         * </TD></TR><TR><TD CLASS="l">405</TD><TD>         * @see org.eclipse.ui.texteditor.AbstractDecoratedTextEditor#setDocumentProvider(org.eclipse.ui.IEditorInput)</TD></TR><TR><TD CLASS="l">406</TD><TD>         */</TD></TR><TR><TD CLASS="l">407</TD><TD>        protected void setDocumentProvider(IEditorInput input) {</TD></TR><TR CLASS="z"><TD CLASS="l">408</TD><TD>                if (input instanceof IStorageEditorInput &amp;&amp; !(input instanceof IFileEditorInput)) {</TD></TR><TR CLASS="z"><TD CLASS="l">409</TD><TD>                        if (fStorageInputDocumentProvider == null) {</TD></TR><TR CLASS="z"><TD CLASS="l">410</TD><TD>                                fStorageInputDocumentProvider = new StorageInputDocumentProvider();</TD></TR><TR><TD CLASS="l">411</TD><TD>                        }</TD></TR><TR CLASS="z"><TD CLASS="l">412</TD><TD>                        setDocumentProvider(fStorageInputDocumentProvider);</TD></TR><TR><TD CLASS="l">413</TD><TD>                }</TD></TR><TR><TD CLASS="l">414</TD><TD>                else {</TD></TR><TR CLASS="z"><TD CLASS="l">415</TD><TD>                        super.setDocumentProvider(input);</TD></TR><TR><TD CLASS="l">416</TD><TD>                }</TD></TR><TR CLASS="z"><TD CLASS="l">417</TD><TD>        }</TD></TR><TR><TD CLASS="l">418</TD><TD> </TD></TR><TR><TD CLASS="l">419</TD><TD>        /*</TD></TR><TR><TD CLASS="l">420</TD><TD>         * (non-Javadoc)</TD></TR><TR><TD CLASS="l"><A NAME="d">421</A></TD><TD>         * </TD></TR><TR><TD CLASS="l">422</TD><TD>         * @see org.eclipse.ui.texteditor.AbstractTextEditor#updateContentDependentActions()</TD></TR><TR><TD CLASS="l">423</TD><TD>         */</TD></TR><TR><TD CLASS="l">424</TD><TD>        protected void updateContentDependentActions() {</TD></TR><TR CLASS="z"><TD CLASS="l">425</TD><TD>                super.updateContentDependentActions();</TD></TR><TR CLASS="z"><TD CLASS="l">426</TD><TD>                if (isDebuggingAvailable()) {</TD></TR><TR CLASS="z"><TD CLASS="l">427</TD><TD>                        setAction(ITextEditorActionConstants.RULER_DOUBLE_CLICK, getAction(ActionDefinitionIds.TOGGLE_BREAKPOINTS));</TD></TR><TR><TD CLASS="l">428</TD><TD>                }</TD></TR><TR><TD CLASS="l">429</TD><TD>                else {</TD></TR><TR><TD CLASS="l">430</TD><TD>                        // The Default Text Editor uses editorContribution to perform this</TD></TR><TR><TD CLASS="l">431</TD><TD>                        // mapping, but since it relies on the IEditorSite ID, it can't be</TD></TR><TR><TD CLASS="l">432</TD><TD>                        // relied on for MultiPageEditorParts. Instead, force the action</TD></TR><TR><TD CLASS="l">433</TD><TD>                        // registration manually.</TD></TR><TR CLASS="z"><TD CLASS="l">434</TD><TD>                        setAction(ITextEditorActionConstants.RULER_DOUBLE_CLICK, new MarkerRulerAction(SSEUIMessages.getResourceBundle(), &#34;Editor.ManageBookmarks.&#34;, this, getVerticalRuler(), IMarker.BOOKMARK, true)); //$NON-NLS-1$</TD></TR><TR><TD CLASS="l">435</TD><TD>                }</TD></TR><TR CLASS="z"><TD CLASS="l">436</TD><TD>                fShowInTargetIds = createShowInTargetIds();</TD></TR><TR CLASS="z"><TD CLASS="l">437</TD><TD>        }</TD></TR><TR><TD CLASS="l">438</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="d.html">org.eclipse.wst.sse.ui.internal.debug</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>