Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] add new keyword recognize by the dom parser

Hi,

> What I noticed is the following :
> 1. the reconciler for the cusotmisation coloration do is job 
> just before the
> ast parser : so coloration is applied correctly
> 2. then, the ast parser changed the coloration and remove it for the @
> element

The ast parser does not change the colorization (at least not directly),
but the AST is used to do the so-called semantic highlighting, where
identifiers are colored according to their kind (local variable, method,
etc.).

I cannot imagine that this would override the colorization of the syntax
highlighter (the presentation reconciler) unless the identifier
positions in the AST are wrong, so that the color is applied to the
wrong text range.

To verify this, disable the semantic highlighting (in the preferences)
and the syntax highlighting should be correct again.

Hope this helps
Toni

> -----Original Message-----
> From: cdt-dev-bounces@xxxxxxxxxxx 
> [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Christian 
> Wiederseiner
> Sent: Thursday, June 12, 2008 9:57 AM
> To: cdt-dev@xxxxxxxxxxx
> Subject: Re: [cdt-dev] add new keyword recognize by the dom parser
> 
> 
> hello,
> 
> Thank you it works well now. The reason why we will actually 
> not implement
> using the C99 is because of time, my collegue and I are doing 
> this as a
> semester project.
> We were able to extend from CDT (the coloration editor, 
> compilation, and
> execution) for POPC++ (the distributed language based on C++)
> 
> We will add a brief description about the C99 project in the 
> report and
> point to it for the future improvement of the plug-in.
> 
> 
> I have still another question, because of an issue since I 
> implemented the
> parclass{}
> 
> We have done a customisation coloration for pattern similar 
> to this one @{
> od.url(machine);} using :
>    public final class FastPopCPartitionScanner implements
> IPartitionTokenScanner, ICPartitions {
>    public class PopCSourceViewerConfiguration extends
> CSourceViewerConfiguration {
> 
> [...]
> 	//returns damagers/repairers for the different partitions
> 	@Override
> 	public IPresentationReconciler 
> getPresentationReconciler(ISourceViewer
> sourceViewer) {
> 		CPresentationReconciler reconciler = 
> 			
> (CPresentationReconciler)super.getPresentationReconciler(sourc
eViewer);
> 		
> 		DefaultDamagerRepairer dr= new
> DefaultDamagerRepairer(getObjConfigScanner());
> 		reconciler.setDamager(dr,
> FastPopCPartitionScanner.POPC_OBJECT_DESCRIPTION);
> 		reconciler.setRepairer(dr,
> FastPopCPartitionScanner.POPC_OBJECT_DESCRIPTION);
> 		
> 		return reconciler;
> 	}
>    }
>    public class PopCTextTools extends CTextTools {
> 
> 
> 
> Before the parclass{} was implemented, the ast parser stop is 
> job at the
> parclass{}. Now it go inside the parclass and changed the 
> color of some
> elements which were colored with that.
> But the issue is about the @{ od.url(machine);}, as it 
> recognized it as a
> Bad character sequence encountered : @ . It clear the customisation
> coloration we have done.
> 
> What I noticed is the following :
> 1. the reconciler for the cusotmisation coloration do is job 
> just before the
> ast parser : so coloration is applied correctly
> 2. then, the ast parser changed the coloration and remove it for the @
> element
> 
> I hope there is enough informations, and you could give me a 
> hint were to
> start to handle this issue.
> 
> Thank you in advance,
> -- 
> View this message in context: 
> http://www.nabble.com/add-new-keyword-recognize-by-the-dom-par
ser-tp17621864p17794470.html
> Sent from the Eclipse CDT - Development mailing list archive 
> at Nabble.com.
> 
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/cdt-dev
> 


Back to the top