Proparse and include file

Project:Proparse Project
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

Hi,

I am using proparse to analyze my progress code. I currently use prparse.dll from c#. 5latest version downloaded from web site).

When I try to get the list of included files belonging to a program unit, proparse returns an empty string !

Where am I wrong ?

Here is some code :

RefactorSession prsession = RefactorSession.getInstance();

// Disable parser serialization.
prsession.setProjectBinariesEnabledOff();

prsession.loadProject(projectName);
org.prorefactor.refactor.settings.ProgressProjectSettings settings = prsession.getProgressSettings();

var f = new java.io.File(fileName);
ParseUnit pu = new ParseUnit(f);
try
{
pu.loadOrBuildPUB();
org.prorefactor.macrolevel.IncludeRef includeRef = pu.getMacroGraph();
Console.Write(" file Included " + includeRef.getFileRefName());

....

How do wwe get the full list of included modules in a progress unit ?

Thanks all !


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
john's picture

#1

Hi Bernard, you should be able to use ParseUnit.getFileIndex().

public java.lang.String[] getFileIndex()
Get the file index, either from the PUB file or from the parser, whichever was used to get the tree. The return is the array of file names. The file at index zero is always the compile unit. The others are include files. The array index position corresponds to JPNode.getFileIndex().


#2

Hi John,

Thanks for the reply, it works fine !
Exactly wthat I need!

Regards,

bernard