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/UsingThePlugin"

(Quick Start)
(Run PHP Scripts)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Quick Start=
+
===Quick Start===
* '''Add the project nature'''
+
====Run PHP Scripts====
** Right click on a project and select "Add PhpPlugin Project Nature"
+
* Create a PHP file with the extension '''php'''
*** It does not always appear for opened projects. Close the project if that is the case and try again.
+
** Contents can be <? echo "Hello, World!" ?>
* '''Run PHP Scripts'''
+
* Right click on the file and select "Evaluate as PHP"
** Create a PHP file with the extension '''php'''
+
* Expected output is
*** Contents can be <? echo "Hello, World!" ?>
+
** Right click on the file and select "Evaluate as PHP"
+
** Expected output is
+
 
  Output is 'Hello, World!'
 
  Output is 'Hello, World!'
 
  Return is '1'
 
  Return is '1'
Line 13: Line 10:
 
  $var = 46;
 
  $var = 46;
 
  echo $var;
 
  echo $var;
** Select in the editor the newly added lines
+
* Select in the editor the newly added lines
 
** Right click and select "Evaluate as PHP"
 
** Right click and select "Evaluate as PHP"
 +
** Expected output is
 +
Output is '46'
 +
Return is '1'

Latest revision as of 15:08, 20 August 2007

Quick Start

Run PHP Scripts

  • Create a PHP file with the extension php
    • Contents can be <? echo "Hello, World!" ?>
  • Right click on the file and select "Evaluate as PHP"
  • Expected output is
Output is 'Hello, World!'
Return is '1'
  • Add some more PHP to the script
$var = 46;
echo $var;
  • Select in the editor the newly added lines
    • Right click and select "Evaluate as PHP"
    • Expected output is
Output is '46'
Return is '1'

Back to the top