Author: rob.stryker(a)jboss.com
Date: 2007-10-18 00:54:36 -0400 (Thu, 18 Oct 2007)
New Revision: 4312
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploySection.java
Removed:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/JBossPortsEditorPage.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/StrippedServerDeploySection.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/ExtensionManager.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/JBossServerUIPlugin.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/DeployAction.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/console/ELExceptionsMatcher.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/TwiddleDialog.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/XPathDialogs.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerPasswordSection.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/JBossLaunchConfigurationTabGroup.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/NewEARAction.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/NewEJBJARAction.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/NewWARAction.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/PreviewPage.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/PublishAction.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/perspective/ASPerspective.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/preferencepages/JBossServersPreferencePage.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/preferencepages/ViewPreferencePage.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/preferencepages/ViewProviderPreferenceComposite.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/ExtensionTableViewer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/JBossServerView.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/ServerExtensionFrame.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/ServerFrame.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/ServerTableViewer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/JBossServerViewExtension.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/PropertySheetFactory.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ServerViewProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/SimplePropertiesViewExtension.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/DescriptorXPathViewProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/EventLogViewProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/FilesetViewProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/InactiveExtensionViewProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/ModuleViewProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/descriptors/DescriptorXPathPropertySheetPage.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/descriptors/XPathPropertyContentProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/descriptors/XPathPropertyLabelProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events/ComplexEventLogLabelProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events/PackagesPublishLabelProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events/PollingLabelProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/AttributeGroup.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/JMXLabelProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/JMXPropertySheetPage.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/JMXTreeContentProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/JMXViewProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/OperationGroup.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/util/ViewUtilityMethods.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossServerWizardFragment.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/StrippedServerWizardFragment.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/initialSelectionProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
Log:
JBIDE-1048 (Exception cleanup)
Also added headers and author tags
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/ExtensionManager.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/ExtensionManager.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/ExtensionManager.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -27,7 +27,9 @@
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
import org.jboss.ide.eclipse.as.ui.views.server.extensions.ServerViewProvider;
/**
@@ -65,7 +67,9 @@
try {
list.add(new ServerViewProvider(elements[i]));
} catch(Exception e) {
- e.printStackTrace();
+ String msg = "Server View Provider (" +
elements[i].getAttribute(ServerViewProvider.ID_LABEL) + ") failed to load";
+ IStatus status = new Status(IStatus.ERROR, JBossServerUIPlugin.PLUGIN_ID, msg, e);
+ JBossServerUIPlugin.getDefault().getLog().log(status);
}
}
serverViewExtensions = (ServerViewProvider[]) list.toArray(new
ServerViewProvider[list.size()]);
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/JBossServerUIPlugin.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/JBossServerUIPlugin.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/JBossServerUIPlugin.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -25,7 +25,8 @@
import java.util.MissingResourceException;
import java.util.ResourceBundle;
-import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
import org.eclipse.ui.IStartup;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.eclipse.wst.server.core.IServer;
@@ -78,20 +79,6 @@
}
/**
- * Returns the string from the plugin's resource bundle,
- * or 'key' if not found.
- */
- public static String getResourceString(String key) {
- try {
- String value = Platform.getResourceString(getDefault().getBundle(), key);
- return value;
- } catch (Exception e) {
- e.printStackTrace();
- return key;
- }
- }
-
- /**
* Returns the plugin's resource bundle,
*/
public ResourceBundle getResourceBundle() {
@@ -119,6 +106,9 @@
return ExtensionManager.getDefault().getAllServerViewProviders();
}
+ public static void log(String message, Exception e) {
+ IStatus status = new Status(IStatus.ERROR, JBossServerUIPlugin.PLUGIN_ID, message, e);
+ JBossServerUIPlugin.getDefault().getLog().log(status);
+ }
-
}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/DeployAction.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/DeployAction.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/DeployAction.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -1,3 +1,24 @@
+/**
+ * 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.actions;
import org.eclipse.core.resources.IFile;
@@ -34,6 +55,11 @@
import org.jboss.ide.eclipse.as.ui.JBossServerUISharedImages;
import org.jboss.ide.eclipse.as.ui.Messages;
+/**
+ *
+ * @author Rob Stryker
+ *
+ */
public class DeployAction implements IObjectActionDelegate {
protected ISelection selection;
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/console/ELExceptionsMatcher.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/console/ELExceptionsMatcher.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/console/ELExceptionsMatcher.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -1,3 +1,24 @@
+/**
+ * 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.console;
import java.util.ArrayList;
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/TwiddleDialog.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/TwiddleDialog.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/TwiddleDialog.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -1,6 +1,29 @@
+/**
+ * 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.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.TrayDialog;
import org.eclipse.swt.SWT;
@@ -21,9 +44,15 @@
import org.jboss.ide.eclipse.as.core.server.internal.launch.TwiddleLaunchConfiguration;
import org.jboss.ide.eclipse.as.core.server.internal.launch.TwiddleLauncher;
import org.jboss.ide.eclipse.as.core.server.internal.launch.TwiddleLauncher.ProcessData;
+import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
import org.jboss.ide.eclipse.as.ui.JBossServerUISharedImages;
import org.jboss.ide.eclipse.as.ui.Messages;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class TwiddleDialog extends TrayDialog {
private static final int EXECUTE_ID = 2042;
@@ -95,7 +124,8 @@
} );
}
} catch( Exception e ) {
- e.printStackTrace();
+ IStatus status = new Status(IStatus.ERROR, JBossServerUIPlugin.PLUGIN_ID,
"Unexpected error in TwiddleDialog", e);
+ JBossServerUIPlugin.getDefault().getLog().log(status);
}
}
@@ -148,6 +178,8 @@
query.setFocus();
query.setSelection(args.length());
} catch( CoreException ce ) {
+ // server probably not found.
+
}
return c;
}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/XPathDialogs.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/XPathDialogs.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/XPathDialogs.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -78,6 +78,7 @@
/**
* A class with some XPath-related dialogs
+ * @author Rob Stryker
*/
public class XPathDialogs {
public static class XPathCategoryDialog extends Dialog {
@@ -216,11 +217,7 @@
previewButton = createButton(parent, previewId, "Preview", true);
if( name == null ) getButton(IDialogConstants.OK_ID).setEnabled(false);
addListeners();
- try {
- checkErrors();
- } catch( Exception e ) {
- e.printStackTrace();
- }
+ checkErrors();
}
@@ -330,19 +327,19 @@
protected void checkErrors() {
- ArrayList errorList = getErrors();
+ ArrayList<String> errorList = getErrors();
if( errorList.size() == 0 ) {
setError(null);
getButton(IDialogConstants.OK_ID).setEnabled(true);
return;
}
- setError((String)errorList.get(0));
+ setError(errorList.get(0));
if( getButton(IDialogConstants.OK_ID) != null )
getButton(IDialogConstants.OK_ID).setEnabled(false);
return;
}
- protected ArrayList getErrors() {
- ArrayList list = new ArrayList();
+ protected ArrayList<String> getErrors() {
+ ArrayList<String> list = new ArrayList<String>();
String serverError = getServerError(); if( serverError != null )
list.add(serverError);
String nameError = getNameError(); if( nameError != null ) list.add(nameError);
String categoryError = getCategoryError(); if( categoryError != null )
list.add(categoryError);
@@ -428,7 +425,7 @@
final IProgressMonitor monitor2 = monitor;
XPathQuery tmp = new XPathQuery("", getConfigFolder(server), null,
xpathText.getText(), attributeText.getText());
tmp.setRepository(repository);
- final ArrayList list = new ArrayList();
+ final ArrayList<XPathFileResult> list = new
ArrayList<XPathFileResult>();
list.addAll(Arrays.asList(tmp.getResults()));
Display.getDefault().asyncExec(new Runnable() {
public void run() {
@@ -449,8 +446,8 @@
};
try {
new ProgressMonitorDialog(new Shell()).run(false, true, op);
- } catch( Exception e) {
- e.printStackTrace();
+ } catch (InvocationTargetException e) {
+ } catch (InterruptedException e) {
}
}
protected void layoutWidgets(Composite c) {
@@ -659,7 +656,7 @@
}
public String[] getAttributeNameProposalStrings(String parentPath, String remainder) {
- ArrayList names = new ArrayList();
+ ArrayList<String> names = new ArrayList<String>();
XPathResultNode[] items = getXPath(parentPath);
String[] attributes;
for( int i = 0; i < items.length; i++ ) {
@@ -669,7 +666,7 @@
names.add(attributes[j]);
}
}
- return (String[]) names.toArray(new String[names.size()]);
+ return names.toArray(new String[names.size()]);
}
}
@@ -684,11 +681,11 @@
protected static final int CLOSE_ATTRIBUTE = 7;
private String path;
- private HashMap xpathCache;
+ private HashMap<String, ArrayList<XPathResultNode>> xpathCache;
protected XMLDocumentRepository repository;
public XPathProposalProvider(XMLDocumentRepository repository) {
- xpathCache = new HashMap();
+ xpathCache = new HashMap<String, ArrayList<XPathResultNode>>();
this.repository = repository;
}
@@ -701,15 +698,13 @@
return new IContentProposal[] { new XPathContentProposal("/server/",
"/server/".length(), null, null)};
}
- try {
- int type = getType(contents);
- if( type == NEW_ELEMENT ) return getElementProposals(contents, "");
- if( type == IN_ELEMENT ) return getElementProposals(contents);
- if( type == NEW_ATTRIBUTE ) return getAttributeNameProposals(contents.substring(0,
contents.length()-1), "");
- if( type == IN_ATTRIBUTE ) return getAttributeNameProposals(contents);
- if( type == NEW_ATTRIBUTE_VALUE ) return getAttributeValueProposals(contents,
"");
- if( type == IN_ATTRIBUTE_VALUE ) return getAttributeValueProposals(contents);
- } catch( Exception e) {e.printStackTrace();}
+ int type = getType(contents);
+ if( type == NEW_ELEMENT ) return getElementProposals(contents, "");
+ if( type == IN_ELEMENT ) return getElementProposals(contents);
+ if( type == NEW_ATTRIBUTE ) return getAttributeNameProposals(contents.substring(0,
contents.length()-1), "");
+ if( type == IN_ATTRIBUTE ) return getAttributeNameProposals(contents);
+ if( type == NEW_ATTRIBUTE_VALUE ) return getAttributeValueProposals(contents,
"");
+ if( type == IN_ATTRIBUTE_VALUE ) return getAttributeValueProposals(contents);
return new IContentProposal[]{};
}
@@ -718,12 +713,12 @@
return new XPathResultNode[0];
if( xpathCache.containsKey(xpath)) {
- ArrayList list = (ArrayList)xpathCache.get(xpath);
+ ArrayList list = xpathCache.get(xpath);
return (XPathResultNode[]) list.toArray(new XPathResultNode[list.size()]);
}
XPathQuery tmp = new XPathQuery("", path, "**/*.xml", xpath,
null);
tmp.setRepository(repository);
- ArrayList list = new ArrayList();
+ ArrayList<XPathResultNode> list = new ArrayList<XPathResultNode>();
XPathFileResult[] items = tmp.getResults();
for( int i = 0; i < items.length; i++ ) {
XPathResultNode[] children = items[i].getChildren();
@@ -733,7 +728,7 @@
}
}
xpathCache.put(xpath, list);
- return (XPathResultNode[]) list.toArray(new XPathResultNode[list.size()]);
+ return list.toArray(new XPathResultNode[list.size()]);
}
public IContentProposal[] getElementProposals(String path) {
@@ -748,7 +743,7 @@
}
public String[] getElementProposalStrings(String parentPath, String elementPrefix) {
- TreeSet set = new TreeSet();
+ TreeSet<String> set = new TreeSet<String>();
XPathResultNode[] items = getXPath(parentPath + "*");
for( int i = 0; i < items.length; i++ ) {
if( items[i].getElementName().startsWith(elementPrefix)) {
@@ -759,7 +754,7 @@
}
}
}
- return (String[]) set.toArray(new String[set.size()]);
+ return set.toArray(new String[set.size()]);
}
public IContentProposal[] getAttributeNameProposals(String path) {
@@ -774,7 +769,7 @@
}
public String[] getAttributeNameProposalStrings(String parentPath, String remainder) {
- ArrayList names = new ArrayList();
+ ArrayList<String> names = new ArrayList<String>();
XPathResultNode[] items = getXPath(parentPath);
String[] attributes;
for( int i = 0; i < items.length; i++ ) {
@@ -804,7 +799,7 @@
String attName = parentPath.substring(brackIndex+2, eqIndex);
if( remainder.startsWith("'")) remainder = remainder.substring(1);
- ArrayList values = new ArrayList();
+ ArrayList<String> values = new ArrayList<String>();
XPathResultNode[] items = getXPath(parentElementPath);
String[] attributes;
for( int i = 0; i < items.length; i++ ) {
@@ -851,11 +846,11 @@
}
public IContentProposal[] convertProposals(String[] strings) {
- ArrayList list = new ArrayList();
+ ArrayList<XPathContentProposal> list = new
ArrayList<XPathContentProposal>();
for( int i = 0; i < strings.length; i++ ) {
list.add(new XPathContentProposal(strings[i], strings[i].length(), null, null));
}
- return (IContentProposal[]) list.toArray(new IContentProposal[list.size()]);
+ return list.toArray(new IContentProposal[list.size()]);
}
public class XPathContentProposal implements IContentProposal {
Copied:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploySection.java
(from rev 4083,
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/StrippedServerDeploySection.java)
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploySection.java
(rev 0)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploySection.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -0,0 +1,157 @@
+/**
+ * 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.editor;
+
+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.DirectoryDialog;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.wst.server.core.IServerWorkingCopy;
+import org.eclipse.wst.server.core.internal.ServerWorkingCopy;
+import org.eclipse.wst.server.ui.editor.ServerEditorSection;
+import org.eclipse.wst.server.ui.internal.command.ServerCommand;
+import org.jboss.ide.eclipse.as.core.server.internal.DeployableServer;
+import org.jboss.ide.eclipse.as.ui.Messages;
+
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
+public class DeploySection extends ServerEditorSection {
+
+ public DeploySection() {
+ // TODO Auto-generated constructor stub
+ }
+
+ public void init(IEditorSite site, IEditorInput input) {
+ super.init(site, input);
+ }
+
+ public void createSection(Composite parent)
+ {
+ super.createSection(parent);
+
+ FormToolkit toolkit = new FormToolkit(parent.getDisplay());
+
+ Section section = toolkit.createSection(parent,
ExpandableComposite.TWISTIE|ExpandableComposite.EXPANDED|ExpandableComposite.TITLE_BAR);
+ section.setText(Messages.sswf_DeployDirectory);
+ section.setLayoutData(new GridData(GridData.FILL_HORIZONTAL |
GridData.VERTICAL_ALIGN_FILL));
+
+ Composite composite = toolkit.createComposite(section);
+
+ composite.setLayout(new FormLayout());
+
+ Label label = toolkit.createLabel(composite, Messages.sswf_DeployDirectory);
+ final Text text = toolkit.createText(composite, getDeployDir(), SWT.BORDER);
+ text.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ execute(new SetDeployDirCommand(server, text, text.getText()));
+ }
+ });
+
+ Button button = toolkit.createButton(composite, Messages.browse, SWT.PUSH);
+ button.addSelectionListener(new SelectionListener() {
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ public void widgetSelected(SelectionEvent e) {
+ DirectoryDialog d = new DirectoryDialog(new Shell());
+ d.setFilterPath(text.getText());
+ String x = d.open();
+ if( x != null )
+ text.setText(x);
+ }
+ });
+
+
+ FormData labelData = new FormData();
+ labelData.left = new FormAttachment(0,5);
+ labelData.top = new FormAttachment(0,5);
+ label.setLayoutData(labelData);
+
+ FormData textData = new FormData();
+ textData.left = new FormAttachment(label, 5);
+ textData.top = new FormAttachment(0,5);
+ textData.right = new FormAttachment(button,-5);
+ text.setLayoutData(textData);
+
+ FormData buttonData = new FormData();
+ buttonData.right = new FormAttachment(100,-5);
+ buttonData.top = new FormAttachment(0,5);
+ button.setLayoutData(buttonData);
+
+ toolkit.paintBordersFor(composite);
+ section.setClient(composite);
+ }
+
+ private String getDeployDir() {
+ if( server instanceof ServerWorkingCopy ) {
+ return ((ServerWorkingCopy)server).getAttribute(DeployableServer.DEPLOY_DIRECTORY,
"");
+ }
+ return "";
+ }
+
+
+ public static class SetDeployDirCommand extends ServerCommand {
+ private String oldDir;
+ private String newDir;
+ private Text text;
+ public SetDeployDirCommand(IServerWorkingCopy wc, Text text, String newDir) {
+ super(wc, "SetDeployDirCommand");
+ this.text = text;
+ this.newDir = newDir;
+ if( wc instanceof ServerWorkingCopy ) {
+ this.oldDir = ((ServerWorkingCopy)wc).getAttribute(DeployableServer.DEPLOY_DIRECTORY,
"");
+ }
+ }
+ public void execute() {
+ if( server instanceof ServerWorkingCopy )
+ ((ServerWorkingCopy)server).setAttribute(DeployableServer.DEPLOY_DIRECTORY, newDir);
+ }
+ public void undo() {
+ if( server instanceof ServerWorkingCopy )
+ ((ServerWorkingCopy)server).setAttribute(DeployableServer.DEPLOY_DIRECTORY, oldDir);
+ text.setText(oldDir);
+ }
+ }
+
+ public void dispose() {
+ // ignore
+ }
+}
Deleted:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/JBossPortsEditorPage.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/JBossPortsEditorPage.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/JBossPortsEditorPage.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -1,96 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., 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.editor;
-
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.eclipse.ui.forms.widgets.ScrolledForm;
-import org.eclipse.ui.forms.widgets.Section;
-import org.eclipse.wst.server.core.IServerWorkingCopy;
-import org.eclipse.wst.server.core.model.ServerDelegate;
-import org.eclipse.wst.server.ui.editor.ServerEditorPart;
-import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
-
-public class JBossPortsEditorPage extends ServerEditorPart
-{
-
- private JBossServer getJBossServer ()
- {
- IServerWorkingCopy wc = getServer();
-
- return (JBossServer) wc.getOriginal().loadAdapter(ServerDelegate.class, null);
- }
-
- private Composite createCompositeForSection (FormToolkit toolkit, Section section)
- {
- Composite composite = toolkit.createComposite(section);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginHeight = 5;
- layout.marginWidth = 10;
- layout.verticalSpacing = 5;
- layout.horizontalSpacing = 15;
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
- toolkit.paintBordersFor(composite);
- section.setClient(composite);
-
- return composite;
- }
-
- private Section createSection (FormToolkit toolkit, ScrolledForm form, String text,
String description)
- {
- Section section = toolkit.createSection(form.getBody(), ExpandableComposite.TWISTIE |
ExpandableComposite.EXPANDED
- | ExpandableComposite.TITLE_BAR | Section.DESCRIPTION |
ExpandableComposite.FOCUS_TITLE);
-
- section.setText(text);
- section.setDescription(description);
- section.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- return section;
- }
-
- public void createPartControl(Composite parent)
- {
- FormToolkit toolkit = new FormToolkit(parent.getDisplay());
- ScrolledForm form = toolkit.createScrolledForm(parent);
- form.getBody().setLayout(new GridLayout());
-
- Section section = createSection(toolkit, form, "Ports", "Various ports
used by JBoss Application Server");
- Composite composite = createCompositeForSection(toolkit, section);
-
- Label jndiPortLabel = toolkit.createLabel(composite, "JNDI Port:");
- Text jndiPortText = toolkit.createText(composite, "");
-
- form.setContent(section);
- form.reflow(true);
- }
- public void setFocus()
- {
- // ignore
- }
-}
\ No newline at end of file
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerPasswordSection.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerPasswordSection.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerPasswordSection.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -1,3 +1,24 @@
+/**
+ * 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.editor;
import org.eclipse.swt.events.ModifyEvent;
@@ -19,6 +40,11 @@
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
import org.jboss.ide.eclipse.as.ui.Messages;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class ServerPasswordSection extends ServerEditorSection {
public void init(IEditorSite site, IEditorInput input) {
Deleted:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/StrippedServerDeploySection.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/StrippedServerDeploySection.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/StrippedServerDeploySection.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -1,131 +0,0 @@
-package org.jboss.ide.eclipse.as.ui.editor;
-
-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.DirectoryDialog;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.eclipse.ui.forms.widgets.Section;
-import org.eclipse.wst.server.core.IServerWorkingCopy;
-import org.eclipse.wst.server.core.internal.ServerWorkingCopy;
-import org.eclipse.wst.server.ui.editor.ServerEditorSection;
-import org.eclipse.wst.server.ui.internal.command.ServerCommand;
-import org.jboss.ide.eclipse.as.core.server.internal.DeployableServer;
-import org.jboss.ide.eclipse.as.ui.Messages;
-
-public class StrippedServerDeploySection extends ServerEditorSection {
-
- public StrippedServerDeploySection() {
- // TODO Auto-generated constructor stub
- }
-
- public void init(IEditorSite site, IEditorInput input) {
- super.init(site, input);
- }
-
- public void createSection(Composite parent)
- {
- super.createSection(parent);
-
- FormToolkit toolkit = new FormToolkit(parent.getDisplay());
-
- Section section = toolkit.createSection(parent,
ExpandableComposite.TWISTIE|ExpandableComposite.EXPANDED|ExpandableComposite.TITLE_BAR);
- section.setText(Messages.sswf_DeployDirectory);
- section.setLayoutData(new GridData(GridData.FILL_HORIZONTAL |
GridData.VERTICAL_ALIGN_FILL));
-
- Composite composite = toolkit.createComposite(section);
-
- composite.setLayout(new FormLayout());
-
- Label label = toolkit.createLabel(composite, Messages.sswf_DeployDirectory);
- final Text text = toolkit.createText(composite, getDeployDir(), SWT.BORDER);
- text.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- execute(new SetDeployDirCommand(server, text, text.getText()));
- }
- });
-
- Button button = toolkit.createButton(composite, Messages.browse, SWT.PUSH);
- button.addSelectionListener(new SelectionListener() {
- public void widgetDefaultSelected(SelectionEvent e) {
- }
- public void widgetSelected(SelectionEvent e) {
- DirectoryDialog d = new DirectoryDialog(new Shell());
- d.setFilterPath(text.getText());
- String x = d.open();
- if( x != null )
- text.setText(x);
- }
- });
-
-
- FormData labelData = new FormData();
- labelData.left = new FormAttachment(0,5);
- labelData.top = new FormAttachment(0,5);
- label.setLayoutData(labelData);
-
- FormData textData = new FormData();
- textData.left = new FormAttachment(label, 5);
- textData.top = new FormAttachment(0,5);
- textData.right = new FormAttachment(button,-5);
- text.setLayoutData(textData);
-
- FormData buttonData = new FormData();
- buttonData.right = new FormAttachment(100,-5);
- buttonData.top = new FormAttachment(0,5);
- button.setLayoutData(buttonData);
-
- toolkit.paintBordersFor(composite);
- section.setClient(composite);
- }
-
- private String getDeployDir() {
- if( server instanceof ServerWorkingCopy ) {
- return ((ServerWorkingCopy)server).getAttribute(DeployableServer.DEPLOY_DIRECTORY,
"");
- }
- return "";
- }
-
-
- public static class SetDeployDirCommand extends ServerCommand {
- private String oldDir;
- private String newDir;
- private Text text;
- public SetDeployDirCommand(IServerWorkingCopy wc, Text text, String newDir) {
- super(wc, "SetDeployDirCommand");
- this.text = text;
- this.newDir = newDir;
- if( wc instanceof ServerWorkingCopy ) {
- this.oldDir = ((ServerWorkingCopy)wc).getAttribute(DeployableServer.DEPLOY_DIRECTORY,
"");
- }
- }
- public void execute() {
- if( server instanceof ServerWorkingCopy )
- ((ServerWorkingCopy)server).setAttribute(DeployableServer.DEPLOY_DIRECTORY, newDir);
- }
- public void undo() {
- if( server instanceof ServerWorkingCopy )
- ((ServerWorkingCopy)server).setAttribute(DeployableServer.DEPLOY_DIRECTORY, oldDir);
- text.setText(oldDir);
- }
- }
-
- public void dispose() {
- // ignore
- }
-}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/JBossLaunchConfigurationTabGroup.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/JBossLaunchConfigurationTabGroup.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/JBossLaunchConfigurationTabGroup.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -1,3 +1,24 @@
+/**
+ * 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.launch;
import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
@@ -10,16 +31,17 @@
import org.eclipse.jdt.debug.ui.launchConfigurations.JavaClasspathTab;
import org.eclipse.jdt.debug.ui.launchConfigurations.JavaJRETab;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class JBossLaunchConfigurationTabGroup extends
AbstractLaunchConfigurationTabGroup {
public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[10];
int i = 0;
-// tabs[i] = new JBossJavaArgumentsTab(JBossJavaArgumentsTab.START);
-// tabs[i++].setLaunchConfigurationDialog(dialog);
-// tabs[i] = new JBossJavaArgumentsTab(JBossJavaArgumentsTab.STOP);
-// tabs[i++].setLaunchConfigurationDialog(dialog);
tabs[i] = new JavaArgumentsTab();
tabs[i++].setLaunchConfigurationDialog(dialog);
tabs[i] = new JavaClasspathTab();
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/NewEARAction.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/NewEARAction.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/NewEARAction.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -1,3 +1,24 @@
+/**
+ * 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.packages;
import org.eclipse.core.runtime.NullProgressMonitor;
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/NewEJBJARAction.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/NewEJBJARAction.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/NewEJBJARAction.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -1,3 +1,24 @@
+/**
+ * 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.packages;
import org.eclipse.core.runtime.NullProgressMonitor;
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/NewWARAction.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/NewWARAction.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/NewWARAction.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -1,3 +1,24 @@
+/**
+ * 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.packages;
import org.eclipse.core.runtime.NullProgressMonitor;
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/PreviewPage.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/PreviewPage.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/PreviewPage.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -1,3 +1,24 @@
+/**
+ * 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.packages;
import java.util.ArrayList;
@@ -168,8 +189,7 @@
}
return folders.toArray();
} catch (CoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ // ignore
}
}
return NO_CHILDREN;
@@ -183,21 +203,8 @@
}
public boolean hasChildren(Object element) {
- if (element instanceof IContainer) {
- IContainer container = (IContainer) element;
- try {
- IResource members[] = container.members();
- List folders = new ArrayList();
- for (int i = 0; i < members.length; i++) {
- if (members[i].getType() == IResource.FOLDER) folders.add(members[i]);
- }
- return folders.size() > 0;
- } catch (CoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- return false;
+ Object[] results = getChildren(element);
+ return results != null && results.length > 0;
}
public Object[] getElements(Object inputElement) {
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/PublishAction.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/PublishAction.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/PublishAction.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -1,3 +1,24 @@
+/**
+ * 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.packages;
import org.eclipse.jface.viewers.ArrayContentProvider;
@@ -80,9 +101,6 @@
this.pack = pack;
}
public boolean performFinish() {
-// System.out.println("servers: " + getServers());
-// System.out.println("autodeploy: " + getAutoDeploy());
-// System.out.println("always publish to these: " + getAlwaysPublish());
pack.setProperty(ArchivesBuildListener.DEPLOY_SERVERS, getServers());
pack.setProperty(ArchivesBuildListener.DEPLOY_AFTER_BUILD, getAutoDeploy());
return true;
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/perspective/ASPerspective.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/perspective/ASPerspective.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/perspective/ASPerspective.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -30,17 +30,14 @@
import org.eclipse.ui.console.IConsoleConstants;
import org.eclipse.ui.progress.IProgressConstants;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class ASPerspective implements IPerspectiveFactory {
public void createInitialLayout(IPageLayout layout) {
- // TODO Auto-generated method stub
-
-// PerspectiveLayoutInheritor inheritor = new PerspectiveLayoutInheritor(layout);
-// String javaPerspectiveId = "org.eclipse.jdt.ui.JavaPerspective";
-// inheritor.inheritInitialLayout(javaPerspectiveId);
-// inheritor.inheritExtensions(javaPerspectiveId, PerspectiveLayoutInheritor.VIEWS);
-
-
String editorArea = layout.getEditorArea();
IFolderLayout folder= layout.createFolder("left", IPageLayout.LEFT,
(float)0.25, editorArea); //$NON-NLS-1$
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/preferencepages/JBossServersPreferencePage.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/preferencepages/JBossServersPreferencePage.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/preferencepages/JBossServersPreferencePage.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -59,19 +59,21 @@
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.ui.part.PageBook;
-import org.eclipse.wst.server.core.IServerWorkingCopy;
import org.eclipse.wst.server.core.internal.ServerType;
import org.eclipse.wst.server.ui.ServerUICore;
import org.jboss.ide.eclipse.as.core.ExtensionManager;
import org.jboss.ide.eclipse.as.core.server.IServerPollingAttributes;
-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.server.internal.ServerAttributeHelper;
import org.jboss.ide.eclipse.as.core.server.internal.ServerStatePollerType;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
import org.jboss.ide.eclipse.as.ui.Messages;
-
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class JBossServersPreferencePage extends PreferencePage implements
IWorkbenchPreferencePage {
@@ -79,7 +81,7 @@
private JBossServer currentServer;
private Table serverTable;
private TableViewer serverTableViewer;
- private HashMap workingCoppies;
+ private HashMap<JBossServer, ServerAttributeHelper> workingCoppies;
private Group serverGroup, secondGroup;
private PageBook book;
private ServerPreferenceProvider[] groups;
@@ -116,7 +118,7 @@
serverGroup.setLayout(serverGroupLayout);
serverGroup.setText("Servers");
- workingCoppies = new HashMap();
+ workingCoppies = new HashMap<JBossServer, ServerAttributeHelper>();
serverTable = new Table(serverGroup, SWT.BORDER);
FormData lData = new FormData();
@@ -218,7 +220,7 @@
return ret;
}
- return (ServerAttributeHelper)workingCoppies.get(server);
+ return workingCoppies.get(server);
}
private ServerAttributeHelper getSelectedWC() {
@@ -236,10 +238,9 @@
/* Saves the actual ServerWorkingCopy changes into the IServer it relates to. */
private void saveDirtyWorkingCoppies() {
- Collection c = workingCoppies.values();
- Iterator i = c.iterator();
+ Collection<ServerAttributeHelper> c = workingCoppies.values();
+ Iterator<ServerAttributeHelper> i = c.iterator();
Object o;
- IServerWorkingCopy copy;
while(i.hasNext()) {
o = i.next();
if( o instanceof ServerAttributeHelper) {
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/preferencepages/ViewPreferencePage.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/preferencepages/ViewPreferencePage.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/preferencepages/ViewPreferencePage.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -53,6 +53,11 @@
import org.jboss.ide.eclipse.as.ui.views.server.JBossServerView;
import org.jboss.ide.eclipse.as.ui.views.server.extensions.ServerViewProvider;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class ViewPreferencePage extends PreferencePage implements
IWorkbenchPreferencePage {
@@ -62,8 +67,8 @@
private Label mainDescriptionLabel, preferenceCompositeDescriptionLabel;
- private HashMap providerToGroup;
- private ArrayList preferenceComposites, enabledButtons;
+ private HashMap<ServerViewProvider, Group> providerToGroup;
+ private ArrayList<Control> preferenceComposites, enabledButtons;
private PageBook book;
private Composite mainComposite;
private ServerViewProvider[] providers;
@@ -71,8 +76,8 @@
private Button moveUp, moveDown;
public ViewPreferencePage() {
- providerToGroup = new HashMap();
- preferenceComposites = new ArrayList();
+ providerToGroup = new HashMap<ServerViewProvider, Group>();
+ preferenceComposites = new ArrayList<Control>();
}
public ViewPreferencePage(String title) {
@@ -130,7 +135,7 @@
protected Control createContents(Composite p) {
- providerToGroup = new HashMap();
+ providerToGroup = new HashMap<ServerViewProvider, Group>();
mainComposite = new Composite(p, SWT.NONE);
mainComposite.setLayout(new FormLayout());
@@ -152,7 +157,7 @@
TableItem item = (table.getSelection())[0];
Object o = item.getData();
if( o != null && o instanceof ServerViewProvider) {
- Group g = (Group)providerToGroup.get(((ServerViewProvider)o));
+ Group g = providerToGroup.get(((ServerViewProvider)o));
book.showPage(g);
}
} catch( Exception ex ) {
@@ -205,7 +210,7 @@
providers = JBossServerUIPlugin.getDefault().getAllServerViewProviders();
int minWidth = 0;
- enabledButtons = new ArrayList();
+ enabledButtons = new ArrayList<Control>();
for (int i = 0; i < providers.length; i++) {
final TableItem item = new TableItem(table, SWT.NONE);
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/preferencepages/ViewProviderPreferenceComposite.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/preferencepages/ViewProviderPreferenceComposite.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/preferencepages/ViewProviderPreferenceComposite.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -1,3 +1,24 @@
+/**
+ * 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.preferencepages;
import org.eclipse.swt.widgets.Composite;
@@ -2,2 +23,7 @@
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public abstract class ViewProviderPreferenceComposite extends Composite {
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/ExtensionTableViewer.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/ExtensionTableViewer.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/ExtensionTableViewer.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -1,3 +1,24 @@
+/**
+ * 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;
import java.util.ArrayList;
@@ -38,6 +59,11 @@
import
org.jboss.ide.eclipse.as.ui.views.server.extensions.PropertySheetFactory.ISimplePropertiesHolder;
import
org.jboss.ide.eclipse.as.ui.views.server.extensions.PropertySheetFactory.SimplePropertiesPropertySheetPage;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class ExtensionTableViewer extends TreeViewer {
protected TableViewerPropertySheet propertySheet;
@@ -190,27 +216,24 @@
}
public Object[] getChildren(Object parentElement) {
- try {
- if( parentElement == null ) return new Object[0];
+ if( parentElement == null ) return new Object[0];
- if( parentElement instanceof ServerViewProvider) {
- Object[] ret =
((ServerViewProvider)parentElement).getDelegate().getContentProvider().getChildren(parentElement);
- return wrap(ret, ((ServerViewProvider)parentElement));
+ if( parentElement instanceof ServerViewProvider) {
+ Object[] ret =
((ServerViewProvider)parentElement).getDelegate().getContentProvider().getChildren(parentElement);
+ return wrap(ret, ((ServerViewProvider)parentElement));
+ }
+
+ if( parentElement instanceof ContentWrapper ) {
+ ContentWrapper parentWrapper = (ContentWrapper)parentElement;
+ Object[] o = null;
+ try {
+ o =
parentWrapper.getProvider().getDelegate().getContentProvider().getChildren(parentWrapper.getElement());
+ } catch( Exception e) {
+ JBossServerUIPlugin.log("Error finding children of " + parentElement, e);
}
-
- if( parentElement instanceof ContentWrapper ) {
- ContentWrapper parentWrapper = (ContentWrapper)parentElement;
- Object[] o = null;
- try {
- o =
parentWrapper.getProvider().getDelegate().getContentProvider().getChildren(parentWrapper.getElement());
- } catch( Exception e) {
- }
- if( o == null )
- return new Object[0];
- return wrap(o, parentWrapper.getProvider());
- }
- } catch( Exception e ) {
- //e.printStackTrace();
+ if( o == null )
+ return new Object[0];
+ return wrap(o, parentWrapper.getProvider());
}
return new Object[0];
}
@@ -239,6 +262,7 @@
try {
providers[i].getDelegate().getContentProvider().inputChanged(viewer, oldInput,
newInput);
} catch( Exception e) {
+ JBossServerUIPlugin.log("Error changing input to " + newInput, e);
}
}
}
@@ -429,7 +453,7 @@
try {
super.refresh(element);
} catch( Exception e ) {
- e.printStackTrace();
+ JBossServerUIPlugin.log("Error refreshing view. ", e);
}
}
}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/JBossServerView.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/JBossServerView.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/JBossServerView.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -1,3 +1,24 @@
+/**
+ * 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;
import java.util.ArrayList;
@@ -19,13 +40,18 @@
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.ui.internal.ServerUIPlugin;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class JBossServerView extends ViewPart {
private static final String TAG_SASHFORM_HEIGHT = "sashformHeight";
public static JBossServerView instance;
- private static ArrayList serverFrameListeners = new ArrayList();
- private static ArrayList extensionFrameListeners = new ArrayList();
+ private static ArrayList<ISelectionChangedListener> serverFrameListeners = new
ArrayList<ISelectionChangedListener>();
+ private static ArrayList<ISelectionChangedListener> extensionFrameListeners = new
ArrayList<ISelectionChangedListener>();
public static JBossServerView getDefault() {
return instance;
@@ -131,11 +157,11 @@
// if the extensions have already been created, add those listeners now.
- Iterator k;
+ Iterator<ISelectionChangedListener> k;
for(k = serverFrameListeners.iterator(); k.hasNext();)
- serverFrame.getViewer().addSelectionChangedListener(((ISelectionChangedListener)k.next()));
+ serverFrame.getViewer().addSelectionChangedListener(k.next());
for(k = extensionFrameListeners.iterator(); k.hasNext();)
- extensionFrame.getViewer().addSelectionChangedListener(((ISelectionChangedListener)k.next()));
+ extensionFrame.getViewer().addSelectionChangedListener(k.next());
}
public void refreshAll() {
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/ServerExtensionFrame.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/ServerExtensionFrame.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/ServerExtensionFrame.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -1,3 +1,24 @@
+/**
+ * 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;
import org.eclipse.jface.action.IAction;
@@ -20,6 +41,11 @@
import org.eclipse.wst.server.ui.internal.view.servers.ModuleServer;
import org.jboss.ide.eclipse.as.ui.views.server.JBossServerView.IServerViewFrame;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class ServerExtensionFrame extends Composite implements IServerViewFrame {
private Tree jbTreeTable;
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/ServerFrame.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/ServerFrame.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/ServerFrame.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -1,3 +1,24 @@
+/**
+ * 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;
import org.eclipse.core.runtime.CoreException;
@@ -45,6 +66,11 @@
import org.jboss.ide.eclipse.as.ui.dialogs.TwiddleDialog;
import org.jboss.ide.eclipse.as.ui.views.server.JBossServerView.IServerViewFrame;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class ServerFrame extends Composite implements IServerViewFrame {
protected Action[] actions;
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/ServerTableViewer.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/ServerTableViewer.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/ServerTableViewer.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -1,4 +1,25 @@
package org.jboss.ide.eclipse.as.ui.views.server;
+/**
+ * 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.
+ */
/*******************************************************************************
* Copyright (c) 2003, 2005 IBM Corporation and others.
@@ -47,6 +68,8 @@
/**
* Tree view showing servers and their associations.
* This is for the TOP window
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
*/
public class ServerTableViewer extends TreeViewer {
protected static final String ROOT = "root";
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/JBossServerViewExtension.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/JBossServerViewExtension.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/JBossServerViewExtension.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -1,3 +1,24 @@
+/**
+ * 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.extensions;
import org.eclipse.core.runtime.NullProgressMonitor;
@@ -12,11 +33,17 @@
import org.eclipse.wst.server.core.IServer;
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
+import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
import org.jboss.ide.eclipse.as.ui.preferencepages.ViewProviderPreferenceComposite;
import org.jboss.ide.eclipse.as.ui.views.server.ExtensionTableViewer;
import org.jboss.ide.eclipse.as.ui.views.server.JBossServerView;
import org.jboss.ide.eclipse.as.ui.views.server.ExtensionTableViewer.ContentWrapper;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public abstract class JBossServerViewExtension {
protected ServerViewProvider provider;
@@ -98,6 +125,7 @@
viewer.refresh(provider);
}
} catch(Exception e) {
+ JBossServerUIPlugin.log("Error refreshing viewer (object=" + o +
")", e);
}
}
}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/PropertySheetFactory.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/PropertySheetFactory.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/PropertySheetFactory.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -1,3 +1,24 @@
+/**
+ * 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.extensions;
import java.util.Properties;
@@ -26,6 +47,11 @@
import org.jboss.ide.eclipse.as.ui.Messages;
import org.jboss.ide.eclipse.as.ui.views.server.ExtensionTableViewer.ContentWrapper;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class PropertySheetFactory {
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ServerViewProvider.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ServerViewProvider.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ServerViewProvider.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -9,6 +9,11 @@
import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
import org.osgi.framework.Bundle;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class ServerViewProvider {
public static final String EXTENSION_ENABLED = "EXTENSION_ENABLED_";
public static final String EXTENSION_WEIGHT = "EXTENSION_WEIGHT_";
@@ -43,13 +48,8 @@
setWeight( prefs.contains(weightKey) ? prefs.getInt(weightKey) : 0 );
Bundle pluginBundle = JBossServerUIPlugin.getDefault().getBundle();
- try {
- iconDescriptor =
- ImageDescriptor.createFromURL(pluginBundle.getEntry(getIconLocation()));
- } catch( Exception e ) {
- }
-
-
+ iconDescriptor =
+ ImageDescriptor.createFromURL(pluginBundle.getEntry(getIconLocation()));
}
public String getId() {
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/SimplePropertiesViewExtension.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/SimplePropertiesViewExtension.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/SimplePropertiesViewExtension.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -31,6 +31,11 @@
import
org.jboss.ide.eclipse.as.ui.views.server.extensions.PropertySheetFactory.ISimplePropertiesHolder;
import
org.jboss.ide.eclipse.as.ui.views.server.extensions.PropertySheetFactory.SimplePropertiesPropertySheetPage;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public abstract class SimplePropertiesViewExtension
extends JBossServerViewExtension implements ISimplePropertiesHolder {
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/DescriptorXPathViewProvider.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/DescriptorXPathViewProvider.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/DescriptorXPathViewProvider.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -54,6 +54,7 @@
import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathModel;
import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathQuery;
import
org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathFileResult.XPathResultNode;
+import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
import org.jboss.ide.eclipse.as.ui.Messages;
import org.jboss.ide.eclipse.as.ui.dialogs.XPathDialogs;
import org.jboss.ide.eclipse.as.ui.dialogs.XPathDialogs.XPathCategoryDialog;
@@ -64,6 +65,11 @@
import
org.jboss.ide.eclipse.as.ui.views.server.providers.descriptors.DescriptorXPathPropertySheetPage;
import org.jboss.ide.eclipse.as.ui.views.server.util.ViewUtilityMethods;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class DescriptorXPathViewProvider extends JBossServerViewExtension {
private XPathTreeContentProvider contentProvider;
@@ -287,6 +293,7 @@
}
}
} catch( Exception exc ) {
+ JBossServerUIPlugin.log("Error running edit file action", exc);
}
}
};
@@ -301,12 +308,10 @@
}
if( selection instanceof XPathCategory ) {
- try {
- setActiveCategory((XPathCategory)selection);
- menu.add(this.newXPathAction);
- menu.add(this.deleteXPathCategoryAction);
- menu.add(new Separator());
- } catch( Exception e ) { e.printStackTrace(); }
+ setActiveCategory((XPathCategory)selection);
+ menu.add(this.newXPathAction);
+ menu.add(this.deleteXPathCategoryAction);
+ menu.add(new Separator());
}
}
@@ -330,6 +335,7 @@
propertyPage.getViewer().refresh();
}
} catch(Exception e) {
+ JBossServerUIPlugin.log("Error refreshing view
(descriptorXPathViewProvider)", e);
}
}
}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/EventLogViewProvider.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/EventLogViewProvider.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/EventLogViewProvider.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -65,6 +65,11 @@
import org.jboss.ide.eclipse.as.ui.views.server.extensions.ServerViewProvider;
import
org.jboss.ide.eclipse.as.ui.views.server.extensions.PropertySheetFactory.ISimplePropertiesHolder;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class EventLogViewProvider extends JBossServerViewExtension implements
IEventLogListener, ISimplePropertiesHolder {
public static final String SHOW_TIMESTAMP =
"org.jboss.ide.eclipse.as.ui.views.server.providers.EventLogViewProvider.showTimestamp";
@@ -253,7 +258,7 @@
try {
labelProviderDelegates[i] =
(IEventLogLabelProvider)elements[i].createExecutableExtension("class");
} catch( CoreException ce ) {
- ce.printStackTrace();
+ JBossServerUIPlugin.log("Error loading Event Log Label Provider Delegate",
ce);
}
}
}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/FilesetViewProvider.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/FilesetViewProvider.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/FilesetViewProvider.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -1,3 +1,24 @@
+/**
+ * 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;
import java.io.File;
@@ -68,6 +89,11 @@
import org.jboss.ide.eclipse.as.ui.views.server.extensions.ServerViewProvider;
import
org.jboss.ide.eclipse.as.ui.views.server.extensions.SimplePropertiesViewExtension;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class FilesetViewProvider extends SimplePropertiesViewExtension {
private static final String FILESET_KEY =
"org.jboss.ide.eclipse.as.ui.views.server.providers.FilesetViewProvider.PropertyKey";
@@ -117,9 +143,9 @@
public void run() {
if( selection instanceof Fileset ) {
try {
- ArrayList asList = new ArrayList(Arrays.asList(filesets));
+ ArrayList<Fileset> asList = new
ArrayList<Fileset>(Arrays.asList(filesets));
asList.remove(selection);
- filesets = (Fileset[]) asList.toArray(new Fileset[asList.size()]);
+ filesets = asList.toArray(new Fileset[asList.size()]);
saveFilesets();
} catch( Exception e ) {
e.printStackTrace();
@@ -214,12 +240,12 @@
}
public static class FolderWrapper extends PathWrapper {
- private HashMap childrenFolders;
- private ArrayList children;
+ private HashMap<String, FolderWrapper> childrenFolders;
+ private ArrayList<PathWrapper> children;
public FolderWrapper(IPath path, IPath folder) {
super(path, folder);
- children = new ArrayList();
- childrenFolders = new HashMap();
+ children = new ArrayList<PathWrapper>();
+ childrenFolders = new HashMap<String, FolderWrapper>();
}
public void addChild(IPath path) {
if( path.segmentCount() == 1 ) {
@@ -229,11 +255,11 @@
}
}
public Object[] getChildren() {
- return (Object[]) children.toArray(new Object[children.size()]);
+ return children.toArray(new Object[children.size()]);
}
}
- private static void addPath(ArrayList children, HashMap folders, IPath path, IPath
folder) {
+ private static void addPath(ArrayList<PathWrapper> children, HashMap<String,
FolderWrapper> folders, IPath path, IPath folder) {
try {
FolderWrapper fw = null;
if( !folders.containsKey(path.segment(0))) {
@@ -241,7 +267,7 @@
folders.put(path.segment(0), fw);
children.add(fw);
} else {
- fw = (FolderWrapper)folders.get( path.segment(0));
+ fw = folders.get( path.segment(0));
}
fw.addChild(path.removeFirstSegments(1));
} catch( Exception e ) {
@@ -264,8 +290,8 @@
return new Object[]{};
}
- HashMap folders = new HashMap();
- ArrayList wrappers = new ArrayList();
+ HashMap<String, FolderWrapper> folders = new HashMap<String,
FolderWrapper>();
+ ArrayList<PathWrapper> wrappers = new ArrayList<PathWrapper>();
for( int i = 0; i < paths.length; i++ ) {
if( paths[i].segmentCount() == 1 ) {
wrappers.add(new PathWrapper(paths[i], new Path(fs.getFolder())));
@@ -273,7 +299,7 @@
addPath(wrappers, folders, paths[i], new Path(fs.getFolder()));
}
}
- return (Object[]) wrappers.toArray(new Object[wrappers.size()]);
+ return wrappers.toArray(new Object[wrappers.size()]);
} else if( parentElement instanceof FolderWrapper ) {
return ((FolderWrapper)parentElement).getChildren();
}
@@ -319,7 +345,7 @@
public void saveFilesets() {
IServer server = contentProvider.server;
if( server != null ) {
- ArrayList list = new ArrayList();
+ ArrayList<String> list = new ArrayList<String>();
for( int i = 0; i < filesets.length; i++ ) {
list.add(filesets[i].toString());
}
@@ -444,7 +470,7 @@
descriptor = PlatformUI.getWorkbench().getSharedImages()
.getImageDescriptor(ISharedImages.IMG_OBJ_FILE);
}
- Image image = (Image) SWTResourceUtil.getImageTable().get(descriptor);
+ Image image = (Image)SWTResourceUtil.getImageTable().get(descriptor);
if (image == null) {
image = descriptor.createImage();
SWTResourceUtil.getImageTable().put(descriptor, image);
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/InactiveExtensionViewProvider.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/InactiveExtensionViewProvider.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/InactiveExtensionViewProvider.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -38,7 +38,11 @@
import org.jboss.ide.eclipse.as.ui.views.server.extensions.JBossServerViewExtension;
import org.jboss.ide.eclipse.as.ui.views.server.extensions.ServerViewProvider;
-
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class InactiveExtensionViewProvider extends JBossServerViewExtension {
private ITreeContentProvider contentProvider;
@@ -54,7 +58,7 @@
public Object[] getChildren(Object parentElement) {
if( parentElement == provider ) {
ServerViewProvider[] allExtensions =
JBossServerUIPlugin.getDefault().getAllServerViewProviders();
- ArrayList list = new ArrayList();
+ ArrayList<ServerViewProvider> list = new
ArrayList<ServerViewProvider>();
for( int i = 0; i < allExtensions.length; i++ ) {
if( !allExtensions[i].isEnabled()) {
list.add(allExtensions[i]);
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/ModuleViewProvider.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/ModuleViewProvider.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/ModuleViewProvider.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -19,7 +19,6 @@
* 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;
import java.util.Properties;
@@ -51,11 +50,17 @@
import org.jboss.ide.eclipse.as.core.server.UnitedServerListener;
import org.jboss.ide.eclipse.as.core.server.UnitedServerListenerManager;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
+import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
import org.jboss.ide.eclipse.as.ui.JBossServerUISharedImages;
import org.jboss.ide.eclipse.as.ui.Messages;
import org.jboss.ide.eclipse.as.ui.views.server.extensions.ServerViewProvider;
import
org.jboss.ide.eclipse.as.ui.views.server.extensions.SimplePropertiesViewExtension;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class ModuleViewProvider extends SimplePropertiesViewExtension {
private ModuleContentProvider contentProvider;
@@ -139,6 +144,7 @@
}
} catch( Exception e ) {
// ignore
+ JBossServerUIPlugin.log("Error running publish action", e);
}
}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/descriptors/DescriptorXPathPropertySheetPage.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/descriptors/DescriptorXPathPropertySheetPage.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/descriptors/DescriptorXPathPropertySheetPage.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -1,3 +1,24 @@
+/**
+ * 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.descriptors;
import org.eclipse.jface.action.IMenuListener;
@@ -42,6 +63,11 @@
import org.jboss.ide.eclipse.as.ui.views.server.ExtensionTableViewer.ContentWrapper;
import org.jboss.ide.eclipse.as.ui.views.server.providers.DescriptorXPathViewProvider;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class DescriptorXPathPropertySheetPage implements IPropertySheetPage {
private TreeViewer xpathTreeViewer;
private TreeColumn column, column2;//, column3;
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/descriptors/XPathPropertyContentProvider.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/descriptors/XPathPropertyContentProvider.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/descriptors/XPathPropertyContentProvider.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -1,3 +1,24 @@
+/**
+ * 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.descriptors;
import org.eclipse.jface.viewers.ITreeContentProvider;
@@ -8,6 +29,11 @@
import
org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathFileResult.XPathResultNode;
import org.jboss.ide.eclipse.as.ui.views.server.extensions.ServerViewProvider;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class XPathPropertyContentProvider implements ITreeContentProvider {
public Object[] getChildren(Object parentElement) {
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/descriptors/XPathPropertyLabelProvider.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/descriptors/XPathPropertyLabelProvider.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/descriptors/XPathPropertyLabelProvider.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -1,3 +1,24 @@
+/**
+ * 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.descriptors;
import java.util.ArrayList;
@@ -11,6 +32,11 @@
import
org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathFileResult.XPathResultNode;
import org.jboss.ide.eclipse.as.ui.Messages;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class XPathPropertyLabelProvider extends LabelProvider implements
ITableLabelProvider {
public Image getColumnImage(Object element, int columnIndex) {
return null;
@@ -45,13 +71,12 @@
}
public XPathResultNode[] getResultNodes(XPathQuery query) {
- int count = 0;
- ArrayList l = new ArrayList();
+ ArrayList<XPathResultNode> l = new ArrayList<XPathResultNode>();
XPathFileResult[] files = query.getResults();
for( int i = 0; i < files.length; i++ ) {
l.addAll(Arrays.asList(files[i].getChildren()));
}
- return (XPathResultNode[]) l.toArray(new XPathResultNode[l.size()]);
+ return l.toArray(new XPathResultNode[l.size()]);
}
}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events/ComplexEventLogLabelProvider.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events/ComplexEventLogLabelProvider.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events/ComplexEventLogLabelProvider.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -28,7 +28,6 @@
import java.util.Properties;
import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.swt.graphics.Image;
import org.jboss.ide.eclipse.as.core.extensions.events.EventLogModel.EventLogTreeItem;
import org.jboss.ide.eclipse.as.ui.views.server.extensions.IEventLogLabelProvider;
@@ -40,11 +39,11 @@
extends LabelProvider implements IEventLogLabelProvider {
protected static String DELIMITER = "::";
- protected ArrayList supported;
- protected HashMap propertyToMessageMap;
+ protected ArrayList<String> supported;
+ protected HashMap<String, String> propertyToMessageMap;
public ComplexEventLogLabelProvider() {
- supported = new ArrayList();
- propertyToMessageMap = new HashMap();
+ supported = new ArrayList<String>();
+ propertyToMessageMap = new HashMap<String, String>();
addSupportedTypes();
loadPropertyMap();
}
@@ -59,10 +58,10 @@
public Properties getProperties(EventLogTreeItem item) {
loadPropertyMap();
Properties p = new Properties();
- HashMap map = item.getProperties();
+ HashMap<Object, Object> map = item.getProperties();
Object key = null;
String keyString, valueStringKey, valueString;
- for( Iterator i = map.keySet().iterator(); i.hasNext();) {
+ for( Iterator<Object> i = map.keySet().iterator(); i.hasNext();) {
try {
key = i.next();
if( key.equals(EventLogTreeItem.DATE)) {
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events/PackagesPublishLabelProvider.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events/PackagesPublishLabelProvider.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events/PackagesPublishLabelProvider.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -1,7 +1,26 @@
+/**
+ * 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.events;
-import java.util.ArrayList;
-
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.swt.graphics.Image;
@@ -14,11 +33,15 @@
import org.jboss.ide.eclipse.as.ui.JBossServerUISharedImages;
import org.jboss.ide.eclipse.as.ui.views.server.extensions.IEventLogLabelProvider;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class PackagesPublishLabelProvider extends ComplexEventLogLabelProvider
implements
IEventLogLabelProvider {
protected void addSupportedTypes() {
- supported = new ArrayList();
supported.add(PublisherEventLogger.ROOT_EVENT);
supported.add(PublisherEventLogger.MODULE_ROOT_EVENT);
supported.add(PublisherEventLogger.FILE_COPPIED_EVENT);
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events/PollingLabelProvider.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events/PollingLabelProvider.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events/PollingLabelProvider.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -21,8 +21,6 @@
*/
package org.jboss.ide.eclipse.as.ui.views.server.providers.events;
-import java.util.ArrayList;
-
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.ISharedImages;
@@ -45,7 +43,6 @@
protected void addSupportedTypes() {
- supported = new ArrayList();
supported.add(PollThread.SERVER_STARTING);
supported.add(PollThread.SERVER_STOPPING);
supported.add(PollThread.FAILURE);
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/AttributeGroup.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/AttributeGroup.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/AttributeGroup.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -1,3 +1,24 @@
+/**
+ * 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;
@@ -36,6 +57,11 @@
import org.jboss.ide.eclipse.as.core.extensions.jmx.JMXModel.WrappedMBeanAttributeInfo;
import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class AttributeGroup extends Composite {
protected Tree tree;
@@ -222,13 +248,12 @@
String type = attInfo.getInfo().getType();
Object val = null;
- try {
+ if( type != null ) {
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 == null ? null :
new Attribute(attInfo.getInfo().getName(), val);
}
@@ -286,7 +311,6 @@
ret += element2.getInfo().isWritable() ? "W" : "";
return ret;
}
-
}
return null;
}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/JMXLabelProvider.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/JMXLabelProvider.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/JMXLabelProvider.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -1,3 +1,24 @@
+/**
+ * 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;
@@ -11,6 +32,11 @@
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(a)redhat.com>
+ *
+ */
class JMXLabelProvider extends LabelProvider {
public String getText(Object obj) {
if (obj instanceof JMXDomain)
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/JMXPropertySheetPage.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/JMXPropertySheetPage.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/JMXPropertySheetPage.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -1,3 +1,24 @@
+/**
+ * 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.ISelection;
@@ -26,6 +47,11 @@
import org.jboss.ide.eclipse.as.ui.views.server.ExtensionTableViewer.ContentWrapper;
import
org.jboss.ide.eclipse.as.ui.views.server.providers.jmx.JMXViewProvider.ErrorGroup;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class JMXPropertySheetPage implements IPropertySheetPage {
// data
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/JMXTreeContentProvider.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/JMXTreeContentProvider.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/JMXTreeContentProvider.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -1,3 +1,24 @@
+/**
+ * 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;
@@ -14,6 +35,11 @@
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(a)redhat.com>
+ *
+ */
public class JMXTreeContentProvider implements ITreeContentProvider {
protected JMXViewProvider provider;
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/JMXViewProvider.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/JMXViewProvider.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/JMXViewProvider.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -1,3 +1,24 @@
+/**
+ * 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;
@@ -24,6 +45,11 @@
import org.jboss.ide.eclipse.as.ui.views.server.extensions.ServerViewProvider;
import org.jboss.ide.eclipse.as.ui.views.server.util.ViewUtilityMethods;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class JMXViewProvider extends JBossServerViewExtension {
public static final Object LOADING = new Object();
public static final String[] LOADING_STRING_ARRAY = new String[] {
"Loading..." };
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/OperationGroup.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/OperationGroup.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/OperationGroup.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -1,3 +1,24 @@
+/**
+ * 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.MBeanParameterInfo;
@@ -18,6 +39,11 @@
import org.eclipse.swt.widgets.TreeColumn;
import org.jboss.ide.eclipse.as.core.extensions.jmx.JMXModel.WrappedMBeanOperationInfo;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class OperationGroup extends Composite {
protected Tree tree;
protected TreeColumn nameColumn, typeColumn,
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/util/ViewUtilityMethods.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/util/ViewUtilityMethods.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/util/ViewUtilityMethods.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -1,3 +1,24 @@
+/**
+ * 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.util;
import org.eclipse.swt.widgets.Display;
@@ -11,6 +32,11 @@
import org.eclipse.ui.views.properties.IPropertySheetPage;
import org.jboss.ide.eclipse.as.ui.views.server.JBossServerView;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class ViewUtilityMethods {
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossServerWizardFragment.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossServerWizardFragment.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossServerWizardFragment.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -63,6 +63,11 @@
import org.jboss.ide.eclipse.as.ui.JBossServerUISharedImages;
import org.jboss.ide.eclipse.as.ui.Messages;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class JBossServerWizardFragment extends WizardFragment {
private IWizardHandle handle;
private String name, authUser, authPass, deployVal;
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/StrippedServerWizardFragment.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/StrippedServerWizardFragment.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/StrippedServerWizardFragment.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -1,3 +1,24 @@
+/**
+ * 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.wizards;
import java.io.File;
@@ -33,6 +54,11 @@
import org.jboss.ide.eclipse.as.ui.JBossServerUISharedImages;
import org.jboss.ide.eclipse.as.ui.Messages;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class StrippedServerWizardFragment extends WizardFragment {
private IWizardHandle handle;
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/initialSelectionProvider.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/initialSelectionProvider.java 2007-10-18
03:57:50 UTC (rev 4311)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/initialSelectionProvider.java 2007-10-18
04:54:36 UTC (rev 4312)
@@ -1,3 +1,24 @@
+/**
+ * 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.wizards;
import org.eclipse.wst.server.core.IServerType;
@@ -3,4 +24,9 @@
import org.eclipse.wst.server.ui.internal.viewers.InitialSelectionProvider;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class initialSelectionProvider extends InitialSelectionProvider {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2007-10-18 03:57:50 UTC (rev
4311)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2007-10-18 04:54:36 UTC (rev
4312)
@@ -224,7 +224,7 @@
<extension
point="org.eclipse.wst.server.ui.editorPageSections">
<section
-
class="org.jboss.ide.eclipse.as.ui.editor.StrippedServerDeploySection"
+ class="org.jboss.ide.eclipse.as.ui.editor.DeploySection"
id="org.jboss.ide.eclipse.as.ui.exitor.deployServer.deployDir"
insertionId="org.eclipse.wst.server.editor.overview.left"
order="10"