Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Exception when creating a new project
Exception when creating a new project [message #1694769] Thu, 07 May 2015 16:55 Go to next message
Axel Guckelsberger is currently offline Axel GuckelsbergerFriend
Messages: 354
Registered: July 2009
Senior Member
Hey guys,

I am trying to integrate some Sirius editors into a RCP application, similar to how the Arduino Designer does it. However, I am experiencing a problem which seems not easy to solve on the first glance.

When creating a new project it correctly creates the initial semantic model and also a representations file. This aird file contains only one models element without any children though.

Afterwards the following exception is raised:

!ENTRY org.eclipse.jface 4 0 2015-05-07 18:46:58.509
!MESSAGE Unhandled event loop exception during blocked modal context.
!STACK 0


org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.IllegalArgumentException: )
    at org.eclipse.swt.SWT.error(SWT.java:4441)
    at org.eclipse.swt.SWT.error(SWT.java:4356)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:139)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3774)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3412)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.block(ModalContext.java:175)
    at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:390)
    at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:1059)
    ...

Caused by: java.lang.IllegalArgumentException: 
    at org.eclipse.core.runtime.Assert.isLegal(Assert.java:63)
    at org.eclipse.core.runtime.Assert.isLegal(Assert.java:47)
    at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.findElementsRecursive(ModelServiceImpl.java:142)
    at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.findElements(ModelServiceImpl.java:309)
    at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.findElements(ModelServiceImpl.java:295)
    at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.addPart(PartServiceImpl.java:902)
    at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.addPart(PartServiceImpl.java:1104)
    at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:1128)
    at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:3210)
    at org.eclipse.ui.internal.WorkbenchPage.access$23(WorkbenchPage.java:3125)
    at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.java:3107)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3102)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3066)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3047)
    at org.eclipse.sirius.diagram.ui.business.internal.dialect.DiagramDialectUIServices$1.run(DiagramDialectUIServices.java:199)
    at org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:167)
    at org.eclipse.ui.internal.UISynchronizer$3.run(UISynchronizer.java:165)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:136)
    ... 52 more


Any idea what could cause this? Maybe a bundle is missing?

Note I am using org.eclipse.sirius.common.xtext (just in case it is important or relevant here).

Eclipse version: Luna SR2 (4.4.2)
Sirius version: 2.0.5

[Updated on: Thu, 07 May 2015 16:56]

Report message to a moderator

Re: Exception when creating a new project [message #1695426 is a reply to message #1694769] Thu, 14 May 2015 14:12 Go to previous messageGo to next message
Axel Guckelsberger is currently offline Axel GuckelsbergerFriend
Messages: 354
Registered: July 2009
Senior Member
Hi again,

unfortunately I still fail on solving this problem.

Initialisation works fine until the following part of code:

        val representations = DialectManager.INSTANCE.getAllRepresentations(session)
        for (DRepresentation representation : representations) {
            if ('My Diagram'.equals(representation.name)) {
                DialectUIManager.INSTANCE.openEditor(session, representation, new NullProgressMonitor)
            }
        }


The represention is found properly, but afterwards the openEditor method causes the exception shown above.

Any help is appreciated.
Re: Exception when creating a new project [message #1695428 is a reply to message #1695426] Thu, 14 May 2015 15:05 Go to previous messageGo to next message
Axel Guckelsberger is currently offline Axel GuckelsbergerFriend
Messages: 354
Registered: July 2009
Senior Member
More information: I found out that my design bundle (containing the VSM) was not loaded. Thus I tried to remove the lazy bundle activation from this plug-in.

When opening the editor now the following error occurs:

java.lang.NullPointerException
	at org.eclipse.sirius.business.api.dialect.AbstractRepresentationDialectServices.getRepresentations(AbstractRepresentationDialectServices.java:235)
	at org.eclipse.sirius.business.api.dialect.AbstractRepresentationDialectServices.getAllRepresentations(AbstractRepresentationDialectServices.java:131)
	at org.eclipse.sirius.business.internal.dialect.DialectManagerImpl.getAllRepresentations(DialectManagerImpl.java:313)


Re: Exception when creating a new project [message #1695586 is a reply to message #1695428] Sun, 17 May 2015 12:41 Go to previous message
Axel Guckelsberger is currently offline Axel GuckelsbergerFriend
Messages: 354
Registered: July 2009
Senior Member
I found the solution: some dependencies were missing.
Previous Topic:Example of use of OrderedTree
Next Topic:Unable to use my own model, following tutorial example
Goto Forum:
  


Current Time: Sat Apr 20 04:21:35 GMT 2024

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

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

Back to the top