This file is 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:
**********************************************************************/
import net.sourceforge.phpdt.externaltools.internal.ui.IExternalToolsUIConstants;
import net.sourceforge.phpdt.externaltools.model.IExternalToolConstants;
-import net.sourceforge.phpeclipse.PHPeclipsePlugin;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
* @see JFace's ImageRegistry
*/
public static ImageRegistry initializeImageRegistry() {
- imageRegistry= new ImageRegistry(PHPeclipsePlugin.getStandardDisplay());
+ imageRegistry= new ImageRegistry(ExternalToolsPlugin.getStandardDisplay());
imageDescriptors = new HashMap(30);
declareImages();
return imageRegistry;
This file is 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:
**********************************************************************/
import net.sourceforge.phpdt.externaltools.launchConfigurations.ExternalToolsUtil;
import net.sourceforge.phpdt.externaltools.variable.ExpandVariableContext;
-import net.sourceforge.phpeclipse.PHPeclipsePlugin;
+import net.sourceforge.phpeclipse.externaltools.ExternalToolsPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
* Submits a runnable to do the refresh
*/
protected void refresh() {
- PHPeclipsePlugin.getStandardDisplay().asyncExec(this);
+ ExternalToolsPlugin.getStandardDisplay().asyncExec(this);
}
/**
* @see java.lang.Runnable#run()
*/
public void run() {
- ProgressMonitorDialog dialog = new ProgressMonitorDialog(PHPeclipsePlugin.getStandardDisplay().getActiveShell());
+ ProgressMonitorDialog dialog = new ProgressMonitorDialog(ExternalToolsPlugin.getStandardDisplay().getActiveShell());
try {
dialog.run(true, true, this);
} catch (InvocationTargetException e) {
import net.sourceforge.phpdt.externaltools.model.IExternalToolConstants;
import net.sourceforge.phpdt.externaltools.model.ToolUtil;
-import net.sourceforge.phpeclipse.PHPeclipsePlugin;
import net.sourceforge.phpeclipse.externaltools.ExternalToolsPlugin;
import org.eclipse.core.runtime.CoreException;
public static void readIn20Tools() {
boolean migrationSuccessful = true;
- IPath path = PHPeclipsePlugin.getDefault().getStateLocation();
+ IPath path = ExternalToolsPlugin.getDefault().getStateLocation();
File file = path.append(STATE_FILE_NAME).toFile();
if (!file.exists())
return;
ExternalToolsPlugin.getDefault().log("File I/O error with reading old external tools.", e);
migrationSuccessful = false;
} catch (WorkbenchException e) {
- PHPeclipsePlugin.getDefault().getLog().log(e.getStatus());
+ ExternalToolsPlugin.getDefault().getLog().log(e.getStatus());
System.err.println("Error reading old external tools. See .log file for more details");
migrationSuccessful = false;
} finally {
import net.sourceforge.phpdt.externaltools.group.IGroupDialogPage;
import net.sourceforge.phpdt.externaltools.internal.model.ExternalToolsModelMessages;
import net.sourceforge.phpdt.externaltools.variable.IVariableComponent;
-import net.sourceforge.phpeclipse.PHPeclipsePlugin;
+import net.sourceforge.phpeclipse.externaltools.ExternalToolsPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
try {
return element.createExecutableExtension(attributeName);
} catch (CoreException e) {
- PHPeclipsePlugin.getDefault().getLog().log(e.getStatus());
+ ExternalToolsPlugin.getDefault().getLog().log(e.getStatus());
return null;
}
}
import net.sourceforge.phpdt.externaltools.model.IExternalToolConstants;
import net.sourceforge.phpdt.externaltools.model.ToolUtil;
import net.sourceforge.phpdt.externaltools.variable.ExpandVariableContext;
-import net.sourceforge.phpeclipse.PHPeclipsePlugin;
import net.sourceforge.phpeclipse.externaltools.ExternalToolsPlugin;
import org.eclipse.core.resources.IResource;
label.setText(ExternalToolsLaunchConfigurationMessages.getString("ExternalToolsMainTab.&Location___2")); //$NON-NLS-1$
label.setFont(font);
- final IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore();
+ final IPreferenceStore store = ExternalToolsPlugin.getDefault().getPreferenceStore();
locationField = new Combo(composite, SWT.DROP_DOWN | SWT.BORDER);
GridData data = new GridData(GridData.FILL_HORIZONTAL);
data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH;
locationField.setLayoutData(data);
locationField.setFont(font);
- locationField.add(store.getString(PHPeclipsePlugin.PHP_RUN_PREF), 0);
- locationField.add(store.getString(PHPeclipsePlugin.APACHE_RUN_PREF), 1);
- locationField.add(store.getString(PHPeclipsePlugin.MYSQL_RUN_PREF), 2);
- locationField.add(store.getString(PHPeclipsePlugin.XAMPP_START_PREF), 3);
- locationField.add(store.getString(PHPeclipsePlugin.XAMPP_STOP_PREF), 4);
+ locationField.add(store.getString(ExternalToolsPlugin.PHP_RUN_PREF), 0);
+ locationField.add(store.getString(ExternalToolsPlugin.APACHE_RUN_PREF), 1);
+ locationField.add(store.getString(ExternalToolsPlugin.MYSQL_RUN_PREF), 2);
+ locationField.add(store.getString(ExternalToolsPlugin.XAMPP_START_PREF), 3);
+ locationField.add(store.getString(ExternalToolsPlugin.XAMPP_STOP_PREF), 4);
Composite buttonComposite = new Composite(parent, SWT.NONE);
layout = new GridLayout();
layout.marginWidth = 0;
package net.sourceforge.phpdt.externaltools.variable;
-import net.sourceforge.phpeclipse.PHPeclipsePlugin;
+import net.sourceforge.phpeclipse.externaltools.ExternalToolsPlugin;
import net.sourceforge.phpeclipse.ui.WebUI;
import org.eclipse.jface.preference.IPreferenceStore;
public class LocalhostExpander implements IVariableTextExpander {
public String getText(String varTag, String varValue, ExpandVariableContext context) {
- IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore();
+ IPreferenceStore store = ExternalToolsPlugin.getDefault().getPreferenceStore();
return store.getString(WebUI.PHP_LOCALHOST_PREF);
}
package net.sourceforge.phpdt.externaltools.variable;
-import net.sourceforge.phpeclipse.PHPeclipsePlugin;
+import net.sourceforge.phpeclipse.externaltools.ExternalToolsPlugin;
import net.sourceforge.phpeclipse.ui.WebUI;
import org.eclipse.core.runtime.IPath;
public String getText(String varTag, String varValue, ExpandVariableContext context) {
IPath path = getPath(varTag, varValue, context);
if (path != null) {
- IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore();
+ IPreferenceStore store = ExternalToolsPlugin.getDefault().getPreferenceStore();
String localhostURL = path.toString();
String lowerCaseFileName = localhostURL.toLowerCase();
String documentRoot = store.getString(WebUI.PHP_DOCUMENTROOT_PREF);
import net.sourceforge.phpdt.externaltools.internal.registry.PathLocationVariableRegistry;
import net.sourceforge.phpdt.externaltools.internal.registry.RefreshScopeVariableRegistry;
import net.sourceforge.phpdt.externaltools.model.IExternalToolConstants;
-import net.sourceforge.phpeclipse.PHPeclipsePlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
* External tools plug-in class
*/
public final class ExternalToolsPlugin extends AbstractUIPlugin {
+ public static final String XAMPP_START_PREF = "_xampp_start_pref";
+
+ public static final String XAMPP_STOP_PREF = "_xampp_stop_pref";
+
+ public static final String MYSQL_RUN_PREF = "_mysql_run_pref";
+
+ public static final String MYSQL_START_BACKGROUND = "_mysql_start_background";
+
+ public static final String MYSQL_PREF = "__mysql_start";
+
+ public static final String APACHE_RUN_PREF = "_apache_run_pref";
+
+ public static final String APACHE_START_BACKGROUND = "_apache_start_background";
+
+ public static final String APACHE_START_PREF = "__apache_start";
+
+ public static final String APACHE_STOP_BACKGROUND = "_apache_stop_background";
+
+ public static final String APACHE_STOP_PREF = "__apache_stop";
+
+ public static final String APACHE_RESTART_BACKGROUND = "_apache_restart_background";
+
+ public static final String APACHE_RESTART_PREF = "__apache_restart";
+
+ public static final String SHOW_OUTPUT_IN_CONSOLE = "_show_output_in_console";
+
+ public static final String PHP_RUN_PREF = "_php_run_pref";
+
/**
* Status representing no problems encountered during operation.
*/
public void log(String message, Throwable exception) {
IStatus status = newErrorStatus(message, exception);
// getLog().log(status);
- PHPeclipsePlugin.log(status);
+ ExternalToolsPlugin.log(status);
+ }
+
+ public static void log(IStatus status) {
+ getDefault().getLog().log(status);
}
/**
*/
public ImageDescriptor getImageDescriptor(String path) {
try {
- Bundle bundle = PHPeclipsePlugin.getDefault().getBundle();
+ Bundle bundle = ExternalToolsPlugin.getDefault().getBundle();
URL installURL = bundle.getEntry("/"); //$NON-NLS-1$
URL url = new URL(installURL, path);
return ImageDescriptor.createFromURL(url);
prefs.setDefault(IPreferenceConstants.PROMPT_FOR_MIGRATION, true);
PreferenceConverter.setDefault(prefs, IPreferenceConstants.CONSOLE_ERROR_RGB, new RGB(255, 0, 0)); // red - exactly the same as
- // debug Consol
+ // debug Consol
PreferenceConverter.setDefault(prefs, IPreferenceConstants.CONSOLE_WARNING_RGB, new RGB(255, 100, 0)); // orange
PreferenceConverter.setDefault(prefs, IPreferenceConstants.CONSOLE_INFO_RGB, new RGB(0, 0, 255)); // blue
PreferenceConverter.setDefault(prefs, IPreferenceConstants.CONSOLE_VERBOSE_RGB, new RGB(0, 200, 125)); // green
}
public static IWorkbenchWindow getActiveWorkbenchWindow() {
- return PHPeclipsePlugin.getDefault().getWorkbench().getActiveWorkbenchWindow();
+ return ExternalToolsPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow();
}
/**
* @see org.eclipse.core.runtime.Plugin#startup()
*/
public void startup() throws CoreException {
-// super.startup();
+ // super.startup();
getStandardDisplay().asyncExec(new Runnable() {
public void run() {
//initialize the variable context manager
* @see org.eclipse.core.runtime.Plugin#shutdown()
*/
public void shutdown() throws CoreException {
-// super.shutdown();
+ // super.shutdown();
ColorManager.getDefault().dispose();
}
*/
public static Color getPreferenceColor(String pref) {
return ColorManager.getDefault().getColor(
- PreferenceConverter.getColor(PHPeclipsePlugin.getDefault().getPreferenceStore(), pref));
+ PreferenceConverter.getColor(ExternalToolsPlugin.getDefault().getPreferenceStore(), pref));
}
}
\ No newline at end of file