Skip to content

Configurable directories for plugins and OCL extensions (#20)#136

Open
cansin wants to merge 3 commits into
useocl:mainfrom
cansin:issue-20-configurable-dirs
Open

Configurable directories for plugins and OCL extensions (#20)#136
cansin wants to merge 3 commits into
useocl:mainfrom
cansin:issue-20-configurable-dirs

Conversation

@cansin

@cansin cansin commented Jun 9, 2026

Copy link
Copy Markdown

Summary

Fixes #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 (unit tests, integration
tests, …) 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.processArgs parses -pluginDir and -extensionsDir into
    Options.pluginDir / Options.oclExtensionsDir. The home-relative defaults are
    applied only when the argument is not given, so behavior is unchanged when the
    new arguments are absent.
  • The Swing (MainSwing) and JavaFX (JavaFXAppLauncher) launchers now read the
    configured OCL extensions directory from Options.oclExtensionsDir instead of
    recomputing <home>/oclextensions. Plugins were already loaded from
    Options.pluginDir.
  • use -h documents both new arguments.

Backward compatibility

With neither argument given, -pluginDir defaults to <home>/lib/plugins and
-extensionsDir to <home>/oclextensions — identical to the previous behavior.

Testing

  • New OptionsDirectoryArgsTest (use-core) verifies the defaults and that each
    directory can be overridden independently of -H.
  • use-core tests and the use-gui ShellIT integration suite (129 tests) pass.
  • Manual end-to-end check: running USE headless with
    -extensionsDir=/tmp/X -pluginDir=/tmp/Y makes the extension and plugin loaders
    report those exact paths, confirming the overrides take effect.

Possible follow-up (not in this PR)

The ShellIT workaround referenced in the issue (needing an empty
use-core/.../lib/plugins) can now be simplified by passing -pluginDir at a
temporary empty directory. Left out here to keep the PR focused.

…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
@cansin cansin changed the title Configurable directories for plugins and OCL extensions (resolves #20) Configurable directories for plugins and OCL extensions (#20) Jun 9, 2026
claude added 2 commits June 9, 2026 06:32
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
@cansin cansin force-pushed the issue-20-configurable-dirs branch from ae4ad37 to 4d79f41 Compare June 9, 2026 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Configurable directories for plugins and extensions

2 participants