Home » Eclipse Projects » Eclipse Platform » instantiation of main plugin class and debug model presentation
instantiation of main plugin class and debug model presentation [message #168830] |
Wed, 10 December 2003 13:53  |
Eclipse User |
|
|
|
When I launch a debug run for my custom plugin for my custom language, the
debug model presentation's constructor gets called before the main class for
the plugin is instantiated. The main class is the one that is specified in
the 'class' attribute of the 'plugin' element in my plugin.xml file. The
constructor for the debug model presentation needs to access the preference
store for the plugin which doesn't exist until the main plugin class is
created.
Isn't the main plugin class supposed to be instantiated first? Is there
anything that I can do to guarantee it?
Actually, the debug model presentation and the main plugin class are being
instantiated in parallel by separate threads, so I guess the main plugin
class will sometimes get instantiated first. But right now, the problem is
very reproducible.
This problem has just started to happen and I don't know why. I am using
3.0M5
--
-----------------------------------------------
Patrick Baker
Stilo Corporation
pbaker@ca.stilo.com
"Hail, twin companionship, children of Mars."
This message, including any attachments, is for the sole use of the
intended recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure, copying, or
distribution is strictly prohibited. If you are not the intended
recipient(s) please contact the sender by reply email and destroy
all copies of the original message and any attachments.
|
|
|
Re: instantiation of main plugin class and debug model presentation [message #168922 is a reply to message #168830] |
Wed, 10 December 2003 16:45   |
Eclipse User |
|
|
|
Please file a bug with Platform-Debug. This sound interesting :-)
It is likely something to do with the fact that the debugger now computes
labels in background threads. However, we have not seen this interaction.
Darin
"Patrick Baker" <pbaker@ca.stilo.com> wrote in message
news:br7ptr$r95$1@eclipse.org...
> When I launch a debug run for my custom plugin for my custom language, the
> debug model presentation's constructor gets called before the main class
for
> the plugin is instantiated. The main class is the one that is specified in
> the 'class' attribute of the 'plugin' element in my plugin.xml file. The
> constructor for the debug model presentation needs to access the
preference
> store for the plugin which doesn't exist until the main plugin class is
> created.
>
> Isn't the main plugin class supposed to be instantiated first? Is there
> anything that I can do to guarantee it?
>
> Actually, the debug model presentation and the main plugin class are being
> instantiated in parallel by separate threads, so I guess the main plugin
> class will sometimes get instantiated first. But right now, the problem is
> very reproducible.
>
> This problem has just started to happen and I don't know why. I am using
> 3.0M5
>
>
> --
> -----------------------------------------------
> Patrick Baker
> Stilo Corporation
> pbaker@ca.stilo.com
>
> "Hail, twin companionship, children of Mars."
>
> This message, including any attachments, is for the sole use of the
> intended recipient(s) and may contain confidential and privileged
> information. Any unauthorized review, use, disclosure, copying, or
> distribution is strictly prohibited. If you are not the intended
> recipient(s) please contact the sender by reply email and destroy
> all copies of the original message and any attachments.
>
>
|
|
|
Re: instantiation of main plugin class and debug model presentation [message #168943 is a reply to message #168922] |
Wed, 10 December 2003 17:13   |
Eclipse User |
|
|
|
>
> It is likely something to do with the fact that the debugger now computes
> labels in background threads. However, we have not seen this interaction.
>
That's an excellent guess. Here are the callstacks for the two threads (note
the LaunchViewLabelDecorator entry in the worker thread):
Don't worry I will file a bug report.
Main thread
-------------
GuiPlugin.<init>(IPluginDescriptor) line: 53
NativeConstructorAccessorImpl.newInstance0(Constructor, Object[]) line: not
available [native method]
NativeConstructorAccessorImpl.newInstance(Object[]) line: 39
DelegatingConstructorAccessorImpl.newInstance(Object[]) line: 27
Constructor.newInstance(Object[]) line: 274
PluginDescriptor.internalDoPluginActivation() line: 744
PluginDescriptor.doPluginActivation() line: 200
PluginClassLoader.activatePlugin(String) line: 109
PluginClassLoader.internalFindClassParentsSelf(String, boolean,
DelegatingURLClassLoader, boolean) line: 181
PluginClassLoader(DelegatingURLClassLoader).findClassParents Self(String,
boolean, DelegatingURLClassLoader, boolean) line: 485
PluginClassLoader(DelegatingURLClassLoader).loadClass(String , boolean,
DelegatingURLClassLoader, Vector, boolean) line: 882
PluginClassLoader(DelegatingURLClassLoader).loadClass(String , boolean) line:
862
PluginClassLoader(ClassLoader).loadClass(String) line: 255
PluginDescriptor.createExecutableExtension(String, Object,
IConfigurationElement, String) line: 128
PluginDescriptor.createExecutableExtension(String, String, Object,
IConfigurationElement, String) line: 179
ConfigurationElement.createExecutableExtension(String) line: 103
DebugUIPlugin$1.run() line: 236
BusyIndicator.showWhile(Display, Runnable) line: 84
DebugUIPlugin.createExtension(IConfigurationElement, String) line: 233
LazyModelPresentation.getPresentation() line: 191
LazyModelPresentation.getImage(Object) line: 114
DelegatingModelPresentation.getImage(Object) line: 166
LaunchView$3.getImage(Object) line: 230
LaunchViewDecoratingLabelProvider(DecoratingLabelProvider).g etImage(Object)
line: 73
LaunchViewer(TreeViewer).doUpdateItem(Item, Object) line: 99
AbstractTreeViewer$UpdateItemSafeRunnable.run() line: 87
InternalPlatform.run(ISafeRunnable) line: 1127
Platform.run(ISafeRunnable) line: 464
LaunchViewer(AbstractTreeViewer).doUpdateItem(Widget, Object, boolean) line:
469
StructuredViewer$UpdateItemSafeRunnable.run() line: 119
InternalPlatform.run(ISafeRunnable) line: 1127
Platform.run(ISafeRunnable) line: 464
LaunchViewer(StructuredViewer).updateItem(Widget, Object) line: 1285
LaunchViewer(AbstractTreeViewer).updateChildren(Widget, Object, Object[],
boolean) line: 1534
LaunchViewer(AbstractTreeViewer).internalRefreshStruct(Widge t, Object,
boolean) line: 1058
LaunchViewer(AbstractTreeViewer).internalRefresh(Widget, Object, boolean,
boolean) line: 1036
LaunchViewer(AbstractTreeViewer).internalRefresh(Object, boolean) line: 999
LaunchViewer(AbstractTreeViewer).internalRefresh(Object) line: 987
StructuredViewer$7.run() line: 870
LaunchViewer(StructuredViewer).preservingSelection(Runnable) line: 810
LaunchViewer(StructuredViewer).refresh(Object) line: 868
LaunchViewer.refresh(Object) line: 82
LaunchViewEventHandler(AbstractDebugEventHandler).refresh(Ob ject) line: 136
LaunchViewEventHandler.access$3(LaunchViewEventHandler, Object) line: 1
LaunchViewEventHandler$4.run() line: 474
UILockListener.doPendingWork() line: 101
UISynchronizer$1.run() line: 33
RunnableLock.run() line: 35
UISynchronizer(Synchronizer).runAsyncMessages() line: 102
Display.runAsyncMessages() line: 2164
Display.readAndDispatch() line: 1881
Workbench.runEventLoop(Window$IExceptionHandler, Display) line: 1405
Workbench.runUI() line: 1381
Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 237
PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 139
IDEApplication.run(Object) line: 47
InternalBootLoader.run(String, URL, String, String[], Runnable) line: 858
BootLoader.run(String, URL, String, String[], Runnable) line: 461
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not
available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object[]) line: 324
Main.basicRun(String[]) line: 299
Main.run(String[]) line: 767
Main.main(String[]) line: 601
Worker thread
---------------
OmniMarkDebugModelPresentation.<init>() line: 64
NativeConstructorAccessorImpl.newInstance0(Constructor, Object[]) line: not
available [native method]
NativeConstructorAccessorImpl.newInstance(Object[]) line: 39
DelegatingConstructorAccessorImpl.newInstance(Object[]) line: 27
Constructor.newInstance(Object[]) line: 274
Class.newInstance0() line: 306
Class.newInstance() line: 259
PluginDescriptor.createExecutableExtension(String, Object,
IConfigurationElement, String) line: 138
PluginDescriptor.createExecutableExtension(String, String, Object,
IConfigurationElement, String) line: 179
ConfigurationElement.createExecutableExtension(String) line: 103
DebugUIPlugin$1.run() line: 236
BusyIndicator.showWhile(Display, Runnable) line: 51
DebugUIPlugin.createExtension(IConfigurationElement, String) line: 233
LazyModelPresentation.getPresentation() line: 191
LazyModelPresentation.getText(Object) line: 121
DelegatingModelPresentation.getText(Object) line: 183
LaunchViewLabelDecorator$LabelJob.run(IProgressMonitor) line: 267
Worker.run() line: 62
|
|
| |
Goto Forum:
Current Time: Fri Jul 18 11:52:36 EDT 2025
Powered by FUDForum. Page generated in 0.03924 seconds
|