Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Framework to develop simple Eclipse plugin using PHP"

(About)
m (Deliverables: cat)
 
(30 intermediate revisions by one other user not shown)
Line 10: Line 10:
 
'''Abstract'''
 
'''Abstract'''
 
Framework to develop simple Eclipse plugin using PHP. Create a framework that could support developing simple Eclipse plugin using a PHP To Java bridge (Like Caucho's Quercus and other JSR 223 engines). Develop and document a sample plugin in PHP, so that PHP developers could create simple plugins.
 
Framework to develop simple Eclipse plugin using PHP. Create a framework that could support developing simple Eclipse plugin using a PHP To Java bridge (Like Caucho's Quercus and other JSR 223 engines). Develop and document a sample plugin in PHP, so that PHP developers could create simple plugins.
 +
 +
==Getting the Plugin==
 +
===Requirements===
 +
* Java 6 (http://java.sun.com/javase/6/)
 +
* Eclipse 3.3
 +
 +
===Update site===
 +
* http://tom.jabber.ee/phpengine/update-site
 +
 +
===SVN access===
 +
* VIEWVC url: http://eclipse-incub.svn.sourceforge.net/viewvc/eclipse-incub/plugins_in_php/
 +
* SVN url: https://eclipse-incub.svn.sourceforge.net/svnroot/eclipse-incub
 +
** Module org.eclipse.soc2007.phpscriptengine
 +
** Module org.eclipse.soc2007.scriptingbridge.core
 +
*** ant dist
 +
*** You have to manually set the eclipse directory, see build.xml file.
 +
** Module update-site
 +
*** ant build
 +
* Custom builds of Quercus http://sourceforge.net/projects/quercus-bundle
 +
 +
==Using the Plugin==
 +
* [[Framework to develop simple Eclipse plugin using PHP/UsingThePlugin | Facilities Provided by the Plugin]]
 +
* [[Framework to develop simple Eclipse plugin using PHP/PHPinJava | Mapping PHP Functions to Java Methods]]
  
 
==Architecture==
 
==Architecture==
PHP today can be used for almost anything but it will be rather difficult to use it for building GUI's in Eclipse, extending existent Views/Editors or what not Eclipse Widgets that is usually done in Eclipse plugins. Although it is possible to create Java objects in PHP code and interact with them, call arbitary methods on even preinitialized objects this should not be the case in getting aid from PHP from the Eclipse plugin development point of view. PHP should or can be used for the functional parts of the plugins. Either using a third party PHP library to do some work or writing functionality that one would not want to do in Java for a reason. Of course such an aspect is not a very appealing.
+
PHP today can be used for almost anything but it will be rather difficult to use it for building GUI's in Eclipse, extending existent Views/Editors or other Eclipse Widgets that is usually done in Eclipse plugins. Although it is possible to create Java objects in PHP code and interact with them, call arbitary methods on even preinitialized objects this should not be the case in getting aid from PHP from the Eclipse plugin development point of view. PHP should or can be used for the functional parts of the plugins. Either using a third party PHP library to do some work or writing functionality that one would not want to do in Java for some reason. Of course such an aspect is not a very appealing one.
  
* General introduction on whys and hows
+
===General outline===
* map java methods to PHP functions via annotations
+
* Mapping Java methods to PHP functions via annotations
** work out the annotation interface. Something along the lines:
+
** Annotations enrich the Java method with the following information
*** php file name
+
*** PHP file name
*** function name
+
*** Function name
*** function params
+
*** Function parameters (from the list the Java method accepts)
*** object name
+
*** Object name (if function not used)
*** object method
+
*** Object method (if function not used)
 +
*** Object method parameters (from the list the Java method accepts)
 
* PHP discovery system
 
* PHP discovery system
** Search for PHP files from the current project
+
** By default searching PHP files from the project's workspace
*** Predefined folder(s) support to speed up scanning
+
** Configurability to provide predefined locations to speedup the scanning
** Using reflection gather information about the PHP source code
+
** Provide plugins with the option of defining the PHP src folders in plugin.xml
** Provide code completion
+
* PHP reflection system
 +
** Provide an easy way of writing the annotations
 +
** Discovered PHP files are parsed and functions/objects/methods used for annotations' auto-completion
 +
* PHP console for quick testing
 +
** [http://tom.jabber.ee/chessblog/2007/06/08/just-playing-vol2/ Write/Eval loop]
 
* General ScriptEngine support
 
* General ScriptEngine support
** Dependency for php-engine.jar
+
** Providing general ScriptEngine support for plugins
 +
** Working with Anton's project [[Add the ability to write plugins using jruby or groovy. | Write plugins using JRuby & Groovy]]
 +
* PHP scripting support
 +
** Plugin with the needed libraries for parsing PHP
 +
 
 +
==Deliverables==
 +
* '''Core plugin''' aka '''Scripting Bridge'''
 +
** Able to use scripting languages from Java as regular Java objects
 +
* '''An Eclipse Plugin'''
 +
** Able to develop Eclipse plugins using scripting languages
 +
* '''Update site'''
 +
** Install the Eclipse plugin
 +
* '''Quercus Bundle'''
 +
** Standalone SVN trunk builds of Quercus (GPL)
 +
** [http://sourceforge.net/projects/quercus-bundle SF project]
 +
 
 +
[[Category:SOC]]

Latest revision as of 17:38, 14 October 2007

Project lead, student:

Mentor:

This project is one of the selected projects for Google's Summer of Code program in 2007.

About

Abstract Framework to develop simple Eclipse plugin using PHP. Create a framework that could support developing simple Eclipse plugin using a PHP To Java bridge (Like Caucho's Quercus and other JSR 223 engines). Develop and document a sample plugin in PHP, so that PHP developers could create simple plugins.

Getting the Plugin

Requirements

Update site

SVN access

Using the Plugin

Architecture

PHP today can be used for almost anything but it will be rather difficult to use it for building GUI's in Eclipse, extending existent Views/Editors or other Eclipse Widgets that is usually done in Eclipse plugins. Although it is possible to create Java objects in PHP code and interact with them, call arbitary methods on even preinitialized objects this should not be the case in getting aid from PHP from the Eclipse plugin development point of view. PHP should or can be used for the functional parts of the plugins. Either using a third party PHP library to do some work or writing functionality that one would not want to do in Java for some reason. Of course such an aspect is not a very appealing one.

General outline

  • Mapping Java methods to PHP functions via annotations
    • Annotations enrich the Java method with the following information
      • PHP file name
      • Function name
      • Function parameters (from the list the Java method accepts)
      • Object name (if function not used)
      • Object method (if function not used)
      • Object method parameters (from the list the Java method accepts)
  • PHP discovery system
    • By default searching PHP files from the project's workspace
    • Configurability to provide predefined locations to speedup the scanning
    • Provide plugins with the option of defining the PHP src folders in plugin.xml
  • PHP reflection system
    • Provide an easy way of writing the annotations
    • Discovered PHP files are parsed and functions/objects/methods used for annotations' auto-completion
  • PHP console for quick testing
  • General ScriptEngine support
  • PHP scripting support
    • Plugin with the needed libraries for parsing PHP

Deliverables

  • Core plugin aka Scripting Bridge
    • Able to use scripting languages from Java as regular Java objects
  • An Eclipse Plugin
    • Able to develop Eclipse plugins using scripting languages
  • Update site
    • Install the Eclipse plugin
  • Quercus Bundle
    • Standalone SVN trunk builds of Quercus (GPL)
    • SF project

Back to the top