Révision 2316
| tmp/org.txm.rcp/src/main/java/org/txm/rcp/utils/JobHandler.java (revision 2316) | ||
|---|---|---|
| 33 | 33 |
import org.eclipse.core.runtime.jobs.Job; |
| 34 | 34 |
import org.eclipse.swt.widgets.Composite; |
| 35 | 35 |
import org.eclipse.swt.widgets.Display; |
| 36 |
import org.eclipse.ui.internal.progress.ProgressManagerUtil; |
|
| 36 | 37 |
import org.txm.rcp.StatusLine; |
| 37 | 38 |
import org.txm.rcp.messages.TXMUIMessages; |
| 38 | 39 |
import org.txm.utils.logger.Log; |
| ... | ... | |
| 57 | 58 |
Object result = null; |
| 58 | 59 |
|
| 59 | 60 |
protected boolean success = false; |
| 61 |
|
|
| 62 |
|
|
| 60 | 63 |
/** |
| 61 | 64 |
* Instantiates a new job handler. |
| 62 | 65 |
* |
| ... | ... | |
| 65 | 68 |
* @param parent |
| 66 | 69 |
* the parent |
| 67 | 70 |
*/ |
| 71 |
// FIXME: SJ: parent is not used anymore, need to remove or modify this constructor |
|
| 68 | 72 |
public JobHandler(String title, Composite parent) {
|
| 69 | 73 |
super(title); |
| 70 | 74 |
//this.parent = parent; |
| 71 | 75 |
this.setUser(true); |
| 72 | 76 |
} |
| 73 | 77 |
|
| 78 |
|
|
| 74 | 79 |
/** |
| 80 |
* Create a job in RCP scheduler. |
|
| 81 |
* |
|
| 82 |
* @param title |
|
| 83 |
* the title |
|
| 84 |
*/ |
|
| 85 |
public JobHandler(String title) {
|
|
| 86 |
this(title, true); |
|
| 87 |
} |
|
| 88 |
|
|
| 89 |
/** |
|
| 90 |
* Instantiates a new job handler. |
|
| 91 |
* |
|
| 92 |
* @param title |
|
| 93 |
* the title |
|
| 94 |
* @param show |
|
| 95 |
* the show |
|
| 96 |
*/ |
|
| 97 |
public JobHandler(String title, boolean show) {
|
|
| 98 |
super(title); |
|
| 99 |
this.setUser(show); |
|
| 100 |
} |
|
| 101 |
|
|
| 102 |
|
|
| 103 |
/** |
|
| 75 | 104 |
* You must set the current monitor to be available to manage the process |
| 76 | 105 |
* progress |
| 77 | 106 |
* |
| ... | ... | |
| 150 | 179 |
} |
| 151 | 180 |
} |
| 152 | 181 |
|
| 153 |
/** |
|
| 154 |
* Create a job in RCP scheduler. |
|
| 155 |
* |
|
| 156 |
* @param title |
|
| 157 |
* the title |
|
| 158 |
*/ |
|
| 159 |
public JobHandler(String title) {
|
|
| 160 |
super(title); |
|
| 161 |
this.setUser(true); |
|
| 162 |
} |
|
| 163 |
|
|
| 164 |
/** |
|
| 165 |
* Instantiates a new job handler. |
|
| 166 |
* |
|
| 167 |
* @param title |
|
| 168 |
* the title |
|
| 169 |
* @param parent |
|
| 170 |
* the parent |
|
| 171 |
* @param show |
|
| 172 |
* the show |
|
| 173 |
*/ |
|
| 174 |
public JobHandler(String title, Composite parent, boolean show) {
|
|
| 175 |
super(title); |
|
| 176 |
this.setUser(show); |
|
| 177 |
} |
|
| 178 |
|
|
| 179 |
/** |
|
| 180 |
* Instantiates a new job handler. |
|
| 181 |
* |
|
| 182 |
* @param title |
|
| 183 |
* the title |
|
| 184 |
* @param show |
|
| 185 |
* the show |
|
| 186 |
*/ |
|
| 187 |
public JobHandler(String title, boolean show) {
|
|
| 188 |
super(title); |
|
| 189 |
this.setUser(show); |
|
| 190 |
} |
|
| 191 |
|
|
| 192 | 182 |
/* |
| 193 | 183 |
* use this function to do something with SWT objects |
| 194 | 184 |
*/ |
Formats disponibles : Unified diff