JBoss Tools SVN: r41444 - trunk/runtime-soa/features/org.jboss.tools.runtime.jbpm.detector.feature.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2012-05-25 17:22:01 -0400 (Fri, 25 May 2012)
New Revision: 41444
Modified:
trunk/runtime-soa/features/org.jboss.tools.runtime.jbpm.detector.feature/feature.properties
Log:
JBIDE-11324 missing feature descriptions
Modified: trunk/runtime-soa/features/org.jboss.tools.runtime.jbpm.detector.feature/feature.properties
===================================================================
--- trunk/runtime-soa/features/org.jboss.tools.runtime.jbpm.detector.feature/feature.properties 2012-05-25 21:10:46 UTC (rev 41443)
+++ trunk/runtime-soa/features/org.jboss.tools.runtime.jbpm.detector.feature/feature.properties 2012-05-25 21:22:01 UTC (rev 41444)
@@ -25,7 +25,7 @@
JBossToolsUpdatesSiteName=JBoss Tools Updates
# "description" property - description of the feature
-description=JBoss Runtime jBPM Detector
+description=Detector for jbpm 3 runtimes.
# "copyright" property - text of the "Feature Update Copyright"
copyright=Copyright (c) 2008-2012 Red Hat, Inc. and others.\nAll rights reserved. This program and the accompanying materials\n
12 years, 8 months
JBoss Tools SVN: r41442 - in trunk: common/features/org.jboss.tools.common.feature and 12 other directories.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2012-05-25 16:56:20 -0400 (Fri, 25 May 2012)
New Revision: 41442
Removed:
trunk/smooks/
Modified:
trunk/common/features/org.jboss.tools.common.feature/feature.properties
trunk/common/features/org.jboss.tools.common.text.ext.feature/feature.properties
trunk/common/features/org.jboss.tools.common.ui.feature/feature.properties
trunk/common/plugins/org.jboss.tools.common.mylyn/plugin.xml
trunk/documentation/development/setup/launches/JBoss Tools.launch
trunk/jsf/features/org.jboss.tools.richfaces.feature/feature.properties
trunk/maven/features/org.jboss.tools.maven.gwt.feature/feature.properties
trunk/maven/features/org.jboss.tools.maven.jpa.feature/feature.properties
trunk/maven/features/org.jboss.tools.maven.project.examples.feature/feature.properties
trunk/maven/features/org.jboss.tools.maven.sourcelookup.feature/feature.properties
trunk/runtime-soa/features/org.jboss.tools.runtime.drools.detector.feature/feature.properties
trunk/runtime-soa/features/org.jboss.tools.runtime.esb.detector.feature/feature.properties
trunk/usage/features/org.jboss.tools.usage.feature/feature.properties
trunk/usage/features/org.jboss.tools.usage.feature/feature.xml
Log:
JBIDE-12012 smooks removed from jbosstools svn
Modified: trunk/common/features/org.jboss.tools.common.feature/feature.properties
===================================================================
--- trunk/common/features/org.jboss.tools.common.feature/feature.properties 2012-05-25 20:45:26 UTC (rev 41441)
+++ trunk/common/features/org.jboss.tools.common.feature/feature.properties 2012-05-25 20:56:20 UTC (rev 41442)
@@ -26,7 +26,7 @@
devUpdateSiteName=JBossTools Development Update Site
# "description" property - description of the feature
-description=JBoss Tools Common
+description=Common functionallity shared by JBoss Tools plugins
# START NON-TRANSLATABLE
license=Red Hat, Inc. licenses these features and plugins to you under \
Modified: trunk/common/features/org.jboss.tools.common.text.ext.feature/feature.properties
===================================================================
--- trunk/common/features/org.jboss.tools.common.text.ext.feature/feature.properties 2012-05-25 20:45:26 UTC (rev 41441)
+++ trunk/common/features/org.jboss.tools.common.text.ext.feature/feature.properties 2012-05-25 20:56:20 UTC (rev 41442)
@@ -26,7 +26,7 @@
devUpdateSiteName=JBossTools Development Update Site
# "description" property - description of the feature
-description=JBoss Tools Common Text editing extensions
+description=Common text editing extensions used by other JBoss Tools plugins
copyright=Copyright (c) 2007-2012 Exadel, Inc and Red Hat, Inc.\n\
Distributed under license by Red Hat, Inc. All rights reserved.\n\
Modified: trunk/common/features/org.jboss.tools.common.ui.feature/feature.properties
===================================================================
--- trunk/common/features/org.jboss.tools.common.ui.feature/feature.properties 2012-05-25 20:45:26 UTC (rev 41441)
+++ trunk/common/features/org.jboss.tools.common.ui.feature/feature.properties 2012-05-25 20:56:20 UTC (rev 41442)
@@ -26,7 +26,7 @@
devUpdateSiteName=JBossTools Development Update Site
# "description" property - description of the feature
-description=JBoss Tools Common UI
+description=Common UI extensions used by JBoss Tools plugins.
copyright=Copyright (c) 2007-2012 Exadel, Inc and Red Hat, Inc.\n\
Distributed under license by Red Hat, Inc. All rights reserved.\n\
Modified: trunk/common/plugins/org.jboss.tools.common.mylyn/plugin.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.mylyn/plugin.xml 2012-05-25 20:45:26 UTC (rev 41441)
+++ trunk/common/plugins/org.jboss.tools.common.mylyn/plugin.xml 2012-05-25 20:56:20 UTC (rev 41442)
@@ -8,11 +8,45 @@
repositoryKind="bugzilla"
urlRepository="https://bugzilla.redhat.com"/>
<repository
- anonymous="false"
- addAutomatically="true"
- label="JBoss Community"
- repositoryKind="jira"
- urlRepository="https://issues.jboss.org"
- characterEncoding="UTF-8"/>
+ addAutomatically="true"
+ anonymous="true"
+ characterEncoding="UTF-8"
+ label="JBoss Community"
+ repositoryKind="jira"
+ urlRepository="https://issues.jboss.org">
+ </repository>
</extension>
-</plugin>
\ No newline at end of file
+ <extension
+ point="org.eclipse.mylyn.tasks.bugs.support">
+ <provider
+ categoryId="org.eclipse.mylyn.tasks.bugs.openSource"
+ description="JBoss Tools is an umbrella project for a set of Eclipse plugins that supports JBoss and related technology"
+ icon="jboss_about.png"
+ id="org.jboss.tools"
+ name="JBoss Tools">
+ </provider>
+ <product
+ description="JBoss AS Server Adapter"
+ featureId="org.jboss.ide.eclipse.as.feature"
+ icon="jboss_about.png"
+ id="org.jboss.tools.as"
+ name="JBossAS Server "
+ providerId="org.jboss.tools">
+ </product>
+ <mapping
+ namespace="org.jboss.tools">
+ <repository
+ kind="jira"
+ url="https://issues.jboss.org">
+ </repository>
+ </mapping>
+ <mapping
+ namespace="org.jboss.tools.as"
+ productId="org.jboss.tools.as">
+ <property
+ name="product"
+ value="JBIDE">
+ </property>
+ </mapping>
+ </extension>
+</plugin>
Modified: trunk/documentation/development/setup/launches/JBoss Tools.launch
===================================================================
--- trunk/documentation/development/setup/launches/JBoss Tools.launch 2012-05-25 20:45:26 UTC (rev 41441)
+++ trunk/documentation/development/setup/launches/JBoss Tools.launch 2012-05-25 20:56:20 UTC (rev 41442)
@@ -1,28 +1,29 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.pde.ui.RuntimeWorkbench">
-<booleanAttribute key="append.args" value="true"/>
-<booleanAttribute key="askclear" value="true"/>
-<booleanAttribute key="automaticAdd" value="true"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="false"/>
-<booleanAttribute key="clearws" value="true"/>
-<booleanAttribute key="clearwslog" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/JBoss Tools"/>
-<booleanAttribute key="default" value="true"/>
-<booleanAttribute key="includeOptional" value="true"/>
-<stringAttribute key="location" value="${workspace_loc}/../runtime-New_configuration"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl}"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms128m -Xmx512m -XX:MaxPermSize=128m"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<stringAttribute key="product" value="org.eclipse.platform.ide"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useDefaultConfig" value="true"/>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<booleanAttribute key="useProduct" value="true"/>
-<booleanAttribute key="usefeatures" value="false"/>
-</launchConfiguration>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.RuntimeWorkbench">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="askclear" value="true"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="false"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/JBoss Tools"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../runtime-New_configuration"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl}"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms256m -Xmx1024m -XX:MaxPermSize=254m -d32 -Dopenshift.ui.eagerloading=false"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.platform.ide"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="true"/>
+<booleanAttribute key="useProduct" value="true"/>
+<booleanAttribute key="usefeatures" value="false"/>
+</launchConfiguration>
Modified: trunk/jsf/features/org.jboss.tools.richfaces.feature/feature.properties
===================================================================
--- trunk/jsf/features/org.jboss.tools.richfaces.feature/feature.properties 2012-05-25 20:45:26 UTC (rev 41441)
+++ trunk/jsf/features/org.jboss.tools.richfaces.feature/feature.properties 2012-05-25 20:56:20 UTC (rev 41442)
@@ -26,7 +26,7 @@
devUpdateSiteName=JBossTools Development Update Site
# "description" property - description of the feature
-description=Visual editing
+description=Visual editor for html, xhtml and other xml based documents. Provides visual navigation and palette drag and drop for easy creation of documents.
copyright=Copyright (c) 2007-2012 Exadel, Inc and Red Hat, Inc.\n\
Distributed under license by Red Hat, Inc. All rights reserved.\n\
Modified: trunk/maven/features/org.jboss.tools.maven.gwt.feature/feature.properties
===================================================================
--- trunk/maven/features/org.jboss.tools.maven.gwt.feature/feature.properties 2012-05-25 20:45:26 UTC (rev 41441)
+++ trunk/maven/features/org.jboss.tools.maven.gwt.feature/feature.properties 2012-05-25 20:56:20 UTC (rev 41442)
@@ -24,7 +24,7 @@
updateSiteName=JBossTools Update Site
# "description" property - description of the feature
-description=JBoss Maven GWT Configurator
+description=Help configure Google Web Toolkit tooling in Eclipse based on your Maven pom.xml file.
# "copyright" property - text of the "Feature Update Copyright"
copyright=Copyright (c) 2010-2012 Red Hat, Inc. and others.\n\
Modified: trunk/maven/features/org.jboss.tools.maven.jpa.feature/feature.properties
===================================================================
--- trunk/maven/features/org.jboss.tools.maven.jpa.feature/feature.properties 2012-05-25 20:45:26 UTC (rev 41441)
+++ trunk/maven/features/org.jboss.tools.maven.jpa.feature/feature.properties 2012-05-25 20:56:20 UTC (rev 41442)
@@ -24,7 +24,7 @@
updateSiteName=JBossTools Update Site
# "description" property - description of the feature
-description=JBoss Maven JPA Configurator
+description=Configures project with JPA dependencies/setup to be recognized as Eclipse JPA projects.
# "copyright" property - text of the "Feature Update Copyright"
copyright=Copyright (c) 2010-2012 Red Hat, Inc. and others.\n\
Modified: trunk/maven/features/org.jboss.tools.maven.project.examples.feature/feature.properties
===================================================================
--- trunk/maven/features/org.jboss.tools.maven.project.examples.feature/feature.properties 2012-05-25 20:45:26 UTC (rev 41441)
+++ trunk/maven/features/org.jboss.tools.maven.project.examples.feature/feature.properties 2012-05-25 20:56:20 UTC (rev 41442)
@@ -24,7 +24,7 @@
updateSiteName=JBossTools Update Site
# "description" property - description of the feature
-description=JBoss Maven Project Examples
+description=Enables Project Examples to be Maven projects.
# "copyright" property - text of the "Feature Update Copyright"
copyright=Copyright (c) 2010-2012 Red Hat, Inc. and others.\n\
Modified: trunk/maven/features/org.jboss.tools.maven.sourcelookup.feature/feature.properties
===================================================================
--- trunk/maven/features/org.jboss.tools.maven.sourcelookup.feature/feature.properties 2012-05-25 20:45:26 UTC (rev 41441)
+++ trunk/maven/features/org.jboss.tools.maven.sourcelookup.feature/feature.properties 2012-05-25 20:56:20 UTC (rev 41442)
@@ -24,7 +24,7 @@
updateSiteName=JBossTools Update Site
# "description" property - description of the feature
-description=JBoss Tools Source Lookup
+description=Provides a mechanism to lookup source code found in JBoss Servers and other runtimes based on jars Maven metadata. Instant debugging without having to digg out the source code manually.
# "copyright" property - text of the "Feature Update Copyright"
copyright=Copyright (c) 2008-2012 Red Hat, Inc. and others.\nAll rights reserved. This program and the accompanying materials\n
Modified: trunk/runtime-soa/features/org.jboss.tools.runtime.drools.detector.feature/feature.properties
===================================================================
--- trunk/runtime-soa/features/org.jboss.tools.runtime.drools.detector.feature/feature.properties 2012-05-25 20:45:26 UTC (rev 41441)
+++ trunk/runtime-soa/features/org.jboss.tools.runtime.drools.detector.feature/feature.properties 2012-05-25 20:56:20 UTC (rev 41442)
@@ -25,7 +25,7 @@
JBossToolsUpdatesSiteName=JBoss Tools Updates
# "description" property - description of the feature
-description=JBoss Runtime Drools Detector
+description=Provides runtime detection for Drools.
# "copyright" property - text of the "Feature Update Copyright"
copyright=Copyright (c) 2008-2012 Red Hat, Inc. and others.\nAll rights reserved. This program and the accompanying materials\n
Modified: trunk/runtime-soa/features/org.jboss.tools.runtime.esb.detector.feature/feature.properties
===================================================================
--- trunk/runtime-soa/features/org.jboss.tools.runtime.esb.detector.feature/feature.properties 2012-05-25 20:45:26 UTC (rev 41441)
+++ trunk/runtime-soa/features/org.jboss.tools.runtime.esb.detector.feature/feature.properties 2012-05-25 20:56:20 UTC (rev 41442)
@@ -25,7 +25,7 @@
JBossToolsUpdatesSiteName=JBoss Tools Updates
# "description" property - description of the feature
-description=JBoss Runtime ESB Detector
+description=Detection and configuration of JBoss ESB runtimes.
# "copyright" property - text of the "Feature Update Copyright"
copyright=Copyright (c) 2008-2012 Red Hat, Inc. and others.\nAll rights reserved. This program and the accompanying materials\n
Modified: trunk/usage/features/org.jboss.tools.usage.feature/feature.properties
===================================================================
--- trunk/usage/features/org.jboss.tools.usage.feature/feature.properties 2012-05-25 20:45:26 UTC (rev 41441)
+++ trunk/usage/features/org.jboss.tools.usage.feature/feature.properties 2012-05-25 20:56:20 UTC (rev 41442)
@@ -24,11 +24,8 @@
updateSiteName=JBossTools Update Site
# "description" property - description of the feature
-description=JBoss Tools Usage Reporting
-
-# "descriptionURL" property - the web address to get further informations about this feature
-descriptionURL=JBoss Tools Usage reporting provides an anonymous opt-in call-back mechanism that can be used to see how widely used plugins are, which plugin installations have been done, where in the world and what versions of operating system, java and other information that is available.
-
+description=JBoss Tools Usage reporting provides an anonymous opt-in call-back mechanism that can be used to see how widely used plugins are, which plugin installations have been done, where in the world and what versions of operating system, java and other information that is available.
+
# "copyright" property - text of the "Feature Update Copyright"
copyright=Copyright (c) 2008-2012 Red Hat, Inc. and others.\n\
All rights reserved. This program and the accompanying materials\n\
Modified: trunk/usage/features/org.jboss.tools.usage.feature/feature.xml
===================================================================
--- trunk/usage/features/org.jboss.tools.usage.feature/feature.xml 2012-05-25 20:45:26 UTC (rev 41441)
+++ trunk/usage/features/org.jboss.tools.usage.feature/feature.xml 2012-05-25 20:56:20 UTC (rev 41442)
@@ -5,7 +5,7 @@
version="1.1.0.qualifier"
provider-name="%providerName">
- <description url="%descriptionURL">
+ <description>
%description
</description>
12 years, 8 months
JBoss Tools SVN: r41441 - in trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui: wizard and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-05-25 16:45:26 -0400 (Fri, 25 May 2012)
New Revision: 41441
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/job/EmbedCartridgesJob.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java
Log:
[JBIDE-12011] now skipping cartridge removal when creating an app
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/job/EmbedCartridgesJob.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/job/EmbedCartridgesJob.java 2012-05-25 20:28:24 UTC (rev 41440)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/job/EmbedCartridgesJob.java 2012-05-25 20:45:26 UTC (rev 41441)
@@ -35,23 +35,35 @@
private List<IEmbeddableCartridge> selectedCartridges;
private IApplication application;
private List<IEmbeddedCartridge> addedCartridges;
+ private boolean dontRemove;
- public EmbedCartridgesJob(List<IEmbeddableCartridge> selectedCartridges, IApplication application) {
+ public EmbedCartridgesJob(List<IEmbeddableCartridge> selectedCartridges, boolean dontRemove,
+ IApplication application) {
super(NLS.bind(OpenShiftExpressUIMessages.ADDING_REMOVING_CARTRIDGES, application.getName()));
this.selectedCartridges = selectedCartridges;
+ this.dontRemove = dontRemove;
this.application = application;
}
+ public EmbedCartridgesJob(List<IEmbeddableCartridge> selectedCartridges, IApplication application) {
+ this(selectedCartridges, false, application);
+ }
+
@Override
protected IStatus doRun(IProgressMonitor monitor) {
if (monitor.isCanceled()) {
return Status.CANCEL_STATUS;
}
+
try {
- removeEmbeddedCartridges(
- getRemovedCartridges(selectedCartridges, application.getEmbeddedCartridges()), application, monitor);
+ if (!dontRemove) {
+ removeEmbeddedCartridges(
+ getRemovedCartridges(selectedCartridges, application.getEmbeddedCartridges()),
+ application, monitor);
+ }
this.addedCartridges = addEmbeddedCartridges(
- getAddedCartridges(selectedCartridges, application.getEmbeddedCartridges()), application, monitor);
+ getAddedCartridges(selectedCartridges, application.getEmbeddedCartridges()),
+ application, monitor);
return Status.OK_STATUS;
} catch (OpenShiftException e) {
return OpenShiftUIActivator.createErrorStatus("Could not embed cartridges for application {0}", e,
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java 2012-05-25 20:28:24 UTC (rev 41440)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java 2012-05-25 20:45:26 UTC (rev 41441)
@@ -57,7 +57,7 @@
public abstract class OpenShiftExpressApplicationWizard extends Wizard implements IImportWizard, INewWizard {
private static final int APP_CREATE_TIMEOUT = 2 * 60 * 1000;
- private static final int APP_WAIT_TIMEOUT = 2 * 60 * 1000;
+ private static final int APP_WAIT_TIMEOUT = 3 * 60 * 1000;
private static final long EMBED_CARTRIDGES_TIMEOUT = 2 * 60 * 1000;
private static final int IMPORT_TIMEOUT = 1 * 60 * 1000;
@@ -141,32 +141,30 @@
@Override
public boolean performFinish() {
- boolean useExistingApp = getWizardModel().isUseExistingApplication();
- if (!useExistingApp) {
+ if (!getWizardModel().isUseExistingApplication()) {
IStatus status = createApplication();
- if(!processStatus("Creating the application", status)) {
+ if (!processStatus("creating the application", status)) {
return false;
}
-
+
status = waitForApplication(wizardModel.getApplication());
- if(!processStatus("Waiting to become reachable", status)) {
+ if (!processStatus("waiting to become reachable", status)) {
return false;
}
-
- if (!addRemoveCartridges(
- getWizardModel().getApplication(),
+
+ if (!addCartridges(
+ getWizardModel().getApplication(),
getWizardModel().getSelectedEmbeddableCartridges())) {
- return false;
+ return false;
}
}
- if (useExistingApp) {
- useExistingApp = importProject();
- }
+ boolean success = importProject();
wizardModel.addUserToModel();
- return useExistingApp;
+
+ return success;
}
private boolean processStatus(String operation, IStatus status) {
@@ -174,15 +172,16 @@
if (AbstractDelegatingMonitorJob.TIMEOUTED_CANCELLED == status.getCode()) {
getContainer().getShell().close();
} else {
- new ErrorDialog(getShell(),
- NLS.bind("{0} was cancelled", operation),
- NLS.bind("{0} timeouted and was canceled", operation),
- status,
+ new ErrorDialog(getShell(),
+ NLS.bind("Operation was cancelled", operation),
+ NLS.bind("we timeouted while {0}. We therefore cancelled the operation", operation),
+ status,
IStatus.ERROR | IStatus.WARNING | IStatus.CANCEL | IStatus.INFO)
- .open();
- return true;
+ .open();
}
- } else if (!JobUtils.isOk(status)) {
+ }
+
+ if (!JobUtils.isOk(status)) {
safeRefreshUser();
return false;
}
@@ -232,11 +231,12 @@
}
}
- private boolean addRemoveCartridges(final IApplication application,
+ private boolean addCartridges(final IApplication application,
final Set<IEmbeddableCartridge> selectedCartridges) {
try {
EmbedCartridgesJob job = new EmbedCartridgesJob(
new ArrayList<IEmbeddableCartridge>(wizardModel.getSelectedEmbeddableCartridges()),
+ true, // dont remove cartridges
wizardModel.getApplication());
IStatus result = WizardUtils.runInWizard(job, job.getDelegatingProgressMonitor(), getContainer(),
EMBED_CARTRIDGES_TIMEOUT);
12 years, 8 months
JBoss Tools SVN: r41440 - in trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal: ui/action and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: xcoulon
Date: 2012-05-25 16:28:24 -0400 (Fri, 25 May 2012)
New Revision: 41440
Added:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/AbstractSSHAction.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/ApplicationPortForwardingAction.java
Removed:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingAction.java
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingWizardModel.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingWizardPage.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/ShowEnvironmentAction.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/TailServerLogAction.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/serverviewer/actionDelegate/ApplicationPortForwardingActionProvider.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/utils/OpenShiftSshSessionFactory.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/ApplicationPortForwardingActionProvider.java
Log:
Fixed - JBIDE-12005
Handle SSH auth fail correctly
https://issues.jboss.org/browse/JBIDE-12005
Deleted: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingAction.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingAction.java 2012-05-25 19:25:16 UTC (rev 41439)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingAction.java 2012-05-25 20:28:24 UTC (rev 41440)
@@ -1,82 +0,0 @@
-package org.jboss.tools.openshift.express.internal.core.portforward;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.viewers.ITreeSelection;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.wst.server.core.IServer;
-import org.jboss.tools.openshift.express.internal.core.behaviour.ExpressServerUtils;
-import org.jboss.tools.openshift.express.internal.ui.action.AbstractAction;
-import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
-
-import com.openshift.client.IApplication;
-
-public class ApplicationPortForwardingAction extends AbstractAction {
-
- public ApplicationPortForwardingAction() {
- super("Port forwarding...", DebugUITools.getImageDescriptor(IDebugUIConstants.IMG_LCL_DISCONNECT));
- }
-
- /**
- * Operation called when the user clicks on 'Show In>Remote Console'. If no
- * Console/Worker existed, a new one is created, otherwise, it is displayed.
- * {@inheritDoc}
- */
- @Override
- public void run() {
- if (selection != null && selection instanceof ITreeSelection) {
- Object sel = ((ITreeSelection) selection).getFirstElement();
- if (sel instanceof IApplication) {
- openPortForwarding((IApplication) sel);
- } else if (sel instanceof IServer) {
- openPortForwarding((IServer) sel);
- }
- }
- }
-
- /**
- * Retrieves the application from the given server, then opens the dialog.
- * Since retrieving the application can be time consuming, the task is
- * performed in a separate job (ie, in a background thread).
- *
- * @param server
- */
- private void openPortForwarding(final IServer server) {
- Job job = new Job("Retrieving application's forwardable ports...") {
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- final IApplication application = ExpressServerUtils.getApplication(server);
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- openPortForwarding(application);
- }
- });
- return Status.OK_STATUS;
- }
- };
- job.setUser(true);
- job.schedule();
- }
-
- /**
- * @param application
- */
- private void openPortForwarding(IApplication application) {
- try {
- ApplicationPortForwardingWizard wizard = new ApplicationPortForwardingWizard(application);
- WizardDialog dialog = new ApplicationPortForwardingWizardDialog(Display.getCurrent().getActiveShell(),
- wizard);
- dialog.setMinimumPageSize(700, 300);
- dialog.create();
- dialog.open();
- } catch (Exception e) {
- Logger.error("Failed to perform 'port-forwarding' for application '" + application.getName() + "'", e);
- }
- }
-
-}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingWizardModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingWizardModel.java 2012-05-25 19:25:16 UTC (rev 41439)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingWizardModel.java 2012-05-25 20:28:24 UTC (rev 41440)
@@ -70,7 +70,7 @@
if (this.application.isPortFowardingStarted()) {
return;
}
-
+
final MessageConsole console = ConsoleUtils.findMessageConsole(getMessageConsoleName());
MessageConsoleStream stream = console.newMessageStream();
stream.println("Starting port-forwarding...");
@@ -87,7 +87,8 @@
* @return
*/
private String getMessageConsoleName() {
- return "Port forwarding for application '" + application.getName() + "' (" + application.getDomain().getId() + ")";
+ return "Port forwarding for application '" + application.getName() + "' (" + application.getDomain().getId()
+ + ")";
}
public void stopPortForwarding() throws OpenShiftSSHOperationException {
@@ -151,7 +152,10 @@
* @throws OpenShiftSSHOperationException
*/
public void setUseFreePorts(Boolean useFreePorts) throws OpenShiftSSHOperationException {
- if(!application.isPortFowardingStarted()) { // do not change the current bindings if port forwarding is already started.
+ if (!application.isPortFowardingStarted()) { // do not change the
+ // current bindings if
+ // port forwarding is
+ // already started.
updateLocalPortBindings(useFreePorts);
}
firePropertyChange(PROPERTY_USE_DEFAULT_LOCAL_IP_ADDRESS, this.useFreePorts, this.useFreePorts = useFreePorts);
@@ -169,11 +173,12 @@
final List<String> bindings = new ArrayList<String>();
// update local bindings while avoiding duplicates
for (IApplicationPortForwarding port : ports) {
- if(useFreePorts) {
+ if (useFreePorts) {
// find free port for every port
port.setLocalPort(SocketUtil.findFreePort());
} else {
- // find duplicates and if match we find free port for those until stops.
+ // find duplicates and if match we find free port for those
+ // until stops.
port.setLocalPort(port.getRemotePort());
String key = computeKey(port);
while (bindings.contains(key)) {
@@ -199,7 +204,13 @@
}
public void refreshForwardablePorts() throws OpenShiftSSHOperationException {
- if(!application.isPortFowardingStarted()) { // we don't reload/refresh the ports if portforwarding is already running since we then loose the existing local ip/ports.
+ if (!application.isPortFowardingStarted()) { // we don't reload/refresh
+ // the ports if
+ // portforwarding is
+ // already running since
+ // we then loose the
+ // existing local
+ // ip/ports.
application.refreshForwardablePorts();
updateLocalAddressBindings(this.useDefaultLocalIpAddress);
updateLocalPortBindings(this.useFreePorts);
@@ -208,18 +219,20 @@
/**
* @param monitor
- * @throws OpenShiftSSHOperationException
+ * @throws OpenShiftSSHOperationException
* @throws JSchException
*/
// TODO : move this method into the WizardModel ?
- void verifyApplicationSSHSession() throws OpenShiftSSHOperationException {
- final boolean hasSSHSession = getApplication().hasSSHSession();
- if (!hasSSHSession) {
+ boolean verifyApplicationSSHSession() throws OpenShiftSSHOperationException {
+ final boolean hasAlreadySSHSession = getApplication().hasSSHSession();
+ if (!hasAlreadySSHSession) {
Logger.debug("Opening a new SSH Session for application '" + getApplication().getName() + "'");
final Session session = OpenShiftSshSessionFactory.getInstance().createSession(
getApplication());
- getApplication().setSSHSession(session);
+ getApplication().setSSHSession(session);
}
+ // now, check if the session is valid (ie, not null and still connected)
+ return getApplication().hasSSHSession();
}
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingWizardPage.java 2012-05-25 19:25:16 UTC (rev 41439)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingWizardPage.java 2012-05-25 20:28:24 UTC (rev 41440)
@@ -163,7 +163,9 @@
@Override
protected IStatus run(IProgressMonitor monitor) {
try {
- wizardModel.verifyApplicationSSHSession();
+ if(!wizardModel.verifyApplicationSSHSession()) {
+ return Status.CANCEL_STATUS;
+ }
wizardModel.refreshForwardablePorts();
refreshViewerInput();
} catch (OpenShiftSSHOperationException e) {
@@ -188,7 +190,10 @@
@Override
protected IStatus run(IProgressMonitor monitor) {
try {
- wizardModel.verifyApplicationSSHSession();
+ if(!wizardModel.verifyApplicationSSHSession()) {
+ return Status.CANCEL_STATUS;
+ }
+
wizardModel.startPortForwarding();
refreshViewerInput();
} catch (OpenShiftSSHOperationException e) {
@@ -229,7 +234,10 @@
@Override
protected IStatus run(IProgressMonitor monitor) {
try {
- wizardModel.verifyApplicationSSHSession();
+ if(!wizardModel.verifyApplicationSSHSession()) {
+ return Status.CANCEL_STATUS;
+ }
+
wizardModel.stopPortForwarding();
refreshViewerInput();
} catch (OpenShiftSSHOperationException e) {
Added: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/AbstractSSHAction.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/AbstractSSHAction.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/AbstractSSHAction.java 2012-05-25 20:28:24 UTC (rev 41440)
@@ -0,0 +1,43 @@
+package org.jboss.tools.openshift.express.internal.ui.action;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
+import org.jboss.tools.openshift.express.internal.ui.utils.OpenShiftSshSessionFactory;
+
+import com.jcraft.jsch.JSchException;
+import com.jcraft.jsch.Session;
+import com.openshift.client.IApplication;
+import com.openshift.client.OpenShiftSSHOperationException;
+
+public abstract class AbstractSSHAction extends AbstractAction {
+
+ public AbstractSSHAction(String text) {
+ super(text);
+ }
+
+ public AbstractSSHAction(String text, boolean enableForSingleElement) {
+ super(text, enableForSingleElement);
+ }
+
+ public AbstractSSHAction(String text, ImageDescriptor image) {
+ super(text, image);
+ }
+
+ /**
+ * @param monitor
+ * @throws OpenShiftSSHOperationException
+ * @throws JSchException
+ */
+ protected boolean verifyApplicationSSHSession(final IApplication application) throws OpenShiftSSHOperationException {
+ final boolean hasAlreadySSHSession = application.hasSSHSession();
+ if (!hasAlreadySSHSession) {
+ Logger.debug("Opening a new SSH Session for application '" + application.getName() + "'");
+ final Session session = OpenShiftSshSessionFactory.getInstance().createSession(
+ application);
+ application.setSSHSession(session);
+ }
+ // now, check if the session is valid (ie, not null and still connected)
+ return application.hasSSHSession();
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/AbstractSSHAction.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Copied: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/ApplicationPortForwardingAction.java (from rev 41426, trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/portforward/ApplicationPortForwardingAction.java)
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/ApplicationPortForwardingAction.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/ApplicationPortForwardingAction.java 2012-05-25 20:28:24 UTC (rev 41440)
@@ -0,0 +1,110 @@
+package org.jboss.tools.openshift.express.internal.ui.action;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.debug.ui.DebugUITools;
+import org.eclipse.debug.ui.IDebugUIConstants;
+import org.eclipse.jface.viewers.ITreeSelection;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.wst.server.core.IServer;
+import org.jboss.tools.openshift.express.internal.core.behaviour.ExpressServerUtils;
+import org.jboss.tools.openshift.express.internal.core.portforward.ApplicationPortForwardingWizard;
+import org.jboss.tools.openshift.express.internal.core.portforward.ApplicationPortForwardingWizardDialog;
+import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
+import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
+
+import com.openshift.client.IApplication;
+import com.openshift.client.OpenShiftSSHOperationException;
+
+public class ApplicationPortForwardingAction extends AbstractSSHAction {
+
+ public ApplicationPortForwardingAction() {
+ super("Port forwarding...", DebugUITools.getImageDescriptor(IDebugUIConstants.IMG_LCL_DISCONNECT));
+ }
+
+ /**
+ * Operation called when the user clicks on 'Show In>Remote Console'. If no
+ * Console/Worker existed, a new one is created, otherwise, it is displayed.
+ * {@inheritDoc}
+ */
+ @Override
+ public void run() {
+ if (selection != null && selection instanceof ITreeSelection) {
+ Object sel = ((ITreeSelection) selection).getFirstElement();
+ if (sel instanceof IApplication) {
+ openPortForwardingDialog((IApplication) sel);
+ } else if (sel instanceof IServer) {
+ openPortForwardingDialog((IServer) sel);
+ }
+ }
+ }
+
+ /**
+ * Retrieves the application from the given server, then opens the dialog.
+ * Since retrieving the application can be time consuming, the task is
+ * performed in a separate job (ie, in a background thread).
+ *
+ * @param server
+ */
+ private void openPortForwardingDialog(final IServer server) {
+ Job job = new Job("Identifying OpenShift Application from selected Server...") {
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ final IApplication application = ExpressServerUtils.getApplication(server);
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ openPortForwardingDialog(application);
+ }
+ });
+ return Status.OK_STATUS;
+ }
+ };
+ job.setUser(true);
+ job.schedule();
+ }
+
+ private void openPortForwardingDialog(final IApplication application) {
+ Job job = new Job("Retrieving application's forwardable ports...") {
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ verifyApplicationSSHSession(application);
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ runAsync(application);
+ }
+ });
+ return Status.OK_STATUS;
+ } catch (OpenShiftSSHOperationException e) {
+ return OpenShiftUIActivator.createErrorStatus(e.getMessage(), e.getCause());
+ }
+ }
+ };
+ job.setUser(true);
+ job.schedule();
+ }
+
+ /**
+ * @param application
+ */
+ private void runAsync(final IApplication application) {
+ try {
+ ApplicationPortForwardingWizard wizard = new ApplicationPortForwardingWizard(
+ application);
+ WizardDialog dialog = new ApplicationPortForwardingWizardDialog(Display.getCurrent()
+ .getActiveShell(),
+ wizard);
+ dialog.setMinimumPageSize(700, 300);
+ dialog.create();
+ dialog.open();
+ } catch (Exception e) {
+ Logger.error(
+ "Failed to perform 'port-forwarding' for application '" + application.getName()
+ + "'", e);
+ }
+ }
+
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/ApplicationPortForwardingAction.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/ShowEnvironmentAction.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/ShowEnvironmentAction.java 2012-05-25 19:25:16 UTC (rev 41439)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/ShowEnvironmentAction.java 2012-05-25 20:28:24 UTC (rev 41440)
@@ -27,14 +27,13 @@
import org.jboss.tools.openshift.express.internal.ui.messages.OpenShiftExpressUIMessages;
import org.jboss.tools.openshift.express.internal.ui.utils.OpenShiftSshSessionFactory;
-import com.jcraft.jsch.JSchException;
import com.openshift.client.IApplication;
import com.openshift.client.OpenShiftSSHOperationException;
/**
* @author Xavier Coulon
*/
-public class ShowEnvironmentAction extends AbstractAction {
+public class ShowEnvironmentAction extends AbstractSSHAction {
public ShowEnvironmentAction() {
super(OpenShiftExpressUIMessages.SHOW_ENVIRONMENT_ACTION, true);
@@ -66,7 +65,7 @@
* @param server
*/
private void showEnvironmentProperties(final IServer server) {
- Job job = new Job("Retrieving application's forwardable ports...") {
+ Job job = new Job("Identifying OpenShift Application from selected Server...") {
@Override
protected IStatus run(IProgressMonitor monitor) {
final IApplication application = ExpressServerUtils.getApplication(server);
@@ -82,12 +81,31 @@
job.schedule();
}
+ private void showEnvironmentProperties(final IApplication application) {
+ Job job = new Job("Retrieving selected OpenShift Application's environment variables...") {
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ verifyApplicationSSHSession(application);
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ runAsync(application);
+ }
+ });
+ return Status.OK_STATUS;
+ } catch (OpenShiftSSHOperationException e) {
+ return OpenShiftUIActivator.createErrorStatus(e.getMessage(), e.getCause());
+ }
+ }
+ };
+ job.setUser(true);
+ job.schedule();
+ }
+
/**
* @param application
- * @throws JSchException
- * @throws OpenShiftSSHOperationException
*/
- private void showEnvironmentProperties(final IApplication application) {
+ private void runAsync(final IApplication application) {
try {
if (!application.hasSSHSession()) {
application.setSSHSession(OpenShiftSshSessionFactory.getInstance().createSession(application));
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/TailServerLogAction.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/TailServerLogAction.java 2012-05-25 19:25:16 UTC (rev 41439)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/TailServerLogAction.java 2012-05-25 20:28:24 UTC (rev 41440)
@@ -132,9 +132,7 @@
Thread thread = new Thread(tailServerLogWorker);
thread.start();
} catch (IOException e) {
- String message = NLS.bind("Failed to tail files for application ''{0}''.\n" +
- "Please make sure your SSH key is confugred to the SSH2 workbench preferences", appName);
- return OpenShiftUIActivator.createErrorStatus(message, e);
+ return OpenShiftUIActivator.createErrorStatus(NLS.bind("Failed to tail files for application ''{0}''", appName), e);
}
return Status.OK_STATUS;
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/serverviewer/actionDelegate/ApplicationPortForwardingActionProvider.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/serverviewer/actionDelegate/ApplicationPortForwardingActionProvider.java 2012-05-25 19:25:16 UTC (rev 41439)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/serverviewer/actionDelegate/ApplicationPortForwardingActionProvider.java 2012-05-25 20:28:24 UTC (rev 41440)
@@ -1,6 +1,6 @@
package org.jboss.tools.openshift.express.internal.ui.serverviewer.actionDelegate;
-import org.jboss.tools.openshift.express.internal.core.portforward.ApplicationPortForwardingAction;
+import org.jboss.tools.openshift.express.internal.ui.action.ApplicationPortForwardingAction;
public class ApplicationPortForwardingActionProvider extends AbstractServerViewerActionProvider {
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/utils/OpenShiftSshSessionFactory.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/utils/OpenShiftSshSessionFactory.java 2012-05-25 19:25:16 UTC (rev 41439)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/utils/OpenShiftSshSessionFactory.java 2012-05-25 20:28:24 UTC (rev 41440)
@@ -84,7 +84,7 @@
try {
cache.put(uri, createSession(hc, user, host, port, fs));
} catch (JSchException e) {
- throw new OpenShiftSSHOperationException(e, "Unable to create SSH session for application ''{0}}''", application);
+ throw new OpenShiftSSHOperationException(e, "Unable to create SSH session for application ''{0}''", application);
}
}
return cache.get(uri);
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/ApplicationPortForwardingActionProvider.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/ApplicationPortForwardingActionProvider.java 2012-05-25 19:25:16 UTC (rev 41439)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/ApplicationPortForwardingActionProvider.java 2012-05-25 20:28:24 UTC (rev 41440)
@@ -1,6 +1,6 @@
package org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider;
-import org.jboss.tools.openshift.express.internal.core.portforward.ApplicationPortForwardingAction;
+import org.jboss.tools.openshift.express.internal.ui.action.ApplicationPortForwardingAction;
public class ApplicationPortForwardingActionProvider extends AbstractOpenShiftExplorerViewerActionProvider {
12 years, 8 months
JBoss Tools SVN: r41439 - in trunk/cdi/tests/org.jboss.tools.cdi.deltaspike.core.test: projects/DeltaspikeCoreTest/src/deltaspike/config and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-05-25 15:25:16 -0400 (Fri, 25 May 2012)
New Revision: 41439
Added:
trunk/cdi/tests/org.jboss.tools.cdi.deltaspike.core.test/src/org/jboss/tools/cdi/deltaspike/core/test/DeltaspikeBeansTest.java
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.deltaspike.core.test/META-INF/MANIFEST.MF
trunk/cdi/tests/org.jboss.tools.cdi.deltaspike.core.test/projects/DeltaspikeCoreTest/src/deltaspike/config/SettingsBean.java
trunk/cdi/tests/org.jboss.tools.cdi.deltaspike.core.test/projects/DeltaspikeCoreTest/src/deltaspike/handler/MyHandlers.java
trunk/cdi/tests/org.jboss.tools.cdi.deltaspike.core.test/src/org/jboss/tools/cdi/deltaspike/core/test/DeltaspikeCoreAllTests.java
trunk/cdi/tests/org.jboss.tools.cdi.deltaspike.core.test/src/org/jboss/tools/cdi/deltaspike/core/test/DeltaspikeCoreTest.java
trunk/cdi/tests/org.jboss.tools.cdi.deltaspike.core.test/src/org/jboss/tools/cdi/deltaspike/core/test/validation/DeltaspikeValidationTest.java
Log:
JBIDE-11552
https://issues.jboss.org/browse/JBIDE-11552
Tests are added.
Modified: trunk/cdi/tests/org.jboss.tools.cdi.deltaspike.core.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.deltaspike.core.test/META-INF/MANIFEST.MF 2012-05-25 19:23:06 UTC (rev 41438)
+++ trunk/cdi/tests/org.jboss.tools.cdi.deltaspike.core.test/META-INF/MANIFEST.MF 2012-05-25 19:25:16 UTC (rev 41439)
@@ -15,6 +15,7 @@
org.jboss.tools.cdi.core,
org.jboss.tools.jst.jsp.base.test,
org.jboss.tools.cdi.core.test,
+ org.jboss.tools.cdi.deltaspike.core,
org.jboss.tools.common,
org.eclipse.ui;bundle-version="3.7.0",
org.jboss.tools.common.base.test,
Modified: trunk/cdi/tests/org.jboss.tools.cdi.deltaspike.core.test/projects/DeltaspikeCoreTest/src/deltaspike/config/SettingsBean.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.deltaspike.core.test/projects/DeltaspikeCoreTest/src/deltaspike/config/SettingsBean.java 2012-05-25 19:23:06 UTC (rev 41438)
+++ trunk/cdi/tests/org.jboss.tools.cdi.deltaspike.core.test/projects/DeltaspikeCoreTest/src/deltaspike/config/SettingsBean.java 2012-05-25 19:25:16 UTC (rev 41439)
@@ -13,4 +13,7 @@
@Property2
Long property2;
+ @Inject
+ Long property3;
+
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.deltaspike.core.test/projects/DeltaspikeCoreTest/src/deltaspike/handler/MyHandlers.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.deltaspike.core.test/projects/DeltaspikeCoreTest/src/deltaspike/handler/MyHandlers.java 2012-05-25 19:23:06 UTC (rev 41438)
+++ trunk/cdi/tests/org.jboss.tools.cdi.deltaspike.core.test/projects/DeltaspikeCoreTest/src/deltaspike/handler/MyHandlers.java 2012-05-25 19:25:16 UTC (rev 41439)
@@ -1,5 +1,8 @@
package deltaspike.handler;
+import javax.enterprise.inject.Produces;
+import javax.inject.Named;
+
import org.apache.deltaspike.core.api.exception.control.annotation.ExceptionHandler;
import org.apache.deltaspike.core.api.exception.control.annotation.Handles;
import org.apache.deltaspike.core.api.exception.control.event.ExceptionEvent;
@@ -7,6 +10,13 @@
@ExceptionHandler
public class MyHandlers {
- void printExceptions(@Handles ExceptionEvent<Throwable> evt) {
+ void printExceptions(@Handles ExceptionEvent<Throwable> evt, @Named("handlerParam") String s) {
}
+
+ void brokenHandler(@Handles Throwable evt) {
+ }
+
+ @Produces
+ @Named("handlerParam")
+ String s = "";
}
Added: trunk/cdi/tests/org.jboss.tools.cdi.deltaspike.core.test/src/org/jboss/tools/cdi/deltaspike/core/test/DeltaspikeBeansTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.deltaspike.core.test/src/org/jboss/tools/cdi/deltaspike/core/test/DeltaspikeBeansTest.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.deltaspike.core.test/src/org/jboss/tools/cdi/deltaspike/core/test/DeltaspikeBeansTest.java 2012-05-25 19:25:16 UTC (rev 41439)
@@ -0,0 +1,131 @@
+/*******************************************************************************
+ * 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.tools.cdi.deltaspike.core.test;
+
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.Path;
+import org.jboss.tools.cdi.core.CDIConstants;
+import org.jboss.tools.cdi.core.CDICoreNature;
+import org.jboss.tools.cdi.core.CDICorePlugin;
+import org.jboss.tools.cdi.core.IBean;
+import org.jboss.tools.cdi.core.ICDIProject;
+import org.jboss.tools.cdi.core.IClassBean;
+import org.jboss.tools.cdi.core.IInjectionPoint;
+import org.jboss.tools.cdi.core.IInjectionPointField;
+import org.jboss.tools.cdi.core.IInjectionPointParameter;
+import org.jboss.tools.cdi.core.test.DependentProjectTest;
+import org.jboss.tools.cdi.deltaspike.core.DeltaspikeAuthorityMethod;
+import org.jboss.tools.cdi.deltaspike.core.DeltaspikeConstants;
+import org.jboss.tools.cdi.deltaspike.core.DeltaspikeSecurityBindingConfiguration;
+import org.jboss.tools.cdi.deltaspike.core.DeltaspikeSecurityExtension;
+import org.jboss.tools.cdi.deltaspike.core.SecurityBindingDeclaration;
+import org.jboss.tools.cdi.internal.core.impl.definition.AbstractMemberDefinition;
+import org.jboss.tools.cdi.internal.core.impl.definition.MethodDefinition;
+import org.jboss.tools.cdi.internal.core.impl.definition.TypeDefinition;
+
+/**
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public class DeltaspikeBeansTest extends DeltaspikeCoreTest {
+
+ public void testExcluded() throws Exception {
+ IProject project = getTestProject();
+ ICDIProject cdi = CDICorePlugin.getCDIProject(project, true);
+ CDICoreNature n = cdi.getNature();
+ TypeDefinition def = n.getDefinitions().getTypeDefinition("deltaspike.exclude.ExcludedBean"); //$NON-NLS-1$
+ assertNotNull(def);
+ assertTrue(def.isAnnotationPresent(CDIConstants.NAMED_QUALIFIER_TYPE_NAME));
+ assertTrue(def.isAnnotationPresent(DeltaspikeConstants.EXCLUDE_ANNOTATION_TYPE_NAME));
+
+ Set<IBean> bs = cdi.getBeans(def.getResource().getFullPath());
+ assertTrue(bs.isEmpty());
+ }
+
+ public void testConfigProperty() throws Exception {
+ IProject project = getTestProject();
+ ICDIProject cdi = CDICorePlugin.getCDIProject(project, true);
+
+ IInjectionPointField f1 = DependentProjectTest.getInjectionPointField(cdi, project, "/src/deltaspike/config/SettingsBean.java", "property1"); //$NON-NLS-1$ //$NON-NLS-2$
+ assertNotNull(f1);
+ assertTrue(f1.isAnnotationPresent(DeltaspikeConstants.CONFIG_PROPERTY_ANNOTATION_TYPE_NAME));
+
+ }
+
+ public void testMessages() throws Exception {
+ IProject project = getTestProject();
+ ICDIProject cdi = CDICorePlugin.getCDIProject(project, true);
+
+ IInjectionPointField f1 = DependentProjectTest.getInjectionPointField(cdi, project, "/src/deltaspike/message/MyBean.java", "messages"); //$NON-NLS-1$ //$NON-NLS-2$
+ assertNotNull(f1);
+ Set<IBean> bs = cdi.getBeans(true, f1);
+ assertEquals(1, bs.size());
+
+ IInjectionPointField f2 = DependentProjectTest.getInjectionPointField(cdi, project, "/src/deltaspike/message/MyBean.java", "messageContext"); //$NON-NLS-1$ //$NON-NLS-2$
+ assertNotNull(f2);
+ bs = cdi.getBeans(true, f2);
+ assertEquals(1, bs.size());
+ }
+
+ public void testHandler() throws Exception {
+ IProject project = getTestProject();
+ ICDIProject cdi = CDICorePlugin.getCDIProject(project, true);
+
+ Set<IBean> bs = cdi.getBeans(new Path("/DeltaspikeCoreTest/src/deltaspike/handler/MyHandlers.java")); //$NON-NLS-1$
+ IClassBean cb = null;
+ for (IBean b: bs) {
+ if(b instanceof IClassBean) cb = (IClassBean)b;
+ }
+ Set<IInjectionPoint> ps = cb.getInjectionPoints();
+ assertEquals(1, ps.size());
+ IInjectionPoint p = ps.iterator().next();
+ assertTrue(p instanceof IInjectionPointParameter);
+ bs = cdi.getBeans(true, p);
+ assertEquals(1, bs.size());
+ }
+
+ public void testSecurity() throws Exception {
+ IProject project = getTestProject();
+ ICDIProject cdi = CDICorePlugin.getCDIProject(project, true);
+ DeltaspikeSecurityExtension extension = DeltaspikeSecurityExtension.getExtension(cdi.getNature());
+ assertNotNull(extension);
+
+ DeltaspikeSecurityBindingConfiguration c = extension.getContext().getConfiguration("deltaspike.security.CustomSecurityBinding"); //$NON-NLS-1$
+ assertNotNull(c);
+ Set<DeltaspikeAuthorityMethod> as = c.getAuthorizerMembers();
+ assertEquals(3, as.size());
+ Map<AbstractMemberDefinition, SecurityBindingDeclaration> bs = c.getBoundMembers();
+ assertEquals(3, bs.size());
+
+ for (AbstractMemberDefinition d: bs.keySet()) {
+ String methodName = ((MethodDefinition)d).getMethod().getElementName();
+ SecurityBindingDeclaration b = bs.get(d);
+ int k = 0;
+ for (DeltaspikeAuthorityMethod a: as) {
+ if(a.isMatching(b.getBinding())) {
+ k++;
+ }
+ }
+ if("doSomething1".equals(methodName)) { //$NON-NLS-1$
+ assertEquals(1, k);
+ } else if("doSomething2".equals(methodName)) { //$NON-NLS-1$
+ assertEquals(2, k);
+ } else if("doSomething3".equals(methodName)) { //$NON-NLS-1$
+ assertEquals(0, k);
+ }
+ }
+
+ }
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.deltaspike.core.test/src/org/jboss/tools/cdi/deltaspike/core/test/DeltaspikeBeansTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/cdi/tests/org.jboss.tools.cdi.deltaspike.core.test/src/org/jboss/tools/cdi/deltaspike/core/test/DeltaspikeCoreAllTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.deltaspike.core.test/src/org/jboss/tools/cdi/deltaspike/core/test/DeltaspikeCoreAllTests.java 2012-05-25 19:23:06 UTC (rev 41438)
+++ trunk/cdi/tests/org.jboss.tools.cdi.deltaspike.core.test/src/org/jboss/tools/cdi/deltaspike/core/test/DeltaspikeCoreAllTests.java 2012-05-25 19:25:16 UTC (rev 41439)
@@ -34,6 +34,7 @@
TestSuite suiteAll = new TestSuite("Deltasipke Core Tests");
TestSuite suite = new TestSuite("Deltaspike Core Project Tests");
+ suite.addTestSuite(DeltaspikeBeansTest.class);
suite.addTestSuite(DeltaspikeValidationTest.class);
suiteAll.addTest(new DeltaspikeCoreTestSetup(suite));
Modified: trunk/cdi/tests/org.jboss.tools.cdi.deltaspike.core.test/src/org/jboss/tools/cdi/deltaspike/core/test/DeltaspikeCoreTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.deltaspike.core.test/src/org/jboss/tools/cdi/deltaspike/core/test/DeltaspikeCoreTest.java 2012-05-25 19:23:06 UTC (rev 41438)
+++ trunk/cdi/tests/org.jboss.tools.cdi.deltaspike.core.test/src/org/jboss/tools/cdi/deltaspike/core/test/DeltaspikeCoreTest.java 2012-05-25 19:25:16 UTC (rev 41439)
@@ -23,4 +23,5 @@
protected IProject getTestProject() throws Exception {
return ResourcesPlugin.getWorkspace().getRoot().getProject(DeltaspikeCoreTestSetup.PROJECT_NAME);
}
+
}
\ No newline at end of file
Modified: trunk/cdi/tests/org.jboss.tools.cdi.deltaspike.core.test/src/org/jboss/tools/cdi/deltaspike/core/test/validation/DeltaspikeValidationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.deltaspike.core.test/src/org/jboss/tools/cdi/deltaspike/core/test/validation/DeltaspikeValidationTest.java 2012-05-25 19:23:06 UTC (rev 41438)
+++ trunk/cdi/tests/org.jboss.tools.cdi.deltaspike.core.test/src/org/jboss/tools/cdi/deltaspike/core/test/validation/DeltaspikeValidationTest.java 2012-05-25 19:25:16 UTC (rev 41439)
@@ -10,7 +10,12 @@
******************************************************************************/
package org.jboss.tools.cdi.deltaspike.core.test.validation;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.osgi.util.NLS;
import org.jboss.tools.cdi.deltaspike.core.test.DeltaspikeCoreTest;
+import org.jboss.tools.cdi.deltaspike.core.validation.DeltaspikeValidationMessages;
+import org.jboss.tools.cdi.internal.core.validation.CDIValidationMessages;
+import org.jboss.tools.tests.AbstractResourceMarkerTest;
/**
* @author Alexey Kazakov
@@ -20,4 +25,36 @@
public void testValidation() throws Exception {
// TODO
}
+
+ public void testConfigPropertyValidation() throws Exception {
+ IFile file = getTestProject().getFile("src/deltaspike/config/SettingsBean.java"); //$NON-NLS-1$
+
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, CDIValidationMessages.UNSATISFIED_INJECTION_POINTS, 8);
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, CDIValidationMessages.UNSATISFIED_INJECTION_POINTS, 12);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, CDIValidationMessages.UNSATISFIED_INJECTION_POINTS, 16);
+ }
+
+ public void testHandlerValidation() throws Exception {
+ IFile file = getTestProject().getFile("src/deltaspike/handler/MyHandlers.java"); //$NON-NLS-1$
+
+ AbstractResourceMarkerTest.assertMarkerIsNotCreated(file, DeltaspikeValidationMessages.INVALID_HANDLER_TYPE, 13);
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, DeltaspikeValidationMessages.INVALID_HANDLER_TYPE, 16);
+ }
+
+ public void testSecurityValidation() throws Exception {
+ IFile file = getTestProject().getFile("src/deltaspike/security/CustomAuthorizer.java"); //$NON-NLS-1$
+
+ String message = NLS.bind(DeltaspikeValidationMessages.INVALID_AUTHORIZER_NOT_BOOLEAN, "check3"); //$NON-NLS-1$
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, message, 25);
+
+ message = NLS.bind(DeltaspikeValidationMessages.INVALID_AUTHORIZER_NO_BINDINGS, "check4"); //$NON-NLS-1$
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, message, 30);
+
+ file = getTestProject().getFile("src/deltaspike/security/SecuredBean1.java"); //$NON-NLS-1$
+ message = NLS.bind(DeltaspikeValidationMessages.AMBIGUOUS_AUTHORIZER, "deltaspike.security.CustomSecurityBinding", "doSomething2"); //$NON-NLS-1$ //$NON-NLS-2$
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, message, 24);
+
+ message = NLS.bind(DeltaspikeValidationMessages.UNRESOLVED_AUTHORIZER, "deltaspike.security.CustomSecurityBinding", "doSomething3"); //$NON-NLS-1$ //$NON-NLS-2$
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, message, 29);
+ }
}
\ No newline at end of file
12 years, 8 months
JBoss Tools SVN: r41438 - in trunk/cdi/plugins/org.jboss.tools.cdi.deltaspike.core: src/org/jboss/tools/cdi/deltaspike/core and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-05-25 15:23:06 -0400 (Fri, 25 May 2012)
New Revision: 41438
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.deltaspike.core/META-INF/MANIFEST.MF
trunk/cdi/plugins/org.jboss.tools.cdi.deltaspike.core/src/org/jboss/tools/cdi/deltaspike/core/DeltaspikeSecurityExtension.java
Log:
JBIDE-11552
https://issues.jboss.org/browse/JBIDE-11552
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.deltaspike.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.deltaspike.core/META-INF/MANIFEST.MF 2012-05-25 19:09:56 UTC (rev 41437)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.deltaspike.core/META-INF/MANIFEST.MF 2012-05-25 19:23:06 UTC (rev 41438)
@@ -20,5 +20,6 @@
org.eclipse.jdt.core;bundle-version="3.7.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Export-Package: org.jboss.tools.cdi.deltaspike.core
+Export-Package: org.jboss.tools.cdi.deltaspike.core,
+ org.jboss.tools.cdi.deltaspike.core.validation
Bundle-Vendor: JBoss by Red Hat
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.deltaspike.core/src/org/jboss/tools/cdi/deltaspike/core/DeltaspikeSecurityExtension.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.deltaspike.core/src/org/jboss/tools/cdi/deltaspike/core/DeltaspikeSecurityExtension.java 2012-05-25 19:09:56 UTC (rev 41437)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.deltaspike.core/src/org/jboss/tools/cdi/deltaspike/core/DeltaspikeSecurityExtension.java 2012-05-25 19:23:06 UTC (rev 41438)
@@ -27,7 +27,6 @@
import org.jboss.tools.cdi.core.IRootDefinitionContext;
import org.jboss.tools.cdi.core.IStereotypeDeclaration;
import org.jboss.tools.cdi.core.extension.ICDIExtension;
-import org.jboss.tools.cdi.core.extension.IDefinitionContextExtension;
import org.jboss.tools.cdi.core.extension.feature.IBuildParticipantFeature;
import org.jboss.tools.cdi.core.extension.feature.IProcessAnnotatedMemberFeature;
import org.jboss.tools.cdi.core.extension.feature.IProcessAnnotatedTypeFeature;
@@ -61,7 +60,7 @@
}
@Override
- public IDefinitionContextExtension getContext() {
+ public DeltaspikeSecurityDefinitionContext getContext() {
return context;
}
@@ -97,7 +96,7 @@
contextCopy.allAuthorizerMethods.getAuthorizerMembers().add(authorizer);
List<SecurityBindingDeclaration> ds = findAnnotationAnnotatedWithSecurityBindingType(memberDefinition, contextCopy.getRootContext());
for (SecurityBindingDeclaration d: ds) {
- DeltaspikeSecurityBindingConfiguration c = ((DeltaspikeSecurityDefinitionContext)this.context.getWorkingCopy()).getConfiguration(d.getBinding().getTypeName());
+ DeltaspikeSecurityBindingConfiguration c = contextCopy.getConfiguration(d.getBinding().getTypeName());
authorizer.addBinding(d, c);
c.getAuthorizerMembers().add(authorizer);
addToDependencies(c, authorizer.getMethod(), context);
@@ -300,8 +299,7 @@
public static Set<DeltaspikeAuthorityMethod> collectAuthorizerMethods(Set<DeltaspikeSecurityExtension> parents, String securityBindingTypeName) {
Set<DeltaspikeAuthorityMethod> result = new HashSet<DeltaspikeAuthorityMethod>();
for (DeltaspikeSecurityExtension ext: parents) {
- DeltaspikeSecurityDefinitionContext context = (DeltaspikeSecurityDefinitionContext)ext.getContext();
- DeltaspikeSecurityBindingConfiguration c = context.getConfiguration(securityBindingTypeName);
+ DeltaspikeSecurityBindingConfiguration c = ext.getContext().getConfiguration(securityBindingTypeName);
if(c != null) {
result.addAll(c.getAuthorizerMembers());
}
12 years, 8 months
JBoss Tools SVN: r41437 - in trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui: wizard and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-05-25 15:09:56 -0400 (Fri, 25 May 2012)
New Revision: 41437
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/job/AbstractDelegatingMonitorJob.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/job/CreateApplicationJob.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/job/WaitForApplicationJob.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java
Log:
[JBIDE-11314] added error dialog to report that operation timeouted
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/job/AbstractDelegatingMonitorJob.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/job/AbstractDelegatingMonitorJob.java 2012-05-25 18:01:49 UTC (rev 41436)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/job/AbstractDelegatingMonitorJob.java 2012-05-25 19:09:56 UTC (rev 41437)
@@ -20,6 +20,8 @@
*/
public abstract class AbstractDelegatingMonitorJob extends Job {
+ public static final int TIMEOUTED_CANCELLED = 1;
+
protected DelegatingProgressMonitor delegatingMonitor;
public AbstractDelegatingMonitorJob(String name) {
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/job/CreateApplicationJob.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/job/CreateApplicationJob.java 2012-05-25 18:01:49 UTC (rev 41436)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/job/CreateApplicationJob.java 2012-05-25 19:09:56 UTC (rev 41437)
@@ -37,8 +37,6 @@
*/
public class CreateApplicationJob extends AbstractDelegatingMonitorJob {
- public static final int TIMEOUTED_CANCELLED = 1;
-
private UserDelegate user;
private String name;
private ICartridge cartridge;
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/job/WaitForApplicationJob.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/job/WaitForApplicationJob.java 2012-05-25 18:01:49 UTC (rev 41436)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/job/WaitForApplicationJob.java 2012-05-25 19:09:56 UTC (rev 41437)
@@ -32,9 +32,8 @@
*/
public class WaitForApplicationJob extends AbstractDelegatingMonitorJob {
- public static final int TIMEOUTED_CANCELLED = 1;
-
- private static final int APP_REACHABLE_TIMEOUT = 180 * 1000;
+ private static final int APP_REACHABLE_TIMEOUT = 1 * 60 * 1000;
+
private IApplication application;
private Shell shell;
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java 2012-05-25 18:01:49 UTC (rev 41436)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/OpenShiftExpressApplicationWizard.java 2012-05-25 19:09:56 UTC (rev 41437)
@@ -145,26 +145,19 @@
if (!useExistingApp) {
IStatus status = createApplication();
- if (JobUtils.isCancel(status)
- && CreateApplicationJob.TIMEOUTED_CANCELLED == status.getCode()) {
- getContainer().getShell().close();
- } else if (!JobUtils.isOk(status)) {
- safeRefreshUser();
+ if(!processStatus("Creating the application", status)) {
return false;
}
-
+
status = waitForApplication(wizardModel.getApplication());
- if (JobUtils.isCancel(status)
- && WaitForApplicationJob.TIMEOUTED_CANCELLED == status.getCode()) {
- getContainer().getShell().close();
- } else if (!JobUtils.isOk(status)) {
- safeRefreshUser();
+ if(!processStatus("Waiting to become reachable", status)) {
return false;
}
-
+
if (!addRemoveCartridges(
- getWizardModel().getApplication(), getWizardModel().getSelectedEmbeddableCartridges())) {
- return false;
+ getWizardModel().getApplication(),
+ getWizardModel().getSelectedEmbeddableCartridges())) {
+ return false;
}
}
@@ -176,6 +169,26 @@
return useExistingApp;
}
+ private boolean processStatus(String operation, IStatus status) {
+ if (JobUtils.isCancel(status)) {
+ if (AbstractDelegatingMonitorJob.TIMEOUTED_CANCELLED == status.getCode()) {
+ getContainer().getShell().close();
+ } else {
+ new ErrorDialog(getShell(),
+ NLS.bind("{0} was cancelled", operation),
+ NLS.bind("{0} timeouted and was canceled", operation),
+ status,
+ IStatus.ERROR | IStatus.WARNING | IStatus.CANCEL | IStatus.INFO)
+ .open();
+ return true;
+ }
+ } else if (!JobUtils.isOk(status)) {
+ safeRefreshUser();
+ return false;
+ }
+ return true;
+ }
+
private IStatus waitForApplication(IApplication application) {
try {
AbstractDelegatingMonitorJob job = new WaitForApplicationJob(application, getShell());
12 years, 8 months
JBoss Tools SVN: r41436 - in trunk/esb/tests/org.jboss.tools.esb.ui.bot.test: src/org/jboss/tools/esb/ui/bot/tests and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: ldimaggio
Date: 2012-05-25 14:01:49 -0400 (Fri, 25 May 2012)
New Revision: 41436
Modified:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/pom.xml
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/Editing.java
Log:
Moved timeout back to 2 hours - shortened sleep statements from editing test
Modified: trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/pom.xml
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/pom.xml 2012-05-25 17:36:42 UTC (rev 41435)
+++ trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/pom.xml 2012-05-25 18:01:49 UTC (rev 41436)
@@ -29,7 +29,7 @@
<skip>${swtbot.test.skip}</skip>
<testSuite>org.jboss.tools.esb.ui.bot.test</testSuite>
<testClass>org.jboss.tools.esb.ui.bot.tests.ESBAllBotTests</testClass>
- <forkedProcessTimeoutInSeconds>10800</forkedProcessTimeoutInSeconds>
+ <forkedProcessTimeoutInSeconds>7200</forkedProcessTimeoutInSeconds>
</configuration>
</plugin>
</plugins>
Modified: trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/Editing.java
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/Editing.java 2012-05-25 17:36:42 UTC (rev 41435)
+++ trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/Editing.java 2012-05-25 18:01:49 UTC (rev 41436)
@@ -97,7 +97,7 @@
try {
log.info("Invoke " + m.getName());
ESBProvider action = (ESBProvider) m.invoke(null, new Object[]{});
- bot.sleep(60000l);
+ bot.sleep(TIME_5S);
action.create(getEditor(), actionPath);
providerList.remove(action.getMenuLabel());
bot.sleep(TIME_1S);
12 years, 8 months
JBoss Tools SVN: r41435 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-05-25 13:36:42 -0400 (Fri, 25 May 2012)
New Revision: 41435
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.properties
Log:
[JBIDE-11237] shortened the message to the bare minimum since it is not displayed in the wizard any more. The wizard will present you a dialog that allows you to keep on waiting or to close the wizard. You may catch it in the log though.
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.properties
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.properties 2012-05-25 17:01:48 UTC (rev 41434)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/messages/OpenShiftExpressUIMessages.properties 2012-05-25 17:36:42 UTC (rev 41435)
@@ -3,12 +3,7 @@
COULD_NOT_CREATE_APPLICATION=Could not create application "{0}"
OPERATION_CANCELLED=Operation was cancelled by user.
WAITING_FOR_REACHABLE=Waiting for application "{0}" to become reachable...
-APPLICATION_NOT_ANSWERING=The application "{0}" did not answer in a reasonable amount of time. \
-This can happen periodically and will just take an extra minute or two to propagate depending on where you are in the world.\n\
-Once you are able to access your application in a browser, you can then clone your git repository.\n\
-If you can''t get your application running in the browser, you can also try destroying and recreating the application as well using this Wizard.\n\n\
-If this doesn''t work for you, let us know in the forums or in IRC and we''ll make sure to get you up and running.\n\nForums\: \
-https\://www.redhat.com/openshift/forums/express\n\nIRC\: \#openshift (on Freenode)
+APPLICATION_NOT_ANSWERING=The application "{0}" did not answer in a reasonable amount of time.
APPLICATION_NOT_ANSWERING_CONTINUE_WAITING=Application "{0}" did not answer so far.\n\nDo you want to continue to wait for it?
BTN_KEEP_WAITING=Keep waiting
BTN_CLOSE_WIZARD=Close wizard
12 years, 8 months