Proparse discussion


Debugging

When Proparse gives us a line and a token, it is pretty easy to figure out what construct is bothering it. We can then set that code aside or edit it to eliminate the problem and put the problematic token in your queue for eventual enhancement.

The problem we are having is that we are running into a significant number of cases in the UK code base where we get a ProRefactorException
or a java.lang.NullPointerException and no line number and no token. I


Changing and building Proparse

- Installed Eclipse "Standard"
- SVN checkout proparse
- Import project directory into Eclipse. Lots of errors and warnings.
- Copied /lib from Proparse.Java install to root dir of proparse svn checkout directory, refreshed project. No errors.
- Navigate to /org.prorefactor.core/src/org/prorefactor/core/unittest/AllPRCoreTests.java, right mouse click, Run As -> JUnit Test. No errors.

If changing grammar files (.g), we need to be able to run the Antlr parser-generator:


What about nested includes?

If one has nested includes, is getFileIndex going to return all of them or just the top level? If all, is there any mechanism for getting the levels?

Or, is this another case of having to parse the LISTING?


Include file arguments

Would I be correct in assuming that, if I wanted to capture include file arguments, I would need to process the output of COMPILE LISTING rather than getting anything from Proparse?


metaschema last?

In your sample setup for Proparse scripting, you dump the schemas for any attached database and then dump the metaschema last. Any reason for putting it last?


Does Proparse know about index usage?

Or is one going to have to parse Compile XREF output for that?


IS an IP local?

I recognize that if an IP is not in the current compile unit and isn't run in a handle, that it can be difficult determining where it is. Even run in a handle it could be tricky determining where it is because the handle could be passed in to the compile unit. But, is there any reasonably easy way of determining that an IP *is* local so that one can take those out of the pool of what needs to be resolved?


Setup

In proparse/setup/setup.p and associated programs you create instances of
com.joanju.proparse.Environment
org.prorefactor.core.schema.Schema
org.prorefactor.refactor.RefactorSession
references to which are not passed anywhere. Each appears to be static
in that you obtain the reference via getInstance() rather than newing
it. Am I correct that this is just "priming the pump" to create a
reference base which the rest of the Proparse objects refer and that it
is OK for these to persist?

Right now, I am starting a new AVM for each trial so I am always


Includes - actual reference

At the end of the Recent Q&A topic there is some code for listing the include files in a CU. This is returning full path names. I know we can walk through the PROPATH and find a match for the begining of the full path name ... and that should be good enough for most cases, but I'm wondering about cases like AutoEdge where they have a PROPATH which includes both A/B and A/B/C. How would one know if the actual include reference was C/x.i or just x.i?


Recent Q & A

Here's some recent questions from Thomas and answers from me which I'd like to share here.

> There are references to classes which are clearly not there in the ABL,
> so I presume these are in the assemblies? What kind of documentation is
> there for those ... other than downloading the Java code and reading it?
>
> Do you have a recommendation for where I should look to understand how
> the various pieces work and what capabilities there are? Is ProLint a
> good source of examples ... or is it significantly incomplete relative
> to what you have built in to the tools?
>


Syndicate content