Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [DefaultDataProvider] Default file provider - Browse workspace problem
[DefaultDataProvider] Default file provider - Browse workspace problem [message #1727931] Tue, 29 March 2016 14:16 Go to next message
Teohari Simona is currently offline Teohari SimonaFriend
Messages: 40
Registered: September 2015
Member
Hi guys,

I've made a run configuration with ECP 1.8.0 in which I insert the below features and of course my own ECP application plugins (model, edit, editor).

org.eclipse.emf.ecp.demo.e4.feature
org.eclipse.emf.ecp.e4.feature
org.eclipse.emfforms.runtime.feature
org.eclipse.emf.ecp.feature
org.eclipse.emf.ecp.view.categorization.feature
org.eclipse.emf.ecp.view.compoundcontrol.feature
org.eclipse.emf.ecp.view.custom.feature
org.eclipse.emf.ecp.view.group.feature
org.eclipse.emf.ecp.view.horizontal.feature
org.eclipse.emf.ecp.view.label.feature
org.eclipse.emf.ecp.view.rule.feature
org.eclipse.emf.ecp.view.stack.feature
org.eclipse.emf.ecp.view.table.feature
org.eclipse.emf.ecp.view.template.feature
org.eclipse.emf.ecp.view.treemasterdetail.feature
org.eclipse.emf.ecp.view.unset.feature
org.eclipse.emf.ecp.view.validation.feature
org.eclipse.emf.ecp.view.vertical.feature
org.eclipse.emf.ecp.viewmodel.feature
org.eclipse.emf.ecp.workspace.feature

When I run the application, I try to create a project using the file data provider (Eclipse Workspace) by using the "Browse workspace" button. But when I do that, I get an error:

java.lang.IllegalStateException: Workbench has not been created yet.
at org.eclipse.ui.PlatformUI.getWorkbench(PlatformUI.java:93)
at org.eclipse.ui.dialogs.WizardNewFileCreationPage.createControl(WizardNewFileCreationPage.java:244)
at org.eclipse.emf.ecp.workspace.internal.ui.NewXMIFileWizardPage.createControl(NewXMIFileWizardPage.java:58)
at org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.java:175)
at org.eclipse.jface.wizard.WizardDialog.createPageControls(WizardDialog.java:705)
at org.eclipse.jface.wizard.WizardDialog.createContents(WizardDialog.java:597)
at org.eclipse.jface.window.Window.create(Window.java:430)
at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1096)
at org.eclipse.jface.window.Window.open(Window.java:792)
at org.eclipse.emf.ecp.workspace.internal.ui.NewWorkspaceProjectComposite$8.widgetSelected(NewWorkspaceProjectComposite.java:316)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4362)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1113)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4180)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3769)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:827)
at org.eclipse.jface.window.Window.open(Window.java:803)
at org.eclipse.emf.ecp.spi.ui.util.ECPHandlerHelper.createProject(ECPHandlerHelper.java:152)
at org.eclipse.emf.ecp.ui.e4.handlers.NewProjectHandler.execute(NewProjectHandler.java:34)
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.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:252)
at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:234)
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:493)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:486)
at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:799)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.handleWidgetSelection(HandledContributionItem.java:675)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.access$7(HandledContributionItem.java:659)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem$4.handleEvent(HandledContributionItem.java:592)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4362)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1113)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4180)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3769)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:159)
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:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
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:669)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
at org.eclipse.equinox.launcher.Main.main(Main.java:1488)

I must specify that if I want to see the error from NewXMIFileWizardPage class I have a dialog saying "Source not found for org.eclipse.emf.ecp.workspace.internal.ui.NewXMIFileWizardPage ". I believe the org.eclipse.emf.ecp.workspace.internal.ui has the info hidden from all plug-ins.
How can I solve this?

Thank you very much,
S.
Re: [DefaultDataProvider] Default file provider - Browse workspace problem [message #1728049 is a reply to message #1727931] Wed, 30 March 2016 15:20 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Hi,

the Exception says, that the workspace of the Eclipse Application is not
accessible (has not been created, yet). This might be because missing
bundles of the Eclipse Platform, or several other reasons.
If you call org.eclipse.ui.PlatformUI.getWorkbench from any other place,
I think you get the same result. So this is not really related to ECP...
I am sorry, but without a detailed look, I cannot say more about this. I
would try to debug why org.eclipse.ui.PlatformUI.getWorkbench does not
work first and idenpendant of ECP, this should resolve the issue.

Best regards,
Jonas


Am 29.03.2016 um 16:16 schrieb Teohari Simona:
> Hi guys,
>
> I've made a run configuration with ECP 1.8.0 in which I insert the below
> features and of course my own ECP application plugins (model, edit,
> editor).
>
> org.eclipse.emf.ecp.demo.e4.feature
> org.eclipse.emf.ecp.e4.feature
> org.eclipse.emfforms.runtime.feature
> org.eclipse.emf.ecp.feature
> org.eclipse.emf.ecp.view.categorization.feature
> org.eclipse.emf.ecp.view.compoundcontrol.feature
> org.eclipse.emf.ecp.view.custom.feature
> org.eclipse.emf.ecp.view.group.feature
> org.eclipse.emf.ecp.view.horizontal.feature
> org.eclipse.emf.ecp.view.label.feature
> org.eclipse.emf.ecp.view.rule.feature
> org.eclipse.emf.ecp.view.stack.feature
> org.eclipse.emf.ecp.view.table.feature
> org.eclipse.emf.ecp.view.template.feature
> org.eclipse.emf.ecp.view.treemasterdetail.feature
> org.eclipse.emf.ecp.view.unset.feature
> org.eclipse.emf.ecp.view.validation.feature
> org.eclipse.emf.ecp.view.vertical.feature
> org.eclipse.emf.ecp.viewmodel.feature
> org.eclipse.emf.ecp.workspace.feature
>
> When I run the application, I try to create a project using the file
> data provider (Eclipse Workspace) by using the "Browse workspace"
> button. But when I do that, I get an error:
>
> java.lang.IllegalStateException: Workbench has not been created yet.
> at org.eclipse.ui.PlatformUI.getWorkbench(PlatformUI.java:93)
> at
> org.eclipse.ui.dialogs.WizardNewFileCreationPage.createControl(WizardNewFileCreationPage.java:244)
>
> at
> org.eclipse.emf.ecp.workspace.internal.ui.NewXMIFileWizardPage.createControl(NewXMIFileWizardPage.java:58)
>
> at org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.java:175)
> at
> org.eclipse.jface.wizard.WizardDialog.createPageControls(WizardDialog.java:705)
>
> at
> org.eclipse.jface.wizard.WizardDialog.createContents(WizardDialog.java:597)
> at org.eclipse.jface.window.Window.create(Window.java:430)
> at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1096)
> at org.eclipse.jface.window.Window.open(Window.java:792)
> at
> org.eclipse.emf.ecp.workspace.internal.ui.NewWorkspaceProjectComposite$8.widgetSelected(NewWorkspaceProjectComposite.java:316)
>
> at
> org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4362)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1113)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4180)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3769)
> at org.eclipse.jface.window.Window.runEventLoop(Window.java:827)
> at org.eclipse.jface.window.Window.open(Window.java:803)
> at
> org.eclipse.emf.ecp.spi.ui.util.ECPHandlerHelper.createProject(ECPHandlerHelper.java:152)
>
> at
> org.eclipse.emf.ecp.ui.e4.handlers.NewProjectHandler.execute(NewProjectHandler.java:34)
>
> 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.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
>
> at
> org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:252)
>
> at
> org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:234)
> 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:493)
> at
> org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:486)
>
> at
> org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
>
> at
> org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:799)
>
> at
> org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.handleWidgetSelection(HandledContributionItem.java:675)
>
> at
> org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.access$7(HandledContributionItem.java:659)
>
> at
> org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem$4.handleEvent(HandledContributionItem.java:592)
>
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4362)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1113)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4180)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3769)
> at
> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
>
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
>
> at
> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
>
> at
> org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
>
> at
> org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:159)
>
> 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:380)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
>
> 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:669)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1488)
>
> I must specify that if I want to see the error from NewXMIFileWizardPage
> class I have a dialog saying "Source not found for
> org.eclipse.emf.ecp.workspace.internal.ui.NewXMIFileWizardPage ". I
> believe the org.eclipse.emf.ecp.workspace.internal.ui has the info
> hidden from all plug-ins.
> How can I solve this?
>
> Thank you very much,
> S.


--
--

Jonas Helming

Get professional Eclipse developer support:

http://eclipsesource.com/en/services/developer-support/
Re: [DefaultDataProvider] Default file provider - Browse workspace problem [message #1728160 is a reply to message #1727931] Thu, 31 March 2016 12:23 Go to previous messageGo to next message
Teohari Simona is currently offline Teohari SimonaFriend
Messages: 40
Registered: September 2015
Member
Hi Jonas,

Yes, you are right, if I create a new e4 application without ECP and I add this code: org.eclipse.ui.PlatformUI.getWorkbench, I have the error.

But, this is specific to e3, right? I just want to know if it is a problem on my side or maybe some features of the file provider (org.eclipse.emf.ecp.workspace.core + ui) werent completely migrated to e4.


Thank you,
Simona
Re: [DefaultDataProvider] Default file provider - Browse workspace problem [message #1728336 is a reply to message #1728160] Sat, 02 April 2016 08:44 Go to previous message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Hi,

org.eclipse.ui.PlatformUI.getWorkbench ist 3.x API, I am not sure,
whether this works in a pure e4 application. I am not sure, whether the
workspace provider of ECP works well under e4, I have never used it.
Have you tested the call indepedantly of ECP?


Best regards

Jonas



Am 31.03.2016 um 14:23 schrieb Teohari Simona:
> Hi Jonas,
>
> Yes, you are right, if I create a new e4 application without ECP and I
> add this code: org.eclipse.ui.PlatformUI.getWorkbench, I have the error.
>
> But, this is specific to e3, right? I just want to know if it is a
> problem on my side or maybe some features of the file provider
> (org.eclipse.emf.ecp.workspace.core + ui) werent completely migrated to e4.
>
>
> Thank you,
> Simona


--
--

Jonas Helming

Get professional Eclipse developer support:

http://eclipsesource.com/en/services/developer-support/
Previous Topic:[EMF Forms] Ecore Editor e4 support
Next Topic:[EMF Forms] ECPCellEditor Instantiate
Goto Forum:
  


Current Time: Tue Apr 24 01:26:39 GMT 2018

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

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