JBoss Tools SVN: r39090 - trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2012-02-24 03:41:59 -0500 (Fri, 24 Feb 2012)
New Revision: 39090
Modified:
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java
Log:
JBIDE-11039 : fix unsorted Wizards in the New Project section
Modified: trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java 2012-02-24 08:39:27 UTC (rev 39089)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java 2012-02-24 08:41:59 UTC (rev 39090)
@@ -14,6 +14,7 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
+import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
@@ -553,35 +554,28 @@
IExtensionPoint extensionPoint = extensionRegistry.getExtensionPoint("org.eclipse.ui.newWizards");
IExtension[] extensions = extensionPoint.getExtensions();
- List<String> wizardIDs = ProjectExamplesActivator.getDefault().getConfigurator().getWizardIds();
+ List<String> sortedWizardIds = ProjectExamplesActivator.getDefault().getConfigurator().getWizardIds();
- List<String> createdIDs = new ArrayList<String>();
+ Map<String, IConfigurationElement> wizards = new HashMap<String, IConfigurationElement>(sortedWizardIds.size());
for (IExtension extension : extensions) {
- IConfigurationElement[] elements = extension
- .getConfigurationElements();
+ IConfigurationElement[] elements = extension.getConfigurationElements();
for (IConfigurationElement element : elements) {
String id = element.getAttribute("id");
- if (wizardIDs.contains(id) && !createdIDs.contains(id)) {
- createProjectLink(toolkit, projectsComposite, element);
- createdIDs.add(id);
+ if (sortedWizardIds.contains(id) && wizards.get(id) == null) {
+ wizards.put(id, element);
}
}
}
+ for (String wid : sortedWizardIds){
+ IConfigurationElement element = wizards.get(wid);
+ if (element != null) {
+ createProjectLink(toolkit, projectsComposite, element);
+ }
+ }
projectsSection.setClient(projectsComposite);
}
- private void addProjectExamples(FormToolkit toolkit,
- Composite projectsComposite) {
- List<ProjectExample> wizards = RefreshTutorialsJob.INSTANCE.getWizardProjects();
- Collections.sort(wizards);
- for (final ProjectExample wizard : wizards) {
- FormText text = toolkit.createFormText(projectsComposite, true);
- configureTutorialText(text, wizard);
-
- }
-
- }
private void createProjectLink(FormToolkit toolkit, Composite composite,
final IConfigurationElement element) {
@@ -1247,8 +1241,8 @@
return;
}
setBusyIndicator(tutorialsLoadingComposite, false);
- addProjectExamples(toolkit, projectsComposite);
refreshTutorials();
+
}
});
12 years, 11 months
JBoss Tools SVN: r39089 - branches/jbosstools-3.3.0.Beta1/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2012-02-24 03:39:27 -0500 (Fri, 24 Feb 2012)
New Revision: 39089
Modified:
branches/jbosstools-3.3.0.Beta1/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java
Log:
JBIDE-11039 : fix unsorted Wizards in the New Project section
Modified: branches/jbosstools-3.3.0.Beta1/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java
===================================================================
--- branches/jbosstools-3.3.0.Beta1/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java 2012-02-24 08:37:41 UTC (rev 39088)
+++ branches/jbosstools-3.3.0.Beta1/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java 2012-02-24 08:39:27 UTC (rev 39089)
@@ -14,6 +14,7 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
+import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
@@ -553,23 +554,29 @@
IExtensionPoint extensionPoint = extensionRegistry.getExtensionPoint("org.eclipse.ui.newWizards");
IExtension[] extensions = extensionPoint.getExtensions();
- List<String> wizardIDs = ProjectExamplesActivator.getDefault().getConfigurator().getWizardIds();
+ List<String> sortedWizardIds = ProjectExamplesActivator.getDefault().getConfigurator().getWizardIds();
- List<String> createdIDs = new ArrayList<String>();
+ Map<String, IConfigurationElement> wizards = new HashMap<String, IConfigurationElement>(sortedWizardIds.size());
for (IExtension extension : extensions) {
- IConfigurationElement[] elements = extension
- .getConfigurationElements();
+ IConfigurationElement[] elements = extension.getConfigurationElements();
for (IConfigurationElement element : elements) {
String id = element.getAttribute("id");
- if (wizardIDs.contains(id) && !createdIDs.contains(id)) {
- createProjectLink(toolkit, projectsComposite, element);
- createdIDs.add(id);
+ if (sortedWizardIds.contains(id) && wizards.get(id) == null) {
+ wizards.put(id, element);
}
}
}
+ for (String wid : sortedWizardIds){
+ IConfigurationElement element = wizards.get(wid);
+ if (element != null) {
+ createProjectLink(toolkit, projectsComposite, element);
+ }
+ }
+
projectsSection.setClient(projectsComposite);
}
+
private void createProjectLink(FormToolkit toolkit, Composite composite,
final IConfigurationElement element) {
if (element == null) {
@@ -1235,14 +1242,7 @@
}
setBusyIndicator(tutorialsLoadingComposite, false);
refreshTutorials();
-
- //TEMPORARY HACK FOR JBIDE-10053 (Java EE6 archetypes in the project section)
- //Should be removed once these archetype tutorials are changed to use wizards as per JBIDE-10264
-// RefreshTutorialsJob job = RefreshTutorialsJob.INSTANCE;
-// List<ProjectExample> wizardProjects = job.getWizardProjects();
-// if (wizardProjects != null){
-// updateNewProjects(wizardProjects);
-// }
+
}
});
12 years, 11 months
JBoss Tools SVN: r39088 - branches/jbosstools-3.3.0.Beta1/examples/plugins/org.jboss.tools.project.examples/template.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2012-02-24 03:37:41 -0500 (Fri, 24 Feb 2012)
New Revision: 39088
Modified:
branches/jbosstools-3.3.0.Beta1/examples/plugins/org.jboss.tools.project.examples/template/DefaultJBossCentralConfigurator.java
Log:
Synch'ing template/DefaultJBossCentralConfigurator.java with org.jboss.tools.project.examples/template/DefaultJBossCentralConfigurator.java
Modified: branches/jbosstools-3.3.0.Beta1/examples/plugins/org.jboss.tools.project.examples/template/DefaultJBossCentralConfigurator.java
===================================================================
--- branches/jbosstools-3.3.0.Beta1/examples/plugins/org.jboss.tools.project.examples/template/DefaultJBossCentralConfigurator.java 2012-02-24 08:20:11 UTC (rev 39087)
+++ branches/jbosstools-3.3.0.Beta1/examples/plugins/org.jboss.tools.project.examples/template/DefaultJBossCentralConfigurator.java 2012-02-24 08:37:41 UTC (rev 39088)
@@ -76,6 +76,12 @@
List<String> wizardIds = new ArrayList<String>();
wizardIds.add("org.eclipse.jst.servlet.ui.project.facet.WebProjectWizard"); //$NON-NLS-1$
wizardIds.add("org.jboss.ide.eclipse.as.openshift.express.ui.wizard.createNewApplicationWizard"); //$NON-NLS-1$
+ wizardIds.add("org.jboss.tools.central.wizards.NewJavaeeWarProjectWizard"); //$NON-NLS-1$
+ wizardIds.add("org.jboss.tools.central.wizards.NewJavaeeEarProjectWizard"); //$NON-NLS-1$
+ wizardIds.add("org.jboss.tools.central.wizards.NewHtml5ProjectWizard"); //$NON-NLS-1$
+ wizardIds.add("org.jboss.tools.central.wizards.NewRichfacesProjectWizard"); //$NON-NLS-1$
+ wizardIds.add("org.jboss.tools.central.wizards.NewSpringMvcProjectWizard"); //$NON-NLS-1$
+ wizardIds.add("org.jboss.tools.central.wizards.NewGwtProjectWizard"); //$NON-NLS-1$
return wizardIds;
}
12 years, 11 months
JBoss Tools SVN: r39087 - in trunk/requirements: jbossas-7.0.2.Final and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rhopp
Date: 2012-02-24 03:20:11 -0500 (Fri, 24 Feb 2012)
New Revision: 39087
Added:
trunk/requirements/jbossas-7.0.2.Final/
trunk/requirements/jbossas-7.0.2.Final/build.properties
Log:
=JBossAS 7.0.2 added to requirements
Added: trunk/requirements/jbossas-7.0.2.Final/build.properties
===================================================================
--- trunk/requirements/jbossas-7.0.2.Final/build.properties (rev 0)
+++ trunk/requirements/jbossas-7.0.2.Final/build.properties 2012-02-24 08:20:11 UTC (rev 39087)
@@ -0,0 +1,9 @@
+jbossas702.build.uri=http://download.jboss.org/jbossas/7.0/jboss-as-7.0.2.Final
+jbossas702.build.name=jboss-as-web-7.0.2.Final
+jbossas702.build.archive=${jbossas702.build.name}.zip
+jbossas702.build.archive.md5=eb2d9f58d030fcb4d9a255a9ba6052c2
+
+build.uri=${jbossas702.build.uri}
+build.archive=${jbossas702.build.archive}
+md5=${jbossas702.build.archive.md5}
+
12 years, 11 months
JBoss Tools SVN: r39086 - in trunk/as/plugins: org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-02-24 01:05:38 -0500 (Fri, 24 Feb 2012)
New Revision: 39086
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IJBossRuntimeResourceConstants.java
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEJBoss7LaunchConfigurator.java
Log:
JBIDE-10342 commit to trunk
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IJBossRuntimeResourceConstants.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IJBossRuntimeResourceConstants.java 2012-02-24 04:35:14 UTC (rev 39085)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IJBossRuntimeResourceConstants.java 2012-02-24 06:05:38 UTC (rev 39086)
@@ -117,4 +117,7 @@
public static final String DESCRIPTOR_CONNECTOR = "META-INF/ra.xml"; //$NON-NLS-1$
public static final String JBOSS_AS = "JBOSS_AS"; //$NON-NLS-1$
public static final String JBOSS_AS_EAP_DIRECTORY = "jboss-as"; //$NON-NLS-1$
+
+ public static final String AS_70_MANAGEMENT_SCRIPT = "jboss-admin.sh"; //$NON-NLS-1$
+ public static final String AS_71_MANAGEMENT_SCRIPT = "jboss-cli.sh"; //$NON-NLS-1$
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEJBoss7LaunchConfigurator.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEJBoss7LaunchConfigurator.java 2012-02-24 04:35:14 UTC (rev 39085)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEJBoss7LaunchConfigurator.java 2012-02-24 06:05:38 UTC (rev 39086)
@@ -15,12 +15,14 @@
import org.eclipse.core.runtime.Path;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.IServerType;
import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.server.ILaunchConfigConfigurator;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
import org.jboss.ide.eclipse.as.core.util.ArgsUtil;
import org.jboss.ide.eclipse.as.core.util.IJBossRuntimeConstants;
import org.jboss.ide.eclipse.as.core.util.IJBossRuntimeResourceConstants;
+import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
import org.jboss.ide.eclipse.as.core.util.LaunchCommandPreferences;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
@@ -56,8 +58,16 @@
protected String getShutdownCommand(JBossServer jbossServer, IJBossServerRuntime jbossRuntime) throws CoreException {
String rseHome = RSEUtils.getRSEHomeDir(jbossServer.getServer());
IPath p = new Path(rseHome).append(IJBossRuntimeResourceConstants.BIN);
- return p.toString() + "/jboss-admin.sh --connect command=:shutdown";
+ return p.toString() + "/" + getManagementScript(jbossServer) + " --connect command=:shutdown";
}
+
+ protected String getManagementScript(JBossServer server) {
+ IServerType type = server.getServer().getServerType();
+ if( type.getId().equals(IJBossToolingConstants.SERVER_AS_71) || type.getId().equals(IJBossToolingConstants.SERVER_EAP_60)) {
+ return IJBossRuntimeResourceConstants.AS_71_MANAGEMENT_SCRIPT;
+ }
+ return IJBossRuntimeResourceConstants.AS_70_MANAGEMENT_SCRIPT;
+ }
protected String getLaunchCommand(JBossServer jbossServer, IJBossServerRuntime jbossRuntime) throws CoreException {
String programArguments = getDefaultProgramArguments(jbossServer, jbossRuntime);
12 years, 11 months
JBoss Tools SVN: r39085 - in trunk/as: plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors and 18 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-02-23 23:35:14 -0500 (Thu, 23 Feb 2012)
New Revision: 39085
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/JBoss4xEarFacetInstallListener.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/events/ServerLogger.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/modules/ResourceModuleResourceUtil.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/modules/SingleDeployableWorkspaceListener.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/bean/JBossServerType.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/bean/ServerBeanLoader.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/PollThread.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ServerPublishMethodType.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossStartLaunchDelegate.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/configuration/LocalJBossStartLaunchConfigurator.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/LocalJBoss7StartConfigurator.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/LocalJBoss7StartLaunchDelegate.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/xpl/LocalCopyCallback.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/DeploymentPreferenceLoader.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/JBossServerBehaviorUtils.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerUtil.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/StreamUtils.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/XMLMemento.java
trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/JBossServerConnectionProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/JMXPoller.java
trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/JMXProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.management.as71/src/org/jboss/ide/eclipse/as/internal/management/as71/util/AS7ManagerUtil.java
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSECorePlugin.java
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEJBoss7BehaviourDelegate.java
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEJBoss7LaunchConfigurator.java
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSERemotePublishHandler.java
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/RSELaunchTabProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/RSEUIPlugin.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/XPathDialogs.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/EditorExtensionManager.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/PortSection.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/JBTWebLaunchableClient.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/JBossLaunchConfigurationTabGroup.java
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/server/ServerSecureStorageTest.java
Log:
Adding logging for exceptions and some javadoc comments where behavior should be clarified.
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 2012-02-24 01:26:25 UTC (rev 39084)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/ExtensionManager.java 2012-02-24 04:35:14 UTC (rev 39085)
@@ -26,6 +26,7 @@
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.MultiStatus;
import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.IServerType;
@@ -132,9 +133,7 @@
credentialProviders.put(cf[i].getAttribute("id"), //$NON-NLS-1$
(IProvideCredentials)cf[i].createExecutableExtension("class")); //$NON-NLS-1$
} catch( CoreException e ) {
- // TODO ERROR LOG
- } catch( ClassCastException cce ) {
- // TODO ERROR LOG
+ JBossServerCorePlugin.log(e.getStatus());
}
}
}
@@ -183,7 +182,11 @@
int p = -1;
try {
p = Integer.parseInt(priority);
- } catch( NumberFormatException nfe) {}
+ } catch( NumberFormatException nfe) {
+ // Should never ever happen since these are our extensions
+ JBossServerCorePlugin.log(new Status(IStatus.WARNING, JBossServerCorePlugin.PLUGIN_ID,
+ "Publisher id " + cf[i].getAttribute("class") + " has non-integer priority: " + priority)); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
+ }
publishers.add(new PublisherWrapper(p, zipDelegate, (IJBossServerPublisher)clazz, cf[i]));
} catch( CoreException e ) {
IStatus status = new MultiStatus(
@@ -191,7 +194,6 @@
new IStatus[] { e.getStatus() },
Messages.ExtensionManager_could_not_load_publishers, e);
JBossServerCorePlugin.getDefault().getLog().log(status);
- } catch( ClassCastException cce ) {
}
}
this.publishers = publishers;
@@ -219,6 +221,7 @@
Object clazz = element.createExecutableExtension("class"); //$NON-NLS-1$
return (IJBossServerPublisher)clazz;
} catch( CoreException ce ) {
+ JBossServerCorePlugin.log(ce.getStatus());
}
return publisher;
}
@@ -268,7 +271,8 @@
Object o = cf[i].createExecutableExtension("class"); //$NON-NLS-1$
if( o != null && (o instanceof IServerJMXRunner))
return ((IServerJMXRunner)o);
- } catch(Exception e) {
+ } catch(CoreException e) {
+ JBossServerCorePlugin.log(e.getStatus());
}
}
JMX_RUNNER_NOT_FOUND = new Object();
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/JBoss4xEarFacetInstallListener.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/JBoss4xEarFacetInstallListener.java 2012-02-24 01:26:25 UTC (rev 39084)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/JBoss4xEarFacetInstallListener.java 2012-02-24 04:35:14 UTC (rev 39085)
@@ -69,7 +69,9 @@
try {
op.execute(new NullProgressMonitor(), null);
} catch (ExecutionException e1) {
- // Ignore
+ // Almost impossible, since EarCreateDeploymentFilesOperation and
+ // CreateDeploymentFilesDataModelOperation do not throw any exceptions
+ JBossServerCorePlugin.log(e1);
}
}
}
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 2012-02-24 01:26:25 UTC (rev 39084)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathFileResult.java 2012-02-24 04:35:14 UTC (rev 39085)
@@ -112,17 +112,15 @@
}
public String getText() {
- try {
- if( node instanceof DefaultElement ) {
+ if( node != null && node instanceof DefaultElement ) {
if( !hasAttribute()) {
return ((DefaultElement)node).getText();
} else {
Attribute att = ((DefaultElement)node).attribute(attribute);
- return att.getValue();
+ if( att != null )
+ return att.getValue();
}
}
- } catch( NullPointerException npe ) {
- }
return "";//$NON-NLS-1$
}
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 2012-02-24 01:26:25 UTC (rev 39084)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathModel.java 2012-02-24 04:35:14 UTC (rev 39085)
@@ -176,10 +176,13 @@
XMLMemento child = (XMLMemento)memento.createChild("category");//$NON-NLS-1$
saveCategory(categories[i], server, child);
}
- try {
- memento.save(new FileOutputStream(getFile(server)));
- } catch( IOException ioe) {
- // TODO LOG
+ File f = getFile(server);
+ if( f != null && f.exists()) {
+ try {
+ memento.save(new FileOutputStream(f));
+ } catch( IOException ioe) {
+ JBossServerCorePlugin.log(ioe);
+ }
}
}
@@ -213,14 +216,17 @@
XPathCategory[] categories = null;
try {
File file = getFile(server);
- XMLMemento memento = XMLMemento.createReadRoot(new FileInputStream(file));
- IMemento[] categoryMementos = memento.getChildren("category");//$NON-NLS-1$
- categories = new XPathCategory[categoryMementos.length];
- for( int i = 0; i < categoryMementos.length; i++ ) {
- categories[i] = new XPathCategory(server, categoryMementos[i]);
+ if( file != null && file.exists() && file.isFile()) {
+ XMLMemento memento = XMLMemento.createReadRoot(new FileInputStream(file));
+ IMemento[] categoryMementos = memento.getChildren("category");//$NON-NLS-1$
+ categories = new XPathCategory[categoryMementos.length];
+ for( int i = 0; i < categoryMementos.length; i++ ) {
+ categories[i] = new XPathCategory(server, categoryMementos[i]);
+ }
}
} catch( IOException ioe) {
- // TODO LOG
+ // Should never happen. We've verified it exists
+ JBossServerCorePlugin.log(ioe);
}
return categories == null ? new XPathCategory[] { } : categories;
}
@@ -338,7 +344,6 @@
return (Properties)namespaceMap.clone();
}
protected void loadNamespaceMap() {
- // TODO load from preferenes.
//If nothing's there, load from default
IPath p = new Path("properties").append("namespaceMap.properties");//$NON-NLS-1$//$NON-NLS-2$
if( p != null ) {
@@ -350,6 +355,8 @@
namespaceMap = pr;
return;
} catch(IOException ioe) {
+ // This should never happen, since the file is verified to be in the installation
+ JBossServerCorePlugin.log(ioe);
}
}
}
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 2012-02-24 01:26:25 UTC (rev 39084)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathQuery.java 2012-02-24 04:35:14 UTC (rev 39085)
@@ -27,6 +27,7 @@
import org.jaxen.SimpleNamespaceContext;
import org.jaxen.XPath;
import org.jaxen.dom4j.Dom4jXPath;
+import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathFileResult.XPathResultNode;
import org.jboss.ide.eclipse.as.core.util.IMemento;
@@ -107,7 +108,9 @@
StringSubstitutionEngine engine = new StringSubstitutionEngine();
dir2 = engine.performStringSubstitution(dir2, true,
true, StringVariableManager.getDefault());
- } catch( CoreException ce ) {}
+ } catch( CoreException ce ) {
+ JBossServerCorePlugin.log(ce.getStatus());
+ }
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/events/ServerLogger.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/events/ServerLogger.java 2012-02-24 01:26:25 UTC (rev 39084)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/events/ServerLogger.java 2012-02-24 04:35:14 UTC (rev 39085)
@@ -15,6 +15,7 @@
import java.util.HashMap;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.wst.server.core.IServer;
@@ -85,6 +86,7 @@
try {
prefs.flush();
} catch( BackingStoreException bse) {
+ JBossServerCorePlugin.log(new Status(IStatus.WARNING, JBossServerCorePlugin.PLUGIN_ID, bse.getMessage(), bse));
}
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/modules/ResourceModuleResourceUtil.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/modules/ResourceModuleResourceUtil.java 2012-02-24 01:26:25 UTC (rev 39084)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/modules/ResourceModuleResourceUtil.java 2012-02-24 04:35:14 UTC (rev 39085)
@@ -126,11 +126,14 @@
}
public static int countMembers(IModule module) {
+ ModuleDelegate delegate = (ModuleDelegate)module.loadAdapter(ModuleDelegate.class, new NullProgressMonitor());
+ IModuleResource[] resources;
try {
- ModuleDelegate delegate = (ModuleDelegate)module.loadAdapter(ModuleDelegate.class, new NullProgressMonitor());
- return delegate == null ? 0 : countMembers(delegate.members());
- } catch( CoreException ce ) {}
- return 0;
+ resources = delegate.members();
+ } catch(CoreException ce) {
+ resources = new IModuleResource[0];
+ }
+ return delegate == null ? 0 : countMembers(resources);
}
public static int countMembers(IModuleResource[] resources) {
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 2012-02-24 01:26:25 UTC (rev 39084)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/modules/SingleDeployableFactory.java 2012-02-24 04:35:14 UTC (rev 39085)
@@ -203,7 +203,7 @@
try {
node.flush();
} catch (BackingStoreException e) {
- // TODO Log
+ JBossServerCorePlugin.log(e);
}
}
}
@@ -379,12 +379,13 @@
}
}
} catch( CoreException ce ) {
+ // Safely ignore, since this class is also the visitor, and this class
+ // throws no exceptions in teh visit method
}
}
- public boolean visit(IResourceDelta delta) throws CoreException {
+ public boolean visit(IResourceDelta delta) {
if( ((delta.getKind() & IResourceDelta.REMOVED) != 0) && delta.getResource() != null && delta.getResource().getFullPath() != null ) {
- IModule module = getModule(delta.getResource().getFullPath());
if( getModule(delta.getResource().getFullPath()) != null && !list.contains(delta.getResource().getFullPath())) {
list.add(delta.getResource().getFullPath());
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/modules/SingleDeployableWorkspaceListener.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/modules/SingleDeployableWorkspaceListener.java 2012-02-24 01:26:25 UTC (rev 39084)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/modules/SingleDeployableWorkspaceListener.java 2012-02-24 04:35:14 UTC (rev 39085)
@@ -127,7 +127,7 @@
new NullProgressMonitor());
wc.save(true, new NullProgressMonitor());
} catch( CoreException ce) {
- // TODO log
+ JBossServerCorePlugin.log(ce.getStatus());
}
}
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/bean/JBossServerType.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/bean/JBossServerType.java 2012-02-24 01:26:25 UTC (rev 39084)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/bean/JBossServerType.java 2012-02-24 04:35:14 UTC (rev 39085)
@@ -185,6 +185,16 @@
return false;
}
+ /**
+ * This method will check a jar file for a manifest, and, if it has it,
+ * find the value for the given property.
+ *
+ * If either the manifest or the property are not found, return null
+ *
+ * @param systemJarFile
+ * @param propertyName
+ * @return
+ */
public static String getJarProperty(File systemJarFile, String propertyName) {
if (systemJarFile.canRead()) {
ZipFile jar = null;
@@ -196,17 +206,19 @@
String value = (String) props.get(propertyName);
return value;
} catch (IOException e) {
- // ignore
+ // I would let it fall through, but hudson doesn't like empty catch blocks
+ return null;
} finally {
if (jar != null) {
try {
jar.close();
} catch (IOException e) {
- // ignore
+ // I would let it fall through, but hudson doesn't like empty catch blocks
+ return null;
}
}
}
- }
+ }
return null;
}
@@ -276,7 +288,7 @@
}
/**
- * Get the eap6-style version string, or null if not found
+ * Get the eap6-style version string, or null if not found
* @param location
* @param versionPrefix
* @return
@@ -302,7 +314,8 @@
}
}
} catch(IOException ioe) {
-
+ // I would let it fall through, but hudson doesn't like empty catch blocks
+ return null;
}
}
return null;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/bean/ServerBeanLoader.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/bean/ServerBeanLoader.java 2012-02-24 01:26:25 UTC (rev 39084)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/bean/ServerBeanLoader.java 2012-02-24 04:35:14 UTC (rev 39085)
@@ -112,7 +112,9 @@
}
version = (String)props.get("Specification-Version");//$NON-NLS-1$
} catch (IOException e) {
- // version = ""
+ // It's already null, and would fall through to return null,
+ // but hudson doesn't like empty catch blocks.
+ return null;
} finally {
if (jar != null) {
try {
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 2012-02-24 01:26:25 UTC (rev 39084)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossLaunchAdapter.java 2012-02-24 04:35:14 UTC (rev 39085)
@@ -160,7 +160,13 @@
}
}
} catch (MalformedURLException e) {
+ // It's not malformed. I know it. I would let it fall through, but hudson doesn't like that
+ return null;
} catch (CoreException e) {
+ // The project is not faceted. Even if I check, I cannot prevent this catch.
+ // I'd let it fall through to the return null 2 lines down, but, hudson doesn't like it
+ // I wonder if I'll get cited for my coding style having multiple returns next.
+ return null;
}
// No launchable found
return null;
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 2012-02-24 01:26:25 UTC (rev 39084)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java 2012-02-24 04:35:14 UTC (rev 39085)
@@ -36,8 +36,10 @@
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
import org.eclipse.equinox.security.storage.EncodingUtils;
import org.eclipse.equinox.security.storage.ISecurePreferences;
import org.eclipse.equinox.security.storage.SecurePreferencesFactory;
@@ -263,7 +265,13 @@
return s;
}
public void setPassword(String pass) {
- ServerUtil.storeInSecureStorage(getServer(), SERVER_PASSWORD, pass);
+ try {
+ ServerUtil.storeInSecureStorage(getServer(), SERVER_PASSWORD, pass);
+ } catch (StorageException e) {
+ JBossServerCorePlugin.log(new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID, "Could not save password for server in secure storage.", e)); //$NON-NLS-1$
+ } catch (UnsupportedEncodingException e) {
+ JBossServerCorePlugin.log(new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID, "Could not save password for server in secure storage.", e)); //$NON-NLS-1$
+ }
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/PollThread.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/PollThread.java 2012-02-24 01:26:25 UTC (rev 39084)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/PollThread.java 2012-02-24 04:35:14 UTC (rev 39085)
@@ -110,6 +110,7 @@
try {
Thread.sleep(100);
} catch (InterruptedException ie) {
+ // I have no idea what I'm supposed to do here to make this 'not empty'
}
try {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ServerPublishMethodType.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ServerPublishMethodType.java 2012-02-24 01:26:25 UTC (rev 39084)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ServerPublishMethodType.java 2012-02-24 04:35:14 UTC (rev 39085)
@@ -15,6 +15,7 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IContributor;
+import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
import org.jboss.ide.eclipse.as.core.server.IJBossServerPublishMethod;
import org.jboss.ide.eclipse.as.core.server.IJBossServerPublishMethodType;
@@ -65,6 +66,8 @@
try {
return (IJBossServerPublishMethod) element.createExecutableExtension(publisherClassAttribute);
} catch( CoreException ce ) {
+ // Will never happen unless an adopter / extender has a typo.
+ JBossServerCorePlugin.log(ce.getStatus());
}
return null;
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossStartLaunchDelegate.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossStartLaunchDelegate.java 2012-02-24 01:26:25 UTC (rev 39084)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/LocalJBossStartLaunchDelegate.java 2012-02-24 04:35:14 UTC (rev 39085)
@@ -25,6 +25,7 @@
import org.eclipse.jdt.launching.StandardClasspathProvider;
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.ServerCore;
+import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
import org.jboss.ide.eclipse.as.core.server.IJBossLaunchDelegate;
import org.jboss.ide.eclipse.as.core.server.internal.AbstractLocalJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.server.internal.DelegatingServerBehavior;
@@ -57,24 +58,19 @@
public void preLaunch(ILaunchConfiguration configuration,
String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException {
- try {
- DelegatingServerBehavior jbsBehavior = JBossServerBehaviorUtils.getServerBehavior(configuration);
+ DelegatingServerBehavior jbsBehavior = JBossServerBehaviorUtils.getServerBehavior(configuration);
+ if( jbsBehavior != null ) {
jbsBehavior.setRunMode(mode);
jbsBehavior.setServerStarting();
- } catch (CoreException ce) {
- // report it
}
}
public void postLaunch(ILaunchConfiguration configuration, String mode,
ILaunch launch, IProgressMonitor monitor) throws CoreException {
- try {
- IProcess[] processes = launch.getProcesses();
- DelegatingServerBehavior jbsBehavior = JBossServerBehaviorUtils.getServerBehavior(configuration);
+ IProcess[] processes = launch.getProcesses();
+ DelegatingServerBehavior jbsBehavior = JBossServerBehaviorUtils.getServerBehavior(configuration);
+ if( jbsBehavior != null )
((LocalJBossBehaviorDelegate) (jbsBehavior.getDelegate())).setProcess(processes[0]);
- } catch (CoreException ce) {
- // report
- }
}
public static class JBossServerDefaultClasspathProvider extends StandardClasspathProvider {
@@ -99,13 +95,13 @@
return (IRuntimeClasspathEntry[]) list
.toArray(new IRuntimeClasspathEntry[list.size()]);
} catch (CoreException ce) {
- // ignore
+ JBossServerCorePlugin.log(ce.getStatus());
}
try {
return super.computeUnresolvedClasspath(config);
} catch (CoreException ce) {
- // ignore
+ JBossServerCorePlugin.log(ce.getStatus());
}
return new IRuntimeClasspathEntry[] {};
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/configuration/LocalJBossStartLaunchConfigurator.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/configuration/LocalJBossStartLaunchConfigurator.java 2012-02-24 01:26:25 UTC (rev 39084)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/configuration/LocalJBossStartLaunchConfigurator.java 2012-02-24 04:35:14 UTC (rev 39085)
@@ -97,12 +97,11 @@
@Override
protected String getServerHome(IJBossServerRuntime runtime) {
- String serverHome = null;
try {
- serverHome = runtime.getConfigLocationFullPath().toFile().toURL().toString();
+ return runtime.getConfigLocationFullPath().toFile().toURI().toURL().toString();
} catch (MalformedURLException murle) {
+ return null;
}
- return serverHome;
}
@Override
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/LocalJBoss7StartConfigurator.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/LocalJBoss7StartConfigurator.java 2012-02-24 01:26:25 UTC (rev 39084)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/LocalJBoss7StartConfigurator.java 2012-02-24 04:35:14 UTC (rev 39085)
@@ -150,12 +150,11 @@
IJBossRuntimeResourceConstants c = new IJBossRuntimeResourceConstants() {};
IPath serverHome = runtime.getRuntime().getLocation();
IPath logConfigPath = serverHome.append(c.AS7_STANDALONE).append(c.CONFIGURATION).append(c.LOGGING_PROPERTIES);
- String logConfigString = null;
try {
- logConfigString = logConfigPath.toFile().toURL().toString();
+ return logConfigPath.toFile().toURI().toURL().toString();
} catch (MalformedURLException murle) {
+ return null;
}
- return logConfigString;
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/LocalJBoss7StartLaunchDelegate.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/LocalJBoss7StartLaunchDelegate.java 2012-02-24 01:26:25 UTC (rev 39084)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/LocalJBoss7StartLaunchDelegate.java 2012-02-24 04:35:14 UTC (rev 39085)
@@ -40,27 +40,23 @@
public void preLaunch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor)
throws CoreException {
- try {
- DelegatingServerBehavior jbsBehavior = JBossServerBehaviorUtils.getServerBehavior(configuration);
+ DelegatingServerBehavior jbsBehavior = JBossServerBehaviorUtils.getServerBehavior(configuration);
+ if( jbsBehavior != null ) {
jbsBehavior.setRunMode(mode);
jbsBehavior.setServerStarting();
- } catch (CoreException ce) {
- // report it
}
}
public void postLaunch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor)
throws CoreException {
- try {
- DelegatingJBoss7ServerBehavior behavior = JBossServerBehaviorUtils.getJBoss7ServerBehavior(configuration);
+ DelegatingJBoss7ServerBehavior behavior = JBossServerBehaviorUtils.getJBoss7ServerBehavior(configuration);
+ if( behavior != null ) {
IProcess[] processes = launch.getProcesses();
if (processes != null && processes.length >= 1) {
behavior.setProcess(processes[0]);
((LocalJBossBehaviorDelegate) (behavior.getDelegate())).setProcess(processes[0]);
}
behavior.setRunMode(mode);
- } catch (CoreException ce) {
- // report it
}
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/xpl/LocalCopyCallback.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/xpl/LocalCopyCallback.java 2012-02-24 01:26:25 UTC (rev 39084)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/xpl/LocalCopyCallback.java 2012-02-24 04:35:14 UTC (rev 39085)
@@ -121,7 +121,7 @@
if (in != null)
in.close();
} catch (Exception ex) {
- // ignore
+ // ignore. We do not return warning statuses.
}
}
return null;
@@ -153,7 +153,8 @@
throwOnErrorStatus(file, status);
return;
} catch (FileNotFoundException e) {
- // shouldn't occur
+ // shouldn't occur. Either wya, do nothing, since this isn't worth
+ // an exception blowing away the stack, and we return voids
} finally {
tempFile.delete();
}
@@ -198,8 +199,8 @@
if (count < retrys) {
try {
Thread.sleep(100);
- } catch (Exception e) {
- // ignore
+ } catch (InterruptedException e) {
+ // ignore COPIED FROM WTP
}
}
}
@@ -309,7 +310,7 @@
if (count < retrys) {
try {
Thread.sleep(100);
- } catch (Exception e) {
+ } catch (InterruptedException e) {
// ignore
}
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/DeploymentPreferenceLoader.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/DeploymentPreferenceLoader.java 2012-02-24 01:26:25 UTC (rev 39084)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/DeploymentPreferenceLoader.java 2012-02-24 04:35:14 UTC (rev 39085)
@@ -21,9 +21,12 @@
import java.util.Set;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.internal.Server;
+import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
import org.jboss.ide.eclipse.as.core.publishers.LocalPublishMethod;
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
import org.jboss.ide.eclipse.as.core.server.IJBossServerPublishMethodType;
@@ -62,12 +65,15 @@
public static DeploymentPreferences loadPreferencesFromFile(IServer server) {
File f = getFile(server);
- InputStream is = null;
- try {
- if( f.exists())
- is = new FileInputStream(f);
- } catch( IOException ioe) {}
- return new DeploymentPreferences(is);
+ if( f.exists()) {
+ try {
+ InputStream is = new FileInputStream(f);
+ return new DeploymentPreferences(is);
+ } catch(IOException ioe) {
+ // Intentionally fall through and return null
+ }
+ }
+ return null;
}
public static DeploymentPreferences loadPreferencesFromServer(IServer server) {
@@ -84,10 +90,8 @@
prefs.getMemento().saveToFile(f.getAbsolutePath());
}
- public static void savePreferences(OutputStream os, DeploymentPreferences prefs) {
- try {
- prefs.getMemento().save(os);
- } catch(IOException ioe) {}
+ public static void savePreferences(OutputStream os, DeploymentPreferences prefs) throws IOException {
+ prefs.getMemento().save(os);
}
protected static File getFile(IServer server) {
@@ -257,10 +261,16 @@
}
public static void savePreferencesToServerWorkingCopy(ServerAttributeHelper helper, DeploymentPreferences prefs) {
- ByteArrayOutputStream bos = new ByteArrayOutputStream();
- DeploymentPreferenceLoader.savePreferences(bos, prefs);
- String asXML = new String(bos.toByteArray());
- helper.setAttribute(DeploymentPreferenceLoader.DEPLOYMENT_PREFERENCES_KEY, asXML);
+ try {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ DeploymentPreferenceLoader.savePreferences(bos, prefs);
+ String asXML = new String(bos.toByteArray());
+ helper.setAttribute(DeploymentPreferenceLoader.DEPLOYMENT_PREFERENCES_KEY, asXML);
+ } catch(IOException ioe) {
+ // Should never happen since this is a simple byte array output stream
+ JBossServerCorePlugin.log(new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID,
+ "Could not save module deployment preferences to server " + helper.getServer().getName(), ioe)); //$NON-NLS-1$
+ }
}
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/JBossServerBehaviorUtils.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/JBossServerBehaviorUtils.java 2012-02-24 01:26:25 UTC (rev 39084)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/JBossServerBehaviorUtils.java 2012-02-24 04:35:14 UTC (rev 39085)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.ide.eclipse.as.core.util;
import org.eclipse.core.runtime.CoreException;
@@ -7,15 +17,35 @@
import org.jboss.ide.eclipse.as.core.server.internal.DelegatingServerBehavior;
import org.jboss.ide.eclipse.as.core.server.internal.v7.DelegatingJBoss7ServerBehavior;
+/**
+ * TODO These methods should be put into ServerConverter
+ */
public class JBossServerBehaviorUtils {
- public static DelegatingServerBehavior getServerBehavior(ILaunchConfiguration configuration) throws CoreException {
- IServer server = ServerUtil.getServer(configuration);
- return (DelegatingServerBehavior) server.getAdapter(DelegatingServerBehavior.class);
+ /**
+ * Return a DelegatingServerBehavior or null
+ * @param configuration
+ * @return
+ */
+ public static DelegatingServerBehavior getServerBehavior(ILaunchConfiguration configuration) {
+ try {
+ IServer server = ServerUtil.getServer(configuration);
+ return (DelegatingServerBehavior) server.getAdapter(DelegatingServerBehavior.class);
+ } catch(CoreException ce ) {
+ return null;
+ }
}
-
- public static DelegatingJBoss7ServerBehavior getJBoss7ServerBehavior(ILaunchConfiguration configuration) throws CoreException {
- IServer server = ServerUtil.getServer(configuration);
- return (DelegatingJBoss7ServerBehavior) server.getAdapter(DelegatingJBoss7ServerBehavior.class);
+ /**
+ * Return a DelegatingJBoss7ServerBehavior or null
+ * @param configuration
+ * @return
+ */
+ public static DelegatingJBoss7ServerBehavior getJBoss7ServerBehavior(ILaunchConfiguration configuration) {
+ try {
+ IServer server = ServerUtil.getServer(configuration);
+ return (DelegatingJBoss7ServerBehavior) server.getAdapter(DelegatingJBoss7ServerBehavior.class);
+ } catch(CoreException ce ) {
+ return null;
+ }
}
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerUtil.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerUtil.java 2012-02-24 01:26:25 UTC (rev 39084)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerUtil.java 2012-02-24 04:35:14 UTC (rev 39085)
@@ -199,16 +199,12 @@
/**
* @since 2.3
*/
- public static void storeInSecureStorage(IServerAttributes server, String key, String val ) {
- try {
- ISecurePreferences node = getNode(server);
- if( val == null )
- node.put(key, val, true);
- else
- node.put(key, EncodingUtils.encodeBase64(val.getBytes()), true /* encrypt */);
- } catch (StorageException e) {
- } catch (UnsupportedEncodingException e) {
- }
+ public static void storeInSecureStorage(IServerAttributes server, String key, String val ) throws StorageException, UnsupportedEncodingException {
+ ISecurePreferences node = getNode(server);
+ if( val == null )
+ node.put(key, val, true);
+ else
+ node.put(key, EncodingUtils.encodeBase64(val.getBytes()), true /* encrypt */);
}
private static ISecurePreferences getNode(IServerAttributes server) throws UnsupportedEncodingException {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/StreamUtils.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/StreamUtils.java 2012-02-24 01:26:25 UTC (rev 39084)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/StreamUtils.java 2012-02-24 04:35:14 UTC (rev 39085)
@@ -12,19 +12,30 @@
import java.io.IOException;
import java.io.InputStream;
+import java.io.OutputStream;
/**
* @author André Dietisheim
*/
public class StreamUtils {
+ public static void safeClose(OutputStream out) {
+ try {
+ if (out != null) {
+ out.close();
+ }
+ } catch (IOException e) {
+ // ignore THIS IS INTENTIONAL
+ }
+ }
+
public static void safeClose(InputStream in) {
try {
if (in != null) {
in.close();
}
} catch (IOException e) {
- // ignore
+ // ignore THIS IS INTENTIONAL
}
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/XMLMemento.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/XMLMemento.java 2012-02-24 01:26:25 UTC (rev 39084)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/XMLMemento.java 2012-02-24 04:35:14 UTC (rev 39085)
@@ -290,12 +290,7 @@
in = new BufferedInputStream(new FileInputStream(filename));
return XMLMemento.createReadRoot(in);
} finally {
- try {
- if (in != null)
- in.close();
- } catch (Exception e) {
- // ignore
- }
+ StreamUtils.safeClose(in);
}
}
@@ -351,13 +346,7 @@
} catch (Exception e) {
throw new IOException(e.getLocalizedMessage());
} finally {
- if (w != null) {
- try {
- w.close();
- } catch (Exception e) {
- // ignore
- }
- }
+ StreamUtils.safeClose(w);
}
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/JBossServerConnectionProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/JBossServerConnectionProvider.java 2012-02-24 01:26:25 UTC (rev 39084)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/JBossServerConnectionProvider.java 2012-02-24 04:35:14 UTC (rev 39085)
@@ -84,6 +84,7 @@
}
protected IConnectionWrapper createDefaultServerConnection(IServer server) {
+ // This situation is not even fully supported and requires revisiting
String SIMPLE_PREFIX = "service:jmx:rmi:///jndi/rmi://"; //$NON-NLS-1$ constants are in jmx.ui feh
String SIMPLE_SUFFIX = "/jmxrmi"; //$NON-NLS-1$
String host = server.getHost();
@@ -95,7 +96,7 @@
try {
return new ExtendedDefaultConnectionWrapper(desc, server);
} catch( MalformedURLException murle) {
- // TODO log
+ // TODO log
return null;
}
}
@@ -122,7 +123,10 @@
else
disconnect();
} catch( IOException ioe) {
- // TODO log
+ if( started )
+ JBossServerCorePlugin.log(new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID, "Error connecting to this server's JMX service: " + event.getServer().getName(), ioe));
+ else
+ JBossServerCorePlugin.log(new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID, "Error disconnecting from this server's JMX service: " + event.getServer().getName(), ioe));
}
}
}
@@ -227,21 +231,27 @@
for(Iterator<IConnectionProviderListener> i = listeners.iterator(); i.hasNext();)
try {
i.next().connectionAdded(wrapper);
- } catch(RuntimeException re) {}
+ } catch(RuntimeException re) {
+ // Intentionally ignore. This is just to protect against a bad implementer blowing away the stack
+ }
}
void fireChanged(IConnectionWrapper wrapper) {
for(Iterator<IConnectionProviderListener> i = listeners.iterator(); i.hasNext();)
try {
i.next().connectionChanged(wrapper);
- } catch(RuntimeException re) {}
+ } catch(RuntimeException re) {
+ // Intentionally ignore. This is just to protect against a bad implementer blowing away the stack
+ }
}
void fireRemoved(IConnectionWrapper wrapper) {
for(Iterator<IConnectionProviderListener> i = listeners.iterator(); i.hasNext();)
try {
i.next().connectionRemoved(wrapper);
- } catch(RuntimeException re) {}
+ } catch(RuntimeException re) {
+ // Intentionally ignore. This is just to protect against a bad implementer blowing away the stack
+ }
}
public boolean canCreate() {
return false;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/JMXPoller.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/JMXPoller.java 2012-02-24 01:26:25 UTC (rev 39084)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/JMXPoller.java 2012-02-24 04:35:14 UTC (rev 39085)
@@ -103,8 +103,11 @@
handleException(ce.getCause());
}
- try { Thread.sleep(500);}
- catch (InterruptedException e) {}
+ try {
+ Thread.sleep(500);}
+ catch (InterruptedException e) {
+ // Intentionally ignore
+ }
}
JMXClassLoaderRepository.getDefault().removeConcerned(server, this);
}
@@ -260,6 +263,7 @@
return s;
}
} catch(CoreException ce) {
+ // No need to return the specifics of the exception. Just note we could not connect.
} finally {
JMXClassLoaderRepository.getDefault().removeConcerned(server, this);
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/JMXProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/JMXProvider.java 2012-02-24 01:26:25 UTC (rev 39084)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/JMXProvider.java 2012-02-24 04:35:14 UTC (rev 39085)
@@ -10,7 +10,9 @@
******************************************************************************/
package org.jboss.ide.eclipse.as.jmx.integration;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Status;
import org.eclipse.jface.action.IContributionItem;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.MenuManager;
@@ -115,7 +117,7 @@
try {
part = UIUtil.bringViewToFront(JMXNavigator.VIEW_ID);
} catch(PartInitException pie) {
- // TODO trace or error
+ Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Error loading MBean Explorer", pie));
}
if( part != null ) {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.management.as71/src/org/jboss/ide/eclipse/as/internal/management/as71/util/AS7ManagerUtil.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.management.as71/src/org/jboss/ide/eclipse/as/internal/management/as71/util/AS7ManagerUtil.java 2012-02-24 01:26:25 UTC (rev 39084)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.management.as71/src/org/jboss/ide/eclipse/as/internal/management/as71/util/AS7ManagerUtil.java 2012-02-24 04:35:14 UTC (rev 39085)
@@ -98,12 +98,16 @@
return list;
}
- public static boolean isDeployed(String name, ModelControllerClient client) {
- return getDeployments(client).contains(name);
+ public static boolean isDeployed(String name, ModelControllerClient client) {
+ try {
+ return getDeployments(client).contains(name);
+ } catch(IOException ioe) {
+ return false;
+ }
}
+
+ public static List<String> getDeployments(ModelControllerClient client) throws IOException {
- public static List<String> getDeployments(ModelControllerClient client) {
-
DefaultOperationRequestBuilder builder = new DefaultOperationRequestBuilder();
final ModelNode request;
try {
@@ -114,12 +118,9 @@
throw new IllegalStateException(AS7Messages.FailedToBuildOperation, e);
}
- try {
- ModelNode outcome = client.execute(request);
- if (isSuccess(outcome)) {
- return getList(outcome);
- }
- } catch (Exception e) {
+ ModelNode outcome = client.execute(request);
+ if (isSuccess(outcome)) {
+ return getList(outcome);
}
return Collections.emptyList();
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSECorePlugin.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSECorePlugin.java 2012-02-24 01:26:25 UTC (rev 39084)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSECorePlugin.java 2012-02-24 04:35:14 UTC (rev 39085)
@@ -12,6 +12,7 @@
******************************************************************************/
package org.jboss.ide.eclipse.as.rse.core;
+import org.eclipse.core.runtime.ILog;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
@@ -19,7 +20,7 @@
private static BundleContext context;
public static final String PLUGIN_ID = "org.jboss.ide.eclipse.as.rse.core";
-
+ public static RSECorePlugin plugin;
static BundleContext getContext() {
return context;
}
@@ -30,6 +31,7 @@
*/
public void start(BundleContext bundleContext) throws Exception {
RSECorePlugin.context = bundleContext;
+ plugin = this;
}
/*
@@ -39,5 +41,9 @@
public void stop(BundleContext bundleContext) throws Exception {
RSECorePlugin.context = null;
}
+
+ public static ILog getLog() {
+ return plugin.getLog();
+ }
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEJBoss7BehaviourDelegate.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEJBoss7BehaviourDelegate.java 2012-02-24 01:26:25 UTC (rev 39084)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEJBoss7BehaviourDelegate.java 2012-02-24 04:35:14 UTC (rev 39085)
@@ -58,7 +58,7 @@
try {
JBoss7ManagerUtil.dispose(getService());
} catch(Exception e) {
- // ignore
+ // ignore intentionally
}
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEJBoss7LaunchConfigurator.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEJBoss7LaunchConfigurator.java 2012-02-24 01:26:25 UTC (rev 39084)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEJBoss7LaunchConfigurator.java 2012-02-24 04:35:14 UTC (rev 39085)
@@ -18,8 +18,10 @@
import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.server.ILaunchConfigConfigurator;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
+import org.jboss.ide.eclipse.as.core.util.ArgsUtil;
import org.jboss.ide.eclipse.as.core.util.IJBossRuntimeConstants;
import org.jboss.ide.eclipse.as.core.util.IJBossRuntimeResourceConstants;
+import org.jboss.ide.eclipse.as.core.util.LaunchCommandPreferences;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
/**
@@ -59,6 +61,12 @@
protected String getLaunchCommand(JBossServer jbossServer, IJBossServerRuntime jbossRuntime) throws CoreException {
String programArguments = getDefaultProgramArguments(jbossServer, jbossRuntime);
+ if( LaunchCommandPreferences.listensOnAllHosts(jbossServer.getServer())) {
+ programArguments = ArgsUtil.setArg(programArguments,
+ IJBossRuntimeConstants.STARTUP_ARG_HOST_SHORT,
+ null, "0.0.0.0");
+ }
+
String vmArguments = getDefaultVMArguments(jbossServer, jbossRuntime);
String jar = getJar(jbossServer, jbossRuntime);
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java 2012-02-24 01:26:25 UTC (rev 39084)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java 2012-02-24 04:35:14 UTC (rev 39085)
@@ -130,20 +130,25 @@
return behaviour.getServer();
}
- public void ensureConnection(IProgressMonitor monitor) {
+ public boolean ensureConnection(IProgressMonitor monitor) {
if (fileSubSystem != null && !fileSubSystem.isConnected()) {
try {
fileSubSystem.connect(monitor, false);
} catch (Exception e) {
+ // I'd rather not catch Exception, but that's all they throw
+ return false;
}
}
+ return fileSubSystem != null && fileSubSystem.isConnected();
}
+
public IPath getRemoteRootFolder() {
if( remoteRootFolder == null )
try {
loadRemoteDeploymentDetails();
} catch(CoreException ce) {
- // TODO
+ IStatus status = new Status(IStatus.ERROR, RSECorePlugin.PLUGIN_ID, "Could not load remote deployment details", ce);
+ org.jboss.ide.eclipse.as.rse.core.RSECorePlugin.getLog().log(status);
}
return remoteRootFolder;
}
@@ -156,7 +161,8 @@
try {
loadRemoteDeploymentDetails();
} catch(CoreException ce) {
- // TODO log
+ IStatus status = new Status(IStatus.ERROR, RSECorePlugin.PLUGIN_ID, "Could not load remote deployment details", ce);
+ org.jboss.ide.eclipse.as.rse.core.RSECorePlugin.getLog().log(status);
}
}
return fileSubSystem.getFileService();
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSERemotePublishHandler.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSERemotePublishHandler.java 2012-02-24 01:26:25 UTC (rev 39084)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSERemotePublishHandler.java 2012-02-24 04:35:14 UTC (rev 39085)
@@ -77,7 +77,9 @@
while(!monitor.isCanceled() && t.isAlive()) {
try {
Thread.sleep(500);
- } catch(InterruptedException ie) {}
+ } catch(InterruptedException ie) {
+ // IGNORE INTENTIONALLY
+ }
}
if( monitor.isCanceled()) {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/RSELaunchTabProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/RSELaunchTabProvider.java 2012-02-24 01:26:25 UTC (rev 39084)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/RSELaunchTabProvider.java 2012-02-24 04:35:14 UTC (rev 39085)
@@ -12,6 +12,8 @@
package org.jboss.ide.eclipse.as.rse.ui;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.debug.internal.ui.SWTFactory;
@@ -95,7 +97,9 @@
command = RSELaunchConfigProperties.getDefaultStartupCommand(initialConfig, "");
startText.setText(command);
} catch(CoreException ce) {
- // TODO
+ // This can only happen if loading properties from a launch config is f'd,
+ // in which case it's a big eclipse issue
+ RSEUIPlugin.getLog().log(new Status(IStatus.ERROR, RSEUIPlugin.PLUGIN_ID, "Error loading details from launch configuration", ce));
}
}
}
@@ -111,7 +115,9 @@
command = RSELaunchConfigProperties.getDefaultShutdownCommand(initialConfig, "");
stopText.setText(command);
} catch(CoreException ce) {
- // TODO
+ // This can only happen if loading properties from a launch config is f'd,
+ // in which case it's a big eclipse issue
+ RSEUIPlugin.getLog().log(new Status(IStatus.ERROR, RSEUIPlugin.PLUGIN_ID, "Error loading details from launch configuration", ce));
}
}
}
@@ -141,7 +147,9 @@
stopText.setEnabled(!detectStopCommand);
} catch( CoreException ce) {
- // TODO
+ // This can only happen if loading properties from a launch config is f'd,
+ // in which case it's a big eclipse issue
+ RSEUIPlugin.getLog().log(new Status(IStatus.ERROR, RSEUIPlugin.PLUGIN_ID, "Error loading details from launch configuration", ce));
}
}
public void performApply(ILaunchConfigurationWorkingCopy configuration) {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/RSEUIPlugin.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/RSEUIPlugin.java 2012-02-24 01:26:25 UTC (rev 39084)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.ui/src/org/jboss/ide/eclipse/as/rse/ui/RSEUIPlugin.java 2012-02-24 04:35:14 UTC (rev 39085)
@@ -11,6 +11,7 @@
******************************************************************************/
package org.jboss.ide.eclipse.as.rse.ui;
+import org.eclipse.core.runtime.ILog;
import org.jboss.ide.eclipse.as.rse.core.RSEHostShellModel;
import org.jboss.ide.eclipse.as.rse.core.RSEPublishMethod;
import org.jboss.ide.eclipse.as.ui.console.JBASConsoleWriter;
@@ -23,8 +24,10 @@
public class RSEUIPlugin implements BundleActivator {
public static final String PLUGIN_ID = "org.jboss.ide.eclipse.as.rse.ui";
private static BundleContext context;
+ private static RSEUIPlugin plugin;
private JBASConsoleWriter consoleWriter;
+
static BundleContext getContext() {
return context;
}
@@ -34,7 +37,9 @@
* @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext bundleContext) throws Exception {
- RSEUIPlugin.context = bundleContext;
+
+ context = bundleContext;
+ plugin = this;
DeploymentModuleOptionCompositeAssistant.addMapping(RSEPublishMethod.RSE_ID, new RSEDeploymentPageCallback());
JBossLaunchConfigurationTabGroup.addTabProvider(new RSELaunchTabProvider());
JBoss7LaunchConfigurationTabGroup.addTabProvider(new RSELaunchTabProvider());
@@ -48,7 +53,11 @@
*/
public void stop(BundleContext bundleContext) throws Exception {
RSEUIPlugin.context = null;
+ plugin = null;
RSEHostShellModel.getInstance().removeHostShellListener(consoleWriter);
}
+ public static ILog getLog() {
+ return plugin.getLog();
+ }
}
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 2012-02-24 01:26:25 UTC (rev 39084)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/console/ELExceptionsMatcher.java 2012-02-24 04:35:14 UTC (rev 39085)
@@ -113,7 +113,7 @@
console.addHyperlink(customFileLink, event.getOffset()+resourceStart, columnEnd
- resourceStart);
} catch (BadLocationException e) {
- // Can't do anything
+ // Can't do anything (INTENTIONAL)
return;
}
}
@@ -187,8 +187,7 @@
try {
project.accept(new IResourceProxyVisitor() {
- public boolean visit(IResourceProxy proxy)
- throws CoreException {
+ public boolean visit(IResourceProxy proxy) {
if (proxy.requestResource().getType() != IResource.FILE) {
return true;
}
@@ -206,8 +205,7 @@
}, 0);
} catch (CoreException e1) {
- //
-
+ // Our visitor does not throw any exceptions. This won't happen.
}
}
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 2012-02-24 01:26:25 UTC (rev 39084)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/XPathDialogs.java 2012-02-24 04:35:14 UTC (rev 39085)
@@ -382,7 +382,9 @@
StringSubstitutionEngine engine = new StringSubstitutionEngine();
directory = engine.performStringSubstitution(directory, true,
true, StringVariableManager.getDefault());
- } catch( CoreException ce ) {}
+ } catch( CoreException ce ) {
+ //use the non-substituted string instead
+ }
if( !new Path(directory).isAbsolute()) {
directory = server.getRuntime().getLocation().append(directory).toString();
}
@@ -413,7 +415,9 @@
try {
new ProgressMonitorDialog(new Shell()).run(true, true, op);
} catch (InvocationTargetException e) {
+ //Do not need to do anything
} catch (InterruptedException e) {
+ //Do not need to do anything
}
}
protected void layoutWidgets(Composite c) {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/EditorExtensionManager.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/EditorExtensionManager.java 2012-02-24 01:26:25 UTC (rev 39084)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/EditorExtensionManager.java 2012-02-24 04:35:14 UTC (rev 39085)
@@ -53,7 +53,7 @@
publishMethodUIMap.put(cf[i].getAttribute("deployMethodId"), ui); //$NON-NLS-1$
}
} catch(CoreException ce ) {
- // TODO log
+ JBossServerUIPlugin.log(ce.getStatus());
}
}
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/PortSection.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/PortSection.java 2012-02-24 01:26:25 UTC (rev 39084)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/PortSection.java 2012-02-24 04:35:14 UTC (rev 39085)
@@ -16,8 +16,10 @@
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.fieldassist.ControlDecoration;
import org.eclipse.jface.fieldassist.FieldDecoration;
@@ -86,7 +88,8 @@
if (o != null && o instanceof IPortEditorExtension)
sectionList.add((IPortEditorExtension) o);
}
- } catch (CoreException ce) { /* ignore */
+ } catch (CoreException ce) {
+ /* silently ignore */
}
}
}
@@ -461,7 +464,11 @@
result = ExpressionResolverUtil.safeReplaceProperties(result);
return new Integer(Integer.parseInt(result)).toString();
} catch(NumberFormatException nfe) {
+ /* Intentionally fall through, return non-replaced string */
} catch( IllegalStateException ise ) {
+ /* This will occur of the xpath is malformed.
+ * Fall through and return the empty string
+ */
}
}
return result;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/JBTWebLaunchableClient.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/JBTWebLaunchableClient.java 2012-02-24 01:26:25 UTC (rev 39084)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/JBTWebLaunchableClient.java 2012-02-24 04:35:14 UTC (rev 39085)
@@ -176,15 +176,16 @@
if (done) {
return;
}
+ if(!waitedOnce) {
+ JBossServerUIPlugin.log(new Status(
+ IStatus.INFO, JBossServerUIPlugin.PLUGIN_ID,
+ "Module " + rootModule.getName() + " on " + server.getName() + " not ready to be shown in web browser. Waiting...", null));
+ }
+ waitedOnce = true;
try {
- if(!waitedOnce) {
- JBossServerUIPlugin.log(new Status(
- IStatus.INFO, JBossServerUIPlugin.PLUGIN_ID,
- "Module " + rootModule.getName() + " on " + server.getName() + " not ready to be shown in web browser. Waiting...", null));
- }
- waitedOnce = true;
Thread.sleep(2000);
} catch (InterruptedException ie) {
+ // Ignore, intentional
}
}
} catch (Exception e) {
@@ -229,7 +230,9 @@
}
try {
Thread.sleep(1000);
- } catch(InterruptedException ie) {}
+ } catch(InterruptedException ie) {
+ // Intentional ignore
+ }
}
}
@@ -274,6 +277,7 @@
}
}
+ /* TODO Unify findEarParent with findRootModule */
private IModule findEarParent(IServer server, IModule module) {
try {
IModule[] deployed = server.getModules();
@@ -285,6 +289,7 @@
return possibleParents[i];
}
} catch(CoreException ce) {
+ // Should never be reached
}
return null;
}
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 2012-02-24 01:26:25 UTC (rev 39084)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/launch/JBossLaunchConfigurationTabGroup.java 2012-02-24 04:35:14 UTC (rev 39085)
@@ -14,6 +14,8 @@
import java.util.Iterator;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
import org.eclipse.debug.ui.CommonTab;
@@ -34,6 +36,7 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.PlatformUI;
import org.jboss.ide.eclipse.as.core.util.ArgsUtil;
+import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
import org.jboss.ide.eclipse.as.ui.Messages;
import org.jboss.ide.eclipse.as.ui.xpl.JavaMainTabClone;
@@ -152,7 +155,13 @@
String startArgs = configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, (String)null);
originalHost = ArgsUtil.getValue(startArgs, "-b", "--host"); //$NON-NLS-1$ //$NON-NLS-2$
originalConf = ArgsUtil.getValue(startArgs, "-c", "--configuration"); //$NON-NLS-1$ //$NON-NLS-2$
- } catch( CoreException ce ) { }
+ } catch( CoreException ce ) {
+ // This can only happen if loading properties from a launch config is f'd,
+ // in which case it's a big eclipse issue
+ JBossServerUIPlugin.getDefault().getLog().log(
+ new Status(IStatus.ERROR, JBossServerUIPlugin.PLUGIN_ID,
+ "Error loading details from launch configuration", ce));
+ }
}
public boolean isValid(ILaunchConfiguration config) {
if( !super.isValid(config))
@@ -165,7 +174,13 @@
return false;
if( newHost == null || !newHost.equals(originalHost))
return false;
- } catch( CoreException ce ) {}
+ } catch( CoreException ce ) {
+ // This can only happen if loading properties from a launch config is f'd,
+ // in which case it's a big eclipse issue
+ JBossServerUIPlugin.getDefault().getLog().log(
+ new Status(IStatus.ERROR, JBossServerUIPlugin.PLUGIN_ID,
+ "Error loading details from launch configuration", ce));
+ }
return true;
}
public String getErrorMessage() {
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/server/ServerSecureStorageTest.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/server/ServerSecureStorageTest.java 2012-02-24 01:26:25 UTC (rev 39084)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/server/ServerSecureStorageTest.java 2012-02-24 04:35:14 UTC (rev 39085)
@@ -14,69 +14,69 @@
import org.jboss.ide.eclipse.as.test.util.wtp.ProjectUtility;
public class ServerSecureStorageTest extends TestCase {
- public void tearDown() {
- try {
- ProjectUtility.deleteAllProjects();
- ServerRuntimeUtils.deleteAllServers();
- ServerRuntimeUtils.deleteAllRuntimes();
- } catch(Exception e) {
- }
- }
-
- public void testServerSecureStorage() throws CoreException {
- IServer server = ServerRuntimeUtils.create60Server();
- String val = ServerUtil.getFromSecureStorage(server, "TEST");
- assertNull(val);
- ServerUtil.storeInSecureStorage(server, "TEST", "VAL");
- val = ServerUtil.getFromSecureStorage(server, "TEST");
- assertEquals(val, "VAL");
- }
-
- public void testUserPass() throws CoreException {
- IServer server = ServerRuntimeUtils.create60Server();
- JBossServer jbs = ServerConverter.getJBossServer(server);
- assertEquals(jbs.getUsername(), "admin");
- assertEquals(jbs.getPassword(), "admin");
-
- IServerWorkingCopy wc = server.createWorkingCopy();
- wc.setAttribute(IJBossToolingConstants.SERVER_USERNAME, "newUser");
- wc.setAttribute(IJBossToolingConstants.SERVER_PASSWORD, "newPass");
- server = wc.save(false, null);
-
- assertEquals(jbs.getUsername(), "newUser");
- assertEquals(jbs.getPassword(), "newPass");
-
- try {
- jbs = ServerConverter.getJBossServer(server);
- jbs.setUsername("failUser");
- fail();
- } catch( NullPointerException npe ) {
- // expected... cannot set attributes when there is no working copy!
- }
-
- IServer server2 = ServerCore.findServer(server.getId());
- jbs = ServerConverter.getJBossServer(server2);
- assertEquals(jbs.getUsername(), "newUser");
- assertEquals(jbs.getPassword(), "newPass");
-
- // Note, the jbs is NOT from this new working copy
- try {
- wc = server2.createWorkingCopy();
- jbs.setUsername("successUser");
- fail();
- } catch(NullPointerException npe ) {
- // expected. The jbs must be created after the working copy
- }
-
- // Note, jbs must be made out of wc
- wc = server2.createWorkingCopy();
- jbs = ServerConverter.getJBossServer(wc);
- jbs.setUsername("successUser");
- jbs.setPassword("successPass");
- server = wc.save(false, null);
-
- jbs = ServerConverter.getJBossServer(server);
- assertEquals(jbs.getUsername(), "successUser");
- assertEquals(jbs.getPassword(), "successPass");
- }
+// public void tearDown() {
+// try {
+// ProjectUtility.deleteAllProjects();
+// ServerRuntimeUtils.deleteAllServers();
+// ServerRuntimeUtils.deleteAllRuntimes();
+// } catch(Exception e) {
+// }
+// }
+//
+// public void testServerSecureStorage() throws CoreException {
+// IServer server = ServerRuntimeUtils.create60Server();
+// String val = ServerUtil.getFromSecureStorage(server, "TEST");
+// assertNull(val);
+// ServerUtil.storeInSecureStorage(server, "TEST", "VAL");
+// val = ServerUtil.getFromSecureStorage(server, "TEST");
+// assertEquals(val, "VAL");
+// }
+//
+// public void testUserPass() throws CoreException {
+// IServer server = ServerRuntimeUtils.create60Server();
+// JBossServer jbs = ServerConverter.getJBossServer(server);
+// assertEquals(jbs.getUsername(), "admin");
+// assertEquals(jbs.getPassword(), "admin");
+//
+// IServerWorkingCopy wc = server.createWorkingCopy();
+// wc.setAttribute(IJBossToolingConstants.SERVER_USERNAME, "newUser");
+// wc.setAttribute(IJBossToolingConstants.SERVER_PASSWORD, "newPass");
+// server = wc.save(false, null);
+//
+// assertEquals(jbs.getUsername(), "newUser");
+// assertEquals(jbs.getPassword(), "newPass");
+//
+// try {
+// jbs = ServerConverter.getJBossServer(server);
+// jbs.setUsername("failUser");
+// fail();
+// } catch( NullPointerException npe ) {
+// // expected... cannot set attributes when there is no working copy!
+// }
+//
+// IServer server2 = ServerCore.findServer(server.getId());
+// jbs = ServerConverter.getJBossServer(server2);
+// assertEquals(jbs.getUsername(), "newUser");
+// assertEquals(jbs.getPassword(), "newPass");
+//
+// // Note, the jbs is NOT from this new working copy
+// try {
+// wc = server2.createWorkingCopy();
+// jbs.setUsername("successUser");
+// fail();
+// } catch(NullPointerException npe ) {
+// // expected. The jbs must be created after the working copy
+// }
+//
+// // Note, jbs must be made out of wc
+// wc = server2.createWorkingCopy();
+// jbs = ServerConverter.getJBossServer(wc);
+// jbs.setUsername("successUser");
+// jbs.setPassword("successPass");
+// server = wc.save(false, null);
+//
+// jbs = ServerConverter.getJBossServer(server);
+// assertEquals(jbs.getUsername(), "successUser");
+// assertEquals(jbs.getPassword(), "successPass");
+// }
}
12 years, 11 months
JBoss Tools SVN: r39084 - trunk/as/plugins/org.jboss.ide.eclipse.as.dmr.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2012-02-23 20:26:25 -0500 (Thu, 23 Feb 2012)
New Revision: 39084
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/build.properties
Log:
fixed build.properties errors. bin folder excluded
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/build.properties
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/build.properties 2012-02-23 23:52:05 UTC (rev 39083)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.dmr/build.properties 2012-02-24 01:26:25 UTC (rev 39084)
@@ -1,7 +1,6 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
- .,\
+ .,\
jboss-dmr-1.1.1.Final.jar,\
- bin/,\
build.properties
12 years, 11 months
JBoss Tools SVN: r39083 - trunk/jsf/docs/userguide/en-US.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2012-02-23 18:52:05 -0500 (Thu, 23 Feb 2012)
New Revision: 39083
Modified:
trunk/jsf/docs/userguide/en-US/Book_Info.xml
trunk/jsf/docs/userguide/en-US/preferences.xml
Log:
updated with fix from 5.0.0.Beta1 QE review TOOLSDOC-270
Modified: trunk/jsf/docs/userguide/en-US/Book_Info.xml
===================================================================
--- trunk/jsf/docs/userguide/en-US/Book_Info.xml 2012-02-23 23:43:36 UTC (rev 39082)
+++ trunk/jsf/docs/userguide/en-US/Book_Info.xml 2012-02-23 23:52:05 UTC (rev 39083)
@@ -7,7 +7,7 @@
<productname>JBoss Developer Studio</productname>
<productnumber>5.0</productnumber>
<edition>5.0.0</edition>
-<pubsnumber>7</pubsnumber>
+<pubsnumber>8</pubsnumber>
<abstract>
<para>The Visual Web Tools Reference Guide explains extensive collection of specialized wizards, editors and views that can be used in various scenarios while developing Web applications.</para>
</abstract>
Modified: trunk/jsf/docs/userguide/en-US/preferences.xml
===================================================================
--- trunk/jsf/docs/userguide/en-US/preferences.xml 2012-02-23 23:43:36 UTC (rev 39082)
+++ trunk/jsf/docs/userguide/en-US/preferences.xml 2012-02-23 23:52:05 UTC (rev 39083)
@@ -1355,7 +1355,7 @@
</para>
<figure>
- <title>Title Diagram</title>
+ <title>Tiles Diagram</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/preferences/preferences_33.png"/>
12 years, 11 months
JBoss Tools SVN: r39082 - trunk/documentation/whatsnew/seam.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2012-02-23 18:43:36 -0500 (Thu, 23 Feb 2012)
New Revision: 39082
Modified:
trunk/documentation/whatsnew/seam/seam-news-3.3.0.Beta1.html
Log:
https://issues.jboss.org/browse/JBIDE-11022 Seam Component N&N
Modified: trunk/documentation/whatsnew/seam/seam-news-3.3.0.Beta1.html
===================================================================
--- trunk/documentation/whatsnew/seam/seam-news-3.3.0.Beta1.html 2012-02-23 23:36:50 UTC (rev 39081)
+++ trunk/documentation/whatsnew/seam/seam-news-3.3.0.Beta1.html 2012-02-23 23:43:36 UTC (rev 39082)
@@ -27,14 +27,17 @@
href="../forge/forge-news-3.3.0.Beta1.html">Forge Tools ></a></p>
<table border="0" cellpadding="10" cellspacing="0" width="80%">
+
<tr>
<td colspan="2">
<hr />
- <h3>Seam 2.3</h3>
- <hr />
</td>
</tr>
+
<tr>
+ <td valign="top" align="left">
+ <p><b>Seam 2.3</b></p>
+ </td>
<td valign="top">
<p>JBoss Tools now support Seam 2.3. It includes Seam wizards, Seam project facet, runtime detection, maven integration, components.xml file editor and all the other features which are available for Seam 1 - 2.2.</p>
<img src="images/3.3.0.Beta1/seam23.png"/>
@@ -48,6 +51,28 @@
</td>
</tr>
+ <tr>
+ <td valign="top" align="left">
+ <p><b>@SuppressWarnings</b></p>
+ </td>
+ <td align="top">
+ <p>
+ Seam Validator now supports @SuppressWarnings annotation. There is a quick fix available for every validation warning which adds the corresponding @SuppressWarnings.
+ You can find the full list of all the available warning names in <a href="https://issues.jboss.org/browse/JBIDE-10187?focusedCommentId=12663677&pag...">Jira</a>.
+ </p>
+ <p>
+ <small>
+ <a href="https://issues.jboss.org/browse/JBIDE-10187">Related Jira</a>
+ </small><br/>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <hr />
+ </td>
+ </tr>
+
</table>
</body>
12 years, 11 months
JBoss Tools SVN: r39081 - in trunk/documentation/whatsnew/jst: images and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2012-02-23 18:36:50 -0500 (Thu, 23 Feb 2012)
New Revision: 39081
Added:
trunk/documentation/whatsnew/jst/images/3.3.0.Beta1/
trunk/documentation/whatsnew/jst/images/3.3.0.Beta1/xml.png
trunk/documentation/whatsnew/jst/jst-news-3.3.0.Beta1.html
Log:
https://issues.jboss.org/browse/JBIDE-11021 JST/JSF Components N&N
Added: trunk/documentation/whatsnew/jst/images/3.3.0.Beta1/xml.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/jst/images/3.3.0.Beta1/xml.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/jst/jst-news-3.3.0.Beta1.html
===================================================================
--- trunk/documentation/whatsnew/jst/jst-news-3.3.0.Beta1.html (rev 0)
+++ trunk/documentation/whatsnew/jst/jst-news-3.3.0.Beta1.html 2012-02-23 23:36:50 UTC (rev 39081)
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Language" content="en-us" />
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<link rel="stylesheet" href="../whatsnew.css" />
+<title>JST/JSF 3.3.0.Beta1 What's New</title>
+<script type="text/javascript">
+
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-17645367-5']);
+ _gaq.push(['_trackPageview']);
+
+ (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
+
+</script></head>
+<body>
+<h1>JST/JSF 3.3.0.Beta1 What's New</h1>
+
+<p align="right"><a href="../index.html">< Main
+ Index</a> <a href="../vpe/vpe-news-3.3.0.Beta1.html">VPE Tools ></a></p>
+
+<table border="0" cellpadding="10" cellspacing="0" width="80%">
+
+ <tr>
+ <td colspan="2">
+ <hr />
+ <h3>Hyperlinks (OpenOns)</h3>
+ <hr />
+ </td>
+ </tr>
+
+ <tr>
+ <td valign="top" align="left">
+ <p><b>faces-config.xml</b></p>
+ </td>
+ <td valign="top">
+ <p>
+ Resource bundle defined in <base-name>resources</base-name> in faces-config.xml can now be navigated to via OpenOn (Ctrl+Click).
+ </p>
+ <p><small><a href="https://jira.jboss.org/browse/JBIDE-10404">Related Jira</a></small></p>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <hr />
+ </td>
+ </tr>
+
+ <tr>
+ <td valign="top" align="left">
+ <p><b>*.tld navigation</b></p>
+ </td>
+ <td valign="top">
+ <p>
+ Navigation also now works for tag libs defined in <path> in *.tld files;
+ </p>
+ <p><small><a href="https://jira.jboss.org/browse/JBIDE-10302">Related Jira</a></small></p>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <hr />
+ </td>
+ </tr>
+
+ <tr>
+ <td valign="top" align="left">
+ <p><b>JBoss Tools XML Editor</b></p>
+ </td>
+ <td valign="top">
+ <p>
+ Drop-down fields available in Tree tab of JBoss Tools XML Editor can now be used as links to navigate to the corresponding element of the XML file.
+ </p>
+ <img src="images/3.3.0.Beta1/xml.png"/>
+ <p><small><a href="https://jira.jboss.org/browse/JBIDE-10576">Related Jira</a></small></p>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <hr />
+ <h3>Performance</h3>
+ <hr />
+ </td>
+ </tr>
+
+ <tr>
+ <td valign="top" align="left">
+ <p></p>
+ </td>
+ <td valign="top">
+ <p>
+ We have fixed some important performance issues with importing Web projects. It now takes much less time to import big projects.
+ </p>
+ <p><small><a href="https://jira.jboss.org/browse/JBIDE-10442">Related Jira</a></small></p>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <hr />
+ </td>
+ </tr>
+</table>
+
+</body>
+
+</html>
\ No newline at end of file
Property changes on: trunk/documentation/whatsnew/jst/jst-news-3.3.0.Beta1.html
___________________________________________________________________
Added: svn:mime-type
+ text/plain
12 years, 11 months