This artifact is the result of a master's thesis in Isfahan University and contains set of Eclipse plugins that enable you to generate a WordPress plugin by graphical modelling. We use Model-Driven approach to generate codes from model.
WPCrudRest is currently only available as a plugin for Eclipse. It used Sirius to provide a graphical modelling environment and use Acceleo to transform models to code.
You can participate in the evaluation of the WPCrudRest framework through the following links:
Tested on Eclipse Modeling Tools 2022-06 & windows 10 64X OS with Java 11
Note: You can follow this link to deploy WordPress on your personal computer if you are unfamiliar with WordPress!
- Download Eclipse Modeling Tools
- Install (unzip) downloaded Eclipse package
- Download latest WPCrudRest package
- Unzip downloaded package and copy dropins directory to eclipse installation path (e.g C:\Program Files\eclipse)
- Execute Eclipse
- Install Acceleo plugin
- Install Sirius plugin (preinstall in newer versions)
- Restart Eclipse
- Click on "File" menu item
- Choose "New" ->" Other" item from "File" menu
- In "Select a wizard" window, search for "Sirius" group and expand it by click
- Choose "Modeling Project" and click "Next"
- Select a name for project and type it in "Project name" field
- Click on "Finish" button to create modeling project
Note: Field type repository model use to define entities field types and if not exist modelling and generating code is not possible! this is recommended to use exist pre-built field repository model!
- Copy FieldTypeRepo.crudrest from models directory to project model (or root) directory
- You can simply copy one of sample models from models repository directory) and jump to next step
- Right click on project root in Eclipse Project (or Model) explorer
- Choose "New" ->" Other" item from popup menu
- In "Select a wizard" window, search for "Crudrest Model" an choose it
- Click next and choose directory and a name (with .crudrest extension) to create model file and click "Next" button
- Choose "Plugin Creator" from "Model Object" drop-down list
- Click Finish to create model file
- Double click on representations.aird file
- Enable CrudRestWPP from Presentation part
- Double click on CrudRestWPP to open Sirius visual model editor
- Edit model
- Save it!
-
If you want to deploy the plugin directly on your local WordPress, set "WP_HOME" path as Wordpress root directory in system environment
Windows OS: setx WP_HOME WORDPRESS_PATH /M Example: setx WP_HOME C:\xampp7.1\htdocs\projects\crudrest /M
-
Right click on model
-
Choose "WP Crud-Rest" -> "Generate WordPress Plugin" from popup menu
-
Plugin code will be generated in "generated WPP" directory on project root directory
- Download Eclipse modeling tools -> Watch video
- Install (extract) Eclipse modeling tools package -> Watch video
- Download WPCrudRest -> Watch video
- Install Acceleo as Eclipse plugin -> Watch video
- Deploy (install) WPCrudRest as Eclipse plugin -> Watch video
- Create new modeling project -> Watch video
- Start modeling using graphical editor -> Watch video