From: axelcl Date: Tue, 14 Jun 2005 04:42:19 +0000 (+0000) Subject: Created a separated 'externaltools' plugin X-Git-Url: http://git.phpeclipse.com Created a separated 'externaltools' plugin --- diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/clcl16/activate.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/clcl16/activate.gif deleted file mode 100644 index 7a1511d..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/clcl16/activate.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/clcl16/add_co.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/clcl16/add_co.gif deleted file mode 100644 index dad7260..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/clcl16/add_co.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/clcl16/deactivate.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/clcl16/deactivate.gif deleted file mode 100644 index 740419b..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/clcl16/deactivate.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/clcl16/element.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/clcl16/element.gif deleted file mode 100644 index 06d0079..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/clcl16/element.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/clcl16/elements.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/clcl16/elements.gif deleted file mode 100644 index 76b351e..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/clcl16/elements.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/clcl16/error.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/clcl16/error.gif deleted file mode 100644 index c2bfdd6..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/clcl16/error.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/clcl16/gotoobj_tsk.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/clcl16/gotoobj_tsk.gif deleted file mode 100644 index 082e49f..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/clcl16/gotoobj_tsk.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/clcl16/moveDown.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/clcl16/moveDown.gif deleted file mode 100644 index 8392f33..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/clcl16/moveDown.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/clcl16/moveUp.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/clcl16/moveUp.gif deleted file mode 100644 index 9b278e6..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/clcl16/moveUp.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/clcl16/properties.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/clcl16/properties.gif deleted file mode 100644 index ec0cba1..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/clcl16/properties.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/clcl16/refresh.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/clcl16/refresh.gif deleted file mode 100644 index a063c23..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/clcl16/refresh.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/clcl16/removeAll_co.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/clcl16/removeAll_co.gif deleted file mode 100644 index 2c069ab..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/clcl16/removeAll_co.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/clcl16/remove_co.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/clcl16/remove_co.gif deleted file mode 100644 index 12a9167..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/clcl16/remove_co.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/clcl16/run_tool.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/clcl16/run_tool.gif deleted file mode 100644 index 2088548..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/clcl16/run_tool.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/clcl16/search.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/clcl16/search.gif deleted file mode 100644 index 6dc3ebe..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/clcl16/search.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/ctool16/external_tools.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/ctool16/external_tools.gif deleted file mode 100644 index 2133b45..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/ctool16/external_tools.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/cview16/external_tools.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/cview16/external_tools.gif deleted file mode 100644 index 2133b45..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/cview16/external_tools.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/cview16/log_console_view.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/cview16/log_console_view.gif deleted file mode 100644 index 3200ac3..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/cview16/log_console_view.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/dlcl16/copy_tool.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/dlcl16/copy_tool.gif deleted file mode 100644 index c7a98e8..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/dlcl16/copy_tool.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/dlcl16/del_tool.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/dlcl16/del_tool.gif deleted file mode 100644 index a6bfcfd..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/dlcl16/del_tool.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/dlcl16/new_tool.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/dlcl16/new_tool.gif deleted file mode 100644 index 813cb2f..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/dlcl16/new_tool.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/dlcl16/paste_tool.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/dlcl16/paste_tool.gif deleted file mode 100644 index 0dd5d21..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/dlcl16/paste_tool.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/dlcl16/prop_tool.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/dlcl16/prop_tool.gif deleted file mode 100644 index eb165ff..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/dlcl16/prop_tool.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/dlcl16/refresh.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/dlcl16/refresh.gif deleted file mode 100644 index b2281b4..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/dlcl16/refresh.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/dlcl16/rename_tool.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/dlcl16/rename_tool.gif deleted file mode 100644 index 99f3092..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/dlcl16/rename_tool.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/dlcl16/run_tool.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/dlcl16/run_tool.gif deleted file mode 100644 index a281bc1..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/dlcl16/run_tool.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/dlcl16/runwith_tool.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/dlcl16/runwith_tool.gif deleted file mode 100644 index a281bc1..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/dlcl16/runwith_tool.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/dtool16/external_tools.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/dtool16/external_tools.gif deleted file mode 100644 index fae592d..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/dtool16/external_tools.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/elcl16/copy_tool.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/elcl16/copy_tool.gif deleted file mode 100644 index 41bf445..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/elcl16/copy_tool.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/elcl16/del_tool.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/elcl16/del_tool.gif deleted file mode 100644 index 34643b8..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/elcl16/del_tool.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/elcl16/new_tool.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/elcl16/new_tool.gif deleted file mode 100644 index 234594a..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/elcl16/new_tool.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/elcl16/paste_tool.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/elcl16/paste_tool.gif deleted file mode 100644 index 6e76152..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/elcl16/paste_tool.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/elcl16/prop_tool.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/elcl16/prop_tool.gif deleted file mode 100644 index eb165ff..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/elcl16/prop_tool.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/elcl16/refresh.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/elcl16/refresh.gif deleted file mode 100644 index 919423d..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/elcl16/refresh.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/elcl16/rename_tool.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/elcl16/rename_tool.gif deleted file mode 100644 index 8337ba9..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/elcl16/rename_tool.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/elcl16/run_tool.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/elcl16/run_tool.gif deleted file mode 100644 index 053738c..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/elcl16/run_tool.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/elcl16/runwith_tool.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/elcl16/runwith_tool.gif deleted file mode 100644 index 053738c..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/elcl16/runwith_tool.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/etool16/external_tools.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/etool16/external_tools.gif deleted file mode 100644 index f7472c9..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/etool16/external_tools.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/eview16/external_tools.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/eview16/external_tools.gif deleted file mode 100644 index f7472c9..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/eview16/external_tools.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/eview16/log_console_view.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/eview16/log_console_view.gif deleted file mode 100644 index 3f6fff3..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/eview16/log_console_view.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/obj16/builder.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/obj16/builder.gif deleted file mode 100644 index 20e7bae..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/obj16/builder.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/obj16/classpath.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/obj16/classpath.gif deleted file mode 100644 index f966fc3..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/obj16/classpath.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/obj16/external_tools.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/obj16/external_tools.gif deleted file mode 100644 index 2133b45..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/obj16/external_tools.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/obj16/file_obj.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/obj16/file_obj.gif deleted file mode 100644 index 6b86d07..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/obj16/file_obj.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/obj16/invalid_build_tool.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/obj16/invalid_build_tool.gif deleted file mode 100644 index b04020b..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/obj16/invalid_build_tool.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/obj16/jar_l_obj.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/obj16/jar_l_obj.gif deleted file mode 100644 index 11e04e2..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/obj16/jar_l_obj.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/obj16/main_tab.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/obj16/main_tab.gif deleted file mode 100644 index f9fb6b0..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/obj16/main_tab.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/obj16/options_tab.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/obj16/options_tab.gif deleted file mode 100644 index 8670a38..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/obj16/options_tab.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/obj16/prop_ps.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/obj16/prop_ps.gif deleted file mode 100644 index ec0cba1..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/obj16/prop_ps.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/obj16/ttype_program.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/obj16/ttype_program.gif deleted file mode 100644 index 2133b45..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/obj16/ttype_program.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/externaltools/full/obj16/type.gif b/net.sourceforge.phpeclipse/icons/externaltools/full/obj16/type.gif deleted file mode 100644 index 2db7604..0000000 Binary files a/net.sourceforge.phpeclipse/icons/externaltools/full/obj16/type.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/obj16/apache.gif b/net.sourceforge.phpeclipse/icons/obj16/apache.gif deleted file mode 100644 index 312055f..0000000 Binary files a/net.sourceforge.phpeclipse/icons/obj16/apache.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/obj16/apache_restart.gif b/net.sourceforge.phpeclipse/icons/obj16/apache_restart.gif deleted file mode 100644 index 55d97b3..0000000 Binary files a/net.sourceforge.phpeclipse/icons/obj16/apache_restart.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/obj16/apache_stop.gif b/net.sourceforge.phpeclipse/icons/obj16/apache_stop.gif deleted file mode 100644 index 1649c3d..0000000 Binary files a/net.sourceforge.phpeclipse/icons/obj16/apache_stop.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/obj16/sql.gif b/net.sourceforge.phpeclipse/icons/obj16/sql.gif deleted file mode 100644 index c17116d..0000000 Binary files a/net.sourceforge.phpeclipse/icons/obj16/sql.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/obj16/xampp_start.gif b/net.sourceforge.phpeclipse/icons/obj16/xampp_start.gif deleted file mode 100644 index f08b147..0000000 Binary files a/net.sourceforge.phpeclipse/icons/obj16/xampp_start.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/icons/obj16/xampp_stop.gif b/net.sourceforge.phpeclipse/icons/obj16/xampp_stop.gif deleted file mode 100644 index cccf4ee..0000000 Binary files a/net.sourceforge.phpeclipse/icons/obj16/xampp_stop.gif and /dev/null differ diff --git a/net.sourceforge.phpeclipse/plugin.xml b/net.sourceforge.phpeclipse/plugin.xml index 83b3cff..1a46707 100644 --- a/net.sourceforge.phpeclipse/plugin.xml +++ b/net.sourceforge.phpeclipse/plugin.xml @@ -36,8 +36,9 @@ - + + @@ -241,17 +242,7 @@ id="net.sourceforge.phpeclipse.PHPPerspective"> - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + --> @@ -1458,97 +1295,97 @@ - + --> + + - - - @@ -1872,6 +1709,7 @@ expanderClass="net.sourceforge.phpdt.externaltools.variable.WorkingSetExpander"> + ", indx)) != -1) { - // newer php error output (tested with 4.2.3) - scanLine(output, file, indx, brIndx); - indx = brIndx + 6; - flag = false; - } - if (flag) { - while ((brIndx = output.indexOf("
", indx)) != -1) { - // older php error output (tested with 4.2.3) - scanLine(output, file, indx, brIndx); - indx = brIndx + 4; - } - } - } - - private void scanLine(final String output, final IFile file, final int indx, final int brIndx) throws CoreException { - String current; - // String outLineNumberString; never used - final StringBuffer lineNumberBuffer = new StringBuffer(10); - char ch; - current = output.substring(indx, brIndx); - - if (current.indexOf(PARSE_WARNING_STRING) != -1 || current.indexOf(PARSE_ERROR_STRING) != -1) { - final int onLine = current.indexOf("on line "); - if (onLine != -1) { - lineNumberBuffer.delete(0, lineNumberBuffer.length()); - for (int i = onLine; i < current.length(); i++) { - ch = current.charAt(i); - if ('0' <= ch && '9' >= ch) { - lineNumberBuffer.append(ch); - } - } - - final int lineNumber = Integer.parseInt(lineNumberBuffer.toString()); - - final Hashtable attributes = new Hashtable(); - - current = StringUtil.replaceAll(current, "\n", ""); - current = StringUtil.replaceAll(current, "", ""); - current = StringUtil.replaceAll(current, "", ""); - MarkerUtilities.setMessage(attributes, current); - - if (current.indexOf(PARSE_ERROR_STRING) != -1) - attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_ERROR)); - else if (current.indexOf(PARSE_WARNING_STRING) != -1) - attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_WARNING)); - else - attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_INFO)); - MarkerUtilities.setLineNumber(attributes, lineNumber); - MarkerUtilities.createMarker(file, attributes, PROBLEM_ID); - } - } - } - - /** - * This will set a marker. - * - * @param file - * the file that generated the marker - * @param message - * the message - * @param charStart - * the starting character - * @param charEnd - * the end character - * @param errorLevel - * the error level ({@link ExternalPHPParser#ERROR},{@link ExternalPHPParser#INFO},{@link ExternalPHPParser#WARNING}), - * {@link ExternalPHPParser#TASK}) - * @throws CoreException - * an exception throwed by the MarkerUtilities - */ - private void setMarker(final IFile file, final String message, final int charStart, final int charEnd, final int errorLevel) - throws CoreException { - if (file != null) { - final Hashtable attributes = new Hashtable(); - MarkerUtilities.setMessage(attributes, message); - switch (errorLevel) { - case ERROR: - attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_ERROR)); - break; - case WARNING: - attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_WARNING)); - break; - case INFO: - attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_INFO)); - break; - case TASK: - attributes.put(IMarker.SEVERITY, new Integer(IMarker.TASK)); - break; - } - MarkerUtilities.setCharStart(attributes, charStart); - MarkerUtilities.setCharEnd(attributes, charEnd); - MarkerUtilities.createMarker(file, attributes, PROBLEM_ID); - } - } - - /** - * This will set a marker. - * - * @param file - * the file that generated the marker - * @param message - * the message - * @param line - * the line number - * @param errorLevel - * the error level ({@link ExternalPHPParser#ERROR},{@link ExternalPHPParser#INFO},{@link ExternalPHPParser#WARNING}) - * @throws CoreException - * an exception throwed by the MarkerUtilities - */ - private void setMarker(final IFile file, final String message, final int line, final int errorLevel, final String location) - throws CoreException { - if (file != null) { - String markerKind = PROBLEM_ID; - final Hashtable attributes = new Hashtable(); - MarkerUtilities.setMessage(attributes, message); - switch (errorLevel) { - case ERROR: - attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_ERROR)); - break; - case WARNING: - attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_WARNING)); - break; - case INFO: - attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_INFO)); - break; - case TASK: - attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_INFO)); - markerKind = IMarker.TASK; - break; - } - attributes.put(IMarker.LOCATION, location); - MarkerUtilities.setLineNumber(attributes, line); - MarkerUtilities.createMarker(file, attributes, markerKind); - } - } - - /** - * This will set a marker. - * - * @param message - * the message - * @param charStart - * the starting character - * @param charEnd - * the end character - * @param errorLevel - * the error level ({@link ExternalPHPParser#ERROR},{@link ExternalPHPParser#INFO},{@link ExternalPHPParser#WARNING}) - * @throws CoreException - * an exception throwed by the MarkerUtilities - */ - private void setMarker(final String message, final int charStart, final int charEnd, final int errorLevel, final String location) - throws CoreException { - if (fFileToParse != null) { - setMarker(fFileToParse, message, charStart, charEnd, errorLevel, location); - } - } - - /** - * This will set a marker. - * - * @param file - * the file that generated the marker - * @param message - * the message - * @param charStart - * the starting character - * @param charEnd - * the end character - * @param errorLevel - * the error level ({@link ExternalPHPParser#ERROR},{@link ExternalPHPParser#INFO},{@link ExternalPHPParser#WARNING}) - * @param location - * the location of the error - * @throws CoreException - * an exception throwed by the MarkerUtilities - */ - private void setMarker(final IFile file, final String message, final int charStart, final int charEnd, final int errorLevel, - final String location) throws CoreException { - if (file != null) { - final Hashtable attributes = new Hashtable(); - MarkerUtilities.setMessage(attributes, message); - switch (errorLevel) { - case ERROR: - attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_ERROR)); - break; - case WARNING: - attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_WARNING)); - break; - case INFO: - attributes.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_INFO)); - break; - case TASK: - attributes.put(IMarker.SEVERITY, new Integer(IMarker.TASK)); - break; - } - attributes.put(IMarker.LOCATION, location); - MarkerUtilities.setCharStart(attributes, charStart); - MarkerUtilities.setCharEnd(attributes, charEnd); - MarkerUtilities.createMarker(file, attributes, PROBLEM_ID); //IMarker.PROBLEM); - } - } - - private String getParserOutput(String command, String consoleMessage) { - try { - PHPConsole console = new PHPConsole(); - try { - console.println(consoleMessage + command); - } catch (Throwable th) { - - } - - Runtime runtime = Runtime.getRuntime(); - - // runs the command - Process p = runtime.exec(command); - - // gets the input stream to have the post-compile-time information - InputStream stream = p.getInputStream(); - - // get the string from Stream - String consoleOutput = PHPConsole.getStringFromStream(stream); - - // prints out the information - if (console != null) { - console.print(consoleOutput); - } - return consoleOutput; - - } catch (IOException e) { - MessageDialog.openInformation(null, "IOException: ", e.getMessage()); - } - return ""; - } -} \ No newline at end of file diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPDocumentorAction.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPDocumentorAction.java deleted file mode 100644 index 420c23a..0000000 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPDocumentorAction.java +++ /dev/null @@ -1,104 +0,0 @@ -/********************************************************************** -Copyright (c) 2000, 2002 IBM Corp. and others. -All rights reserved. This program and the accompanying materials -are made available under the terms of the Common Public License v1.0 -which accompanies this distribution, and is available at -http://www.eclipse.org/legal/cpl-v10.html - -Contributors: - IBM Corporation - Initial implementation - www.phpeclipse.de -**********************************************************************/ -package net.sourceforge.phpeclipse.actions; - -import java.util.Iterator; - -import net.sourceforge.phpdt.externaltools.launchConfigurations.ExternalToolsUtil; -import net.sourceforge.phpeclipse.PHPeclipsePlugin; - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IResource; -import org.eclipse.jface.action.IAction; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.ISelectionProvider; -import org.eclipse.jface.viewers.StructuredSelection; -import org.eclipse.ui.IActionDelegate; -import org.eclipse.ui.IObjectActionDelegate; -import org.eclipse.ui.IWorkbenchPart; - -public class PHPDocumentorAction implements IObjectActionDelegate { - - private IWorkbenchPart workbenchPart; - /** - * Constructor for Action1. - */ - public PHPDocumentorAction() { - super(); - } - - /** - * @see IObjectActionDelegate#setActivePart(IAction, IWorkbenchPart) - */ - public void setActivePart(IAction action, IWorkbenchPart targetPart) { - workbenchPart = targetPart; - } - - // public static void open(final URL url, final Shell shell, final String dialogTitle) { - // IHelp help= WorkbenchHelp.getHelpSupport(); - // if (help != null) { - // WorkbenchHelp.getHelpSupport().displayHelpResource(url.toExternalForm()); - // } else { - // showMessage(shell, dialogTitle, ActionMessages.getString("OpenBrowserUtil.help_not_available"), false); //$NON-NLS-1$ - // } - // } - - public void run(IAction action) { - ISelectionProvider selectionProvider = null; - selectionProvider = workbenchPart.getSite().getSelectionProvider(); - - StructuredSelection selection = null; - selection = (StructuredSelection) selectionProvider.getSelection(); - - final IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore(); - final String phpExecutable = store.getString(PHPeclipsePlugin.PHP_RUN_PREF); - - //Shell shell = null; - Iterator iterator = null; - iterator = selection.iterator(); - while (iterator.hasNext()) { - // obj => selected object in the view - Object obj = iterator.next(); - - // is it a resource - if (obj instanceof IResource) { - IResource resource = (IResource) obj; - - // check the resource - switch (resource.getType()) { - case IResource.PROJECT : - IProject project = (IProject) resource; - String projectName = project.getLocation().toString(); - String targetDirectory = projectName + "/phpdoc"; - // example: - // C:\>php.exe "C:\Path\To\phpdoc" -t targetdir -o HTML:default:default -d parsedir - String argument = - "\"C:\\php\\phpDocumentor\\phpdoc\" -t " + targetDirectory + " -o HTML:default:default -d " + projectName; - ExternalToolsUtil.execute("phpdocumentor", phpExecutable, argument, true); - break; - // case IResource.FILE : - // // single file: - // IFile file = (IFile) resource; - // PHPParserSuperclass.phpExternalParse(file); - } - } - } - } - - /** - * @see IActionDelegate#selectionChanged(IAction, ISelection) - */ - public void selectionChanged(IAction action, ISelection selection) { - } - -} diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPExternalParserAction.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPExternalParserAction.java deleted file mode 100644 index ff9ef33..0000000 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPExternalParserAction.java +++ /dev/null @@ -1,89 +0,0 @@ -/********************************************************************** -Copyright (c) 2000, 2002 IBM Corp. and others. -All rights reserved. This program and the accompanying materials -are made available under the terms of the Common Public License v1.0 -which accompanies this distribution, and is available at -http://www.eclipse.org/legal/cpl-v10.html - -Contributors: - IBM Corporation - Initial implementation - www.phpeclipse.de -**********************************************************************/ -package net.sourceforge.phpeclipse.actions; - -import java.util.Iterator; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IResource; -import org.eclipse.jface.action.IAction; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.ISelectionProvider; -import org.eclipse.jface.viewers.StructuredSelection; -import org.eclipse.ui.IActionDelegate; -import org.eclipse.ui.IObjectActionDelegate; -import org.eclipse.ui.IWorkbenchPart; - - -public class PHPExternalParserAction implements IObjectActionDelegate { - - private IWorkbenchPart workbenchPart; - /** - * Constructor for Action1. - */ - public PHPExternalParserAction() { - super(); - } - - /** - * @see IObjectActionDelegate#setActivePart(IAction, IWorkbenchPart) - */ - public void setActivePart(IAction action, IWorkbenchPart targetPart) { - workbenchPart = targetPart; - } - - // public static void open(final URL url, final Shell shell, final String dialogTitle) { - // IHelp help= WorkbenchHelp.getHelpSupport(); - // if (help != null) { - // WorkbenchHelp.getHelpSupport().displayHelpResource(url.toExternalForm()); - // } else { - // showMessage(shell, dialogTitle, ActionMessages.getString("OpenBrowserUtil.help_not_available"), false); //$NON-NLS-1$ - // } - // } - - public void run(IAction action) { - ISelectionProvider selectionProvider = null; - selectionProvider = workbenchPart.getSite().getSelectionProvider(); - - StructuredSelection selection = null; - selection = (StructuredSelection) selectionProvider.getSelection(); - - //Shell shell = null; - Iterator iterator = null; - iterator = selection.iterator(); - while (iterator.hasNext()) { - // obj => selected object in the view - Object obj = iterator.next(); - - // is it a resource - if (obj instanceof IResource) { - IResource resource = (IResource) obj; - - // check if it's a file resource - switch (resource.getType()) { - - case IResource.FILE : - // single file: - ExternalPHPParser parser = new ExternalPHPParser((IFile)resource); - parser.phpExternalParse(); - } - } - } - } - - /** - * @see IActionDelegate#selectionChanged(IAction, ISelection) - */ - public void selectionChanged(IAction action, ISelection selection) { - } - -} diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPOpenSQLTableEditorAction.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPOpenSQLTableEditorAction.java deleted file mode 100644 index 2900c62..0000000 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPOpenSQLTableEditorAction.java +++ /dev/null @@ -1,316 +0,0 @@ -/*********************************************************************************************************************************** - * Copyright (c) 2000, 2002 IBM Corp. and others. All rights reserved. This program and the accompanying materials are made - * available under the terms of the Common Public License v1.0 which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/cpl-v10.html - * - * Contributors: www.phpeclipse.de - **********************************************************************************************************************************/ -package net.sourceforge.phpeclipse.actions; - -import java.sql.SQLException; - -import net.sourceforge.phpeclipse.phpeditor.PHPEditor; -import net.sourceforge.phpeclipse.ui.WebUI; -import net.sourceforge.phpeclipse.ui.overlaypages.ProjectPrefUtil; - -import org.eclipse.core.resources.IContainer; -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.runtime.Path; -import org.eclipse.jface.action.IAction; -import org.eclipse.jface.text.BadLocationException; -import org.eclipse.jface.text.IDocument; -import org.eclipse.jface.text.ITextSelection; -import org.eclipse.jface.text.TextSelection; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.swt.graphics.Point; -import org.eclipse.ui.IEditorActionDelegate; -import org.eclipse.ui.IEditorPart; -import org.eclipse.ui.IFileEditorInput; -import org.eclipse.ui.IViewPart; -import org.eclipse.ui.IWorkbenchPage; -import org.eclipse.ui.IWorkbenchWindow; -import org.eclipse.ui.PartInitException; -import org.eclipse.ui.actions.ActionDelegate; - -import com.quantum.ExternalInterface; -import com.quantum.QuantumPlugin; -// import com.quantum.util.connection.NotConnectedException; - -public class PHPOpenSQLTableEditorAction extends ActionDelegate implements IEditorActionDelegate { - - private IWorkbenchWindow fWindow; - - private PHPEditor fEditor; - - private IProject fProject; - - public void dispose() { - } - - public void init(IWorkbenchWindow window) { - this.fWindow = window; - } - - public void selectionChanged(IAction action, ISelection selection) { - if (!selection.isEmpty()) { - if (selection instanceof TextSelection) { - action.setEnabled(true); - } else if (fWindow.getActivePage() != null && fWindow.getActivePage().getActivePart() != null) { - // - } - } - } - - private IWorkbenchPage getActivePage() { - fWindow = fEditor.getEditorSite().getWorkbenchWindow(); - IWorkbenchPage page = fWindow.getActivePage(); - return page; - } - - public IContainer getWorkingLocation(IFileEditorInput editorInput) { - if (editorInput == null || editorInput.getFile() == null) { - return null; - } - return editorInput.getFile().getParent(); - } - - private IFile getIncludeFile(IProject project, IFileEditorInput editorInput, String relativeFilename) { - // IContainer container = getWorkingLocation(editorInput); - // String fullPath = project.getLocation().toString(); - Path path = new Path(relativeFilename); - IFile file = project.getFile(path); - return file; - } - - public void run(IAction action) { - if (fEditor == null) { - IEditorPart targetEditor = fWindow.getActivePage().getActiveEditor(); - if (targetEditor != null && (targetEditor instanceof PHPEditor)) { - fEditor = (PHPEditor) targetEditor; - } - } - if (fEditor != null) { - fWindow = fEditor.getEditorSite().getWorkbenchWindow(); - IFile f = ((IFileEditorInput) fEditor.getEditorInput()).getFile(); - fProject = f.getProject(); - String bookmarkString = ProjectPrefUtil.getMiscProjectsPreferenceValue(fProject, WebUI.PHP_BOOKMARK_DEFAULT); - if (bookmarkString != null && !bookmarkString.equals("")) { - ITextSelection selection = (ITextSelection) fEditor.getSelectionProvider().getSelection(); - IDocument doc = fEditor.getDocumentProvider().getDocument(fEditor.getEditorInput()); - int pos = selection.getOffset(); - // System.out.println(selection.getText()); - String tableName = getSQLTableName(doc, pos); - if (tableName != null && tableName.length() > 0) - try { - ExternalInterface.displayTable(bookmarkString, tableName); - - IViewPart viewPart = null; - String view = "com.quantum.view.tableview.TableView"; - try { - IWorkbenchPage page = QuantumPlugin.getDefault().getActivePage(); - viewPart = page.findView(view); - if (viewPart == null) { - viewPart = page.showView(view); - } - page.bringToTop(viewPart); - } catch (PartInitException e) { - e.printStackTrace(); - } - } catch (SQLException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (Exception /* NotConnectedException */ e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - - // - // IViewPart viewPart = null; - // String view = "com.quantum.view.tableview.TableView"; - // try { - // IWorkbenchPage page = QuantumPlugin.getDefault().getActivePage(); - // viewPart = page.findView(view); - // if (viewPart == null) { - // viewPart = page.showView(view); - // } - // page.bringToTop(viewPart); - // getTables((TableView) viewPart, fProject, tableName); - // } catch (PartInitException e) { - // e.printStackTrace(); - // } - - } - } - - public void setActiveEditor(IAction action, IEditorPart targetEditor) { - if (targetEditor != null && (targetEditor instanceof PHPEditor)) { - fEditor = (PHPEditor) targetEditor; - } - } - - private String getSQLTableName(IDocument doc, int pos) { - Point word = null; - int start = -1; - int end = -1; - - try { - - int position = pos; - char character; - - while (position >= 0) { - character = doc.getChar(position); - if (Character.isWhitespace(character) || (character == '\"') || (character == '\'') || (character == '\r') - || (character == '\n')) - break; - --position; - } - - start = position; - - position = pos; - int length = doc.getLength(); - - while (position < length) { - character = doc.getChar(position); - if (Character.isWhitespace(character) || (character == '\"') || (character == '\'') || (character == '\r') - || (character == '\n')) - break; - ++position; - } - - start++; - end = position; - - if (end > start) - word = new Point(start, end - start); - - } catch (BadLocationException x) { - } - - if (word != null) { - try { - return doc.get(word.x, word.y); - } catch (BadLocationException e) { - } - } - return ""; - } - - // public void getTables(TableView tableView, IProject project, String tableName) { - // // Get The Database bookmark from the Quantum SQL plugin: - // BookmarkCollection sqlBookMarks = BookmarkCollection.getInstance(); - // if (sqlBookMarks != null) { - // String bookmarkString = ProjectPrefUtil.getMiscProjectsPreferenceValue(project, - // WebUI.PHP_BOOKMARK_DEFAULT); - // if (bookmarkString != null && !bookmarkString.equals("")) { - // Bookmark bookmark = sqlBookMarks.find(bookmarkString); - // ArrayList sqlList = new ArrayList(); - // if (bookmark != null && !bookmark.isConnected()) { - // new ConnectionUtil().connect(bookmark, null); - // } - // if (bookmark != null && bookmark.isConnected()) { - // try { - // Connection connection = bookmark.getConnection(); - // DatabaseMetaData metaData = connection.getMetaData(); - // ConnectionUtil connectionUtil = new ConnectionUtil(); - // Entity entity; - // DatabaseAdapter adapter; - // - // if (metaData != null) { - // String columnName; - // String prefixWithoutDollar = tableName; - // if (prefixWithoutDollar.charAt(0) == '$') { - // prefixWithoutDollar = prefixWithoutDollar.substring(1); - // } - // ResultSet set; - // set = metaData.getTables(null, null, "%" + prefixWithoutDollar - // + "%", null); - // while (set.next()) { - // tableName = set.getString("TABLE_NAME"); - // tableName = (tableName == null) ? "" : tableName.trim(); - // if (tableName != null && tableName.length() > 0) { - // sqlList.add(tableName); - // } - // } - // set.close(); - // EntityFactory entityFactory = EntityFactory.getInstance(); - // if (sqlList.size() == 1) { - // adapter = bookmark.getAdapter(); - // entity = entityFactory.create(bookmark, null, (String) sqlList - // .get(0), Entity.TABLE_TYPE, false); - // String query = adapter.getTableQuery(entity.getQualifiedName()); - // - // try { - // SQLResults results = MultiSQLServer.getInstance().execute( - // bookmark, connectionUtil.connect(bookmark, fWindow.getShell()), - // entity, query); - // - // if (results != null && results.isResultSet()) { - // SQLResultSetCollection.getInstance().addSQLResultSet( - // (SQLResultSetResults) results); - // } - // } catch (SQLException e) { - // ExceptionDisplayDialog.openError(fWindow.getShell(), null, null, e); - // } - // // tableView.loadTable(entityFactory.create( - // // bookmark, null, - // // (String) sqlList.get(0), - // // Entity.TABLE_TYPE)); - // } else if (sqlList.size() > 1) { - // ListSelectionDialog listSelectionDialog = new ListSelectionDialog( - // PHPeclipsePlugin.getDefault().getWorkbench() - // .getActiveWorkbenchWindow().getShell(), sqlList, - // new ListContentProvider(), new LabelProvider(), - // "Select the SQL table to open."); - // listSelectionDialog.setTitle("Multiple tablenames found"); - // if (listSelectionDialog.open() == Window.OK) { - // Object[] locations = listSelectionDialog.getResult(); - // if (locations != null) { - // for (int i = 0; i < locations.length; i++) { - // adapter = bookmark.getAdapter(); - // entity = entityFactory.create(bookmark, null, - // (String) locations[i], Entity.TABLE_TYPE, false); - // String query = adapter.getTableQuery(entity - // .getQualifiedName()); - // - // try { - // SQLResults results = MultiSQLServer.getInstance() - // .execute(bookmark, - // connectionUtil.connect(bookmark, fWindow.getShell()), - // entity, query); - // - // if (results != null && results.isResultSet()) { - // SQLResultSetCollection.getInstance().addSQLResultSet( - // (SQLResultSetResults) results); - // } - // } catch (SQLException e) { - // ExceptionDisplayDialog.openError(fWindow.getShell(), null, null, e); - // } - // - // // tableView - // // .loadTable(entityFactory - // // .create( - // // bookmark, - // // null, - // // (String) locations[i], - // // Entity.TABLE_TYPE)); - // } - // - // } - // } - // } - // } - // } catch (NotConnectedException e) { - // // ignore this - not mission critical - // } catch (SQLException e) { - // e.printStackTrace(); - // } - // } - // } - // } - // } - -} \ No newline at end of file diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPRestartApacheAction.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPRestartApacheAction.java deleted file mode 100644 index dc350e7..0000000 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPRestartApacheAction.java +++ /dev/null @@ -1,29 +0,0 @@ -/********************************************************************** -Copyright (c) 2000, 2002 IBM Corp. and others. -All rights reserved. This program and the accompanying materials -are made available under the terms of the Common Public License v1.0 -which accompanies this distribution, and is available at -http://www.eclipse.org/legal/cpl-v10.html - -Contributors: - IBM Corporation - Initial implementation - www.phpeclipse.de -**********************************************************************/ -package net.sourceforge.phpeclipse.actions; - -import net.sourceforge.phpeclipse.PHPeclipsePlugin; - -import org.eclipse.jface.action.IAction; -import org.eclipse.jface.preference.IPreferenceStore; - -public class PHPRestartApacheAction extends PHPStartApacheAction { - public void run(IAction action) { - final IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore(); - // execute(store.getString(PHPeclipsePlugin.APACHE_RESTART_PREF), "Restart Apache: "); - execute( - "apache_restart", - store.getString(PHPeclipsePlugin.APACHE_RUN_PREF), - store.getString(PHPeclipsePlugin.APACHE_RESTART_PREF), - store.getBoolean(PHPeclipsePlugin.APACHE_RESTART_BACKGROUND)); - } -} diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPStartApacheAction.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPStartApacheAction.java deleted file mode 100644 index a87c8a1..0000000 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPStartApacheAction.java +++ /dev/null @@ -1,94 +0,0 @@ -/********************************************************************** -Copyright (c) 2000, 2002 IBM Corp. and others. -All rights reserved. This program and the accompanying materials -are made available under the terms of the Common Public License v1.0 -which accompanies this distribution, and is available at -http://www.eclipse.org/legal/cpl-v10.html - -Contributors: - IBM Corporation - Initial implementation - www.phpeclipse.de -**********************************************************************/ -package net.sourceforge.phpeclipse.actions; - -import java.text.MessageFormat; - -import net.sourceforge.phpdt.externaltools.launchConfigurations.ExternalToolsUtil; -import net.sourceforge.phpeclipse.PHPConsole; -import net.sourceforge.phpeclipse.PHPeclipsePlugin; -import net.sourceforge.phpeclipse.ui.WebUI; - -import org.eclipse.jface.action.IAction; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.ui.IWorkbenchWindow; -import org.eclipse.ui.IWorkbenchWindowActionDelegate; - -public class PHPStartApacheAction implements IWorkbenchWindowActionDelegate { - protected IWorkbenchWindow activeWindow = null; - - public void run(IAction action) { - final IPreferenceStore store = - PHPeclipsePlugin.getDefault().getPreferenceStore(); - String documentRoot = store.getString(WebUI.PHP_DOCUMENTROOT_PREF); - // replace backslash with slash in the DocumentRoot under Windows - documentRoot = documentRoot.replace('\\', '/'); - String[] arguments = { documentRoot }; - MessageFormat form = - new MessageFormat(store.getString(PHPeclipsePlugin.APACHE_START_PREF)); - execute( - "apache_start", - store.getString(PHPeclipsePlugin.APACHE_RUN_PREF), - form.format(arguments), - store.getBoolean(PHPeclipsePlugin.APACHE_START_BACKGROUND)); - } - - /** - * Executes an external progam and saves the LaunchConfiguration under external tools - * @param command external tools command name - * @param executable executable path i.e.c:\apache\apache.exe - * @param arguments arguments for this configuration - * @param background run this configuration in background mode - */ - public static void execute( - String command, - String executable, - String arguments, - boolean background) { - PHPConsole console = new PHPConsole(); - String consoleMessage; - if (background) { - consoleMessage = - "run in background mode-" - + command - + ": " - + executable - + " " - + arguments; - } else { - consoleMessage = - "run in foreground mode-" - + command - + ": " - + executable - + " " - + arguments; - } - console.println(consoleMessage); - - ExternalToolsUtil.execute(command, executable, arguments, background); - } - - public void selectionChanged(IAction action, ISelection selection) { - - } - - public void init(IWorkbenchWindow window) { - this.activeWindow = window; - } - - public void dispose() { - - } - -} diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPStartMySQLAction.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPStartMySQLAction.java deleted file mode 100644 index cc237ea..0000000 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPStartMySQLAction.java +++ /dev/null @@ -1,29 +0,0 @@ -/********************************************************************** -Copyright (c) 2000, 2002 IBM Corp. and others. -All rights reserved. This program and the accompanying materials -are made available under the terms of the Common Public License v1.0 -which accompanies this distribution, and is available at -http://www.eclipse.org/legal/cpl-v10.html - -Contributors: - IBM Corporation - Initial implementation - www.phpeclipse.de -**********************************************************************/ -package net.sourceforge.phpeclipse.actions; - -import net.sourceforge.phpeclipse.PHPeclipsePlugin; - -import org.eclipse.jface.action.IAction; -import org.eclipse.jface.preference.IPreferenceStore; - -public class PHPStartMySQLAction extends PHPStartApacheAction { - public void run(IAction action) { - final IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore(); - // execute(store.getString(PHPeclipsePlugin.MYSQL_PREF), "Start MySQL: "); - execute( - "mysql_start", - store.getString(PHPeclipsePlugin.MYSQL_RUN_PREF), - store.getString(PHPeclipsePlugin.MYSQL_PREF), - store.getBoolean(PHPeclipsePlugin.MYSQL_START_BACKGROUND)); - } -} diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPStartXAMPPAction.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPStartXAMPPAction.java deleted file mode 100644 index e3dcfff..0000000 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPStartXAMPPAction.java +++ /dev/null @@ -1,90 +0,0 @@ -/********************************************************************** -Copyright (c) 2000, 2002 IBM Corp. and others. -All rights reserved. This program and the accompanying materials -are made available under the terms of the Common Public License v1.0 -which accompanies this distribution, and is available at -http://www.eclipse.org/legal/cpl-v10.html - -Contributors: - IBM Corporation - Initial implementation - www.phpeclipse.de -**********************************************************************/ -package net.sourceforge.phpeclipse.actions; - -import java.io.File; - -import net.sourceforge.phpdt.externaltools.launchConfigurations.ExternalToolsUtil; -import net.sourceforge.phpeclipse.PHPConsole; -import net.sourceforge.phpeclipse.PHPeclipsePlugin; - -import org.eclipse.jface.action.IAction; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.ui.IWorkbenchWindow; -import org.eclipse.ui.IWorkbenchWindowActionDelegate; - -public class PHPStartXAMPPAction implements IWorkbenchWindowActionDelegate { - protected IWorkbenchWindow activeWindow = null; - - public void run(IAction action) { - final IPreferenceStore store = - PHPeclipsePlugin.getDefault().getPreferenceStore(); - String executable = store.getString(PHPeclipsePlugin.XAMPP_START_PREF); - String workingDirectory = null; - if (executable!=null && executable.length()>0) { - int index = executable.lastIndexOf(File.separatorChar); - if (index>0) { - workingDirectory = executable.substring(0, index); - } - } - execute( - "xampp_start", - executable, - workingDirectory, - true); - } - - /** - * Executes an external progam and saves the LaunchConfiguration under external tools - * @param command external tools command name - * @param executable executable path i.e.c:\apache\apache.exe - * @param background run this configuration in background mode - */ - public static void execute( - String command, - String executable, - String workingDirectory, - boolean background) { - PHPConsole console = new PHPConsole(); - String consoleMessage; - if (background) { - consoleMessage = - "run in background mode-" - + command - + ": " - + executable; - } else { - consoleMessage = - "run in foreground mode-" - + command - + ": " - + executable; - } - console.println(consoleMessage); - - ExternalToolsUtil.execute(command, executable, workingDirectory, null, background); - } - - public void selectionChanged(IAction action, ISelection selection) { - - } - - public void init(IWorkbenchWindow window) { - this.activeWindow = window; - } - - public void dispose() { - - } - -} diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPStopApacheAction.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPStopApacheAction.java deleted file mode 100644 index e5b75e9..0000000 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPStopApacheAction.java +++ /dev/null @@ -1,29 +0,0 @@ -/********************************************************************** -Copyright (c) 2000, 2002 IBM Corp. and others. -All rights reserved. This program and the accompanying materials -are made available under the terms of the Common Public License v1.0 -which accompanies this distribution, and is available at -http://www.eclipse.org/legal/cpl-v10.html - -Contributors: - IBM Corporation - Initial implementation - www.phpeclipse.de -**********************************************************************/ -package net.sourceforge.phpeclipse.actions; - -import net.sourceforge.phpeclipse.PHPeclipsePlugin; - -import org.eclipse.jface.action.IAction; -import org.eclipse.jface.preference.IPreferenceStore; - -public class PHPStopApacheAction extends PHPStartApacheAction { - public void run(IAction action) { - final IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore(); - // execute(store.getString(PHPeclipsePlugin.APACHE_STOP_PREF), "Stop Apache: "); - execute( - "apache_stop", - store.getString(PHPeclipsePlugin.APACHE_RUN_PREF), - store.getString(PHPeclipsePlugin.APACHE_STOP_PREF), - store.getBoolean(PHPeclipsePlugin.APACHE_STOP_BACKGROUND)); - } -} diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPStopXAMPPAction.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPStopXAMPPAction.java deleted file mode 100644 index 89c6e0d..0000000 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/actions/PHPStopXAMPPAction.java +++ /dev/null @@ -1,90 +0,0 @@ -/********************************************************************** -Copyright (c) 2000, 2002 IBM Corp. and others. -All rights reserved. This program and the accompanying materials -are made available under the terms of the Common Public License v1.0 -which accompanies this distribution, and is available at -http://www.eclipse.org/legal/cpl-v10.html - -Contributors: - IBM Corporation - Initial implementation - www.phpeclipse.de -**********************************************************************/ -package net.sourceforge.phpeclipse.actions; - -import java.io.File; - -import net.sourceforge.phpdt.externaltools.launchConfigurations.ExternalToolsUtil; -import net.sourceforge.phpeclipse.PHPConsole; -import net.sourceforge.phpeclipse.PHPeclipsePlugin; - -import org.eclipse.jface.action.IAction; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.ui.IWorkbenchWindow; -import org.eclipse.ui.IWorkbenchWindowActionDelegate; - -public class PHPStopXAMPPAction implements IWorkbenchWindowActionDelegate { - protected IWorkbenchWindow activeWindow = null; - - public void run(IAction action) { - final IPreferenceStore store = - PHPeclipsePlugin.getDefault().getPreferenceStore(); - String executable = store.getString(PHPeclipsePlugin.XAMPP_STOP_PREF); - String workingDirectory = null; - if (executable!=null && executable.length()>0) { - int index = executable.lastIndexOf(File.separatorChar); - if (index>0) { - workingDirectory = executable.substring(0, index); - } - } - execute( - "xampp_stop", - executable, - workingDirectory, - true); - } - - /** - * Executes an external progam and saves the LaunchConfiguration under external tools - * @param command external tools command name - * @param executable executable path i.e.c:\apache\apache.exe - * @param background run this configuration in background mode - */ - public static void execute( - String command, - String executable, - String workingDirectory, - boolean background) { - PHPConsole console = new PHPConsole(); - String consoleMessage; - if (background) { - consoleMessage = - "run in background mode-" - + command - + ": " - + executable; - } else { - consoleMessage = - "run in foreground mode-" - + command - + ": " - + executable; - } - console.println(consoleMessage); - - ExternalToolsUtil.execute(command, executable, workingDirectory, null, background); - } - - public void selectionChanged(IAction action, ISelection selection) { - - } - - public void init(IWorkbenchWindow window) { - this.activeWindow = window; - } - - public void dispose() { - - } - -} diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPParserAction.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPParserAction.java deleted file mode 100644 index 6197bae..0000000 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPParserAction.java +++ /dev/null @@ -1,126 +0,0 @@ -package net.sourceforge.phpeclipse.phpeditor; - -/********************************************************************** - Copyright (c) 2000, 2002 IBM Corp. and others. - All rights reserved. This program and the accompanying materials - are made available under the terms of the Common Public License v1.0 - which accompanies this distribution, and is available at - http://www.eclipse.org/legal/cpl-v10.html - - Contributors: - IBM Corporation - Initial implementation - www.phpeclipse.de - **********************************************************************/ - -import java.io.BufferedInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.List; - -import net.sourceforge.phpdt.internal.compiler.util.Util; -import net.sourceforge.phpdt.internal.ui.util.PHPFileUtil; -import net.sourceforge.phpeclipse.PHPeclipsePlugin; -import net.sourceforge.phpeclipse.actions.ExternalPHPParser; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.ui.IEditorInput; -import org.eclipse.ui.IFileEditorInput; -import org.eclipse.ui.texteditor.ITextEditor; -import org.eclipse.ui.texteditor.TextEditorAction; - -//import test.PHPParserManager; - -/** - * ClassDeclaration that defines the action for parsing the current PHP file - */ -public class PHPParserAction extends TextEditorAction { - - private static PHPParserAction instance = new PHPParserAction(); - - protected IFile fileToParse; - - protected List fVariables = new ArrayList(100); - - /** - * Constructs and updates the action. - */ - private PHPParserAction() { - super(PHPEditorMessages.getResourceBundle(), "ParserAction.", null); //$NON-NLS-1$ - update(); - } - - public static PHPParserAction getInstance() { - return instance; - } - - /** - * Code called when the action is fired. - */ - public void run() { - boolean phpFlag = false; - - // try { - fileToParse = getPHPFile(); - parseFile(fileToParse); - } - - public static void parseFile(IFile fileToParse) { - boolean phpFlag = false; - // try { - - if (fileToParse == null) { - // TODO should never happen => should throw an exception - System.err.println("Error : no file in the editor"); - - return; - } - String name = fileToParse.getName(); //.toLowerCase(); - - if (PHPFileUtil.isPHPFileName(name)) { - IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore(); - ExternalPHPParser parser = new ExternalPHPParser(fileToParse); - parser.phpExternalParse(); - } - } - - /** - * Finds the file that's currently opened in the PHP Text Editor - */ - protected IFile getPHPFile() { - ITextEditor editor = getTextEditor(); - - IEditorInput editorInput = null; - if (editor != null) { - editorInput = editor.getEditorInput(); - } - - if (editorInput instanceof IFileEditorInput) - return ((IFileEditorInput) editorInput).getFile(); - - // if nothing was found, which should never happen - return null; - } - - protected static void parse(IFile fileToParse) { - InputStream stream = null; - char[] charArray; - try { - stream = new BufferedInputStream(fileToParse.getContents()); - charArray = Util.getInputStreamAsCharArray(stream, -1, null); - ExternalPHPParser parser = new ExternalPHPParser(fileToParse); - parser.phpExternalParse(); - } catch (CoreException e) { - } catch (IOException e) { - } finally { - try { - if (stream != null) { - stream.close(); - } - } catch (IOException e) { - } - } - } -} \ No newline at end of file diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPCompletionProcessor.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPCompletionProcessor.java index 54fe5a6..0ccf4c7 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPCompletionProcessor.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPCompletionProcessor.java @@ -78,7 +78,7 @@ import org.eclipse.swt.graphics.Point; import org.eclipse.ui.IEditorPart; import org.eclipse.ui.IFileEditorInput; -import com.quantum.ExternalInterface; +//import com.quantum.ExternalInterface; // import com.quantum.util.connection.NotConnectedException; /** @@ -650,23 +650,25 @@ public class PHPCompletionProcessor implements IContentAssistProcessor { builtinResults = builtinEngine.getResults(); } } - ICompletionProposal[] sqlResults = new ICompletionProposal[0]; - if (project != null) { - sqlResults = getSQLProposals(viewer, project, context, prefix, sqlTable); - } +// ICompletionProposal[] sqlResults = new ICompletionProposal[0]; +// if (project != null) { +// sqlResults = getSQLProposals(viewer, project, context, prefix, sqlTable); +// } // concatenate the result arrays IPHPCompletionProposal[] total; total = new IPHPCompletionProposal[localVariableResults.length + templateResults.length + identifierResults.length - + builtinResults.length + declarationResults.length + sqlResults.length]; + + builtinResults.length + declarationResults.length];// + sqlResults.length]; System.arraycopy(templateResults, 0, total, 0, templateResults.length); System.arraycopy(identifierResults, 0, total, templateResults.length, identifierResults.length); System.arraycopy(builtinResults, 0, total, templateResults.length + identifierResults.length, builtinResults.length); System.arraycopy(declarationResults, 0, total, templateResults.length + identifierResults.length + builtinResults.length, declarationResults.length); - System.arraycopy(sqlResults, 0, total, templateResults.length + identifierResults.length + builtinResults.length - + declarationResults.length, sqlResults.length); +// System.arraycopy(sqlResults, 0, total, templateResults.length + identifierResults.length + builtinResults.length +// + declarationResults.length, sqlResults.length); +// System.arraycopy(localVariableResults, 0, total, templateResults.length + identifierResults.length + builtinResults.length +// + declarationResults.length + sqlResults.length, localVariableResults.length); System.arraycopy(localVariableResults, 0, total, templateResults.length + identifierResults.length + builtinResults.length - + declarationResults.length + sqlResults.length, localVariableResults.length); + + declarationResults.length, localVariableResults.length); results = total; fNumberOfComputedResults = (results == null ? 0 : results.length); /* @@ -814,71 +816,71 @@ public class PHPCompletionProcessor implements IContentAssistProcessor { * @param sqlResults * @return */ - private ICompletionProposal[] getSQLProposals(ITextViewer viewer, IProject project, DocumentTemplateContext context, - String prefix, TableName sqlTable) { - ICompletionProposal[] sqlResults = new ICompletionProposal[0]; - // Get The Database bookmark from the Quantum SQL plugin: - // BookmarkCollection sqlBookMarks = BookmarkCollection.getInstance(); - // if (sqlBookMarks != null) { - String bookmarkString = ProjectPrefUtil.getMiscProjectsPreferenceValue(project, IPreferenceConstants.PHP_BOOKMARK_DEFAULT); - if (bookmarkString != null && !bookmarkString.equals("")) { - String[] bookmarks = ExternalInterface.getBookmarkNames(); - boolean foundBookmark = false; - for (int i = 0; i < bookmarks.length; i++) { - if (bookmarks[i].equals(bookmarkString)) { - foundBookmark = true; - } - } - if (!foundBookmark) { - return sqlResults; - } - // Bookmark bookmark = sqlBookMarks.find(bookmarkString); - ArrayList sqlList = new ArrayList(); - if (!ExternalInterface.isBookmarkConnected(bookmarkString)) { - ExternalInterface.connectBookmark(bookmarkString, null); - if (!ExternalInterface.isBookmarkConnected(bookmarkString)) { - return sqlResults; - } - } - // if (ExternalInterface.isBookmarkConnected(bookmarkString)) { - try { - int start = context.getStart(); - int end = context.getEnd(); - String foundSQLTableName = sqlTable.getTableName(); - String tableName; - String columnName; - String prefixWithoutDollar = prefix; - boolean isDollarPrefix = false; - if (prefix.length() > 0 && prefix.charAt(0) == '$') { - prefixWithoutDollar = prefix.substring(1); - isDollarPrefix = true; - } - IRegion region = new Region(start, end - start); - ResultSet set; - if (!isDollarPrefix) { - String[] tableNames = ExternalInterface.getMatchingTableNames(null, bookmarkString, prefixWithoutDollar, null, false); - for (int i = 0; i < tableNames.length; i++) { - sqlList.add(new SQLProposal(tableNames[i], context, region, viewer, PHPUiImages.get(PHPUiImages.IMG_TABLE))); - } - } - - String[] columnNames = ExternalInterface.getMatchingColumnNames(null, bookmarkString, prefixWithoutDollar, null, false); - for (int i = 0; i < columnNames.length; i++) { - sqlList.add(new SQLProposal(columnNames[i], context, region, viewer, PHPUiImages.get(PHPUiImages.IMG_TABLE))); - } - - sqlResults = new IPHPCompletionProposal[sqlList.size()]; - for (int i = 0; i < sqlList.size(); i++) { - sqlResults[i] = (SQLProposal) sqlList.get(i); - } - } catch (Exception /* NotConnectedException */ e) { - - } - // } - } - // } - return sqlResults; - } +// private ICompletionProposal[] getSQLProposals(ITextViewer viewer, IProject project, DocumentTemplateContext context, +// String prefix, TableName sqlTable) { +// ICompletionProposal[] sqlResults = new ICompletionProposal[0]; +// // Get The Database bookmark from the Quantum SQL plugin: +// // BookmarkCollection sqlBookMarks = BookmarkCollection.getInstance(); +// // if (sqlBookMarks != null) { +// String bookmarkString = ProjectPrefUtil.getMiscProjectsPreferenceValue(project, IPreferenceConstants.PHP_BOOKMARK_DEFAULT); +// if (bookmarkString != null && !bookmarkString.equals("")) { +// String[] bookmarks = ExternalInterface.getBookmarkNames(); +// boolean foundBookmark = false; +// for (int i = 0; i < bookmarks.length; i++) { +// if (bookmarks[i].equals(bookmarkString)) { +// foundBookmark = true; +// } +// } +// if (!foundBookmark) { +// return sqlResults; +// } +// // Bookmark bookmark = sqlBookMarks.find(bookmarkString); +// ArrayList sqlList = new ArrayList(); +// if (!ExternalInterface.isBookmarkConnected(bookmarkString)) { +// ExternalInterface.connectBookmark(bookmarkString, null); +// if (!ExternalInterface.isBookmarkConnected(bookmarkString)) { +// return sqlResults; +// } +// } +// // if (ExternalInterface.isBookmarkConnected(bookmarkString)) { +// try { +// int start = context.getStart(); +// int end = context.getEnd(); +// String foundSQLTableName = sqlTable.getTableName(); +// String tableName; +// String columnName; +// String prefixWithoutDollar = prefix; +// boolean isDollarPrefix = false; +// if (prefix.length() > 0 && prefix.charAt(0) == '$') { +// prefixWithoutDollar = prefix.substring(1); +// isDollarPrefix = true; +// } +// IRegion region = new Region(start, end - start); +// ResultSet set; +// if (!isDollarPrefix) { +// String[] tableNames = ExternalInterface.getMatchingTableNames(null, bookmarkString, prefixWithoutDollar, null, false); +// for (int i = 0; i < tableNames.length; i++) { +// sqlList.add(new SQLProposal(tableNames[i], context, region, viewer, PHPUiImages.get(PHPUiImages.IMG_TABLE))); +// } +// } +// +// String[] columnNames = ExternalInterface.getMatchingColumnNames(null, bookmarkString, prefixWithoutDollar, null, false); +// for (int i = 0; i < columnNames.length; i++) { +// sqlList.add(new SQLProposal(columnNames[i], context, region, viewer, PHPUiImages.get(PHPUiImages.IMG_TABLE))); +// } +// +// sqlResults = new IPHPCompletionProposal[sqlList.size()]; +// for (int i = 0; i < sqlList.size(); i++) { +// sqlResults[i] = (SQLProposal) sqlList.get(i); +// } +// } catch (Exception /* NotConnectedException */ e) { +// +// } +// // } +// } +// // } +// return sqlResults; +// } private boolean looksLikeMethod(PHPCodeReader reader) throws IOException { int curr = reader.read(); diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/preferences/PHPEclipseParserPreferencePage.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/preferences/PHPEclipseParserPreferencePage.java deleted file mode 100644 index 43a1175..0000000 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/preferences/PHPEclipseParserPreferencePage.java +++ /dev/null @@ -1,109 +0,0 @@ -package net.sourceforge.phpeclipse.preferences; - -import net.sourceforge.phpeclipse.IPreferenceConstants; -import net.sourceforge.phpeclipse.PHPeclipsePlugin; - -import org.eclipse.jface.preference.IPreferenceStore; -import org.eclipse.jface.preference.PreferencePage; -import org.eclipse.jface.preference.StringFieldEditor; -import org.eclipse.swt.SWT; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Group; -import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.IWorkbenchPreferencePage; - -public class PHPEclipseParserPreferencePage extends PreferencePage implements IWorkbenchPreferencePage { - -// private SelectionListener SelectionListener; -// private ModifyListener ModifyListener; -// private ModifyListener TextModifyListener; -// -// private ArrayList CheckBoxes = new ArrayList(); -// private ArrayList ComboBoxes = new ArrayList(); -// private ArrayList TextBoxes = new ArrayList(); -// private ArrayList RadioButtons = new ArrayList(); - - -// RadioGroupFieldEditor chooseParser; - StringFieldEditor externalParserSFE; - // BooleanFieldEditor parseOnSave; - - public PHPEclipseParserPreferencePage() { - super(); - setPreferenceStore(PHPeclipsePlugin.getDefault().getPreferenceStore()); - setDescription(PHPPreferencesMessages.getString("PHPBasePreferencePage.description")); //$NON-NLS-1$ - } - - public void init(IWorkbench workbench) { - } - protected void performDefaults() { -// chooseParser.loadDefault(); - externalParserSFE.loadDefault(); -// parseOnSave.loadDefault(); - super.performDefaults(); - } - - public boolean performOk() { -// chooseParser.store(); - externalParserSFE.store(); -// parseOnSave.store(); - return super.performOk(); - } - - protected Control createContents(Composite parent) { - initializeDialogUnits(parent); - final IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore(); - Composite composite = new Composite(parent, SWT.LEFT); - composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - composite.setLayout(new GridLayout()); - - //Create parser settings composite - Composite parserSettingsComposite = new Composite(composite, SWT.NONE); - parserSettingsComposite.setLayout(new GridLayout()); - parserSettingsComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - Group parserSettingsGroup = new Group(parserSettingsComposite, SWT.NONE); - parserSettingsGroup.setText(PHPPreferencesMessages.getString("PHPBasePreferencePage.parsers")); - parserSettingsGroup.setLayout(new GridLayout()); - parserSettingsGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - -// chooseParser = -// new RadioGroupFieldEditor( -// IPreferenceConstants.PHP_PARSER_DEFAULT, -// PHPPreferencesMessages.getString("PHPBasePreferencePage.parsers.choose"), -// 1, -// new String[][] { -// { PHPPreferencesMessages.getString("PHPBasePreferencePage.parsers.internal"), IPreferenceConstants.PHP_INTERNAL_PARSER }, -// { -// PHPPreferencesMessages.getString("PHPBasePreferencePage.parsers.external"), IPreferenceConstants.PHP_EXTERNAL_PARSER } -// }, parserSettingsGroup); -// chooseParser.setPreferencePage(this); -// chooseParser.setPreferenceStore(getPreferenceStore()); -// chooseParser.load(); - //create a copmposte just for the StringEditor - makes layout simpler - Composite externalParserCompo = new Composite(parserSettingsGroup, SWT.NONE); - externalParserSFE = - new StringFieldEditor( - IPreferenceConstants.EXTERNAL_PARSER_PREF, - PHPPreferencesMessages.getString("PHPBasePreferencePage.parsers.extcommand"), - externalParserCompo - /*parserSettingsGroup*/ - ); - externalParserSFE.setPreferencePage(this); - externalParserSFE.setPreferenceStore(getPreferenceStore()); - externalParserSFE.load(); - -// parseOnSave = -// new BooleanFieldEditor( -// PHPeclipsePlugin.PHP_PARSE_ON_SAVE, -// PHPPreferencesMessages.getString("PHPBasePreferencePage.parsers.pos"), -// parserSettingsGroup); -// parseOnSave.setPreferencePage(this); -// parseOnSave.setPreferenceStore(getPreferenceStore()); -// parseOnSave.load(); - - return composite; - } -}