Having been reminded of Organize Using by a session at PCA, I thought I would give it a try in some code I am working on that uses Proparse, i.e., it has assemblies. When I did Organize Using, all the references to the Proparse components went away! I had picked Group All, Sort alphabetically, Qualified Type Names, and from Assembly/Propath. I did not have Preserve valid checked because one of the points of trying to use it was that it would eliminate unused ones.
Seems anti-useful.
11.5
Having been reminded of Organize Using by a session at PCA, I thought I would give it a try in some code I am working on that uses Proparse, i.e., it has assemblies. When I did Organize Using, all the references to the Proparse components went away! I had picked Group All, Sort alphabetically, Qualified Type Names, and from Assembly/Propath. I did not have Preserve valid checked because one of the points of trying to use it was that it would eliminate unused ones.
Seems anti-useful.
11.5
Flag this post as spam/abuse.
Before:
using Progress.Lang.*.
using com.cintegrity.Proparse.SetEnvironment.
using com.cintegrity.Proparse.SetSchemaFromFile.
using com.joanju.proparse.NodeTypes from assembly.
using com.joanju.proparse.ProParserTokenTypes from assembly.
using org.prorefactor.core.JPNode from assembly.
using org.prorefactor.core.TreeUtils from assembly.
using org.prorefactor.treeparser.ParseUnit from assembly.
using org.prorefactor.treeparser.Symbol from assembly.
After:
using Progress.Lang.AppError from propath.
using com.cintegrity.Proparse.SetEnvironment from propath.
using com.cintegrity.Proparse.SetSchemaFromFile from propath.
Thank goodness for Ctrl-Z
My "ranting" here is an effort to get a handle on whether this is generally a problem or whether it might be specific to Proparse or IKVM.
I've had Organize Using add USINGs that didn't apply as well.
My practice has been to delete them as they've been generally harmless.
On Sat, Jun 13, 2015 at 3:40 PM, Thomas Mercer-Hursh
wrote:
> RE: Organize Using
> Reply by Thomas Mercer-Hursh
>
> Before:
>
> using Progress.Lang.*.
>
> using com.cintegrity.Proparse.SetEnvironment.
>
> using com.cintegrity.Proparse.SetSchemaFromFile.
>
> using com.joanju.proparse.NodeTypes from assembly.
>
> using com.joanju.proparse.ProParserTokenTypes from assembly.
>
> using org.prorefactor.core.JPNode from assembly.
>
> using org.prorefactor.core.TreeUtils from assembly.
>
> using org.prorefactor.treeparser.ParseUnit from assembly.
>
> using org.prorefactor.treeparser.Symbol from assembly.
>
> After:
>
> using Progress.Lang.AppError from propath.
>
> using com.cintegrity.Proparse.SetEnvironment from propath.
>
> using com.cintegrity.Proparse.SetSchemaFromFile from propath.
>
> Thank goodness for Ctrl-Z
>
> My "ranting" here is an effort to get a handle on whether this is generally
> a problem or whether it might be specific to Proparse or IKVM.
>
> Stop receiving emails on this subject.
>
> Flag this post as spam/abuse.
--
Tim Kuehn: Senior Consultant - TDK Consulting Services
President - Ontario PUG
Program Committee Chair - PUG Challenge Americas,
Course Instructor: Intro to OO Concepts for Procedural Programmers
Skype: timothy.kuehn
Ph: 519-576-8100
Cell: 519-781-0081
So you are saying it removed USING’s that are needed by your code? How does that code look like?
Correct, it removed all usings related to Proparse.
Code includes things like:
mobJavaFile = new java.io.File(mchFullPath). obParseUnit = new ParseUnit(mobJavaFile). obParseUnit:treeParser01(). mobNode = obParseUnit:getTopNode(). and define variable mobSymbol as class Symbol no-undo. if NodeTypes:getTypeName(ipobNode:getType()) = "ID" then mobSymbol = ipobNode:getSymbol(). put stream stOutput unformatted skip fill(" ",inCurrentIndent) NodeTypes:getTypeName(ipobNode:getType()) " " ipobNode:getText() . if lgShowProparseDirectives then put stream stOutput unformatted " " ipobNode:attrGetS("proparsedirective":U). if lgShowSourceLineNo or lgShowColumn then put stream stOutput unformatted " " string(ipobNode:getLine()). if lgShowColumn then put stream stOutput unformatted ":" string(ipobNode:getLine()). if lgShowSourceFileName then put stream stOutput unformatted " " ipobNode:getFilename(). if lgShowTableType then put stream stOutput unformatted " " ipobNode:attrGetS("storetype":U). if lgShowStatementHeadFlag and ipobNode:isStateHead() then put stream stOutput unformatted " statehead". if lgShowSecondaryKeyword then put stream stOutput unformatted " " ipobNode:getState2(). if lgShowSymbols and NodeTypes:getTypeName(ipobNode:getType()) = "ID" and valid-object(mobSymbol) then put stream stOutput unformatted " Reads: " mobSymbol:getNumReads() " Writes: " mobSymbol:getNumWrites().
Correct, it removed all usings related to Proparse.
Code includes things like:
mobJavaFile = new java.io.File(mchFullPath).
obParseUnit = new ParseUnit(mobJavaFile).
obParseUnit:treeParser01().
mobNode = obParseUnit:getTopNode().
and
define variable mobSymbol as class Symbol no-undo.
if NodeTypes:getTypeName(ipobNode:getType()) = "ID"
then mobSymbol = ipobNode:getSymbol().
put stream stOutput unformatted
skip
fill(" ",inCurrentIndent)
NodeTypes:getTypeName(ipobNode:getType())
" "
ipobNode:getText()
.
if lgShowProparseDirectives then put stream stOutput unformatted " " ipobNode:attrGetS("proparsedirective":U).
if lgShowSourceLineNo or lgShowColumn then put stream stOutput unformatted " " string(ipobNode:getLine()).
if lgShowColumn then put stream stOutput unformatted ":" string(ipobNode:getLine()).
if lgShowSourceFileName then put stream stOutput unformatted " " ipobNode:getFilename().
if lgShowTableType then put stream stOutput unformatted " " ipobNode:attrGetS("storetype":U).
if lgShowStatementHeadFlag and ipobNode:isStateHead() then put stream stOutput unformatted " statehead".
if lgShowSecondaryKeyword then put stream stOutput unformatted " " ipobNode:getState2().
if lgShowSymbols and NodeTypes:getTypeName(ipobNode:getType()) = "ID" and valid-object(mobSymbol)
then put stream stOutput unformatted " Reads: " mobSymbol:getNumReads() " Writes: " mobSymbol:getNumWrites().
Flag this post as spam/abuse.
Case opened
Bug recognized as PSC00335347
Question: Does Organize Using work generally for .NET classes or is it broken for anything outside of ABL? If it works for .NET generally, then I am wondering if the the issue was that the .NET classes I was working with were created with IKVD.
Tim, did you report the cases where you got spurious usings?
A tool like this is immensely less useful if one can't trust it.
I've been running 11.5 and 11.5.1 and haven't had problems with the
tool dragging inappropriate USINGs in.
On Thu, Jul 16, 2015 at 5:24 PM, Thomas Mercer-Hursh
wrote:
> RE: Organize Using
> Reply by Thomas Mercer-Hursh
>
> Question: Does Organize Using work generally for .NET classes or is it
> broken for anything outside of ABL? If it works for .NET generally, then I
> am wondering if the the issue was that the .NET classes I was working with
> were created with IKVD.
>
> Tim, did you report the cases where you got spurious usings?
>
> A tool like this is immensely less useful if one can't trust it.
>
> Stop receiving emails on this subject.
>
> Flag this post as spam/abuse.
--
Tim Kuehn: Senior Consultant - TDK Consulting Services
President - Ontario PUG
Program Committee Chair - PUG Challenge Americas,
Course Instructor: Intro to OO Concepts for Procedural Programmers
Skype: timothy.kuehn
Ph: 519-576-8100
Cell: 519-781-0081
So, maybe just earlier versions?
11.3 at least, maybe 11.4.
On Thu, Jul 16, 2015 at 5:45 PM, Thomas Mercer-Hursh
wrote:
> RE: Organize Using
> Reply by Thomas Mercer-Hursh
>
> So, maybe just earlier versions?
>
> Stop receiving emails on this subject.
>
> Flag this post as spam/abuse.
--
Tim Kuehn: Senior Consultant - TDK Consulting Services
President - Ontario PUG
Program Committee Chair - PUG Challenge Americas,
Course Instructor: Intro to OO Concepts for Procedural Programmers
Skype: timothy.kuehn
Ph: 519-576-8100
Cell: 519-781-0081
Flag this post as spam/abuse.
In that case it must've been the class lookup / add USING
package.class. functionality that was causing the problem because I
know I haven't seen the issue in 11.5.
On Thu, Jul 16, 2015 at 11:23 PM, Mike Fechner
wrote:
> AW: Organize Using
> Reply by Mike Fechner
> The feature was not yet available in 11.3
>
> Von meinem Windows Phone gesendet
> ________________________________
> Von: Tim Kuehn
> Gesendet: 17.07.2015 00:24
> An: TU.OE.Development@community.progress.com
> Betreff: Re: [Technical Users - OE Development] Organize Using
>
> Re: Organize Using
> Reply by Tim Kuehn
> 11.3 at least, maybe 11.4.
>
> On Thu, Jul 16, 2015 at 5:45 PM, Thomas Mercer-Hursh
> wrote:
>> RE: Organize Using
>> Reply by Thomas Mercer-Hursh
>>
>> So, maybe just earlier versions?
>>
>> Stop receiving emails on this subject.
>>
>> Flag this post as spam/abuse.
>
>
>
> --
> Tim Kuehn: Senior Consultant - TDK Consulting Services
> President - Ontario PUG
> Program Committee Chair - PUG Challenge Americas,
> Course Instructor: Intro to OO Concepts for Procedural Programmers
>
> Skype: timothy.kuehn
> Ph: 519-576-8100
> Cell: 519-781-0081
> Stop receiving emails on this subject.
>
> Flag this post as spam/abuse.
>
> Stop receiving emails on this subject.
>
> Flag this post as spam/abuse.
--
Tim Kuehn: Senior Consultant - TDK Consulting Services
President - Ontario PUG
Program Committee Chair - PUG Challenge Americas,
Course Instructor: Intro to OO Concepts for Procedural Programmers
Skype: timothy.kuehn
Ph: 519-576-8100
Cell: 519-781-0081
Flag this post as spam/abuse.
One I saw repeatedly was an OE "string" USING being added with no
corresponding reference in the code.
Unless it was confusing STRING(IntegerVar) with a OE.Something.String.
On Fri, Jul 17, 2015 at 8:59 AM, Peter Judge
wrote:
> RE: AW: Organize Using
> Reply by Peter Judge
> There are a few niggles I've found that I'm sharing as gotchas.
> Specifically, if you use the ABL GUID function, a USING System.Guid is added
> without prompting you for a choice (logged as PSC00325274). In general, I've
> seen issues where there are classes that match ABL keywords.
>
>
>[collapse] From: Tim Kuehn [mailto:bounce-timk519@community.progress.com]
> Sent: Thursday, 16 July, 2015 23:33
> To: TU.OE.Development@community.progress.com
> Subject: Re: [Technical Users - OE Development] AW: Organize Using
>
> Re: AW: Organize Using
> Reply by Tim Kuehn
> In that case it must've been the class lookup / add USING
> package.class. functionality that was causing the problem because I
> know I haven't seen the issue in 11.5.
>
> On Thu, Jul 16, 2015 at 11:23 PM, Mike Fechner
> wrote:
>> AW: Organize Using
>> Reply by Mike Fechner
>> The feature was not yet available in 11.3
>>
>> Von meinem Windows Phone gesendet
>> ________________________________
>> Von: Tim Kuehn
>> Gesendet: 17.07.2015 00:24
>> An: TU.OE.Development@community.progress.com
>> Betreff: Re: [Technical Users - OE Development] Organize Using
>>
>> Re: Organize Using
>> Reply by Tim Kuehn
>> 11.3 at least, maybe 11.4.
>>
>> On Thu, Jul 16, 2015 at 5:45 PM, Thomas Mercer-Hursh
>> wrote:
>>> RE: Organize Using
>>> Reply by Thomas Mercer-Hursh
>>>
>>> So, maybe just earlier versions?
>>>
>>> Stop receiving emails on this subject.
>>>
>>> Flag this post as spam/abuse.
>>
>>
>>
>> --
>> Tim Kuehn: Senior Consultant - TDK Consulting Services
>> President - Ontario PUG
>> Program Committee Chair - PUG Challenge Americas,
>> Course Instructor: Intro to OO Concepts for Procedural Programmers
>>
>> Skype: timothy.kuehn
>> Ph: 519-576-8100
>> Cell: 519-781-0081
>> Stop receiving emails on this subject.
>>
>> Flag this post as spam/abuse.
>>
>> Stop receiving emails on this subject.
>>
>> Flag this post as spam/abuse.
>
>
>
> --
> Tim Kuehn: Senior Consultant - TDK Consulting Services
> President - Ontario PUG
> Program Committee Chair - PUG Challenge Americas,
> Course Instructor: Intro to OO Concepts for Procedural Programmers
>
> Skype: timothy.kuehn
> Ph: 519-576-8100
> Cell: 519-781-0081
> Stop receiving emails on this subject.
>
> Flag this post as spam/abuse.
>
> Stop receiving emails on this subject.
>
> Flag this post as spam/abuse.
--
Tim Kuehn: Senior Consultant - TDK Consulting Services
President - Ontario PUG
Program Committee Chair - PUG Challenge Americas,
Course Instructor: Intro to OO Concepts for Procedural Programmers
Skype: timothy.kuehn
Ph: 519-576-8100
Cell: 519-781-0081[/collapse]
Flag this post as spam/abuse.
Other issues in this area:
-> More variations on the theme where code tokens match a class name
-> Things go wrong if .NET classes with members of a Generic type are used
knowledgebase.progress.com/.../000056232
-> things go wrong when include files are involved.
So, Peter, your impression is that mostly it works, but has a few burps where it adds USING statements that are unnecessary and inappropriate? Including references to .NET assemblies? I.e., my problem of having all appropriate USINGs for .NET assemblies built with IKVD disappear is an isolated problem?
I am trying to help out the support engineer by defining a box.
So, Peter, your impression is that mostly it works, but has a few burps where it adds USING statements that are unnecessary and inappropriate? Including references to .NET assemblies? I.e., my problem of having all appropriate USINGs for .NET assemblies built with IKVD disappear is an isolated problem?
I am trying to help out the support engineer by defining a box.
Flag this post as spam/abuse.
Post and thread referenced. I would say there are two very different issues. One is that it is finding keywords that could be classes, but aren't and failing to recognize that they are, it creates a USING. The other, my case, is that for some reason it is having a problem finding the referenced class and so failing to create (or even preserve) a USING when on its needed. Both seem to be failures of the syntax analysis - the one failing to notice that something is not an external class and the other failing to make the connection, even though the compiler does just fine.
Per Luciano in tech support:
We have two defects filed one is PSC00335347 and another one is PSC00325274 - both of them PSC Dev are working on.
Specifically,
PSC00335347 - Organize using is causing all Proparse usings to disappear.
PSC00325274 - Organize USINGs for ABL guid function adds System.Guid - USING System.Guid.
Per tech support
The fix for this issue is expected to be in the upcoming release OpenEdge 11.6. As of 04 August 2015, release 11.6 is scheduled to be released in Q4 2015, although dates and content of the release are subject to change.
Also
Article Number 000062471
Summary Organizing USING Statements make ABL code disappear in Progress Developer Studio for OpenEdge.