-
Notifications
You must be signed in to change notification settings - Fork 3
Home
Hybris Impex Editor adds support to Impex language by providing features like:
- Syntax highlighting
- Autocompletion
- [Discovery of data model change] (#discovery-of-data-model-change)
- Select Help > Eclipse Marketplace...
- In the search box enter the keyword "hybris" and choose hybris Impex editor v1.5.5 and click Install
- Select Help > Install New Software...
- In the Add Site dialog, enter http://eljoujat.github.io/updates
- Place a check mark next to Impex, confirm that the sub-components are all checked, and click Install.
- Go to https://github.com/eljoujat/eclipseimpexeditor/releases
- Fetch all the latest release jar files
- Put the file into dropins (e.g. /yourpath/eclipse/dropins) folder and restart eclipse
Finally, if you want to contribute or analyze the plugin you can build it from source.
This project is built using Eclipse Tycho (https://www.eclipse.org/tycho/) and requires, at least, maven 3.0 (http://maven.apache.org/download.html) to be built via CLI.
- fork the code source
git clone https://github.com/eljoujat/eclipseimpexeditor.git
- cd eclipseimpexeditor
- mvn clean package
The first run will take quite a while since maven will download all the required dependencies in order to build everything.
In order to use the generated eclipse plugins in Eclipse, you will need m2e (https://www.eclipse.org/m2e) and the m2eclipse-tycho plugin (https://github.com/tesla/m2eclipse-tycho/). Update sites to install these plugins :
- m2e stable update site : http://download.eclipse.org/technology/m2e/releases/
- m2eclipse-tycho dev update site : http://repo1.maven.org/maven2/.m2e/connectors/m2eclipse-tycho/0.7.0/N/0.7.0.201309291400/
Search for "Impex" in the eclipse settings and you will find the plugin configuration page.
Configure the connection with hybris, to execute and validate the Impex with any running instance of hybris. In the background, the plugin will fetch your hybris models scheme one time. The plugin works by using the HAC functionality and you don't need any additional extensions.
Important: please use no https and no domain mapping for now. If you have your hybris URL configured with https and some custom domain mapping, just use the localhost domain and the right port (e.g. 9001). First, verify you can clearly open the url in the browser and can login with the same credentials you use in the plugin. Customize the colors for the impex syntax as you need them.
After you configured the URL and credentials for your (local) hybris instance, please index the schema data by right clicking on any impex file and going to the Impex Editor > Refresh Impex Data Model. At this point, the impex plugin will cache the schema from your configured hybris instance and you can use the auto-complete. After it it's not necessary to have the hybris instance running unless you have a change in your schema and want to update it.
The Syntax highlighting feature uses the rule-based scanner class. The scanner takes a given number of rules, and consumes the Impex file and evaluates each token. If the token matches a rule, the scanner exits with the corresponding properties.
The ruleset is based on the Hybris Impex syntax documentation
Before :
After :
The auto-completion is the most liked what the most user look for in any text editor since I have stored the data definition, this feature was easy to implement as well. The autocomplete even recognizes single attributes of each model type you are working on.
The plugin allows formatting the Impex file to a nice and more structured format so it becomes more readable and easy to change .
Features I'm working on:
- Formatting
- Validate the impex with error markers
- Execute the impex
- Hyperlink features to easily locate where an Item is already valued from the same impex
- Find usage: find all usage for the selected defined and selected item
- Official version supported by SAP :https://github.com/SAP/hybris-commerce-eclipse-plugin
- https://github.com/ShahnazK/hylips (abandoned?)