diff options
| author | Robert Godfrey <rgodfrey@apache.org> | 2012-01-27 20:15:31 +0000 |
|---|---|---|
| committer | Robert Godfrey <rgodfrey@apache.org> | 2012-01-27 20:15:31 +0000 |
| commit | bb3fe508f98ec31109f951fb059ee49746a36d48 (patch) | |
| tree | 0d6e4351925947b2a9092723b6b0b4ddda64e2a4 /qpid/java/management/eclipse-plugin/src | |
| parent | 41b4e58c9736967d2260755ac38793aea1ecce8f (diff) | |
| download | qpid-python-bb3fe508f98ec31109f951fb059ee49746a36d48.tar.gz | |
NO-JIRA: Encapsulate fields, use private members and accesors (keep checkstyle happy)
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1236867 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/management/eclipse-plugin/src')
15 files changed, 149 insertions, 84 deletions
diff --git a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/Application.java b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/Application.java index a1c4b7ddb0..5855b9ae55 100644 --- a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/Application.java +++ b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/Application.java @@ -31,7 +31,7 @@ import org.eclipse.ui.PlatformUI; */ public class Application implements IPlatformRunnable { - static Shell shell = null; + private static Shell shell = null; /* * The call to createAndRunWorkbench will not return until the workbench is closed. diff --git a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/model/AttributeData.java b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/model/AttributeData.java index 5b188d8046..36c67a6ae1 100644 --- a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/model/AttributeData.java +++ b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/model/AttributeData.java @@ -22,12 +22,12 @@ package org.apache.qpid.management.ui.model; public class AttributeData { - String name = ""; - String description = ""; - String dataType = ""; - Object value = ""; - boolean readable = true; - boolean writable = false; + private String name = ""; + private String description = ""; + private String dataType = ""; + private Object value = ""; + private boolean readable = true; + private boolean writable = false; public String getDataType() diff --git a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/model/ManagedAttributeModel.java b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/model/ManagedAttributeModel.java index c4d2b91f81..41a37bf428 100644 --- a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/model/ManagedAttributeModel.java +++ b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/model/ManagedAttributeModel.java @@ -26,7 +26,7 @@ import java.util.List; public class ManagedAttributeModel { - HashMap<String, AttributeData> _attributeMap = new HashMap<String, AttributeData>(); + private HashMap<String, AttributeData> _attributeMap = new HashMap<String, AttributeData>(); public void setAttributeValue(String name, Object value) { diff --git a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/model/NotificationInfoModel.java b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/model/NotificationInfoModel.java index 6d4160889e..7cfc9e41c2 100644 --- a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/model/NotificationInfoModel.java +++ b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/model/NotificationInfoModel.java @@ -22,9 +22,9 @@ package org.apache.qpid.management.ui.model; public class NotificationInfoModel { - String name; - String description; - String[] types; + private String name; + private String description; + private String[] types; public NotificationInfoModel(String name, String desc, String[] types) { diff --git a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/model/OperationDataModel.java b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/model/OperationDataModel.java index 2595841287..95f6d0c9b8 100644 --- a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/model/OperationDataModel.java +++ b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/model/OperationDataModel.java @@ -28,7 +28,7 @@ import java.util.List; public class OperationDataModel { - HashMap<String, OperationData> _operationMap = new HashMap<String, OperationData>(); + private HashMap<String, OperationData> _operationMap = new HashMap<String, OperationData>(); public void addOperation(MBeanOperationInfo opInfo) { diff --git a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/AttributesTabControl.java b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/AttributesTabControl.java index f929e73353..de356ddb13 100644 --- a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/AttributesTabControl.java +++ b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/AttributesTabControl.java @@ -94,7 +94,7 @@ public class AttributesTabControl extends TabControl private Composite _buttonsComposite = null; private DisposeListener tableDisposeListener = new DisposeListenerImpl(); - final Image image; + private final Image image; private Button _detailsButton = null; private Button _editButton = null; private Button _graphButton = null; @@ -288,8 +288,8 @@ public class AttributesTabControl extends TabControl */ private class MouseListenerImpl implements MouseTrackListener, MouseMoveListener, KeyListener, MouseListener { - Shell tooltipShell = null; - Label tooltipLabel = null; + private Shell tooltipShell = null; + private Label tooltipLabel = null; public void mouseHover(MouseEvent event) { TableItem item = _table.getItem (new Point (event.x, event.y)); @@ -418,7 +418,7 @@ public class AttributesTabControl extends TabControl /** * Listener class for table tooltip label */ - final Listener tooltipLabelListener = new Listener () + private final Listener tooltipLabelListener = new Listener () { public void handleEvent (Event event) { @@ -850,7 +850,7 @@ public class AttributesTabControl extends TabControl IFontProvider, IColorProvider { - AttributeData attribute = null; + private AttributeData attribute = null; public String getColumnText(Object element, int columnIndex) { String result = ""; diff --git a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/NavigationView.java b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/NavigationView.java index 6723f751e9..d2cf99a1d4 100644 --- a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/NavigationView.java +++ b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/NavigationView.java @@ -176,8 +176,8 @@ public class NavigationView extends ViewPart // with right click. _treeViewer.getTree().addListener(SWT.MenuDetect, new Listener() { - Display display = getSite().getShell().getDisplay(); - final Shell shell = new Shell(display); + private Display display = getSite().getShell().getDisplay(); + private final Shell shell = new Shell(display); public void handleEvent(Event event) { diff --git a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/VHNotificationsTabControl.java b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/VHNotificationsTabControl.java index 1c9e221dee..4fc4ddc07b 100644 --- a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/VHNotificationsTabControl.java +++ b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/VHNotificationsTabControl.java @@ -220,8 +220,8 @@ public class VHNotificationsTabControl extends TabControl { _tableViewer.addDoubleClickListener(new IDoubleClickListener() { - Display display = null; - Shell shell = null; + private Display display = null; + private Shell shell = null; public void doubleClick(DoubleClickEvent event) { display = Display.getCurrent(); @@ -344,7 +344,7 @@ public class VHNotificationsTabControl extends TabControl */ protected static class LabelProviderImpl implements ITableLabelProvider { - List<ILabelProviderListener> listeners = new ArrayList<ILabelProviderListener>(); + private List<ILabelProviderListener> listeners = new ArrayList<ILabelProviderListener>(); public void addListener(ILabelProviderListener listener) { listeners.add(listener); diff --git a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/ViewUtility.java b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/ViewUtility.java index 10e2f78c1c..ba4e091b73 100644 --- a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/ViewUtility.java +++ b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/ViewUtility.java @@ -99,8 +99,8 @@ public class ViewUtility } private static final int DEFAULT_CONTENT_SIZE = 198; - static Button _firstButton, _nextButton, _previousButton, _lastButton; - static Text _hexNumTextToEnd, _hexNumTextToStart; + private static Button _firstButton, _nextButton, _previousButton, _lastButton; + private static Text _hexNumTextToEnd, _hexNumTextToStart; /** * Populates the composite with given openmbean data type (TabularType or CompositeType) diff --git a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/exchange/ExchangeOperationsTabControl.java b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/exchange/ExchangeOperationsTabControl.java index 07620a1cba..43db89baea 100644 --- a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/exchange/ExchangeOperationsTabControl.java +++ b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/exchange/ExchangeOperationsTabControl.java @@ -397,7 +397,7 @@ public class ExchangeOperationsTabControl extends TabControl */ private static class ContentProviderImpl implements IStructuredContentProvider { - String type; + private String type; public ContentProviderImpl(String type) { @@ -435,7 +435,7 @@ public class ExchangeOperationsTabControl extends TabControl */ private static class LabelProviderImpl extends LabelProvider implements ITableLabelProvider { - String type; + private String type; public LabelProviderImpl(String type) { diff --git a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/exchange/HeadersExchangeOperationsTabControl.java b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/exchange/HeadersExchangeOperationsTabControl.java index d9043e7cb4..6b8b744c43 100644 --- a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/exchange/HeadersExchangeOperationsTabControl.java +++ b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/exchange/HeadersExchangeOperationsTabControl.java @@ -336,7 +336,7 @@ public class HeadersExchangeOperationsTabControl extends TabControl */ private static class ContentProviderImpl implements IStructuredContentProvider { - String type; + private String type; public ContentProviderImpl(String type) { @@ -374,7 +374,7 @@ public class HeadersExchangeOperationsTabControl extends TabControl */ private static class LabelProviderImpl extends LabelProvider implements ITableLabelProvider { - String type; + private String type; public LabelProviderImpl(String type) { diff --git a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/ConnectionTypeTabControl.java b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/ConnectionTypeTabControl.java index 0251401686..37bd17c3c3 100644 --- a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/ConnectionTypeTabControl.java +++ b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/ConnectionTypeTabControl.java @@ -45,7 +45,7 @@ public class ConnectionTypeTabControl extends MBeanTypeTabControl @Override protected List<ManagedBean> getMbeans() { - return _serverRegistry.getConnections(_virtualHost); + return getServerRegistry().getConnections(getVirtualHost()); } } diff --git a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/ExchangeTypeTabControl.java b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/ExchangeTypeTabControl.java index e793751711..3995f94eb0 100644 --- a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/ExchangeTypeTabControl.java +++ b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/ExchangeTypeTabControl.java @@ -40,7 +40,7 @@ public class ExchangeTypeTabControl extends MBeanTypeTabControl @Override protected List<ManagedBean> getMbeans() { - return _serverRegistry.getExchanges(_virtualHost); + return getServerRegistry().getExchanges(getVirtualHost()); } } diff --git a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/MBeanTypeTabControl.java b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/MBeanTypeTabControl.java index 4f33b7eb04..17d430efee 100644 --- a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/MBeanTypeTabControl.java +++ b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/MBeanTypeTabControl.java @@ -65,20 +65,20 @@ import java.util.List; public abstract class MBeanTypeTabControl extends TabControl { - protected FormToolkit _toolkit; - protected Form _form; - protected Table _table = null; - protected TableViewer _tableViewer = null; - - protected List<ManagedBean> _mbeans = null; - protected String _type; - protected ApiVersion _ApiVersion; - protected JMXManagedObject _vhostMbean; - protected String _virtualHost; - protected JMXServerRegistry _serverRegistry; - protected Composite _tableComposite; - protected Button _favouritesButton; - protected Button _openButton; + private FormToolkit _toolkit; + private Form _form; + private Table _table = null; + private TableViewer _tableViewer = null; + + private List<ManagedBean> _mbeanList = null; + private String _type; + private ApiVersion _ApiVersion; + private JMXManagedObject _vhostMbean; + private String _virtualHost; + private JMXServerRegistry _serverRegistry; + private Composite _tableComposite; + private Button _favouritesButton; + private Button _openButton; public MBeanTypeTabControl(TabFolder tabFolder, ManagedServer server, String virtualHost, String type) { @@ -125,9 +125,9 @@ public abstract class MBeanTypeTabControl extends TabControl @Override public void refresh(ManagedBean mbean) { - _mbeans = getMbeans(); + _mbeanList = getMbeans(); - _tableViewer.setInput(_mbeans); + _tableViewer.setInput(_mbeanList); layout(); } @@ -291,7 +291,72 @@ public abstract class MBeanTypeTabControl extends TabControl { } - + + protected FormToolkit getToolkit() + { + return _toolkit; + } + + protected Table getTable() + { + return _table; + } + + protected void setTable(Table table) + { + _table = table; + } + + protected TableViewer getTableViewer() + { + return _tableViewer; + } + + protected void setTableViewer(TableViewer tableViewer) + { + _tableViewer = tableViewer; + } + + protected List<ManagedBean> getMbeanList() + { + return _mbeanList; + } + + protected void setMbeanList(List<ManagedBean> mbeanList) + { + _mbeanList = mbeanList; + } + + protected String getType() + { + return _type; + } + + protected ApiVersion getApiVersion() + { + return _ApiVersion; + } + + protected JMXManagedObject getVhostMbean() + { + return _vhostMbean; + } + + protected String getVirtualHost() + { + return _virtualHost; + } + + protected JMXServerRegistry getServerRegistry() + { + return _serverRegistry; + } + + protected Composite getTableComposite() + { + return _tableComposite; + } + /** * Content Provider class for the table viewer */ diff --git a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/QueueTypeTabControl.java b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/QueueTypeTabControl.java index 592dc1e4cb..6cf9981c9e 100644 --- a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/QueueTypeTabControl.java +++ b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/type/QueueTypeTabControl.java @@ -110,11 +110,11 @@ public class QueueTypeTabControl extends MBeanTypeTabControl public QueueTypeTabControl(TabFolder tabFolder, ManagedServer server, String virtualHost) { super(tabFolder,server,virtualHost,QUEUE); - _mbsc = (MBeanServerConnection) _serverRegistry.getServerConnection(); + _mbsc = (MBeanServerConnection) getServerRegistry().getServerConnection(); //create a proxy for the VirtualHostManager mbean to use in retrieving the attribute names/values _vhmb = MBeanServerInvocationHandler.newProxyInstance(_mbsc, - _vhostMbean.getObjectName(), ManagedBroker.class, false); + getVhostMbean().getObjectName(), ManagedBroker.class, false); } @@ -235,7 +235,7 @@ public class QueueTypeTabControl extends MBeanTypeTabControl { List<List<Object>> values = null; - if(_ApiVersion.greaterThanOrEqualTo(1, 3)) + if(getApiVersion().greaterThanOrEqualTo(1, 3)) { //Qpid JMX API 1.3+, use this virtualhosts VirtualHostManager MBean //to retrieve the attributes values requested for all queues at once @@ -245,18 +245,18 @@ public class QueueTypeTabControl extends MBeanTypeTabControl } catch(Exception e) { - MBeanUtility.handleException(_vhostMbean, e); + MBeanUtility.handleException(getVhostMbean(), e); } } else { //Qpid JMX API 1.2 or below, use the local ManagedBeans and look //up the attribute values for each queue individually - _mbeans = getMbeans(); - values = MBeanUtility.getQueueAttributes(_mbeans, _selectedAttributes.toArray(new String[0])); + setMbeanList(getMbeans()); + values = MBeanUtility.getQueueAttributes(getMbeanList(), _selectedAttributes.toArray(new String[0])); } - _tableViewer.setInput(values); + getTableViewer().setInput(values); layout(); } finally @@ -270,31 +270,31 @@ public class QueueTypeTabControl extends MBeanTypeTabControl @Override protected List<ManagedBean> getMbeans() { - return _serverRegistry.getQueues(_virtualHost); + return getServerRegistry().getQueues(getVirtualHost()); } private void clearTableComposite() { - ViewUtility.disposeChildren(_tableComposite); + ViewUtility.disposeChildren(getTableComposite()); } @Override protected void createTable() { - _table = new Table (_tableComposite, SWT.MULTI | SWT.SCROLL_LINE | SWT.BORDER | SWT.FULL_SELECTION); - _table.setLinesVisible (true); - _table.setHeaderVisible (true); + setTable(new Table (getTableComposite(), SWT.MULTI | SWT.SCROLL_LINE | SWT.BORDER | SWT.FULL_SELECTION)); + getTable().setLinesVisible(true); + getTable().setHeaderVisible(true); GridData data = new GridData(SWT.FILL, SWT.FILL, true, true); - _table.setLayoutData(data); + getTable().setLayoutData(data); - _tableViewer = new TableViewer(_table); + setTableViewer(new TableViewer(getTable())); final QueueTableSorter tableSorter = new QueueTableSorter(); for (int i = 0; i < _selectedAttributes.size(); i++) { final int index = i; - final TableViewerColumn viewerColumn = new TableViewerColumn(_tableViewer, SWT.NONE); + final TableViewerColumn viewerColumn = new TableViewerColumn(getTableViewer(), SWT.NONE); final TableColumn column = viewerColumn.getColumn(); String attrName = _selectedAttributes.get(i); @@ -320,7 +320,7 @@ public class QueueTypeTabControl extends MBeanTypeTabControl public void widgetSelected(SelectionEvent e) { tableSorter.setColumn(index); - final TableViewer viewer = _tableViewer; + final TableViewer viewer = getTableViewer(); int dir = viewer .getTable().getSortDirection(); if (viewer.getTable().getSortColumn() == column) { @@ -338,25 +338,25 @@ public class QueueTypeTabControl extends MBeanTypeTabControl } - _tableViewer.setContentProvider(new QueueContentProviderImpl()); - _tableViewer.setLabelProvider(new QueueLabelProviderImpl()); + getTableViewer().setContentProvider(new QueueContentProviderImpl()); + getTableViewer().setLabelProvider(new QueueLabelProviderImpl()); - _tableViewer.setUseHashlookup(true); - _tableViewer.setSorter(tableSorter); - _table.setSortColumn(_table.getColumn(0)); - _table.setSortDirection(SWT.UP); + getTableViewer().setUseHashlookup(true); + getTableViewer().setSorter(tableSorter); + getTable().setSortColumn(getTable().getColumn(0)); + getTable().setSortDirection(SWT.UP); addTableListeners(); } protected void createLowerAreaButton(Composite parent) { - Composite lowerButtonComposite = _toolkit.createComposite(parent, SWT.NONE); + Composite lowerButtonComposite = getToolkit().createComposite(parent, SWT.NONE); GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, false); lowerButtonComposite.setLayoutData(gridData); lowerButtonComposite.setLayout(new GridLayout()); - final Button attributesButton = _toolkit.createButton(lowerButtonComposite, "Select Attributes ...", SWT.PUSH); + final Button attributesButton = getToolkit().createButton(lowerButtonComposite, "Select Attributes ...", SWT.PUSH); gridData = new GridData(SWT.RIGHT, SWT.CENTER, true, false); attributesButton.setLayoutData(gridData); attributesButton.addSelectionListener(new SelectionAdapter() @@ -372,7 +372,7 @@ public class QueueTypeTabControl extends MBeanTypeTabControl { List<String> availableAttributes; - if(_ApiVersion.greaterThanOrEqualTo(1, 3)) + if(getApiVersion().greaterThanOrEqualTo(1, 3)) { //Qpid JMX API 1.3+, request the current queue attributes names from the broker try @@ -395,7 +395,7 @@ public class QueueTypeTabControl extends MBeanTypeTabControl final Shell shell = ViewUtility.createModalDialogShell(parent, "Select Attributes"); - Composite attributesComposite = _toolkit.createComposite(shell, SWT.NONE); + Composite attributesComposite = getToolkit().createComposite(shell, SWT.NONE); attributesComposite.setBackground(shell.getBackground()); attributesComposite.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false)); attributesComposite.setLayout(new GridLayout(2,false)); @@ -441,14 +441,14 @@ public class QueueTypeTabControl extends MBeanTypeTabControl }); } - Composite okCancelButtonsComp = _toolkit.createComposite(shell); + Composite okCancelButtonsComp = getToolkit().createComposite(shell); okCancelButtonsComp.setBackground(shell.getBackground()); okCancelButtonsComp.setLayoutData(new GridData(SWT.RIGHT, SWT.FILL, true, true)); okCancelButtonsComp.setLayout(new GridLayout(2,false)); - Button okButton = _toolkit.createButton(okCancelButtonsComp, "OK", SWT.PUSH); + Button okButton = getToolkit().createButton(okCancelButtonsComp, "OK", SWT.PUSH); okButton.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, false, false)); - Button cancelButton = _toolkit.createButton(okCancelButtonsComp, "Cancel", SWT.PUSH); + Button cancelButton = getToolkit().createButton(okCancelButtonsComp, "Cancel", SWT.PUSH); cancelButton.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, false, false)); okButton.addSelectionListener(new SelectionAdapter() @@ -506,7 +506,7 @@ public class QueueTypeTabControl extends MBeanTypeTabControl return "-"; } - if (_ApiVersion.greaterThanOrEqualTo(1,2)) + if (getApiVersion().greaterThanOrEqualTo(1, 2)) { //Qpid JMX API 1.2 or above, returns Bytes return convertLongBytesToText(value); @@ -675,14 +675,14 @@ public class QueueTypeTabControl extends MBeanTypeTabControl @Override protected void addMBeanToFavourites() { - int selectionIndex = _table.getSelectionIndex(); + int selectionIndex = getTable().getSelectionIndex(); if (selectionIndex == -1) { return; } - int[] selectedIndices = _table.getSelectionIndices(); + int[] selectedIndices = getTable().getSelectionIndices(); ArrayList<ManagedBean> selectedMBeans = new ArrayList<ManagedBean>(); @@ -690,10 +690,10 @@ public class QueueTypeTabControl extends MBeanTypeTabControl //the entries are created from an List<Object> with the attribute values (name first) for(int index = 0; index < selectedIndices.length ; index++) { - List<Object> queueEntry = (List<Object>) _table.getItem(selectedIndices[index]).getData(); + List<Object> queueEntry = (List<Object>) getTable().getItem(selectedIndices[index]).getData(); String queueName = (String) queueEntry.get(0); - ManagedBean queueMBean = _serverRegistry.getQueue(queueName, _virtualHost); + ManagedBean queueMBean = getServerRegistry().getQueue(queueName, getVirtualHost()); //check queue had not already been unregistered before trying to add it if(queueMBean != null) @@ -740,7 +740,7 @@ public class QueueTypeTabControl extends MBeanTypeTabControl @Override protected void openMBean() { - int selectionIndex = _table.getSelectionIndex(); + int selectionIndex = getTable().getSelectionIndex(); if (selectionIndex == -1) { @@ -750,9 +750,9 @@ public class QueueTypeTabControl extends MBeanTypeTabControl ManagedBean selectedMBean; //the entries are created from an List<Object> with the attribute values (name first) - List<Object> queueEntry = (List<Object>) _table.getItem(selectionIndex).getData(); + List<Object> queueEntry = (List<Object>) getTable().getItem(selectionIndex).getData(); String queueName = (String) queueEntry.get(0); - selectedMBean = _serverRegistry.getQueue(queueName, _virtualHost); + selectedMBean = getServerRegistry().getQueue(queueName, getVirtualHost()); if(selectedMBean == null) { |
