Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Turning off auto-building
Turning off auto-building [message #303148] Tue, 09 May 2006 17:25 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Kunal Khaware is currently offline Kunal KhawareFriend
Messages: 41
Registered: December 2013
Location: Hyderabad,India
Member

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 #1279453 is a reply to message #1278329] Fri, 28 March 2014 19:38 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

Have you tried Project->Build Automatically?

(Note: This is not preferences, it is directly on the Project menu)

Rich
Re: Turning off auto-building [message #1281273 is a reply to message #1279453] Mon, 31 March 2014 16:36 Go to previous messageGo to next message
Kunal Khaware is currently offline Kunal KhawareFriend
Messages: 41
Registered: December 2013
Location: Hyderabad,India
Member

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
Re: Turning off auto-building [message #1281714 is a reply to message #1278329] Tue, 01 April 2014 08:47 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1812
Registered: July 2009
Location: Firenze, Italy
Senior Member
On 27/03/2014 08:19, Kunal Khaware wrote:
> 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);
> }

The above method is the one I use to enable/disable auto build
programmatically and it works for me...

are you getting any exception when you execute that code?

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book


Re: Turning off auto-building [message #1281856 is a reply to message #1281714] Tue, 01 April 2014 13:14 Go to previous message
Kunal Khaware is currently offline Kunal KhawareFriend
Messages: 41
Registered: December 2013
Location: Hyderabad,India
Member

Hi Bettini,

Thanks for the reply.No, I am not getting exception but when I go to Windows->Preference->Workspace->General, the Build Automatically checkbox is still disabled.

Thanks

Kunal
Previous Topic:How to get rid of the search menu
Next Topic:getting an error when click on help contents
Goto Forum:
  


Current Time: Tue Apr 16 15:01:40 GMT 2024

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

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

Back to the top