use of de.janrufmonitor.ui.jface.dialogs.CommentDialog in project janrufmonitor by tbrandt77.
the class NewAction method run.
public void run() {
Object callableObject = null;
if (this.m_app instanceof Comment) {
callableObject = ((Comment) this.m_app).getCallableObject();
}
CommentDialog cd = new CommentDialog(DisplayManager.getDefaultDisplay().getActiveShell(), null, callableObject);
int result = cd.open();
if (result == CommentDialog.OK) {
IComment c = cd.getResult();
this.m_app.getController().updateElement(c);
this.m_app.updateViews(true);
}
}
use of de.janrufmonitor.ui.jface.dialogs.CommentDialog in project janrufmonitor by tbrandt77.
the class ChangeAction method run.
public void run() {
Viewer v = this.m_app.getApplication().getViewer();
if (v != null) {
IStructuredSelection selection = (IStructuredSelection) v.getSelection();
if (!selection.isEmpty()) {
Object o = selection.getFirstElement();
if (o instanceof IComment) {
Object callableObject = null;
if (this.m_app instanceof Comment) {
callableObject = ((Comment) this.m_app).getCallableObject();
}
CommentDialog cd = new CommentDialog(DisplayManager.getDefaultDisplay().getActiveShell(), ((IComment) o), callableObject);
int result = cd.open();
if (result == CommentDialog.OK) {
IComment c = cd.getResult();
this.m_app.getController().updateElement(c);
this.m_app.updateViews(true);
}
}
}
}
}
Aggregations