Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] Creating JUnit Test for New View

> Hi Guys,
>   
> I’m creating a test class for the new Legend View.
> Is there a standard project where I should put this? Do I need to create a new plugin for the test? Or would putting it in net.refractions.udig.project.tests.ui be alright?
>  
>  
>  

Each plugin in uDig has a place where its tests live; you should not need to make a new test plugin. I think the one you mention is correct.
> Should it run the same as a simple JUnit plugin test? For example, create the class, add dependency to project being tested, then run as JUnit Plugin Test?
>  
>   
>  
>  

You could split your tests into two test cases (i.e. one for simple JUnit tests focused on data structures) but most of your tests will be Plugin Tests as you will need to poke at the user interface (and a live EMF model).  

I also note you can use SWT Bot to automated some of the button poking; see the Eclipse Plugins book for details.  
> Thanks,
> Naz Chan
>   
> Ps. Sorry bout all the questions, still finding my way through..
>   
>  
>   ________________________________    
> The contents of this email are confidential and may be subject to legalls we're looking at.  To asciiify Naz's diagram, the normal case looks something like:

ggpppplllLllyyyyrrrrr

for g=mapgraphic, p=point, l=line, y=polygon, r=raster.  Hitting move to top on the capital L leads to:

ggppppLlllllyyyyrrrrr

That makes sense.  But the next two examples are less nice.

1 - ggpplppllLlyyyyrrrr
2 - ggppplllLlyypyyrrrr

Essentially, the described behaviour of moving the L line to the top of the lines breaks down in these cases.  There are two ways to look at this, A. move L to be above the first line or B. move L to be below the last point.

1A - ggppLlpplllyyyyrrrr
1B - ggpplppLlllyyyyrrrr
2A - ggpppLllllyypyyrrrr
2B - ggpppllllyypLyyrrrr

I was thinking to do something that doesn't quite meet the description of the tool, and move the layer to the top of it's current, continuous block of like layers:

1 - ggpplppLlllyyyyrrrr
2 - ggpppLllllyypyyrrrr

The downsides of that being the case where the selected layer is the outlier:

before - ggppppllllyyLyyrrrr
after - ggppppllllyyLyyrrrr

...and the difficulty in explaining what is happening in the tool tip.

Thoughts?

On 14 February 2012 21:50, Jody Garnett <jody.garnett@xxxxxxxxx<mailto:jody.garnett@xxxxxxxxx>> wrote:
Correct; that is basically the ordering which allows the "most" content to be visible. So when adding a new layer; it should sift down into the right spot by default.

You are correct that people can mess with the zorder (i.e. drawing order) after the layer has been added; this natural ordering is an application of the uDig Guideline "Sensible default".

--
Jody Garnett


On Tuesday, 14 February 2012 at 3:19 PM, Nazareno Chan wrote:

Hi Guys,

Just wanna clarify some details regarding the ‘natural sorting’ to be implemented on Legend View:

1.       Is the diagram below correct regarding the natural ordering of layers?
2.       Noting that using the Layers View, the user can rearrange the layers anyway they want, irregardless or natural ordering:
•  For example, moving a line layer to the front, do we look for the lowest point layer and move it below this? Or the highest line layer and move it above this?
•  If the lowest point layer was placed below the lines? Or the highest line layer above the points?

<image002.png>

Thanks,
Naz Chan

________________________________
The contents of this email are confidential and may be subject to legal or professional privilege and copyright. No representation is made that this email is free of viruses or other defects. If you have received this communication in error, you may not copy or distribute any part of it or otherwise disclose its contents to anyone. Please advise the sender of your incorrect receipt of this correspondence.
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net<http://udig.refractions.net/>
http://lists.refractions.net/mailman/listinfo/udig-devel


_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net<http://udig.refractions.net/>
http://lists.refractions.net/mailman/listinfo/udig-devel




--
Mark Leslie
Geospatial Software Architect
LISAsoft

-------------------------------------------------------------
Ph: +61 2 8570 5000 Fax: +61 2 8570 5099 Mob: +61
Suite 112, Jones Bay Wharf 19-21 Pirrama Rd Pyrmont NSW 2009
-------------------------------------------------------------

LISAsoft is part of the A2end Group of Companies
http://www.ardec.com.au<http://www.ardec.com.au/>
http://www.lisasoft.com<http://www.lisasoft.com/>
http://www.terrapages.com<http://www.terrapages.com/>




--_000_239F47EC52214373A597A048949686BDlisasoftcom_
Content-Type: text/html; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I was only considering this default ordering thing when *adding* a new layer.<div><br></div><div>basically drop it in from the top and let it "sink" until it hits something that stops it.</div><div><br></div><div>Consider the following base:</div><div><br></div><div>ggppllyyrr</div><div><br></div><div>Adding a P</div><div>ggPppllyyrr</div><div><br></div><div>Adding a L</div><div>ggppLllyyrr</div><div><br></div><div>Adding a Y</div><div>ggppllYyyrr</div><div><br></div><div>Adding a R</div><div>ggppllyyrrR</div><div><br></div><div>I also congratulate you on your use of ascii art; it has brightened my day.</div><div><br></div><div>For the move up / move down tools we are just fussing with zorder. If move to front and move to back don't make sense kill them as a bad idea.</div><div><br></div><div>Jody</div><div><br></div><div><div><div>On 15/02/2012, at 8:36 AM, Mark Leslie wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">So there are two examples that spring to mind that foil with the zorder tools we're looking at. &nbsp;To asciiify Naz's diagram, the normal case looks something like:<div><br></div><div><font class="Apple-style-span" face="'courier new', monospace">ggpppplllLllyyyyrrrrr</font></div>
<div><br></div><div>for g=mapgraphic, p=point, l=line, y=polygon, r=raster. &nbsp;Hitting move to top on the capital L leads to:</div><div><br></div><div><font class="Apple-style-span" face="'courier new', monospace">ggppppLlllllyyyyrrrrr</font></div>
<div><br></div><div>That makes sense. &nbsp;But the next two examples are less nice.</div><div><br></div><div>1 - <font class="Apple-style-span" face="'courier new', monospace">ggpplppllLlyyyyrrrr</font></div><div>2 - <font class="Apple-style-span" face="'courier new', monospace">ggppplllLlyypyyrrrr</font></div>
<div><br></div><div>Essentially, the described behaviour of moving the L line to the top of the lines breaks down in these cases. &nbsp;There are two ways to look at this, A. move L to be above the first line or B. move L to be below the last point.</div>
<div><br></div><div>1A -&nbsp;<span class="Apple-style-span" style="font-family:'courier new',monospace">ggppLlpplllyyyyrrrr</span></div><div>1B -&nbsp;<span class="Apple-style-span" style="font-family:'courier new',monospace">ggpplppLlllyyyyrrrr</span></div>
<div><font class="Apple-style-span" face="arial, helvetica, sans-serif">2A -&nbsp;</font><span class="Apple-style-span" style="font-family:'courier new',monospace">ggpppLllllyypyyrrrr</span></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif">2B -&nbsp;</font><span class="Apple-style-span" style="font-family:'courier new',monospace">ggpppllllyypLyyrrrr</span></div>
<div><br></div><div>I was thinking to do something that doesn't quite meet the description of the tool, and move the layer to the top of it's current, continuous block of like layers:</div><div><br></div><div><div>
1 -&nbsp;<font class="Apple-style-span" face="'courier new', monospace">ggpplppLlllyyyyrrrr</font></div><div>2 -&nbsp;<font class="Apple-style-span" face="'courier new', monospace">ggpppLllllyypyyrrrr</font></div><div>
<font class="Apple-style-span" face="arial, helvetica, sans-serif"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif">The downsides of that being the case where the selected layer is the outlier:</font></div>
<div><font class="Apple-style-span" face="arial, helvetica, sans-serif"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif">before - </font><font class="Apple-style-span" face="'courier new', monospace">ggppppllllyyLyyrrrr</font></div>
<div><font class="Apple-style-span" face="arial, helvetica, sans-serif">after - </font><font class="Apple-style-span" face="'courier new', monospace">ggppppllllyyLyyrrrr</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif"><br>
</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif">...and the difficulty in explaining what is happening in the tool tip.</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif"><br>
</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif">Thoughts?</font></div><div><div><br><div class="gmail_quote">On 14 February 2012 21:50, Jody Garnett <span dir="ltr">&lt;<a href="mailto:jody.garnett@xxxxxxxxx";>jody.garnett@xxxxxxxxx</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                <div>
                    Correct; that is basically the ordering which allows the "most" content to be visible.&nbsp;So when adding a new layer; it should sift down into the right spot by default.</div><div><br></div><div>
You are correct that people can mess with the zorder (i.e. drawing order) after the layer has been added; this natural ordering is an application of the uDig Guideline "Sensible default".</div>
                <div><div><br></div><div>--&nbsp;</div><div>Jody Garnett<br></div><div><br></div></div><div><div class="h5"><p style="color:#a0a0a8">On Tuesday, 14 February 2012 at 3:19 PM, Nazareno Chan wrote:</p>
                </div></div><blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px">
                    <span><div><div><div class="h5"><div>






<div>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Hi Guys,<u></u><u></u></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u>&nbsp;<u></u></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Just wanna clarify some details regarding the ‘natural sorting’ to be implemented on Legend View:<u></u><u></u></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u>&nbsp;<u></u></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><span>1.<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Is the diagram below correct regarding the natural ordering of layers?<u></u><u></u></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><span>2.<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Noting that using the Layers View, the user can rearrange the layers anyway they want, irregardless or natural ordering:<u></u><u></u></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">
<span style="font-size:11.0pt;font-family:Wingdings;color:#1f497d"><span>§<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;
</span></span></span><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">For example, moving a line layer to the front, do we look for the lowest point layer and move it below this? Or the highest line layer and move it
 above this? <u></u><u></u></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">
<span style="font-size:11.0pt;font-family:Wingdings;color:#1f497d"><span>§<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;
</span></span></span><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">If the lowest point layer was placed below the lines? Or the highest line layer above the points?<u></u><u></u></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u>&nbsp;<u></u></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><span>&lt;image002.png&gt;</span></span><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u><u></u></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u>&nbsp;<u></u></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Thanks,<u></u><u></u></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Naz Chan<u></u><u></u></span></div>
</div>
</div>
<br>
<hr>
<font face="Arial" color="Gray" size="1">The contents of this email are confidential and may be subject to legal or professional privilege and copyright. No representation is made that this email is free of viruses or other defects. If you have received this
 communication in error, you may not copy or distribute any part of it or otherwise disclose its contents to anyone. Please advise the sender of your incorrect receipt of this correspondence.<br>
</font>


</div></div></div><div><div>_______________________________________________</div><div>User-friendly Desktop Internet GIS (uDig)</div><div><a href="http://udig.refractions.net/"; target="_blank">http://udig.refractions.net</a></div>
<div><a href="http://lists.refractions.net/mailman/listinfo/udig-devel"; target="_blank">http://lists.refractions.net/mailman/listinfo/udig-devel</a></div></div></div></span>
                 
                 
                 
                 
                </blockquote>
                 
                <div>
                    <br>
                </div>
            <br>_______________________________________________<br>
User-friendly Desktop Internet GIS (uDig)<br>
<a href="http://udig.refractions.net/"; target="_blank">http://udig.refractions.net</a><br>
<a href="http://lists.refractions.net/mailman/listinfo/udig-devel"; target="_blank">http://lists.refractions.net/mailman/listinfo/udig-devel</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Mark Leslie<br>Geospatial Software Architect<br>LISAsoft<br><br>-------------------------------------------------------------<br>Ph: +61 2 8570 5000 Fax: +61 2 8570 5099 Mob: +61 <br>
Suite 112, Jones Bay Wharf 19-21 Pirrama Rd Pyrmont NSW 2009<br>-------------------------------------------------------------<br><br>LISAsoft is part of the A2end Group of Companies<br><a href="http://www.ardec.com.au/";>http://www.ardec.com.au</a><br>
<a href="http://www.lisasoft.com/";>http://www.lisasoft.com</a><br><a href="http://www.terrapages.com/";>http://www.terrapages.com</a><br><br><br>
</div></div></div>
</blockquote></div><br></div></body></html>
--_000_239F47EC52214373A597A048949686BDlisasoftcom_--


Back to the top