mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-07 16:26:11 +02:00
added core file extension filters to debug config
This commit is contained in:
parent
c7caaff4a6
commit
ea6cb36860
3 changed files with 36 additions and 7 deletions
|
@ -2,13 +2,13 @@
|
||||||
<!-- Schema file written by PDE -->
|
<!-- Schema file written by PDE -->
|
||||||
<schema targetNamespace="org.eclipse.cdt.debug.core">
|
<schema targetNamespace="org.eclipse.cdt.debug.core">
|
||||||
<annotation>
|
<annotation>
|
||||||
<appInfo>
|
<appInfo>
|
||||||
<meta.schema plugin="org.eclipse.cdt.debug.core" id="CDebugger" name="CDebugger"/>
|
<meta.schema plugin="org.eclipse.cdt.debug.core" id="CDebugger" name="CDebugger"/>
|
||||||
</appInfo>
|
</appInfo>
|
||||||
<documentation>
|
<documentation>
|
||||||
[Enter description of this extension point]
|
[Enter description of this extension point]
|
||||||
</documentation>
|
</documentation>
|
||||||
</annotation>
|
</annotation>
|
||||||
|
|
||||||
<element name="extension">
|
<element name="extension">
|
||||||
<complexType>
|
<complexType>
|
||||||
|
@ -86,6 +86,13 @@
|
||||||
</documentation>
|
</documentation>
|
||||||
</annotation>
|
</annotation>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
<attribute name="coreFileFilter" type="string">
|
||||||
|
<annotation>
|
||||||
|
<documentation>
|
||||||
|
|
||||||
|
</documentation>
|
||||||
|
</annotation>
|
||||||
|
</attribute>
|
||||||
</complexType>
|
</complexType>
|
||||||
</element>
|
</element>
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@ public interface ICDebugConfiguration {
|
||||||
String getPlatform();
|
String getPlatform();
|
||||||
String[] getCPUList();
|
String[] getCPUList();
|
||||||
String[] getModeList();
|
String[] getModeList();
|
||||||
|
String[] getCoreFileExtensions();
|
||||||
boolean supportsCPU(String cpu);
|
boolean supportsCPU(String cpu);
|
||||||
boolean supportsMode(String mode);
|
boolean supportsMode(String mode);
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,9 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.debug.internal.core;
|
package org.eclipse.cdt.debug.internal.core;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.StringTokenizer;
|
import java.util.StringTokenizer;
|
||||||
|
|
||||||
|
@ -31,6 +33,7 @@ public class DebugConfiguration implements ICDebugConfiguration {
|
||||||
private IConfigurationElement fElement;
|
private IConfigurationElement fElement;
|
||||||
private HashSet fModes;
|
private HashSet fModes;
|
||||||
private HashSet fCPUs;
|
private HashSet fCPUs;
|
||||||
|
private String[] fCoreExt;
|
||||||
|
|
||||||
public DebugConfiguration(IConfigurationElement element) {
|
public DebugConfiguration(IConfigurationElement element) {
|
||||||
fElement = element;
|
fElement = element;
|
||||||
|
@ -136,4 +139,22 @@ public class DebugConfiguration implements ICDebugConfiguration {
|
||||||
return fCPUs;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue