Lines 19-25
Link Here
|
19 |
import java.io.File; |
19 |
import java.io.File; |
20 |
import java.io.FileInputStream; |
20 |
import java.io.FileInputStream; |
21 |
import java.io.FileNotFoundException; |
21 |
import java.io.FileNotFoundException; |
22 |
import java.io.FilenameFilter; |
|
|
23 |
import java.io.IOException; |
22 |
import java.io.IOException; |
24 |
import java.io.InputStream; |
23 |
import java.io.InputStream; |
25 |
import java.io.InputStreamReader; |
24 |
import java.io.InputStreamReader; |
Lines 65-70
Link Here
|
65 |
import org.eclipse.core.runtime.ISafeRunnable; |
64 |
import org.eclipse.core.runtime.ISafeRunnable; |
66 |
import org.eclipse.core.runtime.IStatus; |
65 |
import org.eclipse.core.runtime.IStatus; |
67 |
import org.eclipse.core.runtime.ListenerList; |
66 |
import org.eclipse.core.runtime.ListenerList; |
|
|
67 |
import org.eclipse.core.runtime.Path; |
68 |
import org.eclipse.core.runtime.Platform; |
68 |
import org.eclipse.core.runtime.Platform; |
69 |
import org.eclipse.core.runtime.PlatformObject; |
69 |
import org.eclipse.core.runtime.PlatformObject; |
70 |
import org.eclipse.core.runtime.Preferences; |
70 |
import org.eclipse.core.runtime.Preferences; |
Lines 931-951
Link Here
|
931 |
List configs = new ArrayList(10); |
931 |
List configs = new ArrayList(10); |
932 |
final File directory = containerPath.toFile(); |
932 |
final File directory = containerPath.toFile(); |
933 |
if (directory.isDirectory()) { |
933 |
if (directory.isDirectory()) { |
934 |
FilenameFilter filter = new FilenameFilter() { |
934 |
traverse(directory, configs); |
935 |
public boolean accept(File dir, String name) { |
|
|
936 |
return dir.equals(directory) && |
937 |
name.endsWith(ILaunchConfiguration.LAUNCH_CONFIGURATION_FILE_EXTENSION); |
938 |
} |
939 |
}; |
940 |
String[] files = directory.list(filter); |
941 |
LaunchConfiguration config = null; |
942 |
for (int i = 0; i < files.length; i++) { |
943 |
config = new LaunchConfiguration(containerPath.append(files[i])); |
944 |
configs.add(config); |
945 |
} |
946 |
} |
935 |
} |
947 |
return configs; |
936 |
return configs; |
948 |
} |
937 |
} |
|
|
938 |
|
939 |
private void traverse(File directory, List configs) { |
940 |
File[] files = directory.listFiles(); |
941 |
for (int i = 0; i < files.length; i++) { |
942 |
File file = files[i]; |
943 |
if (file.isDirectory()) { |
944 |
traverse(file, configs); |
945 |
} else { |
946 |
if (file.getName().endsWith(ILaunchConfiguration.LAUNCH_CONFIGURATION_FILE_EXTENSION)) { |
947 |
configs.add(new LaunchConfiguration(new Path(file.toString()))); |
948 |
} |
949 |
} |
950 |
} |
951 |
} |
949 |
|
952 |
|
950 |
/** |
953 |
/** |
951 |
* Fires notification to (single) listeners that a launch has been |
954 |
* Fires notification to (single) listeners that a launch has been |
Lines 2312-2316
Link Here
|
2312 |
} |
2315 |
} |
2313 |
} |
2316 |
} |
2314 |
return title; |
2317 |
return title; |
2315 |
} |
2318 |
} |
|
|
2319 |
|
2320 |
/* (non-Javadoc) |
2321 |
* @see org.eclipse.debug.core.ILaunchManager#getLaunchConfiguration(org.eclipse.core.runtime.IPath) |
2322 |
*/ |
2323 |
public ILaunchConfiguration getLaunchConfiguration(IPath location) { |
2324 |
return new LaunchConfiguration(location); |
2325 |
} |
2316 |
} |
2326 |
} |