Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » C++ Reverse Engineering
C++ Reverse Engineering [message #1769992] Mon, 07 August 2017 10:55 Go to next message
Tobias Hürmann is currently offline Tobias HürmannFriend
Messages: 3
Registered: August 2017
Junior Member
Hi.
I recently tested the C++ reverse engineering functionality of papyrus / papyrus designer and noticed a strange thing.

Setup:
Ubuntu 14.04

- Clean Eclipse Oxygen CDT platform
- Papyrus 3 ; Update-Site: http://download.eclipse.org/modeling/mdt/papyrus/updates/releases/oxygen
- Papyrus C++ Profile; Update-Site: http://download.eclipse.org/modeling/mdt/papyrus/components/designer/

Also tested it with Neon platform and papyrus 2 resulting in the same issue...


Problem:
After setting up a C++ project and creating one "TestClass" with primitive member-variables i created a papyrus model over the menu-entry "Reverse->To new UML model".
The "Model Explorer" and "Property" view show up the members as expected. The latter as "Owned attribute". If i put the Class-Model in a diagram i could select the attributes to show up ("Right-click TestClass->Filters->Show/Hide Contents). But the attributes created in the code are not in the list of "Select element to show". Only attributes i additionally added with the editor are available. If i copy an reverse-engineered attribute and paste it it is also selectable.

Reverse-engineered operations do the trick and are visible.

Just wanted to mention. Maybe there is an option to activate?

Regards
Tobi
Re: C++ Reverse Engineering [message #1771172 is a reply to message #1769992] Tue, 22 August 2017 15:42 Go to previous messageGo to next message
Ansgar Radermacher is currently offline Ansgar RadermacherFriend
Messages: 137
Registered: March 2011
Location: Paris Saclay, France
Senior Member
Do you use a nightly Papyrus? (update site: http://download.eclipse.org/modeling/mdt/papyrus/updates/nightly/oxygen)

Properties created by reverse engineering belong to an association. The bug 512760 caused that these properties don't show up in the attribute list. As the bug has been fixed, it should now be possible to show attributes from reverse-engineering, both for oxygen and neon. Can you please re-try with a nightly build? (of course, unless you are already using one - which seems unlikely, as I can't reproduce the issue on my machine).
Re: C++ Reverse Engineering [message #1771525 is a reply to message #1771172] Sat, 26 August 2017 16:46 Go to previous messageGo to next message
Tobias Hürmann is currently offline Tobias HürmannFriend
Messages: 3
Registered: August 2017
Junior Member
I was not using the oxygen-nightlies. With the nightly-build it works like a charm.

Thank you :)
Re: C++ Reverse Engineering [message #1771703 is a reply to message #1771525] Tue, 29 August 2017 16:28 Go to previous messageGo to next message
Tobias Hürmann is currently offline Tobias HürmannFriend
Messages: 3
Registered: August 2017
Junior Member
I currently facing the problem with the current nightlies: The reverse-engineering works but i am not able to create a new model with a class-diagram. Eclipse reported the following:

REPORT

anonymousId 1e158d66-173f-4bb2-a820-a1f94c391e1c
name
email
comment
eclipseBuildId 4.7.0.I20170612-0950
eclipseProduct org.eclipse.epp.package.cpp.product
javaRuntimeVersion 1.8.0_131-b11
osgiWs gtk
osgiOs Linux
osgiOsVersion 4.4.0
osgiArch x86_64
severity UNKNOWN


STATUS

pluginId org.eclipse.ui
pluginVersion 3.109.0.v20170411-1742
code 0
severity 4
message Unhandled event loop exception
fingerprint a3ccc82ee5ca4a209ed789ff7d23d3c1

Exception:java.lang.NullPointerException: null
at org.eclipse.papyrus.infra.internationalization.modelresource.InternationalizationModelResource.createModel(InternationalizationModelResource.java:466)
at org.eclipse.papyrus.infra.core.resource.ModelSet.createModels(ModelSet.java:471)
at org.eclipse.papyrus.uml.diagram.wizards.command.NewPapyrusModelCommand.doExecute(NewPapyrusModelCommand.java:52)
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:488)
at org.eclipse.papyrus.infra.emf.gmf.command.CheckedOperationHistory.doExecute(CheckedOperationHistory.java:206)
at org.eclipse.papyrus.infra.emf.gmf.command.CheckedOperationHistory.execute(CheckedOperationHistory.java:195)
at org.eclipse.papyrus.infra.emf.gmf.command.NotifyingWorkspaceCommandStack.doExecute(NotifyingWorkspaceCommandStack.java:264)
at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:165)
at org.eclipse.emf.transaction.impl.AbstractTransactionalCommandStack.execute(AbstractTransactionalCommandStack.java:219)
at org.eclipse.papyrus.infra.emf.gmf.command.NestingNotifyingWorkspaceCommandStack.execute(NestingNotifyingWorkspaceCommandStack.java:130)
at org.eclipse.papyrus.uml.diagram.wizards.wizards.CreateModelWizard.createPapyrusModels(CreateModelWizard.java:645)
at org.eclipse.papyrus.uml.diagram.wizards.wizards.InitModelWizard.createPapyrusModels(InitModelWizard.java:165)
at org.eclipse.papyrus.uml.diagram.wizards.wizards.CreateModelWizard.createAndOpenPapyrusModel(CreateModelWizard.java:320)
at org.eclipse.papyrus.uml.diagram.wizards.wizards.CreateModelWizard.performFinish(CreateModelWizard.java:280)
at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:778)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:417)
at org.eclipse.jface.dialogs.Dialog.lambda$0(Dialog.java:619)
at org.eclipse.swt.events.SelectionListener$1.widgetSelected(SelectionListener.java:81)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:249)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5252)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1348)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4522)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4107)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:818)
at org.eclipse.jface.window.Window.open(Window.java:794)
at org.eclipse.ui.internal.handlers.WizardHandler$New.executeHandler(WizardHandler.java:269)
at org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:290)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:291)
at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:92)
at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-2)
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.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:305)
at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:239)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:152)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:494)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:487)
at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
at org.eclipse.ui.internal.handlers.LegacyHandlerService.executeCommand(LegacyHandlerService.java:390)
at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:151)
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:86)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5252)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1348)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4522)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4107)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1155)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1044)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151)
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(NativeMethodAccessorImpl.java:-2)
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:653)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
at org.eclipse.equinox.launcher.Main.main(Main.java:1472)


BUNDLES

name org.eclipse.core.commands
version 3.9.0.v20170530-1048

name org.eclipse.core.databinding.observable
version 1.6.100.v20170515-1119

name org.eclipse.core.databinding
version 1.6.100.v20170515-1119

name org.eclipse.core.runtime
version 3.13.0.v20170207-1030

name org.eclipse.e4.core.commands
version 0.12.100.v20170513-0428

name org.eclipse.e4.core.contexts
version 1.6.0.v20170322-1144

name org.eclipse.e4.core.di
version 1.6.100.v20170421-1418

name org.eclipse.e4.ui.workbench
version 1.5.0.v20170412-0908

name org.eclipse.e4.ui.workbench.swt
version 0.14.100.v20170519-1601

name org.eclipse.emf.transaction
version 1.9.0.201706061339

name org.eclipse.emf
version 2.6.0.v20170609-0928

name org.eclipse.emf.workspace
version 1.5.1.201706061339

name org.eclipse.equinox.app
version 1.3.400.v20150715-1528

name org.eclipse.equinox.launcher
version 1.4.0.v20161219-1356

name org.eclipse.jface
version 3.13.0.v20170503-1507

name org.eclipse.papyrus.infra.core
version 3.0.0.201708231432

name org.eclipse.papyrus.infra.emf.gmf
version 1.2.100.201708231432

name org.eclipse.papyrus.infra.emf
version 3.0.0.201708231432

name org.eclipse.papyrus.infra.internationalization
version 1.0.0.201708231432

name org.eclipse.papyrus.uml.diagram.wizards
version 3.0.1.201708231432

name org.eclipse.swt
version 3.106.0.v20170608-0516

name org.eclipse.ui
version 3.109.0.v20170411-1742

name org.eclipse.ui.ide.application
version 1.2.0.v20170512-1452

name org.eclipse.ui.ide
version 3.13.0.v20170516-1223


Work-Around: Papyrus-Preferences-> Internationalization -> uncheck "Load internationalization files ..."

[Updated on: Sun, 03 September 2017 00:17]

Report message to a moderator

Re: C++ Reverse Engineering [message #1772200 is a reply to message #1771703] Wed, 06 September 2017 14:29 Go to previous message
Ansgar Radermacher is currently offline Ansgar RadermacherFriend
Messages: 137
Registered: March 2011
Location: Paris Saclay, France
Senior Member
Hi,

thanks for pointing this out. I'll check why internationalisation is not initialized at this point.
Previous Topic:Generating UML Diagram class
Next Topic:Proper steps to import OMG's ISO 80000 package into SysML?
Goto Forum:
  


Current Time: Wed Jun 20 12:06:19 GMT 2018

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

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

Back to the top