KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > internal > ui > stringsubstitution > WorkspaceResolver


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.debug.internal.ui.stringsubstitution;
12
13
14 import org.eclipse.core.resources.IResource;
15 import org.eclipse.core.variables.IDynamicVariable;
16
17 /**
18  * Resolves the <code>${workspace_loc}</code> variable. The variable resolves to the
19  * location of the workspace. If an argument is provided, it is interpretted as a
20  * workspace relative path to a specific resource.
21  *
22  * @since 3.0
23  */

24 public class WorkspaceResolver extends ResourceResolver {
25
26     /**
27      * The <code>${workspace_loc}</code> variable does not use the selected resource.
28      *
29      * @see org.eclipse.debug.internal.ui.stringsubstitution.ResourceResolver#getSelectedResource(org.eclipse.debug.internal.core.stringsubstitution.IContextVariable)
30      */

31     protected IResource getSelectedResource(IDynamicVariable variable) {
32         return getWorkspaceRoot();
33     }
34
35 }
36
Popular Tags