JBoss Tools SVN: r14824 - trunk/esb/plugins/org.jboss.tools.esb.ui.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-04-20 12:07:07 -0400 (Mon, 20 Apr 2009)
New Revision: 14824
Modified:
trunk/esb/plugins/org.jboss.tools.esb.ui/plugin.xml
Log:
https://jira.jboss.org/jira/browse/JBIDE-3665
Modified: trunk/esb/plugins/org.jboss.tools.esb.ui/plugin.xml
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.ui/plugin.xml 2009-04-20 16:06:44 UTC (rev 14823)
+++ trunk/esb/plugins/org.jboss.tools.esb.ui/plugin.xml 2009-04-20 16:07:07 UTC (rev 14824)
@@ -58,17 +58,32 @@
<contentType id="org.eclipse.wst.xml.core.xmlsource">
<partitionType id="org.jboss.tools.common.text.ext.xml.XML_ATTRIBUTE_VALUE">
<axis path="/jbossesb/services/service/actions/action/class" />
+ <axis path="/jbossesb/services/service/listeners/scheduled-listener/event-processor" />
+ <axis path="/jbossesb/providers/jms-jca-provider/endpointClass" />
+ <axis path="/jbossesb/providers/jms-jca-provider/jcaBridge" />
+ <axis path="/jbossesb/providers/jms-jca-provider/messagingType" />
+ <axis path="/jbossesb/providers/hibernate-provider/hibernate-bus/hibernate-message-filter/classname" />
</partitionType>
</contentType>
<contentType id="org.eclipse.core.runtime.xml">
<partitionType id="org.jboss.tools.common.text.ext.xml.XML_ATTRIBUTE_VALUE">
<axis path="/jbossesb/services/service/actions/action/class" />
+ <axis path="/jbossesb/services/service/listeners/scheduled-listener/event-processor" />
+ <axis path="/jbossesb/providers/jms-jca-provider/endpointClass" />
+ <axis path="/jbossesb/providers/jms-jca-provider/jcaBridge" />
+ <axis path="/jbossesb/providers/jms-jca-provider/messagingType" />
+ <axis path="/jbossesb/providers/hibernate-provider/hibernate-bus/hibernate-message-filter/classname" />
</partitionType>
</contentType>
<contentType id="org.jboss.tools.common.model.ui.xml">
<partitionType id="org.jboss.tools.common.text.ext.xml.XML_ATTRIBUTE_VALUE">
<axis path="/jbossesb/services/service/actions/action/class" />
+ <axis path="/jbossesb/services/service/listeners/scheduled-listener/event-processor" />
+ <axis path="/jbossesb/providers/jms-jca-provider/endpointClass" />
+ <axis path="/jbossesb/providers/jms-jca-provider/jcaBridge" />
+ <axis path="/jbossesb/providers/jms-jca-provider/messagingType" />
+ <axis path="/jbossesb/providers/hibernate-provider/hibernate-bus/hibernate-message-filter/classname" />
</partitionType>
</contentType>
15 years, 8 months
JBoss Tools SVN: r14823 - trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-04-20 12:06:44 -0400 (Mon, 20 Apr 2009)
New Revision: 14823
Modified:
trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb.meta
Log:
https://jira.jboss.org/jira/browse/JBIDE-3665
Modified: trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb.meta
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb.meta 2009-04-20 15:56:24 UTC (rev 14822)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb.meta 2009-04-20 16:06:44 UTC (rev 14823)
@@ -2344,7 +2344,9 @@
<XModelAttribute PROPERTIES="category=advanced"
name="schedule id ref" xmlname="scheduleidref"/>
<XModelAttribute PROPERTIES="category=general;save=always"
- name="event processor" xmlname="event-processor"/>
+ name="event processor" xmlname="event-processor">
+ <Editor name="AccessibleJava"/>
+ </XModelAttribute>
<XModelAttribute PROPERTIES="category=advanced" name="transacted" xmlname="transacted">
<Constraint loader="ListString">
<value/>
15 years, 8 months
JBoss Tools SVN: r14822 - trunk/ws/docs/reference/en/images/topdown.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2009-04-20 11:56:24 -0400 (Mon, 20 Apr 2009)
New Revision: 14822
Modified:
trunk/ws/docs/reference/en/images/topdown/jbossws_bottomup.png
trunk/ws/docs/reference/en/images/topdown/jbossws_bottomup_5.png
trunk/ws/docs/reference/en/images/topdown/jbossws_bottomup_6.png
Log:
https://jira.jboss.org/jira/browse/JBDS-398 - screenshots resized
Modified: trunk/ws/docs/reference/en/images/topdown/jbossws_bottomup.png
===================================================================
(Binary files differ)
Modified: trunk/ws/docs/reference/en/images/topdown/jbossws_bottomup_5.png
===================================================================
(Binary files differ)
Modified: trunk/ws/docs/reference/en/images/topdown/jbossws_bottomup_6.png
===================================================================
(Binary files differ)
15 years, 8 months
JBoss Tools SVN: r14821 - trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-04-20 10:22:24 -0400 (Mon, 20 Apr 2009)
New Revision: 14821
Modified:
trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta
Log:
https://jira.jboss.org/jira/browse/JBIDE-3665
Modified: trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta 2009-04-20 14:21:04 UTC (rev 14820)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta 2009-04-20 14:22:24 UTC (rev 14821)
@@ -11,7 +11,9 @@
<PAIR name="ESB1.0.1" value="FileESB101"/>
</MAPPING>
<MAPPING name="FilteredTreeConstraints"/>
- <MAPPING name="FilteredTrees"/>
+ <MAPPING name="FilteredTrees">
+ <PAIR name="ESBResourceTree" value="org.jboss.tools.jst.web.model.tree.WebPagesTree"/>
+ </MAPPING>
<MAPPING name="Handlers"/>
<MAPPING name="Implementations">
<PAIR name="ESB" value="org.jboss.tools.esb.core.model.ESBCustomizedObjectImpl"/>
@@ -645,8 +647,7 @@
</ICONS>
</XEntityRenderer>
<XModelAttributes>
- <XModelAttribute default="smooks action"
- loader="ElementType" name="element type">
+ <XModelAttribute default="smooks action" loader="ElementType" name="element type">
<Editor name="Uneditable"/>
</XModelAttribute>
<XModelAttribute PROPERTIES="category=general;id=true;save=always"
@@ -656,7 +657,13 @@
<Editor name="Uneditable"/>
</XModelAttribute>
<XModelAttribute PROPERTIES="category=general;save=always;pre=true"
- name="smooks config" xmlname="smooksConfig"/>
+ name="smooks config" xmlname="smooksConfig">
+ <Constraint loader="Tree">
+ <value name="ESBResourceTree"/>
+ <value name="extensions=xml"/>
+ </Constraint>
+ <Editor name="TreeChooser"/>
+ </XModelAttribute>
<XModelAttribute PROPERTIES="category=advanced;pre=true"
name="get payload location" xmlname="get-payload-location"/>
<XModelAttribute PROPERTIES="category=advanced;pre=true"
15 years, 8 months
JBoss Tools SVN: r14820 - in trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model: util and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-04-20 10:21:04 -0400 (Mon, 20 Apr 2009)
New Revision: 14820
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemImpl.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemsImpl.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3665
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemImpl.java 2009-04-20 13:16:42 UTC (rev 14819)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemImpl.java 2009-04-20 14:21:04 UTC (rev 14820)
@@ -161,6 +161,9 @@
if(resourceName != null && resource.isLinked()) return resourceName.replace('#', '/');
return resourceName;
}
+ if("true".equals(getModel().getProperties().getProperty("isProjectFragment"))) {
+ return resourceName;
+ }
return p.replace('#', '/') + " (" + resourceName + ")";
}
}
\ No newline at end of file
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemsImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemsImpl.java 2009-04-20 13:16:42 UTC (rev 14819)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemsImpl.java 2009-04-20 14:21:04 UTC (rev 14820)
@@ -41,7 +41,7 @@
IProject p = (IProject)getModel().getProperties().get("project");
String app = getAttributeValue("application name");
if(p != null && !app.equals(p.getName())) {
- app = p.getName() + " (" + app + ")";
+ app = app.length() > 0 ? p.getName() + " (" + app + ")" : p.getName();
}
return (app != null && app.length() > 0) ? app : super.getPresentationString();
}
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 2009-04-20 13:16:42 UTC (rev 14819)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java 2009-04-20 14:21:04 UTC (rev 14820)
@@ -25,6 +25,9 @@
import org.eclipse.jdt.core.*;
import org.eclipse.jdt.ui.PreferenceConstants;
import org.eclipse.swt.graphics.Image;
+import org.eclipse.wst.common.componentcore.ComponentCore;
+import org.eclipse.wst.common.componentcore.ModuleCoreNature;
+import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
import org.osgi.framework.Bundle;
import org.jboss.tools.common.meta.action.XActionInvoker;
@@ -341,6 +344,16 @@
properties.setProperty("name", project.getName());
s = (FileSystemImpl)model.createModelObject("FileSystemFolder", properties);
fs.addChild(s);
+ if(!isJar(resource)) {
+ IResource webRoot = getFirstWebContentResource(project);
+ if(webRoot != null && webRoot.exists() && webRoot != project) {
+ fsLoc = webRoot.getLocation().toString();
+ properties.setProperty("location", fsLoc);
+ properties.setProperty("name", "WEB-ROOT");
+ s = (FileSystemImpl)model.createModelObject("FileSystemFolder", properties);
+ fs.addChild(s);
+ }
+ }
if(!isJar(resource) || getObjectByResource(model, resource) == null) {
properties = new Properties();
@@ -370,6 +383,17 @@
return getObjectByResource(model, resource);
}
+ public static IResource getFirstWebContentResource(IProject project) {
+ IVirtualComponent vc = ComponentCore.createComponent(project);
+ if (vc == null || vc.getRootFolder() == null)
+ return null;
+ if (ModuleCoreNature.isFlexibleProject(project)) {
+ return vc.getRootFolder().getUnderlyingResource();
+ }
+
+ return null;
+ }
+
private static boolean isJar(IResource resource) {
return (resource instanceof IFile && isJar(resource.getName()));
}
15 years, 8 months
JBoss Tools SVN: r14819 - in trunk/esb/plugins/org.jboss.tools.esb.ui: src/org/jboss/tools/esb/ui/hyperlink and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-04-20 09:16:42 -0400 (Mon, 20 Apr 2009)
New Revision: 14819
Added:
trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/hyperlink/ESBPropertyLinkHyperlinkPartitioner.java
Modified:
trunk/esb/plugins/org.jboss.tools.esb.ui/plugin.xml
Log:
https://jira.jboss.org/jira/browse/JBIDE-3665
Modified: trunk/esb/plugins/org.jboss.tools.esb.ui/plugin.xml
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.ui/plugin.xml 2009-04-20 11:22:53 UTC (rev 14818)
+++ trunk/esb/plugins/org.jboss.tools.esb.ui/plugin.xml 2009-04-20 13:16:42 UTC (rev 14819)
@@ -102,6 +102,27 @@
</hyperlinkPartitioner>
+ <hyperlinkPartitioner
+ id="org.jboss.tools.esb.ui.hyperlink.ESBPropertyLinkHyperlinkPartitioner"
+ class="org.jboss.tools.esb.ui.hyperlink.ESBPropertyLinkHyperlinkPartitioner">
+ <contentType id="org.eclipse.wst.xml.core.xmlsource">
+ <partitionType id="org.jboss.tools.common.text.ext.xml.XML_ATTRIBUTE_VALUE">
+ <axis path="*/service/actions/action/property/value" />
+ </partitionType>
+ </contentType>
+ <contentType id="org.jboss.tools.common.model.ui.xml">
+ <partitionType id="org.jboss.tools.common.text.ext.xml.XML_ATTRIBUTE_VALUE">
+ <axis path="*/service/actions/action/property/value" />
+ </partitionType>
+ </contentType>
+ <contentType id="org.eclipse.core.runtime.xml">
+ <partitionType id="org.jboss.tools.common.text.ext.xml.XML_ATTRIBUTE_VALUE">
+ <axis path="*/service/actions/action/property/value" />
+ </partitionType>
+ </contentType>
+
+ </hyperlinkPartitioner>
+
</extension>
<extension
Added: trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/hyperlink/ESBPropertyLinkHyperlinkPartitioner.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/hyperlink/ESBPropertyLinkHyperlinkPartitioner.java (rev 0)
+++ trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/hyperlink/ESBPropertyLinkHyperlinkPartitioner.java 2009-04-20 13:16:42 UTC (rev 14819)
@@ -0,0 +1,98 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and 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:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.esb.ui.hyperlink;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jface.text.IDocument;
+
+import org.jboss.tools.common.text.ext.hyperlink.IHyperlinkRegion;
+import org.jboss.tools.common.text.ext.hyperlink.xml.XMLClassHyperlinkPartitioner;
+import org.jboss.tools.common.text.ext.hyperlink.xml.XMLLinkHyperlinkPartitioner;
+import org.jboss.tools.common.text.ext.util.StructuredModelWrapper;
+import org.jboss.tools.common.text.ext.util.Utils;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.Text;
+
+/**
+ * @author V.Kabanovich
+ */
+public class ESBPropertyLinkHyperlinkPartitioner extends XMLLinkHyperlinkPartitioner {
+ public static final String ESB_XML_LINK_PARTITION = "org.jboss.tools.common.text.ext.xml.ESB_XML_LINK";
+
+ static Set<String> linkPropertyNames = new HashSet<String>();
+ static Set<String> classPropertyNames = new HashSet<String>();
+
+ static {
+ linkPropertyNames.add("smooksConfig"); //$NON-NLS-1$
+ linkPropertyNames.add("resource-config"); //$NON-NLS-1$
+ classPropertyNames.add("class-processor"); //$NON-NLS-1$
+ classPropertyNames.add("incoming-type"); //$NON-NLS-1$
+ classPropertyNames.add("message-store-class"); //$NON-NLS-1$
+ }
+ String propertyName = null;
+ /**
+ * @see org.jboss.tools.common.text.ext.hyperlink.XMLLinkHyperlinkPartitioner#getPartitionType()
+ */
+ protected String getPartitionType() {
+ if(linkPropertyNames.contains(propertyName)) {
+ return ESB_XML_LINK_PARTITION;
+ }
+ if(classPropertyNames.contains(propertyName)) {
+ return XMLClassHyperlinkPartitioner.XML_CLASS_PARTITION;
+ }
+
+ return ESB_XML_LINK_PARTITION;
+ }
+
+ /**
+ * @see com.ibm.sse.editor.extensions.hyperlink.IHyperlinkPartitionRecognizer#recognize(org.eclipse.jface.text.IDocument, com.ibm.sse.editor.extensions.hyperlink.IHyperlinkRegion)
+ */
+ public boolean recognize(IDocument document, IHyperlinkRegion region) {
+ StructuredModelWrapper smw = new StructuredModelWrapper();
+ smw.init(document);
+ try {
+ Document xmlDocument = smw.getDocument();
+ IFile documentFile = smw.getFile();
+ IProject project = documentFile.getProject();
+ Node n = Utils.findNodeForOffset(xmlDocument, region.getOffset());
+
+ if (n == null || !(n instanceof Attr)) return false;
+
+ Attr a = (Attr)n;
+ Element p = a.getOwnerElement();
+ NamedNodeMap as = p.getAttributes();
+ Node c = as.getNamedItem("name");
+ if(!(c instanceof Attr)) return false;
+ propertyName = ((Attr)c).getValue();
+
+ if(linkPropertyNames.contains(propertyName)) {
+ return true;
+ }
+
+ if(classPropertyNames.contains(propertyName)) {
+ return true;
+ }
+
+ return false;
+ } finally {
+ smw.dispose();
+ }
+ }
+
+}
Property changes on: trunk/esb/plugins/org.jboss.tools.esb.ui/src/org/jboss/tools/esb/ui/hyperlink/ESBPropertyLinkHyperlinkPartitioner.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 8 months
JBoss Tools SVN: r14818 - branches/jbosstools-3.0.x/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-04-20 07:22:53 -0400 (Mon, 20 Apr 2009)
New Revision: 14818
Modified:
branches/jbosstools-3.0.x/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4195 Merge to 3.1.x
Modified: branches/jbosstools-3.0.x/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java
===================================================================
--- branches/jbosstools-3.0.x/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java 2009-04-20 09:32:06 UTC (rev 14817)
+++ branches/jbosstools-3.0.x/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java 2009-04-20 11:22:53 UTC (rev 14818)
@@ -152,19 +152,19 @@
public static XModelObject addFileSystem(IResource resource, XModel model) {
XModelObject fss = FileSystemsHelper.getFileSystems(model);
if(fss == null) return null;
- while(resource != null && resource != resource.getProject() && resource.getParent() != null && resource.getParent() != resource.getProject()) {
- resource = resource.getParent();
- }
if(resource == null) return null;
- if(resource != resource.getProject() && resource.getParent() != resource.getProject()) return null;
- if(resource.isLinked()) return null;
Properties properties = new Properties();
String fsLoc = resource.getLocation().toString();
if(resource == resource.getProject()) {
fsLoc = "%" + IModelNature.ECLIPSE_PROJECT + "%";
} else {
fsLoc = getRelativeLocation(model, fsLoc);
- }
+ }
+ XModelObject[] cs = fss.getChildren("FileSystemFolder");
+ for (int i = 0; i < cs.length; i++) {
+ String loc = cs[i].getAttributeValue("location");
+ if(fsLoc.equals(loc)) return null;
+ }
properties.setProperty("location", fsLoc);
String name = resource.getName();
name = XModelObjectUtil.createNewChildName(name, fss);
@@ -288,6 +288,13 @@
fs = addFileSystem(resource.getProject(), sp.getModel());
if(fs != null) result = getObjectByResource(resource);
}
+ if(result == null && resource != project) {
+ IResource r = resource.getParent();
+ if(r != null && r != project) {
+ fs = addFileSystem(r, sp.getModel());
+ if(fs != null) result = getObjectByResource(resource);
+ }
+ }
}
return result;
}
@@ -295,7 +302,15 @@
XModel model = models.get(project);
if(model != null) {
validateJarSystem(FileSystemsHelper.getFileSystems(model), resource);
- return getObjectByResource(model, resource);
+ XModelObject result = getObjectByResource(model, resource);
+ if(result == null && resource instanceof IFile) {
+ IResource r = resource.getParent();
+ if(r != null && project != r) {
+ XModelObject fs = addFileSystem(r, model);
+ if(fs != null) return getObjectByResource(model, resource);
+ }
+ }
+ return result;
}
Properties properties = new Properties();
@@ -388,8 +403,16 @@
s.update();
o = s.getChildByPath(relpath.substring(1));
}
+ if(o == null) return null;
XModelObject p = o;
while(p != null && !"true".equals(p.get("overlapped"))) p = p.getParent();
+ if(p == null) {
+ IResource r = (IResource)o.getAdapter(IResource.class);
+ if(r == null || !resource.getLocation().equals(r.getLocation())) {
+ //failure, more detailed file system is needed.
+ return null;
+ }
+ }
return (p == null) ? o : null;
}
15 years, 8 months
JBoss Tools SVN: r14817 - in trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test: publishing and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-04-20 05:32:06 -0400 (Mon, 20 Apr 2009)
New Revision: 14817
Added:
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/JBIDE4184Test.java
Modified:
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/ASTestSuite.java
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/server/StartupShutdownTest.java
Log:
JBIDE-4184 test case
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/ASTestSuite.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/ASTestSuite.java 2009-04-20 06:13:12 UTC (rev 14816)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/ASTestSuite.java 2009-04-20 09:32:06 UTC (rev 14817)
@@ -30,6 +30,7 @@
import org.jboss.ide.eclipse.as.test.classpath.RuntimeServerModelTest;
import org.jboss.ide.eclipse.as.test.publishing.JBIDE2512aTest;
import org.jboss.ide.eclipse.as.test.publishing.JBIDE2512bTest;
+import org.jboss.ide.eclipse.as.test.publishing.JBIDE4184Test;
public class ASTestSuite extends TestSuite {
public static Test suite() {
@@ -41,6 +42,7 @@
suite.addTestSuite(JBIDE1657Test.class);
suite.addTestSuite(JBIDE2512aTest.class);
suite.addTestSuite(JBIDE2512bTest.class);
+ suite.addTestSuite(JBIDE4184Test.class);
return suite;
}
Added: trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/JBIDE4184Test.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/JBIDE4184Test.java (rev 0)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/JBIDE4184Test.java 2009-04-20 09:32:06 UTC (rev 14817)
@@ -0,0 +1,58 @@
+package org.jboss.ide.eclipse.as.test.publishing;
+
+import java.io.File;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.wst.server.core.IRuntime;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.IServerWorkingCopy;
+import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.util.FileUtil;
+import org.jboss.ide.eclipse.as.test.ASTest;
+import org.jboss.ide.eclipse.as.test.server.StartupShutdownTest;
+
+public class JBIDE4184Test extends TestCase {
+ private IServer server;
+ private IPath tmpPath;
+ public void setUp() {
+ try {
+ tmpPath = new Path(ASTest.JBOSS_AS_42_HOME);
+ tmpPath = tmpPath.append("server").append("default").append("tmp").append(IDeployableServer.JBOSSTOOLS_TMP);
+ if( tmpPath.toFile().exists())
+ FileUtil.safeDelete(tmpPath.toFile());
+ assertFalse(tmpPath.toFile().exists());
+ server = StartupShutdownTest.createServer(ASTest.JBOSS_RUNTIME_42, ASTest.JBOSS_SERVER_42, ASTest.JBOSS_AS_42_HOME,
+ StartupShutdownTest.DEFAULT_CONFIG);
+ } catch( CoreException ce) {
+ fail(ce.getMessage());
+ }
+ }
+ public void testJira() {
+ try {
+ IServerWorkingCopy wc = server.createWorkingCopy();
+ IDeployableServer ds = (IDeployableServer)wc.loadAdapter(IDeployableServer.class, new NullProgressMonitor());
+ ds.setDeployLocationType(IDeployableServer.DEPLOY_SERVER);
+ server = wc.save(true, new NullProgressMonitor());
+ String folder = ds.getTempDeployFolder();
+ File f = new Path(folder).toFile();
+ assertTrue(f.exists());
+ } catch( CoreException ce) {
+ fail(ce.getMessage());
+ }
+ }
+ public void tearDown() {
+ try {
+ IRuntime rt = server.getRuntime();
+ server.delete();
+ rt.delete();
+ FileUtil.safeDelete(tmpPath.toFile());
+ } catch( CoreException ce) {
+ fail();
+ }
+ }
+}
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/server/StartupShutdownTest.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/server/StartupShutdownTest.java 2009-04-20 06:13:12 UTC (rev 14816)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/server/StartupShutdownTest.java 2009-04-20 09:32:06 UTC (rev 14817)
@@ -64,13 +64,12 @@
*/
public class StartupShutdownTest extends TestCase {
- protected static final IVMInstall VM_INSTALL = JavaRuntime.getDefaultVMInstall();
- protected static final String DEFAULT_CONFIG = "default";
+ public static final IVMInstall VM_INSTALL = JavaRuntime.getDefaultVMInstall();
+ public static final String DEFAULT_CONFIG = "default";
- protected static final int DEFAULT_STARTUP_TIME = 150000;
- protected static final int DEFAULT_SHUTDOWN_TIME = 90000;
+ public static final int DEFAULT_STARTUP_TIME = 150000;
+ public static final int DEFAULT_SHUTDOWN_TIME = 90000;
- protected IRuntime currentRuntime;
protected IServer currentServer;
protected ServerStateListener stateListener;
@@ -104,22 +103,22 @@
- protected void createServer(String runtimeID, String serverID,
+ public static IServer 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);
+ IRuntime 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());
+ return serverWC.save(true, new NullProgressMonitor());
}
- private IRuntime createRuntime(String runtimeId, String homeDir, String config) throws CoreException {
+ private static 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];
15 years, 8 months
JBoss Tools SVN: r14816 - branches/jbosstools-3.0.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-04-20 02:13:12 -0400 (Mon, 20 Apr 2009)
New Revision: 14816
Modified:
branches/jbosstools-3.0.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ServerListener.java
Log:
JBIDE-4184
Modified: branches/jbosstools-3.0.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ServerListener.java
===================================================================
--- branches/jbosstools-3.0.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ServerListener.java 2009-04-20 06:04:54 UTC (rev 14815)
+++ branches/jbosstools-3.0.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ServerListener.java 2009-04-20 06:13:12 UTC (rev 14816)
@@ -52,10 +52,11 @@
IRuntime rt = server.getRuntime();
IJBossServerRuntime jbsrt = (IJBossServerRuntime)rt.loadAdapter(IJBossServerRuntime.class, new NullProgressMonitor());
String config = jbsrt.getJBossConfiguration();
- String newTemp = new Path(IJBossServerConstants.SERVER).append(config)
+ IPath newTemp = new Path(IJBossServerConstants.SERVER).append(config)
.append(IJBossServerConstants.TMP)
- .append(IJBossServerConstants.JBOSSTOOLS_TMP).makeRelative().toString();
- new File(newTemp).mkdirs();
+ .append(IJBossServerConstants.JBOSSTOOLS_TMP).makeRelative();
+ IPath newTempAsGlobal = DeployableServer.makeGlobal(jbsrt, newTemp);
+ newTempAsGlobal.toFile().mkdirs();
}
}
15 years, 8 months
JBoss Tools SVN: r14815 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-04-20 02:04:54 -0400 (Mon, 20 Apr 2009)
New Revision: 14815
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ServerListener.java
Log:
JBIDE-4184
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ServerListener.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ServerListener.java 2009-04-17 22:00:33 UTC (rev 14814)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ServerListener.java 2009-04-20 06:04:54 UTC (rev 14815)
@@ -52,10 +52,11 @@
IRuntime rt = server.getRuntime();
IJBossServerRuntime jbsrt = (IJBossServerRuntime)rt.loadAdapter(IJBossServerRuntime.class, new NullProgressMonitor());
String config = jbsrt.getJBossConfiguration();
- String newTemp = new Path(IJBossServerConstants.SERVER).append(config)
+ IPath newTemp = new Path(IJBossServerConstants.SERVER).append(config)
.append(IJBossServerConstants.TMP)
- .append(IJBossServerConstants.JBOSSTOOLS_TMP).makeRelative().toString();
- new File(newTemp).mkdirs();
+ .append(IJBossServerConstants.JBOSSTOOLS_TMP).makeRelative();
+ IPath newTempAsGlobal = DeployableServer.makeGlobal(jbsrt, newTemp);
+ newTempAsGlobal.toFile().mkdirs();
}
}
15 years, 8 months