1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-07 08:15:48 +02:00

added core file extension filters to debug config

This commit is contained in:
David Inglis 2004-10-18 17:45:23 +00:00
parent c7caaff4a6
commit ea6cb36860
3 changed files with 36 additions and 7 deletions

View file

@ -86,6 +86,13 @@
</documentation>
</annotation>
</attribute>
<attribute name="coreFileFilter" type="string">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
</complexType>
</element>

View file

@ -28,6 +28,7 @@ public interface ICDebugConfiguration {
String getPlatform();
String[] getCPUList();
String[] getModeList();
String[] getCoreFileExtensions();
boolean supportsCPU(String cpu);
boolean supportsMode(String mode);
}

View file

@ -10,7 +10,9 @@
*******************************************************************************/
package org.eclipse.cdt.debug.internal.core;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.StringTokenizer;
@ -31,6 +33,7 @@ public class DebugConfiguration implements ICDebugConfiguration {
private IConfigurationElement fElement;
private HashSet fModes;
private HashSet fCPUs;
private String[] fCoreExt;
public DebugConfiguration(IConfigurationElement element) {
fElement = element;
@ -136,4 +139,22 @@ public class DebugConfiguration implements ICDebugConfiguration {
return fCPUs;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.debug.core.ICDebugConfiguration#getCoreFileExtensions()
*/
public String[] getCoreFileExtensions() {
if (fCoreExt == null) {
String cexts = getConfigurationElement().getAttribute("coreFileFilter"); //$NON-NLS-1$
StringTokenizer tokenizer = new StringTokenizer(cexts, ","); //$NON-NLS-1$
List exts = new ArrayList();
while (tokenizer.hasMoreTokens()) {
String ext = tokenizer.nextToken().trim();
exts.add(ext);
}
exts.add("*.*"); //$NON-NLS-1$
fCoreExt = (String[])exts.toArray(new String[exts.size()]);
}
return fCoreExt;
}
}