Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] java.lang.IllegalAccessError


Hello,

A few points:
1.  Scanner2 & BaseScanner are no longer final in CVS HEAD.  
2.  You should not be referencing internal classes from your plugin, as they may change inter-release.
3.  If you don't want to follow inclusions, you should create your Scanner through ParserFactory.createScanner() w/ParserMode parameter set to ParserMode.QUICK_PARSE.  

I'm not sure why you are getting the exception that you are,  but my instructions should hopefully allow you to circumvent it.  
Hope this helps,
JohnC
www.eclipse.org/cdt


cdt-dev-admin@xxxxxxxxxxx wrote on 01/28/2005 12:44:38 AM:

>
> Hello,
>   I wanted to prepare a scanner in a plug-in that will parse the source code
> into tokens, but will not parse the included files using include statements.
> The existing CDT scanner has
> no way of doing this. So, I decided to customize the CDT scanner and
> override the
> poundInclude(...) method. But find the I can't do that because CDT scanner
> is final.
>
>   Next though was to prepare my own CustomScanner. I will copy the entire
> source code
> from org.eclipse.cdt.internal.core.parser.scanner.Scanner into
> org.eclipse.cdt.internal.core.parser.scanner.CustomScanner, modify the
> poundInclude(...)
> method and be get the tokens. I thought since my CustomScanner is in the
> same
> package as CDT Scanner there should not be any troubles. There are no
> compilation
> errors though. But when I run my plug-in which calls CustomScanner I get
> java.lang.IllegalAccessError. The log file which has the exception trace is
> attached.
>  
>   Suggestions are appreciated.
>
> Thanks
> Ramana
>
>
>
>
>
> **************************************************************************
> This email (including any attachments) is intended for the sole use of the
> intended recipient/s and may contain material that is CONFIDENTIAL AND
> PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
> distribution or forwarding of any or all of the contents in this message is
> STRICTLY PROHIBITED. If you are not the intended recipient, please contact
> the sender by email and delete all copies; your cooperation in this regard
> is appreciated.
> **************************************************************************
>  
>
> [attachment "a.log" deleted by John Camelon/Ottawa/IBM]

Back to the top