Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Problems integrating
Problems integrating [message #558845] Tue, 14 September 2010 15:04 Go to next message
Philipp Zech is currently offline Philipp Zech
Messages: 96
Registered: July 2009
Member
Hi,

I'm currently moving a M2T generator, encapsulated inside an eclipse
plugin, from oAW4 to oAW5. So far, the renaming and everything else
worked fine, also the generator works fine, but only in a stand-alone
project in the workspace (by right-clicking on the mwe file and
selecting "Run as MWE workflow"). However, as soon as I export the
plugin and try to invoke the workflow from a delegated action (via
WorkflowRunner), nothing happens, in other words, I get custom debug
messages telling me that the generator starts generating, I get NO error
messages but also NO output. The funny thing is, using oAW4 everything
worked fine, but since I changed to oAW5, I get no output (and I only
changed the qualified names of the workflow components and inside the
..xpt files). So far, I don't have any more ideas why this happens, so I
try to get help from the news group, in hopes of somebody else already
faced a similar problem and maybe can provide me with a solution.

Thanks in advance!

Cheers,

Philipp
Re: Problems integrating generator into eclipse plugin [message #558846 is a reply to message #558845] Tue, 14 September 2010 15:11 Go to previous messageGo to next message
Philipp Zech is currently offline Philipp Zech
Messages: 96
Registered: July 2009
Member
On 09/14/2010 05:04 PM, Philipp Zech wrote:
> Hi,
>
> I'm currently moving a M2T generator, encapsulated inside an eclipse
> plugin, from oAW4 to oAW5. So far, the renaming and everything else
> worked fine, also the generator works fine, but only in a stand-alone
> project in the workspace (by right-clicking on the mwe file and
> selecting "Run as MWE workflow"). However, as soon as I export the
> plugin and try to invoke the workflow from a delegated action (via
> WorkflowRunner), nothing happens, in other words, I get custom debug
> messages telling me that the generator starts generating, I get NO error
> messages but also NO output. The funny thing is, using oAW4 everything
> worked fine, but since I changed to oAW5, I get no output (and I only
> changed the qualified names of the workflow components and inside the
> .xpt files). So far, I don't have any more ideas why this happens, so I
> try to get help from the news group, in hopes of somebody else already
> faced a similar problem and maybe can provide me with a solution.
>
> Thanks in advance!
>
> Cheers,
>
> Philipp

sorry, forgot to finish the subject entry...
Re: Problems integrating generator into eclipse plugin [message #558871 is a reply to message #558846] Tue, 14 September 2010 16:53 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6388
Registered: July 2009
Senior Member
Hi,

i cannot reproduce this using a trivial example. did you check the right place for the files to be generated?

~Christian
Re: Problems integrating generator into eclipse plugin [message #558877 is a reply to message #558871] Tue, 14 September 2010 17:16 Go to previous messageGo to next message
Philipp Zech is currently offline Philipp Zech
Messages: 96
Registered: July 2009
Member
On 09/14/2010 06:53 PM, Christian Dietrich wrote:
> Hi,
>
> i cannot reproduce this using a trivial example. did you check the right
> place for the files to be generated?
> ~Christian

Hi Christian,

yep, the place is correct, it is an eclipse project, where the uml file
is taken from a specific existing directory and also the outlet is
existent within the project where the UML file is taken from.

Philipp
Re: Problems integrating generator into eclipse plugin [message #558881 is a reply to message #558877] Tue, 14 September 2010 17:46 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6388
Registered: July 2009
Senior Member
Hi,

here is what i do

public class EditorAction1Delegate implements IEditorActionDelegate {

	@Override
	public void run(IAction action) {
		WorkflowRunner workflowRunner = new WorkflowRunner();
		workflowRunner.run("src/dummy/test.mwe", new NullProgressMonitor(), new HashMap<String, String>(), new HashMap());
		
	}

	@Override
	public void selectionChanged(IAction action, ISelection selection) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void setActiveEditor(IAction action, IEditorPart targetEditor) {
		// TODO Auto-generated method stub
		
	}
	
}


<workflow>
	
	<component class="org.eclipse.xpand2.Generator">
		<expand value="dummy::test::main FOR 'ccc'" />
		<outlet path="src-gen" />
	</component>

</workflow>


«DEFINE main FOR String»
«FILE "test.txt"»
«ENDFILE»
«ENDDEFINE»


the test.txt file is generated in a src-gen folder next to the eclipse exe as i expect it.

Does it work for you if you change your sample to something similar trivial? e.g. by adding this to your entry definition

«FILE "test.txt"»
«ENDFILE»


debugging FileHandleImpl may give you hints where the files are written to.

~Christian

[Updated on: Tue, 14 September 2010 18:09]

Report message to a moderator

Re: Problems integrating generator into eclipse plugin [message #558884 is a reply to message #558881] Tue, 14 September 2010 18:16 Go to previous messageGo to next message
Philipp Zech is currently offline Philipp Zech
Messages: 96
Registered: July 2009
Member
On 09/14/2010 07:46 PM, Christian Dietrich wrote:
> «DEFINE main FOR String»
> «FILE "test.txt"»
> «ENDFILE»
> «ENDDEFINE»
Hi Christian,

first of all, thanks for your fast reply and help. However, I even can't
get your simple example running to generate some files. It compiles, I
get no errors, and unfortunately I also get no output. I've searched my
whole disk, but no "test.txt" file was found.
Btw, are there any known problems, if using Linux?

Philipp
Re: Problems integrating generator into eclipse plugin [message #558885 is a reply to message #558884] Tue, 14 September 2010 18:20 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6388
Registered: July 2009
Senior Member
hi

don't know of any linux problems - did you try to hardcode an absolte path to the outlet?

~Christian
Re: Problems integrating generator into eclipse plugin [message #558888 is a reply to message #558885] Tue, 14 September 2010 18:32 Go to previous messageGo to next message
Philipp Zech is currently offline Philipp Zech
Messages: 96
Registered: July 2009
Member
On 09/14/2010 08:20 PM, Christian Dietrich wrote:
> hi
>
> don't know of any linux problems - did you try to hardcode an absolte
> path to the outlet?
>
> ~Christian
Hi,

even a hardcoded path does not work.

Philipp
Re: Problems integrating generator into eclipse plugin [message #558889 is a reply to message #558888] Tue, 14 September 2010 18:34 Go to previous messageGo to next message
Philipp Zech is currently offline Philipp Zech
Messages: 96
Registered: July 2009
Member
On 09/14/2010 08:32 PM, Philipp Zech wrote:
> On 09/14/2010 08:20 PM, Christian Dietrich wrote:
>> hi
>>
>> don't know of any linux problems - did you try to hardcode an absolte
>> path to the outlet?
>>
>> ~Christian
> Hi,
>
> even a hardcoded path does not work.
>
> Philipp
Hi again,

however, if I'm invoking the workflow inside the project via "Run as..."
it works without any problems and the file is generated.

Philipp
Re: Problems integrating generator into eclipse plugin [message #558890 is a reply to message #558889] Tue, 14 September 2010 18:47 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6388
Registered: July 2009
Senior Member
strange

can you post the logging output you get?
can you post your workflow and the action code?

~Christian

[Updated on: Tue, 14 September 2010 18:49]

Report message to a moderator

Re: Problems integrating generator into eclipse plugin [message #558895 is a reply to message #558890] Tue, 14 September 2010 19:03 Go to previous messageGo to next message
Philipp Zech is currently offline Philipp Zech
Messages: 96
Registered: July 2009
Member
On 09/14/2010 08:47 PM, Christian Dietrich wrote:
> strage
>
> can you post the logging output you get?
> can you post your workflow and the action code?
>
> ~Christian
Hi,

I assume you're asking for the action code of my plugin, so here it goes:

package info.teststories.generator.plugin;

import info.teststories.generator.xpand.Teststory;

import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.ui.IObjectActionDelegate;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.actions.ActionDelegate;
import org.eclipse.emf.mwe.core.WorkflowRunner;
import org.eclipse.emf.mwe.core.monitor.NullProgressMonitor;

/**
* @author Philipp Zech (Philipp.Zech@uibk.ac.at)
*
* Delegated action to invoke the generator.
*/
public class GenerateStoryAction extends ActionDelegate implements
IObjectActionDelegate {

private String UMLModel = "";

private String projectLocation = "";

private final String workflowFile =
"info/teststories/generator/workflow/workflow.mwe";

private IProject project = null;

public void setActivePart(IAction action, IWorkbenchPart targetPart) {

}

public void run(IAction action) {

Job job = new Job("Generating Teststories") {
@Override
protected IStatus run(IProgressMonitor monitor) {
monitor
.beginTask("Generating test code and test artifacts...",
100);
Map<String, String> properties = new HashMap<String, String>();
Map<String, ?> slotMap = new HashMap<String, Object>();

// configure properties passed to the work-flow engine
properties.put("UMLModel", UMLModel);
properties.put("projectLocation", projectLocation);

monitor.worked(20);

// clear the adapters file
File adapters = new File(projectLocation + File.separator
+ ".adapters.list");
if (adapters.exists()) {
adapters.delete();
}
try {
adapters.createNewFile();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

monitor.worked(40);

WorkflowRunner runner = new WorkflowRunner();
runner.run(workflowFile, new NullProgressMonitor(), properties,
slotMap);

monitor.worked(95);

try {
project.refreshLocal(IProject.DEPTH_INFINITE,
monitor);
} catch (CoreException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
monitor.worked(100);
monitor.done();
return Status.OK_STATUS;
}
};
job.schedule();
}

public void selectionChanged(IAction action, ISelection selection) {
StructuredSelection structuredSelection = (StructuredSelection) selection;
IResource resource = (IResource) structuredSelection.getFirstElement();
if (resource != null) {
UMLModel = resource.getName();
projectLocation = resource.getProject().getLocation().toOSString();
Teststory.setProjectLocation(projectLocation);
project = resource.getProject();
}
}
}



Concerning thelogging, the only output I get is the name of the UML file
selected (removed from the posted code above), I don't get any other log
messages, whether if I'm using log4j nor in the eclipse log itself,
which also seems a little strange to me.

Thanks,

Philipp
Re: Problems integrating generator into eclipse plugin [message #558898 is a reply to message #558895] Tue, 14 September 2010 19:31 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6388
Registered: July 2009
Senior Member
hi,

testing with a runtime app i get following in the logs of the host eclipse

14.09.2010 21:31:33 org.eclipse.emf.mwe.core.WorkflowRunner prepare
INFO: --------------------------------------------------------------------------------------
14.09.2010 21:31:33 org.eclipse.emf.mwe.core.WorkflowRunner prepare
INFO: EMF Modeling Workflow Engine 1.0.0, Build v201008251122
14.09.2010 21:31:33 org.eclipse.emf.mwe.core.WorkflowRunner prepare
INFO: (c) 2005-2009 openarchitectureware.org and contributors
14.09.2010 21:31:33 org.eclipse.emf.mwe.core.WorkflowRunner prepare
INFO: --------------------------------------------------------------------------------------
14.09.2010 21:31:33 org.eclipse.emf.mwe.core.WorkflowRunner prepare
INFO: running workflow: src/dummy/test.mwe
14.09.2010 21:31:33 org.eclipse.emf.mwe.core.WorkflowRunner prepare
INFO: 
14.09.2010 21:31:33 org.eclipse.xtend.expression.AbstractExpressionsUsingWorkflowComponent checkConfigurationInternal
INFO: No meta models configured, using JavaBeans as default.
14.09.2010 21:31:33 org.eclipse.emf.mwe.core.container.CompositeComponent internalInvoke
INFO: Generator: generating 'dummy::test::main FOR 'ccc'' => D:/runtime-New_configuration/x/src
14.09.2010 21:31:33 org.eclipse.xpand2.Generator invokeInternal2
INFO: Written 1 files to outlet [default](D:/runtime-New_configuration/x/src)
14.09.2010 21:31:33 org.eclipse.emf.mwe.core.WorkflowRunner executeWorkflow
INFO: workflow completed in 16ms!



~Christian
Re: Problems integrating generator into eclipse plugin [message #558902 is a reply to message #558898] Tue, 14 September 2010 19:47 Go to previous messageGo to next message
Philipp Zech is currently offline Philipp Zech
Messages: 96
Registered: July 2009
Member
On 09/14/2010 09:31 PM, Christian Dietrich wrote:
> hi,
>
> testing with a runtime app i get following in the logs of the host eclipse
>
>
> 14.09.2010 21:31:33 org.eclipse.emf.mwe.core.WorkflowRunner prepare
> INFO:
> ------------------------------------------------------------ --------------------------
>
> 14.09.2010 21:31:33 org.eclipse.emf.mwe.core.WorkflowRunner prepare
> INFO: EMF Modeling Workflow Engine 1.0.0, Build v201008251122
> 14.09.2010 21:31:33 org.eclipse.emf.mwe.core.WorkflowRunner prepare
> INFO: (c) 2005-2009 openarchitectureware.org and contributors
> 14.09.2010 21:31:33 org.eclipse.emf.mwe.core.WorkflowRunner prepare
> INFO:
> ------------------------------------------------------------ --------------------------
>
> 14.09.2010 21:31:33 org.eclipse.emf.mwe.core.WorkflowRunner prepare
> INFO: running workflow: src/dummy/test.mwe
> 14.09.2010 21:31:33 org.eclipse.emf.mwe.core.WorkflowRunner prepare
> INFO: 14.09.2010 21:31:33
> org.eclipse.xtend.expression.AbstractExpressionsUsingWorkflo wComponent
> checkConfigurationInternal
> INFO: No meta models configured, using JavaBeans as default.
> 14.09.2010 21:31:33
> org.eclipse.emf.mwe.core.container.CompositeComponent internalInvoke
> INFO: Generator: generating 'dummy::test::main FOR 'ccc'' =>
> D:/runtime-New_configuration/x/src
> 14.09.2010 21:31:33 org.eclipse.xpand2.Generator invokeInternal2
> INFO: Written 1 files to outlet
> [default](D:/runtime-New_configuration/x/src)
> 14.09.2010 21:31:33 org.eclipse.emf.mwe.core.WorkflowRunner executeWorkflow
> INFO: workflow completed in 16ms!
>
>
>
> ~Christian

Hi,

ok, now it becomes really strange. What I did was creating a new XPand
project with the wizard, adding your example and starting an instance of
eclipse. However, I don't get any log in the host eclipse. Do I have to
set up anything for that i get the log? I think I've got my wires
crossed...don't have any clue what to do.

Again, thanks for your help,

Philipp
Re: Problems integrating generator into eclipse plugin [message #558905 is a reply to message #558902] Tue, 14 September 2010 19:57 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6388
Registered: July 2009
Senior Member
hi,

no the logging should work out of the box.

here is my manifest

Quote:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Dummy
Bundle-SymbolicName: dummy;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: dummy.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.emf.mwe.core;bundle-version="1.0.0",
org.apache.commons.logging;bundle-version="1.0.4",
org.eclipse.xpand;bundle-version="1.0.1",
org.eclipse.xtend;bundle-version="1.0.1",
org.antlr.runtime;bundle-version="3.0.0",
org.eclipse.core.resources;bundle-version="3.6.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6



the runtime i start with host + workspace bundles.

btw: did you try to use the java debugger to get an idea what happens?

~Christian
Re: Problems integrating generator into eclipse plugin [message #558917 is a reply to message #558905] Tue, 14 September 2010 20:39 Go to previous messageGo to next message
Philipp Zech is currently offline Philipp Zech
Messages: 96
Registered: July 2009
Member
On 09/14/2010 09:57 PM, Christian Dietrich wrote:
> hi,
>
> no the logging should work out of the box.
>
> here is my manifest
>
> Quote:
>> Manifest-Version: 1.0
>> Bundle-ManifestVersion: 2
>> Bundle-Name: Dummy
>> Bundle-SymbolicName: dummy;singleton:=true
>> Bundle-Version: 1.0.0.qualifier
>> Bundle-Activator: dummy.Activator
>> Require-Bundle: org.eclipse.ui,
>> org.eclipse.core.runtime,
>> org.eclipse.emf.mwe.core;bundle-version="1.0.0",
>> org.apache.commons.logging;bundle-version="1.0.4",
>> org.eclipse.xpand;bundle-version="1.0.1",
>> org.eclipse.xtend;bundle-version="1.0.1",
>> org.antlr.runtime;bundle-version="3.0.0",
>> org.eclipse.core.resources;bundle-version="3.6.0"
>> Bundle-ActivationPolicy: lazy
>> Bundle-RequiredExecutionEnvironment: JavaSE-1.6
>
>
> the runtime i start with host + workspace bundles.
>
> btw: did you try to use the java debugger to get an idea what happens?
>
> ~Christian

hi,

ok, first of all, I don't have Xtend and XPand in versions 1.0.1, only
1.0.0. If I try to update it, the update manager tells me there are no
updates available.
Second, I start the instance the same way like you.
And finally, I don't know if I'm debugging the wrong way, but the editor
in the debug view tells me all the time that it can't find the source of
the classes (WorkflowRunner and the like, which doesn't allow me to
change source attachments). Maybe my eclipse has some major problems.
I'm definitely confused.

philipp
Re: Problems integrating generator into eclipse plugin [message #558918 is a reply to message #558917] Tue, 14 September 2010 20:48 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6388
Registered: July 2009
Senior Member
Hi,

i use the distro available from here: http://xtext.itemis.com/xtext-language-development-framework /language=en/23947/downloads

~Christian
Re: Problems integrating generator into eclipse plugin [message #558922 is a reply to message #558918] Tue, 14 September 2010 20:50 Go to previous messageGo to next message
Philipp Zech is currently offline Philipp Zech
Messages: 96
Registered: July 2009
Member
On 09/14/2010 10:48 PM, Christian Dietrich wrote:
> Hi,
>
> i use the distro available from here:
> http://xtext.itemis.com/xtext-language-development-framework /language=en/23947/downloads
>
>
> ~Christian
ok,

i'll try it with that one. thanks for the hint.

philipp
Re: Problems integrating generator into eclipse plugin [message #558930 is a reply to message #558922] Tue, 14 September 2010 22:25 Go to previous messageGo to next message
Philipp Zech is currently offline Philipp Zech
Messages: 96
Registered: July 2009
Member
On 09/14/2010 10:50 PM, Philipp Zech wrote:
> On 09/14/2010 10:48 PM, Christian Dietrich wrote:
>> Hi,
>>
>> i use the distro available from here:
>> http://xtext.itemis.com/xtext-language-development-framework /language=en/23947/downloads
>>
>>
>>
>> ~Christian
> ok,
>
> i'll try it with that one. thanks for the hint.
>
> philipp
Hi Christian,

with the items distribution of eclipse, your simple example now works!
Also debugging now is possible, I haven't tested my project now, I'll do
it tomorrow, and I'll let you know whether it works or not. If it
doesn't I'll write a new post anyway.

Thanks so far for your help!

Philipp
Re: Problems integrating generator into eclipse plugin [message #558932 is a reply to message #558930] Tue, 14 September 2010 22:45 Go to previous messageGo to next message
Philipp Zech is currently offline Philipp Zech
Messages: 96
Registered: July 2009
Member
On 09/15/2010 12:25 AM, Philipp Zech wrote:
> On 09/14/2010 10:50 PM, Philipp Zech wrote:
>> On 09/14/2010 10:48 PM, Christian Dietrich wrote:
>>> Hi,
>>>
>>> i use the distro available from here:
>>> http://xtext.itemis.com/xtext-language-development-framework /language=en/23947/downloads
>>>
>>>
>>>
>>>
>>> ~Christian
>> ok,
>>
>> i'll try it with that one. thanks for the hint.
>>
>> philipp
> Hi Christian,
>
> with the items distribution of eclipse, your simple example now works!
> Also debugging now is possible, I haven't tested my project now, I'll do
> it tomorrow, and I'll let you know whether it works or not. If it
> doesn't I'll write a new post anyway.
>
> Thanks so far for your help!
>
> Philipp
Hi again,

the logging still doesn't work.

Philipp
Re: Problems integrating generator into eclipse plugin [message #558950 is a reply to message #558932] Wed, 15 September 2010 06:36 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6388
Registered: July 2009
Senior Member
Hi,

for the logging: i start my runtime app with -console -consoleLog

~Christian
Re: Problems integrating generator into eclipse plugin [message #558977 is a reply to message #558950] Wed, 15 September 2010 08:35 Go to previous messageGo to next message
Philipp Zech is currently offline Philipp Zech
Messages: 96
Registered: July 2009
Member
On 09/15/2010 08:36 AM, Christian Dietrich wrote:
> Hi,
>
> for the logging: i start my runtime app with -console -consoleLog
>
> ~Christian
Hi,

well i didn't use the "console" option so far, but I used the
"consoleLog". However, adding "console" to the program arguments does
not change anything.

Philipp
Re: Problems integrating generator into eclipse plugin [message #558978 is a reply to message #558977] Wed, 15 September 2010 08:38 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6388
Registered: July 2009
Senior Member
Hi,

so the only possibility for further investigations is debugging.

~Christian
Re: Problems integrating generator into eclipse plugin [message #559037 is a reply to message #558978] Wed, 15 September 2010 11:50 Go to previous messageGo to next message
Philipp Zech is currently offline Philipp Zech
Messages: 96
Registered: July 2009
Member
On 09/15/2010 10:38 AM, Christian Dietrich wrote:
> Hi,
>
> so the only possibility for further investigations is debugging.
>
> ~Christian
Hi Christian,


now everything works fine, my code is generated without any errors.
After using the itemis distro I debugged my workflow and realized that
the line

<bean class="org.eclipse.xtend.typesystem.uml2.Setup"
standardUML2Setup="true"/>

caused the workflow to be interrrupted, as "Setup" could no be
instantiated, yet the plugin "org.eclipse.uml2.uml.resources" was on the
classpath.

By mentioning that, may I ask you, what exactly this line in the
workflow causes? So far I haven't found a clear explanation about what's
the effect of this instruction.

Again, thanks for your help and patience!

cheers,

Philipp
Re: Problems integrating generator into eclipse plugin [message #559060 is a reply to message #559037] Wed, 15 September 2010 13:25 Go to previous messageGo to next message
Philipp Zech is currently offline Philipp Zech
Messages: 96
Registered: July 2009
Member
On 09/15/2010 01:50 PM, Philipp Zech wrote:
> On 09/15/2010 10:38 AM, Christian Dietrich wrote:
>> Hi,
>>
>> so the only possibility for further investigations is debugging.
>>
>> ~Christian
> Hi Christian,
>
>
> now everything works fine, my code is generated without any errors.
> After using the itemis distro I debugged my workflow and realized that
> the line
>
> <bean class="org.eclipse.xtend.typesystem.uml2.Setup"
> standardUML2Setup="true"/>
>
> caused the workflow to be interrrupted, as "Setup" could no be
> instantiated, yet the plugin "org.eclipse.uml2.uml.resources" was on the
> classpath.
>
> By mentioning that, may I ask you, what exactly this line in the
> workflow causes? So far I haven't found a clear explanation about what's
> the effect of this instruction.
>
> Again, thanks for your help and patience!
>
> cheers,
>
> Philipp
Hi again,

now again sth strange happens. In an instance my generator works
smoothly, however as soon as I export the plugin, again nothing is
generated. How can this happen?


Thanks,

Philipp
Re: Problems integrating generator into eclipse plugin [message #559063 is a reply to message #559060] Wed, 15 September 2010 13:36 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6388
Registered: July 2009
Senior Member
Hi,

make sure eveything is packaged with the plugin and the WorkflowRunner can find the file. maybe you have to set the plugin to be unpacked.

~Christian

[Updated on: Wed, 15 September 2010 13:42]

Report message to a moderator

Re: Problems integrating generator into eclipse plugin [message #559085 is a reply to message #559063] Wed, 15 September 2010 14:31 Go to previous messageGo to next message
Philipp Zech is currently offline Philipp Zech
Messages: 96
Registered: July 2009
Member
On 09/15/2010 03:36 PM, Christian Dietrich wrote:
> Hi,
>
> make sure eveything is packaged with the plugin and the WorkflowRunner
> can find the file.
>
> ~Christian
Hi,

is it maybe because I'm not using the following line:

<!--bean class="org.eclipse.xtend.typesystem.uml2.Setup"
standardUML2Setup="true"/--> (or StandAloneSetup)?

Philipp
Re: Problems integrating generator into eclipse plugin [message #559088 is a reply to message #559085] Wed, 15 September 2010 15:01 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6388
Registered: July 2009
Senior Member
Hi,

you have to use this to get uml model read correctly.

~Christian
Re: Problems integrating generator into eclipse plugin [message #559097 is a reply to message #559088] Wed, 15 September 2010 15:21 Go to previous messageGo to next message
Philipp Zech is currently offline Philipp Zech
Messages: 96
Registered: July 2009
Member
On 09/15/2010 05:01 PM, Christian Dietrich wrote:
> Hi,
>
> you have to use this to get uml model read correctly.
>
> ~Christian
Hi,

hm, with this line my generator always fails, however adding

<bean class="org.eclipse.emf.mwe.utils.StandaloneSetup"
platformUri="${projectLocation}/.."/>

works smoothly. I'm using MagicDraw exported diagrams.

Philipp
Re: Problems integrating generator into eclipse plugin [message #559098 is a reply to message #559097] Wed, 15 September 2010 15:23 Go to previous messageGo to next message
Philipp Zech is currently offline Philipp Zech
Messages: 96
Registered: July 2009
Member
On 09/15/2010 05:21 PM, Philipp Zech wrote:
> On 09/15/2010 05:01 PM, Christian Dietrich wrote:
>> Hi,
>>
>> you have to use this to get uml model read correctly.
>>
>> ~Christian
> Hi,
>
> hm, with this line my generator always fails, however adding
>
> <bean class="org.eclipse.emf.mwe.utils.StandaloneSetup"
> platformUri="${projectLocation}/.."/>
>
> works smoothly. I'm using MagicDraw exported diagrams.
>
> Philipp
sorry, meant models...
Re: Problems integrating generator into eclipse plugin [message #559128 is a reply to message #559098] Wed, 15 September 2010 16:56 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6388
Registered: July 2009
Senior Member
Hi,

so it fails when invoking via runs as mwe workflow too?

~Christian
Re: Problems integrating generator into eclipse plugin [message #559131 is a reply to message #559128] Wed, 15 September 2010 17:03 Go to previous messageGo to next message
Philipp Zech is currently offline Philipp Zech
Messages: 96
Registered: July 2009
Member
On 09/15/2010 06:56 PM, Christian Dietrich wrote:
> Hi,
>
> so it fails when invoking via runs as mwe workflow too?
>
> ~Christian
hi,

yep, it does.

Philipp
Re: Problems integrating generator into eclipse plugin [message #559139 is a reply to message #559131] Wed, 15 September 2010 17:59 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6388
Registered: July 2009
Senior Member
And what is the error message you get?
Re: Problems integrating generator into eclipse plugin [message #559143 is a reply to message #559139] Wed, 15 September 2010 18:14 Go to previous messageGo to next message
Philipp Zech is currently offline Philipp Zech
Messages: 96
Registered: July 2009
Member
On 09/15/2010 07:59 PM, Christian Dietrich wrote:
> And what is the error message you get?

[ERROR]: Error creating instance of type
'org.eclipse.xtend.typesystem.uml2.Setup' :
java.lang.IllegalStateException: Missing required plugin
'org.eclipse.uml2.uml.resources' in classpath.(Element: bean bean
class='org.eclipse.xtend.typesystem.uml2.Setup' in
info/teststories/generator/workflow/workflow.mwe:6; Reported by: -UNKNOWN-)

however, the plugin is on the classpath
Re: Problems integrating generator into eclipse plugin [message #559149 is a reply to message #559143] Wed, 15 September 2010 18:59 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6388
Registered: July 2009
Senior Member
Hi,

i get this on windows too
i solved it by creating following fragment
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Fragment
Bundle-SymbolicName: org.eclipse.uml2.uml.resources.fragment
Bundle-Version: 1.0.0.qualifier
Fragment-Host: org.eclipse.uml2.uml.resources;bundle-version="3.1.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Export-Package: metamodels



~Christian

Re: Problems integrating generator into eclipse plugin [message #559152 is a reply to message #559149] Wed, 15 September 2010 19:19 Go to previous messageGo to next message
Philipp Zech is currently offline Philipp Zech
Messages: 96
Registered: July 2009
Member
On 09/15/2010 08:59 PM, Christian Dietrich wrote:
> Export-Package: metamodels
Hi,

thanks, this also worked for me. However, it still only works in an
instance. As soon as I try to use the exported plugin (with the fragment
exported too) I still get no output nor any error messages. Everything
is packed properly, the workflow seems to be at the correct location,
but nothing happens.

Philipp
Re: Problems integrating generator into eclipse plugin [message #559155 is a reply to message #559152] Wed, 15 September 2010 19:24 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6388
Registered: July 2009
Senior Member
hi,

i ususally add a feature - add there the plugins - and set for the workflow plugin unpack = true
<?xml version="1.0" encoding="UTF-8"?>
<feature
      id="test.feature"
      label="Feature"
      version="1.0.0.qualifier">

   <description url="http://www.example.com/description">
      [Enter Feature Description here.]
   </description>

   <copyright url="http://www.example.com/copyright">
      [Enter Copyright Description here.]
   </copyright>

   <license url="http://www.example.com/license">
      [Enter License Description here.]
   </license>

   <requires>
      <import plugin="org.eclipse.ui"/>
      <import plugin="org.eclipse.core.runtime"/>
      <import plugin="org.eclipse.emf.mwe.core" version="1.0.0" match="greaterOrEqual"/>
      <import plugin="org.eclipse.xpand" version="1.0.1" match="greaterOrEqual"/>
      <import plugin="org.eclipse.xtend" version="1.0.1" match="greaterOrEqual"/>
      <import plugin="org.antlr.runtime" version="3.0.0" match="greaterOrEqual"/>
      <import plugin="org.eclipse.core.resources" version="3.6.0" match="greaterOrEqual"/>
      <import plugin="org.eclipse.xtend.typesystem.uml2" version="1.0.1" match="greaterOrEqual"/>
      <import plugin="org.eclipse.xtend.typesystem.emf" version="1.0.1" match="greaterOrEqual"/>
      <import plugin="org.eclipse.emf.mwe.utils" version="1.0.0" match="greaterOrEqual"/>
      <import plugin="org.apache.commons.logging" version="1.1.1" match="greaterOrEqual"/>
      <import plugin="org.eclipse.emf.mwe.activities" version="1.0.0" match="greaterOrEqual"/>
      <import plugin="org.eclipse.uml2.uml.resources" version="3.1.0" match="greaterOrEqual"/>
   </requires>

   <plugin
         id="dummy"
         download-size="0"
         install-size="0"
         version="0.0.0"/>

   <plugin
         id="org.eclipse.uml2.uml.resources.fragment"
         download-size="0"
         install-size="0"
         version="0.0.0"
         fragment="true"
         unpack="false"/>

</feature>



~Christian
Re: Problems integrating generator into eclipse plugin [message #559162 is a reply to message #559155] Wed, 15 September 2010 19:40 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6388
Registered: July 2009
Senior Member
hi,

I uploaded my exported stuff here: http://drop.io/k50vvfh
note: you may have to refresh yourself - this is missing in my action

~Christian
Re: Problems integrating generator into eclipse plugin [message #559165 is a reply to message #559155] Wed, 15 September 2010 19:48 Go to previous messageGo to next message
Philipp Zech is currently offline Philipp Zech
Messages: 96
Registered: July 2009
Member
On 09/15/2010 09:24 PM, Christian Dietrich wrote:
> hi,
>
> i ususally add a feature - add there the plugins - and set for the
> workflow plugin unpack = true
>
> <?xml version="1.0" encoding="UTF-8"?>
> <feature
> id="test.feature"
> label="Feature"
> version="1.0.0.qualifier">
>
> <description url="http://www.example.com/description">
> [Enter Feature Description here.]
> </description>
>
> <copyright url="http://www.example.com/copyright">
> [Enter Copyright Description here.]
> </copyright>
>
> <license url="http://www.example.com/license">
> [Enter License Description here.]
> </license>
>
> <requires>
> <import plugin="org.eclipse.ui"/>
> <import plugin="org.eclipse.core.runtime"/>
> <import plugin="org.eclipse.emf.mwe.core" version="1.0.0"
> match="greaterOrEqual"/>
> <import plugin="org.eclipse.xpand" version="1.0.1" match="greaterOrEqual"/>
> <import plugin="org.eclipse.xtend" version="1.0.1" match="greaterOrEqual"/>
> <import plugin="org.antlr.runtime" version="3.0.0" match="greaterOrEqual"/>
> <import plugin="org.eclipse.core.resources" version="3.6.0"
> match="greaterOrEqual"/>
> <import plugin="org.eclipse.xtend.typesystem.uml2" version="1.0.1"
> match="greaterOrEqual"/>
> <import plugin="org.eclipse.xtend.typesystem.emf" version="1.0.1"
> match="greaterOrEqual"/>
> <import plugin="org.eclipse.emf.mwe.utils" version="1.0.0"
> match="greaterOrEqual"/>
> <import plugin="org.apache.commons.logging" version="1.1.1"
> match="greaterOrEqual"/>
> <import plugin="org.eclipse.emf.mwe.activities" version="1.0.0"
> match="greaterOrEqual"/>
> <import plugin="org.eclipse.uml2.uml.resources" version="3.1.0"
> match="greaterOrEqual"/>
> </requires>
>
> <plugin
> id="dummy"
> download-size="0"
> install-size="0"
> version="0.0.0"/>
>
> <plugin
> id="org.eclipse.uml2.uml.resources.fragment"
> download-size="0"
> install-size="0"
> version="0.0.0"
> fragment="true"
> unpack="false"/>
>
> </feature>
>
>
>
> ~Christian
Hi,

well, if this is the only way, ok. But it's quite strange as with oAW4
and Eclipse Galileo it all worked seamlessly with just exporting the
plugin and restarting eclipse. But I'll try it to way you suggest it.

Thanks,

Philipp
Re: Problems integrating generator into eclipse plugin [message #559166 is a reply to message #559162] Wed, 15 September 2010 19:49 Go to previous messageGo to next message
Philipp Zech is currently offline Philipp Zech
Messages: 96
Registered: July 2009
Member
On 09/15/2010 09:40 PM, Christian Dietrich wrote:
> hi,
>
> I uploaded my exported stuff here: http://drop.io/k50vvfh
> note: you may have to refresh yourself - this is missing in my action
>
> ~Christian
thanks for uploading!
Re: Problems integrating generator into eclipse plugin [message #559174 is a reply to message #559166] Wed, 15 September 2010 20:11 Go to previous messageGo to previous message
Philipp Zech is currently offline Philipp Zech
Messages: 96
Registered: July 2009
Member
On 09/15/2010 09:49 PM, Philipp Zech wrote:
> On 09/15/2010 09:40 PM, Christian Dietrich wrote:
>> hi,
>>
>> I uploaded my exported stuff here: http://drop.io/k50vvfh
>> note: you may have to refresh yourself - this is missing in my action
>>
>> ~Christian
> thanks for uploading!

Hi,

hm, I'm getting kinde really depressed, also with the feature
workaround, i don't get any generated files.

Philipp
Previous Topic:[MWE] No logging and strange errors when workflow is run in a context of a plugin
Next Topic:[Acceleo 3l] Generate plugin
Goto Forum:
  


Current Time: Sat Oct 25 21:21:05 GMT 2014

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

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