11381.patch
| new/rules/convert/proxy_programs.xml 2026-04-16 14:03:35 +0000 | ||
|---|---|---|
| 101 | 101 |
<worker class="com.goldencode.p2j.convert.ConverterHelper" namespace="help" /> |
| 102 | 102 |
<worker class="com.goldencode.p2j.schema.P2OAccessWorker" namespace="p2o" /> |
| 103 | 103 |
<worker class="com.goldencode.p2j.convert.NameConverterWorker" namespace="names" /> |
| 104 |
<worker class="com.goldencode.artifacts.ArtifactWorker" namespace="art" /> |
|
| 104 | 105 |
|
| 105 | 106 |
<init-rules> |
| 106 | 107 |
<rule>tw.load("convert/java_templates")</rule>
|
| ... | ... | |
| 170 | 171 | |
| 171 | 172 |
<rule> |
| 172 | 173 |
appObjectFile = sprintf("%s%s%s.proxy.jast",
|
| 173 |
srv.getProxyPackageFolder(artifact.getRelativePath()),
|
|
| 174 |
art.getPathToProjectFolder(srv.getProxyPackageFolder(artifact.getRelativePath())),
|
|
| 174 | 175 |
fileSep, |
| 175 | 176 |
appObjectName) |
| 176 | 177 |
</rule> |
| ... | ... | |
| 356 | 357 |
<!-- now emit the implementation class for this proxy, where everything related to it is emitted |
| 357 | 358 |
--> |
| 358 | 359 |
<action> |
| 359 |
fname = sprintf("%s%s%s.proxy.jast",
|
|
| 360 |
io.getParent(artifact.getRelativePath()),
|
|
| 360 |
fname = sprintf("%s%s%s.proxy.jast",
|
|
| 361 |
art.getPathToProjectFolder(io.getParent(artifact.getRelativePath())),
|
|
| 361 | 362 |
fileSep, |
| 362 | 363 |
proxyname) |
| 363 | 364 |
</action> |
| new/src/com/goldencode/artifacts/ArtifactManager.java 2026-04-16 12:51:35 +0000 | ||
|---|---|---|
| 665 | 665 |
String resolvedProgram = operation.resolve(file); |
| 666 | 666 |
if (resolvedProgram != null) |
| 667 | 667 |
{
|
| 668 |
String newRelativePath = getPathToProjectFolder(file, suffix);
|
|
| 668 |
String newRelativePath = getPathToProjectFolder(resolvedProgram, suffix);
|
|
| 669 | 669 |
Artifact newArtifact = addArtifact(newRelativePath); |
| 670 | 670 |
convertedArtifacts.add(newArtifact); |
| 671 | 671 |
} |
| ... | ... | |
| 702 | 702 |
String resolvedProgram = op.resolve(program); |
| 703 | 703 |
if (resolvedProgram != null) |
| 704 | 704 |
{
|
| 705 |
String absolutePath = absoluteFilename(program);
|
|
| 706 |
Artifact artifact = addArtifact(program, absolutePath);
|
|
| 705 |
String absolutePath = absoluteFilename(resolvedProgram);
|
|
| 706 |
Artifact artifact = addArtifact(resolvedProgram, absolutePath);
|
|
| 707 | 707 |
createdArtifacts.add(artifact); |
| 708 | 708 |
} |
| 709 | 709 |
} |
| new/src/com/goldencode/artifacts/ArtifactWorker.java 2026-04-16 13:56:27 +0000 | ||
|---|---|---|
| 92 | 92 |
* |
| 93 | 93 |
* @param filename |
| 94 | 94 |
* Absolute or current directory relative filename. |
| 95 |
* |
|
| 96 |
* @return The path of file inside project folder with no postfix. |
|
| 97 |
*/ |
|
| 98 |
public String getPathToProjectFolder(String filename) |
|
| 99 |
{
|
|
| 100 |
return getPathToProjectFolder(filename, ""); |
|
| 101 |
} |
|
| 102 |
|
|
| 103 |
/** |
|
| 104 |
* Get the path for a file inside project folder. |
|
| 105 |
* |
|
| 106 |
* @param filename |
|
| 107 |
* Absolute or current directory relative filename. |
|
| 95 | 108 |
* @param extension |
| 96 | 109 |
* Optional postfix to append to file name. |
| 97 | 110 |
* |
| new/src/com/goldencode/p2j/convert/ConversionDriver.java 2026-04-16 13:39:57 +0000 | ||
|---|---|---|
| 735 | 735 |
return cfg.getPkg() + "." + javaName; |
| 736 | 736 |
}; |
| 737 | 737 |
|
| 738 |
Set<String> allCvtFiles = new HashSet<>(); |
|
| 739 |
List<String> relativeNames = ArtifactManager.getArtifactsRelativePath(asts); |
|
| 740 |
for (String file : relativeNames) |
|
| 738 |
Set<String> allCvtFiles = new TreeSet<>(); |
|
| 739 |
for (Artifact artifact: asts.getArtifacts()) |
|
| 741 | 740 |
{
|
| 742 |
file = FileOperationsWorker.findFile(file, null);
|
|
| 741 |
String file = artifact.getRelativePath();
|
|
| 743 | 742 |
allCvtFiles.add(file); |
| 744 | 743 |
} |
| 745 |
allCvtFiles.addAll(relativeNames); |
|
| 746 | 744 |
|
| 747 | 745 |
// get the proxy config for each file |
| 748 | 746 |
Map<String, Integer> programCounter = new HashMap<>(); |
| ... | ... | |
| 759 | 757 |
String filename = lpcc.getFullName() + "." + lpcc.getProgExt(); |
| 760 | 758 |
String cvtFile = FileOperationsWorker.findFile(filename, null) + FileExtensions.AST_POSTFIX; |
| 761 | 759 |
cvtFile = ArtifactManager.getPathToProjectFolder(cvtFile); |
| 760 |
cvtFile = ArtifactManager.normalizeFilename(cvtFile); |
|
| 762 | 761 |
|
| 763 | 762 |
if (!allCvtFiles.contains(cvtFile)) |
| 764 | 763 |
{
|
| ... | ... | |
| 853 | 852 |
} |
| 854 | 853 |
} |
| 855 | 854 |
|
| 855 |
Collections.sort(proxyFiles); |
|
| 856 |
|
|
| 856 | 857 |
if (!proxyFiles.isEmpty()) |
| 857 | 858 |
{
|
| 858 | 859 |
ArtifactCollection proxyAsts = |
| new/src/com/goldencode/p2j/convert/GenerateLegacyProxyOpenClient.java 2026-04-16 11:36:49 +0000 | ||
|---|---|---|
| 197 | 197 |
{
|
| 198 | 198 |
Artifact a = proxyIter.next(); |
| 199 | 199 |
String cvtPath = ArtifactManager.getPathToProjectFolder(a, FileExtensions.AST_POSTFIX); |
| 200 |
cvtPath = ArtifactManager.normalizeFilename(cvtPath); |
|
| 200 | 201 |
if (astArtifact.getRelativePath().equals(cvtPath)) |
| 201 | 202 |
{
|
| 202 | 203 |
ok = true; |