Turning off auto-building [message #303148] |
Tue, 09 May 2006 17:25 |
Eclipse User |
|
|
|
Originally posted by: matt.querix.com
Hi all,
Our build system doesn't support auto-building. What's the best way of
turning it off programmatically for users of our plugins?
Thanks,
Matt
|
|
|
Re: Turning off auto-building [message #303164 is a reply to message #303148] |
Tue, 09 May 2006 23:47 |
Eclipse User |
|
|
|
Originally posted by: wharley.bea.com
"Matt Dickie" <matt@querix.com> wrote in message
news:e3qj72$tka$1@utils.eclipse.org...
> Hi all,
>
> Our build system doesn't support auto-building. What's the best way of
> turning it off programmatically for users of our plugins?
It's a global property, not per-project, so be aware that if you turn it off
you're turning it off for all projects in the workspace.
The following code should work:
public static boolean enableAutoBuild(boolean enable) throws
CoreException {
IWorkspace workspace= ResourcesPlugin.getWorkspace();
IWorkspaceDescription desc= workspace.getDescription();
boolean isAutoBuilding= desc.isAutoBuilding();
if (isAutoBuilding != enable) {
desc.setAutoBuilding(enable);
workspace.setDescription(desc);
}
return isAutoBuilding;
}
|
|
|
Re: Turning off auto-building [message #303211 is a reply to message #303164] |
Wed, 10 May 2006 14:09 |
Eclipse User |
|
|
|
Originally posted by: automatic.javalobby.org
If I bought a product that disabled auto-building globally, I'd uninstall it, demand my money back, and write a scathing review on my blog.
Seriously, if your products can't handle auto-build, then just ignore the auto build events, but don't prevent others from using it.
Alex.
|
|
|
Re: Turning off auto-building [message #303221 is a reply to message #303211] |
Wed, 10 May 2006 14:43 |
Eclipse User |
|
|
|
Originally posted by: matt.querix.com
Hi Alex,
Our customers will not be existing Eclipse users adding a new plugin or
two. Our product is an new Eclipse-based IDE for a specialist language,
replacing our old IDE. Eventually we will want to hide the fact that our
product is build on top of Eclipse, much like Rational's Eclipse based
UML tools do. I very much doubt if our customers will have other types
of project in their workspace. Nevertheless, I agree that this is not nice.
Our existing users will not be used to Eclipse, and will be looking for
a build button. This only appears when auto-building is off. We don't
want to have to tell our customers first to install our product and then
to turn off auto building so that they can use it properly. I suppose I
could just add my own build actions to the toolbar and context menu
pretty easily...
Matt.
Alex Blewitt wrote:
> If I bought a product that disabled auto-building globally, I'd uninstall it, demand my money back, and write a scathing review on my blog.
>
> Seriously, if your products can't handle auto-build, then just ignore the auto build events, but don't prevent others from using it.
>
> Alex.
|
|
|
Re: Turning off auto-building [message #303245 is a reply to message #303221] |
Wed, 10 May 2006 17:27 |
Eclipse User |
|
|
|
Originally posted by: wharley.bea.com
"Matt Dickie" <matt@querix.com> wrote in message
news:e3su41$joj$1@utils.eclipse.org...
> Hi Alex,
>
> Our customers will not be existing Eclipse users adding a new plugin or
> two. Our product is an new Eclipse-based IDE for a specialist language,
> replacing our old IDE. Eventually we will want to hide the fact that our
> product is build on top of Eclipse, much like Rational's Eclipse based UML
> tools do. I very much doubt if our customers will have other types of
> project in their workspace. Nevertheless, I agree that this is not nice.
>
> Our existing users will not be used to Eclipse, and will be looking for a
> build button. This only appears when auto-building is off. We don't want
> to have to tell our customers first to install our product and then to
> turn off auto building so that they can use it properly. I suppose I could
> just add my own build actions to the toolbar and context menu pretty
> easily...
You might be able to do what you want declaratively, rather than
programmatically as you had requested. For instance, at install time,
create the appropriate file under configuration/.settings. I'm not very
familiar with the product customization options for Eclipse (that is, the
options that allow pre-install-time customizing of products based on
Eclipse), but there are some.
|
|
|
Re: Turning off auto-building [message #303251 is a reply to message #303221] |
Wed, 10 May 2006 20:38 |
Eclipse User |
|
|
|
Originally posted by: john.eclipsefaq.org
You can customize preferences like this from your "product" plugin's
plugin_customization.ini file. See the file
eclipse/plugins/org.eclipse.sdk/plugin_customization.ini for an example
of how the Eclipse SDK configures its default preferences using this
method. The preference for autobuild is (from
ResourcesPlugin.PREF_AUTO_BUILDING):
org.eclipse.core.resources/description.autobuilding=true
--
Matt Dickie wrote:
> Hi Alex,
>
> Our customers will not be existing Eclipse users adding a new plugin or
> two. Our product is an new Eclipse-based IDE for a specialist language,
> replacing our old IDE. Eventually we will want to hide the fact that our
> product is build on top of Eclipse, much like Rational's Eclipse based
> UML tools do. I very much doubt if our customers will have other types
> of project in their workspace. Nevertheless, I agree that this is not nice.
>
> Our existing users will not be used to Eclipse, and will be looking for
> a build button. This only appears when auto-building is off. We don't
> want to have to tell our customers first to install our product and then
> to turn off auto building so that they can use it properly. I suppose I
> could just add my own build actions to the toolbar and context menu
> pretty easily...
>
> Matt.
>
>
> Alex Blewitt wrote:
>
>> If I bought a product that disabled auto-building globally, I'd
>> uninstall it, demand my money back, and write a scathing review on my
>> blog.
>>
>> Seriously, if your products can't handle auto-build, then just ignore
>> the auto build events, but don't prevent others from using it.
>>
>> Alex.
|
|
|
Re: Turning off auto-building [message #1278329 is a reply to message #303148] |
Thu, 27 March 2014 07:19 |
|
I tried the below all methods but still when i run the product, the Build Automatically option in Windows->Preferences->General->Workspace is disabled.(I want it to get enabled):
Method 1
===========
Added below entry in my plugin_costumization.ini
org.eclipse.core.resources/description.autobuilding=true
Method 2
==============
Added below code in my Application.java of my plugin which executes when workspace is loaded :
IWorkspace workspace= ResourcesPlugin.getWorkspace();
IWorkspaceDescription desc= workspace.getDescription();
boolean isAutoBuilding= desc.isAutoBuilding();
if (isAutoBuilding != true) {
desc.setAutoBuilding(true);
workspace.setDescription(desc);
}
Method 3
=============
Added below code in same above file:
IWorkspaceDescription iwk = ResourcesPlugin.getWorkspace().getDescription();
Preferences preferences = ResourcesPlugin.getPlugin().getPluginPreferences();
preferences.setValue(ResourcesPlugin.PREF_AUTO_BUILDING, true);
Method 4
=====================
Added below code in same file
IWorkspaceDescription iwk = ResourcesPlugin.getWorkspace().getDescription();
iwk.setAutoBuilding(true);
But No Luck Sad
Please help
Regards
Kunal
[Updated on: Thu, 27 March 2014 09:36] Report message to a moderator
|
|
|
|
Re: Turning off auto-building [message #1281273 is a reply to message #1279453] |
Mon, 31 March 2014 16:36 |
|
Yes, I tried it and it works but I want this to handled from Eclipse Application and Build Automatically should happen by default. Any idea apart from above steps , how do we achieve this?
Thanks
Kunal
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03791 seconds