Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF Parsley » Bug or Design? Cannot further extend an extended EmfParsleyJavaGuiceModule
Bug or Design? Cannot further extend an extended EmfParsleyJavaGuiceModule [message #1766921] Wed, 28 June 2017 18:08 Go to next message
Jon Passki is currently offline Jon PasskiFriend
Messages: 28
Registered: November 2015
Junior Member

Hello,

I desire to have an intermediate EMF Parsley module that's extended by a sub-project. The intermediate module is based on the Java Guice module and not the OSGi-enhanced one. However, the derived code within the sub-project contains errors. Is this a bug or possibly a feature?

The error occurs in the derived code, and the EMF Parsley page warns against modifying derived classes:

Quote:
The contents of this folder should never be modified manually, since their contents will be overwritten by the DSL compiler.


As a workaround I'll extend the OSGi module, which works as expected.

Details:

Intermediate.parsley:
import org.eclipse.emf.parsley.EmfParsleyJavaGuiceModule

/* intermediate EMF Parsley Dsl Module file */
module intermediate extends EmfParsleyJavaGuiceModule {
	
}


Parsley generates the following module:
package intermediate;

import org.eclipse.emf.parsley.EmfParsleyJavaGuiceModule;
import org.eclipse.ui.plugin.AbstractUIPlugin;

/**
 * intermediate EMF Parsley Dsl Module file
 */
@SuppressWarnings("all")
public class IntermediateEmfParsleyGuiceModule extends EmfParsleyJavaGuiceModule {
  public IntermediateEmfParsleyGuiceModule(final AbstractUIPlugin plugin) {
    // not used
  }
}


Subproject.parsley:
import intermediate.IntermediateEmfParsleyGuiceModule

/* subproject EMF Parsley Dsl Module file */
module subproject extends IntermediateEmfParsleyGuiceModule {
	
}


Parsley generates the following module:
package subproject;

import intermediate.IntermediateEmfParsleyGuiceModule;
import org.eclipse.ui.plugin.AbstractUIPlugin;

/**
 * subproject EMF Parsley Dsl Module file
 */
@SuppressWarnings("all")
public class SubprojectEmfParsleyGuiceModule extends IntermediateEmfParsleyGuiceModule {
  public SubprojectEmfParsleyGuiceModule(final AbstractUIPlugin plugin) {
    // not used
  }
}


An error marker appears on the subproject derived constructor with the following text:

Quote:
Implicit super constructor IntermediateEmfParsleyGuiceModule() is undefined. Must explicitly invoke another constructor

Re: Bug or Design? Cannot further extend an extended EmfParsleyJavaGuiceModule [message #1768065 is a reply to message #1766921] Thu, 13 July 2017 11:18 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1750
Registered: July 2009
Location: Firenze, Italy
Senior Member
I think you hit another bug! ;)
The generated constructor should always call super(plugin) (even because the OSGI module is now able to handle the case where the passed argument is null).
As usual, please file a bug report and I'll deal with that ASAP.
thanks in advance
Lorenzo
Re: Bug or Design? Cannot further extend an extended EmfParsleyJavaGuiceModule [message #1781543 is a reply to message #1768065] Thu, 08 February 2018 10:50 Go to previous message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1750
Registered: July 2009
Location: Firenze, Italy
Senior Member
Fixed in https://bugs.eclipse.org/bugs/show_bug.cgi?id=519645 and will be available in release 1.2.2 which should be out very soon
Previous Topic:Standalone form?
Next Topic:EMF Parsley 1.2.2 Released
Goto Forum:
  


Current Time: Sun Aug 19 09:34:49 GMT 2018

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

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

Back to the top