Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtext: Xbase extensions
Xtext: Xbase extensions [message #879454] Thu, 31 May 2012 09:00 Go to next message
Hans-Georg Glöckler is currently offline Hans-Georg GlöcklerFriend
Messages: 88
Registered: July 2009
Member
We have the grammar of your example
/*******************************************************************************
 * Copyright (c) 2009 itemis AG (http://www.itemis.eu) and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *******************************************************************************/
grammar org.eclipse.xtext.example.domainmodel.Domainmodel with org.eclipse.xtext.xbase.Xbase

generate domainmodel "http://www.xtext.org/example/Domainmodel"

DomainModel:
	elements+=AbstractElement*;

AbstractElement:
	PackageDeclaration | Entity | Import;

Import:
	'import' importedNamespace=QualifiedNameWithWildCard;

PackageDeclaration:
	'package' name=QualifiedName '{'
		elements+=AbstractElement*
	'}';

Entity:
	'entity' name=ValidID ('extends' superType=JvmTypeReference)? '{'
		features+=Feature*
	'}';

Feature:
	Property | Operation;

Property:
	name=ValidID ':' type=JvmTypeReference;

Operation:
	visibility=Visibility? 'op' name=ValidID '(' (params+=JvmFormalParameter (',' params+=JvmFormalParameter)*)? ')' ':' type=JvmTypeReference 
		body=XBlockExpression;

enum Visibility:
	public | private | protected;

QualifiedNameWithWildCard :
	QualifiedName  ('.' '*')?;


We recognized, that the use of ListExtensions (list.map( e | e.toUpperCase )) like described in the Xbase example Xbase05_closures.xbase is not possible inside the XBlockExpression.

Did we something wrong or do we have to import any packages?

Our Sourcecode of our DSL is:
package org.eclipse.webinar {
	entity Person {
		name : String
		firstName : String
		friends : java.util.ArrayList < Person >
		value1 : int
		value2 : int

		op doSomething ( ) : String {

		// --> Problems
		// Multiple markers at this line
		//- Couldn't resolve reference to JvmIdentifiableElement 'toUpperCase'.
		//- Couldn't resolve reference to JvmIdentifiableElement 'map'.
		//- There is no context to infer the closure's argument types from.
		//   Consider typing the arguments or put the closures into a typed
		//   context.
		//- Couldn't resolve reference to JvmIdentifiableElement 'name'.
			friends . map ( e | e . name . toUpperCase )

			// --> Problems
			// Couldn't resolve reference to JvmIdentifiableElement '+'.
			val value3 = value1 + value2 
		}
	}


In this code are the following 2 lines of code with errors:
friends . map ( e | e . name . toUpperCase )
val value3 = value1 + value2



Do you have any ideas how to solve the problems above.

[Updated on: Thu, 31 May 2012 09:01]

Report message to a moderator

Re: Xtext: Xbase extensions [message #879456 is a reply to message #879454] Thu, 31 May 2012 09:02 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13520
Registered: July 2009
Senior Member
Hi,

is the xbase.lib on the classpath of the project the model resides in?

~Christian


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xtext: Xbase extensions [message #879462 is a reply to message #879454] Thu, 31 May 2012 09:13 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3108
Registered: July 2009
Senior Member
Hans-Georg,

please make sure that you put the Xbase library on the classpath of the
project that contains your sample file.

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

Am 31.05.12 11:00, schrieb hans-georg Mising name:
> We have the grammar of your example
>
> /*******************************************************************************
>
> * Copyright (c) 2009 itemis AG (http://www.itemis.eu) and others.
> * All rights reserved. This program and the accompanying materials
> * are made available under the terms of the Eclipse Public License v1.0
> * which accompanies this distribution, and is available at
> * http://www.eclipse.org/legal/epl-v10.html
> *******************************************************************************/
>
> grammar org.eclipse.xtext.example.domainmodel.Domainmodel with
> org.eclipse.xtext.xbase.Xbase
>
> generate domainmodel "http://www.xtext.org/example/Domainmodel"
>
> DomainModel:
> elements+=AbstractElement*;
>
> AbstractElement:
> PackageDeclaration | Entity | Import;
>
> Import:
> 'import' importedNamespace=QualifiedNameWithWildCard;
>
> PackageDeclaration:
> 'package' name=QualifiedName '{'
> elements+=AbstractElement*
> '}';
>
> Entity:
> 'entity' name=ValidID ('extends' superType=JvmTypeReference)? '{'
> features+=Feature*
> '}';
>
> Feature:
> Property | Operation;
>
> Property:
> name=ValidID ':' type=JvmTypeReference;
>
> Operation:
> visibility=Visibility? 'op' name=ValidID '(' (params+=JvmFormalParameter
> (',' params+=JvmFormalParameter)*)? ')' ':' type=JvmTypeReference
> body=XBlockExpression;
>
> enum Visibility:
> public | private | protected;
>
> QualifiedNameWithWildCard :
> QualifiedName ('.' '*')?;
>
>
> We recognized, that the use of ListExtensions (list.map( e |
> e.toUpperCase )) like described in the Xbase example
> Xbase05_closures.xbase is not possible inside the XBlockExpression.
>
> Did we something wrong or do we have to import any packages?
>
> Our Sourcecode of our DSL is:
>
> package org.eclipse.webinar {
> entity Person {
> name : String
> firstName : String
> friends : java.util.ArrayList < Person >
> value1 : int
> value2 : int
>
> op doSomething ( ) : String {
>
> // --> Problems
> // Multiple markers at this line
> //- Couldn't resolve reference to JvmIdentifiableElement 'toUpperCase'.
> //- Couldn't resolve reference to JvmIdentifiableElement 'map'.
> //- There is no context to infer the closure's argument types from.
> // Consider typing the arguments or put the closures into a typed
> // context.
> //- Couldn't resolve reference to JvmIdentifiableElement 'name'.
> friends . map ( e | e . name . toUpperCase )
>
> // --> Problems
> // Couldn't resolve reference to JvmIdentifiableElement '+'.
> val value3 = value1 + value2 }
> }
>
>
> In this code are the following 2 lines of code with errors:
>
> friends . map ( e | e . name . toUpperCase )
> val value3 = value1 + value2
>
>
Re: Xtext: Xbase extensions [message #879477 is a reply to message #879462] Thu, 31 May 2012 09:46 Go to previous messageGo to next message
Hans-Georg Glöckler is currently offline Hans-Georg GlöcklerFriend
Messages: 88
Registered: July 2009
Member
Thanks for your answer.
Now it works.

I have another Question

Question 1:
The following sourcesode is not working
		op equals(Person other) : boolean {
			if(other == null) {
				return false
			}
			
			return true
		}


Question 2:
How can I get Comment in the java-source-code
		// getformattedfullname
		op getFormattedFullName() : String{
			val String result = name + " " + firstName
		}


the corresponding java-source-code is without comment
	public String getFormattedFullName() {
		
		String _operator_plus = StringExtensions.operator_plus(this.name, " ");
		String _operator_plus_1 = StringExtensions.operator_plus(_operator_plus, this.firstName);
		final String result = _operator_plus_1;
		return null; 
	}
Re: Xtext: Xbase extensions [message #879484 is a reply to message #879477] Thu, 31 May 2012 09:55 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13520
Registered: July 2009
Senior Member
Hi,

(1) what do you mean with not working? how does your jvmmodelinferrer look like?
(2) why dont you use multiline comments. if you want single line stuff as well you have to customize MultiLineCommentDocumentationProvider.

~Christian


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xtext: Xbase extensions [message #879494 is a reply to message #879484] Thu, 31 May 2012 10:10 Go to previous messageGo to next message
Hans-Georg Glöckler is currently offline Hans-Georg GlöcklerFriend
Messages: 88
Registered: July 2009
Member
to (1)
I get the following jvmmodelinferrer:
Couldn't resolve reference to JvmIdentifiableElement '=='.

to (2)
with the following code I also don't get Comments in the corresponding java-source-code
		/*
		 * getFormatedFullName
		 */ 
		op getFormattedFullName() : String{
			val String result = name + " " + firstName
		}


multiline comments don't work
Re: Xtext: Xbase extensions [message #879501 is a reply to message #879494] Thu, 31 May 2012 10:21 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13520
Registered: July 2009
Senior Member
Hi,

are you sure you have xbase lib added to the model project?
i am not quite sure about your project setup.
the domain model example should contain everything you need
and should be working.

so did you implement a JvmModelInferrer and if yes how does it look like?

which Xtext Version do you use?

~Christian


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Thu, 31 May 2012 10:22]

Report message to a moderator

Re: Xtext: Xbase extensions [message #879509 is a reply to message #879494] Thu, 31 May 2012 10:31 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3108
Registered: July 2009
Senior Member
Try to use JavaDoc style comments.

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

Am 31.05.12 12:10, schrieb hans-georg Mising name:
> to (1)
> I get the following jvmmodelinferrer:
> Couldn't resolve reference to JvmIdentifiableElement '=='.
>
> to (2)
> with the following code I also don't get Comments in the corresponding
> java-source-code
>
> /*
> * getFormatedFullName
> */ op getFormattedFullName() : String{
> val String result = name + " " + firstName
> }
>
>
> multiline comments don't work
Re: Xtext: Xbase extensions [message #879518 is a reply to message #879501] Thu, 31 May 2012 10:56 Go to previous messageGo to next message
Hans-Georg Glöckler is currently offline Hans-Georg GlöcklerFriend
Messages: 88
Registered: July 2009
Member
- are you sure you have xbase lib added to the model project?
I use the demo-Application of Xtext
All is working only this this two things not

- i am not quite sure about your project setup.
I use the demo-Application of Xtext
I have nothing changed
I use the defaults

the domain model example should contain everything you need
and should be working.

- so did you implement a JvmModelInferrer and if yes how does it look like?
no, I have not implement an own JvmModelInferrer
I use the defaults

- which Xtext Version do you use?
I have installed one week ago Xtext by the eclipse-repo
I use
Eclipse Modeling Tools
Version: Indigo Service Release 2
Build id: 20120216-1857

In the following I send you the code of the grammar, but it is the original code of the Domain-Model-Example
/*******************************************************************************
 * Copyright (c) 2009 itemis AG (http://www.itemis.eu) and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *******************************************************************************/
grammar org.eclipse.xtext.example.domainmodel.Domainmodel with org.eclipse.xtext.xbase.Xbase

generate domainmodel "http://www.xtext.org/example/Domainmodel"

DomainModel:
	elements+=AbstractElement*;

AbstractElement:
	PackageDeclaration | Entity | Import;

Import:
	'import' importedNamespace=QualifiedNameWithWildCard;

PackageDeclaration:
	'package' name=QualifiedName '{'
		elements+=AbstractElement*
	'}';

Entity:
	'entity' name=ValidID ('extends' superType=JvmTypeReference)? '{'
		features+=Feature*
	'}';

Feature:
	Property | Operation;

Property:
	name=ValidID ':' type=JvmTypeReference;

Operation:
	visibility=Visibility? 'op' name=ValidID '(' (params+=JvmFormalParameter (',' params+=JvmFormalParameter)*)? ')' ':' type=JvmTypeReference 
		body=XBlockExpression;

enum Visibility:
	public | private | protected;

QualifiedNameWithWildCard :
	QualifiedName  ('.' '*')?; 



In the following I send you the Code of my model.
Very important for me is the error in
if(other == null) {
  return false
}


package org.eclipse.webinar {
	entity Person {
		name : String
		firstName : String
		friends : java.util.ArrayList < Person >
		value1 : int
		value2 : int

		op doSomething ( ) : String { 
			val value3 = value1 + value2
			
			friends.map(e | e.name.toUpperCase)
			for(Person p : friends.filter(e | e.firstName.equals("hg"))){
				
			}
		}
		
		op equals(Person other) : boolean {
			if(other == null) {
				return false
			}
			
			return true
		}
		
		/*
		 *  getFormatedFullName
		 */
		op getFormattedFullName() : String{
			val String result = name + " " + firstName
		}
	}
}


I get the following errors:

!SESSION 2012-05-31 12:43:24.446 -----------------------------------------------
eclipse.buildId=M20120208-0800
java.version=1.7.0
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_DE
Framework arguments: -product org.eclipse.platform.ide
Command-line arguments: -product org.eclipse.platform.ide -data C:\dev\eclipse\ws\lunifera/../runtime-EclipseApplication -dev file:C:/dev/eclipse/ws/lunifera/.metadata/.plugins/org.eclipse.pde.core/Eclipse Application/dev.properties -os win32 -ws win32 -arch x86_64 -consoleLog

!ENTRY org.eclipse.jdt.core 4 4 2012-05-31 12:43:53.054
!MESSAGE Could not retrieve interfaces
!STACK 0
org.eclipse.jdt.internal.compiler.problem.AbortCompilation: Pb(324) The type com.google.common.base.Predicate cannot be resolved. It is indirectly referenced from required .class files
at org.eclipse.jdt.internal.compiler.problem.ProblemHandler.handle(ProblemHandler.java:121)
at org.eclipse.jdt.internal.compiler.problem.ProblemHandler.handle(ProblemHandler.java:179)
at org.eclipse.jdt.internal.compiler.problem.ProblemReporter.handle(ProblemReporter.java:2062)
at org.eclipse.jdt.internal.compiler.problem.ProblemReporter.isClassPathCorrect(ProblemReporter.java:4039)
at org.eclipse.jdt.internal.compiler.lookup.UnresolvedReferenceBinding.resolve(UnresolvedReferenceBinding.java:54)
at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:122)
at org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding.resolve(ParameterizedTypeBinding.java:861)
at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:100)
at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.superInterfaces(BinaryTypeBinding.java:1152)
at org.eclipse.jdt.core.dom.TypeBinding.getInterfaces(TypeBinding.java:471)
at org.eclipse.xtext.common.types.access.jdt.JdtBasedTypeFactory.setSuperTypes(JdtBasedTypeFactory.java:315)
at org.eclipse.xtext.common.types.access.jdt.JdtBasedTypeFactory.createType(JdtBasedTypeFactory.java:116)
at org.eclipse.xtext.common.types.access.jdt.JdtBasedTypeFactory.createNestedTypes(JdtBasedTypeFactory.java:360)
at org.eclipse.xtext.common.types.access.jdt.JdtBasedTypeFactory.createType(JdtBasedTypeFactory.java:113)
at org.eclipse.xtext.common.types.access.jdt.JdtBasedTypeFactory.createType(JdtBasedTypeFactory.java:90)
at org.eclipse.xtext.common.types.access.jdt.JdtBasedTypeFactory.createType(JdtBasedTypeFactory.java:1)
at org.eclipse.xtext.common.types.access.jdt.JdtTypeMirror.initialize(JdtTypeMirror.java:36)
at org.eclipse.xtext.common.types.access.TypeResource.doLoad(TypeResource.java:86)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1511)
at org.eclipse.xtext.common.types.access.TypeResource.load(TypeResource.java:74)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:255)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:270)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:397)
at org.eclipse.xtext.resource.SynchronizedXtextResourceSet.getResource(SynchronizedXtextResourceSet.java:23)
at org.eclipse.xtext.common.types.access.jdt.JdtTypeProvider.findTypeByName(JdtTypeProvider.java:84)
at org.eclipse.xtext.common.types.util.TypeReferences.findDeclaredType(TypeReferences.java:198)
at org.eclipse.xtext.common.types.util.TypeReferences.getTypeForName(TypeReferences.java:153)
at org.eclipse.xtext.xbase.scoping.featurecalls.AbstractStaticMethodsFeatureForTypeProvider.getFeaturesForType(AbstractStaticMethodsFeatureForTypeProvider.java:43)
at org.eclipse.xtext.xbase.scoping.featurecalls.DefaultJvmFeatureDescriptionProvider.getFeaturesForType(DefaultJvmFeatureDescriptionProvider.java:46)
at org.eclipse.xtext.xbase.scoping.featurecalls.JvmFeatureScopeProvider.getFeaturesForType(JvmFeatureScopeProvider.java:182)
at org.eclipse.xtext.xbase.scoping.featurecalls.JvmFeatureScopeProvider.createFeatureScope(JvmFeatureScopeProvider.java:159)
at org.eclipse.xtext.xbase.scoping.featurecalls.JvmFeatureScopeProvider.createFeatureScopes(JvmFeatureScopeProvider.java:145)
at org.eclipse.xtext.xbase.scoping.featurecalls.JvmFeatureScopeProvider.createFeatureScopeForTypeRef(JvmFeatureScopeProvider.java:92)
at org.eclipse.xtext.xbase.scoping.XbaseScopeProvider.createFeatureScopeForTypeRef(XbaseScopeProvider.java:433)
at org.eclipse.xtext.xbase.scoping.XbaseScopeProvider.createFeatureCallScopeForReceiver(XbaseScopeProvider.java:273)
at org.eclipse.xtext.xbase.scoping.XbaseScopeProvider.createFeatureCallScope(XbaseScopeProvider.java:217)
at org.eclipse.xtext.xbase.scoping.XbaseScopeProvider.getScope(XbaseScopeProvider.java:138)
at org.eclipse.xtext.xbase.linking.XbaseLinkingScopeProvider.getScope(XbaseLinkingScopeProvider.java:38)
at org.eclipse.xtext.linking.impl.DefaultLinkingService.getScope(DefaultLinkingService.java:59)
at org.eclipse.xtext.linking.impl.DefaultLinkingService.getLinkedObjects(DefaultLinkingService.java:119)
at org.eclipse.xtext.linking.lazy.LazyLinkingResource.getEObject(LazyLinkingResource.java:170)
at org.eclipse.xtext.linking.lazy.LazyLinkingResource.resolveLazyCrossReference(LazyLinkingResource.java:139)
at org.eclipse.xtext.linking.lazy.LazyLinkingResource.resolveLazyCrossReferences(LazyLinkingResource.java:103)
at org.eclipse.xtext.EcoreUtil2.resolveLazyCrossReferences(EcoreUtil2.java:417)
at org.eclipse.xtext.resource.impl.DefaultResourceDescription.getImportedNames(DefaultResourceDescription.java:95)
at org.eclipse.xtext.resource.impl.DefaultResourceDescriptionManager.getImportedNames(DefaultResourceDescriptionManager.java:99)
at org.eclipse.xtext.resource.impl.DefaultResourceDescriptionManager.isAffected(DefaultResourceDescriptionManager.java:95)
at org.eclipse.xtext.ui.editor.DirtyStateEditorSupport.isReparseRequired(DirtyStateEditorSupport.java:418)
at org.eclipse.xtext.ui.editor.DirtyStateEditorSupport$UpdateEditorStateJob$1.exec(DirtyStateEditorSupport.java:123)
at org.eclipse.xtext.ui.editor.DirtyStateEditorSupport$UpdateEditorStateJob$1.exec(DirtyStateEditorSupport.java:1)
at org.eclipse.xtext.util.concurrent.AbstractReadWriteAcces.readOnly(AbstractReadWriteAcces.java:32)
at org.eclipse.xtext.ui.editor.model.XtextDocument.readOnly(XtextDocument.java:86)
at org.eclipse.xtext.ui.editor.DirtyStateEditorSupport$UpdateEditorStateJob.run(DirtyStateEditorSupport.java:116)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

!ENTRY org.eclipse.jdt.core 4 4 2012-05-31 12:43:53.063
!MESSAGE Could not retrieve interfaces
!STACK 0
org.eclipse.jdt.internal.compiler.problem.AbortCompilation: Pb(324) The type com.google.common.base.Function cannot be resolved. It is indirectly referenced from required .class files
at org.eclipse.jdt.internal.compiler.problem.ProblemHandler.handle(ProblemHandler.java:121)
at org.eclipse.jdt.internal.compiler.problem.ProblemHandler.handle(ProblemHandler.java:179)
at org.eclipse.jdt.internal.compiler.problem.ProblemReporter.handle(ProblemReporter.java:2062)
at org.eclipse.jdt.internal.compiler.problem.ProblemReporter.isClassPathCorrect(ProblemReporter.java:4039)
at org.eclipse.jdt.internal.compiler.lookup.UnresolvedReferenceBinding.resolve(UnresolvedReferenceBinding.java:54)
at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:122)
at org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding.resolve(ParameterizedTypeBinding.java:861)
at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:100)
at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.superInterfaces(BinaryTypeBinding.java:1152)
at org.eclipse.jdt.core.dom.TypeBinding.getInterfaces(TypeBinding.java:471)
at org.eclipse.xtext.common.types.access.jdt.JdtBasedTypeFactory.setSuperTypes(JdtBasedTypeFactory.java:315)
at org.eclipse.xtext.common.types.access.jdt.JdtBasedTypeFactory.createType(JdtBasedTypeFactory.java:116)
at org.eclipse.xtext.common.types.access.jdt.JdtBasedTypeFactory.createNestedTypes(JdtBasedTypeFactory.java:360)
at org.eclipse.xtext.common.types.access.jdt.JdtBasedTypeFactory.createType(JdtBasedTypeFactory.java:113)
at org.eclipse.xtext.common.types.access.jdt.JdtBasedTypeFactory.createType(JdtBasedTypeFactory.java:90)
at org.eclipse.xtext.common.types.access.jdt.JdtBasedTypeFactory.createType(JdtBasedTypeFactory.java:1)
at org.eclipse.xtext.common.types.access.jdt.JdtTypeMirror.initialize(JdtTypeMirror.java:36)
at org.eclipse.xtext.common.types.access.TypeResource.doLoad(TypeResource.java:86)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1511)
at org.eclipse.xtext.common.types.access.TypeResource.load(TypeResource.java:74)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:255)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:270)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:397)
at org.eclipse.xtext.resource.SynchronizedXtextResourceSet.getResource(SynchronizedXtextResourceSet.java:23)
at org.eclipse.xtext.common.types.access.jdt.JdtTypeProvider.findTypeByName(JdtTypeProvider.java:84)
at org.eclipse.xtext.common.types.util.TypeReferences.findDeclaredType(TypeReferences.java:198)
at org.eclipse.xtext.common.types.util.TypeReferences.getTypeForName(TypeReferences.java:153)
at org.eclipse.xtext.xbase.scoping.featurecalls.AbstractStaticMethodsFeatureForTypeProvider.getFeaturesForType(AbstractStaticMethodsFeatureForTypeProvider.java:43)
at org.eclipse.xtext.xbase.scoping.featurecalls.DefaultJvmFeatureDescriptionProvider.getFeaturesForType(DefaultJvmFeatureDescriptionProvider.java:46)
at org.eclipse.xtext.xbase.scoping.featurecalls.JvmFeatureScopeProvider.getFeaturesForType(JvmFeatureScopeProvider.java:182)
at org.eclipse.xtext.xbase.scoping.featurecalls.JvmFeatureScopeProvider.createFeatureScope(JvmFeatureScopeProvider.java:159)
at org.eclipse.xtext.xbase.scoping.featurecalls.JvmFeatureScopeProvider.createFeatureScopes(JvmFeatureScopeProvider.java:145)
at org.eclipse.xtext.xbase.scoping.featurecalls.JvmFeatureScopeProvider.createFeatureScopeForTypeRef(JvmFeatureScopeProvider.java:92)
at org.eclipse.xtext.xbase.scoping.XbaseScopeProvider.createFeatureScopeForTypeRef(XbaseScopeProvider.java:433)
at org.eclipse.xtext.xbase.scoping.XbaseScopeProvider.createFeatureCallScopeForReceiver(XbaseScopeProvider.java:273)
at org.eclipse.xtext.xbase.scoping.XbaseScopeProvider.createFeatureCallScope(XbaseScopeProvider.java:217)
at org.eclipse.xtext.xbase.scoping.XbaseScopeProvider.getScope(XbaseScopeProvider.java:138)
at org.eclipse.xtext.xbase.linking.XbaseLinkingScopeProvider.getScope(XbaseLinkingScopeProvider.java:38)
at org.eclipse.xtext.linking.impl.DefaultLinkingService.getScope(DefaultLinkingService.java:59)
at org.eclipse.xtext.linking.impl.DefaultLinkingService.getLinkedObjects(DefaultLinkingService.java:119)
at org.eclipse.xtext.linking.lazy.LazyLinkingResource.getEObject(LazyLinkingResource.java:170)
at org.eclipse.xtext.linking.lazy.LazyLinkingResource.resolveLazyCrossReference(LazyLinkingResource.java:139)
at org.eclipse.xtext.linking.lazy.LazyLinkingResource.resolveLazyCrossReferences(LazyLinkingResource.java:103)
at org.eclipse.xtext.EcoreUtil2.resolveLazyCrossReferences(EcoreUtil2.java:417)
at org.eclipse.xtext.resource.impl.DefaultResourceDescription.getImportedNames(DefaultResourceDescription.java:95)
at org.eclipse.xtext.resource.impl.DefaultResourceDescriptionManager.getImportedNames(DefaultResourceDescriptionManager.java:99)
at org.eclipse.xtext.resource.impl.DefaultResourceDescriptionManager.isAffected(DefaultResourceDescriptionManager.java:95)
at org.eclipse.xtext.ui.editor.DirtyStateEditorSupport.isReparseRequired(DirtyStateEditorSupport.java:418)
at org.eclipse.xtext.ui.editor.DirtyStateEditorSupport$UpdateEditorStateJob$1.exec(DirtyStateEditorSupport.java:123)
at org.eclipse.xtext.ui.editor.DirtyStateEditorSupport$UpdateEditorStateJob$1.exec(DirtyStateEditorSupport.java:1)
at org.eclipse.xtext.util.concurrent.AbstractReadWriteAcces.readOnly(AbstractReadWriteAcces.java:32)
at org.eclipse.xtext.ui.editor.model.XtextDocument.readOnly(XtextDocument.java:86)
at org.eclipse.xtext.ui.editor.DirtyStateEditorSupport$UpdateEditorStateJob.run(DirtyStateEditorSupport.java:116)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

!ENTRY org.eclipse.jdt.core 4 4 2012-05-31 12:44:29.989
!MESSAGE Could not retrieve interfaces
!STACK 0
org.eclipse.jdt.internal.compiler.problem.AbortCompilation: Pb(324) The type com.google.common.base.Predicate cannot be resolved. It is indirectly referenced from required .class files
at org.eclipse.jdt.internal.compiler.problem.ProblemHandler.handle(ProblemHandler.java:121)
at org.eclipse.jdt.internal.compiler.problem.ProblemHandler.handle(ProblemHandler.java:179)
at org.eclipse.jdt.internal.compiler.problem.ProblemReporter.handle(ProblemReporter.java:2062)
at org.eclipse.jdt.internal.compiler.problem.ProblemReporter.isClassPathCorrect(ProblemReporter.java:4039)
at org.eclipse.jdt.internal.compiler.lookup.UnresolvedReferenceBinding.resolve(UnresolvedReferenceBinding.java:54)
at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:122)
at org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding.resolve(ParameterizedTypeBinding.java:861)
at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:100)
at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.superInterfaces(BinaryTypeBinding.java:1152)
at org.eclipse.jdt.core.dom.TypeBinding.getInterfaces(TypeBinding.java:471)
at org.eclipse.xtext.common.types.access.jdt.JdtBasedTypeFactory.setSuperTypes(JdtBasedTypeFactory.java:315)
at org.eclipse.xtext.common.types.access.jdt.JdtBasedTypeFactory.createType(JdtBasedTypeFactory.java:116)
at org.eclipse.xtext.common.types.access.jdt.JdtBasedTypeFactory.createNestedTypes(JdtBasedTypeFactory.java:360)
at org.eclipse.xtext.common.types.access.jdt.JdtBasedTypeFactory.createType(JdtBasedTypeFactory.java:113)
at org.eclipse.xtext.common.types.access.jdt.JdtBasedTypeFactory.createType(JdtBasedTypeFactory.java:90)
at org.eclipse.xtext.common.types.access.jdt.JdtBasedTypeFactory.createType(JdtBasedTypeFactory.java:1)
at org.eclipse.xtext.common.types.access.jdt.JdtTypeMirror.initialize(JdtTypeMirror.java:36)
at org.eclipse.xtext.common.types.access.TypeResource.doLoad(TypeResource.java:86)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1511)
at org.eclipse.xtext.common.types.access.TypeResource.load(TypeResource.java:74)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:255)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:270)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:397)
at org.eclipse.xtext.common.types.access.jdt.JdtTypeProvider.findTypeByName(JdtTypeProvider.java:84)
at org.eclipse.xtext.common.types.util.TypeReferences.findDeclaredType(TypeReferences.java:198)
at org.eclipse.xtext.common.types.util.TypeReferences.getTypeForName(TypeReferences.java:153)
at org.eclipse.xtext.xbase.scoping.featurecalls.AbstractStaticMethodsFeatureForTypeProvider.getFeaturesForType(AbstractStaticMethodsFeatureForTypeProvider.java:43)
at org.eclipse.xtext.xbase.scoping.featurecalls.DefaultJvmFeatureDescriptionProvider.getFeaturesForType(DefaultJvmFeatureDescriptionProvider.java:46)
at org.eclipse.xtext.xbase.scoping.featurecalls.JvmFeatureScopeProvider.getFeaturesForType(JvmFeatureScopeProvider.java:182)
at org.eclipse.xtext.xbase.scoping.featurecalls.JvmFeatureScopeProvider.createFeatureScope(JvmFeatureScopeProvider.java:159)
at org.eclipse.xtext.xbase.scoping.featurecalls.JvmFeatureScopeProvider.createFeatureScopes(JvmFeatureScopeProvider.java:145)
at org.eclipse.xtext.xbase.scoping.featurecalls.JvmFeatureScopeProvider.createFeatureScopeForTypeRef(JvmFeatureScopeProvider.java:92)
at org.eclipse.xtext.xbase.scoping.XbaseScopeProvider.createFeatureScopeForTypeRef(XbaseScopeProvider.java:433)
at org.eclipse.xtext.xbase.scoping.XbaseScopeProvider.createFeatureCallScopeForReceiver(XbaseScopeProvider.java:273)
at org.eclipse.xtext.xbase.scoping.XbaseScopeProvider.createFeatureCallScope(XbaseScopeProvider.java:217)
at org.eclipse.xtext.xbase.scoping.XbaseScopeProvider.getScope(XbaseScopeProvider.java:138)
at org.eclipse.xtext.xbase.linking.XbaseLinkingScopeProvider.getScope(XbaseLinkingScopeProvider.java:38)
at org.eclipse.xtext.linking.impl.DefaultLinkingService.getScope(DefaultLinkingService.java:59)
at org.eclipse.xtext.linking.impl.DefaultLinkingService.getLinkedObjects(DefaultLinkingService.java:119)
at org.eclipse.xtext.linking.lazy.LazyLinkingResource.getEObject(LazyLinkingResource.java:170)
at org.eclipse.xtext.linking.lazy.LazyLinkingResource.resolveLazyCrossReference(LazyLinkingResource.java:139)
at org.eclipse.xtext.linking.lazy.LazyLinkingResource.resolveLazyCrossReferences(LazyLinkingResource.java:103)
at org.eclipse.xtext.EcoreUtil2.resolveLazyCrossReferences(EcoreUtil2.java:417)
at org.eclipse.xtext.builder.clustering.ClusteringBuilderState.doUpdate(ClusteringBuilderState.java:164)
at org.eclipse.xtext.builder.builderState.AbstractBuilderState.update(AbstractBuilderState.java:107)
at org.eclipse.xtext.builder.impl.XtextBuilder.doBuild(XtextBuilder.java:158)
at org.eclipse.xtext.builder.impl.XtextBuilder.incrementalBuild(XtextBuilder.java:141)
at org.eclipse.xtext.builder.impl.XtextBuilder.build(XtextBuilder.java:91)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

!ENTRY org.eclipse.jdt.core 4 4 2012-05-31 12:44:29.994
!MESSAGE Could not retrieve interfaces
!STACK 0
org.eclipse.jdt.internal.compiler.problem.AbortCompilation: Pb(324) The type com.google.common.base.Function cannot be resolved. It is indirectly referenced from required .class files
at org.eclipse.jdt.internal.compiler.problem.ProblemHandler.handle(ProblemHandler.java:121)
at org.eclipse.jdt.internal.compiler.problem.ProblemHandler.handle(ProblemHandler.java:179)
at org.eclipse.jdt.internal.compiler.problem.ProblemReporter.handle(ProblemReporter.java:2062)
at org.eclipse.jdt.internal.compiler.problem.ProblemReporter.isClassPathCorrect(ProblemReporter.java:4039)
at org.eclipse.jdt.internal.compiler.lookup.UnresolvedReferenceBinding.resolve(UnresolvedReferenceBinding.java:54)
at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:122)
at org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding.resolve(ParameterizedTypeBinding.java:861)
at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:100)
at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.superInterfaces(BinaryTypeBinding.java:1152)
at org.eclipse.jdt.core.dom.TypeBinding.getInterfaces(TypeBinding.java:471)
at org.eclipse.xtext.common.types.access.jdt.JdtBasedTypeFactory.setSuperTypes(JdtBasedTypeFactory.java:315)
at org.eclipse.xtext.common.types.access.jdt.JdtBasedTypeFactory.createType(JdtBasedTypeFactory.java:116)
at org.eclipse.xtext.common.types.access.jdt.JdtBasedTypeFactory.createNestedTypes(JdtBasedTypeFactory.java:360)
at org.eclipse.xtext.common.types.access.jdt.JdtBasedTypeFactory.createType(JdtBasedTypeFactory.java:113)
at org.eclipse.xtext.common.types.access.jdt.JdtBasedTypeFactory.createType(JdtBasedTypeFactory.java:90)
at org.eclipse.xtext.common.types.access.jdt.JdtBasedTypeFactory.createType(JdtBasedTypeFactory.java:1)
at org.eclipse.xtext.common.types.access.jdt.JdtTypeMirror.initialize(JdtTypeMirror.java:36)
at org.eclipse.xtext.common.types.access.TypeResource.doLoad(TypeResource.java:86)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1511)
at org.eclipse.xtext.common.types.access.TypeResource.load(TypeResource.java:74)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:255)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:270)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:397)
at org.eclipse.xtext.common.types.access.jdt.JdtTypeProvider.findTypeByName(JdtTypeProvider.java:84)
at org.eclipse.xtext.common.types.util.TypeReferences.findDeclaredType(TypeReferences.java:198)
at org.eclipse.xtext.common.types.util.TypeReferences.getTypeForName(TypeReferences.java:153)
at org.eclipse.xtext.xbase.scoping.featurecalls.AbstractStaticMethodsFeatureForTypeProvider.getFeaturesForType(AbstractStaticMethodsFeatureForTypeProvider.java:43)
at org.eclipse.xtext.xbase.scoping.featurecalls.DefaultJvmFeatureDescriptionProvider.getFeaturesForType(DefaultJvmFeatureDescriptionProvider.java:46)
at org.eclipse.xtext.xbase.scoping.featurecalls.JvmFeatureScopeProvider.getFeaturesForType(JvmFeatureScopeProvider.java:182)
at org.eclipse.xtext.xbase.scoping.featurecalls.JvmFeatureScopeProvider.createFeatureScope(JvmFeatureScopeProvider.java:159)
at org.eclipse.xtext.xbase.scoping.featurecalls.JvmFeatureScopeProvider.createFeatureScopes(JvmFeatureScopeProvider.java:145)
at org.eclipse.xtext.xbase.scoping.featurecalls.JvmFeatureScopeProvider.createFeatureScopeForTypeRef(JvmFeatureScopeProvider.java:92)
at org.eclipse.xtext.xbase.scoping.XbaseScopeProvider.createFeatureScopeForTypeRef(XbaseScopeProvider.java:433)
at org.eclipse.xtext.xbase.scoping.XbaseScopeProvider.createFeatureCallScopeForReceiver(XbaseScopeProvider.java:273)
at org.eclipse.xtext.xbase.scoping.XbaseScopeProvider.createFeatureCallScope(XbaseScopeProvider.java:217)
at org.eclipse.xtext.xbase.scoping.XbaseScopeProvider.getScope(XbaseScopeProvider.java:138)
at org.eclipse.xtext.xbase.linking.XbaseLinkingScopeProvider.getScope(XbaseLinkingScopeProvider.java:38)
at org.eclipse.xtext.linking.impl.DefaultLinkingService.getScope(DefaultLinkingService.java:59)
at org.eclipse.xtext.linking.impl.DefaultLinkingService.getLinkedObjects(DefaultLinkingService.java:119)
at org.eclipse.xtext.linking.lazy.LazyLinkingResource.getEObject(LazyLinkingResource.java:170)
at org.eclipse.xtext.linking.lazy.LazyLinkingResource.resolveLazyCrossReference(LazyLinkingResource.java:139)
at org.eclipse.xtext.linking.lazy.LazyLinkingResource.resolveLazyCrossReferences(LazyLinkingResource.java:103)
at org.eclipse.xtext.EcoreUtil2.resolveLazyCrossReferences(EcoreUtil2.java:417)
at org.eclipse.xtext.builder.clustering.ClusteringBuilderState.doUpdate(ClusteringBuilderState.java:164)
at org.eclipse.xtext.builder.builderState.AbstractBuilderState.update(AbstractBuilderState.java:107)
at org.eclipse.xtext.builder.impl.XtextBuilder.doBuild(XtextBuilder.java:158)
at org.eclipse.xtext.builder.impl.XtextBuilder.incrementalBuild(XtextBuilder.java:141)
at org.eclipse.xtext.builder.impl.XtextBuilder.build(XtextBuilder.java:91)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)


But if it needs to much time to solve it, plesae let it be.
You have helped me in further time so much so you have given a lot of to me.
I must not solve all the problems at once.
I can also look for this problem later.
Re: Xtext: Xbase extensions [message #879519 is a reply to message #879518] Thu, 31 May 2012 10:58 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13520
Registered: July 2009
Senior Member
Hi,

and how does the model project look like?
can you post its manifest/setup/whatever?

~Christian


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Thu, 31 May 2012 11:03]

Report message to a moderator

Re: Xtext: Xbase extensions [message #879524 is a reply to message #879519] Thu, 31 May 2012 11:14 Go to previous messageGo to next message
Hans-Georg Glöckler is currently offline Hans-Georg GlöcklerFriend
Messages: 88
Registered: July 2009
Member
1. Grammar

Manifest MF
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Xtext Domainmodel Example
Bundle-Vendor: Eclipse Modeling Project
Bundle-Version: 2.0.1.qualifier
Bundle-SymbolicName: org.eclipse.xtext.example.domainmodel; singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: org.apache.log4j;bundle-version="1.2.15";visibility:=reexport,
 org.eclipse.xtext;bundle-version="2.0.0";visibility:=reexport,
 org.eclipse.xtext.generator;bundle-version="2.0.0";resolution:=optional,
 org.eclipse.xtend;bundle-version="1.1.0",
 org.eclipse.xtend.typesystem.emf;bundle-version="1.0.1",
 org.eclipse.xpand;bundle-version="1.1.0",
 org.eclipse.xtext.util;bundle-version="2.0.0",
 org.eclipse.emf.ecore,
 org.eclipse.emf.common,
 org.eclipse.emf.mwe2.launch;bundle-version="2.0.0";resolution:=optional,
 org.antlr.runtime,
 org.eclipse.xtext.xbase;bundle-version="2.0.0",
 org.eclipse.xtext.common.types,
 org.eclipse.xtext.xbase.lib;bundle-version="2.0.0";visibility:=reexport,
 org.eclipse.xtext.xtend2.lib;bundle-version="2.0.0";visibility:=reexport,
 org.apache.commons.logging;bundle-version="1.0.4";resolution:=optional;visibility:=reexport,
 org.eclipse.xtext.ui.codetemplates;bundle-version="2.0.0"
Export-Package: org.eclipse.xtext.example.domainmodel,
 org.eclipse.xtext.example.domainmodel.domainmodel,
 org.eclipse.xtext.example.domainmodel.domainmodel.impl,
 org.eclipse.xtext.example.domainmodel.domainmodel.util,
 org.eclipse.xtext.example.domainmodel.formatting,
 org.eclipse.xtext.example.domainmodel.generator,
 org.eclipse.xtext.example.domainmodel.jvmmodel,
 org.eclipse.xtext.example.domainmodel.naming,
 org.eclipse.xtext.example.domainmodel.parseTreeConstruction,
 org.eclipse.xtext.example.domainmodel.parser.antlr,
 org.eclipse.xtext.example.domainmodel.parser.antlr.internal,
 org.eclipse.xtext.example.domainmodel.scoping,
 org.eclipse.xtext.example.domainmodel.services,
 org.eclipse.xtext.example.domainmodel.typing,
 org.eclipse.xtext.example.domainmodel.validation,
 org.eclipse.xtext.example.domainmodel.valueconverter
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Import-Package: org.apache.log4j,
 org.eclipse.xtext.xbase.lib,
 org.eclipse.xtext.xtend2.lib



plugin.xml
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin>
  <extension point="org.eclipse.emf.ecore.generated_package">
    <package 
       uri = "http://www.xtext.org/example/Domainmodel" 
       class = "org.eclipse.xtext.example.domainmodel.domainmodel.DomainmodelPackage"
       genModel = "org/eclipse/xtext/example/domainmodel/Domainmodel.genmodel" /> 
  </extension>
</plugin>


.project
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
	<name>org.eclipse.xtext.example.domainmodel</name>
	<comment></comment>
	<projects>
	</projects>
	<buildSpec>
		<buildCommand>
			<name>org.eclipse.jdt.core.javabuilder</name>
			<arguments>
			</arguments>
		</buildCommand>
		<buildCommand>
			<name>org.eclipse.pde.ManifestBuilder</name>
			<arguments>
			</arguments>
		</buildCommand>
		<buildCommand>
			<name>org.eclipse.pde.SchemaBuilder</name>
			<arguments>
			</arguments>
		</buildCommand>
		<buildCommand>
			<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
			<arguments>
			</arguments>
		</buildCommand>
	</buildSpec>
	<natures>
		<nature>org.eclipse.jdt.core.javanature</nature>
		<nature>org.eclipse.pde.PluginNature</nature>
		<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
	</natures>
</projectDescription>



2.Model

.settings
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
	<name>Demo01</name>
	<comment></comment>
	<projects>
	</projects>
	<buildSpec>
		<buildCommand>
			<name>org.eclipse.jdt.core.javabuilder</name>
			<arguments>
			</arguments>
		</buildCommand>
		<buildCommand>
			<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
			<arguments>
			</arguments>
		</buildCommand>
	</buildSpec>
	<natures>
		<nature>org.eclipse.jdt.core.javanature</nature>
		<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
	</natures>
</projectDescription>


here I have no METAINF/MANIFEST.MF
perhaps is this the error?
Re: Xtext: Xbase extensions [message #879526 is a reply to message #879524] Thu, 31 May 2012 11:18 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13520
Registered: July 2009
Senior Member
Hi,

i am talking about the project containing the dmodel file
(1) create a java project and add the xtend lib libary (java buildpath)
(2) create a plugin project and add org.eclipse.xtext.xbase.lib as required bundle in the manifest

~Christian


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xtext: Xbase extensions [message #879535 is a reply to message #879526] Thu, 31 May 2012 11:39 Go to previous messageGo to next message
Hans-Georg Glöckler is currently offline Hans-Georg GlöcklerFriend
Messages: 88
Registered: July 2009
Member
I have created an Java-Project and added org.eclipse.xtext.xbase.lib_2.0.1.v201108020636
org.eclipse.xtext.xtend2.lib_2.0.1.v201108020636

I have the same error.
I send you attached the picture.
  • Attachment: Bild 1.png
    (Size: 326.28KB, Downloaded 161 times)
Re: Xtext: Xbase extensions [message #879537 is a reply to message #879535] Thu, 31 May 2012 11:44 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13520
Registered: July 2009
Senior Member
Hi,

as i said, if you have a java project you should
(1) rightklick
(2) properties
(3) java build path
(4) add libary
(5) xtend libary


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xtext: Xbase extensions [message #879539 is a reply to message #879537] Thu, 31 May 2012 11:49 Go to previous messageGo to next message
Hans-Georg Glöckler is currently offline Hans-Georg GlöcklerFriend
Messages: 88
Registered: July 2009
Member
I have added the extend library. I hope it is correct so.
i send you a picture.
  • Attachment: Bild 2.png
    (Size: 212.91KB, Downloaded 221 times)
Re: Xtext: Xbase extensions [message #879543 is a reply to message #879539] Thu, 31 May 2012 11:54 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13520
Registered: July 2009
Senior Member
Yes and no,

yes you can it do this way but you have to add others (like guava too)
so why dont you simply use the predefined libary.

~Christian


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xtext: Xbase extensions [message #879548 is a reply to message #879543] Thu, 31 May 2012 12:04 Go to previous messageGo to next message
Hans-Georg Glöckler is currently offline Hans-Georg GlöcklerFriend
Messages: 88
Registered: July 2009
Member
I have now created an Plugin-Projekt an added the bundle

My MANIFEST.MF:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Demo
Bundle-SymbolicName: Demo
Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Require-Bundle: org.eclipse.xtext.xbase.lib;bundle-version="2.0.1"

I have added the picture of the plugin-project.
I don't understand what is wrong.


Another Question:
Where can i find the predefined library.
  • Attachment: Bild 3.png
    (Size: 347.63KB, Downloaded 210 times)

[Updated on: Thu, 31 May 2012 12:09]

Report message to a moderator

Re: Xtext: Xbase extensions [message #879551 is a reply to message #879548] Thu, 31 May 2012 12:12 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13520
Registered: July 2009
Senior Member
Hi,

i guess you should update to Xtext 2.2.1 (see www.eclipse.org/Xtext for update site)

~Christian


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xtext: Xbase extensions [message #879556 is a reply to message #879548] Thu, 31 May 2012 12:21 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3108
Registered: July 2009
Senior Member
You have to put the dmodel file into a source folder.

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


Am 31.05.12 14:04, schrieb hans-georg Mising name:
> I have now created an Plugin-Projekt an added the bundle
>
> My MANIFEST.MF:
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Demo
> Bundle-SymbolicName: Demo
> Bundle-Version: 1.0.0.qualifier
> Bundle-RequiredExecutionEnvironment: JavaSE-1.7
> Require-Bundle: org.eclipse.xtext.xbase.lib;bundle-version="2.0.1"
>
>
> I don't understand what is wrong.
Re: Xtext: Xbase extensions [message #879557 is a reply to message #879551] Thu, 31 May 2012 12:26 Go to previous messageGo to next message
Hans-Georg Glöckler is currently offline Hans-Georg GlöcklerFriend
Messages: 88
Registered: July 2009
Member
Have a lot of thanks.
I will try it.
Re: Xtext: Xbase extensions [message #879597 is a reply to message #879543] Thu, 31 May 2012 13:48 Go to previous message
Hans-Georg Glöckler is currently offline Hans-Georg GlöcklerFriend
Messages: 88
Registered: July 2009
Member
thanks a lot.
now with the new version of xtext it works all.

have a lot of thanks.
Previous Topic:Visibility, scoping and imported namespace
Next Topic:Cross references
Goto Forum:
  


Current Time: Sat Aug 08 00:48:34 GMT 2020

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

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

Back to the top