JBoss Tools SVN: r37813 - in trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test: wizard and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-01-13 04:29:02 -0500 (Fri, 13 Jan 2012)
New Revision: 37813
Added:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CDISupportTest.java
Removed:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CDIProjectWithDynamicWizardTest.java
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDISmokeBotTests.java
Log:
Renaming of CDIProjectWithDynamicWizardTest to CDISupportTest
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java 2012-01-13 09:22:54 UTC (rev 37812)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java 2012-01-13 09:29:02 UTC (rev 37813)
@@ -30,7 +30,7 @@
import org.jboss.tools.cdi.bot.test.seam3.Seam3GenericOpenOnTest;
import org.jboss.tools.cdi.bot.test.seam3.Seam3ResourceOpenOnTest;
import org.jboss.tools.cdi.bot.test.uiutils.SWTEclipseCDIExtUtil;
-import org.jboss.tools.cdi.bot.test.wizard.CDIProjectWithDynamicWizardTest;
+import org.jboss.tools.cdi.bot.test.wizard.CDISupportTest;
import org.jboss.tools.cdi.bot.test.wizard.ConfigurationPresetTest;
import org.jboss.tools.cdi.bot.test.wizard.FacetTest;
import org.jboss.tools.cdi.bot.test.wizard.WizardTest;
@@ -66,7 +66,7 @@
// PerspectiveTest.class,
ConfigurationPresetTest.class,
FacetTest.class,
- CDIProjectWithDynamicWizardTest.class,
+ CDISupportTest.class,
WizardTest.class,
BeansEditorTest.class,
NamedRefactoringTest.class,
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDISmokeBotTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDISmokeBotTests.java 2012-01-13 09:22:54 UTC (rev 37812)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDISmokeBotTests.java 2012-01-13 09:29:02 UTC (rev 37813)
@@ -12,7 +12,7 @@
import org.jboss.tools.cdi.bot.test.editor.BeansEditorTest;
import org.jboss.tools.cdi.bot.test.uiutils.SWTEclipseCDIExtUtil;
-import org.jboss.tools.cdi.bot.test.wizard.CDIProjectWithDynamicWizardTest;
+import org.jboss.tools.cdi.bot.test.wizard.CDISupportTest;
import org.jboss.tools.cdi.bot.test.wizard.WizardTest;
import org.jboss.tools.cdi.bot.test.wizard.ConfigurationPresetTest;
import org.jboss.tools.cdi.bot.test.wizard.FacetTest;
@@ -44,10 +44,10 @@
*/
@RunWith(RequirementAwareSuite.class)
@SuiteClasses({
- //PerspectiveTest.class,
+// PerspectiveTest.class,
ConfigurationPresetTest.class,
FacetTest.class,
- CDIProjectWithDynamicWizardTest.class,
+ CDISupportTest.class,
WizardTest.class,
BeansEditorTest.class,
})
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CDIProjectWithDynamicWizardTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CDIProjectWithDynamicWizardTest.java 2012-01-13 09:22:54 UTC (rev 37812)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CDIProjectWithDynamicWizardTest.java 2012-01-13 09:29:02 UTC (rev 37813)
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 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.bot.test.wizard;
-
-import org.jboss.tools.cdi.bot.test.CDIAllBotTests;
-import org.jboss.tools.cdi.bot.test.CDISmokeBotTests;
-import org.jboss.tools.cdi.bot.test.CDITestBase;
-import org.junit.Test;
-import org.junit.runners.Suite.SuiteClasses;
-
-@SuiteClasses({ CDIAllBotTests.class , CDISmokeBotTests.class })
-public class CDIProjectWithDynamicWizardTest extends CDITestBase {
-
- @Override
- public void checkAndCreateProject() {
- if (!projectHelper.projectExists(getProjectName())) {
- projectHelper.createCDIProjectWithDynamicWizard(getProjectName());
- }
- }
-
- @Override
- public String getProjectName() {
- return "CDIDynamicWizardProject";
- }
-
- @Test
- public void testDynamicWizard() {
- if (projectHelper.projectExists(getProjectName())) {
- LOGGER.info("CDI project was sucessfully created by Dynamic Web Project wizard");
- assertTrue(projectHelper.checkCDISupport(getProjectName()));
- LOGGER.info("Project has correctly set CDI support");
- } else {
- fail("CDI project was not succesfully created with Dynamic Web Project wizard");
- }
-
- }
-
-}
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CDISupportTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CDISupportTest.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CDISupportTest.java 2012-01-13 09:29:02 UTC (rev 37813)
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.bot.test.wizard;
+
+import org.jboss.tools.cdi.bot.test.CDIAllBotTests;
+import org.jboss.tools.cdi.bot.test.CDISmokeBotTests;
+import org.jboss.tools.cdi.bot.test.CDITestBase;
+import org.junit.Test;
+import org.junit.runners.Suite.SuiteClasses;
+
+@SuiteClasses({ CDIAllBotTests.class , CDISmokeBotTests.class })
+public class CDISupportTest extends CDITestBase {
+
+ @Override
+ public void checkAndCreateProject() {
+ if (!projectHelper.projectExists(getProjectName())) {
+ projectHelper.createCDIProjectWithDynamicWizard(getProjectName());
+ }
+ }
+
+ @Override
+ public String getProjectName() {
+ return "CDIDynamicWizardProject";
+ }
+
+ @Test
+ public void testDynamicWizard() {
+ if (projectHelper.projectExists(getProjectName())) {
+ LOGGER.info("CDI project was sucessfully created by Dynamic Web Project wizard");
+ assertTrue(projectHelper.checkCDISupport(getProjectName()));
+ LOGGER.info("Project has correctly set CDI support");
+ } else {
+ fail("CDI project was not succesfully created with Dynamic Web Project wizard");
+ }
+
+ }
+
+}
12 years, 12 months
JBoss Tools SVN: r37812 - trunk/cdi/tests/org.jboss.tools.cdi.bot.test/launchers.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-01-13 04:22:54 -0500 (Fri, 13 Jan 2012)
New Revision: 37812
Added:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/launchers/CDIAllBotTestsMaven.launch
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/launchers/CDISeam3AllBotTestsMaven.launch
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/launchers/CDISmokeBotTestsMaven.launch
Log:
Maven launcher for cdi test suites added
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/launchers/CDIAllBotTestsMaven.launch
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/launchers/CDIAllBotTestsMaven.launch (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/launchers/CDIAllBotTestsMaven.launch 2012-01-13 09:22:54 UTC (rev 37812)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.m2e.Maven2LaunchConfigurationType">
+<booleanAttribute key="M2_DEBUG_OUTPUT" value="false"/>
+<stringAttribute key="M2_GOALS" value="clean install"/>
+<booleanAttribute key="M2_NON_RECURSIVE" value="false"/>
+<booleanAttribute key="M2_OFFLINE" value="false"/>
+<stringAttribute key="M2_PROFILES" value=""/>
+<listAttribute key="M2_PROPERTIES">
+<listEntry value="swtbot.test.skip=false"/>
+<listEntry value="swtbot.properties=/home/jjankovi/swtbot.properties"/>
+</listAttribute>
+<stringAttribute key="M2_RUNTIME" value="EMBEDDED"/>
+<booleanAttribute key="M2_SKIP_TESTS" value="false"/>
+<booleanAttribute key="M2_UPDATE_SNAPSHOTS" value="false"/>
+<booleanAttribute key="M2_WORKSPACE_RESOLUTION" value="false"/>
+<mapAttribute key="org.eclipse.debug.core.environmentVariables">
+<mapEntry key="DISPLAY" value=":1"/>
+</mapAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_29"/>
+<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc:/org.jboss.tools.cdi.bot.test}"/>
+</launchConfiguration>
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/launchers/CDISeam3AllBotTestsMaven.launch
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/launchers/CDISeam3AllBotTestsMaven.launch (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/launchers/CDISeam3AllBotTestsMaven.launch 2012-01-13 09:22:54 UTC (rev 37812)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.m2e.Maven2LaunchConfigurationType">
+<booleanAttribute key="M2_DEBUG_OUTPUT" value="false"/>
+<stringAttribute key="M2_GOALS" value="clean install"/>
+<booleanAttribute key="M2_NON_RECURSIVE" value="false"/>
+<booleanAttribute key="M2_OFFLINE" value="false"/>
+<stringAttribute key="M2_PROFILES" value="-P seam3-bot-tests"/>
+<listAttribute key="M2_PROPERTIES">
+<listEntry value="swtbot.test.skip=false"/>
+<listEntry value="swtbot.properties=/home/jjankovi/swtbot.properties"/>
+</listAttribute>
+<stringAttribute key="M2_RUNTIME" value="EMBEDDED"/>
+<booleanAttribute key="M2_SKIP_TESTS" value="false"/>
+<booleanAttribute key="M2_UPDATE_SNAPSHOTS" value="false"/>
+<booleanAttribute key="M2_WORKSPACE_RESOLUTION" value="false"/>
+<mapAttribute key="org.eclipse.debug.core.environmentVariables">
+<mapEntry key="DISPLAY" value=":1"/>
+</mapAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_29"/>
+<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc:/org.jboss.tools.cdi.bot.test}"/>
+</launchConfiguration>
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/launchers/CDISmokeBotTestsMaven.launch
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/launchers/CDISmokeBotTestsMaven.launch (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/launchers/CDISmokeBotTestsMaven.launch 2012-01-13 09:22:54 UTC (rev 37812)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.m2e.Maven2LaunchConfigurationType">
+<booleanAttribute key="M2_DEBUG_OUTPUT" value="false"/>
+<stringAttribute key="M2_GOALS" value="clean install"/>
+<booleanAttribute key="M2_NON_RECURSIVE" value="false"/>
+<booleanAttribute key="M2_OFFLINE" value="false"/>
+<stringAttribute key="M2_PROFILES" value="-P smoke-bot-tests"/>
+<listAttribute key="M2_PROPERTIES">
+<listEntry value="swtbot.test.skip=false"/>
+<listEntry value="swtbot.properties=/home/jjankovi/swtbot.properties"/>
+</listAttribute>
+<stringAttribute key="M2_RUNTIME" value="EMBEDDED"/>
+<booleanAttribute key="M2_SKIP_TESTS" value="false"/>
+<booleanAttribute key="M2_UPDATE_SNAPSHOTS" value="false"/>
+<booleanAttribute key="M2_WORKSPACE_RESOLUTION" value="false"/>
+<mapAttribute key="org.eclipse.debug.core.environmentVariables">
+<mapEntry key="DISPLAY" value=":1"/>
+</mapAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_29"/>
+<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc:/org.jboss.tools.cdi.bot.test}"/>
+</launchConfiguration>
12 years, 12 months
JBoss Tools SVN: r37811 - in trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/quickfix: qualifier and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-01-13 04:21:51 -0500 (Fri, 13 Jan 2012)
New Revision: 37811
Added:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/quickfix/interceptorBinding/IBindingWithStringArray.java.cdi
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/quickfix/qualifier/QualifierWithStringArray.java.cdi
Log:
New resources for quickfix tests added
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/quickfix/interceptorBinding/IBindingWithStringArray.java.cdi
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/quickfix/interceptorBinding/IBindingWithStringArray.java.cdi (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/quickfix/interceptorBinding/IBindingWithStringArray.java.cdi 2012-01-13 09:21:51 UTC (rev 37811)
@@ -0,0 +1,23 @@
+package cdi;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.interceptor.InterceptorBinding;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@InterceptorBinding
+@Inherited
+@Target({ TYPE, METHOD })
+@Retention(RUNTIME)
+@Documented
+public @interface IBindingComponent {
+
+ String[] value();
+
+}
\ No newline at end of file
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/quickfix/qualifier/QualifierWithStringArray.java.cdi
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/quickfix/qualifier/QualifierWithStringArray.java.cdi (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/quickfix/qualifier/QualifierWithStringArray.java.cdi 2012-01-13 09:21:51 UTC (rev 37811)
@@ -0,0 +1,23 @@
+package cdi;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Qualifier
+@Target({ TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+public @interface QualifierComponent {
+
+ String[] value();
+
+}
12 years, 12 months
JBoss Tools SVN: r37810 - trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test.
by jbosstools-commits@lists.jboss.org
Author: jpeterka
Date: 2012-01-13 03:30:18 -0500 (Fri, 13 Jan 2012)
New Revision: 37810
Modified:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/pom.xml
Log:
pom for bot test update
Modified: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/pom.xml
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/pom.xml 2012-01-13 07:36:48 UTC (rev 37809)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/pom.xml 2012-01-13 08:30:18 UTC (rev 37810)
@@ -8,6 +8,19 @@
</parent>
<groupId>org.jboss.tools.hibernatetools.tests</groupId>
<artifactId>org.jboss.tools.hibernate.ui.bot.test</artifactId>
-
- <packaging>eclipse-plugin</packaging>
+
+ <packaging>eclipse-test-plugin</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <configuration>
+ <useUIThread>false</useUIThread>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</project>
12 years, 12 months
JBoss Tools SVN: r37809 - in trunk: openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-01-13 02:36:48 -0500 (Fri, 13 Jan 2012)
New Revision: 37809
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/JBossServer.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressServer.java
Log:
JBIDE-10514 - recent change caused a regression for run on server. (Changed heirarchy of ExpressServer, forgot to implement IURLProvider)
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-01-13 07:11:12 UTC (rev 37808)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossLaunchAdapter.java 2012-01-13 07:36:48 UTC (rev 37809)
@@ -76,8 +76,8 @@
public Object getLaunchable(IServer server, IModuleArtifact moduleObject) {
if (server != null) {
ServerDelegate delegate = (ServerDelegate)server.loadAdapter(ServerDelegate.class,null);
- if (!(delegate instanceof JBossServer ))
- return null;
+// if (!(delegate instanceof JBossServer ))
+// return null;
if ((moduleObject instanceof Servlet) ||(moduleObject instanceof WebResource))
return prepareHttpLaunchable(moduleObject, delegate, server);
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-01-13 07:11:12 UTC (rev 37808)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java 2012-01-13 07:36:48 UTC (rev 37809)
@@ -210,17 +210,19 @@
}
public URL getModuleRootURL(IModule module) {
+ return getModuleRootURL(module, getHost(), getJBossWebPort());
+ }
+
+ public static URL getModuleRootURL(IModule module, String host, int port) {
if (module == null || module.loadAdapter(IWebModule.class,null)==null )
return null;
IWebModule webModule =(IWebModule)module.loadAdapter(IWebModule.class,null);
- String host = getHost();
String url = host;
if( !url.startsWith("http://") && !url.startsWith("https://") ) { //$NON-NLS-1$ //$NON-NLS-2$
url = "http://"+host; //$NON-NLS-1$
}
- int port = getJBossWebPort();
if (port != 80)
url += ":" + port; //$NON-NLS-1$
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressServer.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressServer.java 2012-01-13 07:11:12 UTC (rev 37808)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressServer.java 2012-01-13 07:36:48 UTC (rev 37809)
@@ -10,17 +10,21 @@
*******************************************************************************/
package org.jboss.tools.openshift.express.internal.core.behaviour;
+import java.net.URL;
+
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
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.model.ServerDelegate;
+import org.eclipse.wst.server.core.model.IURLProvider;
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
import org.jboss.ide.eclipse.as.wtp.core.util.ServerModelUtilities;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
-public class ExpressServer extends ServerDelegate {
+public class ExpressServer extends ServerDelegate implements IURLProvider {
public void setDefaults(IProgressMonitor monitor) {
super.setDefaults(monitor);
setAttribute(IDeployableServer.SERVER_MODE, ExpressBehaviourDelegate.OPENSHIFT_ID);
@@ -33,6 +37,9 @@
// Can only add a module if the server has zero, and even then, can only add 1.
IModule[] mods = getServer().getModules();
+ if( mods.length == 1 && add.length == 1 && add[0].equals(mods[0]))
+ return Status.OK_STATUS;
+
boolean canModify = mods.length == 0 && add.length == 1;
canModify &= remove.length == 0;
return canModify ? Status.OK_STATUS : new Status(IStatus.ERROR,
@@ -57,4 +64,8 @@
IProgressMonitor monitor) throws CoreException {
}
+ @Override
+ public URL getModuleRootURL(IModule module) {
+ return JBossServer.getModuleRootURL(module, getServer().getHost(), 80);
+ }
}
12 years, 12 months
JBoss Tools SVN: r37808 - in trunk: as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration and 8 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-01-13 02:11:12 -0500 (Fri, 13 Jan 2012)
New Revision: 37808
Added:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressServer.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DelegatingServerBehavior.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/JMXProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/UIUtil.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.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/util/ServerModelUtilities.java
trunk/openshift/plugins/org.jboss.tools.openshift.egit.core/src/org/jboss/tools/openshift/egit/core/EGitUtils.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressBehaviour.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressBehaviourDelegate.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressMessages.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/expressMessages.properties
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ConsoleUtils.java
Log:
A sloppy mix of JBIDE-10580 and JBIDE-10527 and JBIDE-10544
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DelegatingServerBehavior.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DelegatingServerBehavior.java 2012-01-13 01:23:53 UTC (rev 37807)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DelegatingServerBehavior.java 2012-01-13 07:11:12 UTC (rev 37808)
@@ -16,6 +16,7 @@
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.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.IServer;
@@ -26,11 +27,11 @@
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
import org.jboss.ide.eclipse.as.core.server.IJBossServerPublishMethod;
import org.jboss.ide.eclipse.as.core.server.IJBossServerPublishMethodType;
+import org.jboss.ide.eclipse.as.core.server.internal.BehaviourModel.Behaviour;
import org.jboss.ide.eclipse.as.core.server.internal.BehaviourModel.BehaviourImpl;
import org.jboss.ide.eclipse.as.core.server.internal.launch.DelegatingStartLaunchConfiguration;
import org.jboss.ide.eclipse.as.core.server.xpl.PublishCopyUtil.IPublishCopyCallbackHandler;
import org.jboss.ide.eclipse.as.core.util.DeploymentPreferenceLoader;
-import org.jboss.ide.eclipse.as.core.util.LaunchCommandPreferences;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
import org.jboss.ide.eclipse.as.wtp.core.util.ServerModelUtilities;
@@ -54,12 +55,16 @@
if( id.equals(lastModeId) && delegate != null && delegate.getBehaviourTypeId().equals(id))
return delegate;
- BehaviourImpl impl = BehaviourModel.getModel().getBehaviour(getServer().getServerType().getId()).getImpl(id);
- IJBossBehaviourDelegate d = impl.createBehaviourDelegate();
- d.setActualBehaviour(this);
- lastModeId = id;
- delegate = d;
- return delegate;
+ Behaviour b = BehaviourModel.getModel().getBehaviour(getServer().getServerType().getId());
+ BehaviourImpl impl = b.getImpl(id);
+ if( impl != null ) {
+ IJBossBehaviourDelegate d = impl.createBehaviourDelegate();
+ d.setActualBehaviour(this);
+ lastModeId = id;
+ delegate = d;
+ return delegate;
+ }
+ return null;
}
public void stop(boolean force) {
@@ -148,7 +153,9 @@
}
protected IStatus canChangeState(String launchMode) {
- return getDelegate().canChangeState(launchMode);
+ if( getDelegate() != null )
+ return getDelegate().canChangeState(launchMode);
+ return Status.CANCEL_STATUS;
}
public boolean canRestartModule(IModule[] module){
@@ -176,6 +183,7 @@
@Override
public void dispose() {
- getDelegate().dispose();
+ if( getDelegate() != null )
+ getDelegate().dispose();
}
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java 2012-01-13 01:23:53 UTC (rev 37807)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java 2012-01-13 07:11:12 UTC (rev 37808)
@@ -10,17 +10,13 @@
******************************************************************************/
package org.jboss.ide.eclipse.as.core.server.internal;
-import java.util.ArrayList;
-
import org.eclipse.core.runtime.CoreException;
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.wst.server.core.IModule;
import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.IServerWorkingCopy;
import org.eclipse.wst.server.core.ServerPort;
import org.eclipse.wst.server.core.model.ServerDelegate;
@@ -66,8 +62,8 @@
public IModule[] getRootModules(IModule module) throws CoreException {
IStatus status = canModifyModules(new IModule[] { module }, null);
if (status != null && !status.isOK())
- throw new CoreException(status);;
- IModule[] parents = doGetParentModules(module);
+ throw new CoreException(status);
+ IModule[] parents = ServerModelUtilities.getParentModules(getServer(), module);
if(parents.length>0)
return parents;
return new IModule[] { module };
@@ -77,23 +73,6 @@
return ServerModelUtilities.getChildModules(module);
}
- private IModule[] doGetParentModules(IModule module) {
- // get all supported modules
- IModule[] supported =
- org.eclipse.wst.server.core.ServerUtil.getModules(
- getServer().getServerType().getRuntimeType().getModuleTypes());
- ArrayList<IModule> list = new ArrayList<IModule>();
-
- for( int i = 0; i < supported.length; i++ ) {
- IModule[] childs = ServerModelUtilities.getChildModules(supported[i]);
- for (int j = 0; j < childs.length; j++) {
- if(childs[j].equals(module))
- list.add(supported[i]);
- }
- }
- return list.toArray(new IModule[list.size()]);
- }
-
public ServerPort[] getServerPorts() {
return new ServerPort[0];
}
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-01-13 01:23:53 UTC (rev 37807)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/JMXProvider.java 2012-01-13 07:11:12 UTC (rev 37808)
@@ -23,9 +23,7 @@
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.navigator.CommonActionProvider;
@@ -38,9 +36,9 @@
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.ui.internal.view.servers.AbstractServerAction;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
-import org.jboss.ide.eclipse.as.core.util.ServerConverter;
import org.jboss.ide.eclipse.as.core.util.ServerUtil;
import org.jboss.ide.eclipse.as.ui.JBossServerUISharedImages;
+import org.jboss.ide.eclipse.as.ui.UIUtil;
import org.jboss.tools.jmx.core.ExtensionManager;
import org.jboss.tools.jmx.core.IConnectionWrapper;
import org.jboss.tools.jmx.ui.internal.views.navigator.JMXNavigator;
@@ -113,36 +111,30 @@
}
public void perform(final IServer server) {
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow() ;
- if (window != null) {
- IWorkbenchPage page = window.getActivePage();
- if (page != null) {
- IWorkbenchPart part = page.findView(JMXNavigator.VIEW_ID);
- if (part == null) {
- try {
- part = page.showView(JMXNavigator.VIEW_ID);
- } catch (PartInitException e) {
+ IWorkbenchPart part = null;
+ try {
+ part = UIUtil.bringViewToFront(JMXNavigator.VIEW_ID);
+ } catch(PartInitException pie) {
+ // TODO trace or error
+ }
+
+ if( part != null ) {
+ final JMXNavigator view = (JMXNavigator) part.getAdapter(JMXNavigator.class);
+ if (view != null) {
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ JBossServerConnectionProvider provider =
+ (JBossServerConnectionProvider)ExtensionManager.getProvider(
+ JBossServerConnectionProvider.PROVIDER_ID);
+ IConnectionWrapper connection = provider.getConnection(server);
+ if( connection != null ) {
+ view.getCommonViewer().collapseAll();
+ ISelection sel = new StructuredSelection(new Object[] { connection });
+ view.getCommonViewer().setSelection(sel, true);
+ view.getCommonViewer().expandToLevel(connection, 2);
+ }
}
- } else /* if( part != null ) */ {
- final JMXNavigator view = (JMXNavigator) part.getAdapter(JMXNavigator.class);
- if (view != null) {
- view.setFocus();
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- JBossServerConnectionProvider provider =
- (JBossServerConnectionProvider)ExtensionManager.getProvider(
- JBossServerConnectionProvider.PROVIDER_ID);
- IConnectionWrapper connection = provider.getConnection(server);
- if( connection != null ) {
- view.getCommonViewer().collapseAll();
- ISelection sel = new StructuredSelection(new Object[] { connection });
- view.getCommonViewer().setSelection(sel, true);
- view.getCommonViewer().expandToLevel(connection, 2);
- }
- }
- });
- }
- }
+ });
}
}
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/UIUtil.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/UIUtil.java 2012-01-13 01:23:53 UTC (rev 37807)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/UIUtil.java 2012-01-13 07:11:12 UTC (rev 37808)
@@ -13,6 +13,11 @@
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
public class UIUtil {
@@ -46,4 +51,24 @@
Object leftStart, int leftOffset, Object rightStart, int rightOffset) {
return createFormData2(topStart, topOffset, bottomStart, bottomOffset, leftStart, leftOffset, rightStart, rightOffset);
}
+
+ public static final IWorkbenchPart bringViewToFront(String viewId) throws PartInitException {
+ IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow() ;
+ IWorkbenchPart part = null;
+ if (window != null) {
+ IWorkbenchPage page = window.getActivePage();
+ if (page != null) {
+ part = page.findView(viewId);
+ if (part == null) {
+ part = page.showView(viewId);
+ } else /* if( part != null ) */ {
+ if (part != null) {
+ page.activate(part);
+ part.setFocus();
+ }
+ }
+ }
+ }
+ return part;
+ }
}
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-01-13 01:23:53 UTC (rev 37807)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/XPathDialogs.java 2012-01-13 07:11:12 UTC (rev 37808)
@@ -374,9 +374,6 @@
final String attText = attributeText.getText();
final String filePattern = filesetText.getText();
String directory = baseDirText.getText();
- if( !new Path(directory).isAbsolute()) {
- directory = server.getRuntime().getLocation().append(directory).toString();
- }
directory = directory.replace("${jboss_config_dir}", //$NON-NLS-1$
"${jboss_config_dir:" + server.getName() + "}"); //$NON-NLS-1$ //$NON-NLS-2$
directory = directory.replace("${jboss_config}", //$NON-NLS-1$
@@ -386,6 +383,9 @@
directory = engine.performStringSubstitution(directory, true,
true, StringVariableManager.getDefault());
} catch( CoreException ce ) {}
+ if( !new Path(directory).isAbsolute()) {
+ directory = server.getRuntime().getLocation().append(directory).toString();
+ }
final String directory2 = directory;
IRunnableWithProgress op = new IRunnableWithProgress() {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/util/ServerModelUtilities.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/util/ServerModelUtilities.java 2012-01-13 01:23:53 UTC (rev 37807)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/util/ServerModelUtilities.java 2012-01-13 07:11:12 UTC (rev 37808)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
+ * 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,
@@ -21,7 +21,25 @@
import org.jboss.ide.eclipse.as.wtp.core.modules.IJBTModule;
public class ServerModelUtilities {
+
+ public static IModule[] getParentModules(IServer server, IModule module) {
+ // get all supported modules
+ IModule[] supported =
+ org.eclipse.wst.server.core.ServerUtil.getModules(
+ server.getServerType().getRuntimeType().getModuleTypes());
+ ArrayList<IModule> list = new ArrayList<IModule>();
+
+ for( int i = 0; i < supported.length; i++ ) {
+ IModule[] childs = ServerModelUtilities.getChildModules(supported[i]);
+ for (int j = 0; j < childs.length; j++) {
+ if(childs[j].equals(module))
+ list.add(supported[i]);
+ }
+ }
+ return list.toArray(new IModule[list.size()]);
+ }
+
public static ArrayList<IModule[]> getShallowChildren(IServer server, IModule[] root) {
ArrayList<IModule[]> list = new ArrayList<IModule[]>();
IModule[] children = server.getChildModules(root, new NullProgressMonitor());
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.egit.core/src/org/jboss/tools/openshift/egit/core/EGitUtils.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.egit.core/src/org/jboss/tools/openshift/egit/core/EGitUtils.java 2012-01-13 01:23:53 UTC (rev 37807)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.egit.core/src/org/jboss/tools/openshift/egit/core/EGitUtils.java 2012-01-13 07:11:12 UTC (rev 37808)
@@ -37,6 +37,7 @@
import org.eclipse.egit.core.op.FetchOperation;
import org.eclipse.egit.core.op.MergeOperation;
import org.eclipse.egit.core.op.PushOperation;
+import org.eclipse.egit.core.op.PushOperationResult;
import org.eclipse.egit.core.op.PushOperationSpecification;
import org.eclipse.egit.core.project.RepositoryMapping;
import org.eclipse.egit.ui.UIText;
@@ -54,6 +55,7 @@
import org.eclipse.jgit.lib.StoredConfig;
import org.eclipse.jgit.lib.UserConfig;
import org.eclipse.jgit.merge.MergeStrategy;
+import org.eclipse.jgit.revwalk.RevCommit;
import org.eclipse.jgit.transport.FetchResult;
import org.eclipse.jgit.transport.RefSpec;
import org.eclipse.jgit.transport.RemoteConfig;
@@ -294,17 +296,17 @@
*
* @see #connect(IProject, Repository)
*/
- private static void commit(IProject project, String commitMessage, IProgressMonitor monitor) throws CoreException {
+ private static RevCommit commit(IProject project, String commitMessage, IProgressMonitor monitor) throws CoreException {
Repository repository = getRepository(project);
Assert.isLegal(repository != null, "Cannot commit project to repository. ");
- commit(project, commitMessage, repository, monitor);
+ return commit(project, commitMessage, repository, monitor);
}
- public static void commit(IProject project, IProgressMonitor monitor) throws CoreException {
- commit(project, "Commit from JBoss Tools", monitor);
+ public static RevCommit commit(IProject project, IProgressMonitor monitor) throws CoreException {
+ return commit(project, "Commit from JBoss Tools", monitor);
}
- private static void commit(IProject project, String commitMessage, Repository repository, IProgressMonitor monitor)
+ private static RevCommit commit(IProject project, String commitMessage, Repository repository, IProgressMonitor monitor)
throws CoreException {
Assert.isLegal(project != null, "Could not commit project. No project provided");
Assert.isLegal(
@@ -326,6 +328,7 @@
op.setCommitAll(true);
op.setRepository(repository);
op.execute(monitor);
+ return op.getCommit();
}
/**
@@ -339,9 +342,9 @@
* @throws CoreException
* core exception is thrown if the push could not be executed
*/
- public static void push(Repository repository, IProgressMonitor monitor)
+ public static PushOperationResult push(Repository repository, IProgressMonitor monitor)
throws CoreException {
- push(repository, getRemoteConfig(repository), monitor);
+ return push(repository, getRemoteConfig(repository), false, monitor);
}
/**
@@ -356,32 +359,30 @@
* @see #getAllRemoteConfigs(Repository)
* @see RemoteConfig#getName()
*/
- public static void push(String remote, Repository repository, IProgressMonitor monitor)
+ public static PushOperationResult push(String remote, Repository repository, IProgressMonitor monitor)
throws CoreException {
- try {
- RemoteConfig remoteConfig = getRemoteConfig(remote, repository);
- if (remoteConfig == null) {
- throw new CoreException(createStatus(null,
- "Repository \"{0}\" has no remote repository with the name \"{1}\"",
- repository.toString(), remote));
- }
- createPushOperation(remoteConfig, repository).run(monitor);
- } catch (CoreException e) {
- throw e;
- } catch (Exception e) {
- throw new CoreException(createStatus(e, "Could not push repo {0}", repository.toString()));
- }
+ RemoteConfig remoteConfig = getRemoteConfig(remote, repository);
+ return push(repository, remoteConfig, false, monitor);
}
- private static void push(Repository repository, RemoteConfig remoteConfig, IProgressMonitor monitor)
+ public static PushOperationResult pushForce(String remote, Repository repository, IProgressMonitor monitor)
throws CoreException {
+ RemoteConfig remoteConfig = getRemoteConfig(remote, repository);
+ return push(repository, remoteConfig, true, monitor);
+ }
+
+ private static PushOperationResult push(Repository repository, RemoteConfig remoteConfig,
+ boolean force, IProgressMonitor monitor) throws CoreException {
try {
if (remoteConfig == null) {
throw new CoreException(createStatus(null, "Repository \"{0}\" has no remote repository configured",
repository.toString()));
}
- createPushOperation(remoteConfig, repository).run(monitor);
+ PushOperation op = createPushOperation(remoteConfig, repository, force);
+ op.run(monitor);
+ PushOperationResult result = op.getOperationResult();
+ return result;
} catch (CoreException e) {
throw e;
} catch (Exception e) {
@@ -398,7 +399,12 @@
private static PushOperation createPushOperation(RemoteConfig remoteConfig, Repository repository)
throws CoreException {
-
+ return createPushOperation(remoteConfig, repository, false);
+ }
+
+ private static PushOperation createPushOperation(RemoteConfig remoteConfig, Repository repository, boolean force)
+ throws CoreException {
+
PushOperationSpecification spec = new PushOperationSpecification();
List<URIish> pushToUris = getPushURIs(remoteConfig);
List<RefSpec> pushRefSpecs = getPushRefSpecs(remoteConfig);
@@ -407,6 +413,8 @@
// return new PushOperation(repository, spec, false, PUSH_TIMEOUT);
// TODO: fix pushoperation to really use the spec (currently seems like
// it does not work so we push everything to the remote)
+
+ // TODO ensure the 'force' is respected
return new PushOperation(repository, remoteConfig.getName(), false, PUSH_TIMEOUT);
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF 2012-01-13 01:23:53 UTC (rev 37807)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF 2012-01-13 07:11:12 UTC (rev 37808)
@@ -35,7 +35,8 @@
org.eclipse.ui.navigator;bundle-version="3.5.100",
org.eclipse.ui.console;bundle-version="3.5.100",
org.eclipse.core.expressions;bundle-version="3.4.300",
- org.eclipse.wst.common.modulecore;bundle-version="1.2.101"
+ org.eclipse.wst.common.modulecore;bundle-version="1.2.101",
+ org.jboss.ide.eclipse.as.wtp.core;bundle-version="2.3.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: org.jboss.tools.common.databinding,
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml 2012-01-13 01:23:53 UTC (rev 37807)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml 2012-01-13 07:11:12 UTC (rev 37808)
@@ -63,7 +63,7 @@
point="org.eclipse.wst.server.core.serverTypes">
<serverType
behaviourClass="org.jboss.tools.openshift.express.internal.core.behaviour.ExpressBehaviour"
- class="org.jboss.ide.eclipse.as.core.server.internal.JBossServer"
+ class="org.jboss.tools.openshift.express.internal.core.behaviour.ExpressServer"
name="%openshift.express.name"
description="%openshift.express.description"
hasConfiguration="false"
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressBehaviour.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressBehaviour.java 2012-01-13 01:23:53 UTC (rev 37807)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressBehaviour.java 2012-01-13 07:11:12 UTC (rev 37808)
@@ -32,4 +32,10 @@
public IAdaptable getPublishAdaptableInfo() {
return publishAdaptableInfo;
}
+
+ @Override
+ public boolean canRestartModule(IModule[] module){
+ return false;
+ }
+
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressBehaviourDelegate.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressBehaviourDelegate.java 2012-01-13 01:23:53 UTC (rev 37807)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressBehaviourDelegate.java 2012-01-13 07:11:12 UTC (rev 37808)
@@ -13,12 +13,12 @@
import org.jboss.ide.eclipse.as.core.server.internal.AbstractBehaviourDelegate;
public class ExpressBehaviourDelegate extends AbstractBehaviourDelegate {
-
+ public static final String OPENSHIFT_ID = "openshift";
public ExpressBehaviourDelegate() {
}
@Override
public String getBehaviourTypeId() {
- return "openshift";
+ return OPENSHIFT_ID;
}
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressMessages.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressMessages.java 2012-01-13 01:23:53 UTC (rev 37807)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressMessages.java 2012-01-13 07:11:12 UTC (rev 37808)
@@ -13,5 +13,8 @@
public static String requestCommitAndPushMsg;
public static String requestPushTitle;
public static String requestPushMsg;
+ public static String cannotModifyModules;
+ public static String shareProjectTitle;
+ public static String shareProjectMessage;
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java 2012-01-13 01:23:53 UTC (rev 37807)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java 2012-01-13 07:11:12 UTC (rev 37808)
@@ -19,6 +19,7 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.egit.core.op.PushOperationResult;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.osgi.util.NLS;
@@ -26,13 +27,16 @@
import org.eclipse.swt.widgets.Shell;
import org.eclipse.team.internal.ui.wizards.ConfigureProjectWizard;
import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.internal.navigator.filters.CoreExpressionFilter;
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.model.ServerBehaviourDelegate;
import org.jboss.ide.eclipse.as.core.server.IJBossServerPublishMethod;
+import org.jboss.ide.eclipse.as.core.server.IServerAlreadyStartedHandler;
import org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior;
import org.jboss.ide.eclipse.as.core.server.xpl.PublishCopyUtil.IPublishCopyCallbackHandler;
import org.jboss.tools.openshift.egit.core.EGitUtils;
+import org.jboss.tools.openshift.express.internal.ui.console.ConsoleUtils;
public class ExpressPublishMethod implements IJBossServerPublishMethod {
@@ -95,29 +99,47 @@
}
int changed = EGitUtils.countCommitableChanges(p, behaviour.getServer(), new NullProgressMonitor() );
- if( changed != 0 && requestCommitAndPushApproval(module, changed)) {
- monitor.beginTask("Publishing " + p.getName(), 200);
- EGitUtils.commit(p, new SubProgressMonitor(monitor, 100));
- EGitUtils.push(EGitUtils.getRepository(p), new SubProgressMonitor(monitor, 100));
- monitor.done();
- return IServer.PUBLISH_STATE_NONE;
- } else if( changed == 0 && requestPushApproval(module)) {
- monitor.beginTask("Publishing " + p.getName(), 100);
- String remoteName = behaviour.getServer().getAttribute(ExpressServerUtils.ATTRIBUTE_REMOTE_NAME,
- ExpressServerUtils.ATTRIBUTE_REMOTE_NAME_DEFAULT);
- EGitUtils.push(remoteName, EGitUtils.getRepository(p), new SubProgressMonitor(monitor, 100));
- monitor.done();
- return IServer.PUBLISH_STATE_NONE;
+ String remoteName = behaviour.getServer().getAttribute(ExpressServerUtils.ATTRIBUTE_REMOTE_NAME,
+ ExpressServerUtils.ATTRIBUTE_REMOTE_NAME_DEFAULT);
+ PushOperationResult result = null;
+ boolean committed = false;
+ try {
+ if( changed != 0 && requestCommitAndPushApproval(module, changed)) {
+ monitor.beginTask("Publishing " + p.getName(), 300);
+ EGitUtils.commit(p, new SubProgressMonitor(monitor, 100));
+ committed = true;
+ }
+
+ if( committed || (changed == 0 && requestPushApproval(module))) {
+ if( !committed )
+ monitor.beginTask("Publishing " + p.getName(), 200);
+ result = EGitUtils.push(remoteName, EGitUtils.getRepository(p), new SubProgressMonitor(monitor, 100));
+ monitor.done();
+ }
+ } catch(CoreException ce) {
+ // Comes if either commit or push has failed
+ try {
+ result = EGitUtils.pushForce(remoteName, repository, new SubProgressMonitor(monitor, 100));
+ monitor.done();
+ } catch(CoreException ce2) {
+ // even the push force failed, and we don't have a valid result to check :(
+ // can only throw it i guess
+ throw ce2;
+ }
}
- return state;
+
+ if( result != null ) {
+ ConsoleUtils.appendGitPushToConsole(behaviour.getServer(), result);
+ }
+
+ return IServer.PUBLISH_STATE_NONE;
}
private void shareProjects(final IProject[] projects) {
Display.getDefault().asyncExec(new Runnable() {
public void run() {
- String msg = "There are " + projects.length + " projects that are not connected to any git repository. " +
- "Would you like to share them now?";
- String title = "Share projects?";
+ String msg = ExpressMessages.bind(ExpressMessages.shareProjectMessage, projects.length);
+ String title = ExpressMessages.shareProjectTitle;
boolean approved = requestApproval(msg, title);
if( approved ) {
ConfigureProjectWizard.shareProjects(
Added: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressServer.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressServer.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressServer.java 2012-01-13 07:11:12 UTC (rev 37808)
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Red Hat Inc..
+ * All rights reserved. This program and the accompanying materials
+ * are 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 Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.jboss.tools.openshift.express.internal.core.behaviour;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+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.model.ServerDelegate;
+import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
+import org.jboss.ide.eclipse.as.wtp.core.util.ServerModelUtilities;
+import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
+
+public class ExpressServer extends ServerDelegate {
+ public void setDefaults(IProgressMonitor monitor) {
+ super.setDefaults(monitor);
+ setAttribute(IDeployableServer.SERVER_MODE, ExpressBehaviourDelegate.OPENSHIFT_ID);
+ }
+
+ public IStatus canModifyModules(IModule[] add, IModule[] remove) {
+ // safety
+ add = add == null ? new IModule[0] : add;
+ remove = remove == null ? new IModule[0] : remove;
+
+ // Can only add a module if the server has zero, and even then, can only add 1.
+ IModule[] mods = getServer().getModules();
+ boolean canModify = mods.length == 0 && add.length == 1;
+ canModify &= remove.length == 0;
+ return canModify ? Status.OK_STATUS : new Status(IStatus.ERROR,
+ OpenShiftUIActivator.PLUGIN_ID, ExpressMessages.cannotModifyModules);
+ }
+
+ public IModule[] getRootModules(IModule module) throws CoreException {
+ IStatus status = canModifyModules(new IModule[] { module }, null);
+ if (status != null && !status.isOK())
+ throw new CoreException(status);
+ IModule[] parents = ServerModelUtilities.getParentModules(getServer(), module);
+ if(parents.length>0)
+ return parents;
+ return new IModule[] { module };
+ }
+
+ public IModule[] getChildModules(IModule[] module) {
+ return ServerModelUtilities.getChildModules(module);
+ }
+
+ public void modifyModules(IModule[] add, IModule[] remove,
+ IProgressMonitor monitor) throws CoreException {
+ }
+
+}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/expressMessages.properties
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/expressMessages.properties 2012-01-13 01:23:53 UTC (rev 37807)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/expressMessages.properties 2012-01-13 07:11:12 UTC (rev 37808)
@@ -2,3 +2,6 @@
requestCommitAndPushMsg=There are {0} local changes in "{1}". Do you want to publish to OpenShift by commiting the changes and pushing its Git repository?
requestPushTitle=Publish {0}?
requestPushMsg=The are no local changes in "{0}". Do you want to publish to OpenShift by pushing its Git repository?
+cannotModifyModules=Openshift Express servers cannot be modified.
+shareProjectTitle=Share projects?
+shareProjectMessage="There are {0} projects that are not connected to any git repository. Would you like to share them now?
\ No newline at end of file
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ConsoleUtils.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ConsoleUtils.java 2012-01-13 01:23:53 UTC (rev 37807)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ConsoleUtils.java 2012-01-13 07:11:12 UTC (rev 37808)
@@ -10,11 +10,17 @@
******************************************************************************/
package org.jboss.tools.openshift.express.internal.ui.console;
-import org.eclipse.ui.IWorkbenchPage;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.eclipse.egit.core.op.PushOperationResult;
+import org.eclipse.egit.ui.UIText;
+import org.eclipse.jgit.transport.RemoteRefUpdate;
+import org.eclipse.jgit.transport.URIish;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.console.ConsolePlugin;
import org.eclipse.ui.console.IConsole;
import org.eclipse.ui.console.IConsoleConstants;
@@ -22,6 +28,9 @@
import org.eclipse.ui.console.IConsoleManager;
import org.eclipse.ui.console.IConsoleView;
import org.eclipse.ui.console.MessageConsole;
+import org.eclipse.wst.server.core.IServer;
+import org.jboss.ide.eclipse.as.ui.UIUtil;
+import org.jboss.tools.openshift.express.internal.core.behaviour.ExpressServerUtils;
import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
/**
@@ -89,28 +98,98 @@
* @param console the console to display
*/
public static void displayConsoleView(IConsole console) {
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if (window != null) {
- IWorkbenchPage page = window.getActivePage();
- if (page != null) {
- IWorkbenchPart part = page.findView(IConsoleConstants.ID_CONSOLE_VIEW);
- if (part == null) {
- try {
- part = page.showView(IConsoleConstants.ID_CONSOLE_VIEW);
- } catch (PartInitException e) {
- Logger.warn("Could not open console view", e);
- }
- }
- if (part != null) {
- page.activate(part);
- IConsoleView view = (IConsoleView) part.getAdapter(IConsoleView.class);
- if (view != null) {
- view.setFocus();
- view.display(console);
- }
- }
+ IWorkbenchPart part = null;
+ try {
+ part = UIUtil.bringViewToFront(IConsoleConstants.ID_CONSOLE_VIEW);
+ } catch (PartInitException e) {
+ Logger.warn("Could not open console view", e);
+ }
+
+ if (part != null) {
+ IConsoleView view = (IConsoleView) part.getAdapter(IConsoleView.class);
+ if (view != null) {
+ view.display(console);
}
}
}
+
+ public static void appendGitPushToConsole(IServer server, PushOperationResult result) {
+ appendToConsole(server, getPushResultAsString(result));
+ }
+
+ private static final String EMPTY_STRING = ""; //$NON-NLS-1
+ private static final String SPACE = " "; //$NON-NLS-1$
+ private static final String NL = "\n";//$NON-NLS-1$
+
+ private static String getPushResultAsString(PushOperationResult pushOperationResult) {
+ StringBuilder result = new StringBuilder(EMPTY_STRING);
+ result.append(getPushErrors(pushOperationResult));
+ result.append(NL);
+ Set<URIish> uris = pushOperationResult.getURIs();
+ Iterator<URIish> i = uris.iterator();
+ while(i.hasNext()) {
+ URIish uri = i.next();
+ for (RemoteRefUpdate update : pushOperationResult.getPushResult(uri).getRemoteUpdates()) {
+ result.append(getOneResultAsString(pushOperationResult, uri, update));
+ }
+ }
+ return result.toString();
+ }
+
+ private static String getOneResultAsString(PushOperationResult pushOperationResult,
+ URIish uri, RemoteRefUpdate update) {
+ StringBuilder result = new StringBuilder(EMPTY_STRING);
+ result.append(UIText.PushResultTable_repository);
+ result.append(SPACE);
+ result.append(uri.toString());
+ result.append(Text.DELIMITER);
+ result.append(Text.DELIMITER);
+ String message = update.getMessage();
+ if (message != null)
+ result.append(message).append(Text.DELIMITER);
+ StringBuilder messagesBuffer = new StringBuilder(pushOperationResult
+ .getPushResult(uri).getMessages());
+ trim(messagesBuffer);
+ if (messagesBuffer.length() > 0)
+ result.append(messagesBuffer).append(Text.DELIMITER);
+ trim(result);
+ return result.toString();
+ }
+ private static void trim(StringBuilder s) {
+ // remove leading line breaks
+ while (s.length() > 0 && (s.charAt(0) == '\n' || s.charAt(0) == '\r'))
+ s.deleteCharAt(0);
+ // remove trailing line breaks
+ while (s.length() > 0
+ && (s.charAt(s.length() - 1) == '\n' || s
+ .charAt(s.length() - 1) == '\r'))
+ s.deleteCharAt(s.length() - 1);
+ }
+
+ private static String getPushErrors(PushOperationResult result) {
+ StringBuilder messages = new StringBuilder();
+ for (URIish uri : result.getURIs()) {
+ String errorMessage = result.getErrorMessage(uri);
+ if (errorMessage != null && errorMessage.length() > 0) {
+ if (messages.length() > 0)
+ messages.append(System.getProperty("line.separator")); //$NON-NLS-1$
+ messages.append(errorMessage);
+ }
+ }
+ return messages.toString();
+ }
+
+
+ public static void appendToConsole(IServer server, String message ) {
+ if (ExpressServerUtils.isOpenShiftRuntime(server)) {
+ final MessageConsole console = ConsoleUtils.findMessageConsole(server.getId());
+ console.newMessageStream().print(message);
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ ConsoleUtils.displayConsoleView(console);
+ }
+ });
+ }
+ }
}
12 years, 12 months
JBoss Tools SVN: r37807 - in trunk/jst/plugins/org.jboss.tools.jst.web.ui: src/org/jboss/tools/jst/web/ui/attribute/adapter and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-01-12 20:23:53 -0500 (Thu, 12 Jan 2012)
New Revision: 37807
Added:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/attribute/adapter/FilterNameListAdapter.java
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml
Log:
JBIDE-10576
https://issues.joss.org/browse/JBIDE-10576
Linking field editor is implemented for web.xml attributes 'servlet-name', 'filter-name' and 'role-name' where they are references to objects with such name.
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml 2012-01-13 01:15:31 UTC (rev 37806)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml 2012-01-13 01:23:53 UTC (rev 37807)
@@ -17,6 +17,8 @@
</attributeAdapter>
<attributeAdapter class="org.jboss.tools.jst.web.ui.attribute.adapter.ServletNameListAdapter" id="ServletList">
</attributeAdapter>
+ <attributeAdapter class="org.jboss.tools.jst.web.ui.attribute.adapter.FilterNameListAdapter" id="FilterList">
+ </attributeAdapter>
</extension>
<extension point="org.jboss.tools.common.model.ui.attributeEditor">
<attributeEditor class="org.jboss.tools.common.model.ui.attribute.editor.ComboBoxEditor" id="WebRoleList">
@@ -27,6 +29,8 @@
</attributeEditor>
<attributeEditor class="org.jboss.tools.common.model.ui.attribute.editor.ComboBoxEditor" id="ServletList">
</attributeEditor>
+ <attributeEditor class="org.jboss.tools.common.model.ui.attribute.editor.ComboBoxEditor" id="FilterList">
+ </attributeEditor>
</extension>
<extension id="e" name="XML Editors" point="org.jboss.tools.common.model.ui.xmlEditor">
Added: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/attribute/adapter/FilterNameListAdapter.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/attribute/adapter/FilterNameListAdapter.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/attribute/adapter/FilterNameListAdapter.java 2012-01-13 01:23:53 UTC (rev 37807)
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.jst.web.ui.attribute.adapter;
+
+import org.jboss.tools.common.model.XModel;
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.filesystems.FileSystemsHelper;
+import org.jboss.tools.common.model.ui.attribute.*;
+import org.jboss.tools.common.model.ui.attribute.adapter.*;
+import org.jboss.tools.common.meta.XAttribute;
+import org.jboss.tools.jst.web.model.helpers.WebAppHelper;
+import org.jboss.tools.jst.web.webapp.model.WebAppConstants;
+
+/**
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public class FilterNameListAdapter extends DefaultComboBoxValueAdapter {
+
+ protected IListContentProvider createListContentProvider(XAttribute attribute) {
+ FilterNameListContentProvider p = new FilterNameListContentProvider();
+ p.setModel(model, modelObject);
+ p.setAttribute(attribute);
+ return p;
+ }
+
+}
+
+class FilterNameListContentProvider extends DefaultXAttributeListContentProvider {
+ private XModel model;
+ private XModelObject object;
+
+ public void setModel(XModel model, XModelObject context) {
+ this.model = model;
+ object = context;
+ }
+
+ protected void loadTags() {
+ XModelObject webxml = FileSystemsHelper.getFile(object);
+ if(webxml == null) {
+ webxml = WebAppHelper.getWebApp(model);
+ }
+ if(webxml != null) {
+ XModelObject[] os = WebAppHelper.getFilters(webxml);
+ tags = new String[os.length];
+ for (int i = 0; i < tags.length; i++) tags[i] = os[i].getAttributeValue(WebAppConstants.FILTER_NAME);
+ }
+ }
+
+}
Property changes on: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/attribute/adapter/FilterNameListAdapter.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
12 years, 12 months
JBoss Tools SVN: r37805 - trunk/cdi/docs/reference/en-US.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2012-01-12 19:55:40 -0500 (Thu, 12 Jan 2012)
New Revision: 37805
Modified:
trunk/cdi/docs/reference/en-US/Creating_a_CDI_Web_Project.xml
Log:
updated with info to finish off the cdi web project wizard
Modified: trunk/cdi/docs/reference/en-US/Creating_a_CDI_Web_Project.xml
===================================================================
--- trunk/cdi/docs/reference/en-US/Creating_a_CDI_Web_Project.xml 2012-01-13 00:53:03 UTC (rev 37804)
+++ trunk/cdi/docs/reference/en-US/Creating_a_CDI_Web_Project.xml 2012-01-13 00:55:40 UTC (rev 37805)
@@ -118,7 +118,7 @@
</table>
<table id="table-jbt-new_cdi_web_project_02" frame="all">
<!-- <table id="NewJSFProject_Web_ServletVersion" frame='all'> -->
- <title>New Dynamic Project - Dynamic web module version</title>
+ <title>New CDI Web Project - Dynamic web module version</title>
<tgroup cols='2' align='left' colsep='1' rowsep='1'>
<colspec colname='c1' colwidth="1*"/>
<colspec colname='c2' colwidth="4*"/>
@@ -154,7 +154,7 @@
</table>
<table id="table-jbt-new_cdi_web_project_03">
- <title>CDI Web Project - Configuration</title>
+ <title>New CDI Web Project - Configuration</title>
<tgroup cols='2' align='left' colsep='1' rowsep='1'>
<colspec colname='c1' colwidth="1*"/>
<colspec colname='c2' colwidth="2*"/>
@@ -237,7 +237,7 @@
</mediaobject>
</figure>
<para>
- The final wizard screen pertains to <guilabel>JSF Capabilities</guilabel> configuration.
+ The final screen of the wizard pertains to <guilabel>JSF Capabilities</guilabel> configuration.
</para>
<figure id="project_creation_06">
<title>Web Module configuration screen</title>
@@ -252,5 +252,112 @@
</textobject>
</mediaobject>
</figure>
+ <table id="table-jbt-new_cdi_web_project_04" frame='all'>
+ <title>JSF Capabilities</title>
+ <tgroup cols='4' align='left' colsep='1' rowsep='1'>
+ <colspec colname='c1' colwidth="1*"/>
+ <colspec colname='c2' colwidth="1*"/>
+ <colspec colname='c3' colwidth="3*"/>
+ <colspec colname='c4' colwidth="3*"/>
+ <thead>
+ <row>
+ <entry>Field</entry>
+ <entry>Mandatory</entry>
+ <entry>Instruction</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>JSF Implementation Library Type</entry>
+ <entry>yes</entry>
+ <entry>Select an implementation library from the list provided.</entry>
+ <entry>This option adds support for the JSF implementation library, required for the project to function correctly. For a description of available options see: <xref linkend="table-jbt-new_cdi_web_project_05"/>.
+ </entry>
+ </row>
+ <row>
+ <entry>Configure JSF servlet in deployment descriptor</entry>
+ <entry>no</entry>
+ <entry>Selected by default, decide whether to configure the deployment descriptor for the JSF servlet or not.</entry>
+ <entry>This option, if selected, opens up the ability to configure various deployment descriptor fields. For a description of fields see: <xref linkend="table-jbt-new_cdi_web_project_06"/>.
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table id="table-jbt-new_cdi_web_project_05" frame="all">
+ <title>JSF Capabilities - JSF Implementation Library</title>
+ <tgroup cols='2' align='left' colsep='1' rowsep='1'>
+ <colspec colname='c1' colwidth="1*"/>
+ <colspec colname='c2' colwidth="4*"/>
+ <thead>
+ <row>
+ <entry>Option</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>Library Provided by Target Runtime</entry>
+ <entry>If you selected a target runtime on the first screen, this option will configure the project to use the required facet library that is provided by the target runtime.</entry>
+ </row>
+ <row>
+ <entry>User Library</entry>
+ <entry>Selecting the <guilabel>User Library</guilabel> option allows you to specify one or more custom user libraries to be used. At least one must be selected for the wizard to complete successfully.</entry>
+ </row>
+ <row>
+ <entry>Disable Library Configuration</entry>
+ <entry>If you choose to disable library configuration you will have to configure the project classpath at a later time, by alternate means, before running the project.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table id="table-jbt-new_cdi_web_project_06" frame="all">
+ <title>JSF Capabilities - JSF Servlet Configuration</title>
+ <tgroup cols='4' align='left' colsep='1' rowsep='1'>
+ <colspec colname='c1' colwidth="1*"/>
+ <colspec colname='c2' colwidth="1*"/>
+ <colspec colname='c3' colwidth="3*"/>
+ <colspec colname='c4' colwidth="3*"/>
+ <thead>
+ <row>
+ <entry>Field</entry>
+ <entry>Mandatory</entry>
+ <entry>Instruction</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>JSF Configuration File</entry>
+ <entry>Yes</entry>
+ <entry>Enter the location of the JSF configuration file (the default is usually correct).</entry>
+ <entry>You must specify where the JSF configuration file is located.</entry>
+ </row>
+ <row>
+ <entry>JSF Servlet Name</entry>
+ <entry>Yes</entry>
+ <entry>Specify a name for your JSF servlet</entry>
+ <entry>The name of the servlet.</entry>
+ </row>
+ <row>
+ <entry>JSF Servlet Class Name</entry>
+ <entry>No</entry>
+ <entry>Specify a name for your servlet class.</entry>
+ <entry>Naming your servlet class will allow for easy reference to it when you are coding for your project in the future.</entry>
+ </row>
+ <row>
+ <entry>URL Mapping Patters</entry>
+ <entry>No</entry>
+ <entry>A default mapping pattern is provided. You are able to remove and add patterns as you wish.</entry>
+ <entry>This option allows for the creation of constant, readable URLs, based on patterns, that map to your project.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <para>
+ Click the <guibutton>Finish</guibutton> button to create your CDI Web Project.
+ </para>
</chapter>
12 years, 12 months
JBoss Tools SVN: r37804 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2012-01-12 19:53:03 -0500 (Thu, 12 Jan 2012)
New Revision: 37804
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
Log:
Wizard page "Configure Seam Facet Settings" should be with unchecked filed "Create Test Project" and fields "Test Project Name" and "Test Package Name" should be disabled https://issues.jboss.org/browse/JBIDE-10617
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2012-01-12 23:32:18 UTC (rev 37803)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2012-01-13 00:53:03 UTC (rev 37804)
@@ -480,10 +480,15 @@
}
});
- createTestProjectCheckboxeditor.setEnabled(isNewProjectWizard());
-
registerEditor(testProjectNameditor, generationGroup, 3);
registerEditor(testsPkgNameditor, generationGroup, 3);
+
+ if(!isNewProjectWizard()){
+ createTestProjectCheckboxeditor.setValue(false);
+ createTestProjectCheckboxeditor.setEnabled(false);
+ testProjectNameditor.setEnabled(false);
+ testsPkgNameditor.setEnabled(false);
+ }
setControl(root);
12 years, 12 months
JBoss Tools SVN: r37803 - trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2012-01-12 18:32:18 -0500 (Thu, 12 Jan 2012)
New Revision: 37803
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIPreferencesMessages.properties
Log:
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIPreferencesMessages.properties
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIPreferencesMessages.properties 2012-01-12 19:14:51 UTC (rev 37802)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIPreferencesMessages.properties 2012-01-12 23:32:18 UTC (rev 37803)
@@ -98,7 +98,7 @@
##Specializing
CDIValidatorConfigurationBlock_section_specializing=Specializing
CDIValidatorConfigurationBlock_pb_illegalSpecializingBean_label=Illegal specializing bean:
-CDIValidatorConfigurationBlock_pb_missingTypeInSpecializingBean_label=Missing type in specializing vean:
+CDIValidatorConfigurationBlock_pb_missingTypeInSpecializingBean_label=Missing type in specializing bean:
CDIValidatorConfigurationBlock_pb_conflictingNameInSpecializingBean_label=Conflicting name in specializing bean:
CDIValidatorConfigurationBlock_pb_interceptorAnnotatedSpecializes_label=Interceptor or decorator annotated @Specializes:
CDIValidatorConfigurationBlock_pb_inconsistentSpecialization_label=Inconsistent specialization:
12 years, 12 months