osate / osate2

Open Source AADL2 Tool Environment
http://osate.org
Eclipse Public License 2.0
39 stars 8 forks source link

Exception when Instantiating System with Warning #162

Closed philip-alldredge closed 11 years ago

philip-alldredge commented 11 years ago

An exception occurs when a system implementation is instantiated and OSATE tries to report a warning. The exception occurs if the path of the resulting aaxl2 file contains a space (either due to a directory with a space or the aadl file containing a space).

test case.aadl

package Test
public

system A
end A;

system implementation A.impl
subcomponents
 b1 : system B;
end A.impl;

system B
end B;

end Test;

Exception:

java.lang.IllegalArgumentException: Couldn't find IResource
    at org.osate.aadl2.modelsupport.errorreporting.MarkerAnalysisErrorReporter$Factory.getReporterFor(MarkerAnalysisErrorReporter.java:179)
    at org.osate.aadl2.modelsupport.errorreporting.AnalysisErrorReporterManager.getReporter(AnalysisErrorReporterManager.java:164)
    at org.osate.aadl2.modelsupport.errorreporting.AnalysisErrorReporterManager.warning(AnalysisErrorReporterManager.java:284)
    at org.osate.aadl2.instantiation.InstantiateModel.instantiateSubcomponent(InstantiateModel.java:653)
    at org.osate.aadl2.instantiation.InstantiateModel.instantiateSubcomponents(InstantiateModel.java:574)
    at org.osate.aadl2.instantiation.InstantiateModel.populateComponentInstance(InstantiateModel.java:480)
    at org.osate.aadl2.instantiation.InstantiateModel.fillSystemInstance(InstantiateModel.java:370)
    at org.osate.aadl2.instantiation.InstantiateModel.createSystemInstanceInt(InstantiateModel.java:341)
    at org.osate.aadl2.instantiation.InstantiateModel$1.doExecute(InstantiateModel.java:302)
    at org.eclipse.emf.transaction.RecordingCommand.execute(RecordingCommand.java:135)
    at org.eclipse.emf.workspace.EMFCommandOperation.doExecute(EMFCommandOperation.java:119)
    at org.eclipse.emf.workspace.AbstractEMFOperation.execute(AbstractEMFOperation.java:150)
    at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:513)
    at org.eclipse.emf.workspace.impl.WorkspaceCommandStackImpl.doExecute(WorkspaceCommandStackImpl.java:208)
    at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:165)
    at org.osate.aadl2.instantiation.InstantiateModel.createSystemInstance(InstantiateModel.java:310)
    at org.osate.aadl2.instantiation.InstantiateModel.buildInstanceModelFile(InstantiateModel.java:227)
    at org.osate.xtext.aadl2.ui.handlers.InstantiateHandler$1.exec(InstantiateHandler.java:186)
    at org.osate.xtext.aadl2.ui.handlers.InstantiateHandler$1.exec(InstantiateHandler.java:1)
    at org.eclipse.xtext.util.concurrent.AbstractReadWriteAcces.readOnly(AbstractReadWriteAcces.java:32)
    at org.eclipse.xtext.ui.editor.model.XtextDocument.readOnly(XtextDocument.java:78)
    at org.osate.xtext.aadl2.ui.handlers.InstantiateHandler.execute(InstantiateHandler.java:161)
    at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:290)
    at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:76)
    at sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
    at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:229)
    at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:210)
    at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:131)
    at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:171)
    at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:814)
    at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.handleWidgetSelection(HandledContributionItem.java:707)
    at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.access$7(HandledContributionItem.java:691)
    at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem$4.handleEvent(HandledContributionItem.java:630)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4134)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1458)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1481)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1466)
    at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1271)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3980)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3619)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1029)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:923)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    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(EclipseStarter.java:353)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
juli1 commented 11 years ago

This should be fixed for now. Please reopen if needed.