JBoss Tools SVN: r39190 - in trunk/cdi/tests/org.jboss.tools.cdi.bot.test: src/org/jboss/tools/cdi/bot/test and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-02-29 05:55:05 -0500 (Wed, 29 Feb 2012)
New Revision: 39190
Added:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/DynamicWebProjectWithCDITest.java
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/launchers/CDIAllBotTests.launch
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/launchers/CDIAllBotTestsMaven.launch
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/CDITestBase.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/BeansXMLHelper.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIProjectHelper.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/CDIWizardBase.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CDIWebProjectWizardTest.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/FacetTest.java
Log:
CDI test fix + test related to dynamic web project wizard + cdi support added
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/launchers/CDIAllBotTests.launch
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/launchers/CDIAllBotTests.launch 2012-02-29 06:45:45 UTC (rev 39189)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/launchers/CDIAllBotTests.launch 2012-02-29 10:55:05 UTC (rev 39190)
@@ -40,7 +40,7 @@
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.jboss.tools.cdi.bot.test"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -XX:MaxPermSize=256m -Xms256m -Xmx512m -Dswtbot.test.properties.file=${env_var:HOME}/swtbot.properties -Dusage_reporting_enabled=false"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -XX:MaxPermSize=256m -Xms256m -Xmx1024m -Dswtbot.test.properties.file=${env_var:HOME}/swtbot.properties -Dusage_reporting_enabled=false"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.platform.ide"/>
<booleanAttribute key="show_selected_only" value="false"/>
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/launchers/CDIAllBotTestsMaven.launch
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/launchers/CDIAllBotTestsMaven.launch 2012-02-29 06:45:45 UTC (rev 39189)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/launchers/CDIAllBotTestsMaven.launch 2012-02-29 10:55:05 UTC (rev 39190)
@@ -16,6 +16,6 @@
<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.VM_ARGUMENTS" value="-Xmx2048m"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx1024m"/>
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc:/org.jboss.tools.cdi.bot.test}"/>
</launchConfiguration>
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-02-29 06:45:45 UTC (rev 39189)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDIAllBotTests.java 2012-02-29 10:55:05 UTC (rev 39190)
@@ -32,6 +32,7 @@
import org.jboss.tools.cdi.bot.test.wizard.CDISupportTest;
import org.jboss.tools.cdi.bot.test.wizard.CDIWebProjectWizardTest;
import org.jboss.tools.cdi.bot.test.wizard.ConfigurationPresetTest;
+import org.jboss.tools.cdi.bot.test.wizard.DynamicWebProjectWithCDITest;
import org.jboss.tools.cdi.bot.test.wizard.FacetTest;
import org.jboss.tools.cdi.bot.test.wizard.WizardTest;
import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
@@ -66,6 +67,7 @@
FacetTest.class,
CDISupportTest.class,
CDIWebProjectWizardTest.class,
+ DynamicWebProjectWithCDITest.class,
WizardTest.class,
BeansEditorTest.class,
NamedRefactoringTest.class,
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDITestBase.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDITestBase.java 2012-02-29 06:45:45 UTC (rev 39189)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDITestBase.java 2012-02-29 10:55:05 UTC (rev 39190)
@@ -37,7 +37,7 @@
@Before
public void prepareWorkspace() {
if (!projectHelper.projectExists(getProjectName())) {
- projectHelper.createCDIProjectWithDynamicWizard(getProjectName());
+ projectHelper.createCDIProjectWithCDIWizard(getProjectName());
}
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/BeansXMLHelper.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/BeansXMLHelper.java 2012-02-29 06:45:45 UTC (rev 39189)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/BeansXMLHelper.java 2012-02-29 10:55:05 UTC (rev 39190)
@@ -15,7 +15,6 @@
import org.jboss.tools.cdi.bot.test.CDIConstants;
import org.jboss.tools.cdi.bot.test.annotations.CDIWizardType;
import org.jboss.tools.cdi.bot.test.openon.OpenOnTest;
-import org.jboss.tools.ui.bot.ext.Timing;
/**
* Helper for beans.xml validation
@@ -157,9 +156,9 @@
*/
private void createBeansXML(String projectName) {
- if (!projectExplorer.isFilePresent(projectName,
+ if (!packageExplorer.isFilePresent(projectName,
CDIConstants.META_INF_BEANS_XML_PATH.split("/")) &&
- !projectExplorer.isFilePresent(projectName,
+ !packageExplorer.isFilePresent(projectName,
CDIConstants.WEB_INF_BEANS_XML_PATH.split("/"))) {
wizard.createCDIComponent(CDIWizardType.BEANS_XML, null,
@@ -177,11 +176,11 @@
*/
private void replaceBeansXMLContent(String projectName, String path) {
- if (projectExplorer.isFilePresent(projectName,
+ if (packageExplorer.isFilePresent(projectName,
CDIConstants.WEB_INF_BEANS_XML_PATH.split("/"))) {
- projectExplorer.openFile(projectName, CDIConstants.WEB_INF_BEANS_XML_PATH.split("/"));
+ packageExplorer.openFile(projectName, CDIConstants.WEB_INF_BEANS_XML_PATH.split("/"));
}else {
- projectExplorer.openFile(projectName, CDIConstants.META_INF_BEANS_XML_PATH.split("/"));
+ packageExplorer.openFile(projectName, CDIConstants.META_INF_BEANS_XML_PATH.split("/"));
}
bot.cTabItem("Source").activate();
setEd(bot.activeEditor().toTextEditor());
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIProjectHelper.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIProjectHelper.java 2012-02-29 06:45:45 UTC (rev 39189)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIProjectHelper.java 2012-02-29 10:55:05 UTC (rev 39190)
@@ -104,7 +104,7 @@
item.expand();
NodeContextUtil.nodeContextMenu(tree, item, CDIConstants.CONFIGURE,
CDIConstants.ADD_CDI_SUPPORT).click();
- bot.activeShell().bot().button(IDELabel.Button.OK).click();
+ bot.button(IDELabel.Button.OK).click();
bot.waitWhile(new ProgressInformationShellIsActiveCondition(), TaskDuration.LONG.getTimeout());
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/CDIWizardBase.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/CDIWizardBase.java 2012-02-29 06:45:45 UTC (rev 39189)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/CDIWizardBase.java 2012-02-29 10:55:05 UTC (rev 39190)
@@ -231,7 +231,7 @@
setFocus();
bot().button(IDELabel.Button.ADD_WITHOUT_DOTS, 0).click();
SWTBotShell sh = bot().activeShell();
- sh.bot().text().typeText(ib);
+ sh.bot().text().setText(ib);
sh.bot().waitUntil(new NonEmptyTableCondition(sh.bot().table()), TaskDuration.LONG.getTimeout());
sh.bot().button(IDELabel.Button.OK).click();
setFocus();
@@ -317,7 +317,7 @@
setFocus();
bot().button(IDELabel.Button.ADD, 0).click();
SWTBotShell sh = bot().activeShell();
- sh.bot().text().typeText(intf);
+ sh.bot().text().setText(intf);
sh.bot().waitUntil(new NonEmptyTableCondition(sh.bot().table()), TaskDuration.LONG.getTimeout());
sh.bot().table().getTableItem(0).select();
sh.bot().button(IDELabel.Button.OK).click();
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CDIWebProjectWizardTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CDIWebProjectWizardTest.java 2012-02-29 06:45:45 UTC (rev 39189)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CDIWebProjectWizardTest.java 2012-02-29 10:55:05 UTC (rev 39190)
@@ -36,7 +36,7 @@
assertTrue(projectHelper.checkCDISupport(getProjectName()));
LOGGER.info("Project has correctly set CDI support");
assertTrue("Error: beans.xml should be created when using CDI Web Project wizard",
- projectExplorer.isFilePresent(getProjectName(),
+ packageExplorer.isFilePresent(getProjectName(),
CDIConstants.WEB_INF_BEANS_XML_PATH.split("/")));
} else {
fail("CDI project was not succesfully created by CDI Web Project wizard");
Added: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/DynamicWebProjectWithCDITest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/DynamicWebProjectWithCDITest.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/DynamicWebProjectWithCDITest.java 2012-02-29 10:55:05 UTC (rev 39190)
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2011-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.bot.test.wizard;
+
+import org.jboss.tools.cdi.bot.test.CDITestBase;
+import org.junit.Test;
+
+public class DynamicWebProjectWithCDITest extends CDITestBase {
+
+ @Override
+ public void prepareWorkspace() {
+ if (!projectHelper.projectExists(getProjectName())) {
+ projectHelper.createCDIProjectWithDynamicWizard(getProjectName());
+ }
+ }
+
+ @Override
+ public String getProjectName() {
+ return "CDIDynamicWebProject";
+ }
+
+ @Test
+ public void testDynamicWebProjectWizard() {
+ if (projectHelper.projectExists(getProjectName())) {
+ LOGGER.info("CDI project was sucessfully created by CDI Web Project wizard");
+ assertTrue(projectHelper.checkCDISupport(getProjectName()));
+ LOGGER.info("Project has correctly set CDI support");
+ } else {
+ fail("CDI project was not succesfully created by CDI Dynamic Web Project wizard");
+ }
+
+ }
+
+}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/FacetTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/FacetTest.java 2012-02-29 06:45:45 UTC (rev 39189)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/FacetTest.java 2012-02-29 10:55:05 UTC (rev 39190)
@@ -44,9 +44,9 @@
if (projectHelper.projectExists(getProjectName())) {
LOGGER.info("Dynamic Web Project with CDI Facet created");
assertTrue("Error: beans.xml should be created when selecting CDI Facet",
- projectExplorer.isFilePresent(getProjectName(),
- CDIConstants.WEB_INF_BEANS_XML_PATH.split("/")));
- } else {
+ packageExplorer.isFilePresent(getProjectName(),
+ CDIConstants.WEB_INF_BEANS_XML_PATH.split("/")));
+ }else {
fail("CDI project was not succesfully created with Dynamic Web Project wizard with CDI facet");
}
12 years, 9 months
JBoss Tools SVN: r39189 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-02-29 01:45:45 -0500 (Wed, 29 Feb 2012)
New Revision: 39189
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressWizardFragment.java
Log:
JBIDE-10527 to trunk
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressWizardFragment.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressWizardFragment.java 2012-02-29 06:27:59 UTC (rev 39188)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressWizardFragment.java 2012-02-29 06:45:45 UTC (rev 39189)
@@ -33,7 +33,7 @@
private NewServerWizardBehaviourCallback callback;
public ExpressWizardFragment() {
- // TODO Auto-generated constructor stub
+ setComplete(false);
}
public boolean hasComposite() {
12 years, 9 months
JBoss Tools SVN: r39188 - trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-02-29 01:27:59 -0500 (Wed, 29 Feb 2012)
New Revision: 39188
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/CustomRuntimeClasspathModel.java
Log:
JBIDE-10473 (re-opened) to trunk (adding ejb jars to as70 classpath)
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/CustomRuntimeClasspathModel.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/CustomRuntimeClasspathModel.java 2012-02-29 05:04:52 UTC (rev 39187)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/CustomRuntimeClasspathModel.java 2012-02-29 06:27:59 UTC (rev 39188)
@@ -185,14 +185,12 @@
sets.add(new PathProviderFileset("modules/org/jboss/resteasy/resteasy-jaxrs/main"));
sets.add(new PathProviderFileset("modules/org/jboss/resteasy/resteasy-multipart-provider/main"));
+ sets.add(new PathProviderFileset("modules/org/jboss/ejb3/main"));
return (IDefaultPathProvider[]) sets.toArray(new IDefaultPathProvider[sets.size()]);
}
public IDefaultPathProvider[] getDefaultAS71Entries() {
- ArrayList<IDefaultPathProvider> sets = new ArrayList<IDefaultPathProvider>();
- sets.addAll(Arrays.asList(getDefaultAS70Entries()));
- sets.add(new PathProviderFileset("modules/org/jboss/ejb3/main"));
- return (IDefaultPathProvider[]) sets.toArray(new IDefaultPathProvider[sets.size()]);
+ return getDefaultAS70Entries();
}
public IPath[] getAllEntries(IRuntime runtime, IDefaultPathProvider[] sets) {
12 years, 9 months
JBoss Tools SVN: r39187 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-02-29 00:04:52 -0500 (Wed, 29 Feb 2012)
New Revision: 39187
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml
Log:
Openshift "behavior" for AS has been disabled, opting for hybrid server adapter instead. Removing extension point causing error in error log.
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml 2012-02-29 04:14:20 UTC (rev 39186)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml 2012-02-29 05:04:52 UTC (rev 39187)
@@ -2,11 +2,6 @@
<?eclipse version="3.4"?>
<plugin>
<extension
- point="org.jboss.ide.eclipse.as.ui.DeployMethodUI">
- <ui deployMethodId="openshift"
- class="org.jboss.tools.openshift.express.internal.ui.behaviour.OpenShiftDeployUI"/>
- </extension>
- <extension
point="org.eclipse.ui.newWizards">
<category
id="org.jboss.ide.eclipse.as.openshift.express.ui.wizard.category"
12 years, 9 months
JBoss Tools SVN: r39186 - in trunk/as/plugins: org.jboss.ide.eclipse.as.core and 6 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-02-28 23:14:20 -0500 (Tue, 28 Feb 2012)
New Revision: 39186
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ExtendedServerPropertiesAdapterFactory.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/extendedproperties/
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/extendedproperties/JBossAS7ExtendedProperties.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/extendedproperties/JBossExtendedProperties.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/filesets/FilesetActionProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/filesets/FilesetDialog.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/META-INF/MANIFEST.MF
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/resolvers/ConfigNameResolver.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerUtil.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/JMXServerLifecycleListener.java
Log:
JBIDE-11059 - cosmetic change to trunk for default fileset location.
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/filesets/FilesetActionProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/filesets/FilesetActionProvider.java 2012-02-29 01:25:55 UTC (rev 39185)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/filesets/FilesetActionProvider.java 2012-02-29 04:14:20 UTC (rev 39186)
@@ -17,7 +17,6 @@
import org.eclipse.core.filesystem.IFileStore;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
@@ -51,9 +50,8 @@
import org.jboss.ide.eclipse.archives.webtools.filesets.FilesetContentProvider.PathWrapper;
import org.jboss.ide.eclipse.archives.webtools.filesets.FilesetContentProvider.ServerWrapper;
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
-import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
+import org.jboss.ide.eclipse.as.core.server.internal.extendedproperties.JBossExtendedProperties;
import org.jboss.ide.eclipse.as.core.util.FileUtil;
-import org.jboss.ide.eclipse.as.core.util.IConstants;
import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
public class FilesetActionProvider extends CommonActionProvider implements IDoubleClickListener {
@@ -196,23 +194,11 @@
IDeployableServer server = (IDeployableServer) iserver
.loadAdapter(IDeployableServer.class,
new NullProgressMonitor());
- String location = null;
- if (server != null && server.getServer().getRuntime() != null ) {
- IJBossServerRuntime runtime = (IJBossServerRuntime)
- server.getServer().getRuntime().loadAdapter(IJBossServerRuntime.class, null);
- if( runtime != null ) {
- location = IConstants.SERVER + IPath.SEPARATOR + runtime.getJBossConfiguration();
- }
- }
- if( location == null && iserver.getRuntime() != null)
- location = iserver.getRuntime().getLocation().toOSString();
- else if( location == null && iserver.getRuntime() == null ) {
- // use workspace location as default if no runtime
- location = ResourcesPlugin.getWorkspace().getRoot().getLocation().toOSString();
- }
+ JBossExtendedProperties o = (JBossExtendedProperties)iserver.loadAdapter(JBossExtendedProperties.class, new NullProgressMonitor());
+ String defaultFolder = o == null ? "" : o.getNewFilesetDefaultRootFolder(); //$NON-NLS-1$
- if (location != null) {
- FilesetDialog d = new FilesetDialog(new Shell(), location, iserver);
+ if (defaultFolder != null) {
+ FilesetDialog d = new FilesetDialog(new Shell(), defaultFolder, iserver);
if (d.open() == Window.OK) {
Fileset fs = d.getFileset();
wrapper.addFileset(fs);
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/filesets/FilesetDialog.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/filesets/FilesetDialog.java 2012-02-29 01:25:55 UTC (rev 39185)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/filesets/FilesetDialog.java 2012-02-29 04:14:20 UTC (rev 39186)
@@ -49,7 +49,6 @@
this.fileset = new Fileset();
this.fileset.setFolder(defaultLocation);
this.fileset.setServer(server);
- this.fileset.setFolder("server/${jboss_config}/"); //$NON-NLS-1$
this.fileset.setIncludesPattern("**/*.xml"); //$NON-NLS-1$
this.server = server;
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/META-INF/MANIFEST.MF 2012-02-29 01:25:55 UTC (rev 39185)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/META-INF/MANIFEST.MF 2012-02-29 04:14:20 UTC (rev 39186)
@@ -38,6 +38,7 @@
org.jboss.ide.eclipse.as.core.server,
org.jboss.ide.eclipse.as.core.server.bean,
org.jboss.ide.eclipse.as.core.server.internal,
+ org.jboss.ide.eclipse.as.core.server.internal.extendedproperties,
org.jboss.ide.eclipse.as.core.server.internal.launch,
org.jboss.ide.eclipse.as.core.server.internal.launch.configuration,
org.jboss.ide.eclipse.as.core.server.internal.v7,
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/resolvers/ConfigNameResolver.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/resolvers/ConfigNameResolver.java 2012-02-29 01:25:55 UTC (rev 39185)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/resolvers/ConfigNameResolver.java 2012-02-29 04:14:20 UTC (rev 39186)
@@ -78,11 +78,11 @@
return null;
}
- private String getVariablePattern(String var) {
+ public static String getVariablePattern(String var) {
return "${" + var + "}"; //$NON-NLS-1$ //$NON-NLS-2$
}
- private String getVariablePattern(String var, String serverOrRuntimeName) {
+ public static String getVariablePattern(String var, String serverOrRuntimeName) {
return "${" + var + ":" + serverOrRuntimeName + "}"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ExtendedServerPropertiesAdapterFactory.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ExtendedServerPropertiesAdapterFactory.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ExtendedServerPropertiesAdapterFactory.java 2012-02-29 04:14:20 UTC (rev 39186)
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.ide.eclipse.as.core.server.internal;
+
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.eclipse.wst.server.core.IServer;
+import org.jboss.ide.eclipse.as.core.server.internal.extendedproperties.JBossAS7ExtendedProperties;
+import org.jboss.ide.eclipse.as.core.server.internal.extendedproperties.JBossExtendedProperties;
+import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
+
+public class ExtendedServerPropertiesAdapterFactory implements IAdapterFactory {
+
+ @Override
+ public Object getAdapter(Object adaptableObject, Class adapterType) {
+ if( adaptableObject instanceof IServer ) {
+ String typeId = ((IServer)adaptableObject).getServerType().getId();
+ if( IJBossToolingConstants.SERVER_AS_32.equals(typeId))
+ return new JBossExtendedProperties((IServer)adaptableObject);
+ if( IJBossToolingConstants.SERVER_AS_40.equals(typeId))
+ return new JBossExtendedProperties((IServer)adaptableObject);
+ if( IJBossToolingConstants.SERVER_AS_42.equals(typeId))
+ return new JBossExtendedProperties((IServer)adaptableObject);
+ if( IJBossToolingConstants.SERVER_AS_50.equals(typeId))
+ return new JBossExtendedProperties((IServer)adaptableObject);
+ if( IJBossToolingConstants.SERVER_AS_51.equals(typeId))
+ return new JBossExtendedProperties((IServer)adaptableObject);
+ if( IJBossToolingConstants.SERVER_AS_60.equals(typeId))
+ return new JBossExtendedProperties((IServer)adaptableObject);
+ if( IJBossToolingConstants.SERVER_EAP_43.equals(typeId))
+ return new JBossExtendedProperties((IServer)adaptableObject);
+ if( IJBossToolingConstants.SERVER_EAP_50.equals(typeId))
+ return new JBossExtendedProperties((IServer)adaptableObject);
+
+ if( IJBossToolingConstants.SERVER_AS_70.equals(typeId))
+ return new JBossAS7ExtendedProperties((IServer)adaptableObject);
+ if( IJBossToolingConstants.SERVER_AS_71.equals(typeId))
+ return new JBossAS7ExtendedProperties((IServer)adaptableObject);
+ if( IJBossToolingConstants.SERVER_EAP_60.equals(typeId))
+ return new JBossAS7ExtendedProperties((IServer)adaptableObject);
+
+ // NEW_SERVER_ADAPTER
+ }
+ return null;
+ }
+
+ @Override
+ public Class[] getAdapterList() {
+ return new Class[]{ JBossExtendedProperties.class};
+ }
+
+}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java 2012-02-29 01:25:55 UTC (rev 39185)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java 2012-02-29 04:14:20 UTC (rev 39186)
@@ -50,6 +50,7 @@
import org.jboss.ide.eclipse.as.core.publishers.LocalPublishMethod;
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
+import org.jboss.ide.eclipse.as.core.server.internal.extendedproperties.JBossExtendedProperties;
import org.jboss.ide.eclipse.as.core.util.DeploymentPreferenceLoader;
import org.jboss.ide.eclipse.as.core.util.ExpressionResolverUtil;
import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
@@ -103,6 +104,9 @@
}
public String getDeployFolder(String type) {
+ if( type.equals(DEPLOY_SERVER)) {
+ return getExtendedProperties().getServerDeployLocation();
+ }
return getDeployFolder(this, type);
}
@@ -111,35 +115,41 @@
* deeply introspect the value for specific deployment location
* constants.
*
+ * Only Custom and Metadata are supported for this method
+ * Server paths will not be returned here (server/default/deploy etc)
+ *
* @param jbs
* @param type
* @return
*/
public static String getDeployFolder(JBossServer jbs, String type) {
- IServer server = jbs.getServer();
- IJBossServerRuntime jbsrt = RuntimeUtils.getJBossServerRuntime(server);
+ String ret = null;
if( type.equals(DEPLOY_CUSTOM)) {
- String val = jbs.getAttribute(DEPLOY_DIRECTORY, (String)null);
- if( val != null ) {
- IPath val2 = new Path(val);
- return ServerUtil.makeGlobal(jbsrt.getRuntime(), val2).toString();
- }
- // if no value is set, default to metadata
- type = DEPLOY_METADATA;
+ ret = getCustomDeployLocationFromSettings(jbs.getServer(), DEPLOY_DIRECTORY);
}
- if( type.equals(DEPLOY_METADATA)) {
- return JBossServerCorePlugin.getServerStateLocation(server).
- append(DEPLOY).makeAbsolute().toString();
- } else if( type.equals(DEPLOY_SERVER)) {
- String loc = jbsrt.getConfigLocation();
- String config = jbsrt.getJBossConfiguration();
- IPath p = new Path(loc).append(config)
- .append(DEPLOY);
- return ServerUtil.makeGlobal(jbsrt.getRuntime(), p).toString();
+ if( ret == null || type.equals(DEPLOY_METADATA)) {
+ return getMetadataDeployLocation(jbs.getServer());
+ }
+ return null;
+ }
+
+ public static String getCustomDeployLocationFromSettings(IServer server, String attribute) {
+ String val = server.getAttribute(attribute, (String)null);
+ if( val != null ) {
+ IPath val2 = new Path(val);
+ return ServerUtil.makeGlobal(server.getRuntime(), val2).toString();
}
return null;
}
+ public static String getMetadataDeployLocation(IServer server) {
+ return JBossServerCorePlugin.getServerStateLocation(server).append(DEPLOY).makeAbsolute().toString();
+ }
+
+ public JBossExtendedProperties getExtendedProperties() {
+ return (JBossExtendedProperties)getServer().loadAdapter(JBossExtendedProperties.class, null);
+ }
+
public String getTempDeployFolder() {
return getTempDeployFolder(this, getDeployLocationType());
}
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/extendedproperties/JBossAS7ExtendedProperties.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/extendedproperties/JBossAS7ExtendedProperties.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/extendedproperties/JBossAS7ExtendedProperties.java 2012-02-29 04:14:20 UTC (rev 39186)
@@ -0,0 +1,16 @@
+package org.jboss.ide.eclipse.as.core.server.internal.extendedproperties;
+
+import org.eclipse.wst.server.core.IServer;
+
+/**
+ *
+ */
+public class JBossAS7ExtendedProperties extends JBossExtendedProperties {
+ public JBossAS7ExtendedProperties(IServer server) {
+ super(server);
+ }
+
+ public String getNewFilesetDefaultRootFolder() {
+ return "standalone/configuration"; //$NON-NLS-1$
+ }
+}
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/extendedproperties/JBossExtendedProperties.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/extendedproperties/JBossExtendedProperties.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/extendedproperties/JBossExtendedProperties.java 2012-02-29 04:14:20 UTC (rev 39186)
@@ -0,0 +1,31 @@
+package org.jboss.ide.eclipse.as.core.server.internal.extendedproperties;
+
+import org.eclipse.wst.server.core.IServer;
+import org.jboss.ide.eclipse.as.core.resolvers.ConfigNameResolver;
+import org.jboss.ide.eclipse.as.core.util.IJBossRuntimeResourceConstants;
+
+/**
+ * The superclass containing most functionality, to be overridden as necessary.
+ * The contents of this are all sorts of errata that do not really fit anywhere
+ * else, but need to be customized on a per-server or per-server-type basis
+ *
+ */
+public class JBossExtendedProperties {
+ private IServer server;
+ public JBossExtendedProperties(IServer server) {
+ this.server = server;
+ }
+ public String getNewFilesetDefaultRootFolder() {
+ return "servers/${jboss_config}"; //$NON-NLS-1$
+ }
+
+ /**
+ * Returns the full path of a local server's server/{config}/deploy folder
+ */
+ public String getServerDeployLocation() {
+ String original = ConfigNameResolver.getVariablePattern(ConfigNameResolver.JBOSS_CONFIG_DIR) +
+ "/" + IJBossRuntimeResourceConstants.DEPLOY; //$NON-NLS-1$
+ return new ConfigNameResolver().performSubstitutions(
+ original, server.getName());
+ }
+}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerUtil.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerUtil.java 2012-02-29 01:25:55 UTC (rev 39185)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerUtil.java 2012-02-29 04:14:20 UTC (rev 39186)
@@ -80,9 +80,13 @@
}
public static IPath makeGlobal(IRuntime rt, IPath p) {
+ return rt == null ? p : makeGlobal(rt.getLocation(), p);
+ }
+
+ public static IPath makeGlobal(IPath rtLocation, IPath p) {
if( !p.isAbsolute() ) {
- if( rt != null && rt.getLocation() != null ) {
- return rt.getLocation().append(p).makeAbsolute();
+ if( rtLocation != null && rtLocation != null ) {
+ return rtLocation.append(p).makeAbsolute();
}
return p.makeAbsolute();
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2012-02-29 01:25:55 UTC (rev 39185)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2012-02-29 04:14:20 UTC (rev 39186)
@@ -1194,9 +1194,9 @@
point="org.eclipse.core.runtime.adapters">
<factory
adaptableType="org.eclipse.wst.server.core.IServer"
- class="org.jboss.ide.eclipse.as.core.server.internal.ExtendedPropertiesServerAdapterFactory">
+ class="org.jboss.ide.eclipse.as.core.server.internal.ExtendedServerPropertiesAdapterFactory">
<adapter
- type="org.jboss.ide.eclipse.as.core.Adapter1">
+ type="org.jboss.ide.eclipse.as.core.server.internal.extendedproperties.JBossExtendedProperties">
</adapter>
</factory>
</extension>
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/JMXServerLifecycleListener.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/JMXServerLifecycleListener.java 2012-02-29 01:25:55 UTC (rev 39185)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/JMXServerLifecycleListener.java 2012-02-29 04:14:20 UTC (rev 39186)
@@ -79,7 +79,7 @@
JBossServer ds = ServerConverter.getJBossServer(server);
ArrayList<String> folders = new ArrayList<String>();
// add the server folder deploy loc. first
- String insideServer = JBossServer.getDeployFolder(ds, JBossServer.DEPLOY_SERVER);
+ String insideServer = ds.getDeployFolder(JBossServer.DEPLOY_SERVER);
String metadata = JBossServer.getDeployFolder(ds, JBossServer.DEPLOY_METADATA);
String custom = JBossServer.getDeployFolder(ds, JBossServer.DEPLOY_CUSTOM);
String type = ds.getDeployLocationType();
12 years, 9 months
JBoss Tools SVN: r39185 - branches/jbosstools-3.3.0.Beta1/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-02-28 20:25:55 -0500 (Tue, 28 Feb 2012)
New Revision: 39185
Modified:
branches/jbosstools-3.3.0.Beta1/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/AbstractXMLFileImpl.java
branches/jbosstools-3.3.0.Beta1/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileXMLImpl.java
Log:
JBIDE-11066
https://issues.jboss.org/browse/JBIDE-11066
Merge to Beta1: Prevented loading of entities from internet.
Modified: branches/jbosstools-3.3.0.Beta1/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/AbstractXMLFileImpl.java
===================================================================
--- branches/jbosstools-3.3.0.Beta1/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/AbstractXMLFileImpl.java 2012-02-29 01:22:23 UTC (rev 39184)
+++ branches/jbosstools-3.3.0.Beta1/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/AbstractXMLFileImpl.java 2012-02-29 01:25:55 UTC (rev 39185)
@@ -13,7 +13,6 @@
import java.text.MessageFormat;
import java.util.*;
import org.jboss.tools.common.model.markers.ResourceMarkers;
-import org.jboss.tools.common.model.plugin.ModelPlugin;
import org.jboss.tools.common.model.XModelObjectConstants;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.filesystems.impl.RecognizedFileImpl;
@@ -54,7 +53,12 @@
}
protected final void setErrors(String body, boolean checkDTD, boolean checkSchema) {
- String[] errors = (body.length() == 0) ? null : XMLUtil.getXMLErrors(new java.io.StringReader(body), checkDTD, checkSchema);
+ String[] errors = (body.length() == 0) ? null
+ //do not compute errors for unrecognized files.
+ : "FileXML".equals(getModelEntity().getName()) ? null //$NON-NLS-1$
+ //do not compute errors for files in jars
+ : (getParent() instanceof JarFolderImpl) ? null
+ : XMLUtil.getXMLErrors(new java.io.StringReader(body), checkDTD, checkSchema);
if(errors == null || errors.length == 0) {
if(loaderError != null) errors = new String[]{loaderError};
}
@@ -85,7 +89,7 @@
// but use similar format to mention io exception.
// ModelPlugin.getPluginLog().logError(e);
}
- String ep = MessageFormat.format("ERROR: {0} {1}", FindObjectHelper.makeRef(getPath() + ":" + ln1, ln + ":" + pos), er); //$NON-NLS-2$ //$NON-NLS-3$
+ String ep = MessageFormat.format("ERROR: {0} {1}", FindObjectHelper.makeRef(getPath() + ":" + ln1, ln + ":" + pos), er); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
if(iln < 0) markers.lines.remove(ep);
else markers.lines.put(ep, Integer.valueOf(iln));
sb.append(ep).append('\n');
Modified: branches/jbosstools-3.3.0.Beta1/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileXMLImpl.java
===================================================================
--- branches/jbosstools-3.3.0.Beta1/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileXMLImpl.java 2012-02-29 01:22:23 UTC (rev 39184)
+++ branches/jbosstools-3.3.0.Beta1/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileXMLImpl.java 2012-02-29 01:25:55 UTC (rev 39185)
@@ -31,7 +31,8 @@
if(name.equals("_hasErrors_")) { //$NON-NLS-1$
return super.get(XModelObjectConstants.ATTR_NAME_IS_INCORRECT);
}
- if(!markersReset && isActive()) {
+ if(!markersReset && isActive()
+ && !"NAME".equals(name) && !"EXTENSION".equals(name) && !"overlapped".equals(name)) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
updateMarkers(super.get(XModelObjectConstants.ATTR_NAME_BODY));
}
return super.get(name);
12 years, 9 months
JBoss Tools SVN: r39184 - branches/jbosstools-3.3.0.Beta1/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/xml.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-02-28 20:22:23 -0500 (Tue, 28 Feb 2012)
New Revision: 39184
Modified:
branches/jbosstools-3.3.0.Beta1/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/xml/XMLEntityResolver.java
branches/jbosstools-3.3.0.Beta1/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/xml/XMLUtilities.java
Log:
JBIDE-11066
https://issues.jboss.org/browse/JBIDE-11066
Merge to Beta1: Prevented loading of entities from internet.
Modified: branches/jbosstools-3.3.0.Beta1/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/xml/XMLEntityResolver.java
===================================================================
--- branches/jbosstools-3.3.0.Beta1/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/xml/XMLEntityResolver.java 2012-02-29 00:48:40 UTC (rev 39183)
+++ branches/jbosstools-3.3.0.Beta1/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/xml/XMLEntityResolver.java 2012-02-29 01:22:23 UTC (rev 39184)
@@ -10,6 +10,7 @@
import java.util.Properties;
import org.eclipse.core.runtime.FileLocator;
+import org.jboss.tools.common.CommonPlugin;
import org.xml.sax.EntityResolver;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
@@ -96,10 +97,16 @@
}
}
- if(deactivate && (systemId != null) && (source == null) && (systemId.toLowerCase().endsWith(".dtd"))) { // this deactivates DTD //$NON-NLS-1$
+ if(deactivate && (systemId != null) && (source == null)
+ // this deactivates DTD for .dtd and .ent resources
+ && (systemId.toLowerCase().endsWith(".dtd") || systemId.toLowerCase().endsWith(".ent"))
+ ) { //$NON-NLS-1$ //$NON-NLS-2$
source = new InputSource(new ByteArrayInputStream("<?xml version='1.0' encoding='UTF-8'?>".getBytes())); //$NON-NLS-1$
}
-
+ if(source == null) {
+ CommonPlugin.getDefault().logError("WARNING: Cannot resolve entity " + systemId); //$NON-NLS-1$
+ }
+ // TODO study if we can always return non-null value.
return source;
}
Modified: branches/jbosstools-3.3.0.Beta1/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/xml/XMLUtilities.java
===================================================================
--- branches/jbosstools-3.3.0.Beta1/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/xml/XMLUtilities.java 2012-02-29 00:48:40 UTC (rev 39183)
+++ branches/jbosstools-3.3.0.Beta1/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/xml/XMLUtilities.java 2012-02-29 01:22:23 UTC (rev 39184)
@@ -155,7 +155,8 @@
public static EntityResolver createEmptyEntityResolver() {
return new EntityResolver() {
public InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId) throws SAXException, java.io.IOException {
- if((systemId != null) && systemId.toLowerCase().endsWith(".dtd")) { // this deactivates DTD //$NON-NLS-1$
+ if((systemId != null) &&
+ (systemId.toLowerCase().endsWith(".dtd") || systemId.toLowerCase().endsWith(".ent"))) { // this deactivates DTD //$NON-NLS-1$ //$NON-NLS-2$
return new InputSource(new ByteArrayInputStream("<?xml version='1.0' encoding='UTF-8'?>".getBytes())); //$NON-NLS-1$
} else {
return null;
12 years, 9 months
JBoss Tools SVN: r39183 - in trunk/seam/tests: org.jboss.tools.seam.base.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2012-02-28 19:48:40 -0500 (Tue, 28 Feb 2012)
New Revision: 39183
Modified:
trunk/seam/tests/org.jboss.tools.seam.base.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/components.xml
trunk/seam/tests/org.jboss.tools.seam.base.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatelessClass.java
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/SeamUiAllTests.java
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/marker/SeamMarkerResolutionTest.java
Log:
test failures in Seam https://issues.jboss.org/browse/JBIDE-10956
Modified: trunk/seam/tests/org.jboss.tools.seam.base.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/components.xml
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.base.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/components.xml 2012-02-28 18:27:57 UTC (rev 39182)
+++ trunk/seam/tests/org.jboss.tools.seam.base.test/projects/SeamWebWarTestProject/WebContent/WEB-INF/components.xml 2012-02-29 00:48:40 UTC (rev 39183)
@@ -11,5 +11,8 @@
http://jboss.com/products/seam/security http://jboss.com/products/seam/security-1.2.xsd
http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-1.2.xsd
http://jboss.com/products/seam/components http://jboss.com/products/seam/components-1.2.xsd">
+ <component class="org.domain.SeamWebWarTestProject.session.StatefulComponentWithAbcField" scope="application">
+ <property name="abc">value1</property>
+ </component>
</components>
Modified: trunk/seam/tests/org.jboss.tools.seam.base.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatelessClass.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.base.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatelessClass.java 2012-02-28 18:27:57 UTC (rev 39182)
+++ trunk/seam/tests/org.jboss.tools.seam.base.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/StatelessClass.java 2012-02-29 00:48:40 UTC (rev 39183)
@@ -25,6 +25,11 @@
public void destroyMethod(){
}
+
+ @Destroy
+ public void destroyMethod2(){
+
+ }
public String getAbc() {
return abc;
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/SeamUiAllTests.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/SeamUiAllTests.java 2012-02-28 18:27:57 UTC (rev 39182)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/SeamUiAllTests.java 2012-02-29 00:48:40 UTC (rev 39183)
@@ -20,6 +20,7 @@
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.wst.validation.internal.operations.ValidatorManager;
+import org.jboss.tools.common.base.test.validation.ValidationProjectTestSetup;
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.seam.ui.test.ca.CASeamAddInfoInELMessagesTest;
@@ -83,24 +84,7 @@
suite.addTestSuite(Seam20XCreateTestProjectTest.class);
suite.addTestSuite(SeamProjectNamesTest.class);
suite.addTestSuite(Seam20XProjectNamesTest.class);
- suite.addTest(new ProjectImportTestSetup(new TestSuite(SeamMarkerResolutionTest.class),"org.jboss.tools.seam.base.test","projects/SeamWebWarTestProject","SeamWebWarTestProject") {
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- IProject project = (IProject)ResourcesPlugin.getWorkspace().getRoot().findMember("SeamWebWarTestProject");
- if (project == null)
- return;
- project.refreshLocal(IResource.DEPTH_INFINITE, null);
- JobUtils.waitForIdle();
- ISeamProject seamProject = SeamCorePlugin.getSeamProject(project, true);
- seamProject.setRuntimeName("UNKNOWN");
- ValidatorManager.addProjectBuildValidationSupport(project);
- project.build(IncrementalProjectBuilder.FULL_BUILD,
- new NullProgressMonitor());
-
- JobUtils.waitForIdle();
- }
- } );
+ suite.addTest(new ValidationProjectTestSetup(new TestSuite(SeamMarkerResolutionTest.class),"org.jboss.tools.seam.base.test","projects/SeamWebWarTestProject","SeamWebWarTestProject"));
suite.addTest(new ProjectImportTestSetup(new TestSuite(
CASeamAddInfoInELMessagesTest.class), "org.jboss.tools.seam.ui.test", //$NON-NLS-1$
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/marker/SeamMarkerResolutionTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/marker/SeamMarkerResolutionTest.java 2012-02-28 18:27:57 UTC (rev 39182)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/marker/SeamMarkerResolutionTest.java 2012-02-29 00:48:40 UTC (rev 39183)
@@ -26,6 +26,7 @@
import org.jboss.tools.seam.internal.core.validation.SeamCoreValidator;
import org.jboss.tools.seam.ui.marker.AddAnnotatedMethodMarkerResolution;
import org.jboss.tools.seam.ui.marker.AddAnnotationMarkerResolution;
+import org.jboss.tools.seam.ui.marker.AddSetterMarkerResolution;
import org.jboss.tools.seam.ui.marker.ChangeScopeMarkerResolution;
import org.jboss.tools.seam.ui.marker.DeleteAnnotationMarkerResolution;
import org.jboss.tools.seam.ui.marker.RenameAnnotationMarkerResolution;
@@ -46,8 +47,20 @@
this.project = project.getProject();
IPreferenceStore store = SeamCorePlugin.getDefault().getPreferenceStore();
- store.putValue(SeamPreferences.STATEFUL_COMPONENT_DOES_NOT_CONTENT_REMOVE, SeamPreferences.ERROR);
- store.putValue(SeamPreferences.STATEFUL_COMPONENT_DOES_NOT_CONTENT_DESTROY, SeamPreferences.ERROR);
+
+ store.putValue(SeamPreferences.DUPLICATE_REMOVE, SeamPreferences.WARNING);
+ store.putValue(SeamPreferences.DUPLICATE_DESTROY, SeamPreferences.WARNING);
+ store.putValue(SeamPreferences.DUPLICATE_CREATE, SeamPreferences.WARNING);
+ store.putValue(SeamPreferences.DUPLICATE_UNWRAP, SeamPreferences.WARNING);
+ store.putValue(SeamPreferences.CREATE_DOESNT_BELONG_TO_COMPONENT, SeamPreferences.WARNING);
+ store.putValue(SeamPreferences.UNWRAP_DOESNT_BELONG_TO_COMPONENT, SeamPreferences.WARNING);
+ store.putValue(SeamPreferences.OBSERVER_DOESNT_BELONG_TO_COMPONENT, SeamPreferences.WARNING);
+ store.putValue(SeamPreferences.NONUNIQUE_COMPONENT_NAME, SeamPreferences.WARNING);
+ store.putValue(SeamPreferences.STATEFUL_COMPONENT_DOES_NOT_CONTENT_REMOVE, SeamPreferences.WARNING);
+ store.putValue(SeamPreferences.STATEFUL_COMPONENT_DOES_NOT_CONTENT_DESTROY, SeamPreferences.WARNING);
+ store.putValue(SeamPreferences.STATEFUL_COMPONENT_WRONG_SCOPE, SeamPreferences.WARNING);
+ store.putValue(SeamPreferences.ENTITY_COMPONENT_WRONG_SCOPE, SeamPreferences.WARNING);
+ store.putValue(SeamPreferences.UNKNOWN_COMPONENT_PROPERTY, SeamPreferences.WARNING);
if(store instanceof IPersistentPreferenceStore) {
try {
@@ -84,16 +97,16 @@
DeleteAnnotationMarkerResolution.class);
}
-// public void testDuplicateDestroyAnnotationResolution2() throws CoreException {
-// MarkerResolutionTestUtil.checkResolution(project,
-// new String[]{
-// "src/action/org/domain/SeamWebWarTestProject/session/StatelessClass.java"
-// },
-// SeamCoreValidator.PROBLEM_TYPE,
-// SeamCoreValidator.MESSAGE_ID_ATTRIBUTE_NAME,
-// SeamCoreValidator.DUPLICATE_DESTROY_MESSAGE_ID,
-// DeleteAnnotationMarkerResolution.class);
-// }
+ public void testDuplicateDestroyAnnotationResolution2() throws CoreException {
+ MarkerResolutionTestUtil.checkResolution(project,
+ new String[]{
+ "src/action/org/domain/SeamWebWarTestProject/session/StatelessClass.java"
+ },
+ SeamCoreValidator.PROBLEM_TYPE,
+ SeamCoreValidator.MESSAGE_ID_ATTRIBUTE_NAME,
+ SeamCoreValidator.DUPLICATE_DESTROY_MESSAGE_ID,
+ DeleteAnnotationMarkerResolution.class);
+ }
public void testDuplicateCreateAnnotationResolution() throws CoreException {
MarkerResolutionTestUtil.checkResolution(project,
@@ -249,42 +262,14 @@
ChangeScopeMarkerResolution.class);
}
-// public void fixMeTestAddSetterForProperty() throws CoreException {
-// String TARGET_FILE_NAME = "WebContent/WEB-INF/components.xml";
-// copyContentsFile(TARGET_FILE_NAME, "WebContent/WEB-INF/components.3");
-//
-// project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, SeamCoreBuilder.BUILDER_ID, null, null);
-//
-// JobUtils.waitForIdle();
-//
-// IFile file = project.getFile(TARGET_FILE_NAME);
-//
-// assertTrue("File - "+TARGET_FILE_NAME+" must be exists",file.exists());
-//
-// IMarker[] markers = file.findMarkers(SeamCoreValidator.PROBLEM_TYPE, true, IResource.DEPTH_INFINITE);
-//
-// assertTrue("Problem marker not found", markers.length > 0);
-//
-// boolean found = false;
-// for (int i = 0; i < markers.length; i++) {
-// IMarker marker = markers[i];
-// IMarkerResolution[] resolutions = IDE.getMarkerHelpRegistry()
-// .getResolutions(marker);
-// //checkForConfigureProblemSeverity(resolutions);
-// //checkForAddSuppressWarnings(file, marker, resolutions);
-// for (int j = 0; j < resolutions.length; j++) {
-// IMarkerResolution resolution = resolutions[j];
-// if (resolution instanceof AddSetterMarkerResolution) {
-// found = true;
-// break;
-// }
-// }
-// if (found) {
-// break;
-// }
-// }
-// assertTrue("The quickfix \"Add setter for 'abc' property in 'org.domain.SeamWebWarTestProject.session.StatefulComponentWithAbcField' class\" doesn't exist.", found);
-// }
-
-
+ public void testAddSetterForProperty() throws CoreException {
+ MarkerResolutionTestUtil.checkResolution(project,
+ new String[]{
+ "WebContent/WEB-INF/components.xml"
+ },
+ SeamCoreValidator.PROBLEM_TYPE,
+ SeamCoreValidator.MESSAGE_ID_ATTRIBUTE_NAME,
+ SeamCoreValidator.UNKNOWN_COMPONENT_PROPERTY_ID,
+ AddSetterMarkerResolution.class);
+ }
}
12 years, 9 months
JBoss Tools SVN: r39182 - in trunk/vpe/tests/org.jboss.tools.vpe.ui.test: resources/TestProject/WebContent/pages and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2012-02-28 13:27:57 -0500 (Tue, 28 Feb 2012)
New Revision: 39182
Added:
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/editor/ToggleClassCastTest_Jbide9790.java
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/META-INF/MANIFEST.MF
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/resources/TestProject/WebContent/pages/facets.jsp
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeUiTests.java
Log:
https://issues.jboss.org/browse/JBIDE-9790 - JUnit for ClassCastException was added.
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.test/META-INF/MANIFEST.MF 2012-02-28 17:50:16 UTC (rev 39181)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.test/META-INF/MANIFEST.MF 2012-02-28 18:27:57 UTC (rev 39182)
@@ -22,7 +22,8 @@
org.jboss.tools.vpe.resref,
javax.servlet;bundle-version="2.5.0",
org.eclipse.wst.xml.xpath.core,
- org.jboss.tools.vpe.base.test;bundle-version="1.0.0"
+ org.jboss.tools.vpe.base.test;bundle-version="1.0.0",
+ org.eclipse.wst.html.core
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .,
lib/jmock-2.5.1/jmock-2.5.1.jar,
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.test/resources/TestProject/WebContent/pages/facets.jsp
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.test/resources/TestProject/WebContent/pages/facets.jsp 2012-02-28 17:50:16 UTC (rev 39181)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.test/resources/TestProject/WebContent/pages/facets.jsp 2012-02-28 18:27:57 UTC (rev 39182)
@@ -1301,16 +1301,8 @@
<h:outputText> Download speed 100 Mbit/s </h:outputText>
<h:outputText> last text </h:outputText>
</rich:progressBar>
-
<rich:progressBar value="30" >
</rich:progressBar>
-
<rich:progressBar value="45">
</rich:progressBar>
-
-</h:panelGrid>
-
-
-</f:view>
-</body>
-</html>
+</h:panelGrid> </f:view> </body> </html>
\ No newline at end of file
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeUiTests.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeUiTests.java 2012-02-28 17:50:16 UTC (rev 39181)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeUiTests.java 2012-02-28 18:27:57 UTC (rev 39182)
@@ -19,6 +19,7 @@
import org.jboss.tools.vpe.ui.test.editor.CustomSashFormTest;
import org.jboss.tools.vpe.ui.test.editor.MultipleSelectionTest;
import org.jboss.tools.vpe.ui.test.editor.ScrollingTest_Jbide8701;
+import org.jboss.tools.vpe.ui.test.editor.ToggleClassCastTest_Jbide9790;
import org.jboss.tools.vpe.ui.test.handlers.VpeCommandsTests;
import org.jboss.tools.vpe.ui.test.preferences.VpeEditorPreferencesPageTest;
@@ -38,6 +39,7 @@
suite.addTestSuite(VpeEditAnyDialogTest.class);
suite.addTestSuite(MultipleSelectionTest.class);
// suite.addTestSuite(ScrollingTest_Jbide8701.class);
+ suite.addTestSuite(ToggleClassCastTest_Jbide9790.class);
return new VpeTestSetup(suite);
}
}
Added: trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/editor/ToggleClassCastTest_Jbide9790.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/editor/ToggleClassCastTest_Jbide9790.java (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/editor/ToggleClassCastTest_Jbide9790.java 2012-02-28 18:27:57 UTC (rev 39182)
@@ -0,0 +1,120 @@
+/*******************************************************************************
+ * 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.vpe.ui.test.editor;
+
+import static org.jboss.tools.vpe.xulrunner.util.XPCOM.queryInterface;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jst.jsp.core.internal.domdocument.ElementImplForJSP;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.part.FileEditorInput;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.vpe.base.test.TestUtil;
+import org.jboss.tools.vpe.base.test.VpeTest;
+import org.jboss.tools.vpe.editor.VpeController;
+import org.jboss.tools.vpe.editor.VpeEditorPart;
+import org.jboss.tools.vpe.editor.VpeVisualDomBuilder;
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.mapping.VpeElementMapping;
+import org.jboss.tools.vpe.editor.mozilla.MozillaEditor;
+import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
+import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.jboss.tools.vpe.editor.template.VpeTemplate;
+import org.jboss.tools.vpe.editor.template.VpeToggableTemplate;
+import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.ui.test.VpeUiTests;
+import org.jboss.tools.vpe.xulrunner.editor.XulRunnerEditor;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMNode;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+public class ToggleClassCastTest_Jbide9790 extends VpeTest {
+
+ private final String INITIALIZATION_FAILED = "Initialization failed!"; //$NON-NLS-1$
+ private final String FILE_NAME = "facets.jsp"; //$NON-NLS-1$
+
+ public ToggleClassCastTest_Jbide9790(String name) {
+ super(name);
+ }
+
+ public void testCustomTemplate() throws Throwable {
+ IFile file = (IFile) TestUtil.getComponentPath(FILE_NAME,
+ VpeUiTests.IMPORT_PROJECT_NAME);
+ assertNotNull("Specified file does not exist: file name = " + FILE_NAME //$NON-NLS-1$
+ + "; project name = " + VpeUiTests.IMPORT_PROJECT_NAME, file); //$NON-NLS-1$
+ /*
+ * Open file in the VPE
+ */
+ IEditorInput input = new FileEditorInput(file);
+ assertNotNull(INITIALIZATION_FAILED, input);
+
+ JSPMultiPageEditor part = openEditor(input);
+ assertNotNull(INITIALIZATION_FAILED, part);
+
+ VpeEditorPart vep = (VpeEditorPart) part.getVisualEditor();
+ assertNotNull(INITIALIZATION_FAILED, vep);
+
+ VpeController vc = TestUtil.getVpeController(part);
+ MozillaEditor visualEditor = vep.getVisualEditor();
+
+ /*
+ * Create custom template
+ */
+ VpeTemplate template = new TestVPETemplate();
+ VpeVisualDomBuilder vvdb = vc.getVisualBuilder();
+
+ /*
+ * Create source and visual nodes
+ */
+ Element sourceNode = new ElementImplForJSP();
+ VpeCreationData creationData = template.create(
+ vc.getPageContext(), sourceNode, visualEditor.getDomDocument());
+ nsIDOMNode visualNode = creationData.getNode();
+ /*
+ * Put visual node to the DOMMapping
+ */
+ nsIDOMNode newNode = queryInterface(visualNode, nsIDOMNode.class);
+ VpeElementMapping nodeMapping = new VpeElementMapping(
+ sourceNode, newNode, template, null, null, null);
+ vc.getDomMapping().mapNodes(nodeMapping);
+ /*
+ * Update selected nodes in XulRunnerEditor
+ */
+ XulRunnerEditor xulRunnerEditor = visualEditor.getXulRunnerEditor();
+ List<nsIDOMNode> selectedNodes = new ArrayList<nsIDOMNode>();
+ selectedNodes.add(newNode);
+ xulRunnerEditor.setSelectionRectangle(selectedNodes, 0);
+ /*
+ * Call doToggle(..) method.
+ * It should work without exceptions.
+ */
+ vvdb.doToggle(newNode);
+ }
+}
+
+class TestVPETemplate extends VpeAbstractTemplate implements VpeToggableTemplate {
+ @Override
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
+ nsIDOMDocument visualDocument) {
+ nsIDOMElement div = visualDocument.createElement(HTML.TAG_DIV);
+ div.setAttribute(VpeVisualDomBuilder.VPE_USER_TOGGLE_ID, "ID1"); //$NON-NLS-1$
+ return new VpeCreationData(div);
+ }
+ @Override
+ public void toggle(VpeVisualDomBuilder builder, Node sourceNode, String toggleId) {}
+ @Override
+ public void stopToggling(Node sourceNode) {}
+}
\ No newline at end of file
12 years, 9 months
JBoss Tools SVN: r39181 - trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2012-02-28 12:50:16 -0500 (Tue, 28 Feb 2012)
New Revision: 39181
Modified:
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/pom.xml
Log:
adde emma coverage parameters to fix exceptions in soa build
Modified: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/pom.xml
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/pom.xml 2012-02-28 17:45:03 UTC (rev 39180)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/pom.xml 2012-02-28 17:50:16 UTC (rev 39181)
@@ -10,6 +10,11 @@
<artifactId>org.jboss.tools.bpel.ui.bot.test</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
+
+ <properties>
+ <emma.filter>org.jboss.tools.bpel.runtimes*</emma.filter>
+ <emma.instrument.bundles>org.jboss.tools.bpel.runtimes</emma.instrument.bundles>
+ </properties>
<build>
<plugins>
12 years, 9 months