Creating a new BrowserComponent in 8.0?

In IDEA 8 I tried to create a new browser component like this:

BrowserComponentService bcs = (BrowserComponentService) project.getPicoContainer().getComponentInstanceOfType(BrowserComponentService.class);

bc = bcs.createBrowserComponent(project, this);

This worked fine in v7.0 but in v8.0 I "bcs" is null. Is there a different way to get hold of the BrowserComponentService now?

Best regards
Johan Lund
Bindows Team


8 comments
Comment actions Permalink

I figured out that how the internal browser is created in 8.0 is quite different from 7.0.
According to teamdev's own dev guide I should be doing something like this:


        Xpcom.initialize(Xpcom.AWT);
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                wb = com.teamdev.jxbrowser.WebBrowserFactory.getInstance().createBrowser();
          }
        });


I get a lot of errors from that first line. How can I resolve this?
I include the errors below (Yes, Im on OS X) :

createPeer
java.lang.UnsatisfiedLinkError: createPeer
at com.teamdev.macosx.cocoa.embedded.EmbeddedView.createPeer(Native Method)
at com.teamdev.macosx.cocoa.embedded.EmbeddedView.createNSView(SourceFile:13)
at com.apple.eawt.CocoaComponent.createNSViewLong(CocoaComponent.java:92)
at apple.awt.CToolkit.createCanvas(CToolkit.java:382)
at java.awt.Canvas.addNotify(Canvas.java:74)
at com.teamdev.macosx.cocoa.embedded.AbstractEmbeddedView.addNotify(SourceFile:84)
at java.awt.Container.addNotify(Container.java:2544)
at javax.swing.JComponent.addNotify(JComponent.java:4478)
at java.awt.Container.addNotify(Container.java:2544)
at javax.swing.JComponent.addNotify(JComponent.java:4478)
at java.awt.Container.addNotify(Container.java:2544)
at javax.swing.JComponent.addNotify(JComponent.java:4478)
at javax.swing.JRootPane.addNotify(JRootPane.java:680)
at java.awt.Container.addNotify(Container.java:2544)
at java.awt.Window.addNotify(Window.java:467)
at java.awt.Frame.addNotify(Frame.java:501)
at java.awt.Window.show(Window.java:514)
at java.awt.Component.show(Component.java:1302)
at java.awt.Component.setVisible(Component.java:1255)
at com.teamdev.xpcom.impl.awt.AwtMacPlatform$b.<init>(SourceFile:50)
at com.teamdev.xpcom.impl.awt.AwtMacPlatform$b.a(SourceFile:59)
at com.teamdev.xpcom.impl.awt.AwtMacPlatform.getMessageLoop(SourceFile:113)
at com.teamdev.xpcom.Xpcom.initialize(SourceFile:92)
at com.teamdev.xpcom.Xpcom.initialize(SourceFile:62)
at net.bindows.intellij_plugin.embeddedbrowser.EmbeddedBrowser.init(EmbeddedBrowser.java:77)
at net.bindows.intellij_plugin.embeddedbrowser.EmbeddedBrowser.<init>(EmbeddedBrowser.java:61)
at net.bindows.intellij_plugin.embeddedbrowser.EmbeddedBrowserProjectComponent.createEmbeddedBrowser(EmbeddedBrowserProjectComponent.java:29)
at net.bindows.intellij_plugin.embeddedbrowser.EmbeddedBrowserProjectComponent.getEmbeddedBrowser(EmbeddedBrowserProjectComponent.java:50)
at net.bindows.intellij_plugin.GridPanel2Designer.GridPanel2DesignerProjectComponent.<init>(GridPanel2DesignerProjectComponent.java:29)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at org.picocontainer.defaults.InstantiatingComponentAdapter.newInstance(InstantiatingComponentAdapter.java:193)
at org.picocontainer.defaults.ConstructorInjectionComponentAdapter$1.run(ConstructorInjectionComponentAdapter.java:220)
at org.picocontainer.defaults.ThreadLocalCyclicDependencyGuard.observe(ThreadLocalCyclicDependencyGuard.java:53)
at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getComponentInstance(ConstructorInjectionComponentAdapter.java:248)
at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:60)
at org.picocontainer.defaults.CachingComponentAdapter.getComponentInstance(CachingComponentAdapter.java:58)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter$1.getComponentInstance(ComponentManagerImpl.java:2)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:31)
at com.intellij.util.pico.DefaultPicoContainer.getLocalInstance(DefaultPicoContainer.java:230)
at com.intellij.util.pico.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:217)
at com.intellij.util.pico.DefaultPicoContainer.getComponentInstance(DefaultPicoContainer.java:199)
at org.picocontainer.alternatives.AbstractDelegatingMutablePicoContainer.getComponentInstance(AbstractDelegatingMutablePicoContainer.java:75)
at com.intellij.openapi.components.impl.ComponentManagerImpl.a(ComponentManagerImpl.java:119)
at com.intellij.openapi.components.impl.ComponentManagerImpl.a(ComponentManagerImpl.java:168)
at com.intellij.openapi.components.impl.ComponentManagerImpl.initComponents(ComponentManagerImpl.java:71)
at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:106)
at com.intellij.openapi.project.impl.ProjectImpl.init(ProjectImpl.java:73)
at com.intellij.openapi.project.impl.ProjectManagerImpl.a(ProjectManagerImpl.java:175)
at com.intellij.openapi.project.impl.ProjectManagerImpl.a(ProjectManagerImpl.java:192)
at com.intellij.openapi.project.impl.ProjectManagerImpl.access$200(ProjectManagerImpl.java:180)
at com.intellij.openapi.project.impl.ProjectManagerImpl$4.run(ProjectManagerImpl.java:1)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$3.run(ProgressManagerImpl.java:1)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:3)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$4.run(ProgressManagerImpl.java:1)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:5)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:13)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:101)
at com.intellij.openapi.application.impl.ApplicationImpl$7$1.run(ApplicationImpl.java:11)
at com.intellij.openapi.application.impl.ApplicationImpl$5.run(ApplicationImpl.java:8)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
at java.util.concurrent.FutureTask.run(FutureTask.java:123)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:613)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:2)



java.lang.IllegalStateException: Cannot change platform settings after initialization
at com.teamdev.xpcom.impl.i.setUseSWT(SourceFile:40)
at com.teamdev.xpcom.Xpcom.initialize(SourceFile:90)
at com.teamdev.xpcom.Xpcom.initialize(SourceFile:62)
at net.bindows.intellij_plugin.embeddedbrowser.EmbeddedBrowser.init(EmbeddedBrowser.java:77)
at net.bindows.intellij_plugin.embeddedbrowser.EmbeddedBrowser.<init>(EmbeddedBrowser.java:61)
at net.bindows.intellij_plugin.embeddedbrowser.EmbeddedBrowserProjectComponent.createEmbeddedBrowser(EmbeddedBrowserProjectComponent.java:29)
at net.bindows.intellij_plugin.embeddedbrowser.EmbeddedBrowserProjectComponent.getEmbeddedBrowser(EmbeddedBrowserProjectComponent.java:50)
at net.bindows.intellij_plugin.GridPanel2Designer.GridPanel2DesignerProjectComponent.<init>(GridPanel2DesignerProjectComponent.java:29)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at org.picocontainer.defaults.InstantiatingComponentAdapter.newInstance(InstantiatingComponentAdapter.java:193)
at org.picocontainer.defaults.ConstructorInjectionComponentAdapter$1.run(ConstructorInjectionComponentAdapter.java:220)
at org.picocontainer.defaults.ThreadLocalCyclicDependencyGuard.observe(ThreadLocalCyclicDependencyGuard.java:53)
at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getComponentInstance(ConstructorInjectionComponentAdapter.java:248)
at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:60)
at org.picocontainer.defaults.CachingComponentAdapter.getComponentInstance(CachingComponentAdapter.java:58)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter$1.getComponentInstance(ComponentManagerImpl.java:2)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:31)
at com.intellij.util.pico.DefaultPicoContainer.getLocalInstance(DefaultPicoContainer.java:230)
at com.intellij.util.pico.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:217)
at com.intellij.util.pico.DefaultPicoContainer.getComponentInstance(DefaultPicoContainer.java:199)
at org.picocontainer.alternatives.AbstractDelegatingMutablePicoContainer.getComponentInstance(AbstractDelegatingMutablePicoContainer.java:75)
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponentFromContainer(ComponentManagerImpl.java:155)
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponent(ComponentManagerImpl.java:177)
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponent(ComponentManagerImpl.java:132)
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponents(ComponentManagerImpl.java:63)
at com.intellij.openapi.components.impl.ComponentManagerImpl.initComponents(ComponentManagerImpl.java:157)
at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:106)
at com.intellij.openapi.project.impl.ProjectImpl.init(ProjectImpl.java:73)
at com.intellij.openapi.project.impl.ProjectManagerImpl.a(ProjectManagerImpl.java:175)
at com.intellij.openapi.project.impl.ProjectManagerImpl.a(ProjectManagerImpl.java:192)
at com.intellij.openapi.project.impl.ProjectManagerImpl.access$200(ProjectManagerImpl.java:180)
at com.intellij.openapi.project.impl.ProjectManagerImpl$4.run(ProjectManagerImpl.java:1)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$3.run(ProgressManagerImpl.java:1)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:3)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$4.run(ProgressManagerImpl.java:1)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:5)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:13)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:101)
at com.intellij.openapi.application.impl.ApplicationImpl$7$1.run(ApplicationImpl.java:11)
at com.intellij.openapi.application.impl.ApplicationImpl$5.run(ApplicationImpl.java:8)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
at java.util.concurrent.FutureTask.run(FutureTask.java:123)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:613)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:2)



java.lang.IllegalStateException: Cannot change platform settings after initialization
at com.teamdev.xpcom.impl.i.setUseSWT(SourceFile:40)
at com.teamdev.xpcom.Xpcom.initialize(SourceFile:90)
at com.teamdev.xpcom.Xpcom.initialize(SourceFile:62)
at net.bindows.intellij_plugin.embeddedbrowser.EmbeddedBrowser.init(EmbeddedBrowser.java:77)
at net.bindows.intellij_plugin.embeddedbrowser.EmbeddedBrowser.<init>(EmbeddedBrowser.java:61)
at net.bindows.intellij_plugin.embeddedbrowser.EmbeddedBrowserProjectComponent.createEmbeddedBrowser(EmbeddedBrowserProjectComponent.java:29)
at net.bindows.intellij_plugin.embeddedbrowser.EmbeddedBrowserProjectComponent.getEmbeddedBrowser(EmbeddedBrowserProjectComponent.java:50)
at net.bindows.intellij_plugin.GridPanel2Designer.GridPanel2DesignerProjectComponent.<init>(GridPanel2DesignerProjectComponent.java:29)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at org.picocontainer.defaults.InstantiatingComponentAdapter.newInstance(InstantiatingComponentAdapter.java:193)
at org.picocontainer.defaults.ConstructorInjectionComponentAdapter$1.run(ConstructorInjectionComponentAdapter.java:220)
at org.picocontainer.defaults.ThreadLocalCyclicDependencyGuard.observe(ThreadLocalCyclicDependencyGuard.java:53)
at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getComponentInstance(ConstructorInjectionComponentAdapter.java:248)
at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:60)
at org.picocontainer.defaults.CachingComponentAdapter.getComponentInstance(CachingComponentAdapter.java:58)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter$1.getComponentInstance(ComponentManagerImpl.java:2)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:31)
at com.intellij.util.pico.DefaultPicoContainer.getLocalInstance(DefaultPicoContainer.java:230)
at com.intellij.util.pico.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:217)
at com.intellij.util.pico.DefaultPicoContainer.getComponentInstance(DefaultPicoContainer.java:199)
at org.picocontainer.alternatives.AbstractDelegatingMutablePicoContainer.getComponentInstance(AbstractDelegatingMutablePicoContainer.java:75)
at com.intellij.openapi.components.impl.ComponentManagerImpl.a(ComponentManagerImpl.java:119)
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponentFromContainer(ComponentManagerImpl.java:1)
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponent(ComponentManagerImpl.java:177)
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponent(ComponentManagerImpl.java:132)
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponents(ComponentManagerImpl.java:63)
at com.intellij.openapi.components.impl.ComponentManagerImpl.initComponents(ComponentManagerImpl.java:157)
at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:106)
at com.intellij.openapi.project.impl.ProjectImpl.init(ProjectImpl.java:73)
at com.intellij.openapi.project.impl.ProjectManagerImpl.a(ProjectManagerImpl.java:175)
at com.intellij.openapi.project.impl.ProjectManagerImpl.a(ProjectManagerImpl.java:192)
at com.intellij.openapi.project.impl.ProjectManagerImpl.access$200(ProjectManagerImpl.java:180)
at com.intellij.openapi.project.impl.ProjectManagerImpl$4.run(ProjectManagerImpl.java:1)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$3.run(ProgressManagerImpl.java:1)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:3)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$4.run(ProgressManagerImpl.java:1)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:5)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:13)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:101)
at com.intellij.openapi.application.impl.ApplicationImpl$7$1.run(ApplicationImpl.java:11)
at com.intellij.openapi.application.impl.ApplicationImpl$5.run(ApplicationImpl.java:8)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
at java.util.concurrent.FutureTask.run(FutureTask.java:123)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:613)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:2)



java.lang.IllegalStateException: Cannot change platform settings after initialization
at com.teamdev.xpcom.impl.i.setUseSWT(SourceFile:40)
at com.teamdev.xpcom.Xpcom.initialize(SourceFile:90)
at com.teamdev.xpcom.Xpcom.initialize(SourceFile:62)
at net.bindows.intellij_plugin.embeddedbrowser.EmbeddedBrowser.init(EmbeddedBrowser.java:77)
at net.bindows.intellij_plugin.embeddedbrowser.EmbeddedBrowser.<init>(EmbeddedBrowser.java:61)
at net.bindows.intellij_plugin.embeddedbrowser.EmbeddedBrowserProjectComponent.createEmbeddedBrowser(EmbeddedBrowserProjectComponent.java:29)
at net.bindows.intellij_plugin.embeddedbrowser.EmbeddedBrowserProjectComponent.getEmbeddedBrowser(EmbeddedBrowserProjectComponent.java:50)
at net.bindows.intellij_plugin.GridPanel2Designer.GridPanel2DesignerProjectComponent.<init>(GridPanel2DesignerProjectComponent.java:29)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at org.picocontainer.defaults.InstantiatingComponentAdapter.newInstance(InstantiatingComponentAdapter.java:193)
at org.picocontainer.defaults.ConstructorInjectionComponentAdapter$1.run(ConstructorInjectionComponentAdapter.java:220)
at org.picocontainer.defaults.ThreadLocalCyclicDependencyGuard.observe(ThreadLocalCyclicDependencyGuard.java:53)
at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getComponentInstance(ConstructorInjectionComponentAdapter.java:248)
at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:60)
at org.picocontainer.defaults.CachingComponentAdapter.getComponentInstance(CachingComponentAdapter.java:58)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter$1.getComponentInstance(ComponentManagerImpl.java:2)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:31)
at com.intellij.util.pico.DefaultPicoContainer.getLocalInstance(DefaultPicoContainer.java:230)
at com.intellij.util.pico.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:217)
at com.intellij.util.pico.DefaultPicoContainer.getComponentInstance(DefaultPicoContainer.java:199)
at org.picocontainer.alternatives.AbstractDelegatingMutablePicoContainer.getComponentInstance(AbstractDelegatingMutablePicoContainer.java:75)
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponentFromContainer(ComponentManagerImpl.java:155)
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponent(ComponentManagerImpl.java:177)
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponent(ComponentManagerImpl.java:132)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.getComponentsByType(ComponentManagerImpl.java:32)
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponents(ComponentManagerImpl.java:95)
at com.intellij.openapi.project.impl.ProjectImpl.c(ProjectImpl.java:5)
at com.intellij.openapi.project.impl.ProjectImpl.access$300(ProjectImpl.java:44)
at com.intellij.openapi.project.impl.ProjectImpl$MyProjectManagerListener.projectOpened(ProjectImpl.java:6)
at com.intellij.openapi.project.impl.ProjectManagerImpl$2.projectOpened(ProjectManagerImpl.java:11)
at com.intellij.openapi.project.impl.ProjectManagerImpl.d(ProjectManagerImpl.java:334)
at com.intellij.openapi.project.impl.ProjectManagerImpl.openProject(ProjectManagerImpl.java:238)
at com.intellij.openapi.project.impl.ProjectManagerImpl.loadAndOpenProject(ProjectManagerImpl.java:146)
at com.intellij.openapi.project.impl.ProjectManagerImpl.loadAndOpenProject(ProjectManagerImpl.java:116)
at com.intellij.ide.impl.ProjectUtil.openProject(ProjectUtil.java:53)
at com.intellij.ide.RecentProjectsManager.doOpenProject(RecentProjectsManager.java:5)
at com.intellij.ide.RecentProjectsManagerBase$MyAppLifecycleListener.appStarting(RecentProjectsManagerBase.java:9)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.intellij.util.messages.impl.MessageBusConnectionImpl.deliverMessage(MessageBusConnectionImpl.java:101)
at com.intellij.util.messages.impl.MessageBusImpl.doPumpMessages(MessageBusImpl.java:182)
at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:174)
at com.intellij.util.messages.impl.MessageBusImpl.sendMessage(MessageBusImpl.java:166)
at com.intellij.util.messages.impl.MessageBusImpl.access$000(MessageBusImpl.java:40)
at com.intellij.util.messages.impl.MessageBusImpl$2.invoke(MessageBusImpl.java:106)
at $Proxy34.appStarting(Unknown Source)
at com.intellij.idea.IdeaApplication.b(IdeaApplication.java:48)
at com.intellij.idea.IdeaApplication.access$400(IdeaApplication.java:9)
at com.intellij.idea.IdeaApplication$IdeStarter$3.run(IdeaApplication.java:12)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:27)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at com.intellij.ide.IdeEventQueue.c(IdeEventQueue.java:35)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:99)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:217)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)



java.lang.IllegalStateException: Cannot change platform settings after initialization
at com.teamdev.xpcom.impl.i.setUseSWT(SourceFile:40)
at com.teamdev.xpcom.Xpcom.initialize(SourceFile:90)
at com.teamdev.xpcom.Xpcom.initialize(SourceFile:62)
at net.bindows.intellij_plugin.embeddedbrowser.EmbeddedBrowser.init(EmbeddedBrowser.java:77)
at net.bindows.intellij_plugin.embeddedbrowser.EmbeddedBrowser.<init>(EmbeddedBrowser.java:61)
at net.bindows.intellij_plugin.embeddedbrowser.EmbeddedBrowserProjectComponent.createEmbeddedBrowser(EmbeddedBrowserProjectComponent.java:29)
at net.bindows.intellij_plugin.embeddedbrowser.EmbeddedBrowserProjectComponent.getEmbeddedBrowser(EmbeddedBrowserProjectComponent.java:50)
at net.bindows.intellij_plugin.GridPanel2Designer.GridPanel2DesignerProjectComponent.<init>(GridPanel2DesignerProjectComponent.java:29)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at org.picocontainer.defaults.InstantiatingComponentAdapter.newInstance(InstantiatingComponentAdapter.java:193)
at org.picocontainer.defaults.ConstructorInjectionComponentAdapter$1.run(ConstructorInjectionComponentAdapter.java:220)
at org.picocontainer.defaults.ThreadLocalCyclicDependencyGuard.observe(ThreadLocalCyclicDependencyGuard.java:53)
at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getComponentInstance(ConstructorInjectionComponentAdapter.java:248)
at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:60)
at org.picocontainer.defaults.CachingComponentAdapter.getComponentInstance(CachingComponentAdapter.java:58)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter$1.getComponentInstance(ComponentManagerImpl.java:2)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:31)
at com.intellij.util.pico.DefaultPicoContainer.getLocalInstance(DefaultPicoContainer.java:230)
at com.intellij.util.pico.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:217)
at com.intellij.util.pico.DefaultPicoContainer.getComponentInstance(DefaultPicoContainer.java:199)
at org.picocontainer.alternatives.AbstractDelegatingMutablePicoContainer.getComponentInstance(AbstractDelegatingMutablePicoContainer.java:75)
at com.intellij.openapi.components.impl.ComponentManagerImpl.a(ComponentManagerImpl.java:119)
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponentFromContainer(ComponentManagerImpl.java:1)
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponent(ComponentManagerImpl.java:177)
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponent(ComponentManagerImpl.java:132)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.getComponentsByType(ComponentManagerImpl.java:32)
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponents(ComponentManagerImpl.java:95)
at com.intellij.openapi.project.impl.ProjectImpl.c(ProjectImpl.java:5)
at com.intellij.openapi.project.impl.ProjectImpl.access$300(ProjectImpl.java:44)
at com.intellij.openapi.project.impl.ProjectImpl$MyProjectManagerListener.projectOpened(ProjectImpl.java:6)
at com.intellij.openapi.project.impl.ProjectManagerImpl$2.projectOpened(ProjectManagerImpl.java:11)
at com.intellij.openapi.project.impl.ProjectManagerImpl.d(ProjectManagerImpl.java:334)
at com.intellij.openapi.project.impl.ProjectManagerImpl.openProject(ProjectManagerImpl.java:238)
at com.intellij.openapi.project.impl.ProjectManagerImpl.loadAndOpenProject(ProjectManagerImpl.java:146)
at com.intellij.openapi.project.impl.ProjectManagerImpl.loadAndOpenProject(ProjectManagerImpl.java:116)
at com.intellij.ide.impl.ProjectUtil.openProject(ProjectUtil.java:53)
at com.intellij.ide.RecentProjectsManager.doOpenProject(RecentProjectsManager.java:5)
at com.intellij.ide.RecentProjectsManagerBase$MyAppLifecycleListener.appStarting(RecentProjectsManagerBase.java:9)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.intellij.util.messages.impl.MessageBusConnectionImpl.deliverMessage(MessageBusConnectionImpl.java:101)
at com.intellij.util.messages.impl.MessageBusImpl.doPumpMessages(MessageBusImpl.java:182)
at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:174)
at com.intellij.util.messages.impl.MessageBusImpl.sendMessage(MessageBusImpl.java:166)
at com.intellij.util.messages.impl.MessageBusImpl.access$000(MessageBusImpl.java:40)
at com.intellij.util.messages.impl.MessageBusImpl$2.invoke(MessageBusImpl.java:106)
at $Proxy34.appStarting(Unknown Source)
at com.intellij.idea.IdeaApplication.b(IdeaApplication.java:48)
at com.intellij.idea.IdeaApplication.access$400(IdeaApplication.java:9)
at com.intellij.idea.IdeaApplication$IdeStarter$3.run(IdeaApplication.java:12)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:27)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at com.intellij.ide.IdeEventQueue.c(IdeEventQueue.java:35)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:99)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:217)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)




0
Comment actions Permalink

Not digging very much, but following is more correct way
BrowserComponentService browserService =
HtmlPreviewApplicationComponent.getInstance()

Johan Lund wrote:

I figured out that how the internal browser is created in 8.0 is quite different from 7.0.
According to teamdev's own dev guide I should be doing something like this:


Xpcom.initialize(Xpcom.AWT);
SwingUtilities.invokeLater(new Runnable() {
public void run() {
wb = com.teamdev.jxbrowser.WebBrowserFactory.getInstance().createBrowser();
}
});
I get a lot of errors from that first line. How can I resolve this?I include the errors below (Yes, Im on OS X) : createPeer
java.lang.UnsatisfiedLinkError: createPeer
at com.teamdev.macosx.cocoa.embedded.EmbeddedView.createPeer(Native Method)
at com.teamdev.macosx.cocoa.embedded.EmbeddedView.createNSView(SourceFile:13)
at com.apple.eawt.CocoaComponent.createNSViewLong(CocoaComponent.java:92)
at apple.awt.CToolkit.createCanvas(CToolkit.java:382)
at java.awt.Canvas.addNotify(Canvas.java:74)
at com.teamdev.macosx.cocoa.embedded.AbstractEmbeddedView.addNotify(SourceFile:84)
at java.awt.Container.addNotify(Container.java:2544)
at javax.swing.JComponent.addNotify(JComponent.java:4478)
at java.awt.Container.addNotify(Container.java:2544)
at javax.swing.JComponent.addNotify(JComponent.java:4478)
at java.awt.Container.addNotify(Container.java:2544)
at javax.swing.JComponent.addNotify(JComponent.java:4478)
at javax.swing.JRootPane.addNotify(JRootPane.java:680)
at java.awt.Container.addNotify(Container.java:2544)
at java.awt.Window.addNotify(Window.java:467)
at java.awt.Frame.addNotify(Frame.java:501)
at java.awt.Window.show(Window.java:514)
at java.awt.Component.show(Component.java:1302)
at java.awt.Component.setVisible(Component.java:1255)
at com.teamdev.xpcom.impl.awt.AwtMacPlatform$b.<init>(SourceFile:50)
at com.teamdev.xpcom.impl.awt.AwtMacPlatform$b.a(SourceFile:59)
at com.teamdev.xpcom.impl.awt.AwtMacPlatform.getMessageLoop(SourceFile:113)
at com.teamdev.xpcom.Xpcom.initialize(SourceFile:92)
at com.teamdev.xpcom.Xpcom.initialize(SourceFile:62)
at net.bindows.intellij_plugin.embeddedbrowser.EmbeddedBrowser.init(EmbeddedBrowser.java:77)
at net.bindows.intellij_plugin.embeddedbrowser.EmbeddedBrowser.<init>(EmbeddedBrowser.java:61)
at net.bindows.intellij_plugin.embeddedbrowser.EmbeddedBrowserProjectComponent.createEmbeddedBrowser(EmbeddedBrowserProjectComponent.java:29)
at net.bindows.intellij_plugin.embeddedbrowser.EmbeddedBrowserProjectComponent.getEmbeddedBrowser(EmbeddedBrowserProjectComponent.java:50)
at net.bindows.intellij_plugin.GridPanel2Designer.GridPanel2DesignerProjectComponent.<init>(GridPanel2DesignerProjectComponent.java:29)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at org.picocontainer.defaults.InstantiatingComponentAdapter.newInstance(InstantiatingComponentAdapter.java:193)
at org.picocontainer.defaults.ConstructorInjectionComponentAdapter$1.run(ConstructorInjectionComponentAdapter.java:220)
at org.picocontainer.defaults.ThreadLocalCyclicDependencyGuard.observe(ThreadLocalCyclicDependencyGuard.java:53)
at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getComponentInstance(ConstructorInjectionComponentAdapter.java:248)
at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:60)
at org.picocontainer.defaults.CachingComponentAdapter.getComponentInstance(CachingComponentAdapter.java:58)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter$1.getComponentInstance(ComponentManagerImpl.java:2)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:31)
at com.intellij.util.pico.DefaultPicoContainer.getLocalInstance(DefaultPicoContainer.java:230)
at com.intellij.util.pico.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:217)
at com.intellij.util.pico.DefaultPicoContainer.getComponentInstance(DefaultPicoContainer.java:199)
at org.picocontainer.alternatives.AbstractDelegatingMutablePicoContainer.getComponentInstance(AbstractDelegatingMutablePicoContainer.java:75)
at com.intellij.openapi.components.impl.ComponentManagerImpl.a(ComponentManagerImpl.java:119)
at com.intellij.openapi.components.impl.ComponentManagerImpl.a(ComponentManagerImpl.java:168)
at com.intellij.openapi.components.impl.ComponentManagerImpl.initComponents(ComponentManagerImpl.java:71)
at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:106)
at com.intellij.openapi.project.impl.ProjectImpl.init(ProjectImpl.java:73)
at com.intellij.openapi.project.impl.ProjectManagerImpl.a(ProjectManagerImpl.java:175)
at com.intellij.openapi.project.impl.ProjectManagerImpl.a(ProjectManagerImpl.java:192)
at com.intellij.openapi.project.impl.ProjectManagerImpl.access$200(ProjectManagerImpl.java:180)
at com.intellij.openapi.project.impl.ProjectManagerImpl$4.run(ProjectManagerImpl.java:1)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$3.run(ProgressManagerImpl.java:1)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:3)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$4.run(ProgressManagerImpl.java:1)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:5)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:13)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:101)
at com.intellij.openapi.application.impl.ApplicationImpl$7$1.run(ApplicationImpl.java:11)
at com.intellij.openapi.application.impl.ApplicationImpl$5.run(ApplicationImpl.java:8)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
at java.util.concurrent.FutureTask.run(FutureTask.java:123)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:613)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:2)



java.lang.IllegalStateException: Cannot change platform settings after initialization
at com.teamdev.xpcom.impl.i.setUseSWT(SourceFile:40)
at com.teamdev.xpcom.Xpcom.initialize(SourceFile:90)
at com.teamdev.xpcom.Xpcom.initialize(SourceFile:62)
at net.bindows.intellij_plugin.embeddedbrowser.EmbeddedBrowser.init(EmbeddedBrowser.java:77)
at net.bindows.intellij_plugin.embeddedbrowser.EmbeddedBrowser.<init>(EmbeddedBrowser.java:61)
at net.bindows.intellij_plugin.embeddedbrowser.EmbeddedBrowserProjectComponent.createEmbeddedBrowser(EmbeddedBrowserProjectComponent.java:29)
at net.bindows.intellij_plugin.embeddedbrowser.EmbeddedBrowserProjectComponent.getEmbeddedBrowser(EmbeddedBrowserProjectComponent.java:50)
at net.bindows.intellij_plugin.GridPanel2Designer.GridPanel2DesignerProjectComponent.<init>(GridPanel2DesignerProjectComponent.java:29)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at org.picocontainer.defaults.InstantiatingComponentAdapter.newInstance(InstantiatingComponentAdapter.java:193)
at org.picocontainer.defaults.ConstructorInjectionComponentAdapter$1.run(ConstructorInjectionComponentAdapter.java:220)
at org.picocontainer.defaults.ThreadLocalCyclicDependencyGuard.observe(ThreadLocalCyclicDependencyGuard.java:53)
at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getComponentInstance(ConstructorInjectionComponentAdapter.java:248)
at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:60)
at org.picocontainer.defaults.CachingComponentAdapter.getComponentInstance(CachingComponentAdapter.java:58)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter$1.getComponentInstance(ComponentManagerImpl.java:2)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:31)
at com.intellij.util.pico.DefaultPicoContainer.getLocalInstance(DefaultPicoContainer.java:230)
at com.intellij.util.pico.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:217)
at com.intellij.util.pico.DefaultPicoContainer.getComponentInstance(DefaultPicoContainer.java:199)
at org.picocontainer.alternatives.AbstractDelegatingMutablePicoContainer.getComponentInstance(AbstractDelegatingMutablePicoContainer.java:75)
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponentFromContainer(ComponentManagerImpl.java:155)
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponent(ComponentManagerImpl.java:177)
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponent(ComponentManagerImpl.java:132)
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponents(ComponentManagerImpl.java:63)
at com.intellij.openapi.components.impl.ComponentManagerImpl.initComponents(ComponentManagerImpl.java:157)
at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:106)
at com.intellij.openapi.project.impl.ProjectImpl.init(ProjectImpl.java:73)
at com.intellij.openapi.project.impl.ProjectManagerImpl.a(ProjectManagerImpl.java:175)
at com.intellij.openapi.project.impl.ProjectManagerImpl.a(ProjectManagerImpl.java:192)
at com.intellij.openapi.project.impl.ProjectManagerImpl.access$200(ProjectManagerImpl.java:180)
at com.intellij.openapi.project.impl.ProjectManagerImpl$4.run(ProjectManagerImpl.java:1)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$3.run(ProgressManagerImpl.java:1)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:3)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$4.run(ProgressManagerImpl.java:1)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:5)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:13)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:101)
at com.intellij.openapi.application.impl.ApplicationImpl$7$1.run(ApplicationImpl.java:11)
at com.intellij.openapi.application.impl.ApplicationImpl$5.run(ApplicationImpl.java:8)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
at java.util.concurrent.FutureTask.run(FutureTask.java:123)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:613)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:2)



java.lang.IllegalStateException: Cannot change platform settings after initialization
at com.teamdev.xpcom.impl.i.setUseSWT(SourceFile:40)
at com.teamdev.xpcom.Xpcom.initialize(SourceFile:90)
at com.teamdev.xpcom.Xpcom.initialize(SourceFile:62)
at net.bindows.intellij_plugin.embeddedbrowser.EmbeddedBrowser.init(EmbeddedBrowser.java:77)
at net.bindows.intellij_plugin.embeddedbrowser.EmbeddedBrowser.<init>(EmbeddedBrowser.java:61)
at net.bindows.intellij_plugin.embeddedbrowser.EmbeddedBrowserProjectComponent.createEmbeddedBrowser(EmbeddedBrowserProjectComponent.java:29)
at net.bindows.intellij_plugin.embeddedbrowser.EmbeddedBrowserProjectComponent.getEmbeddedBrowser(EmbeddedBrowserProjectComponent.java:50)
at net.bindows.intellij_plugin.GridPanel2Designer.GridPanel2DesignerProjectComponent.<init>(GridPanel2DesignerProjectComponent.java:29)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at org.picocontainer.defaults.InstantiatingComponentAdapter.newInstance(InstantiatingComponentAdapter.java:193)
at org.picocontainer.defaults.ConstructorInjectionComponentAdapter$1.run(ConstructorInjectionComponentAdapter.java:220)
at org.picocontainer.defaults.ThreadLocalCyclicDependencyGuard.observe(ThreadLocalCyclicDependencyGuard.java:53)
at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getComponentInstance(ConstructorInjectionComponentAdapter.java:248)
at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:60)
at org.picocontainer.defaults.CachingComponentAdapter.getComponentInstance(CachingComponentAdapter.java:58)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter$1.getComponentInstance(ComponentManagerImpl.java:2)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:31)
at com.intellij.util.pico.DefaultPicoContainer.getLocalInstance(DefaultPicoContainer.java:230)
at com.intellij.util.pico.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:217)
at com.intellij.util.pico.DefaultPicoContainer.getComponentInstance(DefaultPicoContainer.java:199)
at org.picocontainer.alternatives.AbstractDelegatingMutablePicoContainer.getComponentInstance(AbstractDelegatingMutablePicoContainer.java:75)
at com.intellij.openapi.components.impl.ComponentManagerImpl.a(ComponentManagerImpl.java:119)
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponentFromContainer(ComponentManagerImpl.java:1)
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponent(ComponentManagerImpl.java:177)
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponent(ComponentManagerImpl.java:132)
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponents(ComponentManagerImpl.java:63)
at com.intellij.openapi.components.impl.ComponentManagerImpl.initComponents(ComponentManagerImpl.java:157)
at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:106)
at com.intellij.openapi.project.impl.ProjectImpl.init(ProjectImpl.java:73)
at com.intellij.openapi.project.impl.ProjectManagerImpl.a(ProjectManagerImpl.java:175)
at com.intellij.openapi.project.impl.ProjectManagerImpl.a(ProjectManagerImpl.java:192)
at com.intellij.openapi.project.impl.ProjectManagerImpl.access$200(ProjectManagerImpl.java:180)
at com.intellij.openapi.project.impl.ProjectManagerImpl$4.run(ProjectManagerImpl.java:1)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$3.run(ProgressManagerImpl.java:1)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:3)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$4.run(ProgressManagerImpl.java:1)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:5)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:13)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:101)
at com.intellij.openapi.application.impl.ApplicationImpl$7$1.run(ApplicationImpl.java:11)
at com.intellij.openapi.application.impl.ApplicationImpl$5.run(ApplicationImpl.java:8)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
at java.util.concurrent.FutureTask.run(FutureTask.java:123)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:613)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:2)



java.lang.IllegalStateException: Cannot change platform settings after initialization
at com.teamdev.xpcom.impl.i.setUseSWT(SourceFile:40)
at com.teamdev.xpcom.Xpcom.initialize(SourceFile:90)
at com.teamdev.xpcom.Xpcom.initialize(SourceFile:62)
at net.bindows.intellij_plugin.embeddedbrowser.EmbeddedBrowser.init(EmbeddedBrowser.java:77)
at net.bindows.intellij_plugin.embeddedbrowser.EmbeddedBrowser.<init>(EmbeddedBrowser.java:61)
at net.bindows.intellij_plugin.embeddedbrowser.EmbeddedBrowserProjectComponent.createEmbeddedBrowser(EmbeddedBrowserProjectComponent.java:29)
at net.bindows.intellij_plugin.embeddedbrowser.EmbeddedBrowserProjectComponent.getEmbeddedBrowser(EmbeddedBrowserProjectComponent.java:50)
at net.bindows.intellij_plugin.GridPanel2Designer.GridPanel2DesignerProjectComponent.<init>(GridPanel2DesignerProjectComponent.java:29)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at org.picocontainer.defaults.InstantiatingComponentAdapter.newInstance(InstantiatingComponentAdapter.java:193)
at org.picocontainer.defaults.ConstructorInjectionComponentAdapter$1.run(ConstructorInjectionComponentAdapter.java:220)
at org.picocontainer.defaults.ThreadLocalCyclicDependencyGuard.observe(ThreadLocalCyclicDependencyGuard.java:53)
at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getComponentInstance(ConstructorInjectionComponentAdapter.java:248)
at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:60)
at org.picocontainer.defaults.CachingComponentAdapter.getComponentInstance(CachingComponentAdapter.java:58)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter$1.getComponentInstance(ComponentManagerImpl.java:2)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:31)
at com.intellij.util.pico.DefaultPicoContainer.getLocalInstance(DefaultPicoContainer.java:230)
at com.intellij.util.pico.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:217)
at com.intellij.util.pico.DefaultPicoContainer.getComponentInstance(DefaultPicoContainer.java:199)
at org.picocontainer.alternatives.AbstractDelegatingMutablePicoContainer.getComponentInstance(AbstractDelegatingMutablePicoContainer.java:75)
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponentFromContainer(ComponentManagerImpl.java:155)
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponent(ComponentManagerImpl.java:177)
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponent(ComponentManagerImpl.java:132)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.getComponentsByType(ComponentManagerImpl.java:32)
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponents(ComponentManagerImpl.java:95)
at com.intellij.openapi.project.impl.ProjectImpl.c(ProjectImpl.java:5)
at com.intellij.openapi.project.impl.ProjectImpl.access$300(ProjectImpl.java:44)
at com.intellij.openapi.project.impl.ProjectImpl$MyProjectManagerListener.projectOpened(ProjectImpl.java:6)
at com.intellij.openapi.project.impl.ProjectManagerImpl$2.projectOpened(ProjectManagerImpl.java:11)
at com.intellij.openapi.project.impl.ProjectManagerImpl.d(ProjectManagerImpl.java:334)
at com.intellij.openapi.project.impl.ProjectManagerImpl.openProject(ProjectManagerImpl.java:238)
at com.intellij.openapi.project.impl.ProjectManagerImpl.loadAndOpenProject(ProjectManagerImpl.java:146)
at com.intellij.openapi.project.impl.ProjectManagerImpl.loadAndOpenProject(ProjectManagerImpl.java:116)
at com.intellij.ide.impl.ProjectUtil.openProject(ProjectUtil.java:53)
at com.intellij.ide.RecentProjectsManager.doOpenProject(RecentProjectsManager.java:5)
at com.intellij.ide.RecentProjectsManagerBase$MyAppLifecycleListener.appStarting(RecentProjectsManagerBase.java:9)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.intellij.util.messages.impl.MessageBusConnectionImpl.deliverMessage(MessageBusConnectionImpl.java:101)
at com.intellij.util.messages.impl.MessageBusImpl.doPumpMessages(MessageBusImpl.java:182)
at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:174)
at com.intellij.util.messages.impl.MessageBusImpl.sendMessage(MessageBusImpl.java:166)
at com.intellij.util.messages.impl.MessageBusImpl.access$000(MessageBusImpl.java:40)
at com.intellij.util.messages.impl.MessageBusImpl$2.invoke(MessageBusImpl.java:106)
at $Proxy34.appStarting(Unknown Source)
at com.intellij.idea.IdeaApplication.b(IdeaApplication.java:48)
at com.intellij.idea.IdeaApplication.access$400(IdeaApplication.java:9)
at com.intellij.idea.IdeaApplication$IdeStarter$3.run(IdeaApplication.java:12)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:27)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at com.intellij.ide.IdeEventQueue.c(IdeEventQueue.java:35)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:99)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:217)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)



java.lang.IllegalStateException: Cannot change platform settings after initialization
at com.teamdev.xpcom.impl.i.setUseSWT(SourceFile:40)
at com.teamdev.xpcom.Xpcom.initialize(SourceFile:90)
at com.teamdev.xpcom.Xpcom.initialize(SourceFile:62)
at net.bindows.intellij_plugin.embeddedbrowser.EmbeddedBrowser.init(EmbeddedBrowser.java:77)
at net.bindows.intellij_plugin.embeddedbrowser.EmbeddedBrowser.<init>(EmbeddedBrowser.java:61)
at net.bindows.intellij_plugin.embeddedbrowser.EmbeddedBrowserProjectComponent.createEmbeddedBrowser(EmbeddedBrowserProjectComponent.java:29)
at net.bindows.intellij_plugin.embeddedbrowser.EmbeddedBrowserProjectComponent.getEmbeddedBrowser(EmbeddedBrowserProjectComponent.java:50)
at net.bindows.intellij_plugin.GridPanel2Designer.GridPanel2DesignerProjectComponent.<init>(GridPanel2DesignerProjectComponent.java:29)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at org.picocontainer.defaults.InstantiatingComponentAdapter.newInstance(InstantiatingComponentAdapter.java:193)
at org.picocontainer.defaults.ConstructorInjectionComponentAdapter$1.run(ConstructorInjectionComponentAdapter.java:220)
at org.picocontainer.defaults.ThreadLocalCyclicDependencyGuard.observe(ThreadLocalCyclicDependencyGuard.java:53)
at org.picocontainer.defaults.ConstructorInjectionComponentAdapter.getComponentInstance(ConstructorInjectionComponentAdapter.java:248)
at org.picocontainer.defaults.DecoratingComponentAdapter.getComponentInstance(DecoratingComponentAdapter.java:60)
at org.picocontainer.defaults.CachingComponentAdapter.getComponentInstance(CachingComponentAdapter.java:58)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter$1.getComponentInstance(ComponentManagerImpl.java:2)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:31)
at com.intellij.util.pico.DefaultPicoContainer.getLocalInstance(DefaultPicoContainer.java:230)
at com.intellij.util.pico.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:217)
at com.intellij.util.pico.DefaultPicoContainer.getComponentInstance(DefaultPicoContainer.java:199)
at org.picocontainer.alternatives.AbstractDelegatingMutablePicoContainer.getComponentInstance(AbstractDelegatingMutablePicoContainer.java:75)
at com.intellij.openapi.components.impl.ComponentManagerImpl.a(ComponentManagerImpl.java:119)
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponentFromContainer(ComponentManagerImpl.java:1)
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponent(ComponentManagerImpl.java:177)
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponent(ComponentManagerImpl.java:132)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.getComponentsByType(ComponentManagerImpl.java:32)
at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponents(ComponentManagerImpl.java:95)
at com.intellij.openapi.project.impl.ProjectImpl.c(ProjectImpl.java:5)
at com.intellij.openapi.project.impl.ProjectImpl.access$300(ProjectImpl.java:44)
at com.intellij.openapi.project.impl.ProjectImpl$MyProjectManagerListener.projectOpened(ProjectImpl.java:6)
at com.intellij.openapi.project.impl.ProjectManagerImpl$2.projectOpened(ProjectManagerImpl.java:11)
at com.intellij.openapi.project.impl.ProjectManagerImpl.d(ProjectManagerImpl.java:334)
at com.intellij.openapi.project.impl.ProjectManagerImpl.openProject(ProjectManagerImpl.java:238)
at com.intellij.openapi.project.impl.ProjectManagerImpl.loadAndOpenProject(ProjectManagerImpl.java:146)
at com.intellij.openapi.project.impl.ProjectManagerImpl.loadAndOpenProject(ProjectManagerImpl.java:116)
at com.intellij.ide.impl.ProjectUtil.openProject(ProjectUtil.java:53)
at com.intellij.ide.RecentProjectsManager.doOpenProject(RecentProjectsManager.java:5)
at com.intellij.ide.RecentProjectsManagerBase$MyAppLifecycleListener.appStarting(RecentProjectsManagerBase.java:9)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.intellij.util.messages.impl.MessageBusConnectionImpl.deliverMessage(MessageBusConnectionImpl.java:101)
at com.intellij.util.messages.impl.MessageBusImpl.doPumpMessages(MessageBusImpl.java:182)
at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:174)
at com.intellij.util.messages.impl.MessageBusImpl.sendMessage(MessageBusImpl.java:166)
at com.intellij.util.messages.impl.MessageBusImpl.access$000(MessageBusImpl.java:40)
at com.intellij.util.messages.impl.MessageBusImpl$2.invoke(MessageBusImpl.java:106)
at $Proxy34.appStarting(Unknown Source)
at com.intellij.idea.IdeaApplication.b(IdeaApplication.java:48)
at com.intellij.idea.IdeaApplication.access$400(IdeaApplication.java:9)
at com.intellij.idea.IdeaApplication$IdeStarter$3.run(IdeaApplication.java:12)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:27)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at com.intellij.ide.IdeEventQueue.c(IdeEventQueue.java:35)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:99)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:217)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)







---
Original message URL: http://www.jetbrains.net/devnet/message/5227786#5227786



--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0
Comment actions Permalink

It also returns null I'm afraid...

0
Comment actions Permalink

Hello Johan,

just a guess, but this is usually caused by having dependencies on plugin-libraries instead of
adding them to the IDEA-JDK.

HTH,
Sascha

It also returns null I'm afraid...

---
Original message URL: http://www.jetbrains.net/devnet/message/5227822#5227822

0
Comment actions Permalink

What do you mean plugin-libraries? I have the idea.jar and a few of the jars from plugins/htmlbrowser/lib folder included.

/J

0
Comment actions Permalink

Hello Johan,

What do you mean plugin-libraries? I have the idea.jar and a few of the jars from plugins/htmlbrowser/lib folder included.


Sorry, that was a bit unclear: Any jars with APIs of other plugins (e.g. htmlbrowser) should be
added to the IDEA-JDK instead of adding them to your plugin module as module/project/global
libraries. Otherwise the plugin jars will be deployed with your plugin, which must not happen
because it breaks the classloading.

But it sounds like you configured it correctly if you added the libs along with idea.jar to the JDK.
In that case I have no idea what the problem might be... :(

Sascha

0
Comment actions Permalink

PS: I've once suggested that the deployment of libraries for plugin modules should be configurable
just as it is possible with the J2EE deployment, but that suggestion (including the patch) seems to
have been lost somewhere...

Sascha

0
Comment actions Permalink

Ha! that worked actually. I mean now I have a bunch of other problems to solve but that worked.
I hade created a project library that I then had added to the module dependencies. Moving them to the IDEA JDK did the trick.
Thanks

0

Please sign in to leave a comment.