|
Lines 16-21
Link Here
|
| 16 |
import org.eclipse.core.runtime.IProgressMonitor; |
16 |
import org.eclipse.core.runtime.IProgressMonitor; |
| 17 |
import org.eclipse.core.runtime.OperationCanceledException; |
17 |
import org.eclipse.core.runtime.OperationCanceledException; |
| 18 |
import org.eclipse.jface.dialogs.Dialog; |
18 |
import org.eclipse.jface.dialogs.Dialog; |
|
|
19 |
import org.eclipse.jface.dialogs.DialogSettings; |
| 20 |
import org.eclipse.jface.dialogs.IDialogSettings; |
| 19 |
import org.eclipse.jface.dialogs.MessageDialog; |
21 |
import org.eclipse.jface.dialogs.MessageDialog; |
| 20 |
import org.eclipse.jface.layout.GridDataFactory; |
22 |
import org.eclipse.jface.layout.GridDataFactory; |
| 21 |
import org.eclipse.jface.operation.IRunnableWithProgress; |
23 |
import org.eclipse.jface.operation.IRunnableWithProgress; |
|
Lines 29-34
Link Here
|
| 29 |
import org.eclipse.swt.events.KeyListener; |
31 |
import org.eclipse.swt.events.KeyListener; |
| 30 |
import org.eclipse.swt.events.SelectionAdapter; |
32 |
import org.eclipse.swt.events.SelectionAdapter; |
| 31 |
import org.eclipse.swt.events.SelectionEvent; |
33 |
import org.eclipse.swt.events.SelectionEvent; |
|
|
34 |
import org.eclipse.swt.graphics.Rectangle; |
| 32 |
import org.eclipse.swt.layout.FillLayout; |
35 |
import org.eclipse.swt.layout.FillLayout; |
| 33 |
import org.eclipse.swt.layout.GridData; |
36 |
import org.eclipse.swt.layout.GridData; |
| 34 |
import org.eclipse.swt.layout.GridLayout; |
37 |
import org.eclipse.swt.layout.GridLayout; |
|
Lines 37-44
Link Here
|
| 37 |
import org.eclipse.swt.widgets.Control; |
40 |
import org.eclipse.swt.widgets.Control; |
| 38 |
import org.eclipse.swt.widgets.Display; |
41 |
import org.eclipse.swt.widgets.Display; |
| 39 |
import org.eclipse.swt.widgets.Label; |
42 |
import org.eclipse.swt.widgets.Label; |
|
|
43 |
import org.eclipse.swt.widgets.Shell; |
| 40 |
import org.eclipse.swt.widgets.Text; |
44 |
import org.eclipse.swt.widgets.Text; |
| 41 |
import org.eclipse.ui.PlatformUI; |
45 |
import org.eclipse.ui.PlatformUI; |
|
|
46 |
import org.eclipse.ui.plugin.AbstractUIPlugin; |
| 42 |
import org.eclipse.ui.progress.IProgressService; |
47 |
import org.eclipse.ui.progress.IProgressService; |
| 43 |
|
48 |
|
| 44 |
/** |
49 |
/** |
|
Lines 57-62
Link Here
|
| 57 |
|
62 |
|
| 58 |
private boolean needsRepositoryConfiguration = true; |
63 |
private boolean needsRepositoryConfiguration = true; |
| 59 |
|
64 |
|
|
|
65 |
// dialog store id constants |
| 66 |
private final static String DIALOG_BOUNDS_KEY = "ResizableDialogBounds"; //$NON-NLS-1$ |
| 67 |
|
| 68 |
private static final String X = "x"; //$NON-NLS-1$ |
| 69 |
|
| 70 |
private static final String Y = "y"; //$NON-NLS-1$ |
| 71 |
|
| 72 |
private static final String WIDTH = "width"; //$NON-NLS-1$ |
| 73 |
|
| 74 |
private static final String HEIGHT = "height"; //$NON-NLS-1$ |
| 75 |
|
| 60 |
public AbstractRepositoryQueryPage2(String pageName, TaskRepository repository, IRepositoryQuery query) { |
76 |
public AbstractRepositoryQueryPage2(String pageName, TaskRepository repository, IRepositoryQuery query) { |
| 61 |
super(pageName, repository, query); |
77 |
super(pageName, repository, query); |
| 62 |
this.connector = TasksUi.getRepositoryConnector(getTaskRepository().getConnectorKind()); |
78 |
this.connector = TasksUi.getRepositoryConnector(getTaskRepository().getConnectorKind()); |
|
Lines 266-269
Link Here
|
| 266 |
} |
282 |
} |
| 267 |
} |
283 |
} |
| 268 |
|
284 |
|
|
|
285 |
@Override |
| 286 |
public Shell getShell() { |
| 287 |
Shell shell = null; |
| 288 |
if (getWizard() != null && getWizard().getContainer() != null) { |
| 289 |
shell = getWizard().getContainer().getShell(); |
| 290 |
} |
| 291 |
if (shell == null && getControl() != null) { |
| 292 |
shell = getControl().getShell(); |
| 293 |
} |
| 294 |
return shell; |
| 295 |
} |
| 296 |
|
| 297 |
protected void saveBounds(AbstractUIPlugin plugin, String pageName) { |
| 298 |
Shell shell = getShell(); |
| 299 |
if (shell != null) { |
| 300 |
Rectangle bounds = shell.getBounds(); |
| 301 |
IDialogSettings settings = plugin.getDialogSettings(); |
| 302 |
IDialogSettings pageDialogSettings = settings.getSection(pageName); |
| 303 |
if (pageDialogSettings == null) { |
| 304 |
pageDialogSettings = settings.addNewSection(pageName); |
| 305 |
|
| 306 |
} |
| 307 |
IDialogSettings dialogBounds = settings.getSection(DIALOG_BOUNDS_KEY); |
| 308 |
if (dialogBounds == null) { |
| 309 |
dialogBounds = new DialogSettings(DIALOG_BOUNDS_KEY); |
| 310 |
settings.addSection(dialogBounds); |
| 311 |
} |
| 312 |
dialogBounds.put(X, bounds.x); |
| 313 |
dialogBounds.put(Y, bounds.y); |
| 314 |
dialogBounds.put(WIDTH, bounds.width); |
| 315 |
dialogBounds.put(HEIGHT, bounds.height); |
| 316 |
} |
| 317 |
} |
| 318 |
|
| 269 |
} |
319 |
} |