My plugin causes the workspace prompt to not appear [message #332937] |
Fri, 14 November 2008 16:51  |
Eclipse User |
|
|
|
The eclipse plugin that I wrote is causing a strange bug. The workspace
prompt doesn't appear on start up when my plugin is installed (no matter
what the setting for the prompt behavior is), and Eclipse opens with the
workspace as eclipse/workspace. It doesn't happen in all cases, and I
haven't yet figured out what the difference is between working and
non-working eclipse installs. I'm completely stumped and I could really
use some help. If anyone can point me in the right direction, I'd be very
grateful.
Thanks,
Justin
|
|
|
|
Re: My plugin causes the workspace prompt to not appear [message #332962 is a reply to message #332937] |
Mon, 17 November 2008 12:45   |
Eclipse User |
|
|
|
Justin,
One more thing about that is that the Prompt For Workspace preferences is
not stored at workspace level (of course, it's needed before any workspace
"exists") but at Eclipse installation's configuration level here
Eclipse4.5/eclipse/configuration/.settings/org.eclipse.ui.id e.prefs
Depending on your configuration this file could be also located in your
home directory.
Manu
|
|
|
|
|
Re: My plugin causes the workspace prompt to not appear [message #332981 is a reply to message #332978] |
Mon, 17 November 2008 21:04   |
Eclipse User |
|
|
|
Ok. I think I've got it somewhat figured out. Something in the start
method of my plugin activator references the Resources plugin. When the
resources plugin initializes, it calls Platform.getInstanceLocation().
Since the instance location isn't set, it's setting it to the default
value, which causes the workspace prompt to not appear.
Why would my plugin activator's start method be called before the user has
even been prompted for the workspace?
|
|
|
Re: My plugin causes the workspace prompt to not appear [message #332983 is a reply to message #332981] |
Mon, 17 November 2008 22:07   |
Eclipse User |
|
|
|
Upon further inspection, the reference to the Resources plugin doesn't
seem to be the problem, because the issue still occurs when I remove those
references to it.
Here's all I can narrow it down to:
in IDEApplication.checkInstanceLocation, instanceLoc.isSet() is returning
false when I run with -clean, and true when I don't. I haven't been able
to figure out why by stepping through in the debugger because it goes into
code in ServiceTracker that is pretty complicated. I'm not sure why the
location returned by InternalPlatform.getInstanceLocation is different
because of the presence of my plugin.
|
|
|
Re: My plugin causes the workspace prompt to not appear [message #332985 is a reply to message #332981] |
Tue, 18 November 2008 08:08   |
Eclipse User |
|
|
|
"Justin Weir" <jweir66@hotmail.com> wrote in message
news:e5332de814a430c235540cc0638f7258$1@www.eclipse.org...
> Ok. I think I've got it somewhat figured out. Something in the start
> method of my plugin activator references the Resources plugin. When the
> resources plugin initializes, it calls Platform.getInstanceLocation().
> Since the instance location isn't set, it's setting it to the default
> value, which causes the workspace prompt to not appear.
>
> Why would my plugin activator's start method be called before the user has
> even been prompted for the workspace?
What extension points are you extending, and what plugins do you depend on?
|
|
|
Re: My plugin causes the workspace prompt to not appear [message #332991 is a reply to message #332985] |
Tue, 18 November 2008 14:56   |
Eclipse User |
|
|
|
Plugin dependencies:
org.eclipse.core.runtime
org.eclipse.core.resources
org.eclipse.draw2d
org.eclipse.help
org.eclipse.help.appserver
org.eclipse.help.base
org.eclipse.help.ui
org.eclipse.help.webapp
org.eclipse.jdt.core
org.eclipse.jface
org.eclipse.text
org.eclipse.ui
org.eclipse.ui.console
org.eclipse.ui.editors
org.eclipse.ui.forms
org.eclipse.ui.ide
org.eclipse.wst.common.project.facet.core(optional)
org.eclipse.wst.common.modulecore(optional)
Extensions:
org.eclipse.core.resources.markers
org.eclipse.core.runtime.applications
org.eclipse.core.runtime.preferences
org.eclipse.core.runtime.products
org.eclipse.help.toc
org.eclipse.ui.actionSets
org.eclipse.ui.newWizards
org.eclipse.ui.perspectives
org.eclipse.ui.popupMenus
org.eclipse.ui.preferencePages
org.eclipse.ui.viewActions
org.eclipse.ui.views
|
|
|
Re: My plugin causes the workspace prompt to not appear [message #332995 is a reply to message #332991] |
Tue, 18 November 2008 19:06  |
Eclipse User |
|
|
|
I found a line of code that I can remove to make the problem go away. Why
would a call like this:
MyDependencyPlugin.getDefault().getPreferenceStore().setValu e(foo)
in MyMainPlugin.start() cause this behavior? The call seems pretty benign
to me, but it has the side effect of causing some preferences-related
bundle to spool up and set the instance location to some default value.
Should I file a bug report?
|
|
|
Powered by
FUDForum. Page generated in 0.05450 seconds