JBoss Tools SVN: r4316 - in trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui: mbeans/editors and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-10-18 01:19:22 -0400 (Thu, 18 Oct 2007)
New Revision: 4316
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/Activator.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors/AdaptorFactoryProviderForServiceXML.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors/ServiceXMLCorrectionAssistantProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors/ServiceXMLEditorConfiguration.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors/ServiceXMLOutlineConfiguration.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors/ServicexmlModelHandler.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/wizards/NewMBeanWizard.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/util/PackageTypeSearcher.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/util/ServiceXMLEditorUtil.java
Log:
JBIDE-1048 (Exception cleanup)
Also added headers and author tags
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/Activator.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/Activator.java 2007-10-18 05:11:04 UTC (rev 4315)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/Activator.java 2007-10-18 05:19:22 UTC (rev 4316)
@@ -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.mbeans;
import org.eclipse.ui.plugin.AbstractUIPlugin;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors/AdaptorFactoryProviderForServiceXML.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors/AdaptorFactoryProviderForServiceXML.java 2007-10-18 05:11:04 UTC (rev 4315)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors/AdaptorFactoryProviderForServiceXML.java 2007-10-18 05:19:22 UTC (rev 4316)
@@ -24,6 +24,11 @@
import org.eclipse.wst.sse.core.internal.ltk.modelhandler.IDocumentTypeHandler;
import org.eclipse.wst.xml.ui.internal.registry.AdapterFactoryProviderForXML;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class AdaptorFactoryProviderForServiceXML extends
AdapterFactoryProviderForXML {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors/ServiceXMLCorrectionAssistantProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors/ServiceXMLCorrectionAssistantProvider.java 2007-10-18 05:11:04 UTC (rev 4315)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors/ServiceXMLCorrectionAssistantProvider.java 2007-10-18 05:19:22 UTC (rev 4316)
@@ -58,6 +58,11 @@
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class ServiceXMLCorrectionAssistantProvider extends CorrectionAssistantProviderXML {
public static IServiceXMLQuickFixProposalProvider[] providers;
@@ -70,7 +75,7 @@
try {
list.add((IServiceXMLQuickFixProposalProvider)cf[i].createExecutableExtension("class"));
} catch( CoreException ce ) {
- ce.printStackTrace();
+ // don't even log
}
}
providers = (IServiceXMLQuickFixProposalProvider[])
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors/ServiceXMLEditorConfiguration.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors/ServiceXMLEditorConfiguration.java 2007-10-18 05:11:04 UTC (rev 4315)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors/ServiceXMLEditorConfiguration.java 2007-10-18 05:19:22 UTC (rev 4316)
@@ -72,6 +72,11 @@
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class ServiceXMLEditorConfiguration extends
StructuredTextViewerConfigurationXML {
@@ -95,13 +100,13 @@
public class ServiceXMLContentAssistProcessor extends XMLContentAssistProcessor {
- private HashMap children;
- private HashMap attributes;
+ private HashMap<String, ArrayList<ChildOccurances>> children;
+ private HashMap<String, List> attributes;
public ServiceXMLContentAssistProcessor() {
super();
- children = new HashMap();
- attributes = new HashMap();
+ children = new HashMap<String, ArrayList<ChildOccurances>>();
+ attributes = new HashMap<String, List>();
fillChildren();
fillAttributes();
}
@@ -153,22 +158,22 @@
}
private void fillChildren() {
- ArrayList list = new ArrayList();
+ ArrayList<ChildOccurances> list = new ArrayList<ChildOccurances>();
list.add(new ChildOccurances("loader-repository", ChildOccurances.ZERO_OR_ONE));
list.add(new ChildOccurances("local-directory", ChildOccurances.ZERO_TO_INFINITY));
list.add(new ChildOccurances("classpath", ChildOccurances.ZERO_TO_INFINITY));
list.add(new ChildOccurances("mbean", ChildOccurances.ZERO_TO_INFINITY));
children.put("server", list);
- list = new ArrayList();
+ list = new ArrayList<ChildOccurances>();
list.add(new ChildOccurances("loader-repository-config", ChildOccurances.ZERO_TO_INFINITY));
children.put("loader-repository", list);
- children.put("loader-repository-config", new ArrayList());
- children.put("local-directory", new ArrayList());
- children.put("classpath", new ArrayList());
+ children.put("loader-repository-config", new ArrayList<ChildOccurances>());
+ children.put("local-directory", new ArrayList<ChildOccurances>());
+ children.put("classpath", new ArrayList<ChildOccurances>());
- list = new ArrayList();
+ list = new ArrayList<ChildOccurances>();
list.add(new ChildOccurances("constructor", ChildOccurances.ZERO_OR_ONE));
list.add(new ChildOccurances("xmbean", ChildOccurances.ZERO_OR_ONE));
list.add(new ChildOccurances("attribute", ChildOccurances.ZERO_TO_INFINITY));
@@ -176,25 +181,25 @@
list.add(new ChildOccurances("depends-list", ChildOccurances.ZERO_TO_INFINITY));
children.put("mbean", list);
- children.put("xmbean", new ArrayList());
+ children.put("xmbean", new ArrayList<ChildOccurances>());
- list = new ArrayList();
+ list = new ArrayList<ChildOccurances>();
list.add(new ChildOccurances("arg", ChildOccurances.ZERO_TO_INFINITY));
children.put("constructor", list);
- children.put("arg", new ArrayList());
- children.put("attribute", new ArrayList());
- children.put("property", new ArrayList());
+ children.put("arg", new ArrayList<ChildOccurances>());
+ children.put("attribute", new ArrayList<ChildOccurances>());
+ children.put("property", new ArrayList<ChildOccurances>());
- list = new ArrayList();
+ list = new ArrayList<ChildOccurances>();
list.add(new ChildOccurances("mbean", ChildOccurances.ZERO_TO_INFINITY));
children.put("depends", list);
- list = new ArrayList();
+ list = new ArrayList<ChildOccurances>();
list.add(new ChildOccurances("depends-list-element", ChildOccurances.ONE_TO_INFINITY));
children.put("depends-list", list);
- list = new ArrayList();
+ list = new ArrayList<ChildOccurances>();
list.add(new ChildOccurances("mbean", ChildOccurances.ZERO_TO_INFINITY));
children.put("depends-list-element", list);
@@ -355,7 +360,7 @@
String thisNode = contentAssistRequest.getNode().getNodeName();
if( thisNode.equals("#text")) thisNode = "";
- ArrayList possibleNodes = (ArrayList)children.get(parentElement);
+ ArrayList possibleNodes = children.get(parentElement);
ChildOccurances occ;
for( int i = 0; i < possibleNodes.size(); i++ ) {
occ = (ChildOccurances)possibleNodes.get(i);
@@ -370,13 +375,13 @@
super.addTagInsertionProposals(contentAssistRequest, childPosition);
List superProps = contentAssistRequest.getProposals();
ICompletionProposal[] proposals = (ICompletionProposal[]) superProps.toArray(new ICompletionProposal[superProps.size()]);
- ArrayList alreadyAddedStrings = new ArrayList();
+ ArrayList<String> alreadyAddedStrings = new ArrayList<String>();
for( int i = 0; i < proposals.length; i++ ) {
alreadyAddedStrings.add(proposals[i].getDisplayString());
}
String parentElement = contentAssistRequest.getParent().getNodeName();
- ArrayList possibleNodes = (ArrayList)children.get(parentElement);
+ ArrayList possibleNodes = children.get(parentElement);
if( possibleNodes == null ) return;
@@ -423,7 +428,7 @@
if( attributes.containsKey(occ.name) ) {
- List l = (List)attributes.get(occ.name);
+ List l = attributes.get(occ.name);
Iterator i = l.iterator();
cursorLoc = -1;
String attributes = "";
@@ -462,7 +467,7 @@
super.addAttributeNameProposals(contentAssistRequest);
List superProps = contentAssistRequest.getProposals();
ICompletionProposal[] proposals = (ICompletionProposal[]) superProps.toArray(new ICompletionProposal[superProps.size()]);
- ArrayList alreadyAddedStrings = new ArrayList();
+ ArrayList<String> alreadyAddedStrings = new ArrayList<String>();
for( int i = 0; i < proposals.length; i++ ) {
alreadyAddedStrings.add(proposals[i].getDisplayString());
}
@@ -470,7 +475,7 @@
Image attImage = XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_ATTRIBUTE);
- ArrayList activeAttributes = new ArrayList();
+ ArrayList<String> activeAttributes = new ArrayList<String>();
NamedNodeMap nnl = contentAssistRequest.getNode().getAttributes();
for( int i = 0; i < nnl.getLength(); i++ ) {
activeAttributes.add(nnl.item(i).getNodeName());
@@ -479,7 +484,7 @@
String elementName = contentAssistRequest.getNode().getNodeName();
String match = contentAssistRequest.getMatchString();
- List list = (List)attributes.get(elementName);
+ List list = attributes.get(elementName);
Iterator i = list.iterator();
while(i.hasNext()) {
DTDAttributes att = (DTDAttributes)i.next();
@@ -545,7 +550,7 @@
}
}
} catch( JavaModelException jme ) {
-
+ // do nothing
}
return false;
}
@@ -645,7 +650,7 @@
getHyperlinkRegion(attr)) };
}
} catch( Exception ce ) {
- ce.printStackTrace();
+ // do nothing
}
}
return null;
@@ -678,18 +683,15 @@
}
} catch (JavaModelException e) {
// ignore...TODO?
- e.printStackTrace();
} catch (PartInitException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
}
}
}
protected class LocalSearchRequestor extends SearchRequestor {
- private ArrayList list;
+ private ArrayList<Object> list;
public LocalSearchRequestor() {
- list = new ArrayList();
+ list = new ArrayList<Object>();
}
public void acceptSearchMatch(SearchMatch match) throws CoreException {
list.add(match.getElement());
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors/ServiceXMLOutlineConfiguration.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors/ServiceXMLOutlineConfiguration.java 2007-10-18 05:11:04 UTC (rev 4315)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors/ServiceXMLOutlineConfiguration.java 2007-10-18 05:19:22 UTC (rev 4316)
@@ -49,6 +49,11 @@
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class ServiceXMLOutlineConfiguration extends
XMLContentOutlineConfiguration {
@@ -99,7 +104,6 @@
try {
return delegate.getText(element);
} catch( Exception e ) {
- e.printStackTrace();
return null;
}
}
@@ -191,7 +195,6 @@
try {
list.add(new OutlineMenuProvider(cf[i]));
} catch( CoreException ce ) {
- ce.printStackTrace();
}
}
menuProviders = (OutlineMenuProvider[]) list.toArray(new OutlineMenuProvider[list.size()]);
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors/ServicexmlModelHandler.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors/ServicexmlModelHandler.java 2007-10-18 05:11:04 UTC (rev 4315)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/editors/ServicexmlModelHandler.java 2007-10-18 05:19:22 UTC (rev 4316)
@@ -29,7 +29,11 @@
import org.eclipse.wst.xml.core.internal.encoding.XMLDocumentCharsetDetector;
import org.eclipse.wst.xml.core.internal.encoding.XMLDocumentLoader;
import org.eclipse.wst.xml.core.internal.modelhandler.XMLModelLoader;
-
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class ServicexmlModelHandler extends AbstractModelHandler implements IModelHandler{
final static String CONTENTTYPE_ID = "org.jboss.ide.eclipse.as.ui.mbeans.servicexml"; //$NON-NLS-1$
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/wizards/NewMBeanWizard.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/wizards/NewMBeanWizard.java 2007-10-18 05:11:04 UTC (rev 4315)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/mbeans/wizards/NewMBeanWizard.java 2007-10-18 05:19:22 UTC (rev 4316)
@@ -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.mbeans.wizards;
import java.io.ByteArrayInputStream;
@@ -66,6 +87,11 @@
import org.eclipse.wst.xml.ui.internal.wizards.NewModelWizard;
import org.jboss.ide.eclipse.as.ui.mbeans.Messages;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class NewMBeanWizard extends NewModelWizard implements INewWizard {
private IStructuredSelection sel;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/util/PackageTypeSearcher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/util/PackageTypeSearcher.java 2007-10-18 05:11:04 UTC (rev 4315)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/util/PackageTypeSearcher.java 2007-10-18 05:19:22 UTC (rev 4316)
@@ -44,6 +44,11 @@
import org.eclipse.jface.text.contentassist.CompletionProposal;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class PackageTypeSearcher {
private String packageName;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/util/ServiceXMLEditorUtil.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/util/ServiceXMLEditorUtil.java 2007-10-18 05:11:04 UTC (rev 4315)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui.mbeans/src/org/jboss/ide/eclipse/as/ui/util/ServiceXMLEditorUtil.java 2007-10-18 05:19:22 UTC (rev 4316)
@@ -29,6 +29,11 @@
import org.eclipse.jdt.core.JavaModelException;
import org.jboss.ide.eclipse.as.ui.util.PackageTypeSearcher.ResultFilter;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class ServiceXMLEditorUtil {
public static IType findType(String codeClass ) {
final String codeClass2 = codeClass;
17 years, 2 months
JBoss Tools SVN: r4315 - in trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core: jee and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-10-18 01:11:04 -0400 (Thu, 18 Oct 2007)
New Revision: 4315
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB30SupportVerifier.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB3ClasspathContainer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB3ClasspathContainerInitializer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/AbstractClasspathContainer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/AbstractClasspathContainerInitializer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/J2EE13ClasspathContainerInitializer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/J2EE14ClasspathContainerInitializer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/J2EE50ClasspathContainerInitializer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ClientAllRuntimeClasspathProvider.java
Log:
JBIDE-1048 (Exception cleanup)
Also added headers and author tags
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB30SupportVerifier.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB30SupportVerifier.java 2007-10-18 05:10:34 UTC (rev 4314)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB30SupportVerifier.java 2007-10-18 05:11:04 UTC (rev 4315)
@@ -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.classpath.core.ejb3;
import org.eclipse.core.runtime.IPath;
@@ -7,6 +28,11 @@
import org.jboss.ide.eclipse.as.classpath.core.runtime.WebtoolsProjectJBossClasspathContainerInitializer.WebtoolsProjectJBossClasspathContainer;
import org.jboss.ide.eclipse.as.core.server.internal.AbstractJBossServerRuntime;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class EJB30SupportVerifier {
public static boolean verify(IRuntime rt) {
AbstractJBossServerRuntime ajbsr = (AbstractJBossServerRuntime)rt.loadAdapter(AbstractJBossServerRuntime.class, null);
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB3ClasspathContainer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB3ClasspathContainer.java 2007-10-18 05:10:34 UTC (rev 4314)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB3ClasspathContainer.java 2007-10-18 05:11:04 UTC (rev 4315)
@@ -38,6 +38,7 @@
/**
* @author Marshall
+ * @author Rob Stryker
*/
public class EJB3ClasspathContainer implements IClasspathContainer {
public static final String CONTAINER_ID = "org.jboss.ide.eclipse.as.classpath.core.ejb3.classpathContainer";
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB3ClasspathContainerInitializer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB3ClasspathContainerInitializer.java 2007-10-18 05:10:34 UTC (rev 4314)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB3ClasspathContainerInitializer.java 2007-10-18 05:11:04 UTC (rev 4315)
@@ -30,9 +30,7 @@
/**
* @author Marshall
- *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
+ * @author Rob Stryker
*/
public class EJB3ClasspathContainerInitializer extends ClasspathContainerInitializer {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/AbstractClasspathContainer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/AbstractClasspathContainer.java 2007-10-18 05:10:34 UTC (rev 4314)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/AbstractClasspathContainer.java 2007-10-18 05:11:04 UTC (rev 4315)
@@ -29,12 +29,19 @@
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
import org.eclipse.jdt.core.IClasspathContainer;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.JavaCore;
import org.jboss.ide.eclipse.as.classpath.core.ClasspathCorePlugin;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public abstract class AbstractClasspathContainer implements IClasspathContainer {
public static final String LIB_FOLDER = "lib";
@@ -128,6 +135,8 @@
return installURL.getFile().toString();
} catch (IOException ioe) {
// LOG THE ERROR (one day)
+ IStatus status = new Status(IStatus.ERROR, ClasspathCorePlugin.PLUGIN_ID, "Error loading classpath container", ioe);
+ ClasspathCorePlugin.getDefault().getLog().log(status);
}
return null;
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/AbstractClasspathContainerInitializer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/AbstractClasspathContainerInitializer.java 2007-10-18 05:10:34 UTC (rev 4314)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/AbstractClasspathContainerInitializer.java 2007-10-18 05:11:04 UTC (rev 4315)
@@ -28,6 +28,11 @@
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public abstract class AbstractClasspathContainerInitializer extends ClasspathContainerInitializer {
public AbstractClasspathContainerInitializer() {
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/J2EE13ClasspathContainerInitializer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/J2EE13ClasspathContainerInitializer.java 2007-10-18 05:10:34 UTC (rev 4314)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/J2EE13ClasspathContainerInitializer.java 2007-10-18 05:11:04 UTC (rev 4315)
@@ -24,6 +24,11 @@
import org.eclipse.core.runtime.IPath;
import org.eclipse.jdt.core.IJavaProject;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class J2EE13ClasspathContainerInitializer extends
AbstractClasspathContainerInitializer {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/J2EE14ClasspathContainerInitializer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/J2EE14ClasspathContainerInitializer.java 2007-10-18 05:10:34 UTC (rev 4314)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/J2EE14ClasspathContainerInitializer.java 2007-10-18 05:11:04 UTC (rev 4315)
@@ -3,6 +3,11 @@
import org.eclipse.core.runtime.IPath;
import org.eclipse.jdt.core.IJavaProject;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class J2EE14ClasspathContainerInitializer extends
AbstractClasspathContainerInitializer {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/J2EE50ClasspathContainerInitializer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/J2EE50ClasspathContainerInitializer.java 2007-10-18 05:10:34 UTC (rev 4314)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/J2EE50ClasspathContainerInitializer.java 2007-10-18 05:11:04 UTC (rev 4315)
@@ -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.classpath.core.jee;
import org.eclipse.core.runtime.IPath;
@@ -3,4 +24,9 @@
import org.eclipse.jdt.core.IJavaProject;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class J2EE50ClasspathContainerInitializer extends
AbstractClasspathContainerInitializer {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ClientAllRuntimeClasspathProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ClientAllRuntimeClasspathProvider.java 2007-10-18 05:10:34 UTC (rev 4314)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ClientAllRuntimeClasspathProvider.java 2007-10-18 05:11:04 UTC (rev 4315)
@@ -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.classpath.core.runtime;
import java.util.ArrayList;
17 years, 2 months
JBoss Tools SVN: r4314 - in trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui: ejb3 and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-10-18 01:10:34 -0400 (Thu, 18 Oct 2007)
New Revision: 4314
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/ClasspathUIPlugin.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/Messages.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/ejb3/JBossEJB3LibrariesPage.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/ejb3/JBossSelectionPage.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/jee/ClasspathContainerPage.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/jee/J2EE13ClasspathContainerPage.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/jee/J2EE14ClasspathContainerPage.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/jee/JEE50ClasspathContainerPage.java
Log:
JBIDE-1048 (Exception cleanup)
Also added headers and author tags
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/ClasspathUIPlugin.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/ClasspathUIPlugin.java 2007-10-18 04:55:13 UTC (rev 4313)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/ClasspathUIPlugin.java 2007-10-18 05:10:34 UTC (rev 4314)
@@ -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.classpath.ui;
import org.eclipse.jface.dialogs.MessageDialog;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/Messages.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/Messages.java 2007-10-18 04:55:13 UTC (rev 4313)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/Messages.java 2007-10-18 05:10:34 UTC (rev 4314)
@@ -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.classpath.ui;
import org.eclipse.osgi.util.NLS;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/ejb3/JBossEJB3LibrariesPage.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/ejb3/JBossEJB3LibrariesPage.java 2007-10-18 04:55:13 UTC (rev 4313)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/ejb3/JBossEJB3LibrariesPage.java 2007-10-18 05:10:34 UTC (rev 4314)
@@ -31,6 +31,11 @@
import org.jboss.ide.eclipse.as.classpath.ui.Messages;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class JBossEJB3LibrariesPage extends JBossSelectionPage implements IClasspathContainerPage
{
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/ejb3/JBossSelectionPage.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/ejb3/JBossSelectionPage.java 2007-10-18 04:55:13 UTC (rev 4313)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/ejb3/JBossSelectionPage.java 2007-10-18 05:10:34 UTC (rev 4314)
@@ -44,6 +44,11 @@
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class JBossSelectionPage extends WizardPage {
protected TableViewer servers;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/jee/ClasspathContainerPage.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/jee/ClasspathContainerPage.java 2007-10-18 04:55:13 UTC (rev 4313)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/jee/ClasspathContainerPage.java 2007-10-18 05:10:34 UTC (rev 4314)
@@ -34,6 +34,11 @@
import org.eclipse.swt.widgets.Label;
import org.jboss.ide.eclipse.as.classpath.ui.Messages;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public abstract class ClasspathContainerPage extends WizardPage implements
IClasspathContainerPage {
private final static String PAGE_NAME = ClasspathContainerPage.class
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/jee/J2EE13ClasspathContainerPage.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/jee/J2EE13ClasspathContainerPage.java 2007-10-18 04:55:13 UTC (rev 4313)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/jee/J2EE13ClasspathContainerPage.java 2007-10-18 05:10:34 UTC (rev 4314)
@@ -23,6 +23,11 @@
import org.jboss.ide.eclipse.as.classpath.core.jee.J2EE13ClasspathContainerInitializer.J2EE13ClasspathContainer;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class J2EE13ClasspathContainerPage extends ClasspathContainerPage {
public J2EE13ClasspathContainerPage() {
super(J2EE13ClasspathContainer.CLASSPATH_CONTAINER, J2EE13ClasspathContainer.DESCRIPTION);
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/jee/J2EE14ClasspathContainerPage.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/jee/J2EE14ClasspathContainerPage.java 2007-10-18 04:55:13 UTC (rev 4313)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/jee/J2EE14ClasspathContainerPage.java 2007-10-18 05:10:34 UTC (rev 4314)
@@ -23,6 +23,11 @@
import org.jboss.ide.eclipse.as.classpath.core.jee.J2EE14ClasspathContainerInitializer.J2EE14ClasspathContainer;
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class J2EE14ClasspathContainerPage extends ClasspathContainerPage {
public J2EE14ClasspathContainerPage() {
super(J2EE14ClasspathContainer.CLASSPATH_CONTAINER, J2EE14ClasspathContainer.DESCRIPTION);
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/jee/JEE50ClasspathContainerPage.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/jee/JEE50ClasspathContainerPage.java 2007-10-18 04:55:13 UTC (rev 4313)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/jee/JEE50ClasspathContainerPage.java 2007-10-18 05:10:34 UTC (rev 4314)
@@ -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.classpath.ui.jee;
import org.jboss.ide.eclipse.as.classpath.core.jee.J2EE50ClasspathContainerInitializer.J2EE50ClasspathContainer;
@@ -2,2 +23,7 @@
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
public class JEE50ClasspathContainerPage extends ClasspathContainerPage {
17 years, 2 months
JBoss Tools SVN: r4313 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-10-18 00:55:13 -0400 (Thu, 18 Oct 2007)
New Revision: 4313
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/SimpleTreeItem.java
Log:
genericized
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/SimpleTreeItem.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/SimpleTreeItem.java 2007-10-18 04:54:36 UTC (rev 4312)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/SimpleTreeItem.java 2007-10-18 04:55:13 UTC (rev 4313)
@@ -26,15 +26,15 @@
public class SimpleTreeItem {
- protected ArrayList children;
- protected HashMap properties;
+ protected ArrayList<SimpleTreeItem> children;
+ protected HashMap<Object, Object> properties;
protected SimpleTreeItem parent;
protected Object data;
public SimpleTreeItem(SimpleTreeItem parent, Object data) {
- children = new ArrayList();
- properties = new HashMap();
+ children = new ArrayList<SimpleTreeItem>();
+ properties = new HashMap<Object, Object>();
this.data = data;
this.parent = parent;
if( parent != null ) parent.addChild(this);
@@ -84,7 +84,7 @@
return properties.get(key);
}
- public HashMap getProperties() {
+ public HashMap<Object, Object> getProperties() {
return properties;
}
17 years, 2 months
JBoss Tools SVN: r4312 - in trunk/as/plugins/org.jboss.ide.eclipse.as.ui: jbossui/org/jboss/ide/eclipse/as/ui and 16 other directories.
by jbosstools-commits@lists.jboss.org
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"
17 years, 2 months
JBoss Tools SVN: r4311 - in trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core: extensions/archives and 7 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-10-17 23:57:50 -0400 (Wed, 17 Oct 2007)
New Revision: 4311
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/ExtensionManager.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/JBossServerCorePlugin.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/archives/EarArchiveType.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/archives/EjbArchiveType.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/AntFileFilter.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XMLDocumentRepository.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathCategory.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathFileResult.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathModel.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathQuery.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/jmx/JMXClassLoaderRepository.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/jmx/JMXModel.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/jmx/JMXUtil.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/JMXPoller.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/ProcessTerminatedPoller.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/TimeoutPoller.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/modules/ArchivesBuildListener.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/modules/ArchivesModelModuleContributor.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/modules/PackagedArtifactAdapter.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/modules/SingleDeployableFactory.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBossServerPublisher.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBossServerRuntime.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IServerPollingAttributes.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IServerStartupParameters.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IServerStatePoller.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/UnitedServerListener.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/UnitedServerListenerManager.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerRuntime.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossLaunchAdapter.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServerBehavior.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ServerStatePollerType.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/DeployableLaunchConfiguration.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/StopLaunchConfiguration.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/TwiddleLaunchConfiguration.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/TwiddleLauncher.java
Log:
Refactored for exceptions (JBIDE-1048)
added headers to files that didn't have
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/ExtensionManager.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/ExtensionManager.java 2007-10-17 22:36:41 UTC (rev 4310)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/ExtensionManager.java 2007-10-18 03:57:50 UTC (rev 4311)
@@ -31,18 +31,25 @@
import org.jboss.ide.eclipse.as.core.server.internal.ServerStatePollerType;
/**
- *
+ * Manages the extensions for this plugin
* @author rob.stryker(a)jboss.com
*/
public class ExtensionManager {
+
+ /** Singleton instance of the manager */
private static ExtensionManager instance;
+
+ /** Singleton getter */
public static ExtensionManager getDefault() {
if( instance == null )
instance = new ExtensionManager();
return instance;
}
+ /** The map of pollerID -> PollerObject */
private HashMap<String, ServerStatePollerType> pollers;
+
+ /** The method used to load / instantiate the pollers */
public void loadPollers() {
pollers = new HashMap<String, ServerStatePollerType>();
IExtensionRegistry registry = Platform.getExtensionRegistry();
@@ -51,11 +58,19 @@
pollers.put(cf[i].getAttribute("id"), new ServerStatePollerType(cf[i]));
}
}
+
+ /**
+ * Get a poller with the specified ID
+ * @param id the id
+ * @return the poller
+ */
public ServerStatePollerType getPollerType(String id) {
if( pollers == null )
loadPollers();
return pollers.get(id);
}
+
+ /** Get only the pollers that can poll for startups */
public ServerStatePollerType[] getStartupPollers() {
if( pollers == null )
loadPollers();
@@ -69,6 +84,8 @@
}
return list.toArray(new ServerStatePollerType[list.size()]);
}
+
+ /** Get only the pollers that can poll for shutdowns */
public ServerStatePollerType[] getShutdownPollers() {
if( pollers == null )
loadPollers();
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/JBossServerCorePlugin.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/JBossServerCorePlugin.java 2007-10-17 22:36:41 UTC (rev 4310)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/JBossServerCorePlugin.java 2007-10-18 03:57:50 UTC (rev 4311)
@@ -71,6 +71,8 @@
*/
public void start(BundleContext context) throws Exception {
super.start(context);
+
+ // Start the array of models that need to be started
ArchivesBuildListener.getInstance();
XPathModel.getDefault();
UnitedServerListenerManager.getDefault();
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/archives/EarArchiveType.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/archives/EarArchiveType.java 2007-10-17 22:36:41 UTC (rev 4310)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/archives/EarArchiveType.java 2007-10-18 03:57:50 UTC (rev 4311)
@@ -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.core.extensions.archives;
import org.eclipse.core.resources.IContainer;
@@ -13,6 +34,9 @@
import org.jboss.ide.eclipse.archives.core.model.IArchiveType;
import org.jboss.ide.eclipse.as.core.modules.ModulePackageTypeConverter;
+/**
+ * @author rob.stryker(a)redhat.com
+ */
public class EarArchiveType extends J2EEArchiveType {
public final static String ID = "org.jboss.ide.eclipse.as.core.packages.earPackageType";
public String getAssociatedModuleType() {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/archives/EjbArchiveType.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/archives/EjbArchiveType.java 2007-10-17 22:36:41 UTC (rev 4310)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/archives/EjbArchiveType.java 2007-10-18 03:57:50 UTC (rev 4311)
@@ -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.core.extensions.archives;
import org.eclipse.core.resources.IProject;
@@ -9,6 +30,10 @@
import org.eclipse.wst.server.core.IModule;
import org.jboss.ide.eclipse.archives.core.model.IArchive;
+/**
+ *
+ * @author rob.stryker(a)redhat.com
+ */
public class EjbArchiveType extends J2EEArchiveType {
public final static String ID = "org.jboss.ide.eclipse.as.core.packages.ejbPackageType";
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/AntFileFilter.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/AntFileFilter.java 2007-10-17 22:36:41 UTC (rev 4310)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/AntFileFilter.java 2007-10-18 03:57:50 UTC (rev 4311)
@@ -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.core.extensions.descriptors;
import org.apache.tools.ant.DirectoryScanner;
@@ -2,2 +23,7 @@
+/**
+ * A class to scann files and folders for files that match a pattern
+ * Delegates to a DirectoryScanner provided by the ant plugins
+ * @author rob.stryker(a)redhat.com
+ */
public class AntFileFilter {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XMLDocumentRepository.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XMLDocumentRepository.java 2007-10-17 22:36:41 UTC (rev 4310)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XMLDocumentRepository.java 2007-10-18 03:57:50 UTC (rev 4311)
@@ -26,41 +26,71 @@
/**
* Parses and potentially stores descriptor files.
*
- * @author rstryker
+ * @author rstryker(a)redhat.com
*
*/
public class XMLDocumentRepository {
+ /** singleton instance */
private static XMLDocumentRepository instance = null;
+ /** singleton getter */
public static XMLDocumentRepository getDefault() {
if (instance == null)
instance = new XMLDocumentRepository();
return instance;
}
+ /** maps a path to its actual document object */
private HashMap pathToDocument;
+
+ /** maps a path to the last time that path's file was changed */
private HashMap pathToTimestamp;
+
+ /** a link to a parent repository which may already contain the document
+ * and may prevent a costly reparse. */
private XMLDocumentRepository parent;
+ /** package-private constructor */
XMLDocumentRepository() {
pathToDocument = new HashMap();
pathToTimestamp = new HashMap();
}
+ /** public constructor with a parent repository
+ * @param parent The parent repository
+ */
public XMLDocumentRepository(XMLDocumentRepository parent) {
pathToDocument = new HashMap();
pathToTimestamp = new HashMap();
this.parent = parent;
}
+ /**
+ * get the document for a full path
+ * @param fullPath
+ * @return the document
+ */
public Document getDocument(String fullPath) {
return getDocument(fullPath, true);
}
+ /**
+ * get the document for a full path.
+ * @param fullPath The path of the file
+ * @param load Whether to load if the document has not already been loaded
+ * @return the document
+ */
public Document getDocument(String fullPath, boolean load) {
return getDocument(fullPath, load, true);
}
+ /**
+ * get the document for a full path
+ * @param fullPath the path of the file
+ * @param load whether to load the document if not already loaded
+ * @param save whether to save this document in the repository or just return it
+ * @return the document
+ */
public Document getDocument(String fullPath, boolean load, boolean save) {
Document d = (Document) pathToDocument.get(fullPath);
if (d == null && load) {
@@ -74,6 +104,11 @@
return d;
}
+ /**
+ * refresh the document for a given file
+ * @param fullPath the path to the file
+ * @return whether the document was re-read
+ */
public boolean refresh(String fullPath) {
if (new File(fullPath).lastModified() != ((Long) pathToTimestamp
.get(fullPath)).longValue()) {
@@ -85,6 +120,10 @@
return false;
}
+ /*
+ * Load the document for some path and return it.
+ * Upon exception, log the exception and return null
+ */
private Document loadDocument(String fullpath) {
Exception ex = null;
try {
@@ -121,6 +160,10 @@
return null;
}
+ /*
+ * Save some document "doc" to some full file path
+ * Upon error, log it
+ */
public static void saveDocument(Document doc, String fullPath) {
Exception ex = null;
try {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathCategory.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathCategory.java 2007-10-17 22:36:41 UTC (rev 4310)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathCategory.java 2007-10-18 03:57:50 UTC (rev 4311)
@@ -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.core.extensions.descriptors;
import java.util.HashMap;
@@ -5,10 +26,16 @@
import org.eclipse.wst.server.core.IServer;
import org.jboss.ide.eclipse.as.core.server.internal.ServerAttributeHelper;
+/**
+ * A class representing an XPath Category, which
+ * is owned by a server and has XPath queries in it
+ * @author rob.stryker(a)redhat.com
+ *
+ */
public class XPathCategory {
protected String name; // cannot include delimiter from the model, comma
protected IServer server;
- protected HashMap children;
+ protected HashMap<String, XPathQuery> children;
public XPathCategory(String name, IServer server) {
this.name = name;
@@ -21,20 +48,23 @@
return children != null;
}
+ /*
+ * Lazily load the queries upon request
+ */
public XPathQuery[] getQueries() {
if( children == null ) {
- children = new HashMap();
+ children = new HashMap<String, XPathQuery>();
XPathQuery[] queries = XPathModel.getDefault().loadQueries(this, server);
for( int i = 0; i < queries.length; i++ ) {
children.put(queries[i].getName(), queries[i]);
}
}
- return (XPathQuery[]) children.values().toArray(new XPathQuery[children.size()]);
+ return children.values().toArray(new XPathQuery[children.size()]);
}
public XPathQuery getQuery(String name) {
getQueries();
- return (XPathQuery)children.get(name);
+ return children.get(name);
}
public void addQuery(XPathQuery query) {
getQueries();
@@ -47,6 +77,9 @@
children.remove(query.getName());
}
+ /*
+ * Save these queries to its server object
+ */
public void save() {
ServerAttributeHelper helper = ServerAttributeHelper.createHelper(server);
XPathModel.getDefault().saveCategory(this, server, helper);
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathFileResult.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathFileResult.java 2007-10-17 22:36:41 UTC (rev 4310)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathFileResult.java 2007-10-18 03:57:50 UTC (rev 4311)
@@ -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.core.extensions.descriptors;
import java.util.ArrayList;
@@ -10,14 +31,19 @@
import org.dom4j.tree.DefaultAttribute;
import org.dom4j.tree.DefaultElement;
-
+/**
+ * A class representing an xpath file result.
+ * It's children may be individual element results
+ * @author rob.stryker(a)redhat.com
+ *
+ */
public class XPathFileResult {
protected XPathQuery query;
- protected List nodeList;
+ protected List<Node> nodeList;
protected String fileLoc;
protected XPathResultNode[] children;
- public XPathFileResult(XPathQuery query, String fileLoc, List nodeList) {
+ public XPathFileResult(XPathQuery query, String fileLoc, List<Node> nodeList) {
this.query = query;
this.fileLoc = fileLoc;
this.nodeList = nodeList;
@@ -31,20 +57,21 @@
return query;
}
+ /* Lazily load the children */
public XPathResultNode[] getChildren() {
if( children == null ) {
- ArrayList childList = new ArrayList();
- Iterator i = nodeList.iterator();
+ ArrayList<XPathResultNode> childList = new ArrayList<XPathResultNode>();
+ Iterator<Node> i = nodeList.iterator();
int z = 0;
while(i.hasNext()) {
- Node o = (Node)i.next();
- childList.add(new XPathResultNode(o, query.getAttribute(), z++));
+ childList.add(new XPathResultNode(i.next(), query.getAttribute(), z++));
}
- children = (XPathResultNode[]) childList.toArray(new XPathResultNode[childList.size()]);
+ children = childList.toArray(new XPathResultNode[childList.size()]);
}
return children;
}
+ /* A class representing an actual result node / element in the document */
public class XPathResultNode {
protected Node node;
protected String attribute;
@@ -121,27 +148,27 @@
public String[] getElementChildrenNames() {
DefaultElement element = ((DefaultElement)node);
- List l = element.elements();
+ List<DefaultElement> l = element.elements();
DefaultElement child;
- ArrayList names = new ArrayList();
- for( Iterator i = l.iterator();i.hasNext();) {
- child = (DefaultElement)i.next();
+ ArrayList<String> names = new ArrayList<String>();
+ for( Iterator<DefaultElement> i = l.iterator();i.hasNext();) {
+ child = i.next();
if( !names.contains(child.getName()))
names.add(child.getName());
}
- return (String[]) names.toArray(new String[names.size()]);
+ return names.toArray(new String[names.size()]);
}
public String[] getElementAttributeNames() {
DefaultElement element = ((DefaultElement)node);
List l = element.attributes();
DefaultAttribute child;
- ArrayList names = new ArrayList();
+ ArrayList<String> names = new ArrayList<String>();
for( Iterator i = l.iterator();i.hasNext();) {
child = (DefaultAttribute)i.next();
if( !names.contains(child.getName()))
names.add(child.getName());
}
- return (String[]) names.toArray(new String[names.size()]);
+ return names.toArray(new String[names.size()]);
}
public String[] getElementAttributeValues(String attName) {
DefaultElement element = ((DefaultElement)node);
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathModel.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathModel.java 2007-10-17 22:36:41 UTC (rev 4310)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathModel.java 2007-10-18 03:57:50 UTC (rev 4311)
@@ -1,7 +1,27 @@
+/**
+ * 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.core.extensions.descriptors;
import java.io.IOException;
-import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
@@ -22,8 +42,13 @@
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
import org.jboss.ide.eclipse.as.core.server.internal.AbstractJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.server.internal.ServerAttributeHelper;
-import org.jboss.ide.eclipse.as.core.util.ServerConverter;
+/**
+ * The class representing the model for all xpath storage and searching
+ * Also API entrance point.
+ * @author rob.stryker(a)redhat.com
+ *
+ */
public class XPathModel {
public static final String EMPTY_STRING = "org.jboss.ide.eclipse.as.core.model.descriptor.EmptyString";
public static final String PORTS_CATEGORY_NAME = "Ports";
@@ -35,6 +60,7 @@
private static final String QUERY =
"org.jboss.ide.eclipse.as.core.model.descriptor.Query";
+ /* Singleton */
private static XPathModel instance;
public static XPathModel getDefault() {
if( instance == null )
@@ -43,6 +69,10 @@
}
protected HashMap<String, ArrayList<XPathCategory>> serverToCategories;
+
+ /* Constructor. Adds lifecycle listener to know when there's a new server and
+ * properly add the default XPaths to that server object.
+ */
public XPathModel() {
serverToCategories = new HashMap<String, ArrayList<XPathCategory>>();
ServerCore.addServerLifecycleListener(new IServerLifecycleListener() {
@@ -68,7 +98,7 @@
return null;
}
- public ArrayList<XPathCategory> getCategoryCollection(IServer server) {
+ protected ArrayList<XPathCategory> getCategoryCollection(IServer server) {
if( serverToCategories.get(server.getId()) == null ) {
ArrayList<XPathCategory> val = new ArrayList<XPathCategory>(Arrays.asList(load(server)));
serverToCategories.put(server.getId(), val);
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathQuery.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathQuery.java 2007-10-17 22:36:41 UTC (rev 4310)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathQuery.java 2007-10-18 03:57:50 UTC (rev 4311)
@@ -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.core.extensions.descriptors;
import java.io.Serializable;
@@ -4,6 +25,7 @@
import java.util.ArrayList;
import java.util.List;
+import org.dom4j.Node;
import org.eclipse.core.runtime.Path;
import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathFileResult.XPathResultNode;
@@ -80,15 +102,15 @@
protected void loadResults() {
String[] files = getFilter().getIncludedFiles();
String fileLoc;
- ArrayList resultList = new ArrayList();
- List nodeList;
+ ArrayList<XPathFileResult> resultList = new ArrayList<XPathFileResult>();
+ List<Node> nodeList;
for( int i = 0; i < files.length; i++ ) {
fileLoc = new Path(baseDir).append(files[i]).toOSString();
nodeList = getRepository().getDocument(fileLoc).selectNodes(xpathPattern);
if( nodeList.size() > 0 )
resultList.add(new XPathFileResult(this, fileLoc, nodeList));
}
- results = (XPathFileResult[]) resultList.toArray(new XPathFileResult[resultList.size()]);
+ results = resultList.toArray(new XPathFileResult[resultList.size()]);
}
public String getFirstResult() {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/jmx/JMXClassLoaderRepository.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/jmx/JMXClassLoaderRepository.java 2007-10-17 22:36:41 UTC (rev 4310)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/jmx/JMXClassLoaderRepository.java 2007-10-18 03:57:50 UTC (rev 4311)
@@ -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.core.extensions.jmx;
import java.net.MalformedURLException;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/jmx/JMXModel.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/jmx/JMXModel.java 2007-10-17 22:36:41 UTC (rev 4310)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/jmx/JMXModel.java 2007-10-18 03:57:50 UTC (rev 4311)
@@ -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.core.extensions.jmx;
import java.io.IOException;
@@ -26,7 +47,13 @@
import org.eclipse.wst.server.core.IServer;
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
+/**
+ * Model and objects related to JMX
+ * @author rob.stryker(a)redhat.com
+ *
+ */
public class JMXModel {
+ /* Singleton */
protected static JMXModel instance;
public static JMXModel getDefault() {
if( instance == null )
@@ -36,11 +63,16 @@
protected HashMap<String, JMXModelRoot> root;
-
+ /* constructor */
protected JMXModel() {
root = new HashMap<String, JMXModelRoot>();
}
+ /**
+ * Get the Model Root for one particular server
+ * @param server
+ * @return that server's model
+ */
public JMXModelRoot getModel(IServer server) {
if (root.get(server.getId()) == null) {
JMXModelRoot serverRoot = new JMXModelRoot(server);
@@ -49,11 +81,17 @@
return root.get(server.getId());
}
+ /**
+ * Clear the server's model
+ * @param server
+ */
public void clearModel(IServer server) {
root.remove(server.getId());
}
-
+ /**
+ * The model for one server
+ */
public static class JMXModelRoot {
protected IServer server;
protected JMXDomain[] domains = null;
@@ -71,6 +109,9 @@
return exception;
}
+ /**
+ * Lazily load the domains
+ */
public void loadDomains() {
exception = null;
JMXRunnable run = new JMXRunnable() {
@@ -91,6 +132,9 @@
}
}
+ /**
+ * A JMX Domain
+ */
public static class JMXDomain {
protected String name;
protected IServer server;
@@ -119,6 +163,9 @@
exception = null;
}
+ /**
+ * Lazily load the beans for this domain
+ */
public void loadBeans() {
exception = null;
JMXRunnable run = new JMXRunnable() {
@@ -145,6 +192,9 @@
}
}
+ /**
+ * The JMX Bean Object
+ */
public static class JMXBean {
protected String domain;
protected String name;
@@ -197,6 +247,9 @@
return this.exception;
}
+ /**
+ * Load the child operations and attributes
+ */
public void loadInfo() {
exception = null;
JMXRunnable run = new JMXRunnable() {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/jmx/JMXUtil.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/jmx/JMXUtil.java 2007-10-17 22:36:41 UTC (rev 4310)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/jmx/JMXUtil.java 2007-10-18 03:57:50 UTC (rev 4311)
@@ -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.core.extensions.jmx;
import java.lang.reflect.Constructor;
@@ -14,7 +35,7 @@
/**
* Utility class
- * @author Rob Stryker
+ * @author Rob Stryker rob.stryker(a)redhat.com
*
*/
public class JMXUtil {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/JMXPoller.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/JMXPoller.java 2007-10-17 22:36:41 UTC (rev 4310)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/JMXPoller.java 2007-10-18 03:57:50 UTC (rev 4311)
@@ -43,6 +43,11 @@
import org.jboss.ide.eclipse.as.core.server.internal.PollThread;
import org.jboss.ide.eclipse.as.core.util.SimpleTreeItem;
+/**
+ * A poller dedicated to server startup, checks via JMX
+ * @author Rob rob.stryker(a)redhat.com
+ *
+ */
public class JMXPoller implements IServerStatePoller {
public static final String STARTED_PROPERTY = "org.jboss.ide.eclipse.as.core.extensions.polling.jmx.STARTED_PROPERTY";
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/ProcessTerminatedPoller.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/ProcessTerminatedPoller.java 2007-10-17 22:36:41 UTC (rev 4310)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/ProcessTerminatedPoller.java 2007-10-18 03:57:50 UTC (rev 4311)
@@ -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.core.extensions.polling;
import org.eclipse.core.runtime.NullProgressMonitor;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/TimeoutPoller.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/TimeoutPoller.java 2007-10-17 22:36:41 UTC (rev 4310)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/TimeoutPoller.java 2007-10-18 03:57:50 UTC (rev 4311)
@@ -31,7 +31,11 @@
import org.jboss.ide.eclipse.as.core.server.internal.PollThread;
import org.jboss.ide.eclipse.as.core.server.internal.ServerAttributeHelper;
-// Wait 15 seconds, then say it's at it's expected state
+/**
+ * Wait 15 seconds, then say it's at it's expected state
+ * @author Rob
+ *
+ */
public class TimeoutPoller implements IServerStatePoller {
private boolean expectedState;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/modules/ArchivesBuildListener.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/modules/ArchivesBuildListener.java 2007-10-17 22:36:41 UTC (rev 4310)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/modules/ArchivesBuildListener.java 2007-10-18 03:57:50 UTC (rev 4311)
@@ -39,7 +39,6 @@
import org.jboss.ide.eclipse.archives.core.model.IArchiveNodeDelta;
import org.jboss.ide.eclipse.archives.core.model.other.IArchiveBuildListener;
import org.jboss.ide.eclipse.archives.core.model.other.IArchiveModelListener;
-import org.jboss.ide.eclipse.archives.core.util.ModelUtil;
import org.jboss.ide.eclipse.as.core.modules.PackageModuleFactory.PackagedModuleDelegate;
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
import org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/modules/ArchivesModelModuleContributor.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/modules/ArchivesModelModuleContributor.java 2007-10-17 22:36:41 UTC (rev 4310)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/modules/ArchivesModelModuleContributor.java 2007-10-18 03:57:50 UTC (rev 4311)
@@ -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.core.modules;
import java.util.ArrayList;
@@ -15,6 +36,11 @@
import org.jboss.ide.eclipse.as.core.modules.PackageModuleFactory.IModuleContributor;
import org.jboss.ide.eclipse.as.core.modules.PackageModuleFactory.PackagedModuleDelegate;
+/**
+ *
+ * @author Rob Stryker rob.stryker(a)jboss.com
+ *
+ */
public class ArchivesModelModuleContributor implements IModuleContributor {
private static ArchivesModelModuleContributor instance;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/modules/PackagedArtifactAdapter.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/modules/PackagedArtifactAdapter.java 2007-10-17 22:36:41 UTC (rev 4310)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/modules/PackagedArtifactAdapter.java 2007-10-18 03:57:50 UTC (rev 4311)
@@ -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.core.modules;
import org.eclipse.core.resources.IProject;
@@ -6,7 +27,11 @@
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.IModuleArtifact;
import org.eclipse.wst.server.core.model.ModuleArtifactAdapterDelegate;
-
+/**
+ *
+ * @author Rob Stryker rob.stryker(a)redhat.com
+ *
+ */
public class PackagedArtifactAdapter extends ModuleArtifactAdapterDelegate {
public PackagedArtifactAdapter() {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/modules/SingleDeployableFactory.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/modules/SingleDeployableFactory.java 2007-10-17 22:36:41 UTC (rev 4310)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/modules/SingleDeployableFactory.java 2007-10-18 03:57:50 UTC (rev 4311)
@@ -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.core.modules;
import java.util.ArrayList;
@@ -27,6 +48,11 @@
import org.jboss.ide.eclipse.as.core.server.UnitedServerListener;
import org.jboss.ide.eclipse.as.core.server.UnitedServerListenerManager;
+/**
+ * The factory responsible for turning regular files into modules
+ * @author Rob Stryker rob.stryker(a)jboss.com
+ *
+ */
public class SingleDeployableFactory extends ModuleFactoryDelegate {
public static final String FACTORY_ID = "org.jboss.ide.eclipse.as.core.singledeployablefactory";
private static SingleDeployableFactory factDelegate;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBossServerPublisher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBossServerPublisher.java 2007-10-17 22:36:41 UTC (rev 4310)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBossServerPublisher.java 2007-10-18 03:57:50 UTC (rev 4311)
@@ -27,6 +27,11 @@
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.model.IModuleResourceDelta;
+/**
+ *
+ * @author Rob Stryker
+ *
+ */
public interface IJBossServerPublisher {
public IStatus publishModule(int kind, int deltaKind, int modulePublishState,
IModule[] module, IProgressMonitor monitor)
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBossServerRuntime.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBossServerRuntime.java 2007-10-17 22:36:41 UTC (rev 4310)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBossServerRuntime.java 2007-10-18 03:57:50 UTC (rev 4311)
@@ -23,6 +23,10 @@
import org.eclipse.jdt.launching.IVMInstall;
+/**
+ *
+ * @author Rob Stryker
+ */
public interface IJBossServerRuntime {
public static String PROPERTY_VM_ID = "PROPERTY_VM_ID";
public static String PROPERTY_VM_TYPE_ID = "PROPERTY_VM_TYPE_ID";
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IServerPollingAttributes.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IServerPollingAttributes.java 2007-10-17 22:36:41 UTC (rev 4310)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IServerPollingAttributes.java 2007-10-18 03:57:50 UTC (rev 4311)
@@ -21,6 +21,10 @@
*/
package org.jboss.ide.eclipse.as.core.server;
+/**
+ *
+ * @author Rob Stryker
+ */
public interface IServerPollingAttributes {
public static final String START_TIMEOUT = "org.jboss.ide.eclipse.as.core.server.attributes.startTimeout";
public static final String STOP_TIMEOUT = "org.jboss.ide.eclipse.as.core.server.attributes.stopTimeout";
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IServerStartupParameters.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IServerStartupParameters.java 2007-10-17 22:36:41 UTC (rev 4310)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IServerStartupParameters.java 2007-10-18 03:57:50 UTC (rev 4311)
@@ -21,6 +21,11 @@
*/
package org.jboss.ide.eclipse.as.core.server;
+/**
+ *
+ * @author Rob Stryker
+ *
+ */
public interface IServerStartupParameters {
public static final String JBOSS_SERVER_HOME_DIR = "jboss.server.home.dir";
public static final String JBOSS_SERVER_BASE_DIR = "jboss.server.base.dir";
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IServerStatePoller.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IServerStatePoller.java 2007-10-17 22:36:41 UTC (rev 4310)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IServerStatePoller.java 2007-10-18 03:57:50 UTC (rev 4311)
@@ -24,6 +24,11 @@
import org.eclipse.wst.server.core.IServer;
import org.jboss.ide.eclipse.as.core.server.internal.PollThread;
+/**
+ *
+ * @author Rob Stryker
+ *
+ */
public interface IServerStatePoller extends IServerPollingAttributes {
public static final boolean SERVER_UP = true;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/UnitedServerListener.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/UnitedServerListener.java 2007-10-17 22:36:41 UTC (rev 4310)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/UnitedServerListener.java 2007-10-18 03:57:50 UTC (rev 4311)
@@ -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.core.server;
import org.eclipse.core.runtime.IStatus;
@@ -4,6 +25,11 @@
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.ServerEvent;
+/**
+ *
+ * @author Rob Stryker
+ *
+ */
public class UnitedServerListener {
public void init(IServer server) {}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/UnitedServerListenerManager.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/UnitedServerListenerManager.java 2007-10-17 22:36:41 UTC (rev 4310)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/UnitedServerListenerManager.java 2007-10-18 03:57:50 UTC (rev 4311)
@@ -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.core.server;
import java.util.ArrayList;
@@ -11,6 +32,11 @@
import org.eclipse.wst.server.core.ServerCore;
import org.eclipse.wst.server.core.ServerEvent;
+/**
+ *
+ * @author Rob Stryker
+ *
+ */
public class UnitedServerListenerManager implements
IServerLifecycleListener, IServerListener, IPublishListener {
protected static UnitedServerListenerManager instance;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java 2007-10-17 22:36:41 UTC (rev 4310)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java 2007-10-18 03:57:50 UTC (rev 4311)
@@ -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.core.server.internal;
import org.eclipse.core.runtime.CoreException;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java 2007-10-17 22:36:41 UTC (rev 4310)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java 2007-10-18 03:57:50 UTC (rev 4311)
@@ -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.core.server.internal;
import java.util.ArrayList;
@@ -48,25 +69,27 @@
workingCopy.setAttribute(DeployableLaunchConfiguration.ACTION_KEY, DeployableLaunchConfiguration.START);
}
- private void print(int kind, int deltaKind, IModule[] module) {
+ private String print(int kind, int deltaKind, IModule[] module) {
+ String ret = "";
String name = "";
for( int i = 0; i < module.length; i++ )
name += module[i].getName();
- System.out.print("publishing module (" + name + "): ");
+ ret += "publishing module (" + name + "): ";
switch( kind ) {
- case IServer.PUBLISH_INCREMENTAL: System.out.print("incremental, "); break;
- case IServer.PUBLISH_FULL: System.out.print("full, "); break;
- case IServer.PUBLISH_AUTO: System.out.print("auto, "); break;
- case IServer.PUBLISH_CLEAN: System.out.print("clean, "); break;
+ case IServer.PUBLISH_INCREMENTAL: ret += "incremental, "; break;
+ case IServer.PUBLISH_FULL: ret += "full, "; break;
+ case IServer.PUBLISH_AUTO: ret += "auto, "; break;
+ case IServer.PUBLISH_CLEAN: ret += "clean, "; break;
}
switch( deltaKind ) {
- case ServerBehaviourDelegate.NO_CHANGE: System.out.print("no change"); break;
- case ServerBehaviourDelegate.ADDED: System.out.print("added"); break;
- case ServerBehaviourDelegate.CHANGED: System.out.print("changed"); break;
- case ServerBehaviourDelegate.REMOVED: System.out.print("removed"); break;
+ case ServerBehaviourDelegate.NO_CHANGE: ret += "no change"; break;
+ case ServerBehaviourDelegate.ADDED: ret += "added"; break;
+ case ServerBehaviourDelegate.CHANGED: ret += "changed"; break;
+ case ServerBehaviourDelegate.REMOVED: ret += "removed"; break;
}
- System.out.println(" to server " + getServer().getName() + "(" + getServer().getId() + ")");
+ ret += " to server " + getServer().getName() + "(" + getServer().getId() + ")";
+ return ret;
}
protected PublishEvent publishEvent;
@@ -103,7 +126,6 @@
// delta = [no_change, added, changed, removed] = [0,1,2,3]
if( module.length == 0 ) return;
IJBossServerPublisher publisher;
- print(kind, deltaKind, module);
int modulePublishState = getServer().getModulePublishState(module) + 0;
PublishEvent root = PublisherEventLogger.createModuleRootEvent(publishEvent, module, kind, deltaKind);
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerRuntime.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerRuntime.java 2007-10-17 22:36:41 UTC (rev 4310)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerRuntime.java 2007-10-18 03:57:50 UTC (rev 4311)
@@ -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.core.server.internal;
import org.eclipse.wst.server.core.model.RuntimeDelegate;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossLaunchAdapter.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossLaunchAdapter.java 2007-10-17 22:36:41 UTC (rev 4310)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossLaunchAdapter.java 2007-10-18 03:57:50 UTC (rev 4311)
@@ -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.core.server.internal;
import java.io.FileInputStream;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java 2007-10-17 22:36:41 UTC (rev 4310)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java 2007-10-18 03:57:50 UTC (rev 4311)
@@ -55,6 +55,11 @@
import org.jboss.ide.eclipse.as.core.server.IServerStartupParameters;
import org.jboss.ide.eclipse.as.core.util.ArgsUtil;
+/**
+ *
+ * @author Rob Stryker rob.stryker(a)jboss.com
+ *
+ */
public class JBossServer extends ServerDelegate
implements IServerStartupParameters, IDeployableServer, IURLProvider {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServerBehavior.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServerBehavior.java 2007-10-17 22:36:41 UTC (rev 4310)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServerBehavior.java 2007-10-18 03:57:50 UTC (rev 4311)
@@ -36,6 +36,11 @@
import org.jboss.ide.eclipse.as.core.server.internal.launch.JBossServerStartupLaunchConfiguration;
import org.jboss.ide.eclipse.as.core.server.internal.launch.StopLaunchConfiguration;
+/**
+ *
+ * @author Rob Stryker
+ *
+ */
public class JBossServerBehavior extends DeployableServerBehavior {
private PollThread pollThread = null;
protected IProcess process;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ServerStatePollerType.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ServerStatePollerType.java 2007-10-17 22:36:41 UTC (rev 4310)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ServerStatePollerType.java 2007-10-18 03:57:50 UTC (rev 4311)
@@ -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.core.server.internal;
import org.eclipse.core.runtime.IConfigurationElement;
@@ -6,6 +27,11 @@
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
import org.jboss.ide.eclipse.as.core.server.IServerStatePoller;
+/**
+ * A wrapper for pollers
+ * @author Rob Stryker rob.stryker(a)redhat.com
+ *
+ */
public class ServerStatePollerType {
private IConfigurationElement el;
public ServerStatePollerType(IConfigurationElement el) {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/DeployableLaunchConfiguration.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/DeployableLaunchConfiguration.java 2007-10-17 22:36:41 UTC (rev 4310)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/DeployableLaunchConfiguration.java 2007-10-18 03:57:50 UTC (rev 4311)
@@ -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.core.server.internal.launch;
import org.eclipse.core.runtime.CoreException;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/StopLaunchConfiguration.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/StopLaunchConfiguration.java 2007-10-17 22:36:41 UTC (rev 4310)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/StopLaunchConfiguration.java 2007-10-18 03:57:50 UTC (rev 4311)
@@ -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.core.server.internal.launch;
import java.io.File;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/TwiddleLaunchConfiguration.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/TwiddleLaunchConfiguration.java 2007-10-17 22:36:41 UTC (rev 4310)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/TwiddleLaunchConfiguration.java 2007-10-18 03:57:50 UTC (rev 4311)
@@ -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.core.server.internal.launch;
import java.io.File;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/TwiddleLauncher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/TwiddleLauncher.java 2007-10-17 22:36:41 UTC (rev 4310)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/TwiddleLauncher.java 2007-10-18 03:57:50 UTC (rev 4311)
@@ -25,7 +25,10 @@
import java.util.Arrays;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.debug.core.DebugException;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.debug.core.ILaunchManager;
@@ -34,6 +37,7 @@
import org.eclipse.debug.core.model.IStreamMonitor;
import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
import org.eclipse.wst.server.core.IServer;
+import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
public class TwiddleLauncher {
@@ -93,12 +97,6 @@
// stop listening
for( int i = 0; i < processes.length; i++ ) {
processes[i].stopListening();
- if( canceled ) {
- try {
- // if canceled, terminate all twiddle processes
- processes[i].getProcess().terminate();
- } catch( Exception e ) {}
- }
}
return processes;
@@ -114,6 +112,16 @@
}
}
if( !allTerminated ) {
+ if( canceled ) {
+ try {
+ // if canceled, terminate all twiddle processes
+ for( int i = 0; i < processes.length; i++ )
+ processes[i].getProcess().terminate();
+ } catch( DebugException e ) {
+ IStatus s = new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID, "Cannot terminate twiddle process", e);
+ JBossServerCorePlugin.getDefault().getLog().log(s);
+ }
+ }
// sleep
try {
Thread.sleep(delay);
17 years, 2 months
JBoss Tools SVN: r4310 - in trunk/as/plugins/org.jboss.ide.eclipse.as.ui: jbossui/org/jboss/ide/eclipse/as/ui and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-10-17 18:36:41 -0400 (Wed, 17 Oct 2007)
New Revision: 4310
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties
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/plugin.xml
Log:
JBIDE-998
Added ability to specify a deploy directory
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java 2007-10-17 22:36:38 UTC (rev 4309)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java 2007-10-17 22:36:41 UTC (rev 4310)
@@ -48,6 +48,7 @@
public static String swf_Explanation;
public static String swf_Explanation2;
public static String swf_AuthenticationGroup;
+ public static String swf_DeployGroup;
public static String swf_Username;
public static String swf_Password;
public static String swf_BaseName;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties 2007-10-17 22:36:38 UTC (rev 4309)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties 2007-10-17 22:36:41 UTC (rev 4310)
@@ -24,6 +24,7 @@
swf_Password=Password
swf_BaseName=JBoss _VERSION_ Server
swf_NameInUse=Server name already in use
+swf_DeployGroup=Deployment
sswf_DeployDirectory=Deploy Directory
sswf_Title=Create a new System Copy Server
sswf_BaseName=Local Deployer
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-17 22:36:38 UTC (rev 4309)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossServerWizardFragment.java 2007-10-17 22:36:41 UTC (rev 4310)
@@ -20,25 +20,31 @@
*/
package org.jboss.ide.eclipse.as.ui.wizards;
+
+import java.io.File;
+
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
import org.eclipse.jdt.launching.IVMInstall;
import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.resource.ImageDescriptor;
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.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.DirectoryDialog;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.wst.server.core.IRuntime;
import org.eclipse.wst.server.core.IRuntimeWorkingCopy;
@@ -51,7 +57,6 @@
import org.eclipse.wst.server.core.internal.ServerWorkingCopy;
import org.eclipse.wst.server.ui.wizard.IWizardHandle;
import org.eclipse.wst.server.ui.wizard.WizardFragment;
-import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathModel;
import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.server.internal.AbstractJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
@@ -60,17 +65,17 @@
public class JBossServerWizardFragment extends WizardFragment {
private IWizardHandle handle;
+ private String name, authUser, authPass, deployVal;
private Label nameLabel, serverExplanationLabel,
runtimeExplanationLabel, authenticationExplanationLabel;
private Label homeDirLabel, installedJRELabel, configLabel;
private Label homeValLabel, jreValLabel, configValLabel;
- private Label usernameLabel, passLabel;
- private String runtimeLoc, configName, authUser, authPass;
+ private Label usernameLabel, passLabel, deployLabel;
private Composite nameComposite;
- private Group runtimeGroup, authenticationGroup;
- private String name;
- private Text nameText, userText, passText;
+ private Group runtimeGroup, authenticationGroup, deployGroup;
+ private Text nameText, userText, passText, deployText;
+ private Button deployBrowseButton;
public Composite createComposite(Composite parent, IWizardHandle handle) {
this.handle = handle;
@@ -82,7 +87,8 @@
createNameComposite(main);
createRuntimeGroup(main);
createAuthenticationGroup(main);
-
+ createDeployGroup(main);
+
// make modifications to parent
handle.setTitle(Messages.swf_Title);
handle.setDescription(Messages.swf_Description);
@@ -261,6 +267,64 @@
});
}
+ protected void createDeployGroup(Composite main) {
+ deployGroup = new Group(main, SWT.NONE);
+ deployGroup.setText(Messages.swf_DeployGroup);
+ FormData groupData = new FormData();
+ groupData.left = new FormAttachment(0,5);
+ groupData.right = new FormAttachment(100, -5);
+ groupData.top = new FormAttachment(authenticationGroup, 5);
+ deployGroup.setLayoutData(groupData);
+
+ deployGroup.setLayout(new GridLayout(3, false));
+ deployLabel = new Label(deployGroup, SWT.NONE);
+ deployText = new Text(deployGroup, SWT.BORDER);
+ deployLabel.setText(Messages.sswf_DeployDirectory);
+
+ deployBrowseButton = new Button(deployGroup, SWT.PUSH);
+ deployBrowseButton.setText(Messages.browse);
+
+ deployBrowseButton.addSelectionListener(new SelectionListener() {
+ public void widgetDefaultSelected(SelectionEvent e) {}
+ public void widgetSelected(SelectionEvent e) {
+ File file = new File(deployText.getText());
+ if (!file.exists()) {
+ file = null;
+ }
+
+ File directory = getDirectory(file, deployGroup.getShell());
+ if (directory == null) {
+ return;
+ }
+
+ deployText.setText(directory.getAbsolutePath());
+ deployVal = deployText.getText();
+ }
+ });
+
+ deployText.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ deployVal = deployText.getText();
+ }
+ });
+ }
+
+ protected File getDirectory(File startingDirectory, Shell shell) {
+ DirectoryDialog fileDialog = new DirectoryDialog(shell, SWT.OPEN);
+ if (startingDirectory != null) {
+ fileDialog.setFilterPath(startingDirectory.getPath());
+ }
+
+ String dir = fileDialog.open();
+ if (dir != null) {
+ dir = dir.trim();
+ if (dir.length() > 0) {
+ return new File(dir);
+ }
+ }
+ return null;
+ }
+
private void updateErrorMessage() {
String error = getErrorString();
if( error == null ) {
@@ -293,9 +357,10 @@
AbstractJBossServerRuntime jbsrt = (AbstractJBossServerRuntime)wc.loadAdapter(AbstractJBossServerRuntime.class, new NullProgressMonitor());
IVMInstall install = jbsrt.getVM();
jreValLabel.setText(install.getInstallLocation().getAbsolutePath() + " (" + install.getName() + ")");
- runtimeLoc = homeValLabel.getText();
- configName = configValLabel.getText();
runtimeGroup.layout();
+ String p = rwc.getLocation().append( "server").append(configValLabel.getText()).append("deploy").toOSString();
+ deployText.setText(p);
+ deployGroup.layout();
}
}
@@ -310,6 +375,7 @@
if( serverWC instanceof ServerWorkingCopy) {
((ServerWorkingCopy)serverWC).setAttribute(JBossServer.SERVER_USERNAME, authUser);
((ServerWorkingCopy)serverWC).setAttribute(JBossServer.SERVER_PASSWORD, authPass);
+ ((ServerWorkingCopy)serverWC).setAttribute(JBossServer.DEPLOY_DIRECTORY, deployVal);
}
}
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-17 22:36:38 UTC (rev 4309)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2007-10-17 22:36:41 UTC (rev 4310)
@@ -228,7 +228,7 @@
id="org.jboss.ide.eclipse.as.ui.exitor.deployServer.deployDir"
insertionId="org.eclipse.wst.server.editor.overview.left"
order="10"
- typeIds="org.jboss.ide.eclipse.as.systemCopyServer"/>
+ typeIds="org.jboss.ide.eclipse.as.systemCopyServer, org.jboss.ide.eclipse.as.32, org.jboss.ide.eclipse.as.40, org.jboss.ide.eclipse.as.42"/>
<section
class="org.jboss.ide.eclipse.as.ui.editor.ServerPasswordSection"
id="org.jboss.ide.eclipse.as.ui.editor.passwordSection"
17 years, 2 months
JBoss Tools SVN: r4309 - in trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server: internal and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-10-17 18:36:38 -0400 (Wed, 17 Oct 2007)
New Revision: 4309
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IDeployableServer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java
Log:
JBIDE-998
Added ability to specify a deploy directory
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IDeployableServer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IDeployableServer.java 2007-10-17 20:17:13 UTC (rev 4308)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IDeployableServer.java 2007-10-17 22:36:38 UTC (rev 4309)
@@ -29,6 +29,8 @@
* @author rob.stryker(a)jboss.com
*/
public interface IDeployableServer {
+ public static final String DEPLOY_DIRECTORY = "org.jboss.ide.eclipse.as.core.server.deployDirectory";
+
public String getDeployDirectory();
public String getConfigDirectory();
public ServerAttributeHelper getAttributeHelper();
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java 2007-10-17 20:17:13 UTC (rev 4308)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java 2007-10-17 22:36:38 UTC (rev 4309)
@@ -12,8 +12,6 @@
public class DeployableServer extends ServerDelegate implements IDeployableServer {
- public static final String DEPLOY_DIRECTORY = "org.jboss.ide.eclipse.as.core.server.stripped.deploy_directory";
-
public DeployableServer() {
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java 2007-10-17 20:17:13 UTC (rev 4308)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java 2007-10-17 22:36:38 UTC (rev 4309)
@@ -164,9 +164,6 @@
public String getConfigDirectory() {
return getConfigDirectory(true);
}
- public String getDeployDirectory() {
- return getDeployDirectory(true);
- }
public String getConfigDirectory(boolean checkLaunchConfig) {
if( !checkLaunchConfig )
@@ -183,6 +180,11 @@
return new Path(configDir).toOSString();
}
+ public String getDeployDirectory() {
+ String folder = getAttributeHelper().getAttribute(IDeployableServer.DEPLOY_DIRECTORY, (String)null);
+ return folder != null ? folder : getDeployDirectory(true);
+ }
+
public String getDeployDirectory(boolean checkLaunchConfig) {
return new Path(getConfigDirectory(checkLaunchConfig) + Path.SEPARATOR + DEPLOY).toOSString();
}
17 years, 2 months
JBoss Tools SVN: r4308 - in trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui: dialogs and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-10-17 16:17:13 -0400 (Wed, 17 Oct 2007)
New Revision: 4308
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/XPathDialogs.java
Log:
JBIDE-413
table becomes inactive, error message appears
code completion fixed for attribute portion
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties 2007-10-17 19:53:26 UTC (rev 4307)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties 2007-10-17 20:17:13 UTC (rev 4308)
@@ -92,8 +92,7 @@
XPathNameEmpty=Name must be set.
XPathNameInUse=Name already in use.
XPathColumnLocation=Location
-XPathColumnAttributeVals=Attribute Values
-XPathColumnRawXML=Raw XML
+XPathColumnAttributeVals=Value
XPathName=Name\:
XPathPattern=XPath Pattern\:
XPathAttribute=Attribute Name\:
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-17 19:53:26 UTC (rev 4307)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/XPathDialogs.java 2007-10-17 20:17:13 UTC (rev 4308)
@@ -176,7 +176,7 @@
protected int previewId = 48879;
protected Tree previewTree;
- protected TreeColumn column, column2, column3;
+ protected TreeColumn column, column2;
protected TreeViewer previewTreeViewer;
protected Composite main;
protected XMLDocumentRepository repository;
@@ -437,7 +437,9 @@
errorImage.setVisible(true);
errorLabel.setText("No XML elements matched your search.");
errorLabel.setVisible(true);
+ previewTreeViewer.getTree().setEnabled(false);
} else {
+ previewTreeViewer.getTree().setEnabled(true);
checkErrors();
}
main.layout();
@@ -472,15 +474,12 @@
previewTree.setLinesVisible(true);
column = new TreeColumn(previewTree, SWT.NONE);
column2 = new TreeColumn(previewTree, SWT.NONE);
- column3 = new TreeColumn(previewTree, SWT.NONE);
column.setText(Messages.XPathColumnLocation);
column2.setText(Messages.XPathColumnAttributeVals);
- column3.setText(Messages.XPathColumnRawXML);
- column.setWidth(100);
- column2.setWidth(100);
- column3.setWidth(100);
+ column.setWidth(150);
+ column2.setWidth(150);
previewTreeViewer = new TreeViewer(previewTree);
@@ -655,12 +654,8 @@
this.elementText = elementText;
}
public IContentProposal[] getProposals(String contents, int position) {
- int type = getType(elementText.getText());
- if( type == IN_ELEMENT ) {
- String[] strings = getAttributeNameProposalStrings(elementText.getText(), contents);
- return convertProposals(strings);
- }
- return new IContentProposal[0];
+ String[] strings = getAttributeNameProposalStrings(elementText.getText(), contents.trim());
+ return convertProposals(strings);
}
public String[] getAttributeNameProposalStrings(String parentPath, String remainder) {
17 years, 2 months
JBoss Tools SVN: r4307 - trunk/seam/plugins/org.jboss.tools.seam.core.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-10-17 15:53:26 -0400 (Wed, 17 Oct 2007)
New Revision: 4307
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/plugin.xml
Log:
http://jira.jboss.org/jira/browse/JBIDE-1106
JSF 1.1 facet is not allowed now
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/plugin.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/plugin.xml 2007-10-17 19:09:00 UTC (rev 4306)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/plugin.xml 2007-10-17 19:53:26 UTC (rev 4307)
@@ -56,7 +56,7 @@
</requires>
<requires
facet="jst.jsf"
- version="[1.1">
+ version="[1.2">
</requires>
<requires
facet="jst.java"
17 years, 2 months