Setup the Sandbox Workspace
Environment used by CORGROUP LLC to launch COR•REC Sandbox.
Eclipse IDE RCP Version: 2024-09 (4.33.0) Build id: 20240905-0614, macOS 14.6,
Windows 11
SWT: version 3.127.0
Part A - Create Workspace
- Create a workspace. i.e: From within Eclipse IDE File menu --> Switch
Workspace >>
open... "correc-sandbox/correc-sandbox-workspace"
Part B - Workspace Setup
- Import the two plugins and one feature from the "sandbox-repository"
using Import >>
General >> Existing Projects into Workspace. If you are interested in creating a launch
configuration, you must at least import the package "com.corgroup.correc.sandbox."
- Set up the target.
Open the "com.corgroup.sandbox.target" found at
the root level of the
"com.corgroup.correc.sandbox" plugin.
- Select location $(correc.sandbox.target}/plugins
- Select Edit
- Select Variables
- Select Edit Variables
- Select New
- ⁃ Name: correc.sandbox.target
- ⁃ Value: Browse to location sandbox-target directory
- ⁃ Select Okay
- Select Apply and Close
- Select Cancel
- Select Finish (Make sure you haven't inadvertently added the variable to the
location twice)
- Select the Environment tab and establish that the values match your system.
- https://download.eclipse.org/eclipse/updates/4.33 is included as a target entry
but may be substituted.
- Select Update
- Save com.corgroup.sandbox.target
- Set as Active Target Platform
- Select Project Menu >> Clean and check Clean all projects.
You may notice in the Problems view two warnings pertaining to "adminStubbed" and
"logStubbed" these warnings will be referenced later.
- Create a launch configuration.You can find an overview of the launch
configuration used by CORGROUP in the "com.corgroup.correc.sandbox" file, specifically
under the name _Launch
Configuration. Getting the launch configuration correct can sometimes be challenging.
When problems occur, they are
typically due to a missing required plugin or an incompatible JRE.
- Select Run menu >> Run Configuration
- Right Click Select Eclipse Application >> New Configuration
- The Main tab should be selected.
- ⁃ Enter name: com.corgroup.correc.sandbox.product
- ⁃ Run as Product: com.corgroup.correc.sandbox.product
- ⁃ Java executable java
- ⁃ Execution environment JavaSE-17 or greater
- Select the Plug-ins tab.
- ⁃ Set Launch with: Plugins selected below
- ⁃ Select the button Deselect All
- ⁃ Select the two Workspace plug-ins: com.corgroup.correc.sandbox and
correc.plugin
- ⁃ Select the following plug-ins from the Target Platform.
- ⁃ com.corgroup.bmp
- ⁃ com.corgroup.bmp.client
- ⁃ com.corgroup.bmp.osgi.service
- ⁃ org.eclipse.http.registry
- ⁃ org.eclipse.equinox.http.jetty
- ⁃ Deselect Include optional dependencies when computing required
Plug-ins
- ⁃ Select button Select Required
- ⁃ Make sure that "org.eclipse.equinox.http.registry" was selected under
Target Platform
- ⁃ Select Apply
- ⁃ Select Run
Overview of the correc.plugin
MANIFEST.MF
- Overview tab.
- Activator: correc.plugin.Activator
- Version 1.0.0.qualifier
- Activate plugin when one of its classes is loaded - correc.plugin.Activator
- This plugin-in is a singleton
- JavaSE-17 [COR•REC embedds Java 17 - COR•REC requires Java 11]
- Dependencies
- - Require-Bundle:
- org.eclipse.ui
- org.eclipse.core.runtime
- org.eclipse.help
- com.corgroup.bmp
- com.corgroup.bmp.osgi.service
- Others
- Automatic-Module-Name: COR.REC.Plugin
- Bundle-ActivationPolicy: lazy
- Extensions
- com.corgroup.bmp.module
- com.corgroup.bmp.properties
- com.corgroup.bmp.update_site
- com.corgroup.bmp.intro
- com.corgroup.bmp.osgi.service
- org.eclipse.ui.commands
- org.eclipse.ui.handlers
- org.eclipse.ui.menus
- org.eclipse.ui.preferencePages
- org.eclipse.ui.views
- org.eclipse.ui.startup
- org.eclipse.help.toc
- org.eclipse.core.runtime.preferences
Extensions Overview
The correc.plugin contains all that is required to incorporate a plugin into the
COR•REC platform. Enough we believe so all you'll need to do is add your magic. There
are a few things about this plugin I believe need a little explaining. Not that you couldn't
quickly discern how it functions. The main capabilities of the correc.plugin are managed primarily using
extensions but some classes have been added to aid in understanding the flow. Each extension
contains a description file.
com.corgroup.bmp.module
Place a button on the Action Card.
Placing a button on the Action Card that when selected invokes
correc.plugin.extensions.PluginExtensionModule.run()
org.eclipse.ui.menus, org.eclipse.ui.command, org.eclipse.ui.handlers
Place a workspace menu item in the Workspace menu that contains a sub menu with selectable
menu items. Selecting the submenu item invokes an org.eclipse.ui.commands
Place an Aspect menu item in the Aspects menu that contains a sub menu with selectable menu
items. Selecting the sub menu item will place correc.plugin.gui.View in an open workspace.
The placing of the view in an open workspace is for example purposes only, you are welcome
to
do whatever.
org.eclipse.help.toc
Add a help topic with sub-topics to Help. Help topics require files located in the plugin's
root
level, html folder, and css folder. Help is accessed through the Help menu -> Help Content
menu item.
com.corgroup.bmp.update_site
Add an Update Site entry to the Administrators view Update Site tab. This sandbox is
cannot access the Administrator Update Tab. Rest assured that any plugin implementing
com.corgroup.bmp.update_site extension will have its URI location added to the listed update
sites.
com.corgroup.bmp.properties
Add a properties file as a ResourceBundle. Reading in a properties file to create a
ResourceBundle may be required for translation purposes before a plugin is activated. At
minimum titling a button on the Action Card will take place well before activating a module
type
plugin.
The properties file must be and is placed in the source(src) folder. The FILE_NAME attribute
of the extension is the file's simple name excluding the locale designator and the appended
.properties. The FQCN attribute has to point to a class file within the same source folder
but may reside in any package. Do not include the package name. The FQCN value is used to
help
locate the .properties file.
com.corgroup.bmp.intro
Used to place a button and tab into the Welcome view. The welcome view is made available as a
Help menu item when the COR•REC Platform workspace is selected.
com.corgroup.bmp.osgi.service
COR•REC shared services are managed using this extension. The element attribute
"service_id" would normally point to a service contained in another plugin. The plugin may
be
from any developer electing to implement com.corgroup.bmp.osgi.service. The service_id is
supplied by the service provider. In this example, the
"com.corgroup.bms.accounting.ar#ACCOUNTS"
is used. Services provided by CORGROUP LLC COR•REC plugins are documented within their
help
topic.
Exporting/Testing
You may easily test this plugin/feature by exporting the correc.plugin.feature.
- Right-click/select correc.plugin.feature
- Select Export
- Select Plug-in Development
- Select Deployable features
- From the Destination Tab:
- Set the destination directory. This directory will hold the exported repository.
- From the Options Tab:
- Select package as individual JAR archive
- Select Generate p2 repository
- Select Categorize repository by browsing for
"correc.plugin.feature/category.xml"
- Select Allow for binary cycles in target platform
- Finish
You may now install the feature into an activated COR•REC application.
- Select "Install New Software"
- Enter the URL of the exported repository
- Select the lookup button
- Select COR•REC Plugin
- Select the Unsigned Feature
- Select "Trust Selected" unless you have signed your plugin this is required.
The feature will be installed. Restart COR•REC to complete the installation.
Remember to uninstall software before re-installing even when
replacing a COR•REC Application. Not doing so will produce redundant repository
listings.