mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 08:55:25 +02:00
getBinaryParserConfiguration() new method
This commit is contained in:
parent
15b90e48c6
commit
976636ba5a
1 changed files with 7 additions and 8 deletions
|
@ -13,8 +13,8 @@ import java.util.ResourceBundle;
|
||||||
import org.eclipse.cdt.core.builder.ICBuilder;
|
import org.eclipse.cdt.core.builder.ICBuilder;
|
||||||
import org.eclipse.cdt.core.index.IndexModel;
|
import org.eclipse.cdt.core.index.IndexModel;
|
||||||
import org.eclipse.cdt.core.model.CoreModel;
|
import org.eclipse.cdt.core.model.CoreModel;
|
||||||
import org.eclipse.cdt.core.model.IBinaryParser;
|
|
||||||
import org.eclipse.cdt.core.resources.IConsole;
|
import org.eclipse.cdt.core.resources.IConsole;
|
||||||
|
import org.eclipse.cdt.internal.core.BinaryParserConfiguration;
|
||||||
import org.eclipse.cdt.internal.core.CDescriptorManager;
|
import org.eclipse.cdt.internal.core.CDescriptorManager;
|
||||||
import org.eclipse.core.resources.IProject;
|
import org.eclipse.core.resources.IProject;
|
||||||
import org.eclipse.core.resources.IProjectDescription;
|
import org.eclipse.core.resources.IProjectDescription;
|
||||||
|
@ -159,7 +159,7 @@ public class CCorePlugin extends Plugin {
|
||||||
return getConsole(null);
|
return getConsole(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String[] getBinaryParserFormats() {
|
public IBinaryParserConfiguration[] getBinaryParserConfigurations() {
|
||||||
ArrayList list = new ArrayList();
|
ArrayList list = new ArrayList();
|
||||||
IExtensionPoint extensionPoint = getDescriptor().getExtensionPoint("BinaryParser");
|
IExtensionPoint extensionPoint = getDescriptor().getExtensionPoint("BinaryParser");
|
||||||
if (extensionPoint != null) {
|
if (extensionPoint != null) {
|
||||||
|
@ -167,14 +167,13 @@ public class CCorePlugin extends Plugin {
|
||||||
for(int i = 0; i < extensions.length; i++){
|
for(int i = 0; i < extensions.length; i++){
|
||||||
IConfigurationElement [] configElements = extensions[i].getConfigurationElements();
|
IConfigurationElement [] configElements = extensions[i].getConfigurationElements();
|
||||||
for( int j = 0; j < configElements.length; j++ ) {
|
for( int j = 0; j < configElements.length; j++ ) {
|
||||||
String attr = configElements[j].getAttribute("format");
|
String format = configElements[j].getAttribute("format");
|
||||||
if (attr != null) {
|
String name = configElements[j].getAttribute("name");
|
||||||
list.add(attr);
|
list.add(new BinaryParserConfiguration(format, name));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return (String[])list.toArray(new String[0]);
|
return (IBinaryParserConfiguration[])list.toArray(new IBinaryParserConfiguration[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IBinaryParser getBinaryParser(String format) {
|
public IBinaryParser getBinaryParser(String format) {
|
||||||
|
@ -195,7 +194,7 @@ public class CCorePlugin extends Plugin {
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public CoreModel getCoreModel() {
|
public CoreModel getCoreModel() {
|
||||||
return CoreModel.getDefault();
|
return CoreModel.getDefault();
|
||||||
|
|
Loading…
Add table
Reference in a new issue