import java.util.Map;
import net.sourceforge.phpdt.externaltools.internal.model.ExternalToolsPlugin;
-import net.sourceforge.phpdt.externaltools.internal.model.ToolMessages;
+import net.sourceforge.phpdt.externaltools.internal.model.ExternalToolsModelMessages;
import net.sourceforge.phpdt.externaltools.internal.model.VariableContextManager;
import net.sourceforge.phpdt.externaltools.internal.registry.ExternalToolMigration;
import net.sourceforge.phpdt.externaltools.internal.registry.RefreshScopeVariable;
if (location == null) {
abort(MessageFormat.format(ExternalToolsLaunchConfigurationMessages.getString("ExternalToolsUtil.Location_not_specified_by_{0}_1"), new String[] { configuration.getName()}), null, 0); //$NON-NLS-1$
} else {
- MultiStatus status = new MultiStatus(IExternalToolConstants.PLUGIN_ID, 0, ToolMessages.getString("RunExternalToolAction.runProblem"), null); //$NON-NLS-1$;
+ MultiStatus status = new MultiStatus(IExternalToolConstants.PLUGIN_ID, 0, ExternalToolsModelMessages.getString("RunExternalToolAction.runProblem"), null); //$NON-NLS-1$;
String expandedLocation = ToolUtil.expandFileLocation(location, context, status);
if (status.isOK()) {
if (expandedLocation == null || expandedLocation.length() == 0) {
- String msg = ToolMessages.format("DefaultRunnerContext.invalidLocation", new Object[] { configuration.getName()}); //$NON-NLS-1$
+ String msg = ExternalToolsModelMessages.format("DefaultRunnerContext.invalidLocation", new Object[] { configuration.getName()}); //$NON-NLS-1$
abort(msg, null, 0);
} else {
File file = new File(expandedLocation);
if (file.isFile()) {
return new Path(expandedLocation);
} else {
- String msg = ToolMessages.format("DefaultRunnerContext.invalidLocation", new Object[] { configuration.getName()}); //$NON-NLS-1$
+ String msg = ExternalToolsModelMessages.format("DefaultRunnerContext.invalidLocation", new Object[] { configuration.getName()}); //$NON-NLS-1$
abort(msg, null, 0);
}
}
public static IPath getWorkingDirectory(ILaunchConfiguration configuration, ExpandVariableContext context) throws CoreException {
String location = configuration.getAttribute(IExternalToolConstants.ATTR_WORKING_DIRECTORY, (String) null);
if (location != null) {
- MultiStatus status = new MultiStatus(IExternalToolConstants.PLUGIN_ID, 0, ToolMessages.getString("RunExternalToolAction.runProblem"), null); //$NON-NLS-1$;
+ MultiStatus status = new MultiStatus(IExternalToolConstants.PLUGIN_ID, 0, ExternalToolsModelMessages.getString("RunExternalToolAction.runProblem"), null); //$NON-NLS-1$;
String expandedLocation = ToolUtil.expandDirectoryLocation(location, context, status);
if (status.isOK()) {
if (expandedLocation != null && expandedLocation.length() > 0) {
if (path.isDirectory()) {
return new Path(expandedLocation);
} else {
- String msg = ToolMessages.format("DefaultRunnerContext.invalidDirectory", new Object[] { configuration.getName()}); //$NON-NLS-1$
+ String msg = ExternalToolsModelMessages.format("DefaultRunnerContext.invalidDirectory", new Object[] { configuration.getName()}); //$NON-NLS-1$
abort(msg, null, 0);
}
}
public static String[] getArguments(ILaunchConfiguration configuration, ExpandVariableContext context) throws CoreException {
String args = configuration.getAttribute(IExternalToolConstants.ATTR_TOOL_ARGUMENTS, (String) null);
if (args != null) {
- MultiStatus status = new MultiStatus(IExternalToolConstants.PLUGIN_ID, 0, ToolMessages.getString("RunExternalToolAction.runProblem"), null); //$NON-NLS-1$;
+ MultiStatus status = new MultiStatus(IExternalToolConstants.PLUGIN_ID, 0, ExternalToolsModelMessages.getString("RunExternalToolAction.runProblem"), null); //$NON-NLS-1$;
String[] expandedArgs = ToolUtil.expandArguments(args, context, status);
if (status.isOK()) {
return expandedArgs;
ToolUtil.VariableDefinition varDef = ToolUtil.extractVariableTag(scope, 0);
if (varDef.start == -1 || varDef.end == -1 || varDef.name == null) {
- String msg = ToolMessages.format("DefaultRunnerContext.invalidRefreshVarFormat", new Object[] { configuration.getName()}); //$NON-NLS-1$
+ String msg = ExternalToolsModelMessages.format("DefaultRunnerContext.invalidRefreshVarFormat", new Object[] { configuration.getName()}); //$NON-NLS-1$
abort(msg, null, 0);
}
RefreshScopeVariableRegistry registry = ExternalToolsPlugin.getDefault().getRefreshVariableRegistry();
RefreshScopeVariable variable = registry.getRefreshVariable(varDef.name);
if (variable == null) {
- String msg = ToolMessages.format("DefaultRunnerContext.noRefreshVarNamed", new Object[] { configuration.getName(), varDef.name }); //$NON-NLS-1$
+ String msg = ExternalToolsModelMessages.format("DefaultRunnerContext.noRefreshVarNamed", new Object[] { configuration.getName(), varDef.name }); //$NON-NLS-1$
abort(msg, null, 0);
}
if (resources == null || resources.length == 0)
return;
- monitor.beginTask(ToolMessages.getString("DefaultRunnerContext.refreshResources"), //$NON-NLS-1$
+ monitor.beginTask(ExternalToolsModelMessages.getString("DefaultRunnerContext.refreshResources"), //$NON-NLS-1$
resources.length);
MultiStatus status = new MultiStatus(IExternalToolConstants.PLUGIN_ID, 0, ExternalToolsLaunchConfigurationMessages.getString("ExternalToolsUtil.Exception(s)_occurred_during_refresh._2"), null); //$NON-NLS-1$