Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » "static initializer is exceeding the 65535 bytes limit" with xtext2.0
"static initializer is exceeding the 65535 bytes limit" with xtext2.0 [message #685556] Fri, 17 June 2011 18:27 Go to next message
Raymond Feng is currently offline Raymond FengFriend
Messages: 4
Registered: July 2009
Junior Member
Hi,

I'm play the latest xtext2 from Indigo. Now I'm blocked by the antlr code generation issue:

Description Resource Path Location Type
The code for the static initializer is exceeding the 65535 bytes limit InternalUDDLParser.java /xyz.dsl.ui/src-gen/com/xyz/ui/contentassist/antlr/internal line 24 Java Problem

I don't see this issue with xtext 1.x.

The MWE2 workflow file I have is as follows:

Workflow {
bean = StandaloneSetup {
scanClassPath = true
platformUri = "${runtimeProject}/.."
}

component = DirectoryCleaner {
directory = "${runtimeProject}/src-gen"
}

component = DirectoryCleaner {
directory = "${runtimeProject}.ui/src-gen"
}

component = Generator {
pathRtProject = runtimeProject
pathUiProject = "${runtimeProject}.ui"
pathTestProject = "${runtimeProject}.tests"
projectNameRt = projectName
projectNameUi = "${projectName}.ui"
language = {
uri = grammarURI
fileExtensions = file.extensions

// Java API to access grammar elements (required by several other fragments)
fragment = grammarAccess.GrammarAccessFragment {}

// generates Java API for the generated EPackages
fragment = ecore.EcoreGeneratorFragment {
// referencedGenModels = "
// platform:/resource/org.eclipse.xtext.xbase/model/Xbase.genmodel,
// platform:/resource/org.eclipse.xtext.common.types/model/JavaVMTypes.genmodel
// "
}

// the serialization component
fragment = parseTreeConstructor.ParseTreeConstructorFragment {}

// a custom ResourceFactory for use with EMF
fragment = resourceFactory.ResourceFactoryFragment {
fileExtensions = file.extensions
}

// The antlr parser generator fragment.
fragment = parser.antlr.ex.rt.AntlrGeneratorFragment {
options = {
classSplitting = true
}
// options = {
// backtrack = true
// }
}

// java-based API for validation
fragment = validation.JavaValidatorFragment {
composedCheck = "org.eclipse.xtext.validation.ImportUriValidator"
composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator"
}

// scoping and exporting API
// fragment = scoping.ImportURIScopingFragment {}
// fragment = exporting.SimpleNamesFragment {}

// scoping and exporting API
fragment = scoping.ImportNamespacesScopingFragment {}
fragment = exporting.QualifiedNamesFragment {}
fragment = builder.BuilderIntegrationFragment {}

// generator API
fragment = generator.GeneratorFragment {
generateMwe = true
generateJavaMain = true
}

// formatter API
fragment = formatting.FormatterFragment {}

// labeling API
fragment = labeling.LabelProviderFragment {}

// outline API
fragment = outline.OutlineTreeProviderFragment {}
fragment = outline.QuickOutlineFragment {}

// quickfix API
fragment = quickfix.QuickfixProviderFragment {}

// content assist API
fragment = contentAssist.JavaBasedContentAssistFragment {}

fragment = parser.antlr.ex.ca.ContentAssistParserGeneratorFragment {
options = {
classSplitting = true
}
}

// rename refactoring
// fragment = refactoring.RefactorElementNameFragment {}

// provides a compare view
fragment = compare.CompareFragment {
fileExtensions = file.extensions
}

// generates a more lightweight Antlr parser and lexer tailored for content assist
fragment = parser.antlr.XtextAntlrUiGeneratorFragment {}

// generates junit test support classes into Generator#pathTestProject
fragment = junit.Junit4Fragment {}

// project wizard (optional)
// fragment = projectWizard.SimpleProjectWizardFragment {
// generatorProjectName = "${projectName}.generator"
// modelFileExtension = file.extensions
// }
fragment = types.TypesGeneratorFragment {}
// generates the required bindings only if the grammar inherits from Xbase
fragment = xbase.XbaseGeneratorFragment {}

// provides a preference page for template proposals
fragment = templates.CodetemplatesGeneratorFragment {}
}
}
}
Re: "static initializer is exceeding the 65535 bytes limit" with xtext2.0 [message #685581 is a reply to message #685556] Fri, 17 June 2011 20:03 Go to previous messageGo to next message
Ingo Meyer is currently offline Ingo MeyerFriend
Messages: 162
Registered: July 2009
Senior Member
Hi,

I have the same problem, too.
The same grammar in Xtext 1.0.1 will work for the XtextAntlrGeneratorFragment part.

Since now I could never get the XtextAntlrUiGeneratorFragment to work (65k problem) but in 1.0.1 I could outcomment that and it works without content assist.
In 2 I could not outcomment that part cause it will generate some artifact which require the ui parser.

Actually this will lead to 2.5 questions:
1. What is the difference for the ANTLR configuration from 1 to 2
2. How can one outcomment the UI parser fragment or force it to have the same output then the other fragment


For me this is an important topic cause there is no chance to split the grammar.

Thanks for your help in advance,

Ingo

PS: Xtext 2 seems to be a big improvment, great work!
Re: "static initializer is exceeding the 65535 bytes limit" with xtext2.0 [message #686141 is a reply to message #685581] Mon, 20 June 2011 07:35 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi Ingo, Hi Raymond,

I'm afraid you found a regression. Please file a ticket.

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 17.06.11 22:03, schrieb Ingo Meyer:
> Hi,
>
> I have the same problem, too.
> The same grammar in Xtext 1.0.1 will work for the
> XtextAntlrGeneratorFragment part.
>
> Since now I could never get the XtextAntlrUiGeneratorFragment to work
> (65k problem) but in 1.0.1 I could outcomment that and it works without
> content assist.
> In 2 I could not outcomment that part cause it will generate some
> artifact which require the ui parser.
>
> Actually this will lead to 2.5 questions:
> 1. What is the difference for the ANTLR configuration from 1 to 2
> 2. How can one outcomment the UI parser fragment or force it to have the
> same output then the other fragment
>
>
> For me this is an important topic cause there is no chance to split the
> grammar.
>
> Thanks for your help in advance,
>
> Ingo
>
> PS: Xtext 2 seems to be a big improvment, great work!
Re: "static initializer is exceeding the 65535 bytes limit" with xtext2.0 [message #686217 is a reply to message #686141] Tue, 21 June 2011 20:41 Go to previous messageGo to next message
Raymond Feng is currently offline Raymond FengFriend
Messages: 4
Registered: July 2009
Junior Member
Thanks, Sebastien. A bug is filed under: (https) bugs.eclipse.org/bugs/show_bug.cgi?id=349992.

The forum doesn't allow me to use links until I have posted more than 5 messages Smile.
Re: "static initializer is exceeding the 65535 bytes limit" with xtext2.0 [message #701686 is a reply to message #685581] Mon, 25 July 2011 12:48 Go to previous message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi Ingo,

could you please provide a grammar that reproduces the problem?

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

On 17.06.11 22:03, Ingo Meyer wrote:
> Hi,
>
> I have the same problem, too.
> The same grammar in Xtext 1.0.1 will work for the
> XtextAntlrGeneratorFragment part.
>
> Since now I could never get the XtextAntlrUiGeneratorFragment to work
> (65k problem) but in 1.0.1 I could outcomment that and it works without
> content assist.
> In 2 I could not outcomment that part cause it will generate some
> artifact which require the ui parser.
>
> Actually this will lead to 2.5 questions:
> 1. What is the difference for the ANTLR configuration from 1 to 2
> 2. How can one outcomment the UI parser fragment or force it to have the
> same output then the other fragment
>
>
> For me this is an important topic cause there is no chance to split the
> grammar.
>
> Thanks for your help in advance,
>
> Ingo
>
> PS: Xtext 2 seems to be a big improvment, great work!
Previous Topic:Issue with generator
Next Topic:How do I change the Matcher at ContentAssistContext?
Goto Forum:
  


Current Time: Fri Apr 26 18:45:56 GMT 2024

Powered by FUDForum. Page generated in 0.03083 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top