Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [emf-dev] Tip for using the new 'galileo' flag for EclipseEMF/MDTPlan Queries

Sorry, I shouldn't have said "render"... what I meant to day was that the bug lists are all empty whereas if I take the same query and run it in a browser, I get the expected list back. So, it's similar to the problem that Christian said he had overcome, but even after making the same changes, I can't get my bugs to show up.

Cheers,

Kenn Hussey
Program Manager, Modeling and Design Solutions

Embarcadero Technologies, Inc. | www.embarcadero.com 
82 Peter Street, Second Floor | Toronto, ON  M5V 2G5
Kenn.Hussey@xxxxxxxxxxxxxxx
Mobile: 613-301-9105


-----Original Message-----
From: emf-dev-bounces@xxxxxxxxxxx [mailto:emf-dev-bounces@xxxxxxxxxxx] On Behalf Of Nick Boldt
Sent: Thursday, September 25, 2008 11:31 AM
To: Eclipse Modeling Framework
Cc: MDT developers; d_a_carver@xxxxxxxxx
Subject: Re: [emf-dev] Tip for using the new 'galileo' flag for EclipseEMF/MDTPlan Queries

Looking at the OCL plan, I see "anticipated OCL® 2.1 revised specification from the OMG(tm)"

This could be recoded like this, so it's more cross-platform:

anticipated OCL&#174; 2.1 revised specification from the OMG<sup>TM</sup>

Also, make sure that all your URLs have &amp; instead of &. For a quick 
'does this page render?' check, open it in Firefox. It'll tell you the 
line that's causing the problem and often point you to the error, too.

Nick

Kenn Hussey wrote:
>
> Thanks, Christian.
>
> I've applied similar changes to the draft plans for BPMN2 and IMM. 
> Note that I've moved my theme designations from the short description 
> field to the whiteboard field; this is more desirable, I think, 
> because the resulting plan won't show the theme redundantly as part of 
> the description for each plan item.
>
> Unfortunately, though, couldn't get my plan items to render properly, 
> even with your changes to url-encode.xsl (note that I think your 
> snippets include an extra comma character). Any ideas? Were other 
> changes perhaps required?
>
> Cheers,
>
> **
>
> *Kenn Hussey**
> **Program Manager, Modeling and Design Solutions*****
>
> *[Embarcadero Technologies Logo]* <http://www.embarcadero.com/>
>
> *Embarcadero Technologies, Inc. | **www.embarcadero.com* 
> <http://www.embarcadero.com/>* **
> **82 Peter Street, Second Floor | Toronto, ON M5V 2G5**
> **Kenn.Hussey@xxxxxxxxxxxxxxx* <mailto:Kenn.Hussey@xxxxxxxxxxxxxxx>
> *Mobile: 613-301-9105*
>
> *From:* emf-dev-bounces@xxxxxxxxxxx 
> [mailto:emf-dev-bounces@xxxxxxxxxxx] *On Behalf Of *Christian W. Damus
> *Sent:* Wednesday, September 24, 2008 9:59 PM
> *To:* MDT developers; Eclipse Modelling Framework
> *Cc:* d_a_carver@xxxxxxxxx
> *Subject:* [emf-dev] Tip for using the new 'galileo' flag for Eclipse 
> EMF/MDTPlan Queries
>
> Hi, all,
>
> As soon as I learned that Denis had bestowed on us a new 'galileo' 
> flag (bug 247191 [1]), naturally I ran off to bugzilla immediately to 
> apply it to my Plan Queries for OCL.
>
> Well, I had some trouble getting queries to work that search for 
> 'galileo+' (for committed or proposed items). The 'galileo-' flag for 
> deferred items was not a problem. I did overcome, though ... read on.
>
> The problem wasn't in testing queries in a browser. Just paste this 
> into your browser to see that it works:
>
> https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced&short_desc_type=casesubstring&short_desc=Extensibility&classification=Modeling&product=MDT&component=OCL&target_milestone=1.3.0&keywords_type=allwords&keywords=plan&field0-0-0=flagtypes.name&type0-0-0=equals&value0-0-0=galileo%2B 
> <https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced&short_desc_type=casesubstring&short_desc=Extensibility&classification=Modeling&product=MDT&component=OCL&target_milestone=1.3.0&keywords_type=allwords&keywords=plan&field0-0-0=flagtypes.name&type0-0-0=equals&value0-0-0=galileo%2B>
>
> The problem was in trying to get Dave Carver's XSL transformation (see 
> his excellent blog posting [2]) to execute the query. Naturally, the 
> ampersands need to be escaped as &amp; in the XML. That's OK. The 
> problem was in encoding the '+' modifier on the flag. On my first 
> attempt, doing this in the XML didn't return any results:
>
> <proposed
>
> bugzilla="https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced&amp;short_desc_type=casesubstring&amp;short_desc=%5BExtensibility%5D&amp;classification=Modeling&amp;product=MDT&amp;component=OCL&amp;target_milestone=1.3.0&amp;keywords_type=allwords&amp;keywords=plan&amp;field0-0-0=flagtypes.name&amp;type0-0-0=equals&amp;value0-0-0=galileo%2B 
> <https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced&amp;short_desc_type=casesubstring&amp;short_desc=%5BExtensibility%5D&amp;classification=Modeling&amp;product=MDT&amp;component=OCL&amp;target_milestone=1.3.0&amp;keywords_type=allwords&amp;keywords=plan&amp;field0-0-0=flagtypes.name&amp;type0-0-0=equals&amp;value0-0-0=galileo%2B>">
>
> </proposed>
>
> Substituting a literal '+' in the XML didn't help, because then 
> Bugzilla just ended up looking for a space instead of a '+' (the '+' 
> is a URL encoding for a space).
>
> The problem was, that the ingenious url-encode.xsl helper stylesheet 
> re-encoded the '%' symbol. Just adding the '%' to the 'safe' variable 
> declaration in the url-encode.xsl file fixed that:
>
> <xsl:variable 
> name="safe">%,+,[]&amp;=?/!'()*-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~</xsl:variable>
>
> The next problem was that the square brackets ('[' and ']') in my 
> search condition for the theme-in-summary scheme wouldn't work after 
> making this change, because the HTTP request sent by the XSLT ended up 
> converting them to the square brackets, which aren't valid characters 
> in a URL query string. At least, I think that's what happened. I 
> definitely got an error from the XSLT processor saying that the '[' 
> was invalid.
>
> The solution to this was to remove the '[' and ']' characters from the 
> 'safe' variable, so that finally I had:
>
> <xsl:variable 
> name="safe">%,+,&amp;=?/!'()*-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~</xsl:variable>
>
> and the HTML resulting from my queries is now just what I need.
>
> Questions for Dave C.:
>
>     * Do you anticipate any problems that these changes to the 'safe'
>       variable might cause?
>     * Is any of this applicable to the plan-rendering script that the
>       Eclipse website uses? Or, is it only relevant to your XSL? Will
>       my queries work with Eclipse's renderer? (I can't test it
>       because OCL is not yet recognized as a Project)
>     * Would you feel comfortable sharing these changes to the 'safe'
>       variable with the rest of the Eclipse projects?
>
> For a complete example of using the 'galileo' flag in your plan.xml, 
> see my OCL plan file in CVS:
>
> http://dev.eclipse.org/viewcvs/index.cgi/www/modeling/mdt/ocl/project-info/plan.xml?root=Eclipse_Website&view=markup 
> <http://dev.eclipse.org/viewcvs/index.cgi/www/modeling/mdt/ocl/project-info/plan.xml?root=Eclipse_Website&view=markup>
>
> Thanks, Dave, for this extremely helpful tooling that you developed!
>
> Cheers,
>
> Christian
>
> [1] https://bugs.eclipse.org/247191
>
> [2] 
> http://intellectualcramps.blogspot.com/2008/09/generating-eclipse-project-plan.html
>
> --
>
> Christian W. Damus
>
> Senior Software Developer, Zeligsoft Inc.
>
> Component Lead, Eclipse MDT OCL and EMF-QTV
>
> E-mail: cdamus@xxxxxxxxxxxxx <mailto:cdamus@xxxxxxxxxxxxx>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> emf-dev mailing list
> emf-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/emf-dev
>   

-- 
Nick Boldt :: Release Engineer, IBM Toronto Lab
Eclipse Modeling :: http://www.eclipse.org/modeling 
http://wiki.eclipse.org/index.php/User:Nickb

_______________________________________________
emf-dev mailing list
emf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/emf-dev


Back to the top