mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-07 00:05:53 +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 targetNamespace="org.eclipse.cdt.debug.core">
|
||||
<annotation>
|
||||
<appInfo>
|
||||
<meta.schema plugin="org.eclipse.cdt.debug.core" id="CDebugger" name="CDebugger"/>
|
||||
</appInfo>
|
||||
<documentation>
|
||||
[Enter description of this extension point]
|
||||
</documentation>
|
||||
</annotation>
|
||||
<appInfo>
|
||||
<meta.schema plugin="org.eclipse.cdt.debug.core" id="CDebugger" name="CDebugger"/>
|
||||
</appInfo>
|
||||
<documentation>
|
||||
[Enter description of this extension point]
|
||||
</documentation>
|
||||
</annotation>
|
||||
|
||||
<element name="extension">
|
||||
<complexType>
|
||||
|
@ -86,6 +86,13 @@
|
|||
</documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
<attribute name="coreFileFilter" type="string">
|
||||
<annotation>
|
||||
<documentation>
|
||||
|
||||
</documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
</complexType>
|
||||
</element>
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@ public interface ICDebugConfiguration {
|
|||
String getPlatform();
|
||||
String[] getCPUList();
|
||||
String[] getModeList();
|
||||
String[] getCoreFileExtensions();
|
||||
boolean supportsCPU(String cpu);
|
||||
boolean supportsMode(String mode);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue