Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » My plugin causes the workspace prompt to not appear
My plugin causes the workspace prompt to not appear [message #332937] Fri, 14 November 2008 16:51 Go to next message
Justin Weir is currently offline Justin WeirFriend
Messages: 18
Registered: July 2009
Junior Member
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 #332961 is a reply to message #332937] Mon, 17 November 2008 12:11 Go to previous messageGo to next message
Manuel Selva is currently offline Manuel SelvaFriend
Messages: 189
Registered: July 2009
Location: Grenoble, France
Senior Member
Hi Justin,

I think this is not related to your plugin.

Be sure you checked the prompt for workspace preference in Preferences ->
General -> Start Up and Shutdown for all your eclipse installations.

Manu


Re: My plugin causes the workspace prompt to not appear [message #332962 is a reply to message #332937] Mon, 17 November 2008 12:45 Go to previous messageGo to next message
Manuel Selva is currently offline Manuel SelvaFriend
Messages: 189
Registered: July 2009
Location: Grenoble, France
Senior Member
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 #332965 is a reply to message #332962] Mon, 17 November 2008 14:35 Go to previous messageGo to next message
Justin Weir is currently offline Justin WeirFriend
Messages: 18
Registered: July 2009
Junior Member
The first thing I checked was the preference, and it's not the problem.
When user's have both my plugin and WTP installed, the prompt doesn't
appear, no matter what the setting is.
Re: My plugin causes the workspace prompt to not appear [message #332978 is a reply to message #332965] Mon, 17 November 2008 18:09 Go to previous messageGo to next message
Justin Weir is currently offline Justin WeirFriend
Messages: 18
Registered: July 2009
Junior Member
One more thing that I've found is that when you launch with the -clean
option, you are prompted for the workspace. When you run again without
-clean, there is no prompt.
Re: My plugin causes the workspace prompt to not appear [message #332981 is a reply to message #332978] Mon, 17 November 2008 21:04 Go to previous messageGo to next message
Justin Weir is currently offline Justin WeirFriend
Messages: 18
Registered: July 2009
Junior Member
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 Go to previous messageGo to next message
Justin Weir is currently offline Justin WeirFriend
Messages: 18
Registered: July 2009
Junior Member
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 Go to previous messageGo to next message
Walter Harley is currently offline Walter HarleyFriend
Messages: 847
Registered: July 2009
Senior Member
"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 Go to previous messageGo to next message
Justin Weir is currently offline Justin WeirFriend
Messages: 18
Registered: July 2009
Junior Member
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 Go to previous message
Justin Weir is currently offline Justin WeirFriend
Messages: 18
Registered: July 2009
Junior Member
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?
Previous Topic:Getting launch configuration from TextConsole
Next Topic:remove entries from navigation history
Goto Forum:
  


Current Time: Wed Jul 17 08:17:28 GMT 2024

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

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

Back to the top