Bug #10286
closedНаcтройки Mandatory attributes: ERROR:Ref value is where it does not supposed to be
100%
Description
1.У одного из требований делаем атрибут-ссылку на другое требование.
2. Открываем в настройках проекта Mandatory attributes.
3. Нажимаем Find attr. names.
4. Выбираем в списке атрибуто созданный атрибут-ссылку.
Видим, что подставилось значение по умолчанию - идентификатор того узла, на который ссылка идет.
5. Нажимаем стрелочку вправо (<-) и Apply, потом OK.
В Error log возникает ошибка:
eclipse.buildId=4.6.3.M20170301-0400 java.version=1.8.0_242 java.vendor=AdoptOpenJDK BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=ru_RU Framework arguments: -product com.unitesk.requality.product.product -perspective com.unitesk.requality.main.perspective -perspective com.unitesk.requality.main.perspective Command-line arguments: -os win32 -ws win32 -arch x86 -product com.unitesk.requality.product.product -perspective com.unitesk.requality.main.perspective -perspective com.unitesk.requality.main.perspective org.eclipse.e4.ui.workbench Error Fri Apr 17 19:38:04 MSK 2020 ERROR:Ref value is where it does not supposed to be java.lang.RuntimeException: Ref value is where it does not supposed to be at com.unitesk.requality.core.attribute.valueproviders.ReferenceValueProvider.getTypedValue(ReferenceValueProvider.java:162) at com.unitesk.requality.core.attribute.AttributeDefinition.getTValue(AttributeDefinition.java:101) at com.unitesk.requality.core.attribute.Attribute.<init>(Attribute.java:141) at com.unitesk.requality.core.attribute.AttributeDefinition.toAttribute(AttributeDefinition.java:157) at com.unitesk.requality.core.TreeDB.addAttrsRec(TreeDB.java:3037) at com.unitesk.requality.core.attribute.AttributeStorage.commitAttributes(AttributeStorage.java:630) at com.unitesk.requality.core.TreeNode.commitAttributes(TreeNode.java:2574) at com.unitesk.requality.core.operations.mass.SetRequiredAttributes.performAction(SetRequiredAttributes.java:54) at com.unitesk.requality.core.operations.mass.AbstractNodeOperation.execute(AbstractNodeOperation.java:30) at com.unitesk.requality.core.operations.mass.AbstractNodeOperation.execute(AbstractNodeOperation.java:19) at com.unitesk.requality.core.operations.mass.SetRequiredAttributes.execute(SetRequiredAttributes.java:31) at com.unitesk.requality.eclipse.views.projectSettings.ReqAttrsProperties.performOk(ReqAttrsProperties.java:682) at org.eclipse.jface.preference.PreferencePage.performApply(PreferencePage.java:464) at org.eclipse.jface.preference.PreferencePage$2.widgetSelected(PreferencePage.java:294) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:249) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4236) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3824) at org.eclipse.jface.window.Window.runEventLoop(Window.java:818) at org.eclipse.jface.window.Window.open(Window.java:794) at org.eclipse.ui.dialogs.PropertyDialogAction.run(PropertyDialogAction.java:157) at org.eclipse.jface.action.Action.runWithEvent(Action.java:473) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:565) at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:397) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4236) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3824) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) 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:388) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) 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:498) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) at org.eclipse.equinox.launcher.Main.run(Main.java:1519)
Смотрим Properties view для узлов.
В том узле, откуда исходила ссылка, она сохранилась, но помечена звездочкой как обязательный атрибут.
В том узле, куда ссылка вела, и в остальных новый атрибут не возник.
При попытке создания нового требования в Error log возникает сообщение об ошибке, новый узел не появляется и далее если в Requality Explorer вызывать на узлах контекстое меню New, в нем отсутствуют пункты подменю (кроме неактивного Test).
eclipse.buildId=4.6.3.M20170301-0400 java.version=1.8.0_242 java.vendor=AdoptOpenJDK BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=ru_RU Framework arguments: -product com.unitesk.requality.product.product -perspective com.unitesk.requality.main.perspective -perspective com.unitesk.requality.main.perspective Command-line arguments: -os win32 -ws win32 -arch x86 -product com.unitesk.requality.product.product -perspective com.unitesk.requality.main.perspective -perspective com.unitesk.requality.main.perspective org.eclipse.ui Error Fri Apr 17 19:39:12 MSK 2020 Unhandled event loop exception java.lang.RuntimeException: Ref value is where it does not supposed to be at com.unitesk.requality.core.attribute.valueproviders.ReferenceValueProvider.getTypedValue(ReferenceValueProvider.java:162) at com.unitesk.requality.core.attribute.AttributeDefinition.getTValue(AttributeDefinition.java:101) at com.unitesk.requality.core.attribute.Attribute.<init>(Attribute.java:141) at com.unitesk.requality.core.attribute.AttributeDefinition.toAttribute(AttributeDefinition.java:157) at com.unitesk.requality.core.TreeDB.addAttrsRec(TreeDB.java:3037) at com.unitesk.requality.core.attribute.AttributeStorage.commitAttributes(AttributeStorage.java:630) at com.unitesk.requality.core.TreeNode.commitAttributes(TreeNode.java:2574) at com.unitesk.requality.core.TreeNode.addChildUUID(TreeNode.java:254) at com.unitesk.requality.core.TreeNode.addChildUUID(TreeNode.java:235) at com.unitesk.requality.core.TreeDB$5.created(TreeDB.java:2328) at com.unitesk.requality.core.transaction.TransactionStorage.createStorageNode(TransactionStorage.java:245) at com.unitesk.requality.core.storage.AbstractTreeStorage.createNode(AbstractTreeStorage.java:197) at com.unitesk.requality.core.storage.AbstractTreeStorage.createNode(AbstractTreeStorage.java:135) at com.unitesk.requality.core.TreeDB.createChildNode(TreeDB.java:748) at com.unitesk.requality.core.TreeDB.createChildNode(TreeDB.java:724) at com.unitesk.requality.core.TreeNode.createChild(TreeNode.java:1309) at com.unitesk.requality.eclipse.handlers.NewElementHandler.execute(NewElementHandler.java:115) at com.unitesk.requality.eclipse.views.actions.NewTypedTemplatedMenuPoint.runWithEvent(NewTypedTemplatedMenuPoint.java:37) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:565) at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:397) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4236) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3824) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) 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:388) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) 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:498) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) at org.eclipse.equinox.launcher.Main.run(Main.java:1519)