use of org.netxms.ui.eclipse.widgets.CompositeWithMessageBar in project netxms by netxms.
the class ObjectAlarmBrowser method createPartControl.
/* (non-Javadoc)
* @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
*/
@Override
public void createPartControl(Composite parent) {
parent.setLayout(new FillLayout());
content = new CompositeWithMessageBar(parent, SWT.NONE);
// $NON-NLS-1$
alarmView = new AlarmList(this, content.getContent(), SWT.NONE, "ObjectAlarmBrowser", null);
alarmView.setRootObjects(objects);
if (objects.size() == 1) {
NXCSession session = (NXCSession) ConsoleSharedData.getSession();
setPartName(String.format(Messages.get().ObjectAlarmBrowser_Title, session.getObjectName(objects.get(0))));
// content.hideMessage();
} else {
setPartName(Messages.get().ObjectAlarmBrowser_TitleMultipleObjects);
showObjectList();
}
createActions();
contributeToActionBars();
getSite().setSelectionProvider(alarmView.getSelectionProvider());
}
use of org.netxms.ui.eclipse.widgets.CompositeWithMessageBar in project netxms by netxms.
the class ScriptEditorView method createPartControl.
/* (non-Javadoc)
* @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
*/
@Override
public void createPartControl(Composite parent) {
parent.setLayout(new FillLayout());
editorMessageBar = new CompositeWithMessageBar(parent, SWT.NONE);
editor = new ScriptEditor(editorMessageBar, SWT.NONE, SWT.H_SCROLL | SWT.V_SCROLL, showLineNumbers);
editorMessageBar.setContent(editor);
editor.getTextWidget().addModifyListener(new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
if (!modified) {
modified = true;
firePropertyChange(PROP_DIRTY);
actionSave.setEnabled(true);
}
}
});
activateContext();
createActions();
contributeToActionBars();
// createPopupMenu();
reloadScript();
}
Aggregations