Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Today's Messages (on)  | Unanswered Messages (off)

Forum: Ecore Tools
 Topic: Ecore tools 2.0.3 Issue with generic ETypeParameter
Ecore tools 2.0.3 Issue with generic ETypeParameter [message #1488854] Thu, 27 November 2014 00:11
Marcello Vitaletti is currently offline Marcello VitalettiFriend
Messages: 7
Registered: July 2009
Junior Member
In the traditional ecore model editor, one can define a class MyClass<T extends SomeClass> by specifying a bounding classifier (SomeClass) for the type parameter.

Creating a representation file for an existing .ecore model with such use of generics seem to perfectly understand this construct. By selecting the type parameter of the class, and selecting the Semantic section of the properties one reads "T extends SomeClass" on the first line and "T" for the name of the parameter.

However, I could not find a way to reproduce this construct using the latest (2.0.3) ecore diagram editor.

The overview documentation shows a more complex example using generics with a <<bind>> constraint. However, I found no reference on how Constraints and Constraint Assignments could be used in this case, that is for setting the bound "extends SomeClass" on a class type parameter.

Thanks for your support.
Forum: Newcomers
 Topic: Hi May I introduce myself
icon7.gif  Hi May I introduce myself [message #1488947] Thu, 27 November 2014 02:05
Maungnyein chanaung is currently offline Maungnyein chanaungFriend
Messages: 1
Registered: November 2014
Junior Member
I'm Nyein Chan Aung.I interest in java programming.My facebook account is Maung Nyein Chan Aung.Can you help me about all problem of java programming .I want to friend with you.Please!
Forum: EMF
 Topic: Generated Model Code- ******.impl get, set properties
Re: Generated Model Code- ******.impl get, set properties [message #1488961 is a reply to message #1488357] Thu, 27 November 2014 02:24
Basheer Jasser is currently offline Basheer JasserFriend
Messages: 11
Registered: September 2014
Location: University Putra Malaysia...
Junior Member
Yes Actually I need bidirectional E-References, but the issue is not about including machine m1 and included one m2. it about two machine which share some property and they are exactly equal in roles, there is no difference between m1 and m2 and they both should have the same role for each other (which is shares property).

the issue is that I observed before, while exploring previous topics,that bidirectional E-References are not allowed in the E-core model (E-Opposite property). So I'm trying to handle this using java model code for both single values and multiple values E-references.

Forum: BIRT
 Topic: org.apache.xerces.impl.io.MalformedByteSequenceException
icon5.gif  org.apache.xerces.impl.io.MalformedByteSequenceException [message #1488974] Thu, 27 November 2014 02:37
wei sanmao is currently offline wei sanmaoFriend
Messages: 1
Registered: November 2014
Junior Member
birt4.3 in IE9 with Chinese query param will run exception´╝Ü

org.apache.xerces.impl.io.MalformedByteSequenceException: Invalid byte 2 of 2-byte UTF-8 sequence.
Forum: Eclipse Process Manager (Stardust)
 Topic: Data mapping could not be resolved during model deployment
Re: Data mapping could not be resolved during model deployment [message #1489011 is a reply to message #1487810] Thu, 27 November 2014 03:21
Melissa Ferenal is currently offline Melissa FerenalFriend
Messages: 10
Registered: November 2014
Junior Member
Hi Rob,

Thanks for the reply.

Below is the error message when I deploy the model(please see stacktrace.txt for detailed version).

javax.transaction.xa.XAException
	at org.apache.derby.jdbc.EmbedXAResource.end(Unknown Source)
	at org.apache.geronimo.transaction.manager.WrapperNamedXAResource.end(WrapperNamedXAResource.java:61)
	at org.apache.geronimo.transaction.manager.TransactionImpl.endResources(TransactionImpl.java:569)
	at org.apache.geronimo.transaction.manager.TransactionImpl.endResources(TransactionImpl.java:548)
	at org.apache.geronimo.transaction.manager.TransactionImpl.rollback(TransactionImpl.java:488)
	at org.apache.geronimo.transaction.manager.TransactionManagerImpl.rollback(TransactionManagerImpl.java:265)
	at org.springframework.transaction.jta.JtaTransactionManager.doRollback(JtaTransactionManager.java:1038)
	at org.springframework.transaction.support.AbstractPlatformTransactionManager.processRollback(AbstractPlatformTransactionManager.java:846)
	at org.springframework.transaction.support.AbstractPlatformTransactionManager.rollback(AbstractPlatformTransactionManager.java:823)
	at org.springframework.transaction.support.TransactionTemplate.rollbackOnException(TransactionTemplate.java:162)
	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:135)
	at org.eclipse.stardust.engine.api.spring.SpringTxInterceptor.invoke(SpringTxInterceptor.java:51)
	at org.eclipse.stardust.engine.core.runtime.interceptor.MethodInvocationImpl.proceed(MethodInvocationImpl.java:130)
	at org.eclipse.stardust.engine.core.runtime.interceptor.MethodInvocationImpl.execute(MethodInvocationImpl.java:68)
	at org.eclipse.stardust.engine.core.runtime.beans.InvocationManager.invoke(InvocationManager.java:53)
	at com.sun.proxy.$Proxy59.deployModel(Unknown Source)


I have also included the dependencies of ipp-engine-rules-8.1.0 on my web dynamic project as suggested from the other threads.


  • ipp-engine-rules-8.1.0.jar
  • knowledge-api-5.5.0.Final.jar
  • mvel2-2.1.3.Final.jar
  • drools-core-5.5.0.Final.jar
  • drools-decisiontables-5.5.0.Final.jar
  • knowledge-internal-api-5.5.0.Final.jar
  • drools-compiler-5.5.0.Final.jar
  • drools-templates-5.5.0.Final.jar


For reference, I have attached the model and ruleset definition as well.

Best Regards,

Melissa
  • Attachment: stacktrace.txt
    (Size: 20.29KB, Downloaded 0 times)
  • Attachment: Model15.xpdl
    (Size: 30.47KB, Downloaded 0 times)
  • Attachment: r2.json
    (Size: 1.99KB, Downloaded 0 times)
Forum: TMF (Xtext)
 Topic: sample reflective ecore model editor fails
Re: sample reflective ecore model editor fails [message #1489156 is a reply to message #1480397] Thu, 27 November 2014 06:18
Puneet Patwari is currently offline Puneet PatwariFriend
Messages: 8
Registered: November 2014
Junior Member
Hi Sebastian

I am still not able to get the "Sample Reflective Ecore model Editor " to work. Although I got my own piece of code to work and produce the EMF model editor. But now I want to open my xtext model with the option "Sample Reflective Ecore model Editor ", so that I can make changes through the generated editor. I also want to know how to create extension parser registration for my file extension, as you suggested above. I am quite new at this. Sad Please help. I am getting the following error.

org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.xml.sax.SAXParseExceptionpublicId: platform:/resource/mnc.test/src/gmrt.mncspec; systemId: platform:/resource/mnc.test/src/gmrt.mncspec; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.

Regards
Puneet
Forum: Jubula
 Topic: Problem with ?parseDate function
Re: Problem with ?parseDate function [message #1489169 is a reply to message #1488668] Thu, 27 November 2014 06:33
Dominik Gabriel is currently offline Dominik GabrielFriend
Messages: 50
Registered: June 2013
Member
i am only working on windows
Forum: EMF "Technology" (Ecore Tools, EMFatic, etc)
 Topic: [EMF Forms]Reference feature is not supported when using Dynamic EMF
Re: [EMF Forms]Reference feature is not supported when using Dynamic EMF [message #1489186 is a reply to message #1488135] Thu, 27 November 2014 06:52
yan zhang is currently online yan zhangFriend
Messages: 2
Registered: November 2014
Junior Member
Ok , you can see the following code.
First, I can get a EClass dynamically
public static EClass getEClass() {
		/*
		 * Instantiate EcoreFactory
		 */
		final EcoreFactory theCoreFactory = EcoreFactory.eINSTANCE;

		/*
		 * Create EClass instance to model BookStore class
		 */
		final EClass bookStoreEClass = theCoreFactory.createEClass();
		bookStoreEClass.setName("BookStore");

		/*
		 * Create EClass instance to model Book class
		 */
		final EClass bookEClass = theCoreFactory.createEClass();
		bookEClass.setName("Book");

		/*
		 * Instantiate EPackage and provide unique URI
		 * to identify this package
		 */
		final EPackage bookStoreEPackage = theCoreFactory.createEPackage();
		bookStoreEPackage.setName("BookStorePackage");
		bookStoreEPackage.setNsPrefix("bookStore");
		bookStoreEPackage.setNsURI("http:///com.ibm.dynamic.example.bookstore.ecore");
		/*
		 * Instantiate EcorePackage
		 */
		final EcorePackage theCorePackage = EcorePackage.eINSTANCE;

		/*
		 * Create attributes for BookStore class as specified in the model
		 */
		final EAttribute bookStoreOwner = theCoreFactory.createEAttribute();
		bookStoreOwner.setName("owner");
		bookStoreOwner.setEType(theCorePackage.getEString());
		final EAttribute bookStoreLocation = theCoreFactory.createEAttribute();
		bookStoreLocation.setName("location");
		bookStoreLocation.setEType(theCorePackage.getEString());
		final EReference bookStore_Books = theCoreFactory.createEReference();
		bookStore_Books.setName("books");
		bookStore_Books.setEType(bookEClass);
		bookStore_Books.setUpperBound(ETypedElement.UNBOUNDED_MULTIPLICITY);
		bookStore_Books.setContainment(true);
		bookStore_Books.setLowerBound(0);
		bookStore_Books.setUnique(true);
		bookStore_Books.setChangeable(true);
		/*
		 * Create attributes for Book class as defined in the model
		 */
		final EAttribute bookName = theCoreFactory.createEAttribute();
		bookName.setName("name");
		bookName.setEType(theCorePackage.getEString());
		final EAttribute bookISBN = theCoreFactory.createEAttribute();
		bookISBN.setName("isbn");
		bookISBN.setEType(theCorePackage.getEInt());
		/*
		 * final Add owner, location and final books attributes/references
		 * to BookStore class
		 */
		bookStoreEClass.getEStructuralFeatures().add(bookStoreOwner);
		bookStoreEClass.getEStructuralFeatures().add(bookStoreLocation);
		bookStoreEClass.getEStructuralFeatures().add(bookStore_Books);

		/*
		 * Add name and isbn attributes to Book class
		 */
		bookEClass.getEStructuralFeatures().add(bookName);
		bookEClass.getEStructuralFeatures().add(bookISBN);

		/*
		 * Place BookStore and Book classes in bookStoreEPackage
		 */
		bookStoreEPackage.getEClassifiers().add(bookStoreEClass);
		bookStoreEPackage.getEClassifiers().add(bookEClass);
		return bookStoreEClass;

	}


Then I use the returned EClass to get a UI component by EMF Forms.
EObject dummObject = EcoreUtil.create(bookStoreEClass);
			final ViewModelContext vmc = ViewModelContextFactory.INSTANCE.createViewModelContext(
				ViewProviderHelper.getView(dummyObject, null), dummyObject, new DefaultReferenceService());

			render = ECPSWTViewRenderer.INSTANCE.render(content, vmc);


The generated UI component should contain three kind of controls for three feature of bookstore, but it only contains two (owner and location, but not books), you can see screenshot (result.png), but the expected result should be like expected.png.
  • Attachment: result.png
    (Size: 27.46KB, Downloaded 2 times)
  • Attachment: expected.png
    (Size: 27.44KB, Downloaded 1 time)

[Updated on: Thu, 27 November 2014 06:59]

Report message to a moderator




Current Time: Thu Nov 27 07:00:14 GMT 2014

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

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