Home » Language IDEs » C / C++ IDE (CDT) » Extension 
| Extension [message #157007] | 
Sun, 30 October 2005 01:03   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: bjcbell.gmail.com 
 
I am writing a plug in for the CDT to allow me to use Microchip's C18  
compiler. Does anyone know if there is a way to change the default build  
settings for different configurations. In addition is there any way for  
me to have the user which configuration they will use by default. (The  
targets are slightly different for each configuration, but not so  
different that a different type of project is necessary.) I have read  
the Managed Build Extensibility Reference Document for version 2.1.  
Also, it would be nice if someone could point me to some information on  
how to write an error parser, and possibly a binary parser. I am not  
really sure how much work this involves, and it is not absolutely necessary. 
 
Thanks in advance, 
 
Ben
 |  
 |  
  |  
| Re: Extension [message #157145 is a reply to message #157007] | 
Mon, 31 October 2005 14:44    | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: eclipse.dharty.com 
 
> some information on  how to write an  error parser, 
 
 
The Error parser is not to hard, I imagine a binary parser is similar. 
 
take a look at 
 
 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-cor e/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/errorpar sers/?cvsroot=Tools_Project#dirlist 
 
for the code to the existing cdt error parsers.  You will also want to  
look at the plugin.xml file for the existing cdt error parser and binary  
parser plugins (extract the .jar files with an archiving utility like  
winrar or jar.exe that comes with the java jdk). 
 
 
To start, create a new plugin project. 
 
When the project is created, click on the "Extensions" of the project  
page to add a new extension of the org.eclipse.cdt.core.ErrorParserpoint  
extension point.  Be sure you connect to this existing extension, don't  
try to add/create a new extension point. 
 
You now need to edit the plugin.xml file manually.  There should exist  
an extension tag that looks like: 
 
    <extension 
          point="org.eclipse.cdt.core.ErrorParser"> 
    </extension> 
 
 
You will need to add an id attribute, a name attribute, and an  
erroparser element that points to the ErrorParser class that you are  
going to implement, eg com.mycompany.MyErrorParser: 
 
    <extension 
          point="org.eclipse.cdt.core.ErrorParser"> 
          id="MyErrorParser" 
	 name="%MyErrorParser.name"  <!-- this will be referenced in the  
plugin.properties file, don't forget the '%' --> 
       <errorparser 
             class="com.mycompany.MyErrorParser"> 
       </errorparser> 
    </extension> 
 
 
Now, edit the file plugin.properties an add a line for the ErrorParser  
name, but leave out the '%' symbol.  eg: 
 
	MyErrorParser.name=My Error Parser 
 
 
Now all thats left is to create the error parser class itself, eg  
com.mycompany.MyErrorParser.  You can use the plugin framework to run a  
debug mode of eclipse to debug your error parsers. 
 
My guess is that binary parsers are similar, but the attributes and  
elements in your extension tag will be different.  Again, look at the  
CDT binary parser plugins for examples. 
 
You can extend many extensions in one plugin, or you may prefer to  
create multiple plugins for each extension. 
 
Good Luck, 
 
David 
 
 
 
 
 
Ben C. wrote: 
> I am writing a plug in for the CDT to allow me to use Microchip's C18  
> compiler. Does anyone know if there is a way to change the default build  
> settings for different configurations. In addition is there any way for  
> me to have the user which configuration they will use by default. (The  
> targets are slightly different for each configuration, but not so  
> different that a different type of project is necessary.) I have read  
> the Managed Build Extensibility Reference Document for version 2.1.  
> Also, it would be nice if someone could point me to some information on  
> how to write an error parser, and possibly a binary parser. I am not  
> really sure how much work this involves, and it is not absolutely  
> necessary. 
>  
> Thanks in advance, 
>  
> Ben
 |  
 |  
  |  
| Re: Extension [message #157362 is a reply to message #157145] | 
Sun, 06 November 2005 12:49    | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: bjcbell.gmail.com 
 
Thanks. 
The error parser I am writing is meant to be used with a new managed  
build configuration. Can it be included in that extension or should it  
be another? 
Thanks 
Ben 
David H wrote: 
>  
>  > some information on  how to write an  error parser, 
>  
>  
> The Error parser is not to hard, I imagine a binary parser is similar. 
>  
> take a look at 
>  
>  http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-cor e/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/errorpar sers/?cvsroot=Tools_Project#dirlist  
>  
>  
> for the code to the existing cdt error parsers.  You will also want to  
> look at the plugin.xml file for the existing cdt error parser and binary  
> parser plugins (extract the .jar files with an archiving utility like  
> winrar or jar.exe that comes with the java jdk). 
>  
>  
> To start, create a new plugin project. 
>  
> When the project is created, click on the "Extensions" of the project  
> page to add a new extension of the org.eclipse.cdt.core.ErrorParserpoint  
> extension point.  Be sure you connect to this existing extension, don't  
> try to add/create a new extension point. 
>  
> You now need to edit the plugin.xml file manually.  There should exist  
> an extension tag that looks like: 
>  
>    <extension 
>          point="org.eclipse.cdt.core.ErrorParser"> 
>    </extension> 
>  
>  
> You will need to add an id attribute, a name attribute, and an  
> erroparser element that points to the ErrorParser class that you are  
> going to implement, eg com.mycompany.MyErrorParser: 
>  
>    <extension 
>          point="org.eclipse.cdt.core.ErrorParser"> 
>          id="MyErrorParser" 
>      name="%MyErrorParser.name"  <!-- this will be referenced in the  
> plugin.properties file, don't forget the '%' --> 
>       <errorparser 
>             class="com.mycompany.MyErrorParser"> 
>       </errorparser> 
>    </extension> 
>  
>  
> Now, edit the file plugin.properties an add a line for the ErrorParser  
> name, but leave out the '%' symbol.  eg: 
>  
>     MyErrorParser.name=My Error Parser 
>  
>  
> Now all thats left is to create the error parser class itself, eg  
> com.mycompany.MyErrorParser.  You can use the plugin framework to run a  
> debug mode of eclipse to debug your error parsers. 
>  
> My guess is that binary parsers are similar, but the attributes and  
> elements in your extension tag will be different.  Again, look at the  
> CDT binary parser plugins for examples. 
>  
> You can extend many extensions in one plugin, or you may prefer to  
> create multiple plugins for each extension. 
>  
> Good Luck, 
>  
> David 
>  
>  
>  
>  
>  
> Ben C. wrote: 
>  
>> I am writing a plug in for the CDT to allow me to use Microchip's C18  
>> compiler. Does anyone know if there is a way to change the default  
>> build settings for different configurations. In addition is there any  
>> way for me to have the user which configuration they will use by  
>> default. (The targets are slightly different for each configuration,  
>> but not so different that a different type of project is necessary.) I  
>> have read the Managed Build Extensibility Reference Document for  
>> version 2.1. Also, it would be nice if someone could point me to some  
>> information on how to write an error parser, and possibly a binary  
>> parser. I am not really sure how much work this involves, and it is  
>> not absolutely necessary. 
>> 
>> Thanks in advance, 
>> 
>> Ben
 |  
 |  
  |  
| Re: Extension [message #157431 is a reply to message #157362] | 
Mon, 07 November 2005 14:24   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: eclipse.dharty.com 
 
> The error parser I am writing is meant to be used with a new managed 
 > build configuration. Can it be included in that extension or should it 
 > be another? 
 
 
When you saw new, do you mean a new plugin that you are writing to  
perform managed builds? or do you simply mean that you want to use the  
parser when a new managed build project is created? 
 
If you are writing a new managed build configuration plugin, you can  
include the error parser in it, but the parser itself will still need to  
extend the org.eclipse.cdt.core.ErrorParser extension point. 
 
Either way, the new plugin should appear in the list of available error  
parsers listed in the project properties dialog. 
 
Project->Properties->C/C++ Make Project->Error Parsers tab. 
 
If you are trying to get more complicated then that, eg you want the  
plugin to appear only for your new managed build configuration plugin,  
then you are getting in over my head.  You might be able to extend the  
cdt error parser plugin without using the cdt extension point, and then  
create your own extension point for within your managed build plugin,  
but again, thats getting over my head, I have never done it. 
 
Also, check out the eclipse.platform group for more specific info on  
writing plugins in general. 
 
Good luck, 
 
D 
 
 
 
Ben C. wrote: 
> Thanks. 
> The error parser I am writing is meant to be used with a new managed  
> build configuration. Can it be included in that extension or should it  
> be another? 
> Thanks 
> Ben 
> David H wrote: 
>  
>> 
>>  > some information on  how to write an  error parser, 
>> 
>> 
>> The Error parser is not to hard, I imagine a binary parser is similar. 
>> 
>> take a look at 
>> 
>>  http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-cor e/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/errorpar sers/?cvsroot=Tools_Project#dirlist  
>> 
>> 
>> for the code to the existing cdt error parsers.  You will also want to  
>> look at the plugin.xml file for the existing cdt error parser and  
>> binary parser plugins (extract the .jar files with an archiving  
>> utility like winrar or jar.exe that comes with the java jdk). 
>> 
>> 
>> To start, create a new plugin project. 
>> 
>> When the project is created, click on the "Extensions" of the project  
>> page to add a new extension of the  
>> org.eclipse.cdt.core.ErrorParserpoint extension point.  Be sure you  
>> connect to this existing extension, don't try to add/create a new  
>> extension point. 
>> 
>> You now need to edit the plugin.xml file manually.  There should exist  
>> an extension tag that looks like: 
>> 
>>    <extension 
>>          point="org.eclipse.cdt.core.ErrorParser"> 
>>    </extension> 
>> 
>> 
>> You will need to add an id attribute, a name attribute, and an  
>> erroparser element that points to the ErrorParser class that you are  
>> going to implement, eg com.mycompany.MyErrorParser: 
>> 
>>    <extension 
>>          point="org.eclipse.cdt.core.ErrorParser"> 
>>          id="MyErrorParser" 
>>      name="%MyErrorParser.name"  <!-- this will be referenced in the  
>> plugin.properties file, don't forget the '%' --> 
>>       <errorparser 
>>             class="com.mycompany.MyErrorParser"> 
>>       </errorparser> 
>>    </extension> 
>> 
>> 
>> Now, edit the file plugin.properties an add a line for the ErrorParser  
>> name, but leave out the '%' symbol.  eg: 
>> 
>>     MyErrorParser.name=My Error Parser 
>> 
>> 
>> Now all thats left is to create the error parser class itself, eg  
>> com.mycompany.MyErrorParser.  You can use the plugin framework to run  
>> a debug mode of eclipse to debug your error parsers. 
>> 
>> My guess is that binary parsers are similar, but the attributes and  
>> elements in your extension tag will be different.  Again, look at the  
>> CDT binary parser plugins for examples. 
>> 
>> You can extend many extensions in one plugin, or you may prefer to  
>> create multiple plugins for each extension. 
>> 
>> Good Luck, 
>> 
>> David 
>> 
>> 
>> 
>> 
>> 
>> Ben C. wrote: 
>> 
>>> I am writing a plug in for the CDT to allow me to use Microchip's C18  
>>> compiler. Does anyone know if there is a way to change the default  
>>> build settings for different configurations. In addition is there any  
>>> way for me to have the user which configuration they will use by  
>>> default. (The targets are slightly different for each configuration,  
>>> but not so different that a different type of project is necessary.)  
>>> I have read the Managed Build Extensibility Reference Document for  
>>> version 2.1. Also, it would be nice if someone could point me to some  
>>> information on how to write an error parser, and possibly a binary  
>>> parser. I am not really sure how much work this involves, and it is  
>>> not absolutely necessary. 
>>> 
>>> Thanks in advance, 
>>> 
>>> Ben
 |  
 |  
  |   
Goto Forum:
 
 Current Time: Mon Nov 03 18:59:21 EST 2025 
 Powered by  FUDForum. Page generated in 0.04062 seconds  
 |