Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Problem with Operation self.libraries complains
Problem with Operation self.libraries complains [message #19979] Mon, 08 June 2009 09:31 Go to next message
St is currently offline StFriend
Messages: 77
Registered: July 2009
Member
Hi list,

I'm figuring a problem while coding a wizard.
I've coded many operations which have the same structure, and some of them
are simply not working.

I give here all the materials I've created so far to help in debugging.
Sorry for long post.

Here is the wizard source code :
____________________________________________________________ __________
wizard createProject {
guard: self.isTypeOf(Model!Model)
title: 'Create a new Project'
do{
self.projects.add( self.createNewProject() );
}
}

operation Model createNewProject() : Project {
var project: Project; project = new Project;
project.name = UserInput.prompt( 'Please type the project name',
'myNewProject' );
project.definedIn = self;

project.createBasicStructure();

return project;
}

operation Project createBasicStructure() : null {
self.createLibraries();
--self.createApplications();
--self.createData();
--self.createConfigurations();
--self.createWeb();
}

operation Project createApplications() : null {
var apps : Applications; apps = new Applications;
self.applications = apps;
apps.applicationsOf = self;
}

operation Project createData() : null {
var data : Data; data = new Data;
self.data = data;
data.dataOf = self;
}

operation Project createLibraries() : null {
var libs : Libraries; libs = new Libraries;
self.libraries = libs;
libs.librariesOf = self;
}

operation Project createConfigurations() : null {
var conf : Configurations; conf = new Configurations;
self.configurations = conf;
conf.configurationsOf = self;
}

operation Project createWeb() : null {

}
____________________________________________________________ __________

The problem comes from the createLibraries operation and
createConfigurations (and createWeb too grrrr). Well, if you test you'll
see. AFAIK, the createData and createApplications are working as expected.

To make sure, here is the emfatic meta-model (long):
____________________________________________________________ __________
@namespace(uri="http://stephaneerard.wordpress.com/meta-models/symfony/1.2",
prefix="symfony")
package symfony;

class Model extends Abstract.Named {
val Project.Project[*]#definedIn projects;
}

@namespace(uri=" http://stephaneerard.wordpress.com/meta-models/symfony/1.2/P roject",
prefix="project")
package Project {
class Project extends Abstract.Named {
ref Model[1]#projects definedIn;
val Applications.Applications[1]#applicationsOf applications;
val Data.Data[1]#dataOf data;
val Libraries.Libraries[1]#librariesOf libraries;
val Web.Web[1]#webOf web;
val Configurations.Configurations[1]#configurationsOf configurations;
}


@namespace(uri=" http://stephaneerard.wordpress.com/meta-models/symfony/1.2/P roject/Applications",
prefix="applications")
package Applications {
class Applications {
ref Project[1]#applications applicationsOf;
val Application.Application[*]#applicationOf applications;
}


@namespace(uri=" http://stephaneerard.wordpress.com/meta-models/symfony/1.2/P roject/Applications/Application",
prefix="application")
package Application {
class Application extends Abstract.Named {
val Modules.Modules[1]#modulesOf modules;
val Templates.Templates[1]#templatesOf templates;
ref Applications[1]#applications applicationOf;
val Configurations.Configurations[1]#configurationOf
configurations;
val Libraries.Libraries[1]#libraryOf libraries;
}


@namespace(uri=" http://stephaneerard.wordpress.com/meta-models/symfony/1.2/P roject/Applications/Application/Modules",
prefix="modules")
package Modules {
class Modules {
ref Application[1]#modules modulesOf;
val Module.Module[*]#moduleOf modules;
}


@namespace(uri=" http://stephaneerard.wordpress.com/meta-models/symfony/1.2/P roject/Applications/Application/Modules/Module",
prefix="module")
package Module {
class Module extends Abstract.Named {
ref Modules[1]#modules moduleOf;
val Actions.Actions[1]#actionsOf actions;
val Configurations.Configurations[1]#configurationsOf
configurations;
val Templates.Templates[1]#templatesOf templates;
}


@namespace(uri=" http://stephaneerard.wordpress.com/meta-models/symfony/1.2/P roject/Applications/Application/Modules/Module/Actions",
prefix="actions")
package Actions {
class Actions {
ref Module[1]#actions actionsOf;
val Action.AbstractAction[*]#actionOf actions;
}


@namespace(uri=" http://stephaneerard.wordpress.com/meta-models/symfony/1.2/P roject/Applications/Application/Modules/Module/Actions/Actio n",
prefix="action")
package Action {
abstract class AbstractAction extends Abstract.Named {
ref Actions[1]#actions actionOf;
ref Abstract.Template.AbstractTemplate[*]#usedBy
makesUseOf;
}

class Action extends AbstractAction {
}

class Component extends AbstractAction {
}

}

}


@namespace(uri=" http://stephaneerard.wordpress.com/meta-models/symfony/1.2/P roject/Applications/Application/Modules/Module/Configuration s",
prefix="configurations")
package Configurations {
class Configurations {
ref Module#configurations configurationsOf;
val Configuration.Configuration[*]#configurationOf
configurations;
}


@namespace(uri=" http://stephaneerard.wordpress.com/meta-models/symfony/1.2/P roject/Applications/Application/Modules/Module/Configuration s/Configuration",
prefix="configuration")
package Configuration {
class Configuration extends
Abstract.Configuration.Configuration {
ref Configurations[1]#configurations configurationOf;
}

}

}


@namespace(uri=" http://stephaneerard.wordpress.com/meta-models/symfony/1.2/P roject/Applications/Application/Modules/Module/Templates",
prefix="templates")
package Templates {
class Templates {
ref Module[1]#templates templatesOf;
val Abstract.Template.AbstractTemplate[*] templates;
}


@namespace(uri=" http://stephaneerard.wordpress.com/meta-models/symfony/1.2/P roject/Applications/Application/Modules/Module/Templates/Tem plate",
prefix="template")
package Template {
}

}

}

}


@namespace(uri=" http://stephaneerard.wordpress.com/meta-models/symfony/1.2/P roject/Applications/Application/Templates",
prefix="templates")
package Templates {
class Templates {
ref Application[1]#templates templatesOf;
val Abstract.Template.AbstractTemplate[*] templates;
}


@namespace(uri=" http://stephaneerard.wordpress.com/meta-models/symfony/1.2/P roject/Applications/Application/Templates/Template",
prefix="template")
package Template {
}

}


@namespace(uri=" http://stephaneerard.wordpress.com/meta-models/symfony/1.2/P roject/Applications/Application/Libraries",
prefix="libraries")
package Libraries {
class Libraries {
val Library.Library[*]#libraryOf libraries;
ref Application[1]#libraries libraryOf;
}


@namespace(uri=" http://stephaneerard.wordpress.com/meta-models/symfony/1.2/P roject/Applications/Application/Libraries/Library",
prefix="library")
package Library {
class Library {
ref Libraries#libraries libraryOf;
}

}

}


@namespace(uri=" http://stephaneerard.wordpress.com/meta-models/symfony/1.2/P roject/Applications/Application/Configurations",
prefix="configurations")
package Configurations {
class Configurations {
val Configuration.Configuration[*]#configurationOf
configurations;
ref Application[1]#configurations configurationOf;
}


@namespace(uri=" http://stephaneerard.wordpress.com/meta-models/symfony/1.2/P roject/Applications/Application/Configurations/Configuration",
prefix="configuration")
package Configuration {
class Configuration extends Abstract.Configuration.Configuration
{
ref Configurations[1]#configurations configurationOf;
}

}

}


@namespace(uri=" http://stephaneerard.wordpress.com/meta-models/symfony/1.2/P roject/Applications/Application/I18n",
prefix="i18n")
package I18n {
}

}

}


@namespace(uri=" http://stephaneerard.wordpress.com/meta-models/symfony/1.2/P roject/Data",
prefix="data")
package Data {
class Data {
ref Project[1]#data dataOf;
val Fixtures.Fixtures[1]#fixturesOf fixtures;
}


@namespace(uri=" http://stephaneerard.wordpress.com/meta-models/symfony/1.2/P roject/Data/Fixtures",
prefix="fixtures")
package Fixtures {
class Fixtures {
ref Data[1]#fixtures fixturesOf;
val Fixture.Fixture[*]#fixturesOf fixtures;
}


@namespace(uri=" http://stephaneerard.wordpress.com/meta-models/symfony/1.2/P roject/Data/Fixtures/Fixture",
prefix="fixture")
package Fixture {
class Fixture extends Abstract.Named {
ref Fixtures[1]#fixtures fixturesOf;
val Property[*] properties;
}

class Property {
attr String[1] name;
attr String value;
val Property[*] subProperties;
}

}

}

}


@namespace(uri=" http://stephaneerard.wordpress.com/meta-models/symfony/1.2/P roject/Libraries",
prefix="libraries")
package Libraries {
class Libraries {
ref Project[1]#libraries librariesOf;
}

}


@namespace(uri=" http://stephaneerard.wordpress.com/meta-models/symfony/1.2/P roject/Web",
prefix="web")
package Web {
class Web {
ref Project[1]#web webOf;
val Files.AbstractFile[*]#fileOf files;
}


@namespace(uri=" http://stephaneerard.wordpress.com/meta-models/symfony/1.2/P roject/Web/Files",
prefix="files")
package Files {
abstract class AbstractFile extends Abstract.Named {
ref Web[1]#files fileOf;
ref Directory[1]#containedFiles containedIn;
ref Link[*]#linksTo linkedBy;
}

class Directory extends AbstractFile {
val AbstractFile[*]#containedIn containedFiles;
}

class File extends AbstractFile {
attr String extension;
attr String content;
}

class Link extends AbstractFile {
ref AbstractFile[*]#linkedBy linksTo;
}

}

}


@namespace(uri=" http://stephaneerard.wordpress.com/meta-models/symfony/1.2/P roject/Configurations",
prefix="configurations")
package Configurations {
class Configurations {
ref Project[1]#configurations configurationsOf;
val Configuration.Configuration[*]#configurationOf configurations;
val Schema.Schema schema;
}


@namespace(uri=" http://stephaneerard.wordpress.com/meta-models/symfony/1.2/P roject/Configurations/Configuration",
prefix="configuration")
package Configuration {
class Configuration extends Abstract.Configuration.Configuration {
ref Configurations[1]#configurations configurationOf;
}

}


@namespace(uri=" http://stephaneerard.wordpress.com/meta-models/symfony/1.2/P roject/Configurations/Schema",
prefix="schema")
package Schema {
abstract class Schema {
}


@namespace(uri=" http://stephaneerard.wordpress.com/meta-models/symfony/1.2/P roject/Configurations/Schema/sfDoctrine",
prefix="sfdoctrine")
package sfDoctrine {
class sfDoctrineSchema extends Schema {
val Classes.Class[*]#definedIn defines;
}


@namespace(uri=" http://stephaneerard.wordpress.com/meta-models/symfony/1.2/P roject/Configurations/Schema/sfDoctrine/Columns",
prefix="columns")
package Columns {
class Column extends Common.Named {
val Types.Type[1] type;
attr boolean[1] ~unique = false;
attr boolean[1] primary = false;
attr boolean[1] notnull = false;
ref Classes.Class[1]#columns columnOf;
}

}


@namespace(uri=" http://stephaneerard.wordpress.com/meta-models/symfony/1.2/P roject/Configurations/Schema/sfDoctrine/Types",
prefix="types")
package Types {
abstract class Type {
attr int[1] max;
}

class Integer extends Type {
}

class Float extends Type {
}

class Decimal extends Type {
}

class String extends Type {
}

class Array extends Type {
}

class Object extends Type {
}

class Blob extends Type {
}

class Clob extends Type {
}

class Timestamp extends Type {
}

class Time extends Type {
}

class Date extends Type {
}

class Enum extends Type {
}

class Gzip extends Type {
}

}


@namespace(uri=" http://stephaneerard.wordpress.com/meta-models/symfony/1.2/P roject/Configurations/Schema/sfDoctrine/Relations",
prefix="relations")
package Relations {
abstract class Relation extends Common.Named {
ref Classes.Class[1] relates;
ref Classes.Class[1]#relations owner;
}

class OneToOne extends Relation {
}

class OneToMany extends Relation {
}

class ManyToMany extends Relation {
ref Classes.Class[1] refClass;
}

}


@namespace(uri=" http://stephaneerard.wordpress.com/meta-models/symfony/1.2/P roject/Configurations/Schema/sfDoctrine/Classes",
prefix="classes")
package Classes {
class Class extends Common.Named {
val Columns.Column[*]#columnOf columns;
attr String[1] plural;
attr String[1] singular;
ref sfDoctrineSchema[1]#defines definedIn;
val Relations.Relation[*]#owner relations;
}

}


@namespace(uri=" http://stephaneerard.wordpress.com/meta-models/symfony/1.2/P roject/Configurations/Schema/sfDoctrine/Common",
prefix="common")
package Common {
abstract interface Named {
attr String[1] name;
}

}

}

}

}

}

@namespace(uri=" http://stephaneerard.wordpress.com/meta-models/symfony/1.2/A bstract",
prefix="abstract")
package Abstract {
abstract interface Named {
attr String[1] name;
}


@namespace(uri=" http://stephaneerard.wordpress.com/meta-models/symfony/1.2/A bstract/Configuration",
prefix="configuration")
package Configuration {
class Configuration extends Named {
val Property[*] properties;
}

class Property extends Named {
attr String value;
val Property[*] subProperties;
attr boolean[1] commented = false;
}

}


@namespace(uri=" http://stephaneerard.wordpress.com/meta-models/symfony/1.2/A bstract/Template",
prefix="template")
package Template {
abstract class AbstractTemplate extends Named {
ref
Project.Applications.Application.Modules.Module.Actions.Acti on.AbstractAction[*]#makesUseOf
usedBy;
}

class Template extends AbstractTemplate {
}

class Partial extends AbstractTemplate {
}

class Slot extends AbstractTemplate {
}

}

}
____________________________________________________________ __________


Then simply instanciate a new dynamic instance of top mm element "Model".

So when I right-click on my "Model" to create a new "Project", it asks for
the userinput, I can see the project element created but not yet correctly
placed (normal behavior as I didn't set it yet at this stage).
Anyway, when I press enter to validate my input, it disappears
(transaction fails I believe) then I get this message in the Console :

Internal error: java.lang.ClassCastException: java.lang.String cannot be
cast to org.eclipse.emf.ecore.util.FeatureMap
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eContainmentFeat ure[BasicEObjectImpl.java:866]
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eBasicSetContain er[BasicEObjectImpl.java:1296]
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eInverseAdd[Basi cEObjectImpl.java:1410]
at
org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$InternalSe ttingDelegateSingleEObject.dynamicSet[EStructuralFeatureImpl .java:2389]
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDynamicSet[Basi cEObjectImpl.java:1126]
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet[BasicEObjec tImpl.java:1100]
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet[BasicEObjec tImpl.java:1071]
at
org.eclipse.epsilon.emc.emf.EmfPropertySetter.invoke[EmfProp ertySetter.java:53]
at
org.eclipse.epsilon.eol.execute.AssignExecutor.execute[Assig nExecutor.java:55]
at
org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST[E xecutorFactory.java:184]
at
org.eclipse.epsilon.eol.execute.StatementBlockExecutor.execu te[StatementBlockExecutor.java:33]
at
org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST[E xecutorFactory.java:184]
at org.eclipse.epsilon.eol.EolOperation.executeBody[EolOperatio n.java:257]
at org.eclipse.epsilon.eol.EolOperation.execute[EolOperation.ja va:230]
at org.eclipse.epsilon.eol.EolOperation.execute[EolOperation.ja va:188]
at org.eclipse.epsilon.eol.EolOperations.execute[EolOperations. java:143]
at
org.eclipse.epsilon.eol.execute.PointExecutor.executeOperati on[PointExecutor.java:160]
at
org.eclipse.epsilon.eol.execute.PointExecutor.execute[PointE xecutor.java:66]
at
org.eclipse.epsilon.eol.execute.PointExecutor.execute[PointE xecutor.java:36]
at
org.eclipse.epsilon.eol.execute.PointExecutor.execute[PointE xecutor.java:122]
at
org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST[E xecutorFactory.java:184]
at
org.eclipse.epsilon.eol.execute.StatementBlockExecutor.execu te[StatementBlockExecutor.java:33]
at
org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST[E xecutorFactory.java:184]
at org.eclipse.epsilon.eol.EolOperation.executeBody[EolOperatio n.java:257]
at org.eclipse.epsilon.eol.EolOperation.execute[EolOperation.ja va:230]
at org.eclipse.epsilon.eol.EolOperation.execute[EolOperation.ja va:188]
at org.eclipse.epsilon.eol.EolOperations.execute[EolOperations. java:143]
at
org.eclipse.epsilon.eol.execute.PointExecutor.executeOperati on[PointExecutor.java:160]
at
org.eclipse.epsilon.eol.execute.PointExecutor.execute[PointE xecutor.java:66]
at
org.eclipse.epsilon.eol.execute.PointExecutor.execute[PointE xecutor.java:36]
at
org.eclipse.epsilon.eol.execute.PointExecutor.execute[PointE xecutor.java:122]
at
org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST[E xecutorFactory.java:184]
at
org.eclipse.epsilon.eol.execute.StatementBlockExecutor.execu te[StatementBlockExecutor.java:33]
at
org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST[E xecutorFactory.java:184]
at org.eclipse.epsilon.eol.EolOperation.executeBody[EolOperatio n.java:257]
at org.eclipse.epsilon.eol.EolOperation.execute[EolOperation.ja va:230]
at org.eclipse.epsilon.eol.EolOperation.execute[EolOperation.ja va:188]
at org.eclipse.epsilon.eol.EolOperations.execute[EolOperations. java:143]
at
org.eclipse.epsilon.eol.execute.PointExecutor.executeOperati on[PointExecutor.java:160]
at
org.eclipse.epsilon.eol.execute.PointExecutor.execute[PointE xecutor.java:66]
at
org.eclipse.epsilon.eol.execute.PointExecutor.execute[PointE xecutor.java:36]
at
org.eclipse.epsilon.eol.execute.PointExecutor.execute[PointE xecutor.java:122]
at
org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST[E xecutorFactory.java:184]
at
org.eclipse.epsilon.eol.execute.ParametersExecutor.execute[P arametersExecutor.java:29]
at
org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST[E xecutorFactory.java:184]
at
org.eclipse.epsilon.eol.execute.PointExecutor.executeOperati on[PointExecutor.java:154]
at
org.eclipse.epsilon.eol.execute.PointExecutor.execute[PointE xecutor.java:66]
at
org.eclipse.epsilon.eol.execute.PointExecutor.execute[PointE xecutor.java:36]
at
org.eclipse.epsilon.eol.execute.PointExecutor.execute[PointE xecutor.java:122]
at
org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST[E xecutorFactory.java:184]
at
org.eclipse.epsilon.eol.execute.StatementBlockExecutor.execu te[StatementBlockExecutor.java:33]
at
org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST[E xecutorFactory.java:184]
at org.eclipse.epsilon.ewl.EwlWizard.process[EwlWizard.java:78]
at
org.eclipse.epsilon.ewl.EwlWizardInstance.process[EwlWizardI nstance.java:66]
at
org.eclipse.epsilon.ewl.emf.ExecuteWizardInstanceCommand.exe cute[ExecuteWizardInstanceCommand.java:42]
at
org.eclipse.emf.common.command.BasicCommandStack.execute[Bas icCommandStack.java:84]
at
org.eclipse.epsilon.ewl.emf.AbstractContributeWizardsAction. execute[AbstractContributeWizardsAction.java:235]
at
org.eclipse.epsilon.ewl.emf.AbstractContributeWizardsAction$ 1.widgetSelected[AbstractContributeWizardsAction.java:223]
at
org.eclipse.swt.widgets.TypedListener.handleEvent[TypedListe ner.java:228]
at org.eclipse.swt.widgets.EventTable.sendEvent[EventTable.java :84]
at org.eclipse.swt.widgets.Widget.sendEvent[Widget.java:1003]
at org.eclipse.swt.widgets.Display.runDeferredEvents[Display.ja va:3823]
at org.eclipse.swt.widgets.Display.readAndDispatch[Display.java :3422]
at org.eclipse.ui.internal.Workbench.runEventLoop[Workbench.jav a:2384]
at org.eclipse.ui.internal.Workbench.runUI[Workbench.java:2348]
at org.eclipse.ui.internal.Workbench.access$4[Workbench.java:22 00]
at org.eclipse.ui.internal.Workbench$5.run[Workbench.java:495]
at
org.eclipse.core.databinding.observable.Realm.runWithDefault [Realm.java:288]
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench[Work bench.java:490]
at org.eclipse.ui.PlatformUI.createAndRunWorkbench[PlatformUI.j ava:149]
at
org.eclipse.ui.internal.ide.application.IDEApplication.start [IDEApplication.java:113]
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run[Eclips eAppHandle.java:193]
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication[EclipseAppLauncher.java:110]
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start[EclipseAppLauncher.java:79]
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run[EclipseS tarter.java:386]
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run[EclipseS tarter.java:179]
at sun.reflect.NativeMethodAccessorImpl.invoke0[Native Method]
at sun.reflect.NativeMethodAccessorImpl.invoke[Unknown Source]
at sun.reflect.DelegatingMethodAccessorImpl.invoke[Unknown Source]
at java.lang.reflect.Method.invoke[Unknown Source]
at org.eclipse.equinox.launcher.Main.invokeFramework[Main.java: 549]
at org.eclipse.equinox.launcher.Main.basicRun[Main.java:504]
at org.eclipse.equinox.launcher.Main.run[Main.java:1236]
(D:\docs_stef\e_workspaces\modeling\Symfony-1.2\tools\wizard s\Model\createProject.ewl@41:19)
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eContainmentFeat ure(BasicEObjectImpl.java:866)
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eBasicSetContain er(BasicEObjectImpl.java:1296)
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eInverseAdd(Basi cEObjectImpl.java:1410)
at
org.eclipse.emf.ecore.impl.EStructuralFeatureImpl$InternalSe ttingDelegateSingleEObject.dynamicSet(EStructuralFeatureImpl .java:2389)
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eDynamicSet(Basi cEObjectImpl.java:1126)
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjec tImpl.java:1100)
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjec tImpl.java:1071)
at
org.eclipse.epsilon.emc.emf.EmfPropertySetter.invoke(EmfProp ertySetter.java:53)
at
org.eclipse.epsilon.eol.execute.AssignExecutor.execute(Assig nExecutor.java:55)
at
org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST(E xecutorFactory.java:184)
at
org.eclipse.epsilon.eol.execute.StatementBlockExecutor.execu te(StatementBlockExecutor.java:33)
at
org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST(E xecutorFactory.java:184)
at org.eclipse.epsilon.eol.EolOperation.executeBody(EolOperatio n.java:257)
at org.eclipse.epsilon.eol.EolOperation.execute(EolOperation.ja va:230)
at org.eclipse.epsilon.eol.EolOperation.execute(EolOperation.ja va:188)
at org.eclipse.epsilon.eol.EolOperations.execute(EolOperations. java:143)
at
org.eclipse.epsilon.eol.execute.PointExecutor.executeOperati on(PointExecutor.java:160)
at
org.eclipse.epsilon.eol.execute.PointExecutor.execute(PointE xecutor.java:66)
at
org.eclipse.epsilon.eol.execute.PointExecutor.execute(PointE xecutor.java:36)
at
org.eclipse.epsilon.eol.execute.PointExecutor.execute(PointE xecutor.java:122)
at
org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST(E xecutorFactory.java:184)
at
org.eclipse.epsilon.eol.execute.StatementBlockExecutor.execu te(StatementBlockExecutor.java:33)
at
org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST(E xecutorFactory.java:184)
at org.eclipse.epsilon.eol.EolOperation.executeBody(EolOperatio n.java:257)
at org.eclipse.epsilon.eol.EolOperation.execute(EolOperation.ja va:230)
at org.eclipse.epsilon.eol.EolOperation.execute(EolOperation.ja va:188)
at org.eclipse.epsilon.eol.EolOperations.execute(EolOperations. java:143)
at
org.eclipse.epsilon.eol.execute.PointExecutor.executeOperati on(PointExecutor.java:160)
at
org.eclipse.epsilon.eol.execute.PointExecutor.execute(PointE xecutor.java:66)
at
org.eclipse.epsilon.eol.execute.PointExecutor.execute(PointE xecutor.java:36)
at
org.eclipse.epsilon.eol.execute.PointExecutor.execute(PointE xecutor.java:122)
at
org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST(E xecutorFactory.java:184)
at
org.eclipse.epsilon.eol.execute.StatementBlockExecutor.execu te(StatementBlockExecutor.java:33)
at
org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST(E xecutorFactory.java:184)
at org.eclipse.epsilon.eol.EolOperation.executeBody(EolOperatio n.java:257)
at org.eclipse.epsilon.eol.EolOperation.execute(EolOperation.ja va:230)
at org.eclipse.epsilon.eol.EolOperation.execute(EolOperation.ja va:188)
at org.eclipse.epsilon.eol.EolOperations.execute(EolOperations. java:143)
at
org.eclipse.epsilon.eol.execute.PointExecutor.executeOperati on(PointExecutor.java:160)
at
org.eclipse.epsilon.eol.execute.PointExecutor.execute(PointE xecutor.java:66)
at
org.eclipse.epsilon.eol.execute.PointExecutor.execute(PointE xecutor.java:36)
at
org.eclipse.epsilon.eol.execute.PointExecutor.execute(PointE xecutor.java:122)
at
org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST(E xecutorFactory.java:184)
at
org.eclipse.epsilon.eol.execute.ParametersExecutor.execute(P arametersExecutor.java:29)
at
org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST(E xecutorFactory.java:184)
at
org.eclipse.epsilon.eol.execute.PointExecutor.executeOperati on(PointExecutor.java:154)
at
org.eclipse.epsilon.eol.execute.PointExecutor.execute(PointE xecutor.java:66)
at
org.eclipse.epsilon.eol.execute.PointExecutor.execute(PointE xecutor.java:36)
at
org.eclipse.epsilon.eol.execute.PointExecutor.execute(PointE xecutor.java:122)
at
org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST(E xecutorFactory.java:184)
at
org.eclipse.epsilon.eol.execute.StatementBlockExecutor.execu te(StatementBlockExecutor.java:33)
at
org.eclipse.epsilon.eol.execute.ExecutorFactory.executeAST(E xecutorFactory.java:184)
at org.eclipse.epsilon.ewl.EwlWizard.process(EwlWizard.java:78)
at
org.eclipse.epsilon.ewl.EwlWizardInstance.process(EwlWizardI nstance.java:66)
at
org.eclipse.epsilon.ewl.emf.ExecuteWizardInstanceCommand.exe cute(ExecuteWizardInstanceCommand.java:42)
at
org.eclipse.emf.common.command.BasicCommandStack.execute(Bas icCommandStack.java:84)
at
org.eclipse.epsilon.ewl.emf.AbstractContributeWizardsAction. execute(AbstractContributeWizardsAction.java:235)
at
org.eclipse.epsilon.ewl.emf.AbstractContributeWizardsAction$ 1.widgetSelected(AbstractContributeWizardsAction.java:223)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:228)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3823)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3422)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2384)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2348)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 00)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:288)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:490)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:113)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:193)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:386)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)

Note the "Unknown Source", I don't know if it matters, anyway...

:-D
Thank you all in helping !!
Re: Problem with Operation self.libraries complains [message #20021 is a reply to message #19979] Mon, 08 June 2009 10:59 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Stephane,

This is a hard one. I suspect there's something wrong(ish) with the
metamodel but I can't see what the problem might me (generally, nested
packages seem to be a common cause of EMF-related problems - not only in
Epsilon)... I'll investigate more.

Cheers,
Dimitris

Stephane wrote:
> Hi list,
>
> I'm figuring a problem while coding a wizard.
> I've coded many operations which have the same structure, and some of
> them are simply not working.
>
> I give here all the materials I've created so far to help in debugging.
> Sorry for long post.
>
> Note the "Unknown Source", I don't know if it matters, anyway...
>
> :-D
> Thank you all in helping !!
>
Re: Problem with Operation self.libraries complains [message #20060 is a reply to message #20021] Mon, 08 June 2009 11:30 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Stephane,

As suspected, the problem appears to be in the metamodel. More
specifically, Application.libraries is opposite of Libraries.libraryOf
and Project.libraries is also opposite of Libraries.libraryOf. A similar
problem occurs with Configuration.configurationOf. Could you please
modify the metamodel to ensure that each reference has a unique opposite
and give it another go?

Cheers,
Dimitris

Dimitris Kolovos wrote:
> Hi Stephane,
>
> This is a hard one. I suspect there's something wrong(ish) with the
> metamodel but I can't see what the problem might me (generally, nested
> packages seem to be a common cause of EMF-related problems - not only in
> Epsilon)... I'll investigate more.
>
> Cheers,
> Dimitris
>
> Stephane wrote:
>> Hi list,
>>
>> I'm figuring a problem while coding a wizard.
>> I've coded many operations which have the same structure, and some of
>> them are simply not working.
>>
>> I give here all the materials I've created so far to help in
>> debugging. Sorry for long post.
>>
>> Note the "Unknown Source", I don't know if it matters, anyway...
>>
>> :-D
>> Thank you all in helping !!
>>
Re: Problem with Operation self.libraries complains [message #20090 is a reply to message #20060] Mon, 08 June 2009 21:01 Go to previous messageGo to next message
St is currently offline StFriend
Messages: 77
Registered: July 2009
Member
aahahhahaaha, I feel so stupid ! =D
Thanks for your investigation !!!
By my side, I think you are almost right, as I get many Configuration
classes at different nested levels, ie:
Project::Configurations,
Project::Applications::Application::Configurations,

So I think I wrote an ambigitious code (which Configurations do I want ?),
ie :
operation Project createConfigurations() : null {
var conf : Configurations; conf = new Configurations;
self.configurations = conf;
conf.configurationsOf = self;
}

Here I can see that Epsilon is getting crazy and send a String when system
waits for a FeatureMap or something like that (from I have seen and can
understand).

So I tried with something like
"Model!Project::Configurations::Configurations" but still not working
(getting error "Type xxx not found").

For now, I can simply rename Project::Configurations to
Project::ProjectConfigurations and it works, but I think it's better to
understand what's wrong here and how to make it works as Configurations
under Project is for sure about Configurations of Project, and if it's all
about writing unambitious code, it's not too bad ! :-)

Thanks you a lot, Dimitris !!

Cheers,
Stéphane Erard
Re: Problem with Operation self.libraries complains [message #20285 is a reply to message #20090] Tue, 09 June 2009 07:14 Go to previous messageGo to next message
St is currently offline StFriend
Messages: 77
Registered: July 2009
Member
Okay I got it working by using
" Model!symfony::Project::Applications::Application::Templates ::Templates; "
for example :-D

Thanks !!! :-)
Re: Problem with Operation self.libraries complains [message #20294 is a reply to message #20285] Tue, 09 June 2009 08:37 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Stephane,

This is the right way to do it indeed.

Could you please open a bug with the stack trace you were getting when
you had those shared opposite references so that we can keep track of
any further investigation on this?

Cheers,
Dimitris

Stephane wrote:
> Okay I got it working by using
> " Model!symfony::Project::Applications::Application::Templates ::Templates; "
> for example :-D
>
> Thanks !!! :-)
>
Re: Problem with Operation self.libraries complains [message #20313 is a reply to message #20294] Tue, 09 June 2009 14:04 Go to previous messageGo to next message
St is currently offline StFriend
Messages: 77
Registered: July 2009
Member
Hi Dimitris,

I want to be sure before I open a bug.
This is my point :
I have an abstract class Abstract::Configuration::Configuration.
This abstract class is specialized by many classes, ie
Project::Configurations::Configuration::Configuration and others.
These specialized classes have the relations, but not the abstract one. So
I don't think there are shared opposites, as far as I can understand what
you mean.

In my opinion, the bug was me, as I didn't wrote unambigitious code.
Perhaps you want to open a bug to make it clear, like a documentation ? So
I feel like these posts are playing this role. Anyway, if you say so I'll
do !
Hope I'm clear ! :-)

Can you please valid this, if you can, so I open the bug ?

Thank you Dimitris,

Cheers,
Stéphane Erard
Re: Problem with Operation self.libraries complains [message #20323 is a reply to message #20313] Tue, 09 June 2009 14:28 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Stéphane,

I actually meant this part:

>
> Internal error: java.lang.ClassCastException: java.lang.String cannot be cast to org.eclipse.emf.ecore.util.FeatureMap
> at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eContainmentFeat ure[BasicEObjectImpl.java:866]
> at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eBasicSetContain er[BasicEObjectImpl.java:1296]
> at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eInverseAdd[Basi cEObjectImpl.java:1410]

>
> Here I can see that Epsilon is getting crazy and send a String when system waits for a FeatureMap or something like that (from I have seen and can understand).

when you had the two references pointing to the same opposite:

>
> As suspected, the problem appears to be in the metamodel. More specifically, Application.libraries is opposite of Libraries.libraryOf and Project.libraries is also opposite of Libraries.libraryOf. A similar problem occurs with Configuration.configurationOf.

On second thought this is not exactly a bug in Epsilon so there's no
need to raise one in the bugzilla. I'll just put it in my notes for
further investigation.

Cheers,
Dimitris

Stephane wrote:
> Hi Dimitris,
>
> I want to be sure before I open a bug.
> This is my point :
> I have an abstract class Abstract::Configuration::Configuration.
> This abstract class is specialized by many classes, ie
> Project::Configurations::Configuration::Configuration and others.
> These specialized classes have the relations, but not the abstract one.
> So I don't think there are shared opposites, as far as I can understand
> what you mean.
>
> In my opinion, the bug was me, as I didn't wrote unambigitious code.
> Perhaps you want to open a bug to make it clear, like a documentation ?
> So I feel like these posts are playing this role. Anyway, if you say so
> I'll do !
> Hope I'm clear ! :-)
>
> Can you please valid this, if you can, so I open the bug ?
>
> Thank you Dimitris,
>
> Cheers,
> Stéphane Erard
>
Re: Problem with Operation self.libraries complains [message #569092 is a reply to message #19979] Mon, 08 June 2009 10:59 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Stephane,

This is a hard one. I suspect there's something wrong(ish) with the
metamodel but I can't see what the problem might me (generally, nested
packages seem to be a common cause of EMF-related problems - not only in
Epsilon)... I'll investigate more.

Cheers,
Dimitris

Stephane wrote:
> Hi list,
>
> I'm figuring a problem while coding a wizard.
> I've coded many operations which have the same structure, and some of
> them are simply not working.
>
> I give here all the materials I've created so far to help in debugging.
> Sorry for long post.
>
> Note the "Unknown Source", I don't know if it matters, anyway...
>
> :-D
> Thank you all in helping !!
>
Re: Problem with Operation self.libraries complains [message #569114 is a reply to message #20021] Mon, 08 June 2009 11:30 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Stephane,

As suspected, the problem appears to be in the metamodel. More
specifically, Application.libraries is opposite of Libraries.libraryOf
and Project.libraries is also opposite of Libraries.libraryOf. A similar
problem occurs with Configuration.configurationOf. Could you please
modify the metamodel to ensure that each reference has a unique opposite
and give it another go?

Cheers,
Dimitris

Dimitris Kolovos wrote:
> Hi Stephane,
>
> This is a hard one. I suspect there's something wrong(ish) with the
> metamodel but I can't see what the problem might me (generally, nested
> packages seem to be a common cause of EMF-related problems - not only in
> Epsilon)... I'll investigate more.
>
> Cheers,
> Dimitris
>
> Stephane wrote:
>> Hi list,
>>
>> I'm figuring a problem while coding a wizard.
>> I've coded many operations which have the same structure, and some of
>> them are simply not working.
>>
>> I give here all the materials I've created so far to help in
>> debugging. Sorry for long post.
>>
>> Note the "Unknown Source", I don't know if it matters, anyway...
>>
>> :-D
>> Thank you all in helping !!
>>
Re: Problem with Operation self.libraries complains [message #569140 is a reply to message #20060] Mon, 08 June 2009 21:01 Go to previous message
St is currently offline StFriend
Messages: 77
Registered: July 2009
Member
aahahhahaaha, I feel so stupid ! =D
Thanks for your investigation !!!
By my side, I think you are almost right, as I get many Configuration
classes at different nested levels, ie:
Project::Configurations,
Project::Applications::Application::Configurations,

So I think I wrote an ambigitious code (which Configurations do I want ?),
ie :
operation Project createConfigurations() : null {
var conf : Configurations; conf = new Configurations;
self.configurations = conf;
conf.configurationsOf = self;
}

Here I can see that Epsilon is getting crazy and send a String when system
waits for a FeatureMap or something like that (from I have seen and can
understand).

So I tried with something like
"Model!Project::Configurations::Configurations" but still not working
(getting error "Type xxx not found").

For now, I can simply rename Project::Configurations to
Project::ProjectConfigurations and it works, but I think it's better to
understand what's wrong here and how to make it works as Configurations
under Project is for sure about Configurations of Project, and if it's all
about writing unambitious code, it's not too bad ! :-)

Thanks you a lot, Dimitris !!

Cheers,
Stéphane Erard
Re: Problem with Operation self.libraries complains [message #569199 is a reply to message #20090] Tue, 09 June 2009 07:14 Go to previous message
St is currently offline StFriend
Messages: 77
Registered: July 2009
Member
Okay I got it working by using
" Model!symfony::Project::Applications::Application::Templates ::Templates; "
for example :-D

Thanks !!! :-)
Re: Problem with Operation self.libraries complains [message #569233 is a reply to message #20285] Tue, 09 June 2009 08:37 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Stephane,

This is the right way to do it indeed.

Could you please open a bug with the stack trace you were getting when
you had those shared opposite references so that we can keep track of
any further investigation on this?

Cheers,
Dimitris

Stephane wrote:
> Okay I got it working by using
> " Model!symfony::Project::Applications::Application::Templates ::Templates; "
> for example :-D
>
> Thanks !!! :-)
>
Re: Problem with Operation self.libraries complains [message #569292 is a reply to message #20294] Tue, 09 June 2009 14:04 Go to previous message
St is currently offline StFriend
Messages: 77
Registered: July 2009
Member
Hi Dimitris,

I want to be sure before I open a bug.
This is my point :
I have an abstract class Abstract::Configuration::Configuration.
This abstract class is specialized by many classes, ie
Project::Configurations::Configuration::Configuration and others.
These specialized classes have the relations, but not the abstract one. So
I don't think there are shared opposites, as far as I can understand what
you mean.

In my opinion, the bug was me, as I didn't wrote unambigitious code.
Perhaps you want to open a bug to make it clear, like a documentation ? So
I feel like these posts are playing this role. Anyway, if you say so I'll
do !
Hope I'm clear ! :-)

Can you please valid this, if you can, so I open the bug ?

Thank you Dimitris,

Cheers,
Stéphane Erard
Re: Problem with Operation self.libraries complains [message #569319 is a reply to message #20313] Tue, 09 June 2009 14:28 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Stéphane,

I actually meant this part:

>
> Internal error: java.lang.ClassCastException: java.lang.String cannot be cast to org.eclipse.emf.ecore.util.FeatureMap
> at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eContainmentFeat ure[BasicEObjectImpl.java:866]
> at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eBasicSetContain er[BasicEObjectImpl.java:1296]
> at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eInverseAdd[Basi cEObjectImpl.java:1410]

>
> Here I can see that Epsilon is getting crazy and send a String when system waits for a FeatureMap or something like that (from I have seen and can understand).

when you had the two references pointing to the same opposite:

>
> As suspected, the problem appears to be in the metamodel. More specifically, Application.libraries is opposite of Libraries.libraryOf and Project.libraries is also opposite of Libraries.libraryOf. A similar problem occurs with Configuration.configurationOf.

On second thought this is not exactly a bug in Epsilon so there's no
need to raise one in the bugzilla. I'll just put it in my notes for
further investigation.

Cheers,
Dimitris

Stephane wrote:
> Hi Dimitris,
>
> I want to be sure before I open a bug.
> This is my point :
> I have an abstract class Abstract::Configuration::Configuration.
> This abstract class is specialized by many classes, ie
> Project::Configurations::Configuration::Configuration and others.
> These specialized classes have the relations, but not the abstract one.
> So I don't think there are shared opposites, as far as I can understand
> what you mean.
>
> In my opinion, the bug was me, as I didn't wrote unambigitious code.
> Perhaps you want to open a bug to make it clear, like a documentation ?
> So I feel like these posts are playing this role. Anyway, if you say so
> I'll do !
> Hope I'm clear ! :-)
>
> Can you please valid this, if you can, so I open the bug ?
>
> Thank you Dimitris,
>
> Cheers,
> Stéphane Erard
>
Previous Topic:[Eugenia] Unable to generate GMF files
Next Topic:Missing "metamodels" folder.
Goto Forum:
  


Current Time: Sat Apr 27 00:31:50 GMT 2024

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

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

Back to the top