JBoss Tools SVN: r8914 - in trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces: src/org/jboss/tools/jsf/vpe/richfaces/template and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2008-06-24 06:09:10 -0400 (Tue, 24 Jun 2008)
New Revision: 8914
Added:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/tabPanel/active.gif
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/tabPanel/disabled.gif
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/tabPanel/inactive.gif
Removed:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/tabPanel/activeBackground.gif
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/tabPanel/inactiveBackground.gif
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/tabPanel/tabPanel.css
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTabPanelTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTabTemplate.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1697, style classes were changed, resolving tab labels from bundle was added.
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/tabPanel/active.gif
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/tabPanel/active.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Deleted: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/tabPanel/activeBackground.gif
===================================================================
(Binary files differ)
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/tabPanel/disabled.gif
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/tabPanel/disabled.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/tabPanel/inactive.gif
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/tabPanel/inactive.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Deleted: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/tabPanel/inactiveBackground.gif
===================================================================
(Binary files differ)
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/tabPanel/tabPanel.css
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/tabPanel/tabPanel.css 2008-06-24 08:33:46 UTC (rev 8913)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/tabPanel/tabPanel.css 2008-06-24 10:09:10 UTC (rev 8914)
@@ -60,6 +60,7 @@
}
.rich-tab-active {
+ background-image: url(active.gif);
background-repeat: repeat-x;
background-position: top;
cursor: default;
@@ -69,6 +70,7 @@
}
.rich-tab-inactive {
+ background-image: url(inactive.gif);
background-repeat: repeat-x;
background-position: top;
cursor: default;
@@ -76,6 +78,7 @@
}
.rich-tab-disabled {
+ background-image: url(disabled.gif);
background-repeat: repeat-x;
background-position: top;
cursor: default;
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTabPanelTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTabPanelTemplate.java 2008-06-24 08:33:46 UTC (rev 8913)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTabPanelTemplate.java 2008-06-24 10:09:10 UTC (rev 8914)
@@ -99,7 +99,8 @@
nsIDOMElement td = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TD);
tr.appendChild(td);
td.setAttribute(HtmlComponentUtil.HTML_ALIGN_ATTR, getHeaderAlignment(sourceElement));
-
+ td.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, ComponentUtil
+ .getAttribute(sourceElement, HEADER_CLASS));
nsIDOMElement inerTable = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TABLE);
td.appendChild(inerTable);
inerTable.setAttribute(HtmlComponentUtil.HTML_BORDER_ATTR, ZERO);
@@ -139,13 +140,12 @@
addSpacer(visualDocument, inerTr, headerSpacing);
}
- nsIDOMElement headerTd = RichFacesTabTemplate.encodeHeader(creationData,
+ nsIDOMElement headerTd = RichFacesTabTemplate.encodeHeader(
+ pageContext,
+ creationData,
(Element) child,
- visualDocument, inerTr, active,
- ComponentUtil.getAttribute(sourceElement,
- HEADER_CLASS)
- + SPACE
- + ComponentUtil.getAttribute(sourceElement,
+ visualDocument, inerTr, active,
+ ComponentUtil.getAttribute(sourceElement,
TAB_CLASS),
ComponentUtil.getAttribute(sourceElement,
ACTIVE_TAB_CLASS)
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTabTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTabTemplate.java 2008-06-24 08:33:46 UTC (rev 8913)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTabTemplate.java 2008-06-24 10:09:10 UTC (rev 8914)
@@ -20,6 +20,8 @@
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMText;
+import org.w3c.dom.Attr;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -31,8 +33,6 @@
public static final String TAB_BODY_ATTR = "tabbodyattr"; //$NON-NLS-1$
private final static String SPACER_FILE_PATH = "common/spacer.gif"; //$NON-NLS-1$
- private final static String ACTIVE_BKG_FILE_PATH = "tabPanel/activeBackground.gif"; //$NON-NLS-1$
- private final static String INACTIVE_BKG_FILE_PATH = "tabPanel/inactiveBackground.gif"; //$NON-NLS-1$
private final static String BORDER_FILE_PATH = "tabPanel/border.gif"; //$NON-NLS-1$
private final static String VPE_USER_TOGGLE_ID = "vpe-user-toggle-id"; //$NON-NLS-1$
@@ -115,7 +115,7 @@
td.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
ComponentUtil.getAttribute(sourceElement, HtmlComponentUtil.HTML_STYLE_ATTR)
+ STYLE_SEMICOLUMN + contentStyle);
-
+
List<Node> children = ComponentUtil.getChildren(sourceElement, true);
VpeChildrenInfo bodyInfo = new VpeChildrenInfo(td);
for (Node child : children) {
@@ -138,7 +138,7 @@
headerTable.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
HtmlComponentUtil.CSS_DISPLAY
+ ":" + DISABLED_ELEMENT_STYLE + STYLE_SEMICOLUMN); //$NON-NLS-1$
- headerTable.appendChild(encodeHeader(creationData, (Element)sourceNode, visualDocument, table, false, EMPTY, EMPTY, EMPTY, EMPTY,EMPTY));
+ headerTable.appendChild(encodeHeader(pageContext, creationData, (Element)sourceNode, visualDocument, table, false, EMPTY, EMPTY, EMPTY, EMPTY,EMPTY));
nsIDOMElement bodyTable = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TABLE);
bodyTable.setAttribute(HtmlComponentUtil.HTML_BORDER_ATTR, ZERO);
bodyTable.setAttribute(HtmlComponentUtil.HTML_CELLPADDING_ATTR, ZERO);
@@ -162,7 +162,9 @@
* @param inactiveTabClass
* @param disabledTabClass
*/
- public static nsIDOMElement encodeHeader(VpeCreationData creationData,
+ public static nsIDOMElement encodeHeader(
+ VpePageContext pageContext,
+ VpeCreationData creationData,
Element sourceElement,
nsIDOMDocument visualDocument,
nsIDOMElement parentTr,
@@ -240,7 +242,6 @@
+ SPACE + CSS_LABEL
+ SPACE + CSS_DISABLED
+ SPACE + disabledTabClass;
- String bgImgPath = ComponentUtil.getAbsoluteResourcePath(INACTIVE_BKG_FILE_PATH);
if(!TRUE.equalsIgnoreCase(sourceElement.getAttribute(DISABLED))) {
if(active) {
@@ -248,7 +249,6 @@
+ SPACE + CSS_LABEL
+ SPACE + CSS_ACTIVE
+ SPACE + activeTabClass;
- bgImgPath = ComponentUtil.getAbsoluteResourcePath(ACTIVE_BKG_FILE_PATH);
} else {
styleClass = CSS_HEADER
+ SPACE + CSS_LABEL
@@ -256,27 +256,25 @@
+ SPACE + inactiveTabClass;
}
}
-
- styleClass += SPACE + headerClass;
+ String tabStyleClass = ComponentUtil.getAttribute(sourceElement, HtmlComponentUtil.HTML_STYLECLASS_ATTR);
+ styleClass += SPACE + headerClass + SPACE + tabStyleClass;
mainTd.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, styleClass);
- String style = "background-image: url(file:///" //$NON-NLS-1$
- + bgImgPath.replace('\\', '/') + ");"; //$NON-NLS-1$
- mainTd.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, style);
-
mainTd.setAttribute(VPE_USER_TOGGLE_ID, toggleId);
Node labelFacet = ComponentUtil.getFacet(sourceElement, LABEL, true);
- String labelAttr = sourceElement.getAttribute(LABEL);
if (null != labelFacet) {
VpeChildrenInfo child = new VpeChildrenInfo(mainTd);
child.addSourceChild(labelFacet);
creationData.addChildrenInfo(child);
- } else if (null != labelAttr) {
- mainTd.appendChild(visualDocument.createTextNode(labelAttr));
+ } else if (sourceElement.hasAttribute(LABEL)) {
+ Attr labelAttr = sourceElement.getAttributeNode(LABEL);
+ if (null != labelAttr) {
+ String bundleValue = ComponentUtil.getBundleValue(pageContext, labelAttr);
+ mainTd.appendChild(visualDocument.createTextNode(bundleValue));
+ }
} else {
char space = 160;
- labelAttr = EMPTY + space;
- mainTd.appendChild(visualDocument.createTextNode(labelAttr));
+ mainTd.appendChild(visualDocument.createTextNode(EMPTY + space));
}
encodeSpacer(mainTr, visualDocument);
return headerTd;
15 years, 10 months
JBoss Tools SVN: r8913 - in trunk/ws/tests/org.jboss.tools.ws.core.test: src/org/jboss/tools/ws/core/test and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dennyxu
Date: 2008-06-24 04:33:46 -0400 (Tue, 24 Jun 2008)
New Revision: 8913
Added:
trunk/ws/tests/org.jboss.tools.ws.core.test/src/org/jboss/tools/ws/core/test/JbossWSCoreAllTests.java
trunk/ws/tests/org.jboss.tools.ws.core.test/src/org/jboss/tools/ws/core/test/command/JBossWSTopDownCommandTest.java
Removed:
trunk/ws/tests/org.jboss.tools.ws.core.test/src/org/jboss/tools/ws/core/test/command/AbstractJBossWSCommandTest.java
Modified:
trunk/ws/tests/org.jboss.tools.ws.core.test/META-INF/MANIFEST.MF
Log:
JBIDE-2323: add unit test for topdown commands
Modified: trunk/ws/tests/org.jboss.tools.ws.core.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.core.test/META-INF/MANIFEST.MF 2008-06-24 08:12:37 UTC (rev 8912)
+++ trunk/ws/tests/org.jboss.tools.ws.core.test/META-INF/MANIFEST.MF 2008-06-24 08:33:46 UTC (rev 8913)
@@ -25,5 +25,6 @@
org.eclipse.emf.ecore,
org.eclipse.wst.server.core,
org.eclipse.debug.core,
- org.jboss.tools.common
+ org.jboss.tools.common,
+ org.jboss.ide.eclipse.as.core;bundle-version="1.0.0"
Eclipse-LazyStart: true
Added: trunk/ws/tests/org.jboss.tools.ws.core.test/src/org/jboss/tools/ws/core/test/JbossWSCoreAllTests.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.core.test/src/org/jboss/tools/ws/core/test/JbossWSCoreAllTests.java (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.core.test/src/org/jboss/tools/ws/core/test/JbossWSCoreAllTests.java 2008-06-24 08:33:46 UTC (rev 8913)
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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.ws.core.test;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.jboss.tools.common.reporting.test.ProblemReportingHelperTest;
+import org.jboss.tools.common.util.test.HttpUtilTest;
+import org.jboss.tools.common.xml.test.SAXValidatorTest;
+import org.jboss.tools.common.xml.test.XMLUtilitiesTest;
+import org.jboss.tools.ws.core.test.classpath.JbossWSRuntimeManagerTest;
+import org.jboss.tools.ws.core.test.command.JBossWSTopDownCommandTest;
+
+public class JbossWSCoreAllTests extends TestCase {
+ public static final String PLUGIN_ID = "org.jboss.tools.common.test";
+ public static Test suite ()
+ {
+ TestSuite suite = new TestSuite(JbossWSCoreAllTests.class.getName());
+ suite.addTestSuite(JbossWSRuntimeManagerTest.class);
+ suite.addTestSuite(JBossWSTopDownCommandTest.class);
+
+ return suite;
+ }
+}
\ No newline at end of file
Property changes on: trunk/ws/tests/org.jboss.tools.ws.core.test/src/org/jboss/tools/ws/core/test/JbossWSCoreAllTests.java
___________________________________________________________________
Name: svn:executable
+ *
Deleted: trunk/ws/tests/org.jboss.tools.ws.core.test/src/org/jboss/tools/ws/core/test/command/AbstractJBossWSCommandTest.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.core.test/src/org/jboss/tools/ws/core/test/command/AbstractJBossWSCommandTest.java 2008-06-24 08:12:37 UTC (rev 8912)
+++ trunk/ws/tests/org.jboss.tools.ws.core.test/src/org/jboss/tools/ws/core/test/command/AbstractJBossWSCommandTest.java 2008-06-24 08:33:46 UTC (rev 8913)
@@ -1,445 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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.ws.core.test.command;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLConnection;
-import java.util.HashSet;
-import java.util.Set;
-
-import junit.framework.TestCase;
-
-import org.apache.commons.httpclient.util.HttpURLConnection;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.jst.j2ee.internal.deployables.J2EEDeployableFactory;
-import org.eclipse.jst.j2ee.model.IModelProvider;
-import org.eclipse.jst.j2ee.model.ModelProviderManager;
-import org.eclipse.jst.j2ee.webapplication.ServletType;
-import org.eclipse.jst.javaee.web.Servlet;
-import org.eclipse.jst.javaee.web.ServletMapping;
-import org.eclipse.jst.javaee.web.WebApp;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.project.facet.core.IFacetedProject;
-import org.eclipse.wst.common.project.facet.core.IProjectFacet;
-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.IRuntimeType;
-import org.eclipse.wst.server.core.IRuntimeWorkingCopy;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.IServerType;
-import org.eclipse.wst.server.core.IServerWorkingCopy;
-import org.eclipse.wst.server.core.ServerCore;
-import org.eclipse.wst.server.core.ServerUtil;
-import org.eclipse.wst.server.core.internal.Server;
-import org.eclipse.wst.server.core.internal.ServerWorkingCopy;
-import org.eclipse.wst.ws.internal.wsrt.IWebService;
-import org.eclipse.wst.ws.internal.wsrt.WebServiceInfo;
-import org.eclipse.wst.ws.internal.wsrt.WebServiceScenario;
-import org.jboss.tools.common.test.util.TestProjectProvider;
-import org.jboss.tools.test.util.JUnitUtils;
-import org.jboss.tools.test.util.xpl.EditorTestHelper;
-import org.jboss.tools.ws.core.classpath.JbossWSRuntime;
-import org.jboss.tools.ws.core.classpath.JbossWSRuntimeManager;
-import org.jboss.tools.ws.core.facet.delegate.IJBossWSFacetDataModelProperties;
-import org.jboss.tools.ws.core.facet.delegate.JBossWSFacetInstallDataModelProvider;
-import org.jboss.tools.ws.creation.core.commands.ImplementationClassCreationCommand;
-import org.jboss.tools.ws.creation.core.commands.InitialCommand;
-import org.jboss.tools.ws.creation.core.commands.MergeWebXMLCommand;
-import org.jboss.tools.ws.creation.core.commands.WSDL2JavaCommand;
-import org.jboss.tools.ws.creation.core.data.ServiceModel;
-import org.jboss.tools.ws.creation.ui.wsrt.JBossWebService;
-
-import sun.net.www.http.HttpClient;
-
-public class AbstractJBossWSCommandTest extends TestCase {
- protected static final IWorkspace ws = ResourcesPlugin.getWorkspace();
- protected static final IWorkbench wb = PlatformUI.getWorkbench();
-
-
-
- protected static final String JBOSSWS_HOME_DEFAULT = "/home/fugang/jboss-all/jboss-4.2.1.GA";
- public static final String JBOSS_RUNTIME_42 = "org.jboss.ide.eclipse.as.runtime.42";
- public static final String JBOSS_AS_42_HOME = System.getProperty(JBOSS_RUNTIME_42, JBOSSWS_HOME_DEFAULT);
- public static final String JBOSS_SERVER_42 = "org.jboss.ide.eclipse.as.42";
-
- protected final Set<IResource> resourcesToCleanup = new HashSet<IResource>();
-
- protected static final IProjectFacetVersion dynamicWebVersion;
- protected static final IProjectFacetVersion javaVersion;
- protected static final IProjectFacetVersion jbosswsFacetVersion;
- private static final IProjectFacet jbosswsFacet;
- private static final String RuntimeName;
- private static final boolean isDeployed;
-
- static String wsdlFileName = "hello_world.wsdl";
- static String BUNDLE = "org.jboss.tools.ws.core.test";
-
- IFacetedProject fproject;
- TestProjectProvider provider;
- private IRuntime currentRuntime;
- private IServer currentServer;
-
- static {
- javaVersion = ProjectFacetsManager.getProjectFacet("jst.java").getVersion("5.0");
- dynamicWebVersion = ProjectFacetsManager.getProjectFacet("jst.web").getVersion("2.5");
- jbosswsFacet = ProjectFacetsManager.getProjectFacet("jbossws.core");
- jbosswsFacetVersion = jbosswsFacet.getVersion("1.0");
- RuntimeName = "testjbosswsruntime";
- isDeployed = false;
-
-
- }
-
- public AbstractJBossWSCommandTest() {
- }
-
- protected void setUp() throws Exception {
- super.setUp();
- JbossWSRuntimeManager.getInstance().addRuntime(RuntimeName, getJBossWSHomeFolder().toString(), "", true);
-
- //create jbossws web project
- fproject = createJBossWSProject("JBossWSTestProject", isServerSupplied());
- IFile wsdlFile = fproject.getProject().getFile(wsdlFileName);
-
-
- createServer(JBOSS_RUNTIME_42, JBOSS_SERVER_42, JBOSS_AS_42_HOME, "default");
-
- assertTrue(wsdlFile.exists());
- try { EditorTestHelper.joinBackgroundActivities(); }
- catch (Exception e) { JUnitUtils.fail(e.getMessage(), e); }
- EditorTestHelper.runEventQueue(3000);
- }
-
- private IProject createProject(String prjName) throws CoreException {
- provider = new TestProjectProvider(BUNDLE,"/projects/"+prjName , prjName, true);
- IProject prj = provider.getProject();
- EditorTestHelper.joinBackgroundActivities();
- return prj;
- }
-
-
-
- protected void tearDown() throws Exception {
- // Wait until all jobs is finished to avoid delete project problems
- EditorTestHelper.joinBackgroundActivities();
- EditorTestHelper.runEventQueue(3000);
- Exception last = null;
- for (IResource r : this.resourcesToCleanup) {
- try {
- System.out.println("Deleting " + r);
- r.delete(true, null);
- } catch(Exception e) {
- System.out.println("Error deleting " + r);
- e.printStackTrace();
- last = e;
- }
- }
-
- if(last!=null) throw last;
-
- resourcesToCleanup.clear();
- JbossWSRuntime runtime = JbossWSRuntimeManager.getInstance().findRuntimeByName(RuntimeName);
- JbossWSRuntimeManager.getInstance().removeRuntime(runtime);
-
- //cleanProjectFromServer() ;
- currentServer.delete();
-
- super.tearDown();
- }
-
-
- public void testInitialCommand() throws CoreException, ExecutionException{
-
- IFile wsdlFile = fproject.getProject().getFile(wsdlFileName);
- ServiceModel model = new ServiceModel();
- model.setWebProjectName(fproject.getProject().getName());
- //model.setWsdlURI(wsdlFile.getLocation().toOSString());
-
-
- WebServiceInfo info = new WebServiceInfo();
- info.setWsdlURL(wsdlFile.getLocation().toOSString());
- IWebService ws = new JBossWebService(info);
-
- //test initial command
- InitialCommand cmdInitial = new InitialCommand(model, ws, WebServiceScenario.TOPDOWN);
- IStatus status = cmdInitial.execute(null, null);
- assertTrue(status.getMessage(), status.isOK());
-
- assertTrue(model.getServiceNames().contains("SOAPService"));
- assertEquals(wsdlFile.getLocation().toOSString(), model.getWsdlURI());
- assertTrue(model.getPortTypes().contains("Greeter"));
- assertEquals("org.apache.hello_world_soap_http", model.getCustomPackage());
-
- }
-
-
- public void testCodeGenerationCommand() throws ExecutionException{
-
- ServiceModel model = createServiceModel();
- IProject project = fproject.getProject();
- //test wsdl2Javacommand
- WSDL2JavaCommand cmdW2j = new WSDL2JavaCommand(model);
- IStatus status = cmdW2j.execute(null, null);
- assertTrue(status.getMessage(), status.isOK());
-
- assertTrue(project.getFile("src/org/apache/hello_world_soap_http/Greeter.java").exists());
-
- // test ImplementationClassCreationCommand
- model.setGenerateImplementatoin(false);
- ImplementationClassCreationCommand cmdImpl = new ImplementationClassCreationCommand(model);
- status = cmdImpl.execute(null, null);
- assertTrue(status.getMessage(), status.isOK());
- assertFalse(project.getFile("src/org/apache/hello_world_soap_http/GreeterImpl.java").exists());
-
- model.setGenerateImplementatoin(true);
- cmdImpl = new ImplementationClassCreationCommand(model);
- status = cmdImpl.execute(null, null);
- assertTrue(status.getMessage(), status.isOK());
- assertTrue("failed to generate implemenatation class", project.getFile("src/org/apache/hello_world_soap_http/GreeterImpl.java").exists());
-
-
- }
-
- public void testMergeWebXMLCommand() throws ExecutionException{
- ServiceModel model = createServiceModel();
- model.setGenerateImplementatoin(true);
- model.setUpdateWebxml(true);
- model.setWebProjectName(fproject.getProject().getName());
- model.addServiceClasses("org.apache.hello_world_soap_http.GreeterImpl");
- MergeWebXMLCommand cmdweb = new MergeWebXMLCommand(model);
- IStatus status = cmdweb.execute(null, null);
- assertTrue(status.getMessage(), status.isOK());
-
- IProject project = fproject.getProject();
- IFile webxml = project.getFile("WebContent/WEB-INF/web.xml");
- assertTrue(webxml.exists());
- IModelProvider provider = ModelProviderManager
- .getModelProvider(project);
- Object object = provider.getModelObject();
- if (object instanceof WebApp) {
- WebApp webApp = (WebApp) object;
- assertTrue("failed to update web.xml ", webApp.getServlets().size() > 0);
- Servlet servlet = (Servlet)webApp.getServlets().get(0);
- assertEquals("the servlet with the name 'Greeger' was not created", servlet.getServletName(), "Greeter");
- assertTrue("the servlet display names should contain 'Greeter'", servlet.getDisplayNames().contains("Greeter"));
- assertEquals("org.apache.hello_world_soap_http.GreeterImpl", servlet.getServletClass());
-
- ServletMapping mapping = (ServletMapping)webApp.getServletMappings().get(0);
- assertTrue("url patterns should contain '/Greeter'", mapping.getUrlPatterns().contains("/Greeter"));
- assertEquals("Greeter", mapping.getServletName());
- }else if(object instanceof org.eclipse.jst.j2ee.webapplication.WebApp){
- org.eclipse.jst.j2ee.webapplication.WebApp webApp = (org.eclipse.jst.j2ee.webapplication.WebApp) object;
- assertTrue("failed to update web.xml ", webApp.getServlets().size() > 0);
- org.eclipse.jst.j2ee.webapplication.Servlet servlet = (org.eclipse.jst.j2ee.webapplication.Servlet)webApp.getServlets().get(0);
- assertEquals("a servlet with the name 'Greeger' should be created", servlet.getServletName(), "Greeter");
- assertEquals("servlet display name:","Greeter", servlet.getDisplayName());
- if(servlet.getWebType() instanceof ServletType){
- ServletType webtype = (ServletType)servlet.getWebType();
- assertEquals("org.apache.hello_world_soap_http.GreeterImpl", webtype.getClassName());
- }
-
- org.eclipse.jst.j2ee.webapplication.ServletMapping mapping = (org.eclipse.jst.j2ee.webapplication.ServletMapping)webApp.getServletMappings().get(0);
- assertEquals("url pattern: ","/Greeter", mapping.getUrlPattern());
- assertEquals("Greeter", mapping.getServlet().getServletName());
- }
- //ServerType d; d.createServer(id, file, monitor)
-
- }
-
- public void remove_testDeployResult() throws ExecutionException, CoreException, IOException{
- currentServer.start(ILaunchManager.RUN_MODE, new NullProgressMonitor());
-
- IFile wsdlFile = fproject.getProject().getFile(wsdlFileName);
- ServiceModel model = new ServiceModel();
- model.setWebProjectName(fproject.getProject().getName());
- //model.setWsdlURI(wsdlFile.getLocation().toOSString());
-
-
- WebServiceInfo info = new WebServiceInfo();
- info.setWsdlURL(wsdlFile.getLocation().toOSString());
- IWebService ws = new JBossWebService(info);
-
- //test initial command
- AbstractDataModelOperation cmd = new InitialCommand(model, ws, WebServiceScenario.TOPDOWN);
- IStatus status = cmd.execute(null, null);
- assertTrue(status.getMessage(), status.isOK());
-
- cmd = new WSDL2JavaCommand(model);
- status = cmd.execute(null, null);
- assertTrue(status.getMessage(), status.isOK());
-
- cmd = new ImplementationClassCreationCommand(model);
- status = cmd.execute(null, null);
- assertTrue(status.getMessage(), status.isOK());
-
- cmd = new MergeWebXMLCommand(model);
- status = cmd.execute(null, null);
- assertTrue(status.getMessage(), status.isOK());
-
- fproject.getProject().refreshLocal(0, null);
- publishWebProject();
-
- String webServiceUrl = "http://localhost:8080/JBossWSTestProject/IHelloWorld?wsdl";
- URL url = new URL(webServiceUrl);
- URLConnection conn = url.openConnection();
- assertEquals(currentServer.getServerState(), currentServer.STATE_STARTED);
- conn.connect();
- conn.getHeaderFields();
-
-
- }
-
-
- protected void createServer(String runtimeID, String serverID,
- String location, String configuration) throws CoreException {
- // if file doesnt exist, abort immediately.
- assertTrue(new Path(location).toFile().exists());
-
- currentRuntime = createRuntime(runtimeID, location, configuration);
- IServerType serverType = ServerCore.findServerType(serverID);
- IServerWorkingCopy serverWC = serverType.createServer(null, null,
- new NullProgressMonitor());
- serverWC.setRuntime(currentRuntime);
- serverWC.setName(serverID);
- serverWC.setServerConfiguration(null);
- currentServer = serverWC.save(true, new NullProgressMonitor());
-
-
- }
-
- private IRuntime createRuntime(String runtimeId, String homeDir,
- String config) throws CoreException {
- IRuntimeType[] runtimeTypes = ServerUtil.getRuntimeTypes(null, null,
- runtimeId);
- assertEquals("expects only one runtime type", runtimeTypes.length, 1);
- IRuntimeType runtimeType = runtimeTypes[0];
- IRuntimeWorkingCopy runtimeWC = runtimeType.createRuntime(null,
- new NullProgressMonitor());
- runtimeWC.setName(runtimeId);
- runtimeWC.setLocation(new Path(homeDir));
- IRuntime savedRuntime = runtimeWC.save(true, new NullProgressMonitor());
- return savedRuntime;
- }
-
- protected ServiceModel createServiceModel(){
- ServiceModel model = new ServiceModel();
- model.setWebProjectName(fproject.getProject().getName());
- IFile wsdlFile = fproject.getProject().getFile(wsdlFileName);
- model.setWsdlURI(wsdlFile.getLocation().toOSString());
- model.addServiceName("SOAPService");
- model.addPortTypes("Greeter");
- model.setCustomPackage("org.apache.hello_world_soap_http");
-
- return model;
-
- }
-
- protected void publishWebProject() throws CoreException{
- IModule[] modules = ServerUtil.getModules(currentServer.getServerType().getRuntimeType().getModuleTypes());
- IServerWorkingCopy serverWC = currentServer.createWorkingCopy();
- serverWC.modifyModules(modules, null, null);
- currentServer.publish(0, null);
-
- }
-
- protected void cleanProjectFromServer() throws CoreException{
- IModule[] modules = ServerUtil.getModules(currentServer.getServerType().getRuntimeType().getModuleTypes());
- IServerWorkingCopy serverWC = currentServer.createWorkingCopy();
- serverWC.modifyModules(null, modules, null);
- currentServer.publish(0, null);
- currentServer.stop(true);
-
- }
-
- protected boolean isServerSupplied(){
- return false;
- }
-
-
- protected IFacetedProject createJBossWSProject(String baseProjectName, boolean isServerSupplied) throws CoreException {
- IProject project = createProject("JBossWSTestProject");
- final IFacetedProject fproj = ProjectFacetsManager.create(project);
-
- //installDependentFacets(fproj);
- fproj.installProjectFacet(jbosswsFacetVersion, createJBossWSDataModel(isServerSupplied), null);
-
- assertNotNull(project);
- assertTrue(project.exists());
- this.addResourceToCleanup(project);
-
-
- return fproj;
- }
-
- protected void installDependentFacets(final IFacetedProject fproj) throws CoreException {
- fproj.installProjectFacet(javaVersion, null, null);
- fproj.installProjectFacet(dynamicWebVersion, null, null);
- //fproj.installProjectFacet(jbosswsFacetVersion, null, null);
- }
-
-
-
-
- protected IDataModel createJBossWSDataModel( boolean isServerSupplied) {
- IDataModel config = (IDataModel) new JBossWSFacetInstallDataModelProvider().create();
- if(isServerSupplied){
- config.setBooleanProperty(IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_IS_SERVER_SUPPLIED, true);
- }else{
- config.setBooleanProperty(IJBossWSFacetDataModelProperties.JBOSS_WS_DEPLOY, isDeployed);
- config.setStringProperty(IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_ID, RuntimeName);
- config.setStringProperty(IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_HOME, getJBossWSHomeFolder().toString());
- }
- return config;
- }
-
-
-
- protected final void addResourceToCleanup(final IResource resource) {
- this.resourcesToCleanup.add(resource);
- }
-
-
-
-
- protected File getJBossWSHomeFolder() {
-
- String jbosshome = System.getProperty(JBOSS_RUNTIME_42, JBOSSWS_HOME_DEFAULT);
- File runtimelocation = new File(jbosshome);
- assertTrue("Please set Jboss EAP Home in system property:" + JBOSS_RUNTIME_42, runtimelocation.exists());
-
- String cmdFileLocation = jbosshome + File.separator + "bin" + File.separator + "wsconsume.sh";
- assertTrue(jbosshome + " is not a valid jboss EAP home", new File(cmdFileLocation).exists());
- return runtimelocation;
- }
-
-
-
-
-
-}
Copied: trunk/ws/tests/org.jboss.tools.ws.core.test/src/org/jboss/tools/ws/core/test/command/JBossWSTopDownCommandTest.java (from rev 8893, trunk/ws/tests/org.jboss.tools.ws.core.test/src/org/jboss/tools/ws/core/test/command/AbstractJBossWSCommandTest.java)
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.core.test/src/org/jboss/tools/ws/core/test/command/JBossWSTopDownCommandTest.java (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.core.test/src/org/jboss/tools/ws/core/test/command/JBossWSTopDownCommandTest.java 2008-06-24 08:33:46 UTC (rev 8913)
@@ -0,0 +1,575 @@
+/*******************************************************************************
+ * Copyright (c) 2008 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.ws.core.test.command;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.Set;
+
+import junit.framework.AssertionFailedError;
+import junit.framework.TestCase;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.debug.core.IStreamListener;
+import org.eclipse.debug.core.model.IStreamMonitor;
+import org.eclipse.jst.j2ee.model.IModelProvider;
+import org.eclipse.jst.j2ee.model.ModelProviderManager;
+import org.eclipse.jst.j2ee.webapplication.ServletType;
+import org.eclipse.jst.javaee.web.Servlet;
+import org.eclipse.jst.javaee.web.ServletMapping;
+import org.eclipse.jst.javaee.web.WebApp;
+import org.eclipse.swt.SWTException;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.common.project.facet.core.IFacetedProject;
+import org.eclipse.wst.common.project.facet.core.IProjectFacet;
+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
+import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
+import org.eclipse.wst.common.project.facet.core.util.internal.StatusWrapper;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.IRuntime;
+import org.eclipse.wst.server.core.IRuntimeType;
+import org.eclipse.wst.server.core.IRuntimeWorkingCopy;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.IServerListener;
+import org.eclipse.wst.server.core.IServerType;
+import org.eclipse.wst.server.core.IServerWorkingCopy;
+import org.eclipse.wst.server.core.ServerCore;
+import org.eclipse.wst.server.core.ServerEvent;
+import org.eclipse.wst.server.core.ServerUtil;
+import org.eclipse.wst.server.core.IServer.IOperationListener;
+import org.eclipse.wst.server.core.internal.ServerWorkingCopy;
+import org.eclipse.wst.ws.internal.wsrt.IWebService;
+import org.eclipse.wst.ws.internal.wsrt.WebServiceInfo;
+import org.eclipse.wst.ws.internal.wsrt.WebServiceScenario;
+import org.jboss.ide.eclipse.as.core.server.internal.DeployableServer;
+import org.jboss.ide.eclipse.as.core.server.internal.JBossServerBehavior;
+import org.jboss.tools.common.test.util.TestProjectProvider;
+import org.jboss.tools.test.util.JUnitUtils;
+import org.jboss.tools.test.util.xpl.EditorTestHelper;
+import org.jboss.tools.ws.core.classpath.JbossWSRuntime;
+import org.jboss.tools.ws.core.classpath.JbossWSRuntimeManager;
+import org.jboss.tools.ws.core.facet.delegate.IJBossWSFacetDataModelProperties;
+import org.jboss.tools.ws.core.facet.delegate.JBossWSFacetInstallDataModelProvider;
+import org.jboss.tools.ws.creation.core.commands.ImplementationClassCreationCommand;
+import org.jboss.tools.ws.creation.core.commands.InitialCommand;
+import org.jboss.tools.ws.creation.core.commands.MergeWebXMLCommand;
+import org.jboss.tools.ws.creation.core.commands.WSDL2JavaCommand;
+import org.jboss.tools.ws.creation.core.data.ServiceModel;
+import org.jboss.tools.ws.creation.ui.wsrt.JBossWebService;
+
+public class JBossWSTopDownCommandTest extends TestCase {
+ protected static final IWorkspace ws = ResourcesPlugin.getWorkspace();
+ protected static final IWorkbench wb = PlatformUI.getWorkbench();
+
+ protected static final int DEFAULT_STARTUP_TIME = 150000;
+ protected static final int DEFAULT_SHUTDOWN_TIME = 90000;
+
+ protected static final String JBOSSWS_HOME_DEFAULT = "/home/fugang/jboss-all/jboss-4.2.2.GA";
+ public static final String JBOSS_RUNTIME_42 = "org.jboss.ide.eclipse.as.runtime.42";
+ public static final String JBOSS_AS_42_HOME = System.getProperty(JBOSS_RUNTIME_42, JBOSSWS_HOME_DEFAULT);
+ public static final String JBOSS_SERVER_42 = "org.jboss.ide.eclipse.as.42";
+
+ protected final Set<IResource> resourcesToCleanup = new HashSet<IResource>();
+
+ protected static final IProjectFacetVersion dynamicWebVersion;
+ protected static final IProjectFacetVersion javaVersion;
+ protected static final IProjectFacetVersion jbosswsFacetVersion;
+ private static final IProjectFacet jbosswsFacet;
+ private static final String RuntimeName;
+ private static final boolean isDeployed;
+
+ static String wsdlFileName = "hello_world.wsdl";
+ static String BUNDLE = "org.jboss.tools.ws.core.test";
+
+ IFacetedProject fproject;
+ TestProjectProvider provider;
+ private IRuntime currentRuntime;
+ private IServer currentServer;
+
+ static {
+ javaVersion = ProjectFacetsManager.getProjectFacet("jst.java").getVersion("5.0");
+ dynamicWebVersion = ProjectFacetsManager.getProjectFacet("jst.web").getVersion("2.5");
+ jbosswsFacet = ProjectFacetsManager.getProjectFacet("jbossws.core");
+ jbosswsFacetVersion = jbosswsFacet.getVersion("2.0.1");
+ RuntimeName = "testjbosswsruntime";
+ isDeployed = false;
+
+
+ }
+
+ public JBossWSTopDownCommandTest() {
+ }
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ JbossWSRuntimeManager.getInstance().addRuntime(RuntimeName, getJBossWSHomeFolder().toString(), "", true);
+
+ //create jbossws web project
+ fproject = createJBossWSProject("JBossWSTestProject", isServerSupplied());
+ IFile wsdlFile = fproject.getProject().getFile(wsdlFileName);
+
+
+ createServer(JBOSS_RUNTIME_42, JBOSS_SERVER_42, JBOSS_AS_42_HOME, "default");
+
+ assertTrue(wsdlFile.exists());
+ try { EditorTestHelper.joinBackgroundActivities(); }
+ catch (Exception e) { JUnitUtils.fail(e.getMessage(), e); }
+ EditorTestHelper.runEventQueue(3000);
+ }
+
+ private IProject createProject(String prjName) throws CoreException {
+ provider = new TestProjectProvider(BUNDLE,"/projects/"+prjName , prjName, true);
+ IProject prj = provider.getProject();
+ EditorTestHelper.joinBackgroundActivities();
+ return prj;
+ }
+
+
+
+ protected void tearDown() throws Exception {
+ // Wait until all jobs is finished to avoid delete project problems
+ EditorTestHelper.joinBackgroundActivities();
+ EditorTestHelper.runEventQueue(3000);
+ Exception last = null;
+ for (IResource r : this.resourcesToCleanup) {
+ try {
+ System.out.println("Deleting " + r);
+ r.delete(true, null);
+ } catch(Exception e) {
+ System.out.println("Error deleting " + r);
+ e.printStackTrace();
+ last = e;
+ }
+ }
+
+ if(last!=null) throw last;
+
+ resourcesToCleanup.clear();
+ JbossWSRuntime runtime = JbossWSRuntimeManager.getInstance().findRuntimeByName(RuntimeName);
+ JbossWSRuntimeManager.getInstance().removeRuntime(runtime);
+
+ //cleanProjectFromServer() ;
+ undeployWebProject();
+ currentServer.stop(true);
+ currentServer.delete();
+
+ super.tearDown();
+ }
+
+
+ public void testInitialCommand() throws CoreException, ExecutionException{
+
+ IFile wsdlFile = fproject.getProject().getFile(wsdlFileName);
+ ServiceModel model = new ServiceModel();
+ model.setWebProjectName(fproject.getProject().getName());
+ //model.setWsdlURI(wsdlFile.getLocation().toOSString());
+
+
+ WebServiceInfo info = new WebServiceInfo();
+ info.setWsdlURL(wsdlFile.getLocation().toOSString());
+ IWebService ws = new JBossWebService(info);
+
+ //test initial command
+ InitialCommand cmdInitial = new InitialCommand(model, ws, WebServiceScenario.TOPDOWN);
+ IStatus status = cmdInitial.execute(null, null);
+ assertTrue(status.getMessage(), status.isOK());
+
+ assertTrue(model.getServiceNames().contains("SOAPService"));
+ assertEquals(wsdlFile.getLocation().toOSString(), model.getWsdlURI());
+ assertTrue(model.getPortTypes().contains("Greeter"));
+ assertEquals("org.apache.hello_world_soap_http", model.getCustomPackage());
+
+ }
+
+
+ public void testCodeGenerationCommand() throws ExecutionException{
+
+ ServiceModel model = createServiceModel();
+ IProject project = fproject.getProject();
+ //test wsdl2Javacommand
+ WSDL2JavaCommand cmdW2j = new WSDL2JavaCommand(model);
+ IStatus status = cmdW2j.execute(null, null);
+ assertTrue(status.getMessage(), status.isOK());
+
+ assertTrue(project.getFile("src/org/apache/hello_world_soap_http/Greeter.java").exists());
+
+ // test ImplementationClassCreationCommand
+ model.setGenerateImplementatoin(false);
+ ImplementationClassCreationCommand cmdImpl = new ImplementationClassCreationCommand(model);
+ status = cmdImpl.execute(null, null);
+ assertTrue(status.getMessage(), status.isOK());
+ assertFalse(project.getFile("src/org/apache/hello_world_soap_http/GreeterImpl.java").exists());
+
+ model.setGenerateImplementatoin(true);
+ cmdImpl = new ImplementationClassCreationCommand(model);
+ status = cmdImpl.execute(null, null);
+ assertTrue(status.getMessage(), status.isOK());
+ assertTrue("failed to generate implemenatation class", project.getFile("src/org/apache/hello_world_soap_http/GreeterImpl.java").exists());
+
+
+ }
+
+ public void testMergeWebXMLCommand() throws ExecutionException{
+ ServiceModel model = createServiceModel();
+ model.setGenerateImplementatoin(true);
+ model.setUpdateWebxml(true);
+ model.setWebProjectName(fproject.getProject().getName());
+ model.addServiceClasses("org.apache.hello_world_soap_http.GreeterImpl");
+ MergeWebXMLCommand cmdweb = new MergeWebXMLCommand(model);
+ IStatus status = cmdweb.execute(null, null);
+ assertTrue(status.getMessage(), status.isOK());
+
+ IProject project = fproject.getProject();
+ IFile webxml = project.getFile("WebContent/WEB-INF/web.xml");
+ assertTrue(webxml.exists());
+ IModelProvider provider = ModelProviderManager
+ .getModelProvider(project);
+ Object object = provider.getModelObject();
+ if (object instanceof WebApp) {
+ WebApp webApp = (WebApp) object;
+ assertTrue("failed to update web.xml ", webApp.getServlets().size() > 0);
+ Servlet servlet = (Servlet)webApp.getServlets().get(0);
+ assertEquals("the servlet with the name 'Greeger' was not created", servlet.getServletName(), "Greeter");
+ assertTrue("the servlet display names should contain 'Greeter'", servlet.getDisplayNames().contains("Greeter"));
+ assertEquals("org.apache.hello_world_soap_http.GreeterImpl", servlet.getServletClass());
+
+ ServletMapping mapping = (ServletMapping)webApp.getServletMappings().get(0);
+ assertTrue("url patterns should contain '/Greeter'", mapping.getUrlPatterns().contains("/Greeter"));
+ assertEquals("Greeter", mapping.getServletName());
+ }else if(object instanceof org.eclipse.jst.j2ee.webapplication.WebApp){
+ org.eclipse.jst.j2ee.webapplication.WebApp webApp = (org.eclipse.jst.j2ee.webapplication.WebApp) object;
+ assertTrue("failed to update web.xml ", webApp.getServlets().size() > 0);
+ org.eclipse.jst.j2ee.webapplication.Servlet servlet = (org.eclipse.jst.j2ee.webapplication.Servlet)webApp.getServlets().get(0);
+ assertEquals("a servlet with the name 'Greeger' should be created", servlet.getServletName(), "Greeter");
+ assertEquals("servlet display name:","Greeter", servlet.getDisplayName());
+ if(servlet.getWebType() instanceof ServletType){
+ ServletType webtype = (ServletType)servlet.getWebType();
+ assertEquals("org.apache.hello_world_soap_http.GreeterImpl", webtype.getClassName());
+ }
+
+ org.eclipse.jst.j2ee.webapplication.ServletMapping mapping = (org.eclipse.jst.j2ee.webapplication.ServletMapping)webApp.getServletMappings().get(0);
+ assertEquals("url pattern: ","/Greeter", mapping.getUrlPattern());
+ assertEquals("Greeter", mapping.getServlet().getServletName());
+ }
+ //ServerType d; d.createServer(id, file, monitor)
+
+ }
+
+ public void testDeployResult() throws ExecutionException, CoreException, IOException{
+
+ //currentServer.start(ILaunchManager.RUN_MODE, new NullProgressMonitor());
+ IFile wsdlFile = fproject.getProject().getFile(wsdlFileName);
+ ServiceModel model = new ServiceModel();
+ model.setWebProjectName(fproject.getProject().getName());
+ //model.setWsdlURI(wsdlFile.getLocation().toOSString());
+
+
+ WebServiceInfo info = new WebServiceInfo();
+ info.setWsdlURL(wsdlFile.getLocation().toOSString());
+ IWebService ws = new JBossWebService(info);
+
+ //test initial command
+ AbstractDataModelOperation cmd = new InitialCommand(model, ws, WebServiceScenario.TOPDOWN);
+ IStatus status = cmd.execute(null, null);
+ assertTrue(status.getMessage(), status.isOK());
+
+ cmd = new WSDL2JavaCommand(model);
+ status = cmd.execute(null, null);
+ assertTrue(status.getMessage(), status.isOK());
+
+ cmd = new ImplementationClassCreationCommand(model);
+ status = cmd.execute(null, null);
+ assertTrue(status.getMessage(), status.isOK());
+
+ cmd = new MergeWebXMLCommand(model);
+ status = cmd.execute(null, null);
+ assertTrue(status.getMessage(), status.isOK());
+
+ fproject.getProject().refreshLocal(IResource.DEPTH_INFINITE, null);
+ fproject.getProject().build(IncrementalProjectBuilder.FULL_BUILD, null);
+ publishWebProject();
+
+ assertTrue(currentServer.getModules().length > 0);
+ String webServiceUrl = "http://localhost:8080/JBossWSTestProject/Greeter?wsdl";
+ URL url = new URL(webServiceUrl);
+ URLConnection conn = url.openConnection();
+
+ startup();
+
+ assertEquals("unable to start JBoss server",IServer.STATE_STARTED, currentServer.getServerState());
+
+ conn.connect();
+ conn.getContent();
+
+
+
+ }
+
+
+ protected void createServer(String runtimeID, String serverID,
+ String location, String configuration) throws CoreException {
+ // if file doesnt exist, abort immediately.
+ assertTrue(new Path(location).toFile().exists());
+
+ currentRuntime = createRuntime(runtimeID, location, configuration);
+ IServerType serverType = ServerCore.findServerType(serverID);
+ IServerWorkingCopy serverWC = serverType.createServer(null, null,
+ new NullProgressMonitor());
+ serverWC.setRuntime(currentRuntime);
+ serverWC.setName(serverID);
+ serverWC.setServerConfiguration(null);
+ IPath path = new Path(location).append("server").append("default").append("deploy");
+ ((ServerWorkingCopy)serverWC).setAttribute(DeployableServer.DEPLOY_DIRECTORY, path.toOSString() );
+ currentServer = serverWC.save(true, new NullProgressMonitor());
+
+ }
+
+ private IRuntime createRuntime(String runtimeId, String homeDir,
+ String config) throws CoreException {
+ IRuntimeType[] runtimeTypes = ServerUtil.getRuntimeTypes(null, null,
+ runtimeId);
+ assertEquals("expects only one runtime type", runtimeTypes.length, 1);
+ IRuntimeType runtimeType = runtimeTypes[0];
+ IRuntimeWorkingCopy runtimeWC = runtimeType.createRuntime(null,
+ new NullProgressMonitor());
+ runtimeWC.setName(runtimeId);
+ runtimeWC.setLocation(new Path(homeDir));
+ IRuntime savedRuntime = runtimeWC.save(true, new NullProgressMonitor());
+ return savedRuntime;
+ }
+
+ protected ServiceModel createServiceModel(){
+ ServiceModel model = new ServiceModel();
+ model.setWebProjectName(fproject.getProject().getName());
+ IFile wsdlFile = fproject.getProject().getFile(wsdlFileName);
+ model.setWsdlURI(wsdlFile.getLocation().toOSString());
+ model.addServiceName("SOAPService");
+ model.addPortTypes("Greeter");
+ model.setCustomPackage("org.apache.hello_world_soap_http");
+
+ return model;
+
+ }
+
+ protected void publishWebProject() throws CoreException{
+ IModule[] modules = ServerUtil.getModules(currentServer.getServerType().getRuntimeType().getModuleTypes());
+ IServerWorkingCopy serverWC = currentServer.createWorkingCopy();
+ serverWC.modifyModules(modules, null, null);
+ serverWC.save(true, null).publish(0, null);
+ currentServer.publish(IServer.PUBLISH_FULL, null);
+
+ }
+
+ protected void undeployWebProject() throws CoreException{
+ IModule[] modules = ServerUtil.getModules(currentServer.getServerType().getRuntimeType().getModuleTypes());
+ IServerWorkingCopy serverWC = currentServer.createWorkingCopy();
+ serverWC.modifyModules( null,modules, null);
+ serverWC.save(true, null).publish(0, null);
+ currentServer.publish(IServer.PUBLISH_FULL, null);
+
+ }
+
+ protected void cleanProjectFromServer() throws CoreException{
+ IModule[] modules = ServerUtil.getModules(currentServer.getServerType().getRuntimeType().getModuleTypes());
+ IServerWorkingCopy serverWC = currentServer.createWorkingCopy();
+ serverWC.modifyModules(null, modules, null);
+ currentServer.publish(0, null);
+ currentServer.stop(true);
+
+ }
+
+ protected boolean isServerSupplied(){
+ return false;
+ }
+
+
+ protected IFacetedProject createJBossWSProject(String baseProjectName, boolean isServerSupplied) throws CoreException {
+ IProject project = createProject("JBossWSTestProject");
+ final IFacetedProject fproj = ProjectFacetsManager.create(project);
+
+ //installDependentFacets(fproj);
+ fproj.installProjectFacet(jbosswsFacetVersion, createJBossWSDataModel(isServerSupplied), null);
+
+ assertNotNull(project);
+ assertTrue(project.exists());
+ this.addResourceToCleanup(project);
+
+
+ return fproj;
+ }
+
+ protected void installDependentFacets(final IFacetedProject fproj) throws CoreException {
+ fproj.installProjectFacet(javaVersion, null, null);
+ fproj.installProjectFacet(dynamicWebVersion, null, null);
+ //fproj.installProjectFacet(jbosswsFacetVersion, null, null);
+ }
+
+
+
+
+ protected IDataModel createJBossWSDataModel( boolean isServerSupplied) {
+ IDataModel config = (IDataModel) new JBossWSFacetInstallDataModelProvider().create();
+ if(isServerSupplied){
+ config.setBooleanProperty(IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_IS_SERVER_SUPPLIED, true);
+ }else{
+ config.setBooleanProperty(IJBossWSFacetDataModelProperties.JBOSS_WS_DEPLOY, isDeployed);
+ config.setStringProperty(IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_ID, RuntimeName);
+ config.setStringProperty(IJBossWSFacetDataModelProperties.JBOSS_WS_RUNTIME_HOME, getJBossWSHomeFolder().toString());
+ }
+ return config;
+ }
+
+
+
+ protected final void addResourceToCleanup(final IResource resource) {
+ this.resourcesToCleanup.add(resource);
+ }
+
+
+
+
+ protected File getJBossWSHomeFolder() {
+
+ String jbosshome = System.getProperty(JBOSS_RUNTIME_42, JBOSSWS_HOME_DEFAULT);
+ File runtimelocation = new File(jbosshome);
+ assertTrue("Please set Jboss EAP Home in system property:" + JBOSS_RUNTIME_42, runtimelocation.exists());
+
+ String cmdFileLocation = jbosshome + File.separator + "bin" + File.separator + "wsconsume.sh";
+ assertTrue(jbosshome + " is not a valid jboss EAP home", new File(cmdFileLocation).exists());
+ return runtimelocation;
+ }
+
+
+
+
+ protected class ServerStateListener implements IServerListener {
+ private ArrayList stateChanges;
+ public ServerStateListener() {
+ this.stateChanges = new ArrayList();
+ }
+ public ArrayList getStateChanges() {
+ return stateChanges;
+ }
+ public void serverChanged(ServerEvent event) {
+ if((event.getKind() & ServerEvent.SERVER_CHANGE) != 0) {
+ if((event.getKind() & ServerEvent.STATE_CHANGE) != 0) {
+ if( event.getState() != IServer.STATE_STOPPED)
+ stateChanges.add(new Integer(event.getState()));
+ }
+ }
+ }
+ }
+
+ protected class ErrorStreamListener implements IStreamListener {
+ protected boolean errorFound = false;
+ String entireLog = "";
+ public void streamAppended(String text, IStreamMonitor monitor) {
+ entireLog += text;
+ }
+
+ // will need to be fixed or decided how to figure out errors
+ public boolean hasError() {
+ return errorFound;
+ }
+ }
+
+ protected void startup() { startup(DEFAULT_STARTUP_TIME); }
+ protected void startup(int maxWait) {
+ long finishTime = new Date().getTime() + maxWait;
+
+ // operation listener, which is only alerted when the startup is *done*
+ final StatusWrapper opWrapper = new StatusWrapper();
+ final IOperationListener listener = new IOperationListener() {
+ public void done(IStatus result) {
+ opWrapper.setStatus(result);
+ } };
+
+
+ // a stream listener to listen for errors
+ ErrorStreamListener streamListener = new ErrorStreamListener();
+
+ // the thread to actually start the server
+ Thread startThread = new Thread() {
+ public void run() {
+ currentServer.start(ILaunchManager.RUN_MODE, listener);
+ }
+ };
+
+ startThread.start();
+
+ boolean addedStream = false;
+ while( finishTime > new Date().getTime() && opWrapper.getStatus() == null) {
+ // we're waiting for startup to finish
+ if( !addedStream ) {
+ IStreamMonitor mon = getStreamMonitor();
+ if( mon != null ) {
+ mon.addListener(streamListener);
+ addedStream = true;
+ }
+ }
+ try {
+ Display.getDefault().readAndDispatch();
+ } catch( SWTException swte ) {}
+ }
+
+ try {
+ assertTrue("Startup has taken longer than what is expected for a default startup", finishTime >= new Date().getTime());
+ assertNotNull("Startup never finished", opWrapper.getStatus());
+ assertFalse("Startup had System.error output", streamListener.hasError());
+ } catch( AssertionFailedError afe ) {
+ // cleanup
+ currentServer.stop(true);
+ // rethrow
+ throw afe;
+ }
+ getStreamMonitor().removeListener(streamListener);
+ }
+
+
+ protected IStreamMonitor getStreamMonitor() {
+ JBossServerBehavior behavior =
+ (JBossServerBehavior)currentServer.loadAdapter(JBossServerBehavior.class, null);
+ if( behavior != null ) {
+ if( behavior.getProcess() != null ) {
+ return behavior.getProcess().getStreamsProxy().getOutputStreamMonitor();
+ }
+ }
+ return null;
+ }
+
+ public class StatusWrapper {
+ protected IStatus status;
+ public IStatus getStatus() { return this.status; }
+ public void setStatus(IStatus s) { this.status = s; }
+ }
+
+}
15 years, 10 months
JBoss Tools SVN: r8912 - in trunk/ws/plugins: org.jboss.tools.ws.creation.ui and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dennyxu
Date: 2008-06-24 04:12:37 -0400 (Tue, 24 Jun 2008)
New Revision: 8912
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/utils/JBossWSCreationUtils.java
trunk/ws/plugins/org.jboss.tools.ws.creation.ui/plugin.xml
Log:
JBIDE-2419: unable to get runtime location from project target runtime with eclipse 3.4
Modified: trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/utils/JBossWSCreationUtils.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/utils/JBossWSCreationUtils.java 2008-06-24 01:35:00 UTC (rev 8911)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/utils/JBossWSCreationUtils.java 2008-06-24 08:12:37 UTC (rev 8912)
@@ -281,51 +281,71 @@
return true;
}
- public static String getJbossWSRuntimeLocation(IProject project) throws CoreException{
-
- String isServerSupplied = project.getPersistentProperty(IJBossWSFacetDataModelProperties.PERSISTENCE_PROPERTY_SERVER_SUPPLIED_RUNTIME);
- String jbwsRuntimeName = project.getPersistentProperty(IJBossWSFacetDataModelProperties.PERSISTENCE_PROPERTY_QNAME_RUNTIME_NAME);
-
- if(jbwsRuntimeName != null &&
- !IJBossWSFacetDataModelProperties.DEFAULT_VALUE_IS_SERVER_SUPPLIED.equals(isServerSupplied)){
- JbossWSRuntime jbws = JbossWSRuntimeManager.getInstance().findRuntimeByName(jbwsRuntimeName);
- if(jbws != null){
+ public static String getJbossWSRuntimeLocation(IProject project)
+ throws CoreException {
+
+ String isServerSupplied = project
+ .getPersistentProperty(IJBossWSFacetDataModelProperties.PERSISTENCE_PROPERTY_SERVER_SUPPLIED_RUNTIME);
+ String jbwsRuntimeName = project
+ .getPersistentProperty(IJBossWSFacetDataModelProperties.PERSISTENCE_PROPERTY_QNAME_RUNTIME_NAME);
+
+ if (jbwsRuntimeName != null
+ && !"".equals(jbwsRuntimeName)
+ && !IJBossWSFacetDataModelProperties.DEFAULT_VALUE_IS_SERVER_SUPPLIED
+ .equals(isServerSupplied)) {
+ JbossWSRuntime jbws = JbossWSRuntimeManager.getInstance()
+ .findRuntimeByName(jbwsRuntimeName);
+ if (jbws != null) {
return jbws.getHomeDir();
- }else{
- String jbwsHomeDir = project.getPersistentProperty(IJBossWSFacetDataModelProperties.PERSISTENCE_PROPERTY_RNTIME_LOCATION);
- return jbwsHomeDir;
+ } else {
+ String jbwsHomeDir = project
+ .getPersistentProperty(IJBossWSFacetDataModelProperties.PERSISTENCE_PROPERTY_RNTIME_LOCATION);
+ if (new File(jbwsHomeDir).exists()) {
+ return jbwsHomeDir;
+ }
}
}
- //if users select server as its jbossws runtime, then get runtime location from project target runtime
- else{
- IFacetedProject facetedPrj = ProjectFacetsManager.create(project);
- org.eclipse.wst.common.project.facet.core.runtime.IRuntime prjFacetRuntime = facetedPrj.getPrimaryRuntime();
+ // if users select server as its jbossws runtime, then get runtime
+ // location from project target runtime
- if(prjFacetRuntime != null){
- IRuntime serverRuntime = getRuntime(prjFacetRuntime);
- String runtimeTypeName = serverRuntime.getRuntimeType().getName();
- if(runtimeTypeName == null){
- runtimeTypeName = "";
- }
- if(runtimeTypeName.toUpperCase().indexOf("JBOSS") >= 0){
- return serverRuntime.getLocation().removeLastSegments(1).toOSString();
- }
+ IFacetedProject facetedPrj = ProjectFacetsManager.create(project);
+ org.eclipse.wst.common.project.facet.core.runtime.IRuntime prjFacetRuntime = facetedPrj
+ .getPrimaryRuntime();
+
+ if (prjFacetRuntime != null) {
+ IRuntime serverRuntime = getRuntime(prjFacetRuntime);
+ String runtimeTypeName = serverRuntime.getRuntimeType().getName();
+ if (runtimeTypeName == null) {
+ runtimeTypeName = "";
}
-
- //if no target runtime has been specified, get runtime location from default jbossws runtime
- if(prjFacetRuntime == null){
- JbossWSRuntime jbws = JbossWSRuntimeManager.getInstance().getDefaultRuntime();
- if(jbws != null){
- return jbws.getHomeDir();
+ if (runtimeTypeName.toUpperCase().indexOf("JBOSS") >= 0) {
+ String runtimeLocation = serverRuntime.getLocation().toOSString();
+ if(runtimeLocation.endsWith("bin")){
+ return serverRuntime.getLocation().removeLastSegments(1)
+ .toOSString();
}else{
- throw new CoreException(StatusUtils.errorStatus(JBossWSCreationCoreMessages.Error_Message_No_Runtime_Specified));
+ return runtimeLocation;
}
-
}
-
}
+
+ // if no target runtime has been specified, get runtime location from
+ // default jbossws runtime
+ if (prjFacetRuntime == null) {
+ JbossWSRuntime jbws = JbossWSRuntimeManager.getInstance()
+ .getDefaultRuntime();
+ if (jbws != null) {
+ return jbws.getHomeDir();
+ } else {
+ throw new CoreException(
+ StatusUtils
+ .errorStatus(JBossWSCreationCoreMessages.Error_Message_No_Runtime_Specified));
+ }
+
+ }
+
return "";
-
+
}
public static IRuntime getRuntime(org.eclipse.wst.common.project.facet.core.runtime.IRuntime runtime) {
Modified: trunk/ws/plugins/org.jboss.tools.ws.creation.ui/plugin.xml
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.ui/plugin.xml 2008-06-24 01:35:00 UTC (rev 8911)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.ui/plugin.xml 2008-06-24 08:12:37 UTC (rev 8912)
@@ -27,8 +27,7 @@
topDown="true"
class="org.jboss.tools.ws.creation.ui.wsrt.JBossWebServiceRuntime">
- <required-facet-version facet="jst.web" version="2.3" allow-newer="true"/>
- <required-facet-version facet="jbossws.core" version="2.0.1" allow-newer="true" />
+ <required-facet-version facet="jst.web" version="2.4" allow-newer="true"/>
<!--required-facet-version facet="jbossws.ext" version="1.0" allow-newer="true" / -->
</serviceRuntime>
15 years, 10 months
JBoss Tools SVN: r8911 - trunk/birt/plugins/org.jboss.tools.birt.core.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-06-23 21:35:00 -0400 (Mon, 23 Jun 2008)
New Revision: 8911
Modified:
trunk/birt/plugins/org.jboss.tools.birt.core/plugin.properties
trunk/birt/plugins/org.jboss.tools.birt.core/plugin.xml
Log:
JBIDE-2220 JBoss BIRT Integration
Modified: trunk/birt/plugins/org.jboss.tools.birt.core/plugin.properties
===================================================================
--- trunk/birt/plugins/org.jboss.tools.birt.core/plugin.properties 2008-06-23 22:59:21 UTC (rev 8910)
+++ trunk/birt/plugins/org.jboss.tools.birt.core/plugin.properties 2008-06-24 01:35:00 UTC (rev 8911)
@@ -1,3 +1,3 @@
JBOSS_BIRT_FACET_LABEL=JBoss BIRT Reporting Runtime Component
JBOSS_BIRT_FACET_DESCRIPTION=JBoss BIRT Reporting Runtime Component
-JBOSS_BIRT_FACET_TEMPLATE_LABEL=JBoss BIRT Reporting Web Project
+JBOSS_BIRT_FACET_TEMPLATE_LABEL=JBoss BIRT Integration Web Project
Modified: trunk/birt/plugins/org.jboss.tools.birt.core/plugin.xml
===================================================================
--- trunk/birt/plugins/org.jboss.tools.birt.core/plugin.xml 2008-06-23 22:59:21 UTC (rev 8910)
+++ trunk/birt/plugins/org.jboss.tools.birt.core/plugin.xml 2008-06-24 01:35:00 UTC (rev 8911)
@@ -2,7 +2,7 @@
<?eclipse version="3.2"?>
<plugin>
- <!-- Project Facets -->
+ <!-- Project Facets
<extension point="org.eclipse.wst.common.project.facet.core.facets">
@@ -27,25 +27,25 @@
<config-factory class="org.jboss.tools.birt.core.internal.project.facet.JBossBirtFacetInstallDataModelProvider"/>
</action>
- <!--
+ // FIXME
<action id="jboss.birt.v10.uninstall" facet="jboss.birt" type="UNINSTALL" version="1.0">
<delegate class="org.jboss.tools.birt.core.internal.project.facet.JBossBirtFacetUninstallDelegate"/>
</action>
- -->
+ // FIXME
</extension>
-
+ -->
<extension point="org.eclipse.wst.common.project.facet.core.presets">
<static-preset id="preset.jboss.birt">
<label>%JBOSS_BIRT_FACET_TEMPLATE_LABEL</label>
<description>%JBOSS_BIRT_FACET_TEMPLATE_LABEL</description>
- <facet id="jboss.birt" version="1.0"/>
+ <facet id="birt.runtime" version="2.3.0"/>
<facet id="jst.java" version="5.0"/>
<facet id="jst.web" version="2.5"/>
<facet id="jst.jsf" version="1.2"/>
-
+ <facet id="jst.seam" version="2.0"/>
</static-preset>
</extension>
-
+ <!--
<extension point="org.eclipse.wst.common.project.facet.core.runtimes">
<supported>
<facet id="jboss.birt" version="1.0"/>
@@ -58,7 +58,7 @@
<page class="org.eclipse.birt.integration.wtp.ui.internal.wizards.BirtWebProjectWizardConfigurationPage"/>
</wizard-pages>
</extension>
-
+ -->
<extension point="org.eclipse.wst.common.project.facet.core.listeners">
<listener class="org.jboss.tools.birt.core.internal.project.facet.BirtPostInstallListener"
eventTypes="POST_INSTALL"/>
15 years, 10 months
JBoss Tools SVN: r8910 - in trunk/core/tests/org.jboss.ide.eclipse.archives.test: META-INF and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-06-23 18:59:21 -0400 (Mon, 23 Jun 2008)
New Revision: 8910
Modified:
trunk/core/tests/org.jboss.ide.eclipse.archives.test/META-INF/MANIFEST.MF
trunk/core/tests/org.jboss.ide.eclipse.archives.test/build.properties
Log:
http://jira.jboss.org/jira/browse/JBIDE-2418
test resources were added to build
Modified: trunk/core/tests/org.jboss.ide.eclipse.archives.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/core/tests/org.jboss.ide.eclipse.archives.test/META-INF/MANIFEST.MF 2008-06-23 14:11:23 UTC (rev 8909)
+++ trunk/core/tests/org.jboss.ide.eclipse.archives.test/META-INF/MANIFEST.MF 2008-06-23 22:59:21 UTC (rev 8910)
@@ -12,3 +12,8 @@
org.jboss.tools.common.test
Eclipse-LazyStart: true
Bundle-ClassPath: archivestest.jar
+Export-Package: org.jboss.ide.eclipse.archives.test,
+ org.jboss.ide.eclipse.archives.test.core,
+ org.jboss.ide.eclipse.archives.test.model,
+ org.jboss.ide.eclipse.archives.test.projects,
+ org.jboss.ide.eclipse.archives.test.util
Modified: trunk/core/tests/org.jboss.ide.eclipse.archives.test/build.properties
===================================================================
--- trunk/core/tests/org.jboss.ide.eclipse.archives.test/build.properties 2008-06-23 14:11:23 UTC (rev 8909)
+++ trunk/core/tests/org.jboss.ide.eclipse.archives.test/build.properties 2008-06-23 22:59:21 UTC (rev 8910)
@@ -1,5 +1,8 @@
-source.. = src/
output.archivestest.jar = bin/
bin.includes = META-INF/,\
- archivestest.jar
+ archivestest.jar,\
+ output/,\
+ inputs/,\
+ expectedOutputs/
source.archivestest.jar = src/
+jars.compile.order = archivestest.jar
15 years, 10 months
JBoss Tools SVN: r8909 - in trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui: src/org/jboss/tools/hibernate/jpt/ui and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2008-06-23 10:11:23 -0400 (Mon, 23 Jun 2008)
New Revision: 8909
Added:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/EntitiesInitWizardPage.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/GenerateEntitiesWizard.java
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/META-INF/MANIFEST.MF
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/platform/HibernatePlatformUI.java
Log:
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/META-INF/MANIFEST.MF 2008-06-23 13:57:24 UTC (rev 8908)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/META-INF/MANIFEST.MF 2008-06-23 14:11:23 UTC (rev 8909)
@@ -16,7 +16,11 @@
org.hibernate.eclipse.console;bundle-version="3.2.0",
org.hibernate.eclipse;bundle-version="3.2.0",
org.eclipse.core.resources;bundle-version="3.4.0",
- org.eclipse.debug.core;bundle-version="3.4.0"
+ org.eclipse.debug.core;bundle-version="3.4.0",
+ org.eclipse.jdt.core;bundle-version="3.4.0",
+ org.eclipse.jpt.db;bundle-version="1.1.1",
+ org.eclipse.jdt.ui;bundle-version="3.4.0",
+ org.eclipse.jpt.db.ui;bundle-version="1.0.1"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Vendor: Hibernate Team
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/platform/HibernatePlatformUI.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/platform/HibernatePlatformUI.java 2008-06-23 13:57:24 UTC (rev 8908)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/platform/HibernatePlatformUI.java 2008-06-23 14:11:23 UTC (rev 8909)
@@ -11,20 +11,31 @@
package org.jboss.tools.hibernate.jpt.ui.internal.platform;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import org.eclipse.core.resources.WorkspaceJob;
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.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationType;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.window.Window;
+import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.jpt.core.JpaProject;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.jpt.gen.internal.EntityGenerator;
+import org.eclipse.jpt.gen.internal.PackageGenerator;
import org.eclipse.jpt.ui.internal.platform.generic.GenericPlatformUi;
import org.hibernate.eclipse.launch.HibernateLaunchConstants;
+import org.jboss.tools.hibernate.jpt.ui.wizard.GenerateEntitiesWizard;
/**
* @author Dmitry Geraskov
@@ -39,26 +50,35 @@
@Override
public void generateEntities(JpaProject project, IStructuredSelection selection) {
- ILaunchConfigurationWorkingCopy wc = createDefaultLaunchConfig(project.getName());
- if (wc != null) {
- // Main
- // SHOULD PRESENT THE CONFIGURATION!!!
- wc.setAttribute(HibernateLaunchConstants.ATTR_CONSOLE_CONFIGURATION_NAME, project.getName());
+ GenerateEntitiesWizard wizard = new GenerateEntitiesWizard(project, selection);
+
+ WizardDialog dialog = new WizardDialog(null, wizard);
+ dialog.create();
+ int returnCode = dialog.open();
+ if (returnCode == Window.OK) {
+ ILaunchConfigurationWorkingCopy wc = createDefaultLaunchConfig(project.getName());
+ if (wc != null) {
+ // SHOULD PRESENT THE CONFIGURATION!!!
+ //unknown - ccname, outputdir, packagename
+ wc.setAttribute(HibernateLaunchConstants.ATTR_CONSOLE_CONFIGURATION_NAME, project.getName());
- wc.setAttribute(HibernateLaunchConstants.ATTR_OUTPUT_DIR, project.getName() + "\\src"); //$NON-NLS-1$
+ wc.setAttribute(HibernateLaunchConstants.ATTR_OUTPUT_DIR, project.getName() + "\\src"); //$NON-NLS-1$
- wc.setAttribute(HibernateLaunchConstants.ATTR_PACKAGE_NAME, "package_name");
- wc.setAttribute(HibernateLaunchConstants.ATTR_PREFER_BASIC_COMPOSITE_IDS, true);
- wc.setAttribute(HibernateLaunchConstants.ATTR_AUTOMATIC_MANY_TO_MANY, true);
- wc.setAttribute(HibernateLaunchConstants.ATTR_AUTOMATIC_VERSIONING, true);
+ wc.setAttribute(HibernateLaunchConstants.ATTR_PACKAGE_NAME, "package_name");
+ wc.setAttribute(HibernateLaunchConstants.ATTR_PREFER_BASIC_COMPOSITE_IDS, true);
+ wc.setAttribute(HibernateLaunchConstants.ATTR_AUTOMATIC_MANY_TO_MANY, true);
+ wc.setAttribute(HibernateLaunchConstants.ATTR_AUTOMATIC_VERSIONING, true);
- wc.setAttribute(HibernateLaunchConstants.ATTR_ENABLE_JDK5, true);
- wc.setAttribute(HibernateLaunchConstants.ATTR_ENABLE_EJB3_ANNOTATIONS, true);
+ wc.setAttribute(HibernateLaunchConstants.ATTR_ENABLE_JDK5, true);
+ wc.setAttribute(HibernateLaunchConstants.ATTR_ENABLE_EJB3_ANNOTATIONS, true);
- wc.setAttribute(HibernateLaunchConstants.ATTR_EXPORTERS + '.' + exporter_id + ".extension_id",
- HibernateLaunchConstants.ATTR_PREFIX + "hbm2java"); //$NON-NLS-1$ //$NON-NLS-2$
- runLaunchConfiguration(wc);
+ wc.setAttribute(HibernateLaunchConstants.ATTR_EXPORTERS + '.' + exporter_id + ".extension_id",
+ HibernateLaunchConstants.ATTR_PREFIX + "hbm2java"); //$NON-NLS-1$ //$NON-NLS-2$
+ runLaunchConfiguration(wc);
+ }
}
+
+
}
@Override
@@ -66,13 +86,13 @@
ILaunchConfigurationWorkingCopy wc = createDefaultLaunchConfig(project.getName());
if (wc != null) {
// Main
- // SHOULD PRESENT THE CONFIGURATION!!!
+ //unknown - ccname, outputdir, filename
wc.setAttribute(HibernateLaunchConstants.ATTR_CONSOLE_CONFIGURATION_NAME, project.getName());
wc.setAttribute(HibernateLaunchConstants.ATTR_OUTPUT_DIR, project.getName() + "\\src"); //$NON-NLS-1$
Map<String, String> prop = new HashMap<String, String>();
prop.put("outputFileName", "schema.ddl");
- prop.put("outputdir", project.getName() + "\\src");
+ //prop.put("outputdir", project.getName() + "\\src");
prop.put("format", "true");
prop.put("scriptToConsole", "false");
Added: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/EntitiesInitWizardPage.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/EntitiesInitWizardPage.java (rev 0)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/EntitiesInitWizardPage.java 2008-06-23 14:11:23 UTC (rev 8909)
@@ -0,0 +1,159 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2008 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.jpt.ui.wizard;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.jdt.internal.ui.wizards.dialogfields.ComboDialogField;
+import org.eclipse.jdt.internal.ui.wizards.dialogfields.DialogField;
+import org.eclipse.jdt.internal.ui.wizards.dialogfields.IDialogFieldListener;
+import org.eclipse.jdt.internal.ui.wizards.dialogfields.IStringButtonAdapter;
+import org.eclipse.jdt.internal.ui.wizards.dialogfields.StringButtonDialogField;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.jpt.core.JpaProject;
+import org.eclipse.jpt.db.JptDbPlugin;
+import org.eclipse.jpt.ui.internal.JptUiMessages;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.eclipse.jpt.utility.internal.StringTools;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Group;
+import org.hibernate.console.ConsoleConfiguration;
+import org.hibernate.console.KnownConfigurations;
+import org.hibernate.eclipse.console.HibernateConsoleMessages;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public class EntitiesInitWizardPage extends WizardPage {
+
+ private ComboDialogField connectionProfileName;
+
+ private StringButtonDialogField schemaName;
+
+ private ComboDialogField consoleConfigurationName;
+
+ private Group dbGroup;
+
+ private JpaProject jpaProject;
+
+ public EntitiesInitWizardPage(JpaProject jpaProject){
+ super("", "", null);
+ this.jpaProject = jpaProject;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+ */
+ public void createControl(Composite parent) {
+ Composite container = new Composite(parent, SWT.NULL);
+ GridLayout layout = new GridLayout();
+ int numColumns = 3;
+
+ container.setLayout(layout);
+ layout.numColumns = numColumns;
+ layout.verticalSpacing = 10;
+
+ createDBGroup(container, numColumns);
+
+ ComboDialogField consoleConfigurationName = new ComboDialogField(SWT.READ_ONLY);
+ consoleConfigurationName.setLabelText(HibernateConsoleMessages.CodeGenerationSettingsTab_console_configuration);
+ ConsoleConfiguration[] cfg = KnownConfigurations.getInstance().getConfigurationsSortedByName();
+ String[] names = new String[cfg.length];
+ for (int i = 0; i < cfg.length; i++) {
+ ConsoleConfiguration configuration = cfg[i];
+ names[i] = configuration.getName();
+ }
+ consoleConfigurationName.setItems(names);
+
+ IDialogFieldListener fieldlistener = new IDialogFieldListener() {
+ public void dialogFieldChanged(DialogField field) {
+ dialogChanged();
+ }
+ };
+
+ consoleConfigurationName.setDialogFieldListener(fieldlistener);
+ consoleConfigurationName.doFillIntoGrid(container, numColumns);
+
+ setControl(container);
+ setPageComplete( false);
+ }
+
+ /**
+ * @param container
+ * @param colCount
+ */
+ private void createDBGroup(Composite container, int numColumns) {
+ dbGroup = new Group(container, SWT.FILL);
+ dbGroup.setLayout(new FillLayout());
+ GridLayout layout = new GridLayout();
+ dbGroup.setLayout(layout);
+ layout.numColumns = numColumns;
+ layout.verticalSpacing = 10;
+
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = numColumns;
+ dbGroup.setLayoutData(gd);
+ dbGroup.setText(JptUiMessages.DatabaseReconnectWizardPage_database);
+
+ connectionProfileName = new ComboDialogField(SWT.READ_ONLY);
+ connectionProfileName.setLabelText(JptUiMessages.DatabaseReconnectWizardPage_connection);
+
+ List<String> list = dtpConnectionProfileNames();
+ connectionProfileName.setItems((String[]) list.toArray(new String[list.size()]));
+
+ String connectionName = getProjectConnectionProfileName();
+ if (!StringTools.stringIsEmpty(connectionName)) {
+ connectionProfileName.selectItem(connectionName);
+ }
+ connectionProfileName.doFillIntoGrid(dbGroup, numColumns);
+
+ schemaName = new StringButtonDialogField(new IStringButtonAdapter(){
+ public void changeControlPressed(DialogField field) {
+ // TODO Auto-generated method stub
+
+ }});
+ schemaName.setLabelText(JptUiMessages.DatabaseReconnectWizardPage_schema);
+ schemaName.setButtonLabel("Refresh");
+ Control[] controls = schemaName.doFillIntoGrid(dbGroup, numColumns);
+ // Hack to tell the text field to stretch!
+ ( (GridData)controls[1].getLayoutData() ).grabExcessHorizontalSpace = true;
+ }
+
+ /**
+ *
+ */
+ protected void dialogChanged() {
+ // TODO Auto-generated method stub
+
+ }
+
+ private List<String> dtpConnectionProfileNames() {
+ List<String> list = new ArrayList<String>();
+ for (Iterator<String> i = CollectionTools.sort(JptDbPlugin.instance().getConnectionProfileRepository().connectionProfileNames()); i.hasNext();) {
+ list.add(i.next());
+ }
+ return list;
+ }
+
+ private String getProjectConnectionProfileName() {
+ return jpaProject.getDataSource().getConnectionProfileName();
+ }
+
+}
Property changes on: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/EntitiesInitWizardPage.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/GenerateEntitiesWizard.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/GenerateEntitiesWizard.java (rev 0)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/GenerateEntitiesWizard.java 2008-06-23 14:11:23 UTC (rev 8909)
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2008 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.jpt.ui.wizard;
+
+import java.util.Collection;
+import java.util.Collections;
+
+import org.eclipse.jdt.core.IPackageFragment;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.jpt.core.JpaProject;
+import org.eclipse.jpt.db.ConnectionProfile;
+import org.eclipse.jpt.db.Schema;
+import org.eclipse.jpt.db.Table;
+import org.eclipse.jpt.gen.internal.EntityGenerator;
+import org.eclipse.jpt.gen.internal.PackageGenerator;
+import org.eclipse.jpt.ui.internal.JptUiMessages;
+import org.eclipse.jpt.ui.internal.wizards.DatabaseReconnectWizardPage;
+import org.eclipse.jpt.utility.internal.CollectionTools;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public class GenerateEntitiesWizard extends Wizard {
+
+ private JpaProject jpaProject;
+
+ private IStructuredSelection selection;
+
+
+
+ private Collection<Table> selectedTables;
+
+ public GenerateEntitiesWizard( JpaProject jpaProject, IStructuredSelection selection) {
+ super();
+ this.jpaProject = jpaProject;
+ this.selection = selection;
+ this.setWindowTitle( JptUiMessages.GenerateEntitiesWizard_generateEntities);
+ }
+
+ @Override
+ public void addPages() {
+ super.addPages();
+ addPage(new EntitiesInitWizardPage(jpaProject));
+ }
+
+ @Override
+ public boolean performFinish() {
+
+ return true;
+ }
+
+ private IPackageFragment buildPackageFragment() {
+ IPackageFragmentRoot packageFragmentRoot = null;//this.generateEntitiesPage.getPackageFragmentRoot();
+ IPackageFragment packageFragment = null;//this.generateEntitiesPage.getPackageFragment();
+
+ if ( packageFragment == null) {
+ packageFragment= packageFragmentRoot.getPackageFragment( ""); //$NON-NLS-1$
+ }
+
+ if ( packageFragment.exists()) {
+ return packageFragment;
+ }
+
+ try {
+ return packageFragmentRoot.createPackageFragment( packageFragment.getElementName(), true, null);
+ }
+ catch ( JavaModelException ex) {
+ throw new RuntimeException( ex);
+ }
+ }
+
+
+
+}
Property changes on: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/GenerateEntitiesWizard.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
15 years, 10 months
JBoss Tools SVN: r8908 - branches/jbosstools-2.1.x/seam/plugins/org.jboss.tools.seam.core.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2008-06-23 09:57:24 -0400 (Mon, 23 Jun 2008)
New Revision: 8908
Modified:
branches/jbosstools-2.1.x/seam/plugins/org.jboss.tools.seam.core/plugin.xml
Log:
http://jira.jboss.com/jira/browse/JBIDE-2402 Fixed
Modified: branches/jbosstools-2.1.x/seam/plugins/org.jboss.tools.seam.core/plugin.xml
===================================================================
--- branches/jbosstools-2.1.x/seam/plugins/org.jboss.tools.seam.core/plugin.xml 2008-06-23 13:54:51 UTC (rev 8907)
+++ branches/jbosstools-2.1.x/seam/plugins/org.jboss.tools.seam.core/plugin.xml 2008-06-23 13:57:24 UTC (rev 8908)
@@ -80,7 +80,7 @@
</requires>
<requires
facet="jst.java"
- version="5.0">
+ version="[5.0">
</requires>
</and>
</constraint>
15 years, 10 months
JBoss Tools SVN: r8907 - trunk/seam/plugins/org.jboss.tools.seam.core.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2008-06-23 09:54:51 -0400 (Mon, 23 Jun 2008)
New Revision: 8907
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/plugin.xml
Log:
http://jira.jboss.com/jira/browse/JBIDE-2402 Fixed
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/plugin.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/plugin.xml 2008-06-23 13:46:34 UTC (rev 8906)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/plugin.xml 2008-06-23 13:54:51 UTC (rev 8907)
@@ -80,7 +80,7 @@
</requires>
<requires
facet="jst.java"
- version="5.0">
+ version="[5.0">
</requires>
</and>
</constraint>
15 years, 10 months
JBoss Tools SVN: r8906 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-06-23 09:46:34 -0400 (Mon, 23 Jun 2008)
New Revision: 8906
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java
Log:
JBDS-353
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java 2008-06-23 13:36:28 UTC (rev 8905)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java 2008-06-23 13:46:34 UTC (rev 8906)
@@ -356,6 +356,9 @@
}
public static XModelObject findResourceInFileSystem(FileSystemImpl s, IResource resource) {
+ if(resource == null || resource.getLocation() == null) {
+ return null;
+ }
IResource sr = s.getResource();
if(sr == null) return null;
if(!sr.getLocation().isPrefixOf(resource.getLocation())) return null;
15 years, 10 months
JBoss Tools SVN: r8905 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-06-23 09:36:28 -0400 (Mon, 23 Jun 2008)
New Revision: 8905
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE1105Test.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE675Test.java
Log:
=JBIDE-2390
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE1105Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE1105Test.java 2008-06-23 12:29:13 UTC (rev 8904)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE1105Test.java 2008-06-23 13:36:28 UTC (rev 8905)
@@ -24,9 +24,9 @@
*/
public class JBIDE1105Test extends VpeTest {
- public static final String IMPORT_PROJECT_NAME = "jsfTest";
+ public static final String IMPORT_PROJECT_NAME = "jsfTest"; //$NON-NLS-1$
- private static final String TEST_PAGE_NAME="JBIDE/1105/employee.xhtml";
+ private static final String TEST_PAGE_NAME="JBIDE/1105/employee.xhtml"; //$NON-NLS-1$
public JBIDE1105Test(String name) {
super(name);
@@ -40,11 +40,11 @@
IFile file = (IFile) TestUtil.getComponentPath(TEST_PAGE_NAME,
IMPORT_PROJECT_NAME);
- assertNotNull("Could not open specified file " + TEST_PAGE_NAME, file);
+ assertNotNull("Could not open specified file " + TEST_PAGE_NAME, file); //$NON-NLS-1$
IEditorInput input = new FileEditorInput(file);
- assertNotNull("Editor input is null", input);
+ assertNotNull("Editor input is null", input); //$NON-NLS-1$
final JSPMultiPageEditor parts = openEditor(input);
TestUtil.waitForIdle();
@@ -61,9 +61,9 @@
}
for (int i = 0; i < 10; i++) {
int offset = styledText.getOffsetAtLine(23);
- styledText.setCaretOffset(offset - " Test ".length()
+ styledText.setCaretOffset(offset - " Test ".length() //$NON-NLS-1$
- delimiter.length());
- styledText.insert(" Test ");
+ styledText.insert(" Test "); //$NON-NLS-1$
TestUtil.waitForIdle();
}
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE675Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE675Test.java 2008-06-23 12:29:13 UTC (rev 8904)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE675Test.java 2008-06-23 13:36:28 UTC (rev 8905)
@@ -309,13 +309,13 @@
@Override
public IStatus runInUIThread(IProgressMonitor monitor) {
- part.getVisualEditor().getController().visualRefresh();
part.close(false);
part.dispose();
return Status.OK_STATUS;
}};
job.setPriority(Job.SHORT);
job.schedule(900);
+ part.getVisualEditor().getController().visualRefresh();
TestUtil.delay(450);
if(getException()!=null) {
throw getException();
15 years, 10 months