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

archimateView.createViewReference gives Exception #5

Open
enfeet opened this issue Nov 16, 2020 · 0 comments
Open

archimateView.createViewReference gives Exception #5

enfeet opened this issue Nov 16, 2020 · 0 comments

Comments

@enfeet
Copy link

enfeet commented Nov 16, 2020

Hello!
Many, many, many thanks for such great work.
Your plugin is really a 'must have' for Archi users.

Meanwhile I think there is an issue with implementation of archimateView.createViewReference method

Here is a jArchi script code and it work fine:

var MyApp = model.createArchimateView("MyApp");
var archimateView = model.createArchimateView("MyAllApp");

var group = archimateView.createObject("group", 10, 10, 500, 200);

archimateView.createViewReference(MyApp,30, 30, 150, 75);

Here is a same implementation on groovy:

def MyApp = model.createArchimateView("MyApp");
def archimateView = model.createArchimateView("MyAllApp");

def group = archimateView.createObject("group", 10, 10, 500, 200);

archimateView.createViewReference(MyApp,30, 30, 150, 75);

and we got:

Script Error at: javax.script.ScriptException, javax.script.ScriptException: javax.script.ScriptException: groovy.lang.MissingMethodException: No signature of method: com.archimatetool.groovyscripts.dom.model.ArchimateDiagramModelProxy.createViewReference() is applicable for argument types: (com.archimatetool.groovyscripts.dom.model.ArchimateDiagramModelProxy...) values: [archimate-diagram-model: MyApp, 30, 30, 150, 75]

[Documentation link] (https://github.com/archimatetool/archi-scripting-plugin/wiki/jArchi-Object#createviewreference)

In addition it would be nice to have 2 versions of createViewReference
same as for .createobject
https://github.com/archimatetool/archi-scripting-plugin/wiki/jArchi-Object#createobject
second one with 'autoNest' optional boolean parameter. If true the referred view object will be nested inside of any existing diagram object whose bounds surrounds the new object's bounds.
P.S. I also open a feature request on jArchi: archimatetool/archi-scripting-plugin#81

P.P.S. The same error on call group.createViewReference:

def MyApp = model.createArchimateView("MyApp");
def archimateView = model.createArchimateView("MyAllApp");

def group = archimateView.createObject("group", 10, 10, 500, 200);

group.createViewReference(MyApp,30, 30, 150, 75);
Script Error at: javax.script.ScriptException, javax.script.ScriptException: javax.script.ScriptException: groovy.lang.MissingMethodException: No signature of method: com.archimatetool.groovyscripts.dom.model.DiagramModelObjectProxy.createViewReference() is applicable for argument types: (com.archimatetool.groovyscripts.dom.model.ArchimateDiagramModelProxy...) values: [archimate-diagram-model: MyApp, 30, 30, 150, 75]

Thanks in advance.

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