Repository navigation
Document what sets the package and path of generated Java - #2
Merged
sergej-koscejev merged 1 commit intoOct 1, 2026
Merged
sergej-koscejev merged 1 commit into
sergej-koscejev merged 1 commit into
Conversation
Classifier.packageName drives both the package statement and the output directory through two independent code paths; when empty, both fall back to the model long name. Covers virtualPackage (not read by textgen), package recovery by JavaParser and JavaToMpsConverter, and the generate into model folder case. Verified from source on 252.23892, 261.25134 and 262.9437. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
docs/generated-java-package-and-path.md, answering: what decides thepackagestatement and output directoryof a generated BaseLanguage classifier, which property a programmatic caller must set, and whether
virtualPackageis that property.
Classifier.packageNamedrives both, via two independent paths (textgen header vs.TextUnit.getFilePath()+TextGen_Facet). When empty, both fall back to the model long name, not the default package.virtualPackageis a logical-view property; no textgen code reads it.JavaParserrecovers the package but never setspackageName;JavaToMpsConvertercarries it only inmodule-target mode, by model name.
diverge from the package for single-file models.
Versions: verified from source on 252.23892 (
0f12866f47e7), 261.25134 (499c4a0fe6bf) and 262.9437(
060a56244647); decisive methods are identical across all three. JAR locations checked against an MPS 2025.3distribution.
Evidence: source-verified; no runtime probe. The silent overwrite of two same-named roots sharing a
packageNameis marked Inferred, and non-BaseLanguage textgen is listed as Unresolved.