### Eclipse Workspace Patch 1.0
#P org.jboss.ide.eclipse.as.ui
Index: jbossui/org/jboss/ide/eclipse/as/ui/dialogs/RequiredCredentialsDialog.java
===================================================================
--- jbossui/org/jboss/ide/eclipse/as/ui/dialogs/RequiredCredentialsDialog.java	(revision 10181)
+++ jbossui/org/jboss/ide/eclipse/as/ui/dialogs/RequiredCredentialsDialog.java	(working copy)
@@ -1,169 +0,0 @@
-/**
- * JBoss, a Division of Red Hat
- * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ide.eclipse.as.ui.dialogs;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
-import org.jboss.ide.eclipse.as.ui.Messages;
-
-/**
- * @author rob.stryker <rob.stryker@redhat.com>
- * 
- */
-public class RequiredCredentialsDialog extends Dialog {
-
-	private String user, pass;
-	private boolean save;
-	private JBossServer jbs;
-	
-	public RequiredCredentialsDialog(Shell parentShell, JBossServer jbs) {
-		super(parentShell);
-		setShellStyle(getShellStyle() | SWT.RESIZE);
-		this.jbs = jbs;
-	}
-
-	protected void configureShell(Shell newShell) {
-		super.configureShell(newShell);
-		newShell.setText("Server Credentials Required");
-	}
-
-	protected Control createDialogArea(Composite parent) {
-		Composite c = (Composite) super.createDialogArea(parent);
-		Composite main = new Composite(c, SWT.NONE);
-		main.setLayoutData(new GridData(GridData.FILL_BOTH));
-		main.setLayout(new FormLayout());
-
-		// make widgets
-		Label top = new Label(main, SWT.NONE);
-		Label userLabel = new Label(main, SWT.NONE);
-		Label passLabel = new Label(main, SWT.NONE);
-		final Text userText = new Text(main, SWT.DEFAULT);
-		final Text passText = new Text(main, SWT.DEFAULT);
-		userText.setEditable(true);
-		passText.setEditable(true);
-		final Button saveCredentials = new Button(main, SWT.CHECK);
-		
-		top.setLayoutData(createFormData(0,5,null,0,0,5,100,-5));
-		userLabel.setLayoutData(createFormData(top, 10, null, 0, 0,5, 100, -5));
-		userText.setLayoutData(createFormData(userLabel, 5, null, 0, 0,5, 100, -5));
-		passLabel.setLayoutData(createFormData(userText, 10, null, 0, 0,5, 100, -5));
-		passText.setLayoutData(createFormData(passLabel, 5, null, 0, 0,5, 100, -5));
-		saveCredentials.setLayoutData(createFormData(passText, 10, null, 0, 0,5, 100, -5));
-		
-		top.setText(Messages.credentials_warning);
-		userLabel.setText(Messages.swf_Username);
-		passLabel.setText(Messages.swf_Password);
-		saveCredentials.setText(Messages.credentials_save);
-		
-		ModifyListener listener = new ModifyListener() {
-			public void modifyText(ModifyEvent e) {
-				user = userText.getText();
-				pass = passText.getText();
-				save = saveCredentials.getSelection();
-			}
-		};
-		SelectionListener listener2 = new SelectionListener() {
-			public void widgetDefaultSelected(SelectionEvent e) {
-				widgetSelected(e);
-			}
-			public void widgetSelected(SelectionEvent e) {
-				user = userText.getText();
-				pass = passText.getText();
-				save = saveCredentials.getSelection();
-			}
-		};
-		userText.addModifyListener(listener);
-		passText.addModifyListener(listener);
-		saveCredentials.addSelectionListener(listener2);
-		
-		// defaults
-		userText.setText(jbs.getUsername());
-		userText.setSelection(0, jbs.getUsername() == null ? 0 : jbs.getUsername().length());
-		passText.setText(jbs.getPassword());
-		// save by default
-		saveCredentials.setSelection(true);
-		return c;
-	}
-
-	private FormData createFormData(Object topStart, int topOffset, Object bottomStart, int bottomOffset, 
-			Object leftStart, int leftOffset, Object rightStart, int rightOffset) {
-		FormData data = new FormData();
-
-		if( topStart != null ) {
-			data.top = topStart instanceof Control ? new FormAttachment((Control)topStart, topOffset) : 
-				new FormAttachment(((Integer)topStart).intValue(), topOffset);
-		}
-
-		if( bottomStart != null ) {
-			data.bottom = bottomStart instanceof Control ? new FormAttachment((Control)bottomStart, bottomOffset) : 
-				new FormAttachment(((Integer)bottomStart).intValue(), bottomOffset);
-		}
-
-		if( leftStart != null ) {
-			data.left = leftStart instanceof Control ? new FormAttachment((Control)leftStart, leftOffset) : 
-				new FormAttachment(((Integer)leftStart).intValue(), leftOffset);
-		}
-
-		if( rightStart != null ) {
-			data.right = rightStart instanceof Control ? new FormAttachment((Control)rightStart, rightOffset) : 
-				new FormAttachment(((Integer)rightStart).intValue(), rightOffset);
-		}
-
-		return data;
-	}
-	
-	/**
-	 * @return the user
-	 */
-	public String getUser() {
-		return user;
-	}
-
-	/**
-	 * @return the pass
-	 */
-	public String getPass() {
-		return pass;
-	}
-	
-	/**
-	 * @return whether to save
-	 */
-	public boolean getSave() {
-		return save;
-	}
-}
Index: jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/TreeEditorSelectionListener.java
===================================================================
--- jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/TreeEditorSelectionListener.java	(revision 10181)
+++ jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/TreeEditorSelectionListener.java	(working copy)
@@ -1,118 +0,0 @@
-package org.jboss.ide.eclipse.as.ui.views.server.providers.jmx;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.TreeEditor;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeItem;
-
-public class TreeEditorSelectionListener implements Listener {
-	
-	public static interface SelectionCallbackHandler {
-		public boolean canModify(TreeItem item);
-		public void cannotModify(TreeItem item);
-		public void handleChange(TreeItem item, Text text);
-	}
-	
-	private Color black;
-	private TreeEditor editor;
-	private Tree tree;
-	private int column;
-	private SelectionCallbackHandler callback;
-
-	public TreeEditorSelectionListener(Tree tree, int column, SelectionCallbackHandler handler) {
-		black = Display.getCurrent().getSystemColor(SWT.COLOR_BLACK);
-		editor = new TreeEditor(tree);
-		this.tree = tree;
-		this.column = column;
-		this.callback = handler;
-	}
-
-	public void handleEvent(Event event) {
-		if( callback == null ) return;
-
-		TreeItem[] selectedItems = tree.getSelection();
-		if (selectedItems.length != 1)
-			return;
-		final TreeItem item = selectedItems[0];
-		
-		if( !callback.canModify(item)) {
-			callback.cannotModify(item);
-			return;
-		}
-		
-		boolean isCarbon = SWT.getPlatform().equals("carbon");
-		final Composite composite = new Composite(tree, SWT.NONE);
-		if (!isCarbon)
-			composite.setBackground(black);
-		final Text text = new Text(composite, SWT.NONE);
-		final int inset = isCarbon ? 0 : 1;
-		composite.addListener(SWT.Resize, new Listener() {
-			public void handleEvent(Event e) {
-				Rectangle rect = composite.getClientArea();
-				text.setBounds(rect.x + inset, rect.y + inset, rect.width
-						- inset * 2, rect.height - inset * 2);
-			}
-		});
-		Listener textListener = new Listener() {
-			public void handleEvent(final Event e) {
-				switch (e.type) {
-				case SWT.FocusOut:
-					composite.dispose();
-					break;
-				case SWT.Verify:
-					String newText = text.getText();
-					String leftText = newText.substring(0, e.start);
-					String rightText = newText.substring(e.end, newText
-							.length());
-					GC gc = new GC(text);
-					Point size = gc.textExtent(leftText + e.text
-							+ rightText);
-					gc.dispose();
-					size = text.computeSize(size.x, SWT.DEFAULT);
-					editor.horizontalAlignment = SWT.LEFT;
-					Rectangle itemRect = item.getBounds(),
-					rect = tree.getClientArea();
-					editor.minimumWidth = Math.max(size.x, itemRect.width)
-							+ inset * 2;
-					int left = itemRect.x,
-					right = rect.x + rect.width;
-					editor.minimumWidth = Math.min(editor.minimumWidth,
-							right - left);
-					editor.minimumHeight = size.y + inset * 2;
-					editor.setColumn(column);
-					editor.layout();
-					break;
-				case SWT.Traverse:
-					switch (e.detail) {
-					case SWT.TRAVERSE_RETURN:
-						try {
-							callback.handleChange(item, text);
-						} catch( Exception except ) {}
-						// FALL THROUGH
-					case SWT.TRAVERSE_ESCAPE:
-						composite.dispose();
-						e.doit = false;
-					}
-					break;
-				}
-			}
-		};
-		text.addListener(SWT.FocusOut, textListener);
-		text.addListener(SWT.Traverse, textListener);
-		text.addListener(SWT.Verify, textListener);
-		editor.setEditor(composite, item);
-		text.setText(item.getText(column));
-		text.selectAll();
-		text.setFocus();
-
-	}
-}
Index: plugin.xml
===================================================================
--- plugin.xml	(revision 10181)
+++ plugin.xml	(working copy)
@@ -166,13 +166,6 @@
             id="org.jboss.ide.eclipse.as.ui.InactiveExtensionsProvider"
             name="Inactive Categories"
             providerClass="org.jboss.ide.eclipse.as.ui.views.server.providers.InactiveExtensionViewProvider"/>
-      <ViewProvider
-            description="A clone of the JMX view in the web browser"
-            icon="icons/jmxIcon.JPG"
-            id="org.jboss.ide.eclipse.as.ui.JMXProvider"
-            name="JMX Console"
-            providerClass="org.jboss.ide.eclipse.as.ui.views.server.providers.jmx.JMXViewProvider">
-      </ViewProvider>
    </extension>
    <!--
       <extension
@@ -315,16 +308,6 @@
          </enablement>
       </consolePatternMatchListener>
    </extension>
-   <extension
-         point="org.jboss.ide.eclipse.as.core.pollerFailureHandler">
-      <pollerHandler
-            class="org.jboss.ide.eclipse.as.ui.launch.SecurityFailureHandler"
-            id="org.jboss.ide.eclipse.as.ui.launch.securityPollerHandler">
-      </pollerHandler>
-   </extension>
-
-
-
 
    <extension point="org.eclipse.ui.actionSets">
       <actionSet description="%actionSets.serverActions.description" id="org.jboss.tools.jst.web.ui.server.actionSet" label="%actionSets.serverActions.label" visible="true">
Index: jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/JMXPropertySheetPage.java
===================================================================
--- jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/JMXPropertySheetPage.java	(revision 10181)
+++ jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/JMXPropertySheetPage.java	(working copy)
@@ -1,310 +0,0 @@
-/**
- * JBoss, a Division of Red Hat
- * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
-* This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ide.eclipse.as.ui.views.server.providers.jmx;
-
-import java.util.ArrayList;
-
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.FontData;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.part.PageBook;
-import org.eclipse.ui.views.properties.IPropertySheetPage;
-import org.jboss.ide.eclipse.as.core.extensions.jmx.JMXModel.JMXAttributesWrapper;
-import org.jboss.ide.eclipse.as.core.extensions.jmx.JMXModel.JMXBean;
-import org.jboss.ide.eclipse.as.core.extensions.jmx.JMXModel.JMXDomain;
-import org.jboss.ide.eclipse.as.core.extensions.jmx.JMXModel.WrappedMBeanOperationInfo;
-import org.jboss.ide.eclipse.as.ui.views.server.providers.jmx.JMXViewProvider.ErrorGroup;
-import org.jboss.tools.as.wst.server.ui.views.server.ExtensionTableViewer.ContentWrapper;
-
-/**
- * 
- * @author Rob Stryker <rob.stryker@redhat.com>
- *
- */
-public class JMXPropertySheetPage implements IPropertySheetPage {
-
-	// data
-	protected JMXViewProvider provider;
-	protected JMXBean bean;
-	protected WrappedMBeanOperationInfo[] operations;
-
-	// ui pieces
-	protected Composite main, domainGroup;
-	protected Combo pulldown;
-	protected Label beanLabel;
-	protected PageBook book;
-	protected ErrorGroup errorGroup;
-	protected OperationGroup operationGroup;
-	protected AttributeGroup attributeGroup;
-
-	public JMXPropertySheetPage(JMXViewProvider provider) {
-		this.provider = provider;
-	}
-
-	public void createControl(Composite parent) {
-		main = new Composite(parent, SWT.NONE);
-		main.setLayout(new FormLayout());
-
-		pulldown = new Combo(main, SWT.READ_ONLY);
-		FormData pulldownData = new FormData();
-		pulldownData.left = new FormAttachment(0, 10);
-		pulldownData.right = new FormAttachment(0,400);
-		pulldownData.top = new FormAttachment(0, 10);
-		pulldown.setLayoutData(pulldownData);
-
-		beanLabel = new Label(main, SWT.NONE);
-		FormData beanLabelData = new FormData();
-		beanLabelData.left = new FormAttachment(0, 10);
-		beanLabelData.top = new FormAttachment(pulldown, 3);
-		beanLabel.setLayoutData(beanLabelData);
-
-		// small font size
-		Font initialFont = beanLabel.getFont();
-		FontData[] fontData = initialFont.getFontData();
-		for (int i = 0; i < fontData.length; i++) {
-			fontData[i].setHeight(7);
-		}
-		Font newFont = new Font(Display.getDefault(), fontData);
-		beanLabel.setFont(newFont);
-		
-		Listener listener = new Listener() {
-			public void handleEvent(Event event) {
-				switch (event.type) {
-				case SWT.Selection:
-				case SWT.Modify:
-					pulldownSelectionChanged();
-					break;
-				}
-			}
-		};
-		pulldown.addListener(SWT.Selection, listener);
-		pulldown.addListener(SWT.Modify, listener);
-
-		book = new PageBook(main, SWT.NONE);
-		FormData bookData = new FormData();
-		bookData.top = new FormAttachment(beanLabel, 5);
-		bookData.left = new FormAttachment(0, 5);
-		bookData.right = new FormAttachment(100, -5);
-		bookData.bottom = new FormAttachment(100, -5);
-		book.setLayoutData(bookData);
-
-		errorGroup = new ErrorGroup(book, SWT.NONE);
-		operationGroup = new OperationGroup(book, SWT.NONE, this);
-		attributeGroup = new AttributeGroup(book, SWT.NONE, this);
-		domainGroup = new Composite(book, SWT.NONE);
-	}
-
-	public void dispose() {
-	}
-
-	public Control getControl() {
-		return main;
-	}
-
-	public void setActionBars(IActionBars actionBars) {
-	}
-
-	public void setFocus() {
-	}
-
-	public void selectionChanged(IWorkbenchPart part, ISelection selection) {
-		if (selection instanceof IStructuredSelection) {
-			Object obj = ((IStructuredSelection) selection).getFirstElement();
-			if (obj instanceof ContentWrapper)
-				obj = ((ContentWrapper) obj).getElement();
-
-			if (obj == null)
-				return;
-			setInputObject(obj);
-		}
-	}
-
-	protected void setInputObject(Object obj) {
-		if (obj instanceof JMXDomain) {
-			showDomainComposite((JMXDomain) obj);
-			setBean(null);
-		} else if (obj instanceof JMXBean) {
-			setBean((JMXBean) obj);
-		} else if (obj instanceof JMXAttributesWrapper
-				|| obj instanceof WrappedMBeanOperationInfo) {
-			setBean(getBeanFromInput(obj));
-			setComboSelectionFromInput(obj);
-		}
-	}
-
-	protected void setBean(JMXBean bean) {
-		if (bean != null) {
-			boolean requiresLoading = bean.getOperations() == null
-					&& bean.getException() == null;
-			boolean hasError = bean.getOperations() == null
-					&& bean.getException() != null;
-			boolean finishedLoading = bean.getOperations() != null;
-
-			this.bean = bean;
-			beanLabel.setText("for MBean " + bean.getName());
-			if (requiresLoading) {
-				pulldown.setItems(JMXViewProvider.LOADING_STRING_ARRAY);
-				pulldown.select(0); // select Loading...
-				loadChildrenRefreshProperties(bean);
-				return; // do not re-layout during loading 
-			} else if (hasError) {
-				// some error
-				showErrorComposite();
-			} else if (finishedLoading) {
-				// finished loading
-				operations = bean.getOperations();
-				pulldown.setItems(pulldownItems());
-				pulldown.select(0); // select Loading...
-				beanLabel.setText("for MBean " + bean.getName() + "  ("
-						+ operations.length + " operations, "
-						+ bean.getAttributes().length + " attributes)");
-			}
-			main.layout();
-		} else {
-			beanLabel.setText("Please select an mbean from the JBoss Servers View");
-			pulldown.setItems(JMXViewProvider.SELECT_MBEAN_ARRAY);
-			pulldown.select(0); // select Loading...
-		}
-	}
-
-	protected JMXBean getBeanFromInput(Object obj) {
-		return obj instanceof JMXAttributesWrapper ? ((JMXAttributesWrapper) obj)
-				.getBean() : ((WrappedMBeanOperationInfo) obj).getBean();
-	}
-
-	protected void setComboSelectionFromInput(Object obj) {
-		int index = -1;
-		if (obj instanceof WrappedMBeanOperationInfo)
-			index = pulldown
-					.indexOf(getStringForOperation(((WrappedMBeanOperationInfo) obj)));
-		if (index == -1)
-			index = 0;
-		pulldown.select(index);
-	}
-
-	// get the list of combo items based on the bean
-	// The list should be Two larger than the number of operations
-	// ex: {Attributes..., ------, op1, op2, op3... etc}
-	protected String[] pulldownItems() {
-		WrappedMBeanOperationInfo[] ops = bean.getOperations();
-		String[] vals = null;
-		if (ops != null) {
-			if (ops.length == 0)
-				return new String[] { JMXViewProvider.ATTRIBUTES_STRING };
-			vals = new String[ops.length + 2];
-			vals[0] = JMXViewProvider.ATTRIBUTES_STRING;
-			vals[1] = "---------------";
-			for (int i = 0; i < ops.length; i++) {
-				vals[i + 2] = getStringForOperation(ops[i]);
-			}
-		}
-		return vals;
-	}
-
-	protected String getStringForOperation(WrappedMBeanOperationInfo op) {
-		return op.getInfo().getReturnType() + " " + op.getInfo().getName();
-	}
-
-	public void loadChildrenRefreshProperties(final Object bean) {
-		new Thread() {
-			public void run() {
-				provider.loadChildren(bean);
-				Display.getDefault().asyncExec(new Runnable() {
-					public void run() {
-						setInputObject(bean);
-					}
-				});
-			}
-		}.start();
-	}
-
-	protected void showDomainComposite(JMXDomain domain) {
-		book.showPage(domainGroup);
-	}
-
-	protected void showErrorComposite() {
-		book.showPage(errorGroup);
-	}
-
-	protected void pulldownSelectionChanged() {
-		if (pulldown.getSelectionIndex() != -1) {
-			int index = pulldown.getSelectionIndex();
-			if (index == 0 && pulldown.getItem(0).equals(JMXViewProvider.ATTRIBUTES_STRING)) {
-				attributeGroup.setBean(bean);
-				book.showPage(attributeGroup);
-			} else if (index >= 2 && operations != null
-					&& index <= operations.length + 1) {
-				String selected = pulldown
-						.getItem(pulldown.getSelectionIndex());
-				book.showPage(operationGroup);
-				operationGroup.setOperation(findOperation(bean, selected));
-			}
-		}
-	}
-	protected WrappedMBeanOperationInfo findOperation(JMXBean bean, String selected) {
-		WrappedMBeanOperationInfo[] opInfos = bean.getOperations();
-		for( int i = 0; i < opInfos.length; i++ ) {
-			if( getStringForOperation(opInfos[i]).equals(selected))
-				return opInfos[i];
-		}
-		return null;
-	}
-
-	
-	public static Object box(String type, String text) {
-		Object val = null;
-		try {
-			if( type.equals("java.lang.String")) val = text;
-			else if( type.equals("boolean")) val = new Boolean(text);
-			else if( type.equals("int")) val = new Integer(text);
-			else if( type.equals("long")) val = new Long(text);
-		} catch( Exception e ) {}
-		return val;
-	}
-	
-	protected static ArrayList<String> simpleTypeList = null;
-	public static boolean isSimpleType(String fullClassName) {
-		if( simpleTypeList == null ) {
-			simpleTypeList = new ArrayList<String>();
-			simpleTypeList.add("java.lang.String");
-			simpleTypeList.add("boolean");
-			simpleTypeList.add("int");
-			simpleTypeList.add("long");
-		}
-		return simpleTypeList.contains(fullClassName);
-	}
-
-}
Index: META-INF/MANIFEST.MF
===================================================================
--- META-INF/MANIFEST.MF	(revision 10181)
+++ META-INF/MANIFEST.MF	(working copy)
@@ -47,6 +47,7 @@
 Eclipse-LazyStart: true
 Export-Package: org.jboss.ide.eclipse.as.ui,
  org.jboss.ide.eclipse.as.ui.dialogs,
+ org.jboss.ide.eclipse.as.ui.views.server.providers.events,
  org.jboss.ide.eclipse.as.ui.wizards
 Bundle-ClassPath: jbossui.jar
 Bundle-Activator: org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin
Index: jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/OperationGroup.java
===================================================================
--- jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/OperationGroup.java	(revision 10181)
+++ jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/OperationGroup.java	(working copy)
@@ -1,276 +0,0 @@
-/**
- * JBoss, a Division of Red Hat
- * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
-* This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ide.eclipse.as.ui.views.server.providers.jmx;
-
-import java.util.HashMap;
-
-import javax.management.MBeanParameterInfo;
-import javax.management.MBeanServerConnection;
-import javax.management.ObjectName;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeColumn;
-import org.eclipse.swt.widgets.TreeItem;
-import org.jboss.ide.eclipse.as.core.extensions.jmx.JMXModel.JMXRunnable;
-import org.jboss.ide.eclipse.as.core.extensions.jmx.JMXModel.JMXSafeRunner;
-import org.jboss.ide.eclipse.as.core.extensions.jmx.JMXModel.WrappedMBeanOperationInfo;
-import org.jboss.ide.eclipse.as.core.extensions.jmx.JMXModel.WrappedMBeanOperationParameter;
-import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
-import org.jboss.ide.eclipse.as.ui.views.server.providers.jmx.TreeEditorSelectionListener.SelectionCallbackHandler;
-
-/**
- * 
- * @author Rob Stryker <rob.stryker@redhat.com>
- *
- */
-public class OperationGroup extends Composite {
-	protected Tree tree;
-	protected TreeColumn nameColumn, typeColumn, 
-						valueColumn, descriptionColumn;
-	protected TreeViewer treeViewer;
-	protected JMXPropertySheetPage page;
-	protected Button executeButton;
-	protected Label returnValueLabel;
-	protected WrappedMBeanOperationInfo selectedOperation;
-
-	public OperationGroup(Composite parent, int style, JMXPropertySheetPage page) {
-		super(parent, style);
-		this.page = page;
-		setLayout(new FormLayout());
-
-		tree = new Tree(this, SWT.BORDER | SWT.FULL_SELECTION);
-		FormData treeData = new FormData();
-		treeData.left = new FormAttachment(0,0);
-		treeData.right = new FormAttachment(85, 0);
-		treeData.top = new FormAttachment(0,0);
-		treeData.bottom = new FormAttachment(100,0);
-		tree.setLayoutData(treeData);
-		
-		executeButton = new Button(this, SWT.PUSH);
-		FormData executeData = new FormData();
-		executeData.top = new FormAttachment(0,0);
-		executeData.left = new FormAttachment(tree, 5);
-		executeButton.setLayoutData(executeData);
-
-		returnValueLabel = new Label(this, SWT.WRAP);
-		FormData returnData = new FormData();
-		returnData.left = new FormAttachment(tree, 5);
-		returnData.right = new FormAttachment(100,0);
-		returnData.top = new FormAttachment(executeButton, 5);
-		returnData.bottom = new FormAttachment(100,0);
-		returnValueLabel.setLayoutData(returnData);
-		
-		nameColumn = new TreeColumn(tree, SWT.NONE);
-		typeColumn = new TreeColumn(tree, SWT.NONE);
-		valueColumn = new TreeColumn(tree, SWT.NONE);
-		descriptionColumn = new TreeColumn(tree, SWT.NONE);
-
-		nameColumn.setWidth(100);
-		typeColumn.setWidth(150);
-		valueColumn.setWidth(200);
-		descriptionColumn.setWidth(150);
-		
-		nameColumn.setText("Name");
-		typeColumn.setText("Type");
-		valueColumn.setText("Value");
-		descriptionColumn.setText("Description");
-
-		tree.setHeaderVisible(true);
-		tree.setLinesVisible(true);
-
-		treeViewer = new TreeViewer(tree);
-		treeViewer.setContentProvider(new OperationViewerContentProvider());
-		treeViewer.setLabelProvider(new OperationViewerLabelProvider());
-
-//		JMXAttributePropertySelListener selListener = new JMXOperationPropertySelListener();
-//		tree.addListener(SWT.MouseDoubleClick, selListener);
-
-		executeButton.addSelectionListener(new SelectionListener() {
-			public void widgetDefaultSelected(SelectionEvent e) {
-				widgetSelected(e);
-			}
-			public void widgetSelected(SelectionEvent e) {
-				executePressed();
-			} 
-		});
-		
-		SelectionCallbackHandler handler = new SelectionCallbackHandler() {
-			public boolean canModify(TreeItem item) {
-				return true;
-			}
-			public void cannotModify(TreeItem item) {
-			}
-			public void handleChange(TreeItem item, Text text) {
-				saveParam(item, text);
-			}
-		};
-		TreeEditorSelectionListener listener = new TreeEditorSelectionListener(tree, 2, handler);
-		tree.addListener(SWT.MouseDoubleClick, listener);
-	}
-	
-	protected void saveParam(TreeItem item, Text text) {
-		Object o = item.getData();
-		if( o instanceof MBeanParameterInfo ) {
-			MBeanParameterInfo o2 = (MBeanParameterInfo)o;
-			opParams.put((MBeanParameterInfo)o, 
-					JMXPropertySheetPage.box(o2.getType(), text.getText()));
-			treeViewer.refresh();
-		}
-		System.out.println(text.getText());
-	}
-	
-	protected void executePressed() {
-		final Boolean[] errorBool = new Boolean[1];
-		final JMXRunnable run = new JMXRunnable() {
-			public void run(MBeanServerConnection connection) {
-				try {
-					ObjectName on = selectedOperation.getBean().getObjectName();
-					String opName = selectedOperation.getInfo().getName();
-					final Object ret = connection.invoke(on, opName, getParams(), getSignatures());
-					Display.getDefault().asyncExec(new Runnable() { public void run() {
-						returnValueLabel.setText("The method executed with " + (ret == null ? "no return value" : "a return value of " + ret.toString()));
-					}});
-				} catch (final Exception e) {
-					Display.getDefault().asyncExec(new Runnable() { public void run() {
-						returnValueLabel.setText("The method terminated via exception. Please check the error log.");
-						IStatus status = new Status(IStatus.ERROR, JBossServerUIPlugin.PLUGIN_ID, e.getMessage(), e);
-						JBossServerUIPlugin.getDefault().getLog().log(status);
-						errorBool[0] = new Boolean(true);
-					}});
-				}
-			}
-		};
-		
-		new Thread() { public void run() { 
-			JMXSafeRunner.run(selectedOperation.getBean().getServer(), run);
-			if( errorBool[0] == null ) {
-				Display.getDefault().asyncExec(new Runnable() {
-					public void run() {
-						// display error
-					}
-				});
-			}
-		}}.start();
-
-	}
-	
-	protected class OperationViewerContentProvider implements
-		ITreeContentProvider {
-
-		public Object[] getChildren(Object parentElement) {
-			if( parentElement != null && parentElement instanceof WrappedMBeanOperationInfo ) {
-				return ((WrappedMBeanOperationInfo)parentElement).getInfo().getSignature();
-			}
-			return new Object[] {};
-		}
-		public Object getParent(Object element) {
-			return null;
-		}
-		public boolean hasChildren(Object element) {
-			return false;
-		}
-		public Object[] getElements(Object inputElement) {
-			return getChildren(inputElement);
-		}
-		public void dispose() {
-		}
-		public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
-		}
-		
-	}
-
-		
-	
-	protected class OperationViewerLabelProvider extends LabelProvider
-		implements ITableLabelProvider {
-
-		public Image getColumnImage(Object element, int columnIndex) {
-			return null;
-		}
-
-		public String getColumnText(Object element, int columnIndex) {
-			if( element instanceof MBeanParameterInfo ) {
-				MBeanParameterInfo info = (MBeanParameterInfo)element;
-				if( columnIndex == 0 ) return info.getName();
-				if( columnIndex == 1 ) return info.getType();
-				if( columnIndex == 2 ) return opParams.get(element) == null ? "null" : opParams.get(element).toString();
-				if( columnIndex == 3 ) return info.getDescription();
-			}
-			return "";
-		}
-		
-	}
-	
-	protected HashMap<MBeanParameterInfo, Object> opParams;
-	public void setOperation(WrappedMBeanOperationInfo op) {
-		if( op == selectedOperation ) return;
-		
-		opParams = new HashMap<MBeanParameterInfo, Object>();
-		WrappedMBeanOperationParameter[] params = op.getParameters();
-		for( int i = 0; i < params.length; i++ ) {
-			opParams.put(params[i].getInfo(), null);
-		}
-		selectedOperation = op;
-		executeButton.setText("Execute " + op.getInfo().getName());
-		returnValueLabel.setText("");
-		layout();
-		treeViewer.setInput(op);
-		
-	}
-
-	protected Object[] getParams() {
-		WrappedMBeanOperationParameter[] params = selectedOperation.getParameters();
-		Object[] paramVals = new Object[params.length];
-		for( int i = 0; i < paramVals.length; i++ ) {
-			paramVals[i] = opParams.get(params[i].getInfo());
-		}
-		return paramVals;
-	}
-	
-	protected String[] getSignatures() {
-		WrappedMBeanOperationParameter[] params = selectedOperation.getParameters();
-		String[] signatures = new String[selectedOperation.getParameters().length];
-		for( int i = 0; i < signatures.length; i++ ) {
-			signatures[i] = params[i].getInfo().getType();
-		}
-		return signatures;
-	}
-}
Index: jbossui/org/jboss/ide/eclipse/as/ui/launch/SecurityFailureHandler.java
===================================================================
--- jbossui/org/jboss/ide/eclipse/as/ui/launch/SecurityFailureHandler.java	(revision 10181)
+++ jbossui/org/jboss/ide/eclipse/as/ui/launch/SecurityFailureHandler.java	(working copy)
@@ -1,63 +0,0 @@
-package org.jboss.ide.eclipse.as.ui.launch;
-
-import java.util.List;
-import java.util.Properties;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.IServerWorkingCopy;
-import org.jboss.ide.eclipse.as.core.extensions.polling.JMXPoller;
-import org.jboss.ide.eclipse.as.core.server.IPollerFailureHandler;
-import org.jboss.ide.eclipse.as.core.server.IServerStatePoller;
-import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
-import org.jboss.ide.eclipse.as.core.util.ServerConverter;
-import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
-import org.jboss.ide.eclipse.as.ui.Messages;
-import org.jboss.ide.eclipse.as.ui.dialogs.RequiredCredentialsDialog;
-
-/**
- * 
- * @author rob.stryker <rob.stryker@redhat.com>
- *
- */
-public class SecurityFailureHandler implements IPollerFailureHandler {
-
-	public boolean accepts(IServerStatePoller poller, String action,
-			List requiredProperties) {
-		if( poller.getPollerType().getId().equals(JMXPoller.POLLER_ID))
-			return true;
-		return false;
-	}
-
-	public void handle(final IServerStatePoller poller, String action, List requiredProperties) {
-		Display.getDefault().asyncExec(new Runnable() { 
-			public void run() {
-				IServer server = poller.getServer();
-				IServerWorkingCopy copy = server.createWorkingCopy();
-				JBossServer jbs = ServerConverter.getJBossServer(copy);
-				RequiredCredentialsDialog d = new RequiredCredentialsDialog(new Shell(), jbs);
-				if( d.open() == Window.OK) {
-					if( d.getSave() ) {
-						jbs.setPassword(d.getPass());
-						jbs.setUsername(d.getUser());
-						try {
-							copy.save(false, null);
-						} catch( CoreException ce ) {
-							JBossServerUIPlugin.log(Messages.ServerSaveFailed, ce);
-						}
-					}
-					
-					Properties p = new Properties();
-					p.put(JMXPoller.REQUIRED_USER, d.getUser());
-					p.put(JMXPoller.REQUIRED_PASS, d.getPass());
-					poller.failureHandled(p);
-				} else {
-					poller.failureHandled(null);
-				}
-			}
-		});
-	}
-}
Index: jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events/PollingLabelProvider.java
===================================================================
--- jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events/PollingLabelProvider.java	(revision 10181)
+++ jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events/PollingLabelProvider.java	(working copy)
@@ -29,7 +29,6 @@
 import org.eclipse.wst.server.ui.internal.provisional.UIDecoratorManager;
 import org.jboss.ide.eclipse.as.core.extensions.events.EventLogModel;
 import org.jboss.ide.eclipse.as.core.extensions.events.EventLogModel.EventLogTreeItem;
-import org.jboss.ide.eclipse.as.core.extensions.polling.JMXPoller;
 import org.jboss.ide.eclipse.as.core.server.IServerStatePoller;
 import org.jboss.ide.eclipse.as.core.server.internal.JBossServerBehavior;
 import org.jboss.ide.eclipse.as.core.server.internal.PollThread;
@@ -54,7 +53,6 @@
 		supported.add(PollThread.POLLER_NOT_FOUND);
 		
 		supported.add(EventLogModel.EVENT_TYPE_EXCEPTION);
-		supported.add(JMXPoller.EVENT_TYPE_STARTING);
 		
 		supported.add(JBossServerBehavior.FORCE_SHUTDOWN_EVENT_KEY);
 	}
@@ -81,12 +79,6 @@
 		
 		if( element.getSpecificType().equals(EventLogModel.EVENT_TYPE_EXCEPTION)) 
 			return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_WARN_TSK);
-		if( element.getSpecificType().equals(JMXPoller.EVENT_TYPE_STARTING)) {
-			boolean started = ((Boolean)element.getProperty(JMXPoller.STARTED_PROPERTY)).booleanValue();
-			if( !started ) 
-				return getStartingImage();
-			return getStartedImage();
-		}
 		
 		
 		if( element.getSpecificType().equals(JBossServerBehavior.FORCE_SHUTDOWN_EVENT_KEY)) 
@@ -117,13 +109,6 @@
 			return "JMXException: " + ( o == null ? "null" : ((Exception)o).getMessage());
 		}
 		
-		if( element.getSpecificType().equals(JMXPoller.EVENT_TYPE_STARTING)) {
-			boolean started = ((Boolean)element.getProperty(JMXPoller.STARTED_PROPERTY)).booleanValue();
-			if( !started ) 
-				return "Server is still starting";
-			return "Server has completed startup";
-		}
-		
 		if( element.getSpecificType().equals(JBossServerBehavior.FORCE_SHUTDOWN_EVENT_KEY)) 
 			return "The server was shutdown forcefully. All processes terminated.";
 		return null;
@@ -159,7 +144,6 @@
 		propertyToMessageMap.put(EventLogTreeItem.DATE, "Time");
 		propertyToMessageMap.put(PollThread.EXPECTED_STATE, "Expected State");
 		propertyToMessageMap.put(EventLogModel.EXCEPTION_PROPERTY, "Exception");
-		propertyToMessageMap.put(JMXPoller.STARTED_PROPERTY, "Server Started");
 		propertyToMessageMap.put(PollThread.POLL_THREAD_ABORTED_CAUSE, "Abort Cause");
 		// now values and their readable forms
 		propertyToMessageMap.put(PollThread.EXPECTED_STATE + DELIMITER + "true", "Up");
Index: jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/JMXLabelProvider.java
===================================================================
--- jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/JMXLabelProvider.java	(revision 10181)
+++ jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/JMXLabelProvider.java	(working copy)
@@ -1,82 +0,0 @@
-/**
- * JBoss, a Division of Red Hat
- * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
-* This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ide.eclipse.as.ui.views.server.providers.jmx;
-
-import org.eclipse.jdt.internal.ui.JavaPluginImages;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-import org.jboss.ide.eclipse.as.core.extensions.jmx.JMXModel.JMXAttributesWrapper;
-import org.jboss.ide.eclipse.as.core.extensions.jmx.JMXModel.JMXBean;
-import org.jboss.ide.eclipse.as.core.extensions.jmx.JMXModel.JMXDomain;
-import org.jboss.ide.eclipse.as.core.extensions.jmx.JMXModel.JMXException;
-import org.jboss.ide.eclipse.as.core.extensions.jmx.JMXModel.WrappedMBeanOperationInfo;
-
-/**
- * 
- * @author Rob Stryker <rob.stryker@redhat.com>
- *
- */
-class JMXLabelProvider extends LabelProvider {
-	public String getText(Object obj) {
-		if (obj instanceof JMXDomain)
-			return ((JMXDomain) obj).getName();
-		if (obj instanceof JMXBean) {
-			return ((JMXBean) obj).getName().substring(
-					((JMXBean) obj).getDomain().length() + 1);
-		}
-		if (obj instanceof WrappedMBeanOperationInfo) {
-			return ((WrappedMBeanOperationInfo) obj).getInfo().getName();
-		}
-
-		if (obj instanceof JMXException) {
-			String message = "";
-			message += ((JMXException) obj).getException().getClass()
-					.getName()
-					+ ": ";
-			message += ((JMXException) obj).getException().getMessage();
-			return message;
-		}
-		if (obj instanceof JMXAttributesWrapper) {
-			return "Attributes";
-		}
-		if (obj == JMXViewProvider.LOADING)
-			return "loading...";
-		return "not sure yet: " + obj.getClass().getName();
-	}
-
-	public Image getImage(Object obj) {
-		if (obj instanceof JMXException) {
-			return PlatformUI.getWorkbench().getSharedImages().getImage(
-					ISharedImages.IMG_OBJS_ERROR_TSK);
-		}
-		if (obj instanceof WrappedMBeanOperationInfo)
-			return JavaPluginImages.get(JavaPluginImages.IMG_MISC_PUBLIC);
-		if (obj instanceof JMXAttributesWrapper) {
-			return JavaPluginImages.get(JavaPluginImages.IMG_FIELD_PUBLIC);
-		}
-
-		return null;
-	}
-
-}
Index: jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/AttributeGroup.java
===================================================================
--- jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/AttributeGroup.java	(revision 10181)
+++ jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/AttributeGroup.java	(working copy)
@@ -1,260 +0,0 @@
-/**
- * JBoss, a Division of Red Hat
- * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
-* This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ide.eclipse.as.ui.views.server.providers.jmx;
-
-import javax.management.Attribute;
-import javax.management.MBeanServerConnection;
-import javax.management.ObjectName;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.MessageBox;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeColumn;
-import org.eclipse.swt.widgets.TreeItem;
-import org.jboss.ide.eclipse.as.core.extensions.jmx.JMXModel.JMXBean;
-import org.jboss.ide.eclipse.as.core.extensions.jmx.JMXModel.JMXRunnable;
-import org.jboss.ide.eclipse.as.core.extensions.jmx.JMXModel.JMXSafeRunner;
-import org.jboss.ide.eclipse.as.core.extensions.jmx.JMXModel.WrappedMBeanAttributeInfo;
-import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
-import org.jboss.ide.eclipse.as.ui.views.server.providers.jmx.TreeEditorSelectionListener.SelectionCallbackHandler;
-
-/**
- * 
- * @author Rob Stryker <rob.stryker@redhat.com>
- *
- */
-public class AttributeGroup extends Composite {
-
-	protected Tree tree;
-	protected TreeColumn nameColumn, typeColumn, accessColumn, valueColumn,
-			descriptionColumn;
-	protected TreeViewer treeViewer;
-	protected JMXPropertySheetPage page;
-
-	public AttributeGroup(Composite parent, int style, JMXPropertySheetPage page) {
-		super(parent, style);
-		this.page = page;
-		setLayout(new FillLayout());
-
-		tree = new Tree(this, SWT.BORDER | SWT.FULL_SELECTION);
-
-		nameColumn = new TreeColumn(tree, SWT.NONE);
-		typeColumn = new TreeColumn(tree, SWT.NONE);
-		accessColumn = new TreeColumn(tree, SWT.NONE);
-		valueColumn = new TreeColumn(tree, SWT.NONE);
-		descriptionColumn = new TreeColumn(tree, SWT.NONE);
-
-		nameColumn.setWidth(100);
-		typeColumn.setWidth(150);
-		accessColumn.setWidth(50);
-		valueColumn.setWidth(200);
-		descriptionColumn.setWidth(300);
-
-		nameColumn.setText("Name");
-		typeColumn.setText("Type");
-		accessColumn.setText("Access");
-		valueColumn.setText("Value");
-		descriptionColumn.setText("Description");
-
-		tree.setHeaderVisible(true);
-		tree.setLinesVisible(true);
-
-		treeViewer = new TreeViewer(tree);
-		treeViewer.setContentProvider(new AttributeViewerContentProvider());
-		treeViewer.setLabelProvider(new AttributeViewerLabelProvider());
-
-		SelectionCallbackHandler callback = new SelectionCallbackHandler() {
-			public WrappedMBeanAttributeInfo getWrapped(TreeItem item) {
-				if (!(item.getData() instanceof WrappedMBeanAttributeInfo))
-					return null;
-				return (WrappedMBeanAttributeInfo) item.getData();
-			}
-			public boolean canModify(TreeItem item) {
-				WrappedMBeanAttributeInfo info = getWrapped(item);
-				if (!info.getInfo().isWritable()) return false;
-				if( !JMXPropertySheetPage.isSimpleType(info.getInfo().getType())) return false;
-				return true;
-			}
-			public void cannotModify(TreeItem item) {
-				WrappedMBeanAttributeInfo info = getWrapped(item);
-				if (!info.getInfo().isWritable()) return;
-				if( !JMXPropertySheetPage.isSimpleType(info.getInfo().getType())) return;
-					handleComplexType(info);
-			}
-			public void handleChange(TreeItem item, Text text) {
-				saveAttributeChange(getWrapped(item), text);
-			}
-		};
-		TreeEditorSelectionListener selListener = new TreeEditorSelectionListener(tree, 3, callback);
-		tree.addListener(SWT.MouseDoubleClick, selListener);
-	}
-
-	public void setBean(JMXBean bean) {
-		treeViewer.setInput(bean);
-	}
-
-	protected void saveAttributeChange(WrappedMBeanAttributeInfo attInfo, Text text) {
-		if (!text.isDisposed()) {
-			Attribute att = createAttribute(attInfo, text.getText());
-			if( att == null ) {
-				// throw up a message box and say no can do, for now
-				MessageBox messageBox = new MessageBox (new Shell(), SWT.OK);
-				messageBox.setText ("Cannot update bean");
-				messageBox.setMessage ("Bean update cannot proceed. Plug-in cannot convert " + text.getText() + " into " + attInfo.getInfo().getType());
-				messageBox.open();
-				return;
-			}
-			saveAttributeChange(attInfo, att);
-		}
-	}
-	
-	protected void saveAttributeChange(final WrappedMBeanAttributeInfo attInfo, final Attribute att) {
-		if( att == null ) {
-			// throw up a message box and say no can do, for now
-			MessageBox messageBox = new MessageBox (new Shell(), SWT.OK);
-			messageBox.setText ("Cannot update bean");
-			messageBox.setMessage ("Bean update cannot proceed. Plug-in cannot convert " + att.getValue().toString() + " into " + attInfo.getInfo().getType());
-			messageBox.open();
-			return;
-		}
-		final Boolean[] errorBool = new Boolean[1];
-		final JMXRunnable run = new JMXRunnable() {
-			public void run(MBeanServerConnection connection) {
-				try {
-					connection.setAttribute(new ObjectName(
-							attInfo.getBean().getName()), att);
-				} catch (final Exception e) {
-					Display.getDefault().asyncExec(new Runnable() { public void run() {
-						IStatus status = new Status(IStatus.ERROR, JBossServerUIPlugin.PLUGIN_ID, e.getMessage(), e);
-						JBossServerUIPlugin.getDefault().getLog().log(status);
-						errorBool[0] = new Boolean(true);
-					}});
-				}
-			}
-		};
-		
-		new Thread() { public void run() { 
-			JMXSafeRunner.run(attInfo.getBean().getServer(), run);
-			if( errorBool[0] == null ) {
-				page.provider.loadChildren(attInfo.getBean());
-				Display.getDefault().asyncExec(new Runnable() {
-					public void run() {
-						page.setInputObject(attInfo.getBean());
-					}
-				});
-			}
-		}}.start();
-	}
-
-	protected Attribute createAttribute(WrappedMBeanAttributeInfo attInfo, String text) {
-		String type = attInfo.getInfo().getType();
-		Object val = null;
-		if( type != null ) {
-			val = JMXPropertySheetPage.box(type, text);
-		}
-		return val == null ? null :  
-			new Attribute(attInfo.getInfo().getName(), val);
-	}
-		
-	protected void handleComplexType(WrappedMBeanAttributeInfo info) {
-		// throw up a message box and say no can do, for now
-		MessageBox messageBox = new MessageBox (new Shell(), SWT.OK);
-		messageBox.setText ("Cannot update bean");
-		messageBox.setMessage ("Bean update cannot proceed. Plug-in cannot create instances of " + info.getInfo().getType() + " at this time.");
-		messageBox.open();
-		return;
-	}
-	
-	
-	protected class AttributeViewerContentProvider implements
-			ITreeContentProvider {
-		public Object[] getChildren(Object parentElement) {
-			if (parentElement instanceof JMXBean)
-				return ((JMXBean) parentElement).getAttributes();
-			return new Object[] {};
-		}
-
-		public Object getParent(Object element) {
-			return null;
-		}
-
-		public boolean hasChildren(Object element) {
-			return false;
-		}
-
-		public Object[] getElements(Object inputElement) {
-			if (inputElement instanceof JMXBean)
-				return ((JMXBean) inputElement).getAttributes();
-			return new Object[] {};
-		}
-
-		public void dispose() {
-		}
-
-		public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
-		}
-	}
-
-	protected class AttributeViewerLabelProvider extends LabelProvider
-			implements ITableLabelProvider {
-
-		public Image getColumnImage(Object element, int columnIndex) {
-			return null;
-		}
-
-		public String getColumnText(Object element, int columnIndex) {
-			if (element instanceof WrappedMBeanAttributeInfo) {
-				WrappedMBeanAttributeInfo element2 = (WrappedMBeanAttributeInfo) element;
-				if (columnIndex == 0)
-					return element2.getInfo().getName();
-				if (columnIndex == 1)
-					return element2.getInfo().getType();
-				if (columnIndex == 3)
-					return (element2.getValue() != null ? element2.getValue()
-							.toString() : "");
-				if (columnIndex == 4)
-					return element2.getInfo().getDescription();
-				if (columnIndex == 2) {
-					String ret = element2.getInfo().isReadable() ? "R" : "";
-					ret += element2.getInfo().isWritable() ? "W" : "";
-					return ret;
-				}
-			}
-			return null;
-		}
-
-	}
-
-}
Index: jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/JMXViewProvider.java
===================================================================
--- jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/JMXViewProvider.java	(revision 10181)
+++ jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/JMXViewProvider.java	(working copy)
@@ -1,201 +0,0 @@
-/**
- * JBoss, a Division of Red Hat
- * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
-* This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ide.eclipse.as.ui.views.server.providers.jmx;
-
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.ui.views.properties.IPropertySheetPage;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.ServerEvent;
-import org.jboss.ide.eclipse.as.core.extensions.jmx.JMXClassLoaderRepository;
-import org.jboss.ide.eclipse.as.core.extensions.jmx.JMXModel;
-import org.jboss.ide.eclipse.as.core.extensions.jmx.JMXModel.JMXBean;
-import org.jboss.ide.eclipse.as.core.extensions.jmx.JMXModel.JMXDomain;
-import org.jboss.ide.eclipse.as.core.server.UnitedServerListener;
-import org.jboss.ide.eclipse.as.core.server.UnitedServerListenerManager;
-import org.jboss.ide.eclipse.as.ui.views.server.extensions.JBossServerViewExtension;
-import org.jboss.ide.eclipse.as.ui.views.server.extensions.ServerViewProvider;
-import org.jboss.ide.eclipse.as.ui.views.server.util.ViewUtilityMethods;
-import org.jboss.tools.as.wst.server.ui.views.server.JBossServerView;
-import org.jboss.tools.as.wst.server.ui.views.server.ExtensionTableViewer.ContentWrapper;
-
-/**
- * 
- * @author Rob Stryker <rob.stryker@redhat.com>
- *
- */
-public class JMXViewProvider extends JBossServerViewExtension {
-	public static final Object LOADING = new Object();
-	public static final String[] LOADING_STRING_ARRAY = new String[] { "Loading..." };
-	public static final String[] SELECT_MBEAN_ARRAY = new String[] { "Please select an MBean from the JBoss Server's View"};
-	public static final String ATTRIBUTES_STRING = "Attributes...";
-
-	public static final Object CLASSLOADING_TOKEN = new Object();
-	
-	protected JMXPropertySheetPage propertyPage;
-	protected JMXServerListener serverListener;
-	protected ISelectionChangedListener jbossServerViewSelectionListener;
-	protected JMXTreeContentProvider contentProvider;
-	protected JMXLabelProvider labelProvider;
-	protected IServer server;
-
-	public JMXViewProvider() {
-	}
-
-	public void setServer(IServer server) {
-		this.server = server;
-	}
-	
-	public IServer getServer() {
-		return this.server;
-	}
-	
-	public void enable() {
-		addListeners();
-	}
-	public void disable() {
-		removeListeners();
-	}
-
-	
-	protected void addListeners() {
-		jbossServerViewSelectionListener = 	new ISelectionChangedListener() {
-			public void selectionChanged(SelectionChangedEvent event) {
-				Object o = JBossServerView.getDefault()
-						.getExtensionFrame().getViewer()
-						.getSelectedElement();
-				if (o instanceof JMXBean) {
-					Display.getDefault().asyncExec(new Runnable() { public void run() {
-						ViewUtilityMethods.activatePropertiesView(null);
-					}});
-				}
-			}
-		};
-
-		JBossServerView.addExtensionFrameListener(jbossServerViewSelectionListener);
-
-		// make sure we know about server events
-		serverListener = new JMXServerListener();
-		UnitedServerListenerManager.getDefault().addListener(serverListener);
-	}
-	
-	protected void removeListeners() {
-		UnitedServerListenerManager.getDefault().removeListener(serverListener);
-		JBossServerView.removeExtensionFrameListener(jbossServerViewSelectionListener);
-	}
-
-	protected class JMXServerListener extends UnitedServerListener {
-		public void init(IServer server) {
-			if( server.getServerState() == IServer.STATE_STARTED ) 
-				JMXClassLoaderRepository.getDefault().addConcerned(
-						server, CLASSLOADING_TOKEN);
-			
-		}
-		public void serverRemoved(IServer server) {
-			JMXClassLoaderRepository.getDefault()
-					.removeConcerned(server, JMXModel.getDefault());
-		}
-		public void serverChanged(ServerEvent event) {
-			if ((event.getKind() & ServerEvent.SERVER_CHANGE) != 0) {
-				if ((event.getKind() & ServerEvent.STATE_CHANGE) != 0) {
-					if (event.getState() == IServer.STATE_STARTED) {
-						JMXClassLoaderRepository.getDefault().addConcerned(
-								event.getServer(), CLASSLOADING_TOKEN);
-					} else {
-						JMXClassLoaderRepository.getDefault().removeConcerned(
-								event.getServer(), CLASSLOADING_TOKEN);
-					}
-				}
-			}
-		}
-		public void cleanUp(IServer server) {
-			JMXClassLoaderRepository.getDefault().removeConcerned(
-					server, CLASSLOADING_TOKEN);
-		}
-	}
-
-	public IPropertySheetPage getPropertySheetPage() {
-		if (propertyPage == null) {
-			propertyPage = new JMXPropertySheetPage(this);
-		}
-		return propertyPage;
-	}
-
-	public ITreeContentProvider getContentProvider() {
-		if (contentProvider == null)
-			contentProvider = new JMXTreeContentProvider(this);
-		return contentProvider;
-	}
-
-	public LabelProvider getLabelProvider() {
-		if (labelProvider == null)
-			labelProvider = new JMXLabelProvider();
-		return labelProvider;
-	}
-
-
-	protected void loadChildren(Object parent) {
-		if (parent instanceof ServerViewProvider)
-			JMXModel.getDefault().getModel(server).loadDomains();
-		else if (parent instanceof JMXDomain)
-			((JMXDomain) parent).loadBeans();
-		else if (parent instanceof JMXBean)
-			((JMXBean) parent).loadInfo();
-	}
-
-	public void refreshViewerAsync(final Object parent) {
-		Display.getDefault().asyncExec(new Runnable() {
-			public void run() {
-				refreshViewer(parent);
-			}
-		});
-	}
-
-	public void refreshModel(Object object) {
-		if( object instanceof ContentWrapper ) 
-			object = ((ContentWrapper)object).getElement();
-		if (object instanceof ServerViewProvider) {
-			JMXModel.getDefault().clearModel(server);
-		} else if (object instanceof JMXDomain) {
-			((JMXDomain) object).resetChildren();
-		} else if (object instanceof JMXBean) {
-			((JMXBean) object).resetChildren();
-		}
-	}
-	
-	protected static class ErrorGroup extends Composite {
-		protected Group group;
-		public ErrorGroup(Composite parent, int style) {
-			super(parent, style);
-			setLayout(new FillLayout());
-			group = new Group(this, SWT.NONE);
-			group.setText("Error");
-		}
-	}
-}
Index: jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/JMXTreeContentProvider.java
===================================================================
--- jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/JMXTreeContentProvider.java	(revision 10181)
+++ jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/JMXTreeContentProvider.java	(working copy)
@@ -1,147 +0,0 @@
-/**
- * JBoss, a Division of Red Hat
- * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
-* This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ide.eclipse.as.ui.views.server.providers.jmx;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.wst.server.core.IServer;
-import org.jboss.ide.eclipse.as.core.extensions.jmx.JMXModel;
-import org.jboss.ide.eclipse.as.core.extensions.jmx.JMXModel.JMXAttributesWrapper;
-import org.jboss.ide.eclipse.as.core.extensions.jmx.JMXModel.JMXBean;
-import org.jboss.ide.eclipse.as.core.extensions.jmx.JMXModel.JMXDomain;
-import org.jboss.ide.eclipse.as.core.extensions.jmx.JMXModel.JMXException;
-import org.jboss.ide.eclipse.as.core.extensions.jmx.JMXModel.WrappedMBeanOperationInfo;
-import org.jboss.ide.eclipse.as.ui.views.server.extensions.ServerViewProvider;
-
-/**
- * 
- * @author Rob Stryker <rob.stryker@redhat.com>
- *
- */
-public class JMXTreeContentProvider implements ITreeContentProvider {
-	
-	protected JMXViewProvider provider;
-	public JMXTreeContentProvider(JMXViewProvider provider) {
-		this.provider = provider;
-	}
-	
-	public Object[] getChildren(Object parentElement) {
-		if (parentElement instanceof ServerViewProvider) {
-			if (provider.getServer() == null)
-				return new Object[] {};
-			if (provider.getServer().getServerState() != IServer.STATE_STARTED) {
-				JMXModel.getDefault().clearModel(provider.getServer());
-				return new Object[] {};
-			}
-			JMXDomain[] domains = JMXModel.getDefault().getModel(provider.getServer()).getDomains();
-			if (domains == null
-					&& JMXModel.getDefault().getModel(provider.getServer()).getException() == null) {
-				loadChildrenRefreshViewer(parentElement);
-				return new Object[] { JMXViewProvider.LOADING };
-			} else if (domains == null
-					&& JMXModel.getDefault().getModel(provider.getServer()).getException() != null) {
-				return new Object[] { JMXModel.getDefault().getModel(provider.getServer()).getException() };
-			}
-			return domains;
-		}
-		if (parentElement instanceof JMXDomain) {
-			JMXBean[] beans = ((JMXDomain) parentElement).getBeans();
-			if (beans == null
-					&& ((JMXDomain) parentElement).getException() == null) {
-				loadChildrenRefreshViewer(parentElement);
-				return new Object[] { JMXViewProvider.LOADING };
-			} else if (beans == null
-					&& ((JMXDomain) parentElement).getException() != null) {
-				return new Object[] { ((JMXDomain) parentElement)
-						.getException() };
-			}
-			return beans;
-		}
-		if (parentElement instanceof JMXBean) {
-			WrappedMBeanOperationInfo[] operations = ((JMXBean) parentElement)
-					.getOperations();
-			if (operations == null
-					&& ((JMXBean) parentElement).getException() == null) {
-				loadChildrenRefreshViewer(parentElement);
-				return new Object[] { JMXViewProvider.LOADING };
-			} else if (operations == null
-					&& ((JMXBean) parentElement).getException() != null) {
-				return new Object[] { ((JMXBean) parentElement)
-						.getException() };
-			}
-			// add the Attributes element
-			ArrayList<Object> list = new ArrayList<Object>();
-			list.add(new JMXAttributesWrapper((JMXBean) parentElement));
-			list.addAll(Arrays.asList(operations));
-			return (Object[]) list.toArray(new Object[list.size()]);
-		}
-		return new Object[0];
-	}
-
-	public Object getParent(Object element) {
-		return null; // unused
-	}
-
-	public boolean hasChildren(Object element) {
-		if (element instanceof ServerViewProvider) {
-			if (provider.getServer() == null || 
-					provider.getServer().getServerState() != IServer.STATE_STARTED) {
-				return false;
-			}
-			return true;
-		}
-		if (element instanceof JMXException)
-			return false;
-		if (element instanceof WrappedMBeanOperationInfo)
-			return false;
-		if (element instanceof JMXAttributesWrapper)
-			return false;
-		return true; // always true?
-	}
-
-	public Object[] getElements(Object inputElement) {
-		return null; // unused here
-	}
-
-	public void dispose() {
-	}
-
-	public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
-		if (oldInput != newInput) {
-			provider.setServer((IServer) newInput);
-		}
-	}
-	
-	protected void loadChildrenRefreshViewer(final Object parent) {
-		new Thread() {
-			public void run() {
-				provider.loadChildren(parent);
-				provider.refreshViewerAsync(parent);
-			}
-		}.start();
-	}
-
-
-}
