Thanks for help!
I think you wrote about FileNodeWorker.java file and this piece of code:
JBProject jbProject = (JBProject) project;
....
PathSet mavenLibrary = projectPathSet.getLibrary("MavenAutoUpdated");
....
mavenLibrary.setClassPath(mavenDependencies);
mavenLibrary.setUrl(new Url(mavenLibraryFile));
mavenLibrary.save();
projectPathSet.reloadLibraries();
but i think this isn't exactly what i'm looking for... (or more
probably, i don't know how to use it properly)
I should describe current code implementation i'm working with. In
JBuilder project i've got some libraries (they can be seen in Project ->
Properties -> Required Libraries tab). There is one library (e.g called
"dynamic") which can be changed for some reason - sometimes new jars are
added - using code like this (i have no JBuilder here, so this is
overview only):
PathSet dynamic = projectPathSet.getLibrary("dynamic");
.... jars array preparation ... dynamic.setClassPath(newJarUrlsArray[]); dynamic.save();
after this Project -> Properties -> ClassPath tab (if i understand
correctly it contains jars from all libraries) - doesn't contains new
jars. But when i look in "dynamic" library contents (Required Libraries
-> "dynamic" "Edit" i can see new jars) and if i click "OK" button
without any changes in library edit window, ClassPath will be updated
and i can see new jars in it - code using new jars is compilable then.
I tried projectPathSet.reloadLibraries(); after dynamic.save(); but the
problem still existed (ClassPath wasn't updated).
I wrote code using PathSetCollection - unfortunately OpenTools API
doesn't contain doc about this class (why?), so i can't remember exactly
what i did. But i can can describe it... i removed "dynamic" from
PathSetCollection and added it again after changes. And it works. I
think this isn't good solution. :/
Is any better solution for this?
Sorry for my english, i hope you can understand me clearly.
--
Greetings
Krystian