X-Git-Url: http://secure.phpeclipse.com diff --git a/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/variable/WorkingSetExpander.java b/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/variable/WorkingSetExpander.java index 73474d0..0727bb9 100644 --- a/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/variable/WorkingSetExpander.java +++ b/net.sourceforge.phpeclipse.externaltools/src/net/sourceforge/phpdt/externaltools/variable/WorkingSetExpander.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 org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.IAdaptable; @@ -15,8 +15,7 @@ import org.eclipse.ui.IWorkingSet; import org.eclipse.ui.PlatformUI; /** - * Expands a working set type variable into the desired - * result format. + * Expands a working set type variable into the desired result format. *

* This class is not intended to be extended by clients. *

@@ -30,17 +29,19 @@ public class WorkingSetExpander implements IVariableResourceExpander { super(); } - /* (non-Javadoc) - * Method declared on IVariableResourceExpander. + /* + * (non-Javadoc) Method declared on IVariableResourceExpander. */ - public IResource[] getResources(String varTag, String varValue, ExpandVariableContext context) { + public IResource[] getResources(String varTag, String varValue, + ExpandVariableContext context) { if (varValue == null || varValue.length() == 0) return null; - IWorkingSet set = PlatformUI.getWorkbench().getWorkingSetManager().getWorkingSet(varValue); + IWorkingSet set = PlatformUI.getWorkbench().getWorkingSetManager() + .getWorkingSet(varValue); if (set == null) return null; - + IAdaptable[] elements = set.getElements(); IResource[] resources = new IResource[elements.length]; for (int i = 0; i < elements.length; i++) { @@ -48,9 +49,10 @@ public class WorkingSetExpander implements IVariableResourceExpander { if (adaptable instanceof IResource) resources[i] = (IResource) adaptable; else - resources[i] = (IResource) adaptable.getAdapter(IResource.class); + resources[i] = (IResource) adaptable + .getAdapter(IResource.class); } - + return resources; } }