X-Git-Url: http://secure.phpeclipse.com
diff --git a/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/variable/ExpandVariableContext.java b/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/variable/ExpandVariableContext.java
index b5eeb46..bfbf30e 100644
--- a/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/variable/ExpandVariableContext.java
+++ b/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/variable/ExpandVariableContext.java
@@ -1,13 +1,13 @@
package net.sourceforge.phpdt.externaltools.variable;
/**********************************************************************
-Copyright (c) 2002 IBM Corp. and others. All rights reserved.
-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:
-**********************************************************************/
+ Copyright (c) 2002 IBM Corp. and others. All rights reserved.
+ 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.model.IExternalToolConstants;
@@ -16,49 +16,55 @@ import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IncrementalProjectBuilder;
/**
- * Represents the context the external tool is running in
- * that a variable uses to expand itself.
+ * Represents the context the external tool is running in that a variable uses
+ * to expand itself.
*/
public final class ExpandVariableContext {
- public static final ExpandVariableContext EMPTY_CONTEXT = new ExpandVariableContext(null);
-
+ public static final ExpandVariableContext EMPTY_CONTEXT = new ExpandVariableContext(
+ null);
+
private IProject project = null;
+
private IResource selectedResource = null;
+
private String buildType = IExternalToolConstants.BUILD_TYPE_NONE;
-
+
/**
- * Create a context for an external tool running
- * as a builder on the given project.
+ * Create a context for an external tool running as a builder on the given
+ * project.
*
- * @param project the IProject
being built.
- * @param buildKind the kind of build being performed
- * (see IncrementalProjectBuilder
).
+ * @param project
+ * the IProject
being built.
+ * @param buildKind
+ * the kind of build being performed (see
+ * IncrementalProjectBuilder
).
*/
public ExpandVariableContext(IProject project, int buildKind) {
super();
this.project = project;
switch (buildKind) {
- case IncrementalProjectBuilder.INCREMENTAL_BUILD :
- this.buildType = IExternalToolConstants.BUILD_TYPE_INCREMENTAL;
- break;
- case IncrementalProjectBuilder.FULL_BUILD :
- this.buildType = IExternalToolConstants.BUILD_TYPE_FULL;
- break;
- case IncrementalProjectBuilder.AUTO_BUILD :
- this.buildType = IExternalToolConstants.BUILD_TYPE_AUTO;
- break;
- default :
- this.buildType = IExternalToolConstants.BUILD_TYPE_NONE;
- break;
+ case IncrementalProjectBuilder.INCREMENTAL_BUILD:
+ this.buildType = IExternalToolConstants.BUILD_TYPE_INCREMENTAL;
+ break;
+ case IncrementalProjectBuilder.FULL_BUILD:
+ this.buildType = IExternalToolConstants.BUILD_TYPE_FULL;
+ break;
+ case IncrementalProjectBuilder.AUTO_BUILD:
+ this.buildType = IExternalToolConstants.BUILD_TYPE_AUTO;
+ break;
+ default:
+ this.buildType = IExternalToolConstants.BUILD_TYPE_NONE;
+ break;
}
}
-
+
/**
- * Create a context for an external tool running
- * with the given resource selected.
+ * Create a context for an external tool running with the given resource
+ * selected.
*
- * @param selectedResource the IResource
selected
- * or null
if none.
+ * @param selectedResource
+ * the IResource
selected or null
+ * if none.
*/
public ExpandVariableContext(IResource selectedResource) {
super();
@@ -67,34 +73,35 @@ public final class ExpandVariableContext {
this.project = selectedResource.getProject();
}
}
-
+
/**
- * Returns the build type being performed if the
- * external tool is being run as a project builder.
+ * Returns the build type being performed if the external tool is being run
+ * as a project builder.
*
- * @return one of the IExternalToolConstants.BUILD_TYPE_*
constants.
+ * @return one of the IExternalToolConstants.BUILD_TYPE_*
+ * constants.
*/
public String getBuildType() {
return buildType;
}
-
+
/**
- * Returns the project which the variable can use. This
- * will the the project being built if the tool is being
- * run as a builder. Otherwise, it is the project of the
- * selected resource, or null
if none.
+ * Returns the project which the variable can use. This will the the project
+ * being built if the tool is being run as a builder. Otherwise, it is the
+ * project of the selected resource, or null
if none.
*
* @return the IProject
or null
if none
*/
public IProject getProject() {
return project;
}
-
+
/**
- * Returns the resource selected at the time the tool
- * is run, or null
if none selected.
+ * Returns the resource selected at the time the tool is run, or
+ * null
if none selected.
*
- * @return the IResource
selected, or null
if none
+ * @return the IResource
selected, or null
if
+ * none
*/
public IResource getSelectedResource() {
return selectedResource;