rpms/eclipse-phpeclipse/F-8 eclipse-phpeclipse-broken-help-links.patch, NONE, 1.1 eclipse-phpeclipse-external-parser.patch, NONE, 1.1 eclipse-phpeclipse-external-preview.patch, NONE, 1.1 eclipse-phpeclipse-fix-build-props.patch, NONE, 1.1 eclipse-phpeclipse-no-htmlparser.patch, NONE, 1.1 get-phpeclipse.sh, NONE, 1.1 .cvsignore, 1.2, 1.3 eclipse-phpeclipse-httpd-integration.patch, 1.2, 1.3 eclipse-phpeclipse-rm-win32-help.patch, 1.1, 1.2 eclipse-phpeclipse.spec, 1.3, 1.4 sources, 1.2, 1.3 eclipse-phpeclipse-3.2-build.patch, 1.1, NONE make-phpeclipse-source-archive.sh, 1.1, NONE
Mat Booth (mbooth)
fedora-extras-commits at redhat.com
Sat Jul 5 13:41:29 UTC 2008
- Previous message (by thread): rpms/asunder/F-9 asunder.spec,1.3,1.4 sources,1.4,1.5
- Next message (by thread): rpms/mysql++/devel .cvsignore, 1.10, 1.11 mysql++.spec, 1.11, 1.12 sources, 1.10, 1.11 mysql++-3.0.3-mystring.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: mbooth
Update of /cvs/pkgs/rpms/eclipse-phpeclipse/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5322
Modified Files:
.cvsignore eclipse-phpeclipse-httpd-integration.patch
eclipse-phpeclipse-rm-win32-help.patch eclipse-phpeclipse.spec
sources
Added Files:
eclipse-phpeclipse-broken-help-links.patch
eclipse-phpeclipse-external-parser.patch
eclipse-phpeclipse-external-preview.patch
eclipse-phpeclipse-fix-build-props.patch
eclipse-phpeclipse-no-htmlparser.patch get-phpeclipse.sh
Removed Files:
eclipse-phpeclipse-3.2-build.patch
make-phpeclipse-source-archive.sh
Log Message:
* Sun Jun 29 2008 Mat Booth <fedora at matbooth.co.uk> 1.2.0-0.2.svn1573
- Add patch for Show External Preview functionality.
- Add patch for Use External PHP Parser functionality.
* Sat Jun 28 2008 Mat Booth <fedora at matbooth.co.uk> 1.2.0-0.1.svn1573
- New maintainer.
- Update to version 1.2.0 pre-release, svn1573.
- Adapt patches to new version.
- Update package for new Eclipse plugin guidelines.
eclipse-phpeclipse-broken-help-links.patch:
--- NEW FILE eclipse-phpeclipse-broken-help-links.patch ---
--- net.sourceforge.phpeclipse.phphelp/phphelp.xml 2006-07-14 11:13:57.000000000 +0100
+++ net.sourceforge.phpeclipse.phphelp/phphelp.xml 2008-06-22 13:45:54.000000000 +0100
@@ -1,4 +1,4 @@
-<toc label="PHPEclipse Help" topic="doc/phpeclipse/index.html">
+<toc label="PHPEclipse Help" topic="doc/index.html">
<topic label="PHP Help Table of Contents" href="doc/index.html"/>
<topic label="I. Getting Started" href="doc/getting-started.html"/>
<topic label="II. Installation and Configuration" href="doc/install.html"/>
@@ -6,7 +6,7 @@
<topic label="IV. Security" href="doc/security.html"/>
<topic label="V. Features" href="doc/features.html"/>
<topic label="VI. Function Reference" href="doc/funcref.html"/>
- <topic label="VII. PHP and Zend Engine Internals" href="doc/internals.html"/>
+ <topic label="VII. PHP at the Core: A Hacker's Guide to the Zend Engine" href="doc/book.internals2.html"/>
<topic label="VIII. FAQ: Frequently Asked Questions" href="doc/faq.html"/>
- <topic label="IX. Appendixes" href="doc/appendixes.html"/>
-</toc>
\ No newline at end of file
+ <topic label="IX. Appendices" href="doc/appendices.html"/>
+</toc>
eclipse-phpeclipse-external-parser.patch:
--- NEW FILE eclipse-phpeclipse-external-parser.patch ---
Index: net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/actions/ExternalPHPParser.java
===================================================================
--- net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/actions/ExternalPHPParser.java (revision 1573)
+++ net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/actions/ExternalPHPParser.java (working copy)
@@ -50,11 +50,9 @@
* the file that will be parsed
*/
public void phpExternalParse() {
- // IFile file = (IFile) resource;
- // final IPath path = file.getFullPath();
final IPreferenceStore store = ExternalToolsPlugin.getDefault()
.getPreferenceStore();
- final String filename = fFileToParse.getFullPath().toString();
+ final String filename = fFileToParse.getLocation().toString();
final String[] arguments = { filename };
final MessageFormat form = new MessageFormat(store
eclipse-phpeclipse-external-preview.patch:
--- NEW FILE eclipse-phpeclipse-external-preview.patch ---
Index: net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/ui/editor/ShowExternalPreviewAction.java
===================================================================
--- net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/ui/editor/ShowExternalPreviewAction.java (revision 1573)
+++ net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/ui/editor/ShowExternalPreviewAction.java (working copy)
@@ -145,30 +145,26 @@
if (store == null) {
store = WebUI.getDefault().getPreferenceStore();
}
- // IPath path = file.getFullPath();
- String localhostURL = file.getFullPath().toString();
- String lowerCaseFileName = localhostURL.toLowerCase();
- //removed by ed_mann for RSE fixes testing
- // String documentRoot =
- // store.getString(PHPeclipsePlugin.DOCUMENTROOT_PREF);
- //IPath documentRootPath = ProjectPrefUtil.getDocumentRoot(file
- // .getProject());
- IPath documentRootPath = file.getProject().getFullPath();
- String documentRoot = documentRootPath.toString().toLowerCase();
- if (lowerCaseFileName.startsWith(documentRoot)) {
- localhostURL = localhostURL.substring(documentRoot.length());
- } else {
- return null;
+ IPath path = file.getLocation();
+ if(path == null)
+ path = file.getFullPath();
+
+ String filePath = path.toString();
+ String projectURI = ProjectPrefUtil.getMiscProjectsPreferenceValue(file
+ .getProject(), IPreferenceConstants.PHP_LOCALHOST_PREF);
+ String projectDocRoot = ProjectPrefUtil.getMiscProjectsPreferenceValue(file
+ .getProject(), IPreferenceConstants.PHP_DOCUMENTROOT_PREF);
+
+ if (filePath.startsWith(projectDocRoot)) {
+ filePath = filePath.substring(projectDocRoot.length());
}
- // return store.getString(PHPeclipsePlugin.LOCALHOST_PREF) +
- // localhostURL;
- String projectPath = ProjectPrefUtil.getMiscProjectsPreferenceValue(file
- .getProject(), IPreferenceConstants.PHP_LOCALHOST_PREF);
- if(projectPath.endsWith("/") && localhostURL.startsWith("/")) {
- localhostURL = localhostURL.substring(1);
+ if(projectURI.endsWith("/") && filePath.startsWith("/")) {
+ filePath = filePath.substring(1);
}
- return projectPath + localhostURL;
+
+ return projectURI + filePath;
}
- return "http://localhost";
+ return ProjectPrefUtil.getMiscProjectsPreferenceValue(file
+ .getProject(), IPreferenceConstants.PHP_LOCALHOST_PREF);
}
}
\ No newline at end of file
eclipse-phpeclipse-fix-build-props.patch:
--- NEW FILE eclipse-phpeclipse-fix-build-props.patch ---
--- net.sourceforge.phpeclipse.ui/build.properties 2006-10-22 00:06:44.000000000 +0100
+++ net.sourceforge.phpeclipse.ui/build.properties 2008-06-22 11:40:52.000000000 +0100
@@ -4,7 +4,6 @@
plugin.properties,\
templates/,\
ui.jar,\
- .project,\
META-INF/
source.ui.jar = src/
src.includes = src/,\
eclipse-phpeclipse-no-htmlparser.patch:
--- NEW FILE eclipse-phpeclipse-no-htmlparser.patch ---
--- net.sourceforge.phpeclipse.phpmanual/src/net/sourceforge/phpeclipse/phpmanual/views/PHPManualView.java 2008-04-07 19:44:48.000000000 +0100
+++ net.sourceforge.phpeclipse.phpmanual/src/net/sourceforge/phpeclipse/phpmanual/views/PHPManualView.java 2008-06-22 11:49:09.000000000 +0100
@@ -38,11 +38,11 @@
import org.eclipse.ui.INullSelectionListener;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.part.ViewPart;
-import org.htmlparser.Node;
-import org.htmlparser.Parser;
-import org.htmlparser.tags.Div;
-import org.htmlparser.util.ParserException;
-import org.htmlparser.visitors.TagFindingVisitor;
+//import org.htmlparser.Node;
+//import org.htmlparser.Parser;
+//import org.htmlparser.tags.Div;
+//import org.htmlparser.util.ParserException;
+//import org.htmlparser.visitors.TagFindingVisitor;
import org.osgi.framework.Bundle;
/**
@@ -195,6 +195,7 @@
* @return HTML source of reference page
*/
private String filterHtmlSource(String source) {
+/*
try {
Parser parser = new Parser(source);
String[] tagsToBeFound = { "DIV" };
@@ -220,6 +221,7 @@
} catch (ParserException e) {
e.printStackTrace();
}
+*/
return "";
}
/**
@@ -357,4 +359,4 @@
}
}
-}
\ No newline at end of file
+}
--- net.sourceforge.phpeclipse.phpmanual.htmlparser/build.properties 2007-11-20 01:42:36.000000000 +0000
+++ net.sourceforge.phpeclipse.phpmanual.htmlparser/build.properties 2008-06-22 13:27:52.000000000 +0100
@@ -1,7 +1,2 @@
bin.includes = META-INF/,\
- filterbuilder.jar,\
- htmllexer.jar,\
- htmlparser.jar,\
- junit.jar,\
- sax2.jar,\
- thumbelina.jar
+ xml-commons-apis.jar
--- net.sourceforge.phpeclipse.phpmanual.htmlparser/.classpath 2007-12-03 18:54:17.000000000 +0000
+++ net.sourceforge.phpeclipse.phpmanual.htmlparser/.classpath 2008-06-22 11:54:07.000000000 +0100
@@ -1,11 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry exported="true" kind="lib" path="filterbuilder.jar"/>
- <classpathentry exported="true" kind="lib" path="htmllexer.jar"/>
- <classpathentry exported="true" kind="lib" path="htmlparser.jar"/>
- <classpathentry exported="true" kind="lib" path="junit.jar"/>
- <classpathentry exported="true" kind="lib" path="sax2.jar"/>
- <classpathentry exported="true" kind="lib" path="thumbelina.jar"/>
+ <classpathentry exported="true" kind="lib" path="xml-commons-apis.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
--- net.sourceforge.phpeclipse.phpmanual.htmlparser/META-INF/MANIFEST.MF 2007-12-03 18:54:17.000000000 +0000
+++ net.sourceforge.phpeclipse.phpmanual.htmlparser/META-INF/MANIFEST.MF 2008-06-22 13:27:30.000000000 +0100
@@ -3,41 +3,9 @@
Bundle-Name: Htmlparser Plug-in
Bundle-SymbolicName: net.sourceforge.phpeclipse.phpmanual.htmlparser
Bundle-Version: 1.6.0
-Bundle-ClassPath: filterbuilder.jar,
- htmllexer.jar,
- htmlparser.jar,
- junit.jar,
- sax2.jar,
- thumbelina.jar
+Bundle-ClassPath: xml-commons-apis.jar
Bundle-Localization: plugin
Export-Package: .,
- junit.awtui,
- junit.extensions,
- junit.framework,
- junit.runner,
- junit.swingui,
- junit.swingui.icons,
- junit.textui,
- org.htmlparser,
- org.htmlparser.beans,
- org.htmlparser.beans.images,
- org.htmlparser.filters,
- org.htmlparser.http,
- org.htmlparser.lexer,
- org.htmlparser.lexerapplications.thumbelina,
- org.htmlparser.nodes,
- org.htmlparser.parserapplications,
- org.htmlparser.parserapplications.filterbuilder,
- org.htmlparser.parserapplications.filterbuilder.images,
- org.htmlparser.parserapplications.filterbuilder.layouts,
- org.htmlparser.parserapplications.filterbuilder.wrappers,
- org.htmlparser.parserapplications.filterbuilder.wrappers.images,
- org.htmlparser.sax,
- org.htmlparser.scanners,
- org.htmlparser.tags,
- org.htmlparser.util,
- org.htmlparser.util.sort,
- org.htmlparser.visitors,
org.xml.sax,
org.xml.sax.ext,
org.xml.sax.helpers
--- NEW FILE get-phpeclipse.sh ---
#!/bin/sh
NAME="phpeclipse"
VERSION=1.2.0
REV="1573"
echo "Exporting from SVN..."
mkdir $NAME-$VERSION
pushd $NAME-$VERSION >/dev/null
for m in \
net.sourceforge.phpeclipse.debug.feature \
net.sourceforge.phpeclipse.feature \
net.sourceforge.phpeclipse.xdebug.feature \
net.sourceforge.phpeclipse.core \
net.sourceforge.phpeclipse.debug.core \
net.sourceforge.phpeclipse.debug.ui \
net.sourceforge.phpeclipse.externaltools \
net.sourceforge.phpeclipse.help \
net.sourceforge.phpeclipse.launching \
net.sourceforge.phpeclipse.phphelp \
net.sourceforge.phpeclipse.phpmanual.htmlparser \
net.sourceforge.phpeclipse.phpmanual \
net.sourceforge.phpeclipse.smarty.ui \
net.sourceforge.phpeclipse.ui \
net.sourceforge.phpeclipse.webbrowser \
net.sourceforge.phpeclipse.xdebug.core \
net.sourceforge.phpeclipse.xdebug.ui \
net.sourceforge.phpeclipse.xml.core \
net.sourceforge.phpeclipse.xml.ui \
net.sourceforge.phpeclipse; do
svn export -r $REV http://svn.phpeclipse.com/phpeclipse/trunk/$m
if [ $? -eq 1 ]; then
sleep 10
svn export -r $REV http://svn.phpeclipse.com/phpeclipse/trunk/$m
if [ $? -eq 1 ]; then
echo "ERROR: There was a problem checking out module: $m"
exit 1
fi
fi
done
popd >/dev/null
# jettison cvs gumph and empty files
find $NAME-$VERSION -name .cvs* | xargs rm
echo "Creating tarball '$NAME-$VERSION.tar.gz'..."
tar -czf $NAME-$VERSION.tar.gz $NAME-$VERSION
Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/eclipse-phpeclipse/F-8/.cvsignore,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- .cvsignore 21 Dec 2006 01:06:02 -0000 1.2
+++ .cvsignore 5 Jul 2008 13:40:27 -0000 1.3
@@ -1 +1 @@
-phpeclipse-1.1.8.tar.gz
+phpeclipse-1.2.0.tar.gz
eclipse-phpeclipse-httpd-integration.patch:
Index: eclipse-phpeclipse-httpd-integration.patch
===================================================================
RCS file: /cvs/pkgs/rpms/eclipse-phpeclipse/F-8/eclipse-phpeclipse-httpd-integration.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- eclipse-phpeclipse-httpd-integration.patch 21 Oct 2007 03:45:21 -0000 1.2
+++ eclipse-phpeclipse-httpd-integration.patch 5 Jul 2008 13:40:27 -0000 1.3
@@ -1,141 +1,5 @@
-Index: src/net/sourceforge/phpeclipse/ui/WebUI.java
-===================================================================
-RCS file: /cvsroot/phpeclipse/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/ui/WebUI.java,v
-retrieving revision 1.6
-diff -u -r1.6 WebUI.java
---- net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/ui/WebUI.java 13 Oct 2005 18:38:19 -0000 1.6
-+++ net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/ui/WebUI.java 12 Aug 2006 00:13:12 -0000
-@@ -14,6 +14,7 @@
- package net.sourceforge.phpeclipse.ui;
-
- import java.io.IOException;
-+import java.net.ServerSocket;
- import java.net.URL;
-
- import net.sourceforge.phpeclipse.ui.templates.template.HTMLContextType;
-@@ -24,6 +25,7 @@
- import org.eclipse.core.resources.IWorkspace;
- import org.eclipse.core.resources.ResourcesPlugin;
- import org.eclipse.core.runtime.IStatus;
-+import org.eclipse.core.runtime.Platform;
- import org.eclipse.core.runtime.Status;
- import org.eclipse.jface.preference.IPreferenceStore;
- import org.eclipse.jface.resource.ImageDescriptor;
-@@ -36,6 +38,7 @@
- import org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry;
- import org.eclipse.ui.editors.text.templates.ContributionTemplateStore;
- import org.eclipse.ui.plugin.AbstractUIPlugin;
-+import org.osgi.framework.BundleContext;
-
- /**
- * The web development tools UI plugin.
-@@ -53,6 +56,7 @@
-
- /** The shared instance. */
- private static WebUI plugin;
-+ private int port = 0;
-
- public static IWorkbenchPage getActivePage() {
- return getDefault().internalGetActivePage();
-@@ -151,9 +155,41 @@
- }
- return fStore;
- }
-+
-+ public int getHttpdPort() {
-+ if (port == 0) {
-+ port = findFreePort();
-+ }
-+ return port;
-+ }
-+
-+ public int findFreePort() {
-+ ServerSocket socket = null;
-+ try {
-+ socket = new ServerSocket(0);
-+ socket.setReuseAddress(true);
-+ return socket.getLocalPort();
-+ } catch(IOException e) {
-+ IStatus status = new Status(IStatus.ERROR, "net.sourceforge.phpeclipse.ui", IStatus.OK, "Error finding free port.", e); //$NON-NLS-1$ //$NON-NLS-2$
-+ plugin.getLog().log(status);
-+ } finally {
-+ if(socket != null) {
-+ try {
-+ socket.close();
-+ } catch(IOException e) {
-+ IStatus status = new Status(IStatus.ERROR, "net.sourceforge.phpeclipse.ui", IStatus.OK, "Error finding free port.", e); //$NON-NLS-1$ //$NON-NLS-2$;
-+ plugin.getLog().log(status);
-+ }
-+ }
-+ }
-+ return -1;
-+ }
-
- protected void initializeDefaultPreferences(IPreferenceStore store) {
-- store.setDefault(PHP_LOCALHOST_PREF, "http://localhost");
-+ if (port == 0) {
-+ port = findFreePort();
-+ }
-+ store.setDefault(PHP_LOCALHOST_PREF, "http://localhost" + ":" + port);
- store.setDefault(PHP_DOCUMENTROOT_PREF, getWorkspace().getRoot().getLocation().toString());
- // store.setDefault(PHP_BOOKMARK_DEFAULT, "");
-
-Index: src/net/sourceforge/phpeclipse/PHPeclipsePlugin.java
-===================================================================
-RCS file: /cvsroot/phpeclipse/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPeclipsePlugin.java,v
-retrieving revision 1.97
-diff -u -r1.97 PHPeclipsePlugin.java
---- net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPeclipsePlugin.java 10 Feb 2006 20:53:56 -0000 1.97
-+++ net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPeclipsePlugin.java 12 Aug 2006 00:13:14 -0000
-@@ -27,6 +27,7 @@
- import net.sourceforge.phpdt.core.IJavaElement;
- import net.sourceforge.phpdt.core.JavaCore;
- import net.sourceforge.phpdt.core.WorkingCopyOwner;
-+import net.sourceforge.phpdt.externaltools.actions.PHPStopApacheAction;
- import net.sourceforge.phpdt.internal.core.BatchOperation;
- import net.sourceforge.phpdt.internal.core.JavaModelManager;
- import net.sourceforge.phpdt.internal.core.util.Util;
-@@ -52,6 +53,7 @@
- import net.sourceforge.phpeclipse.builder.ExternalStorageDocumentProvider;
- import net.sourceforge.phpeclipse.builder.FileStorage;
- import net.sourceforge.phpeclipse.builder.IdentifierIndexManager;
-+import net.sourceforge.phpeclipse.externaltools.ExternalToolsPlugin;
- import net.sourceforge.phpeclipse.phpeditor.CustomBufferFactory;
- import net.sourceforge.phpeclipse.phpeditor.DocumentAdapter;
- import net.sourceforge.phpeclipse.phpeditor.ICompilationUnitDocumentProvider;
-@@ -79,6 +81,7 @@
- import org.eclipse.core.runtime.Status;
- import org.eclipse.core.runtime.jobs.ISchedulingRule;
- import org.eclipse.core.runtime.jobs.Job;
-+import org.eclipse.jface.action.Action;
- import org.eclipse.jface.action.GroupMarker;
- import org.eclipse.jface.action.IMenuManager;
- import org.eclipse.jface.action.Separator;
-@@ -1023,10 +1026,15 @@
-
- // RefactoringCore.getUndoManager().shutdown();
- } finally {
-+ ExternalToolsPlugin.getDefault().stopHttpd();
-+ try {
-+ Thread.sleep(1000);
-+ } catch (InterruptedException e) { /* ignore */ }
- super.stop(context);
-- }
-- }
-
-+ }
-+ }
-+
- /**
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#shutdown()
- */
-Index: prefs/default_linux.properties
-===================================================================
-RCS file: /cvsroot/phpeclipse/net.sourceforge.phpeclipse.externaltools/prefs/default_linux.properties,v
-retrieving revision 1.2
-diff -u -r1.2 default_linux.properties
---- net.sourceforge.phpeclipse.externaltools/prefs/default_linux.properties 13 Oct 2005 18:30:49 -0000 1.2
-+++ net.sourceforge.phpeclipse.externaltools/prefs/default_linux.properties 12 Aug 2006 00:13:15 -0000
+--- net.sourceforge.phpeclipse.externaltools/prefs/default_linux.properties 2005-10-13 19:38:40.000000000 +0100
++++ net.sourceforge.phpeclipse.externaltools/prefs/default_linux.properties 2008-06-15 11:18:01.000000000 +0100
@@ -1,14 +1,14 @@
-_php_run_pref=/opt/lamp/php/php
-_external_parser=/opt/lamp/php/php -l -f {0}
@@ -154,226 +18,62 @@
+_xampp_start_pref=
+_xampp_stop_pref=
+__mysql_start=
-+__apache_start=-f /usr/share/eclipse/plugins/net.sourceforge.phpeclipse.externaltools_1.1.8/confs/httpd.conf -c "ErrorLog {0}/.metadata/phpeclipse-httpd-error_log" -c "DocumentRoot {0}" -c "PidFile {0}/.metadata/phpeclipse-httpd.pid" -c "Listen {1}"
-+__apache_stop=-f /usr/share/eclipse/plugins/net.sourceforge.phpeclipse.externaltools_1.1.8/confs/httpd.conf -c "ErrorLog {0}/.metadata/phpeclipse-httpd-error_log" -c "DocumentRoot {0}" -c "PidFile {0}/.metadata/phpeclipse-httpd.pid" -c "Listen {1}" -k stop
-+__apache_restart=-f /usr/share/eclipse/plugins/net.sourceforge.phpeclipse.externaltools_1.1.8/confs/httpd.conf -c "ErrorLog {0}/.metadata/phpeclipse-httpd-error_log" -c "DocumentRoot {0}" -c "PidFile {0}/.metadata/phpeclipse-httpd.pid" -c "Listen {1}" -k restart
++__apache_start=-f /usr/share/eclipse/plugins/net.sourceforge.phpeclipse.externaltools_1.2.0/conf/httpd.conf -c "ErrorLog {0}/.metadata/phpeclipse-httpd-error_log" -c "DocumentRoot {0}" -c "PidFile {0}/.metadata/phpeclipse-httpd.pid" -c "Listen {1}"
++__apache_stop=-f /usr/share/eclipse/plugins/net.sourceforge.phpeclipse.externaltools_1.2.0/conf/httpd.conf -c "ErrorLog {0}/.metadata/phpeclipse-httpd-error_log" -c "DocumentRoot {0}" -c "PidFile {0}/.metadata/phpeclipse-httpd.pid" -c "Listen {1}" -k stop
++__apache_restart=-f /usr/share/eclipse/plugins/net.sourceforge.phpeclipse.externaltools_1.2.0/conf/httpd.conf -c "ErrorLog {0}/.metadata/phpeclipse-httpd-error_log" -c "DocumentRoot {0}" -c "PidFile {0}/.metadata/phpeclipse-httpd.pid" -c "Listen {1}" -k restart
_mysql_start_background=true
_apache_start_background=true
_apache_stop_background=true
--_apache_restart_background=true
-\ No newline at end of file
-+_apache_restart_background=true
-Index: src/net/sourceforge/phpdt/externaltools/actions/PHPRestartApacheAction.java
-===================================================================
-RCS file: /cvsroot/phpeclipse/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/actions/PHPRestartApacheAction.java,v
-retrieving revision 1.1
-diff -u -r1.1 PHPRestartApacheAction.java
---- net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/actions/PHPRestartApacheAction.java 11 Jun 2005 17:15:01 -0000 1.1
-+++ net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/actions/PHPRestartApacheAction.java 12 Aug 2006 00:13:16 -0000
-@@ -12,7 +12,10 @@
- package net.sourceforge.phpdt.externaltools.actions;
-
-
-+import java.text.MessageFormat;
+ _apache_restart_background=true
+--- net.sourceforge.phpeclipse.externaltools/conf/httpd.conf 1970-01-01 01:00:00.000000000 +0100
++++ net.sourceforge.phpeclipse.externaltools/conf/httpd.conf 2008-06-22 13:09:36.000000000 +0100
+@@ -0,0 +1,23 @@
++# minimal httpd conf file for use with PHPEclipse
++StartServers 1
++MinSpareServers 1
++MaxSpareServers 1
++MaxClients 3
+
- import net.sourceforge.phpeclipse.externaltools.ExternalToolsPlugin;
-+import net.sourceforge.phpeclipse.ui.WebUI;
-
- import org.eclipse.jface.action.IAction;
- import org.eclipse.jface.preference.IPreferenceStore;
-@@ -21,10 +24,18 @@
- public void run(IAction action) {
- final IPreferenceStore store = ExternalToolsPlugin.getDefault().getPreferenceStore();
- // execute(store.getString(PHPeclipsePlugin.APACHE_RESTART_PREF), "Restart Apache: ");
-+
-+ final IPreferenceStore webUIStore = WebUI.getDefault().getPreferenceStore();
-+ String documentRoot = webUIStore.getString(WebUI.PHP_DOCUMENTROOT_PREF);
-+ // replace backslash with slash in the DocumentRoot under Windows
-+ documentRoot = documentRoot.replace('\\', '/');
-+ String[] arguments = { documentRoot, new Integer(WebUI.getDefault().getHttpdPort()).toString() };
-+ MessageFormat form = new MessageFormat(store.getString(ExternalToolsPlugin.APACHE_RESTART_PREF));
-+
- execute(
- "apache_restart",
- store.getString(ExternalToolsPlugin.APACHE_RUN_PREF),
-- store.getString(ExternalToolsPlugin.APACHE_RESTART_PREF),
-+ form.format(arguments),
- store.getBoolean(ExternalToolsPlugin.APACHE_RESTART_BACKGROUND));
- }
- }
-Index: src/net/sourceforge/phpdt/externaltools/actions/PHPStartApacheAction.java
-===================================================================
-RCS file: /cvsroot/phpeclipse/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/actions/PHPStartApacheAction.java,v
-retrieving revision 1.3
-diff -u -r1.3 PHPStartApacheAction.java
---- net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/actions/PHPStartApacheAction.java 13 Oct 2005 18:31:29 -0000 1.3
-+++ net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/actions/PHPStartApacheAction.java 12 Aug 2006 00:13:16 -0000
-@@ -30,7 +30,7 @@
-
- // replace backslash with slash in the DocumentRoot under Windows
- documentRoot = documentRoot.replace('\\', '/');
-- String[] arguments = { documentRoot };
-+ String[] arguments = { documentRoot, new Integer(WebUI.getDefault().getHttpdPort()).toString() };
- MessageFormat form = new MessageFormat(store.getString(ExternalToolsPlugin.APACHE_START_PREF));
- execute("apache_start", store.getString(ExternalToolsPlugin.APACHE_RUN_PREF), form.format(arguments), store
- .getBoolean(ExternalToolsPlugin.APACHE_START_BACKGROUND));
-Index: src/net/sourceforge/phpdt/externaltools/actions/PHPStopApacheAction.java
-===================================================================
-RCS file: /cvsroot/phpeclipse/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/actions/PHPStopApacheAction.java,v
-retrieving revision 1.1
-diff -u -r1.1 PHPStopApacheAction.java
---- net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/actions/PHPStopApacheAction.java 11 Jun 2005 17:15:01 -0000 1.1
-+++ net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/actions/PHPStopApacheAction.java 12 Aug 2006 00:13:16 -0000
-@@ -11,7 +11,10 @@
- **********************************************************************/
- package net.sourceforge.phpdt.externaltools.actions;
-
-+import java.text.MessageFormat;
++# modules
++LoadModule mime_module modules/mod_mime.so
++LoadModule dir_module modules/mod_dir.so
++LoadModule autoindex_module modules/mod_autoindex.so
+
- import net.sourceforge.phpeclipse.externaltools.ExternalToolsPlugin;
-+import net.sourceforge.phpeclipse.ui.WebUI;
-
- import org.eclipse.jface.action.IAction;
- import org.eclipse.jface.preference.IPreferenceStore;
-@@ -20,10 +23,18 @@
- public void run(IAction action) {
- final IPreferenceStore store = ExternalToolsPlugin.getDefault().getPreferenceStore();
- // execute(store.getString(PHPeclipsePlugin.APACHE_STOP_PREF), "Stop Apache: ");
-+
-+ final IPreferenceStore webUIStore = WebUI.getDefault().getPreferenceStore();
-+ String documentRoot = webUIStore.getString(WebUI.PHP_DOCUMENTROOT_PREF);
-+ // replace backslash with slash in the DocumentRoot under Windows
-+ documentRoot = documentRoot.replace('\\', '/');
-+ String[] arguments = { documentRoot, new Integer(WebUI.getDefault().getHttpdPort()).toString() };
-+ MessageFormat form = new MessageFormat(store.getString(ExternalToolsPlugin.APACHE_STOP_PREF));
-+
- execute(
- "apache_stop",
- store.getString(ExternalToolsPlugin.APACHE_RUN_PREF),
-- store.getString(ExternalToolsPlugin.APACHE_STOP_PREF),
-+ form.format(arguments),
- store.getBoolean(ExternalToolsPlugin.APACHE_STOP_BACKGROUND));
- }
- }
-Index: src/net/sourceforge/phpeclipse/externaltools/ExternalToolsPlugin.java
-===================================================================
-RCS file: /cvsroot/phpeclipse/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpeclipse/externaltools/ExternalToolsPlugin.java,v
-retrieving revision 1.8
-diff -u -r1.8 ExternalToolsPlugin.java
---- net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpeclipse/externaltools/ExternalToolsPlugin.java 4 Feb 2006 15:47:51 -0000 1.8
-+++ net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpeclipse/externaltools/ExternalToolsPlugin.java 12 Aug 2006 00:13:16 -0000
-@@ -9,12 +9,17 @@
- Contributors:
- **********************************************************************/
-
-+import java.io.FileOutputStream;
-+import java.io.IOException;
- import java.io.InputStream;
-+import java.io.OutputStream;
- import java.net.MalformedURLException;
- import java.net.URL;
- import java.util.Enumeration;
- import java.util.PropertyResourceBundle;
-
-+import net.sourceforge.phpdt.externaltools.actions.PHPStartApacheAction;
-+import net.sourceforge.phpdt.externaltools.actions.PHPStopApacheAction;
- import net.sourceforge.phpdt.externaltools.internal.model.ExternalToolsImages;
- import net.sourceforge.phpdt.externaltools.internal.model.IPreferenceConstants;
- import net.sourceforge.phpdt.externaltools.internal.model.VariableContextManager;
-@@ -28,6 +33,7 @@
- import org.eclipse.core.runtime.Path;
- import org.eclipse.core.runtime.Platform;
- import org.eclipse.core.runtime.Status;
-+import org.eclipse.jface.action.Action;
- import org.eclipse.jface.preference.IPreferenceStore;
- import org.eclipse.jface.preference.PreferenceConverter;
- import org.eclipse.jface.resource.ImageDescriptor;
-@@ -280,5 +286,41 @@
- VariableContextManager.getDefault();
- }
- });
-+ initializeDefaultPluginPreferences();
-+ }
-+
-+ /**
-+ * @throws Exception
-+ * @see org.eclipse.core.runtime.Plugin#stop(BundleContext context)
-+ */
-+ public void stop(BundleContext context) throws Exception {
-+ super.stop(context);
-+ }
-+
-+ public void startHttpd(){
-+ try {
-+ // move httpd.conf into the plugins metadata area
-+ InputStream is = getDefault().openStream(new Path("confs/httpd.conf"));
-+ OutputStream os = new FileOutputStream(getStateLocation() + "/httpd.conf");
-+ byte[] buf = new byte[1024];
-+ int len;
-+ while ((len = is.read(buf)) > 0) {
-+ os.write(buf, 0, len);
-+ }
-+ is.close();
-+ os.close();
-+
-+ // start httpd
-+ new PHPStartApacheAction().run(new Action(){});
-+ } catch (IOException e) {
-+ IStatus status = new Status(Status.ERROR, IExternalToolConstants.PLUGIN_ID, 0, "There was a problem starting httpd.", e);
-+ getDefault().getLog().log(status);
-+ }
-+ }
-+
-+
-+ public void stopHttpd() {
-+ // stop httpd
-+ new PHPStopApacheAction().run(new Action(){});
- }
- }
-\ No newline at end of file
-Index: plugin.xml
-===================================================================
-RCS file: /cvsroot/phpeclipse/net.sourceforge.phpeclipse.externaltools/plugin.xml,v
-retrieving revision 1.7
-diff -u -r1.7 plugin.xml
---- net.sourceforge.phpeclipse.externaltools/plugin.xml 5 Feb 2006 21:07:11 -0000 1.7
-+++ net.sourceforge.phpeclipse.externaltools/plugin.xml 12 Aug 2006 00:13:15 -0000
-@@ -1,32 +1,8 @@
- <?xml version="1.0" encoding="UTF-8"?>
- <?eclipse version="3.0"?>
--<plugin
-- id="net.sourceforge.phpeclipse.externaltools"
-- name="PHP ExternalTools Plug-in"
-- version="1.1.8"
-- provider-name="phpeclipse.de"
-- class="net.sourceforge.phpeclipse.externaltools.ExternalToolsPlugin">
--
-- <runtime>
-- <library name="externaltools.jar">
-- <export name="*"/>
-- </library>
-- </runtime>
--
-- <requires>
-- <import plugin="org.eclipse.ui"/>
-- <import plugin="org.eclipse.ui.console"/>
-- <import plugin="org.eclipse.ui.ide"/>
-- <import plugin="org.eclipse.ui.editors"/>
-- <import plugin="org.eclipse.core.resources"/>
-- <import plugin="org.eclipse.core.runtime"/>
-- <import plugin="org.eclipse.debug.core"/>
-- <import plugin="org.eclipse.debug.ui"/>
-- <import plugin="org.eclipse.ui.externaltools"/>
-- <import plugin="net.sourceforge.phpeclipse.ui"/>
-- </requires>
--
-+<plugin>
-
-+
- <!-- external tools -->
-
- <!-- extension point definitions -->
-@@ -255,11 +231,6 @@
++TypesConfig /etc/mime.types
++DirectoryIndex index.html index.php default.html default.php
++DirectorySlash On
++
++IndexOptions FoldersFirst VersionSort IgnoreCase NameWidth=* HTMLTable
++IndexIgnore RECYCLER .??* *~ *# HEADER* README* RCS CVS *,v *,t
++HeaderName HEADER.html
++ReadmeName README.html
++
++# PHP settings
++LoadModule php5_module modules/libphp5.so
++AddHandler php5-script .php
+--- net.sourceforge.phpeclipse.externaltools/build.properties 2006-10-22 00:06:44.000000000 +0100
++++ net.sourceforge.phpeclipse.externaltools/build.properties 2008-06-22 13:15:16.000000000 +0100
+@@ -5,6 +5,7 @@
+ icons/,\
+ META-INF/,\
+ plugin.properties,\
++ conf/,\
+ prefs/
+ src.includes = src/,\
+ build.properties,\
+@@ -15,4 +16,9 @@
+ .cvsignore,\
+ .project,\
+ META-INF/,\
++ conf/,\
+ prefs/
++bin.excludes = prefs/default_macosx.properties,\
++ prefs/default_win32.properties
++src.excludes = prefs/default_macosx.properties,\
++ prefs/default_win32.properties
+--- net.sourceforge.phpeclipse.externaltools/plugin.xml 2007-09-24 21:26:12.000000000 +0100
++++ net.sourceforge.phpeclipse.externaltools/plugin.xml 2008-06-15 10:17:07.000000000 +0100
+@@ -192,11 +192,6 @@
</page>
<page
category="net.sourceforge.phpdt.externaltools.preferences"
@@ -385,7 +85,7 @@
class="net.sourceforge.phpdt.externaltools.preferences.MySQLPreferencePage"
id="net.sourceforge.phpeclipse.externaltools.mysql.preferences"
name="MySQL"/>
-@@ -331,24 +302,6 @@
+@@ -268,24 +263,6 @@
toolbarPath="Normal"
id="net.sourceforge.phpdt.externaltools.actions.PHPStartMySQLAction">
</action>
@@ -410,92 +110,221 @@
</actionSet>
</extension>
-Index: build.properties
-===================================================================
-RCS file: /cvsroot/phpeclipse/net.sourceforge.phpeclipse.externaltools/build.properties,v
-retrieving revision 1.2
-diff -u -r1.2 build.properties
---- net.sourceforge.phpeclipse.externaltools/build.properties 3 Aug 2005 20:55:43 -0000 1.2
-+++ net.sourceforge.phpeclipse.externaltools/build.properties 12 Aug 2006 00:53:50 -0000
-@@ -2,7 +2,16 @@
- output.externaltools.jar = bin/
- bin.includes = plugin.xml,\
- externaltools.jar,\
-- icons/
-+ icons/,\
-+ META-INF/,\
-+ confs/,\
-+ prefs/
- src.includes = src/,\
- build.properties,\
-- icons/
-+ icons/,\
-+ confs/,\
-+ prefs/
-+bin.excludes = prefs/default_macosx.properties,\
-+ prefs/default_win32.properties
-+src.excludes = prefs/default_macosx.properties,\
-+ prefs/default_win32.properties
-Index: META-INF/MANIFEST.MF
-===================================================================
-RCS file: META-INF/MANIFEST.MF
-diff -N META-INF/MANIFEST.MF
---- net.sourceforge.phpeclipse.externaltools/META-INF/MANIFEST.MF 1 Jan 1970 00:00:00 -0000
-+++ net.sourceforge.phpeclipse.externaltools/META-INF/MANIFEST.MF 1 Jan 1970 00:00:00 -0000
-@@ -0,0 +1,33 @@
-+Manifest-Version: 1.0
-+Bundle-ManifestVersion: 2
-+Bundle-Name: PHP ExternalTools Plug-in
-+Bundle-SymbolicName: net.sourceforge.phpeclipse.externaltools; singleton:=true
-+Bundle-Version: 1.1.8
-+Bundle-ClassPath: externaltools.jar
-+Bundle-Activator: net.sourceforge.phpeclipse.externaltools.ExternalToolsPlugin
-+Bundle-Vendor: phpeclipse.de
-+Bundle-Localization: plugin
-+Export-Package: net.sourceforge.phpdt.externaltools.actions,
-+ net.sourceforge.phpdt.externaltools.group,
-+ net.sourceforge.phpdt.externaltools.internal.dialog,
-+ net.sourceforge.phpdt.externaltools.internal.model,
-+ net.sourceforge.phpdt.externaltools.internal.program.launchConfigurations,
-+ net.sourceforge.phpdt.externaltools.internal.registry,
-+ net.sourceforge.phpdt.externaltools.internal.ui,
-+ net.sourceforge.phpdt.externaltools.launchConfigurations,
-+ net.sourceforge.phpdt.externaltools.model,
-+ net.sourceforge.phpdt.externaltools.preferences,
-+ net.sourceforge.phpdt.externaltools.util,
-+ net.sourceforge.phpdt.externaltools.variable,
-+ net.sourceforge.phpeclipse.externaltools
-+Require-Bundle: org.eclipse.ui,
-+ org.eclipse.ui.console,
-+ org.eclipse.ui.ide,
-+ org.eclipse.ui.editors,
-+ org.eclipse.core.resources,
-+ org.eclipse.core.runtime,
-+ org.eclipse.debug.core,
-+ org.eclipse.debug.ui,
-+ org.eclipse.ui.externaltools,
-+ net.sourceforge.phpeclipse.ui
-+Eclipse-LazyStart: true
-Index: confs/httpd.conf
-===================================================================
-RCS file: confs/httpd.conf
-diff -N confs/httpd.conf
---- net.sourceforge.phpeclipse.externaltools/confs/httpd.conf 1 Jan 1970 00:00:00 -0000
-+++ net.sourceforge.phpeclipse.externaltools/confs/httpd.conf 1 Jan 1970 00:00:00 -0000
-@@ -0,0 +1,16 @@
-+# minimal httpd conf file for use with PHPeclipse
+--- net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/ui/WebUI.java 2008-01-14 03:40:19.000000000 +0000
++++ net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/ui/WebUI.java 2008-06-22 20:43:04.000000000 +0100
+@@ -15,16 +15,19 @@
+
+ import java.io.IOException;
+ import java.net.URL;
++import java.net.ServerSocket;
+
+ import net.sourceforge.phpeclipse.ui.templates.template.HTMLContextType;
+ import net.sourceforge.phpeclipse.ui.templates.template.JSContextType;
+ import net.sourceforge.phpeclipse.ui.templates.template.SmartyContextType;
+ import net.sourceforge.phpeclipse.ui.templates.template.XMLContextType;
+
++import org.eclipse.core.internal.utils.FileUtil;
+ import org.eclipse.core.resources.IWorkspace;
+ import org.eclipse.core.resources.ResourcesPlugin;
+ import org.eclipse.core.runtime.IStatus;
+ import org.eclipse.core.runtime.Status;
++import org.eclipse.core.runtime.Platform;
+ import org.eclipse.jface.preference.IPreferenceStore;
+ import org.eclipse.jface.resource.ImageDescriptor;
+ import org.eclipse.jface.resource.ImageRegistry;
+@@ -56,6 +59,7 @@
+
+ /** The shared instance. */
+ private static WebUI plugin;
++ private int port = 0;
+
+ public static IWorkbenchPage getActivePage() {
+ return getDefault().internalGetActivePage();
+@@ -165,10 +169,42 @@
+ return fStore;
+ }
+
++ public int getHttpdPort() {
++ if (port == 0) {
++ port = findFreePort();
++ }
++ return port;
++ }
+
-+StartServers 1
-+MinSpareServers 1
-+MaxSpareServers 1
-+MaxClients 3
++ private int findFreePort() {
++ ServerSocket socket = null;
++ try {
++ socket = new ServerSocket(0);
++ socket.setReuseAddress(true);
++ return socket.getLocalPort();
++ } catch(IOException e) {
++ IStatus status = new Status(IStatus.ERROR, "net.sourceforge.phpeclipse.ui", IStatus.OK, "Error finding free port.", e);
++ plugin.getLog().log(status);
++ } finally {
++ if(socket != null) {
++ try {
++ socket.close();
++ } catch(IOException e) {
++ IStatus status = new Status(IStatus.ERROR, "net.sourceforge.phpeclipse.ui", IStatus.OK, "Error finding free port.", e);
++ plugin.getLog().log(status);
++ }
++ }
++ }
++ return -1;
++ }
+
-+# modules
-+LoadModule mime_module modules/mod_mime.so
-+LoadModule dir_module modules/mod_dir.so
+ protected void initializeDefaultPreferences(IPreferenceStore store) {
+- store.setDefault(PHP_LOCALHOST_PREF, "http://localhost");
+- store.setDefault(PHP_DOCUMENTROOT_PREF, getWorkspace().getRoot()
+- .getFullPath().toString());
++ if (port == 0) {
++ port = findFreePort();
++ }
++ store.setDefault(PHP_LOCALHOST_PREF, "http://localhost" + ":" + port);
++ store.setDefault(PHP_DOCUMENTROOT_PREF,
++ FileUtil.canonicalPath(Platform.getLocation()).removeTrailingSeparator().toOSString());
+ // store.setDefault(PHP_BOOKMARK_DEFAULT, "");
+
+ store.setDefault(PHP_AUTO_PREVIEW_DEFAULT, "false");
+--- net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/actions/PHPStartApacheAction.java 2006-10-22 00:19:54.000000000 +0100
++++ net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/actions/PHPStartApacheAction.java 2008-06-22 16:18:08.000000000 +0100
+@@ -32,7 +32,7 @@
+
+ // replace backslash with slash in the DocumentRoot under Windows
+ documentRoot = documentRoot.replace('\\', '/');
+- String[] arguments = { documentRoot };
++ String[] arguments = { documentRoot, new Integer(WebUI.getDefault().getHttpdPort()).toString() };
+ MessageFormat form = new MessageFormat(store
+ .getString(ExternalToolsPlugin.APACHE_START_PREF));
+ execute("apache_start", store
+--- net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/actions/PHPStopApacheAction.java 2006-10-22 00:19:54.000000000 +0100
++++ net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/actions/PHPStopApacheAction.java 2008-06-22 17:43:22.000000000 +0100
+@@ -11,20 +11,31 @@
+ **********************************************************************/
+ package net.sourceforge.phpdt.externaltools.actions;
+
++import java.text.MessageFormat;
+
-+TypesConfig /etc/mime.types
+ import net.sourceforge.phpeclipse.externaltools.ExternalToolsPlugin;
++import net.sourceforge.phpeclipse.ui.WebUI;
+
+ import org.eclipse.jface.action.IAction;
+ import org.eclipse.jface.preference.IPreferenceStore;
+
+ public class PHPStopApacheAction extends PHPStartApacheAction {
+ public void run(IAction action) {
++ final IPreferenceStore webUIStore = WebUI.getDefault()
++ .getPreferenceStore();
+
-+# PHP settings
-+LoadModule php5_module modules/libphp5.so
-+AddType application/x-httpd-php .php
++ String documentRoot = webUIStore.getString(WebUI.PHP_DOCUMENTROOT_PREF);
+ final IPreferenceStore store = ExternalToolsPlugin.getDefault()
+ .getPreferenceStore();
+- // execute(store.getString(PHPeclipsePlugin.APACHE_STOP_PREF), "Stop
+- // Apache: ");
++
++ // replace backslash with slash in the DocumentRoot under Windows
++ documentRoot = documentRoot.replace('\\', '/');
++ String[] arguments = { documentRoot, new Integer(WebUI.getDefault().getHttpdPort()).toString() };
++ MessageFormat form = new MessageFormat(store
++ .getString(ExternalToolsPlugin.APACHE_STOP_PREF));
+ execute("apache_stop", store
+- .getString(ExternalToolsPlugin.APACHE_RUN_PREF), store
+- .getString(ExternalToolsPlugin.APACHE_STOP_PREF), store
++ .getString(ExternalToolsPlugin.APACHE_RUN_PREF), form
++ .format(arguments), store
+ .getBoolean(ExternalToolsPlugin.APACHE_STOP_BACKGROUND));
+ }
+ }
+--- net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/actions/PHPRestartApacheAction.java 2006-10-22 00:19:54.000000000 +0100
++++ net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/actions/PHPRestartApacheAction.java 2008-06-22 17:34:10.000000000 +0100
+@@ -11,20 +11,31 @@
+ **********************************************************************/
+ package net.sourceforge.phpdt.externaltools.actions;
+
++import java.text.MessageFormat;
++
+ import net.sourceforge.phpeclipse.externaltools.ExternalToolsPlugin;
++import net.sourceforge.phpeclipse.ui.WebUI;
+
+ import org.eclipse.jface.action.IAction;
+ import org.eclipse.jface.preference.IPreferenceStore;
+
+ public class PHPRestartApacheAction extends PHPStartApacheAction {
+ public void run(IAction action) {
++ final IPreferenceStore webUIStore = WebUI.getDefault()
++ .getPreferenceStore();
++
++ String documentRoot = webUIStore.getString(WebUI.PHP_DOCUMENTROOT_PREF);
+ final IPreferenceStore store = ExternalToolsPlugin.getDefault()
+ .getPreferenceStore();
+- // execute(store.getString(PHPeclipsePlugin.APACHE_RESTART_PREF),
+- // "Restart Apache: ");
++
++ // replace backslash with slash in the DocumentRoot under Windows
++ documentRoot = documentRoot.replace('\\', '/');
++ String[] arguments = { documentRoot, new Integer(WebUI.getDefault().getHttpdPort()).toString() };
++ MessageFormat form = new MessageFormat(store
++ .getString(ExternalToolsPlugin.APACHE_RESTART_PREF));
+ execute("apache_restart", store
+- .getString(ExternalToolsPlugin.APACHE_RUN_PREF), store
+- .getString(ExternalToolsPlugin.APACHE_RESTART_PREF), store
++ .getString(ExternalToolsPlugin.APACHE_RUN_PREF), form
++ .format(arguments), store
+ .getBoolean(ExternalToolsPlugin.APACHE_RESTART_BACKGROUND));
+ }
+ }
+--- net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPeclipsePlugin.java 2008-01-23 21:53:45.000000000 +0000
++++ net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPeclipsePlugin.java 2008-06-23 00:03:35.000000000 +0100
+@@ -52,6 +52,7 @@
+ import net.sourceforge.phpeclipse.builder.ExternalStorageDocumentProvider;
+ import net.sourceforge.phpeclipse.builder.FileStorage;
+ import net.sourceforge.phpeclipse.builder.IdentifierIndexManager;
++import net.sourceforge.phpeclipse.externaltools.ExternalToolsPlugin;
+ import net.sourceforge.phpeclipse.phpeditor.CustomBufferFactory;
+ import net.sourceforge.phpeclipse.phpeditor.DocumentAdapter;
+ import net.sourceforge.phpeclipse.phpeditor.ICompilationUnitDocumentProvider;
+@@ -989,6 +990,7 @@
+
+ // RefactoringCore.getUndoManager().shutdown();
+ } finally {
++ ExternalToolsPlugin.getDefault().stopHttpd();
+ super.stop(context);
+ }
+ }
+--- net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpeclipse/externaltools/ExternalToolsPlugin.java 2006-10-22 00:19:54.000000000 +0100
++++ net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpeclipse/externaltools/ExternalToolsPlugin.java 2008-06-23 00:01:11.000000000 +0100
+@@ -15,6 +15,7 @@
+ import java.util.Enumeration;
+ import java.util.PropertyResourceBundle;
+
++import net.sourceforge.phpdt.externaltools.actions.PHPStopApacheAction;
+ import net.sourceforge.phpdt.externaltools.internal.model.ExternalToolsImages;
+ import net.sourceforge.phpdt.externaltools.internal.model.IPreferenceConstants;
+ import net.sourceforge.phpdt.externaltools.internal.model.VariableContextManager;
+@@ -28,6 +29,7 @@
+ import org.eclipse.core.runtime.Path;
+ import org.eclipse.core.runtime.Platform;
+ import org.eclipse.core.runtime.Status;
++import org.eclipse.jface.action.Action;
+ import org.eclipse.jface.preference.IPreferenceStore;
+ import org.eclipse.jface.preference.PreferenceConverter;
+ import org.eclipse.jface.resource.ImageDescriptor;
+@@ -310,4 +312,17 @@
+ }
+ });
+ }
++
++ /**
++ * @throws Exception
++ * @see org.eclipse.core.runtime.Plugin#stop(BundleContext context)
++ */
++ public void stop(BundleContext context) throws Exception {
++ super.stop(context);
++ }
++
++ public void stopHttpd() {
++ // stop httpd
++ new PHPStopApacheAction().run(new Action(){});
++ }
+ }
+\ No newline at end of file
eclipse-phpeclipse-rm-win32-help.patch:
Index: eclipse-phpeclipse-rm-win32-help.patch
===================================================================
RCS file: /cvs/pkgs/rpms/eclipse-phpeclipse/F-8/eclipse-phpeclipse-rm-win32-help.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- eclipse-phpeclipse-rm-win32-help.patch 21 Dec 2006 01:06:02 -0000 1.1
+++ eclipse-phpeclipse-rm-win32-help.patch 5 Jul 2008 13:40:27 -0000 1.2
@@ -1,20 +1,15 @@
-Index: plugin.xml
-===================================================================
-RCS file: /cvsroot/phpeclipse/net.sourceforge.phpeclipse.phphelp/plugin.xml,v
-retrieving revision 1.16
-diff -u -r1.16 plugin.xml
---- plugin.xml 6 Apr 2006 21:52:44 -0000 1.16
-+++ plugin.xml 11 Aug 2006 22:16:34 -0000
-@@ -86,12 +86,6 @@
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
-- name="%phphelpFormat"
-- category="net.sourceforge.phpeclipse.preferences.PHPPreferencePage"
-- class="net.sourceforge.phpdt.phphelp.PHPHelpPreferencePage"
-- id="net.sourceforge.phpdt.phphelp.PHPHelpPreferencePage">
-- </page>
-- <page
- name="%httpQuery"
- category="net.sourceforge.phpeclipse.preferences.PHPPreferencePage"
- class="net.sourceforge.phpdt.httpquery.preferences.ConfigurationPreferencePage"
+--- net.sourceforge.phpeclipse.phphelp/plugin.xml 2007-09-08 19:41:55.000000000 +0100
++++ net.sourceforge.phpeclipse.phphelp/plugin.xml 2008-06-14 18:32:13.000000000 +0100
+@@ -65,12 +65,6 @@
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+- name="%phphelpFormat"
+- category="net.sourceforge.phpeclipse.preferences.PHPPreferencePage"
+- class="net.sourceforge.phpdt.phphelp.PHPHelpPreferencePage"
+- id="net.sourceforge.phpdt.phphelp.PHPHelpPreferencePage">
+- </page>
+- <page
+ name="%httpQuery"
+ category="net.sourceforge.phpeclipse.preferences.PHPPreferencePage"
+ class="net.sourceforge.phpdt.httpquery.preferences.ConfigurationPreferencePage"
Index: eclipse-phpeclipse.spec
===================================================================
RCS file: /cvs/pkgs/rpms/eclipse-phpeclipse/F-8/eclipse-phpeclipse.spec,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- eclipse-phpeclipse.spec 21 Oct 2007 03:45:21 -0000 1.3
+++ eclipse-phpeclipse.spec 5 Jul 2008 13:40:27 -0000 1.4
@@ -1,109 +1,158 @@
-%define fedora 1
-%define redhat 0
-%if %{fedora}
-%define gcj_support 1
-%else
-%define gcj_support 0
-%endif
-
-%define eclipse_name eclipse
-%define eclipse_base %{_datadir}/%{eclipse_name}
-
-Name: eclipse-phpeclipse
-Version: 1.1.8
-Release: 17%{?dist}
-Summary: PHP Eclipse plugin
-
-Group: Development/Tools
-License: CPL
-URL: http://phpeclipse.net/
-
-Source0: phpeclipse-%{version}.tar.gz
-Source1: make-phpeclipse-source-archive.sh
-
-Patch0: %{name}-3.2-build.patch
-Patch1: %{name}-rm-win32-help.patch
-Patch2: %{name}-httpd-integration.patch
+%define eclipse_base %{_datadir}/eclipse
+%define gcj_support 1
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Name: eclipse-phpeclipse
+Version: 1.2.0
+Release: 0.2.svn1573%{?dist}
+Summary: PHP Eclipse plugin
+Group: Development/Tools
+License: CPL
+URL: http://phpeclipse.net/
+
+# source tarball and the script used to generate it from upstream's source control
+# script usage:
+# $ sh get-phpeclipse.sh
+Source0: phpeclipse-%{version}.tar.gz
+Source1: get-phpeclipse.sh
+
+Patch0: %{name}-broken-help-links.patch
+Patch1: %{name}-fix-build-props.patch
+Patch2: %{name}-httpd-integration.patch
+Patch3: %{name}-no-htmlparser.patch
+Patch4: %{name}-rm-win32-help.patch
+Patch5: %{name}-external-parser.patch
+Patch6: %{name}-external-preview.patch
-BuildRequires: eclipse-pde
-%if %{gcj_support}
-BuildRequires: gcc-java >= 4.0.2
-BuildRequires: java-gcj-compat-devel >= 1.0.33
-Requires(post): java-gcj-compat >= 1.0.33
-Requires(postun): java-gcj-compat >= 1.0.33
-%else
-BuildRequires: java-devel >= 1.4.2
-%endif
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%if %{gcj_support}
-ExclusiveArch: %{ix86} x86_64 ppc ia64
+BuildRequires: gcc-java
+BuildRequires: java-gcj-compat-devel
+Requires(post): java-gcj-compat
+Requires(postun): java-gcj-compat
%else
-BuildArch: noarch
+BuildArch: noarch
%endif
-
-Requires: eclipse-platform >= 1:3.2.1
-Requires: eclipse-pde-runtime
-Requires: php
-Requires: httpd
+BuildRequires: java-devel
+BuildRequires: jpackage-utils
+BuildRequires: eclipse-pde >= 1:3.3
+Requires: java
+Requires: jpackage-utils
+Requires: eclipse-platform >= 1:3.3
+Requires: php >= 5
+Requires: httpd
%description
-The PHPeclipse plugin allows developers to write PHP webpages and scripts in
-Eclipse.
+PHPEclipse is an open source PHP IDE based on the Eclipse platform. Features
+supported include syntax highlighting, content assist, PHP manual integration,
+templates and support for the XDebug and DBG debuggers.
%prep
-%setup -q -n phpeclipse-1.1.8
+%setup -q -n phpeclipse-%{version}
-pushd net.sourceforge.phpeclipse
+# apply patches
%patch0 -p0
-popd
-pushd net.sourceforge.phpeclipse.phphelp
%patch1 -p0
-popd
-%patch2
-
-%{__sed} --in-place "s:/usr/share/eclipse:%{eclipse_base}:" net.sourceforge.phpeclipse.externaltools/prefs/default_linux.properties
-%{__sed} --in-place 's/\r//' net.sourceforge.phpeclipse.feature/cpl-v10.html
+%patch2 -p0
+%patch3 -p0
+%patch4 -p0
+%patch5 -p0
+%patch6 -p0
+
+# ditch bundled libs in favor of building against fedora packaged libs
+rm net.sourceforge.phpeclipse.phpmanual.htmlparser/sax2.jar \
+ net.sourceforge.phpeclipse.phpmanual.htmlparser/htmllexer.jar \
+ net.sourceforge.phpeclipse.phpmanual.htmlparser/filterbuilder.jar \
+ net.sourceforge.phpeclipse.phpmanual.htmlparser/thumbelina.jar \
+ net.sourceforge.phpeclipse.phpmanual.htmlparser/junit.jar \
+ net.sourceforge.phpeclipse.phpmanual.htmlparser/htmlparser.jar
+build-jar-repository -s -p net.sourceforge.phpeclipse.phpmanual.htmlparser xml-commons-apis
+
+# this is done in a patch instead
+#grep -lR sax2 * | xargs sed --in-place "s/sax2/xml-commons-apis/"
+
+# fix jar versions
+find -name MANIFEST.MF | xargs sed --in-place "s/0.0.0/%{version}/"
+
+# make sure upstream hasn't sneaked in any jars we don't know about
+JARS=""
+for j in `find -name "*.jar"`; do
+ if [ ! -L $j ]; then
+ JARS="$JARS $j"
+ fi
+done
+if [ ! -z "$JARS" ]; then
+ echo "These jars should be deleted and symlinked to system jars: $JARS"
+ exit 1
+fi
%build
-# See comments in the script to understand this.
+# prepare pdebuild environment
/bin/sh -x %{eclipse_base}/buildscripts/copy-platform SDK %{eclipse_base}
-SDK=$(cd SDK > /dev/null && pwd)
-
-# Eclipse may try to write to the home directory.
mkdir home
+SDK=$(cd SDK > /dev/null && pwd)
homedir=$(cd home > /dev/null && pwd)
-# build the main phpeclipse feature
-# TODO: convert this to an `eclipse` command
-/usr/bin/java -cp $SDK/startup.jar \
- -Dosgi.sharedConfiguration.area=%{_libdir}/eclipse/configuration \
- -Duser.home=$homedir \
- org.eclipse.core.launcher.Main \
- -application org.eclipse.ant.core.antRunner \
- -DjavacFailOnError=true \
- -DdontUnzip=true \
- -Dtype=feature \
- -Did=net.sourceforge.phpeclipse \
- -DsourceDirectory=$(pwd) \
- -DbaseLocation=$SDK \
- -Dbuilder=%{eclipse_base}/plugins/org.eclipse.pde.build/templates/package-build \
- -DdontFetchAnything=true \
- -f %{eclipse_base}/plugins/org.eclipse.pde.build/scripts/build.xml
+# build the main feature
+java -cp $SDK/startup.jar \
+ -Dosgi.sharedConfiguration.area=%{_libdir}/eclipse/configuration \
+ org.eclipse.core.launcher.Main \
+ -application org.eclipse.ant.core.antRunner \
+ -Dtype=feature \
+ -Did=net.sourceforge.phpeclipse.feature \
+ -DbaseLocation=$SDK \
+ -DsourceDirectory=$(pwd) \
+ -DbuildDirectory=$(pwd)/build \
+ -Dbuilder=%{eclipse_base}/plugins/org.eclipse.pde.build/templates/package-build \
+ -f %{eclipse_base}/plugins/org.eclipse.pde.build/scripts/build.xml \
+ -vmargs -Duser.home=$homedir
+
+# build the debug features
+java -cp $SDK/startup.jar \
+ -Dosgi.sharedConfiguration.area=%{_libdir}/eclipse/configuration \
+ org.eclipse.core.launcher.Main \
+ -application org.eclipse.ant.core.antRunner \
+ -Dtype=feature \
+ -Did=net.sourceforge.phpeclipse.debug.feature \
+ -DbaseLocation=$SDK \
+ -DsourceDirectory=$(pwd) \
+ -DbuildDirectory=$(pwd)/build \
+ -Dbuilder=%{eclipse_base}/plugins/org.eclipse.pde.build/templates/package-build \
+ -f %{eclipse_base}/plugins/org.eclipse.pde.build/scripts/build.xml \
+ -vmargs -Duser.home=$homedir
+java -cp $SDK/startup.jar \
+ -Dosgi.sharedConfiguration.area=%{_libdir}/eclipse/configuration \
+ org.eclipse.core.launcher.Main \
+ -application org.eclipse.ant.core.antRunner \
+ -Dtype=feature \
+ -Did=net.sourceforge.phpeclipse.xdebug.feature \
+ -DbaseLocation=$SDK \
+ -DsourceDirectory=$(pwd) \
+ -DbuildDirectory=$(pwd)/build \
+ -Dbuilder=%{eclipse_base}/plugins/org.eclipse.pde.build/templates/package-build \
+ -f %{eclipse_base}/plugins/org.eclipse.pde.build/scripts/build.xml \
+ -vmargs -Duser.home=$homedir
%install
-rm -rf $RPM_BUILD_ROOT
-install -d -m 755 $RPM_BUILD_ROOT%{eclipse_base}
-unzip -q -d $RPM_BUILD_ROOT%{eclipse_base}/.. build/rpmBuild/net.sourceforge.phpeclipse.zip
-rm $RPM_BUILD_ROOT%{eclipse_base}/plugins/org.eclipse.pde.runtime*.jar
+rm -rf %{buildroot}
+install -d -m 755 %{buildroot}%{eclipse_base}
+unzip -q -d %{buildroot}%{eclipse_base}/.. build/rpmBuild/net.sourceforge.phpeclipse.feature.zip
+unzip -q -d %{buildroot}%{eclipse_base}/.. build/rpmBuild/net.sourceforge.phpeclipse.debug.feature.zip
+unzip -q -d %{buildroot}%{eclipse_base}/.. build/rpmBuild/net.sourceforge.phpeclipse.xdebug.feature.zip
+
+# need to recreate the symlinks to libraries that were setup in "prep"
+# because for some reason the ant copy task doesn't preserve them
+pushd %{buildroot}%{eclipse_base}/plugins/net.sourceforge.phpeclipse.phpmanual.htmlparser_*
+rm *.jar
+build-jar-repository -s -p . xml-commons-apis
+popd
%if %{gcj_support}
- aot-compile-rpm
+%{_bindir}/aot-compile-rpm
%endif
%clean
-rm -rf $RPM_BUILD_ROOT
+rm -rf %{buildroot}
%if %{gcj_support}
%post -p %{_bindir}/rebuild-gcj-db
@@ -112,25 +161,47 @@
%files
%defattr(-,root,root,-)
-%doc %{eclipse_base}/features/net.sourceforge.phpeclipse_%{version}/cpl-v10.html
-%{eclipse_base}/features/net.sourceforge.phpeclipse_*
-%{eclipse_base}/plugins/net.sourceforge.phpdt.smarty.ui_*
+%doc %{eclipse_base}/features/net.sourceforge.phpeclipse.feature_*/cpl-v10.html
+
+# main feature
+%{eclipse_base}/features/net.sourceforge.phpeclipse.feature_*
%{eclipse_base}/plugins/net.sourceforge.phpeclipse_*
%{eclipse_base}/plugins/net.sourceforge.phpeclipse.core_*
-%{eclipse_base}/plugins/net.sourceforge.phpeclipse.debug.core_*
-%{eclipse_base}/plugins/net.sourceforge.phpeclipse.debug.ui_*
%{eclipse_base}/plugins/net.sourceforge.phpeclipse.externaltools_*
-%{eclipse_base}/plugins/net.sourceforge.phpeclipse.launching_*
+%{eclipse_base}/plugins/net.sourceforge.phpeclipse.help_*
%{eclipse_base}/plugins/net.sourceforge.phpeclipse.phphelp_*
+%{eclipse_base}/plugins/net.sourceforge.phpeclipse.phpmanual_*
+%{eclipse_base}/plugins/net.sourceforge.phpeclipse.phpmanual.htmlparser_*
+%{eclipse_base}/plugins/net.sourceforge.phpeclipse.smarty.ui_*
%{eclipse_base}/plugins/net.sourceforge.phpeclipse.ui_*
%{eclipse_base}/plugins/net.sourceforge.phpeclipse.webbrowser_*
%{eclipse_base}/plugins/net.sourceforge.phpeclipse.xml.core_*
%{eclipse_base}/plugins/net.sourceforge.phpeclipse.xml.ui_*
+
+# debug features
+%{eclipse_base}/features/net.sourceforge.phpeclipse.debug.feature_*
+%{eclipse_base}/plugins/net.sourceforge.phpeclipse.debug.core_*
+%{eclipse_base}/plugins/net.sourceforge.phpeclipse.debug.ui_*
+%{eclipse_base}/plugins/net.sourceforge.phpeclipse.launching_*
+%{eclipse_base}/features/net.sourceforge.phpeclipse.xdebug.feature_*
+%{eclipse_base}/plugins/net.sourceforge.phpeclipse.xdebug.core_*
+%{eclipse_base}/plugins/net.sourceforge.phpeclipse.xdebug.ui_*
+
%if %{gcj_support}
%{_libdir}/gcj/%{name}
%endif
%changelog
+* Sun Jun 29 2008 Mat Booth <fedora at matbooth.co.uk> 1.2.0-0.2.svn1573
+- Add patch for Show External Preview functionality.
+- Add patch for Use External PHP Parser functionality.
+
+* Sat Jun 28 2008 Mat Booth <fedora at matbooth.co.uk> 1.2.0-0.1.svn1573
+- New maintainer.
+- Update to version 1.2.0 pre-release, svn1573.
+- Adapt patches to new version.
+- Update package for new Eclipse plugin guidelines.
+
* Sat Oct 20 2007 Brandon Holbrook <fedora at theholbrooks.org> 1.1.8-17
- Reference php5 instead of php4 in httpd.conf [bug 314831]
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/eclipse-phpeclipse/F-8/sources,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- sources 21 Dec 2006 01:06:02 -0000 1.2
+++ sources 5 Jul 2008 13:40:27 -0000 1.3
@@ -1 +1 @@
-4098f937baf31afab1225481c6e0fd94 phpeclipse-1.1.8.tar.gz
+7e80bbf2cebb44617f2aee36d0802574 phpeclipse-1.2.0.tar.gz
--- eclipse-phpeclipse-3.2-build.patch DELETED ---
--- make-phpeclipse-source-archive.sh DELETED ---
- Previous message (by thread): rpms/asunder/F-9 asunder.spec,1.3,1.4 sources,1.4,1.5
- Next message (by thread): rpms/mysql++/devel .cvsignore, 1.10, 1.11 mysql++.spec, 1.11, 1.12 sources, 1.10, 1.11 mysql++-3.0.3-mystring.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list