KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > InternalSaveable


1 /*******************************************************************************
2  * Copyright (c) 2006, 2007 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11
12 package org.eclipse.ui.internal;
13
14 import org.eclipse.core.runtime.jobs.Job;
15
16 /**
17  * @since 3.3
18  *
19  */

20 public class InternalSaveable {
21
22     private Job backgroundSaveJob;
23
24     /**
25      * @return
26      */

27     /* package */Job getBackgroundSaveJob() {
28         return backgroundSaveJob;
29     }
30
31     /**
32      * @param savingInBackground
33      * The savingInBackground to set.
34      */

35     /* package */void setBackgroundSaveJob(Job backgroundSaveJob) {
36         this.backgroundSaveJob = backgroundSaveJob;
37     }
38
39     /**
40      * @return
41      */

42     /* package */ boolean isSavingInBackground() {
43         Job saveJob = backgroundSaveJob;
44         if (saveJob == null) {
45             return false;
46         }
47         return (backgroundSaveJob.getState() & (Job.WAITING | Job.RUNNING)) != 0;
48     }
49
50 }
51
Popular Tags