Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autogenerate Ecore files via tycho-eclipserun-plugin #14

Closed
jpasski opened this issue Mar 27, 2016 · 2 comments
Closed

Autogenerate Ecore files via tycho-eclipserun-plugin #14

jpasski opened this issue Mar 27, 2016 · 2 comments

Comments

@jpasski
Copy link
Contributor

jpasski commented Mar 27, 2016

https://gist.github.com/hwellmann/6044835

Can do this no problem with the -model switch when configured w/ the .assessment project.
Duplicated the command and changed -model to -edit for the .assessment.edit project, got errors.

Contains: Nature does not exist: org.eclipse.pde.PluginNature.

Similar error to the issue here. However, both the .assessment and .assessment.edit projects had the org.eclipse.pde as a dependency on the plugin. (I tried making it also a dependency on the tycho-eclipserun-plugin plugin in the pom.xml for each. No love it seemed.

jpasski added a commit that referenced this issue Mar 28, 2016
Task-Url:
https://github.com/OpenSemanticsIO/semiotics-main/issues/issue/2

* Initial iteration on models, heavily modifying Ecore
* Re-generated model and edit code, checking in until issue #14 is
  resolved

Closes #2
@jpasski
Copy link
Contributor Author

jpasski commented Apr 22, 2016

Random notes

target/generated-sources/emf ("target-root-directory")

  • Puts it into the maven project containing the tycho-eclipserun-plugin plugin
    configuration

target/workspace

  • Used for other projects not contained in this project, e.g. -edit or -editor
  • Creates an Eclipse project within the workspace
  • Does not update the source

So here's the idea:

  • Try making the target-root-directory option point to the base
    directory again. Is this possible?
  • Move -edit to its own project

target-root-directory

-  ... ${basedir}/model/assessment.genmodel target/generated-sources/emf</appArgLine>
+  ... ${basedir}/model/assessment.genmodel ${basedir}</appArgLine>
mvn -f builds/io.opensemantics.semiotics.parent/pom.xml clean verify
...

>>> Generating /Users/jonpasski/src/OpenSemantics/semiotics-main/bundles/io.opensemantics.semiotics.model.assessment/model/assessment.genmodel
>>  Examining project 'io.opensemantics.semiotics.model.assessment'
>>  Refreshing '/io.opensemantics.semiotics.model.assessment'.
Usage arguments:
  [-projects <project-root-directory>]
  [-dynamicTemplates] [-forceOverwrite | -diff]
  [-generateSchema] [-nonNLSMarkers]
  [-codeFormatting { default | <profile-file> } ]
  [-model] [-edit] [-editor] [-tests]
  [-autoBuild <true|false>]
  [-reconcile]
  <genmodel-file-or-platform-resource-uri>
  [ <target-root-directory> ]

For example:

  generate result/model/Extended.genmodel
org.eclipse.core.internal.resources.ResourceException: Invalid project description.
  at org.eclipse.core.internal.resources.Project.checkDescription(Project.java:168)
  at org.eclipse.core.internal.resources.Project.assertCreateRequirements(Project.java:52)
  at org.eclipse.core.internal.resources.Project.create(Project.java:268)
  at org.eclipse.core.internal.resources.Project.create(Project.java:252)
  at org.eclipse.emf.codegen.util.CodeGenUtil$EclipseUtil.findOrCreateContainer(CodeGenUtil.java:1276)
  at org.eclipse.emf.codegen.util.CodeGenUtil$EclipseUtil.findOrCreateContainer(CodeGenUtil.java:1251)
  at org.eclipse.emf.codegen.ecore.Generator$PlatformRunnable$1.run(Generator.java:363)
  at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2241)
  at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2225)
  at org.eclipse.emf.codegen.ecore.Generator$PlatformRunnable.run(Generator.java:466)
  at org.eclipse.emf.codegen.ecore.Generator$PlatformRunnable.run(Generator.java:134)
  at org.eclipse.emf.codegen.ecore.Generator$PlatformRunnable.start(Generator.java:120)
  at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
  at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
  at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
  at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
  at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:497)
  at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
  at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
  at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
  at org.eclipse.equinox.launcher.Main.main(Main.java:1488)
Contains: OK
Contains: /Users/jonpasski/src/OpenSemantics/semiotics-main/bundles/io.opensemantics.semiotics.model.assessment overlaps the workspace location: /Users/jonpasski/src/OpenSemantics/semiotics-main/bundles/io.opensemantics.semiotics.model.assessment/target/workspace

^^^ So target/workspace cannot overlap the project. fuck a duck

This occurs in :

  if (!project.exists())
  {
    project.create(projectDescription, new SubProgressMonitor(progressMonitor, 1));
    project.open(new SubProgressMonitor(progressMonitor, 1));
  }

At the project.create call in org.eclipse.emf.codegen.util.CodeGenUtil$EclipseUtil.findOrCreateContainer

OK, so the plugin opens the target-root-directory project in the workspace.
The project cannot overlap the workspace, which makes sense.

@jpasski
Copy link
Contributor Author

jpasski commented Jul 21, 2016

This issue was moved to CoastalHacking/semiotics-main#10

@jpasski jpasski closed this as completed Jul 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant