mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
new Processlist extension point
This commit is contained in:
parent
43121170e5
commit
60f24d786e
6 changed files with 130 additions and 3 deletions
|
@ -9,6 +9,7 @@ CBuildCommand.name=C Builder Command
|
|||
CBuildConsole.name=C Builder Console
|
||||
CProjectInfo.name=C Project Info
|
||||
CBuilder.name=C Build Model
|
||||
ProcessList.name=Process List
|
||||
|
||||
makeprojectowner.name=Make Project
|
||||
genericmake.name=Generic Make
|
||||
|
|
|
@ -15,13 +15,11 @@
|
|||
<!-- The C Plugin -->
|
||||
<!-- ======================================================================= -->
|
||||
<requires>
|
||||
<import plugin="org.eclipse.ui"/>
|
||||
<import plugin="org.eclipse.core.resources"/>
|
||||
<import plugin="org.eclipse.core.runtime"/>
|
||||
<import plugin="org.apache.xerces"/>
|
||||
<import plugin="org.eclipse.search"/>
|
||||
<import plugin="org.eclipse.compare"/>
|
||||
<import plugin="org.eclipse.debug.ui"/>
|
||||
<import plugin="org.eclipse.debug.core"/>
|
||||
</requires>
|
||||
|
||||
|
@ -30,6 +28,7 @@
|
|||
<extension-point id="CBuildConsole" name="%CBuildConsole.name"/>
|
||||
<extension-point id="CProjectOwner" name="%CProjectOwner.name"/>
|
||||
<extension-point id="CBuildModel" name="%CBuilder.name"/>
|
||||
<extension-point id="ProcessList" name="%ProcessList.name" schema="schema/ProcessList.exsd"/>
|
||||
|
||||
<extension
|
||||
id="cbuilder"
|
||||
|
@ -41,7 +40,6 @@
|
|||
</run>
|
||||
</builder>
|
||||
</extension>
|
||||
|
||||
<extension
|
||||
id="newcbuilder"
|
||||
name="C Builder"
|
||||
|
|
93
core/org.eclipse.cdt.core/schema/ProcessList.exsd
Normal file
93
core/org.eclipse.cdt.core/schema/ProcessList.exsd
Normal file
|
@ -0,0 +1,93 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<!-- Schema file written by PDE -->
|
||||
<schema targetNamespace="org.eclipse.cdt.core">
|
||||
<annotation>
|
||||
<appInfo>
|
||||
<meta.schema plugin="org.eclipse.cdt.core" id="ProcessList" name="%ProcessList.name"/>
|
||||
</appInfo>
|
||||
<documentation>
|
||||
[Enter description of this extension point]
|
||||
</documentation>
|
||||
</annotation>
|
||||
|
||||
<element name="extension">
|
||||
<complexType>
|
||||
<sequence>
|
||||
<element ref="processList"/>
|
||||
</sequence>
|
||||
<attribute name="point" type="string" use="required">
|
||||
<annotation>
|
||||
<documentation>
|
||||
|
||||
</documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
<attribute name="id" type="string">
|
||||
<annotation>
|
||||
<documentation>
|
||||
|
||||
</documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
<attribute name="name" type="string">
|
||||
<annotation>
|
||||
<documentation>
|
||||
|
||||
</documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
</complexType>
|
||||
</element>
|
||||
|
||||
<element name="processList">
|
||||
<complexType>
|
||||
<attribute name="class" type="string" use="required">
|
||||
<annotation>
|
||||
<documentation>
|
||||
|
||||
</documentation>
|
||||
<appInfo>
|
||||
<meta.attribute kind="java" basedOn="org.eclipse.cdt.core.IProcessList"/>
|
||||
</appInfo>
|
||||
</annotation>
|
||||
</attribute>
|
||||
</complexType>
|
||||
</element>
|
||||
|
||||
<annotation>
|
||||
<appInfo>
|
||||
<meta.section type="examples"/>
|
||||
</appInfo>
|
||||
<documentation>
|
||||
[Enter extension point usage example here.]
|
||||
</documentation>
|
||||
</annotation>
|
||||
|
||||
<annotation>
|
||||
<appInfo>
|
||||
<meta.section type="apiInfo"/>
|
||||
</appInfo>
|
||||
<documentation>
|
||||
[Enter API information here.]
|
||||
</documentation>
|
||||
</annotation>
|
||||
|
||||
<annotation>
|
||||
<appInfo>
|
||||
<meta.section type="implementation"/>
|
||||
</appInfo>
|
||||
<documentation>
|
||||
[Enter information about supplied implementation of this extension point.]
|
||||
</documentation>
|
||||
</annotation>
|
||||
|
||||
<annotation>
|
||||
<appInfo>
|
||||
<meta.section type="copyright"/>
|
||||
</appInfo>
|
||||
<documentation>
|
||||
|
||||
</documentation>
|
||||
</annotation>
|
||||
|
||||
</schema>
|
|
@ -320,4 +320,20 @@ public class CCorePlugin extends Plugin {
|
|||
System.arraycopy(extensions, 0, builders, 0, extensions.length);
|
||||
return builders;
|
||||
}
|
||||
|
||||
public IProcessList getProcessList() {
|
||||
IExtensionPoint extension = getDescriptor().getExtensionPoint("ProcessList");
|
||||
if (extension != null) {
|
||||
IExtension[] extensions = extension.getExtensions();
|
||||
IConfigurationElement [] configElements = extensions[0].getConfigurationElements();
|
||||
if ( configElements.length != 0 ) {
|
||||
try {
|
||||
return (IProcessList) configElements[0].createExecutableExtension("class");
|
||||
}
|
||||
catch (CoreException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
/*
|
||||
* (c) Copyright QNX Software System Ltd. 2002.
|
||||
* All Rights Reserved.
|
||||
*/
|
||||
package org.eclipse.cdt.core;
|
||||
|
||||
public interface IProcessInfo {
|
||||
public int getPid();
|
||||
public String getName();
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* (c) Copyright QNX Software System Ltd. 2002.
|
||||
* All Rights Reserved.
|
||||
*/
|
||||
package org.eclipse.cdt.core;
|
||||
|
||||
public interface IProcessList {
|
||||
public IProcessInfo[] getProcessList();
|
||||
}
|
Loading…
Add table
Reference in a new issue