[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.newcomer] Re: Disable "Build Automatically"

Thanks John. This is a better way.

~Lokesh

John Arthorne wrote:
IProjectDescription description = project.getDescription();
ICommand[] buildSpec = description.getBuildSpec();
for (int i = 0; i < buildSpec.length; i++)
    //if this build spec is your builder...
    buildSpec[i].setBuilding(IncrementalProjectBuilder.AUTO_BUILD, false);
description.setBuildSpec(buildSpec);
project.setDescription(description);
--

Lokesh Shah wrote:

I found one way:

        IWorkspace workspace = project.getWorkspace();
        IWorkspaceDescription wdesc = workspace.getDescription();
        wdesc.setAutoBuilding(false);
        workspace.setDescription(wdesc);

Is this the right way? Can I disable it on per project basis?

~Lokesh

Lokesh Shah wrote:

How can I disable the "Build Automatically" in code?
I have create a new project type and have a custom nature associated with it. Now how can I disable "Build Automatically"?


Thanks,
Lokesh