Code Monkey home page Code Monkey logo

eclipseimpexeditor's Introduction

Build Status

Eclipse Impex Editor

Drag to your running Eclipse workspace to install Hybris Impex Editor

Syntax highlighting:

The Syntax highlighting feature uses the rule based scanner class. The scanner takes a givent number of rules, and cosumes the impex file and evalutes each token. If the token matches a rule, the scanner exits with the corresponding properties.

The ruleset are based on the Hybris Impex syntax documentation

Before : Before

After :

After

Preferences Of the plugins :

I also used the Preferences API to allow customisation, to give the more friendly user experience.

It's possible to customize the feel and look of the Impex file:

Preference Snapshot

And you can configure the connection with hybris, to execute and validate the impex with any running instance of hybris !

Preference Snapshot

Detecting hyrbis Item and attributes :

The first time eclipse run, the plugin connect to a the already configured running hybris instance (by default the localhost),call the Rest Webservice allItems , and allAttributes (exposed by hybris) and store the information to avoid call the web service again.

To detect newly added Items or attributes, I Implementer an action to refresh the already stored data definition.

A challenge and a new techniques acquired :

The web services exposed by hybris require a registered hybris account and it's secured against Cross-site request forgery.

To make a successful call the request should pass a crsf token, the token is associated with the connected account. the challenge was that token is stored on the HTML code of a response, and I had to use the jsoup library to retrieve the token.

  • Make a first to login, the call return with a JSESSIONID, I store the JSESSIONID for a further call.
  • Use jsoup with the stored JSESSIONID, and get the crsf token from the html.
  • Make a Rest Call to retrieve the Items and attributes definition.

The coolest feature : Autocompletion .

The auto-completion is the moste liked what the most user look for in any text editor, since i have stored the data deffinition, this feature was easy to implement as well :

Preference Snapshot

Install the plugin :

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. Simply run :

mvn install

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 :

To install the features contained here, press Help > Install New Software… in your Eclipse IDE and enter the URL http://eljoujat.github.io/updates/.

Or :

just copy the latest release from here impex editor relases to the dropins folder under eclipse directory , restart eclipse , and enjoy :)

What next:

Other features I'm working on are :

  • 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 Features, find all usage for the selected definied and selected item .
  • Formatting .

eclipseimpexeditor's People

Contributors

eljoujat avatar pteam-blog avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.