[Uml-devel] branches/KDE/3.5/kdesdk/umbrello
JP Fournier
jfournier121 at rogers.com
Mon Aug 7 00:08:07 UTC 2006
Oliver Kellogg wrote:
> JP Fournier wrote:
>
>>[...]
>>Will the patch below work as is? Unless I'm misunderstanding things,
>>m_parseDepth and m_FilesAlreadyParsed are not static, which I think
>>means that when we spawn off another instance of JavaImport to
>>resolve any other types we run into, we get a new empty instances
>>of these member vars, so we'll reparse files we already parsed
>
>
> You're right concerning m_parseDepth - it should only be reset in the
> JavaImport constructor but not in initVars() because the initVars()
> is called by NativeImportBase::parseFiles() for each imported file,
> and I corrected that in commit 570472.
>
> OTOH, a JavaImport instance is created only each time the user
> chooses the Import Code menubutton (see uml.cpp:1396 ff.)
Actually this is no longer the case (see the JavaImport::spawnImport
method). If these vars aren't static, then we can run into the problem
with infinite loops and reparsing the same files over and over. Right
now, I can't think of another solution, though there surely is one...
jp
> so IMHO the life time of the m_FilesAlreadyParsed is okay as is.
>
> Thanks again for contributing
>
> Oliver
More information about the umbrello-devel
mailing list