|
Lines 41-46
Link Here
|
| 41 |
import org.eclipse.ui.forms.editor.FormPage; |
41 |
import org.eclipse.ui.forms.editor.FormPage; |
| 42 |
import org.eclipse.ui.forms.editor.IFormPage; |
42 |
import org.eclipse.ui.forms.editor.IFormPage; |
| 43 |
import org.eclipse.ui.forms.editor.SharedHeaderFormEditor; |
43 |
import org.eclipse.ui.forms.editor.SharedHeaderFormEditor; |
|
|
44 |
import org.eclipse.ui.forms.events.IHyperlinkListener; |
| 44 |
import org.eclipse.ui.forms.widgets.Form; |
45 |
import org.eclipse.ui.forms.widgets.Form; |
| 45 |
import org.eclipse.ui.progress.IWorkbenchSiteProgressService; |
46 |
import org.eclipse.ui.progress.IWorkbenchSiteProgressService; |
| 46 |
|
47 |
|
|
Lines 69-74
Link Here
|
| 69 |
|
70 |
|
| 70 |
private EditorBusyIndicator editorBusyIndicator; |
71 |
private EditorBusyIndicator editorBusyIndicator; |
| 71 |
|
72 |
|
|
|
73 |
private IHyperlinkListener messageHyperLinkListener; |
| 74 |
|
| 72 |
public TaskEditor() { |
75 |
public TaskEditor() { |
| 73 |
super(); |
76 |
super(); |
| 74 |
taskPlanningEditor = new TaskPlanningEditor(this); |
77 |
taskPlanningEditor = new TaskPlanningEditor(this); |
|
Lines 434-447
Link Here
|
| 434 |
return this.getHeaderForm().getForm().getForm(); |
437 |
return this.getHeaderForm().getForm().getForm(); |
| 435 |
} |
438 |
} |
| 436 |
|
439 |
|
| 437 |
public void setMessage(String message, int type) { |
440 |
/** |
|
|
441 |
* @since 2.3 |
| 442 |
*/ |
| 443 |
public void setMessage(String message, int type, IHyperlinkListener listener) { |
| 438 |
if (this.getHeaderForm() != null && this.getHeaderForm().getForm() != null) { |
444 |
if (this.getHeaderForm() != null && this.getHeaderForm().getForm() != null) { |
| 439 |
if (!this.getHeaderForm().getForm().isDisposed()) { |
445 |
if (!this.getHeaderForm().getForm().isDisposed()) { |
| 440 |
this.getHeaderForm().getForm().setMessage(message, type); |
446 |
getTopForm().setMessage(message, type); |
|
|
447 |
|
| 448 |
if (messageHyperLinkListener != null) { |
| 449 |
getTopForm().removeMessageHyperlinkListener(messageHyperLinkListener); |
| 450 |
} |
| 451 |
if (listener != null) { |
| 452 |
getTopForm().addMessageHyperlinkListener(listener); |
| 453 |
//this.getHeaderForm().getForm().setMessage(message, type); |
| 454 |
} |
| 455 |
messageHyperLinkListener = listener; |
| 441 |
} |
456 |
} |
| 442 |
} |
457 |
} |
| 443 |
} |
458 |
} |
| 444 |
|
459 |
|
|
|
460 |
public void setMessage(String message, int type) { |
| 461 |
setMessage(message, type, null); |
| 462 |
} |
| 463 |
|
| 445 |
protected IWorkbenchSiteProgressService getProgressService() { |
464 |
protected IWorkbenchSiteProgressService getProgressService() { |
| 446 |
Object siteService = getEditorSite().getAdapter(IWorkbenchSiteProgressService.class); |
465 |
Object siteService = getEditorSite().getAdapter(IWorkbenchSiteProgressService.class); |
| 447 |
if (siteService != null) |
466 |
if (siteService != null) |