Configurable directories for plugins and OCL extensions (#20)#136
Open
cansin wants to merge 3 commits into
Open
Configurable directories for plugins and OCL extensions (#20)#136cansin wants to merge 3 commits into
cansin wants to merge 3 commits into
Conversation
…eocl#20) USE resolved the plugin directory and the OCL extensions directory from fixed locations under the home directory (<home>/lib/plugins and <home>/oclextensions). This forced every environment (e.g. unit and integration tests) to mirror that layout. Add two startup arguments to override these directories independently: -pluginDir=<path> (default: <home>/lib/plugins) -extensionsDir=<path> (default: <home>/oclextensions) Options.processArgs parses the new arguments and only falls back to the home-relative defaults when they are not given, so existing behavior is unchanged. The Swing and JavaFX launchers now read the configured OCL extensions directory (Options.oclExtensionsDir) instead of recomputing <home>/oclextensions. Add OptionsDirectoryArgsTest covering the defaults and the independent overrides. https://claude.ai/code/session_01A85dAvTAvi2oWkGZH6REEq
Add @author Cansin Yildiz and @author Claude to the files added in this branch, and update the copyright year to 1999-2026. Co-authored-by: Claude <noreply@anthropic.com> https://claude.ai/code/session_01A85dAvTAvi2oWkGZH6REEq
ae4ad37 to
4d79f41
Compare
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.
Summary
Fixes #20.
USE resolved the plugin directory and the OCL extensions directory from fixed
locations under the home directory (
<home>/lib/pluginsand<home>/oclextensions). This forced every environment (unit tests, integrationtests, …) to be aligned to that fixed layout.
This PR adds two startup arguments to override these directories independently:
-pluginDir=<path>— directory to load plugins from (default:<home>/lib/plugins)-extensionsDir=<path>— directory to load OCL extensions from (default:<home>/oclextensions)Changes
Options.processArgsparses-pluginDirand-extensionsDirintoOptions.pluginDir/Options.oclExtensionsDir. The home-relative defaults areapplied only when the argument is not given, so behavior is unchanged when the
new arguments are absent.
MainSwing) and JavaFX (JavaFXAppLauncher) launchers now read theconfigured OCL extensions directory from
Options.oclExtensionsDirinstead ofrecomputing
<home>/oclextensions. Plugins were already loaded fromOptions.pluginDir.use -hdocuments both new arguments.Backward compatibility
With neither argument given,
-pluginDirdefaults to<home>/lib/pluginsand-extensionsDirto<home>/oclextensions— identical to the previous behavior.Testing
OptionsDirectoryArgsTest(use-core) verifies the defaults and that eachdirectory can be overridden independently of
-H.use-coretests and theuse-guiShellITintegration suite (129 tests) pass.-extensionsDir=/tmp/X -pluginDir=/tmp/Ymakes the extension and plugin loadersreport those exact paths, confirming the overrides take effect.
Possible follow-up (not in this PR)
The
ShellITworkaround referenced in the issue (needing an emptyuse-core/.../lib/plugins) can now be simplified by passing-pluginDirat atemporary empty directory. Left out here to keep the PR focused.