[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-patch] CDT Core changes
|
new extension point used to get a process list of local machine.
-------
? schema
Index: ProcessList.exsd
===================================================================
RCS file: ProcessList.exsd
diff -N ProcessList.exsd
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ProcessList.exsd 17 Sep 2002 18:53:52 -0000
@@ -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>
Index: plugin.properties
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/plugin.properties,v
retrieving revision 1.6
diff -u -r1.6 plugin.properties
--- plugin.properties 6 Sep 2002 20:16:04 -0000 1.6
+++ plugin.properties 17 Sep 2002 18:53:52 -0000
@@ -9,6 +9,7 @@
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
Index: plugin.xml
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/plugin.xml,v
retrieving revision 1.9
diff -u -r1.9 plugin.xml
--- plugin.xml 16 Sep 2002 19:50:50 -0000 1.9
+++ plugin.xml 17 Sep 2002 18:53:52 -0000
@@ -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"
Index: src/org/eclipse/cdt/core/CCorePlugin.java
===================================================================
RCS file:
/home/tools/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CCorePlugin.java,v
retrieving revision 1.4
diff -u -r1.4 CCorePlugin.java
--- src/org/eclipse/cdt/core/CCorePlugin.java 6 Sep 2002 20:16:04
-0000 1.4
+++ src/org/eclipse/cdt/core/CCorePlugin.java 17 Sep 2002 18:53:52 -0000
@@ -320,4 +320,20 @@
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;
+ }
}
Index: src/org/eclipse/cdt/core/IProcessInfo.java
===================================================================
RCS file: src/org/eclipse/cdt/core/IProcessInfo.java
diff -N src/org/eclipse/cdt/core/IProcessInfo.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ src/org/eclipse/cdt/core/IProcessInfo.java 17 Sep 2002 18:53:52 -0000
@@ -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();
+}
Index: src/org/eclipse/cdt/core/IProcessList.java
===================================================================
RCS file: src/org/eclipse/cdt/core/IProcessList.java
diff -N src/org/eclipse/cdt/core/IProcessList.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ src/org/eclipse/cdt/core/IProcessList.java 17 Sep 2002 18:53:52 -0000
@@ -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();
+}