KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > debug > ui > launcher > AppletWorkingDirectoryBlock


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 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.jdt.internal.debug.ui.launcher;
12
13 import org.eclipse.core.runtime.Path;
14 import org.eclipse.jdt.launching.JavaRuntime;
15
16  
17 public class AppletWorkingDirectoryBlock extends WorkingDirectoryBlock {
18
19     /**
20      * @see org.eclipse.jdt.internal.debug.ui.launcher.WorkingDirectoryBlock#setDefaultWorkingDir()
21      */

22     protected void setDefaultWorkingDir() {
23         String JavaDoc outputDir = JavaRuntime.getProjectOutputDirectory(getLaunchConfiguration());
24         if (outputDir != null) {
25             outputDir = new Path(outputDir).makeRelative().toOSString();
26             setDefaultWorkingDirectoryText("${workspace_loc:" + outputDir + "}"); //$NON-NLS-1$//$NON-NLS-2$
27
} else {
28             super.setDefaultWorkingDir();
29         }
30     }
31
32 }
33
Popular Tags