Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Tabbed properties view of papyrus(Tabbed properties view of papyrus)
Tabbed properties view of papyrus [message #782458] Mon, 23 January 2012 18:44 Go to next message
M E is currently offline M EFriend
Messages: 3
Registered: January 2012
Junior Member
Hello all,
in my editor I would like to use the tabbed properties view of papyrus. 
I looked at the implementation of the plug-ins (org.eclipse.papyrus.properties.*), but I didn't understand how the tabbed properties views will be used in the papyrus diagrams. That's why I don't know how I can use the tabbed properties view in my editor.
Can you help me please and give a few tips how I can integrate the tabbed properties view in an own editor.

Thanks and regards,
ME
Re: Tabbed properties view of papyrus [message #782681 is a reply to message #782458] Tue, 24 January 2012 08:16 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 511
Registered: February 2011
Senior Member
Hello,

The Tabbed Property View can be activated for an Editor through the org.eclipse.ui.views.properties.tabbed.propertyContributor extension.

Use org.eclipse.papyrus.views.properties.xwt.XWTTabDescriptorProvider as the tabDescriptorProvider, and specify a contributorID.

Your Editor needs to implement org.eclipse.ui.views.properties.tabbed.ITabbedPropertySheetPageContributor, and the method getContributorId() should return the contributorID you've specified in your extension.

That's it for activating the papyrus customizable property view.

Then, you'll have to register your own property view configurations (Or rely on the existing ones if you're using UML objects), through the org.eclipse.papyrus.properties.context extension point.


Camille Letavernier
Papyrus developer
Re: Tabbed properties view of papyrus [message #783290 is a reply to message #782681] Wed, 25 January 2012 12:44 Go to previous messageGo to next message
M E is currently offline M EFriend
Messages: 3
Registered: January 2012
Junior Member
Hello Camille,

Thank you very much for you fast answer. Your tips were very helpful for me. I was successful in the first three points but I have problems whit the registry property configuration. In my editor there are UML objects and I tried to use the existing context models (UML.ctx and UMLNotation.ctx) in the extension point org.eclipse.papyrus.properties.context. While running the Eclipse Application the following error occurs:
!ENTRY org.eclipse.papyrus.properties 4 0 2012-01-25 13:30:35.618
!MESSAGE The constraint URI cannot be resolved. Constraint : isLabel. org.eclipse.papyrus.properties.environment.impl.ConstraintTypeImpl@1c012fa (eProxyURI: ppe:/environment/org.eclipse.papyrus.properties.notation/model/Environment.xmi#//@constraintTypes.1)

!ENTRY org.eclipse.papyrus.properties 4 0 2012-01-25 13:30:35.618
!MESSAGE The constraint URI cannot be resolved. Constraint : isEditPart. org.eclipse.papyrus.properties.environment.impl.ConstraintTypeImpl@41143e (eProxyURI: ppe:/environment/org.eclipse.papyrus.properties.notation/model/Environment.xmi#//@constraintTypes.2)

!ENTRY org.eclipse.papyrus.properties 4 0 2012-01-25 13:30:35.618
!MESSAGE The constraint URI cannot be resolved. Constraint : isEditPart. org.eclipse.papyrus.properties.environment.impl.ConstraintTypeImpl@6ffeb (eProxyURI: ppe:/environment/org.eclipse.papyrus.properties.notation/model/Environment.xmi#//@constraintTypes.2)

!ENTRY org.eclipse.ui.workbench 4 0 2012-01-25 13:30:35.744
!MESSAGE Unable to create view ID org.eclipse.ui.views.PropertySheet: An unexpected exception was thrown.
!STACK 0
java.lang.NullPointerException
	at org.eclipse.papyrus.properties.constraints.CompoundConstraint.match(CompoundConstraint.java:41)
	at org.eclipse.papyrus.properties.runtime.DefaultConstraintEngine.match(DefaultConstraintEngine.java:82)
	at org.eclipse.papyrus.properties.runtime.DefaultConstraintEngine.getViews(DefaultConstraintEngine.java:65)
	at org.eclipse.papyrus.properties.xwt.XWTTabDescriptorProvider.getTabDescriptors(XWTTabDescriptorProvider.java:101)
	at org.eclipse.ui.internal.views.properties.tabbed.view.TabbedPropertyRegistry.getTabDescriptors(TabbedPropertyRegistry.java:287)
	at org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage.setInput(TabbedPropertySheetPage.java:718)
	at org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage.selectionChanged(TabbedPropertySheetPage.java:555)
	at org.eclipse.ui.views.properties.PropertySheet.partActivated(PropertySheet.java:336)
	at org.eclipse.ui.part.PageBookView.showBootstrapPart(PageBookView.java:920)
	at org.eclipse.ui.part.PageBookView.createPartControl(PageBookView.java:491)
	at org.eclipse.ui.views.properties.PropertySheet.createPartControl(PropertySheet.java:157)
	at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:375)
	at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:229)
	at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
	at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:313)
	at org.eclipse.ui.internal.ViewPane.setVisible(ViewPane.java:534)
	at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180)
	at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270)
	at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
	at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473)
	at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1245)
	at org.eclipse.ui.internal.PartStack.createControl(PartStack.java:662)
	at org.eclipse.ui.internal.PartStack.createControl(PartStack.java:570)
	at org.eclipse.ui.internal.PartSashContainer.createControl(PartSashContainer.java:568)
	at org.eclipse.ui.internal.PerspectiveHelper.activate(PerspectiveHelper.java:272)
	at org.eclipse.ui.internal.Perspective.onActivate(Perspective.java:981)
	at org.eclipse.ui.internal.WorkbenchPage.onActivate(WorkbenchPage.java:2714)
	at org.eclipse.ui.internal.WorkbenchWindow$27.run(WorkbenchWindow.java:3023)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.WorkbenchWindow.setActivePage(WorkbenchWindow.java:3004)
	at org.eclipse.ui.internal.WorkbenchWindow$20.runWithException(WorkbenchWindow.java:2290)
	at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4140)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3757)
	at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:803)
	at org.eclipse.ui.internal.Workbench$33.runWithException(Workbench.java:1595)
	at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4140)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3757)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
	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:344)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)


Can you please tell me how to solve this problem.

Thanks and regards,
ME
Re: Tabbed properties view of papyrus [message #783308 is a reply to message #783290] Wed, 25 January 2012 13:28 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 511
Registered: February 2011
Senior Member
Hello,

There seem to be two different problems here :

- There's a dependency (At the model level) between UMLNotation.ctx (From properties.uml) and environment.xmi (From properties.notation). You probably miss the oep.properties.notation plug-in.
- The CompoundConstraint should not crash when the first problem occurs. The constraint should simply be ignored. This is a bug in Papyrus. I will fix it for 0.8.2.

Theoretically, you shouldn't have to register UML.ctx and UMLNotation.ctx, as they are already provided by oep.properties.uml and oep.properties.notation. If you depend on these two plug-ins, the property view should work just fine for UML Elements.


Camille


Camille Letavernier
Papyrus developer
Re: Tabbed properties view of papyrus [message #783442 is a reply to message #783308] Wed, 25 January 2012 18:14 Go to previous message
M E is currently offline M EFriend
Messages: 3
Registered: January 2012
Junior Member
Camille, Thank you very very very much!!!!! It works!
Previous Topic:what library can i import <<Table>> or <<Column>&am
Next Topic:how to apply a custom value (or stereotype?) to a property of another profile stereotype?
Goto Forum:
  


Current Time: Tue Dec 23 05:25:43 GMT 2014

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

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