Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 352580 - Facets are loaded to late
Summary: Facets are loaded to late
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EMF-Facet (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P1 normal (vote)
Target Milestone: ---   Edit
Assignee: Gregoire Dupe CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 351917
  Show dependency tree
 
Reported: 2011-07-20 10:01 EDT by Vincent Lorenzo CLA
Modified: 2020-05-01 11:26 EDT (History)
2 users (show)

See Also:
gdupe: indigo+
Ed.Merks: pmc_approved+


Attachments
This patch corrects the bug : we load the facets earlier to avoid error in Papyrus Table (1.22 KB, patch)
2011-07-20 10:03 EDT, Vincent Lorenzo CLA
no flags Details | Diff
This patch corrects the bug : we load the facets earlier to avoid error in Papyrus Table (1.32 KB, patch)
2011-08-29 09:04 EDT, Vincent Lorenzo CLA
gdupe: iplog+
vincent.lorenzo: review+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Lorenzo CLA 2011-07-20 10:01:13 EDT
In Papyrus we get the following problem when the tables use Facets : for the first opened table, the Facet are not loaded, also we get the following exception, because the celleditor is not found. The solution consists into call FacetSetCatalog.getSingleton(); in Nattablewidget.init().

java.lang.NullPointerException
	at org.eclipse.emf.ecore.util.EcoreUtil.getURI(EcoreUtil.java:2913)
	at org.eclipse.emf.facet.widgets.nattable.internal.NatTableWidget.registerCellEditorForColumn(NatTableWidget.java:1029)
	at org.eclipse.emf.facet.widgets.nattable.internal.NatTableWidget.access$11(NatTableWidget.java:1000)
	at org.eclipse.emf.facet.widgets.nattable.internal.NatTableWidget$6.configureRegistry(NatTableWidget.java:985)
	at net.sourceforge.nattable.NatTable.configure(NatTable.java:372)
	at org.eclipse.emf.facet.widgets.nattable.internal.NatTableWidget.setInput(NatTableWidget.java:450)
	at org.eclipse.emf.facet.widgets.nattable.internal.NatTableWidget.init(NatTableWidget.java:367)
	at org.eclipse.emf.facet.widgets.nattable.internal.NatTableWidget.<init>(NatTableWidget.java:353)
	at org.eclipse.papyrus.table.common.internal.PapyrusNatTableWidget.<init>(PapyrusNatTableWidget.java:78)
	at org.eclipse.papyrus.table.common.internal.NatTableEditor.createNattableWidget(NatTableEditor.java:228)
	at org.eclipse.papyrus.table.common.internal.NatTableEditor.createPartControl(NatTableEditor.java:217)
	at org.eclipse.papyrus.sasheditor.internal.EditorPart.createEditorPartControl(EditorPart.java:263)
	at org.eclipse.papyrus.sasheditor.internal.EditorPart.createPartControl(EditorPart.java:169)
	at org.eclipse.papyrus.sasheditor.internal.TabFolderPart.createChildPart(TabFolderPart.java:917)
	at org.eclipse.papyrus.sasheditor.internal.TabFolderPart.createTabItem(TabFolderPart.java:842)
	at org.eclipse.papyrus.sasheditor.internal.TabFolderPart.synchronize2(TabFolderPart.java:757)
	at org.eclipse.papyrus.sasheditor.internal.RootPart.synchronize2(RootPart.java:139)
	at org.eclipse.papyrus.sasheditor.internal.SashWindowsContainer.refreshTabsInternal(SashWindowsContainer.java:431)
	at org.eclipse.papyrus.sasheditor.internal.SashWindowsContainer.refreshTabs(SashWindowsContainer.java:384)
	at org.eclipse.papyrus.sasheditor.internal.SashWindowsContainer.createPartControl(SashWindowsContainer.java:173)
	at org.eclipse.papyrus.sasheditor.editor.AbstractMultiPageSashEditor.createPartControl(AbstractMultiPageSashEditor.java:130)
	at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:670)
	at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
	at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
	at org.eclipse.ui.internal.EditorAreaHelper.setVisibleEditor(EditorAreaHelper.java:271)
	at org.eclipse.ui.internal.EditorManager.setVisibleEditor(EditorManager.java:1459)
	at org.eclipse.ui.internal.EditorManager$5.runWithException(EditorManager.java:972)
	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)
Comment 1 Vincent Lorenzo CLA 2011-07-20 10:03:02 EDT
Created attachment 200005 [details]
This patch corrects the bug : we load the facets earlier to avoid error in Papyrus Table

(1) I, Vincent Lorenzo, wrote 100% of the code I've provided.
(2) This code contains no cryptography
(3) I have the right to contribute the code to Eclipse.
(4) I contribute the content under the EPL.
Comment 2 Gregoire Dupe CLA 2011-07-20 10:55:39 EDT
This bug should be fixed in 0.1.1.
Comment 3 Vincent Lorenzo CLA 2011-08-29 09:04:23 EDT
Created attachment 202314 [details]
This patch corrects the bug : we load the facets earlier to avoid error in Papyrus Table

(1) I, Vincent Lorenzo, wrote 100% of the code I've provided.
(2) This code contains no cryptography
(3) I have the right to contribute the code to Eclipse.
(4) I contribute the content under the EPL.
Comment 4 Gregoire Dupe CLA 2011-08-29 10:40:19 EDT
Comment on attachment 202314 [details]
This patch corrects the bug : we load the facets earlier to avoid error in Papyrus Table

I've checked this patch. It looks right and does not break the unit tests.

Regards,
Grégoire
Comment 5 Gregoire Dupe CLA 2011-08-29 10:43:58 EDT
Hello Ed,

This bug can be fixed by the attached patch (2 lines) and is blocking a Papyrus bug. Do you agree to commit this patch before SR1 RC2 ?

Regards,
Grégoire
Comment 6 Gregoire Dupe CLA 2011-08-29 12:45:56 EDT
Comment on attachment 202314 [details]
This patch corrects the bug : we load the facets earlier to avoid error in Papyrus Table

Here is a patch smaller than 250 lines. I've committed this patch in the trunk.

Committed revision 796.
Comment 7 Gregoire Dupe CLA 2011-08-29 12:54:46 EDT
Comment on attachment 202314 [details]
This patch corrects the bug : we load the facets earlier to avoid error in Papyrus Table

I've committed this patch on the branch 0_1.

Committed revision 797.
Comment 8 Gregoire Dupe CLA 2011-08-29 12:55:37 EDT
This bug can be marked has resolved.
Comment 9 Vincent Lorenzo CLA 2012-05-10 07:38:45 EDT
This bug can be marked as closed.
Comment 10 Gregoire Dupe CLA 2012-05-23 06:37:53 EDT
(In reply to comment #9)
> This bug can be marked as closed.

So I close this bug.