JBoss Tools SVN: r39418 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-03-09 18:15:01 -0500 (Fri, 09 Mar 2012)
New Revision: 39418
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/Libs.java
Log:
JBIDE-11188
https://issues.jboss.org/browse/JBIDE-11188
The update algorithm in Libs.updateFileSystems is fixed to provide its safe and correct completion when done concurrently by multiple threads.
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/Libs.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/Libs.java 2012-03-09 21:21:19 UTC (rev 39417)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/Libs.java 2012-03-09 23:15:01 UTC (rev 39418)
@@ -14,6 +14,7 @@
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
+import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -26,7 +27,6 @@
import org.eclipse.jdt.core.ElementChangedEvent;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.IElementChangedListener;
-import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaElementDelta;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;
@@ -91,13 +91,20 @@
if(isExcludedStateChanged()) {
result = true;
}
- if(result) fire();
- if(paths == null && result) return true;
+ if(paths == null && result) {
+ fire();
+ return true;
+ }
+ }
+
+ if(paths != null && fsVersion < pathsVersion) {
+ updateFileSystems(paths, 0);
}
-
- if(paths != null) updateFileSystems(paths);
fsVersion = pathsVersion;
+ if(result) {
+ fire();
+ }
return result;
}
@@ -115,6 +122,16 @@
result = EclipseResourceUtil.getAllVisibleLibraries(getProjectResource());
List<String> jre = EclipseResourceUtil.getJREClassPath(getProjectResource());
if(jre != null) result.removeAll(jre);
+ if(result != null) {
+ Iterator<String> it = result.iterator();
+ while(it.hasNext()) {
+ String path = it.next();
+ String fileName = new File(path).getName();
+ if(EclipseResourceUtil.isJar(path) && EclipseResourceUtil.SYSTEM_JAR_SET.contains(fileName)) {
+ it.remove();
+ }
+ }
+ }
updateProjects();
} catch (CoreException e) {
ModelPlugin.getDefault().logError(e);
@@ -162,7 +179,7 @@
IPath[] ps = es[i].getExclusionPatterns();
if(ps != null && ps.length > 0) {
for (int j = 0; j < ps.length; j++) {
- String key = p.toString() + "/" + ps[j].toString();
+ String key = p.toString() + "/" + ps[j].toString(); //$NON-NLS-1$
result += key.hashCode();
}
}
@@ -191,18 +208,28 @@
public static String LIB_PREFIX = "lib-"; //$NON-NLS-1$
- void updateFileSystems(List<String> paths) {
- if(fsVersion >= pathsVersion) {
- return;
- }
-
+ /**
+ * This method is designed to run safe when invoked by several concurrent threads.
+ * Each thread requesting file systems needs them up-to-date when this method returns.
+ * If thread 1 is already running update, and thread 2 is going to request file systems,
+ * it has to start this method independently, because it cannot rely on the other thread
+ * completing before the file systems are obtained.
+ * Synchronizing this method would involve high risk of a deadlock,
+ * concurrent modification is a better solution if implemented safely.
+ *
+ * @param paths
+ * @param iteration
+ */
+ private void updateFileSystems(List<String> paths, int iteration) {
Set<String> oldPaths = libraryNames.getPaths();
for (String p: oldPaths) {
if(!paths.contains(p)) {
String n = libraryNames.getName(p);
- XModelObject o = object.getChildByPath(n);
- if(o != null) {
- o.removeFromParent();
+ if(n != null) {
+ XModelObject o = object.getChildByPath(n);
+ if(o != null) {
+ o.removeFromParent();
+ }
}
libraryNames.removePath(p);
}
@@ -221,15 +248,7 @@
boolean isJar = EclipseResourceUtil.isJar(path);
String libEntity = isJar ? "FileSystemJar" : "FileSystemFolder"; //$NON-NLS-1$ //$NON-NLS-2$
String fileName = new File(path).getName();
- if(isJar && EclipseResourceUtil.SYSTEM_JAR_SET.contains(fileName)) continue;
- String jsname = libraryNames.getName(path);
- if(jsname == null) {
- jsname = LIB_PREFIX + fileName;
- int q = 0;
- while(libraryNames.hasName(jsname)) {
- jsname = LIB_PREFIX + fileName + "-" + (++q); //$NON-NLS-1$
- }
- }
+ String jsname = libraryNames.getExistingOrNewName(path, fileName);
XModelObject o = object.getChildByPath(jsname);
if(o != null) {
fss.remove(o);
@@ -255,6 +274,17 @@
o.removeFromParent();
}
}
+
+ List<String> newPaths = this.paths;
+ if(newPaths != null && (paths != newPaths || !libraryNames.isValidList(newPaths))) {
+ if(iteration == 5) {
+ ModelPlugin.getDefault().logWarning("Iterative update of file systems for project " //$NON-NLS-1$
+ + EclipseResourceUtil.getProject(object)
+ + " is interrupted to prevent deadlock."); //$NON-NLS-1$
+ } else {
+ updateFileSystems(newPaths, iteration + 1);
+ }
+ }
}
public List<String> getPaths() {
@@ -312,8 +342,8 @@
return;
} else {
for (IJavaElementDelta d1: dc.getAffectedChildren()) {
- IJavaElement e = d1.getElement();
- if(d1.getKind() == IJavaElementDelta.ADDED) {
+// IJavaElement e = d1.getElement();
+ if(d1.getKind() == IJavaElementDelta.ADDED || d1.getKind() == IJavaElementDelta.REMOVED) {
requestForUpdate();
return;
}
@@ -355,6 +385,18 @@
return pathToName.get(path);
}
+ public synchronized String getExistingOrNewName(String path, String fileName) {
+ String jsname = getName(path);
+ if(jsname == null) {
+ jsname = Libs.LIB_PREFIX + fileName;
+ int q = 0;
+ while(hasName(jsname)) {
+ jsname = Libs.LIB_PREFIX + fileName + "-" + (++q); //$NON-NLS-1$
+ }
+ }
+ return jsname;
+ }
+
public String getPath(String name) {
return nameToPath.get(name);
}
@@ -366,4 +408,16 @@
public synchronized Set<String> getPaths() {
return new HashSet<String>(pathToName.keySet());
}
+
+ public synchronized boolean isValidList(List<String> paths) {
+ if(pathToName.size() != paths.size()) {
+ return false;
+ }
+ for (String p: paths) {
+ if(!pathToName.containsKey(p)) {
+ return false;
+ }
+ }
+ return true;
+ }
}
14 years, 1 month
JBoss Tools SVN: r39416 - workspace/snjeza/jbossas7-examples.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2012-03-09 15:16:41 -0500 (Fri, 09 Mar 2012)
New Revision: 39416
Modified:
workspace/snjeza/jbossas7-examples/kitchensink.zip
Log:
JBIDE-10823 JBoss Central Quickstarts Updates
Modified: workspace/snjeza/jbossas7-examples/kitchensink.zip
===================================================================
(Binary files differ)
14 years, 1 month
JBoss Tools SVN: r39415 - workspace/snjeza/jbossas7-examples and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2012-03-09 14:08:48 -0500 (Fri, 09 Mar 2012)
New Revision: 39415
Added:
workspace/snjeza/jbossas7-examples/helloworld-html5.zip
Modified:
trunk/download.jboss.org/jbosstools/examples/project-examples-jbds50.xml
trunk/download.jboss.org/jbosstools/examples/project-examples-maven-3.3.xml
workspace/snjeza/jbossas7-examples/kitchensink.zip
Log:
JBIDE-10823 JBoss Central Quickstarts Updates
Modified: trunk/download.jboss.org/jbosstools/examples/project-examples-jbds50.xml
===================================================================
--- trunk/download.jboss.org/jbosstools/examples/project-examples-jbds50.xml 2012-03-09 18:40:33 UTC (rev 39414)
+++ trunk/download.jboss.org/jbosstools/examples/project-examples-jbds50.xml 2012-03-09 19:08:48 UTC (rev 39415)
@@ -12,9 +12,9 @@
<url>http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/jbossas7-examp...</url>
<fixes>
<fix type="wtpruntime">
- <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.70, org.jboss.ide.eclipse.as.runtime.71, org.jboss.ide.eclipse.as.runtime.eap.60</property>
- <property name="description">This project example requires JBoss AS 7.0/7.1 or EAP 6 </property>
- <property name="downloadId">org.jboss.tools.runtime.core.as.702</property>
+ <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.71, org.jboss.ide.eclipse.as.runtime.eap.60</property>
+ <property name="description">This project example requires JBoss AS 7.1 or EAP 6 </property>
+ <property name="downloadId">org.jboss.tools.runtime.core.as.710</property>
</fix>
<fix type="plugin">
<property name="id">org.eclipse.m2e.core</property>
@@ -59,9 +59,9 @@
<url>http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/jbossas7-examp...</url>
<fixes>
<fix type="wtpruntime">
- <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.70, org.jboss.ide.eclipse.as.runtime.71, org.jboss.ide.eclipse.as.runtime.eap.60</property>
- <property name="description">This project example requires JBoss AS 7.0/7.1 or EAP 6 </property>
- <property name="downloadId">org.jboss.tools.runtime.core.as.702</property>
+ <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.71, org.jboss.ide.eclipse.as.runtime.eap.60</property>
+ <property name="description">This project example requires JBoss AS 7.1 or EAP 6 </property>
+ <property name="downloadId">org.jboss.tools.runtime.core.as.710</property>
</fix>
<fix type="plugin">
<property name="id">org.eclipse.m2e.core</property>
@@ -103,7 +103,7 @@
<fix type="wtpruntime">
<property name="allowed-types">org.jboss.ide.eclipse.as.runtime.70, org.jboss.ide.eclipse.as.runtime.71, org.jboss.ide.eclipse.as.runtime.eap.60</property>
<property name="description">This project example requires JBoss AS 7.0/7.1 or EAP 6 </property>
- <property name="downloadId">org.jboss.tools.runtime.core.as.702</property>
+ <property name="downloadId">org.jboss.tools.runtime.core.as.710</property>
</fix>
<fix type="plugin">
<property name="id">org.eclipse.m2e.core</property>
@@ -144,9 +144,9 @@
<url>http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/jbossas7-examp...</url>
<fixes>
<fix type="wtpruntime">
- <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.70, org.jboss.ide.eclipse.as.runtime.71, org.jboss.ide.eclipse.as.runtime.eap.60</property>
- <property name="description">This project example requires JBoss AS 7.0/7.1 or EAP 6 </property>
- <property name="downloadId">org.jboss.tools.runtime.core.as.702</property>
+ <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.71, org.jboss.ide.eclipse.as.runtime.eap.60</property>
+ <property name="description">This project example requires JBoss AS 7.1 or EAP 6 </property>
+ <property name="downloadId">org.jboss.tools.runtime.core.as.710</property>
</fix>
<fix type="plugin">
<property name="id">org.eclipse.m2e.core</property>
@@ -188,9 +188,9 @@
<url>http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/jbossas7-examp...</url>
<fixes>
<fix type="wtpruntime">
- <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.70, org.jboss.ide.eclipse.as.runtime.71, org.jboss.ide.eclipse.as.runtime.eap.60</property>
- <property name="description">This project example requires JBoss AS 7.0/7.1 or EAP 6 </property>
- <property name="downloadId">org.jboss.tools.runtime.core.as.702</property>
+ <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.71, org.jboss.ide.eclipse.as.runtime.eap.60</property>
+ <property name="description">This project example requires JBoss AS 7.1 or EAP 6 </property>
+ <property name="downloadId">org.jboss.tools.runtime.core.as.710</property>
</fix>
<fix type="plugin">
<property name="id">org.eclipse.m2e.core</property>
@@ -219,18 +219,18 @@
</project>
<project>
<category>JBoss AS 7 Quickstarts</category>
- <name>poh5-helloworld</name>
- <included-projects>poh5-helloworld</included-projects>
+ <name>helloworld-html5</name>
+ <included-projects>helloworld-html5</included-projects>
<shortDescription>HTML5</shortDescription>
<description>This example demonstrates the use of *CDI 1.0* and *JAX-RS* in *JBoss AS 7* using the Plain Old HTML5 (POH5) architecture.
POH5 is basically a smart, HTML5+CSS3+JavaScript front-end using RESTful services on the backend.</description>
<size>7266</size>
- <url>http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/jbossas7-examp...</url>
+ <url>http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/jbossas7-examp...</url>
<fixes>
<fix type="wtpruntime">
- <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.70, org.jboss.ide.eclipse.as.runtime.71, org.jboss.ide.eclipse.as.runtime.eap.60</property>
- <property name="description">This project example requires JBoss AS 7.0/7.1 or EAP 6 </property>
- <property name="downloadId">org.jboss.tools.runtime.core.as.702</property>
+ <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.71, org.jboss.ide.eclipse.as.runtime.eap.60</property>
+ <property name="description">This project example requires JBoss AS 7.1 or EAP 6 </property>
+ <property name="downloadId">org.jboss.tools.runtime.core.as.710</property>
</fix>
<fix type="plugin">
<property name="id">org.eclipse.m2e.core</property>
@@ -254,7 +254,7 @@
<importType>maven</importType>
<importTypeDescription>The project example requires the m2eclipse, m2eclipse-wtp and JBoss Maven Project Examples feature.</importTypeDescription>
<!-- no cheatsheet yet
- <welcome type="cheatsheets" url="/poh5-helloworld/cheatsheets/poh5-helloworld.xml"/>
+ <welcome type="cheatsheets" url="/helloworld-html5/cheatsheets/helloworld-html5.xml"/>
-->
<tags>central</tags>
<icon path="icons/jboss.png" />
Modified: trunk/download.jboss.org/jbosstools/examples/project-examples-maven-3.3.xml
===================================================================
--- trunk/download.jboss.org/jbosstools/examples/project-examples-maven-3.3.xml 2012-03-09 18:40:33 UTC (rev 39414)
+++ trunk/download.jboss.org/jbosstools/examples/project-examples-maven-3.3.xml 2012-03-09 19:08:48 UTC (rev 39415)
@@ -45,16 +45,16 @@
<included-projects>jboss-as-helloworld</included-projects>
<shortDescription>Helloworld</shortDescription>
<description>
-This example demonstrates the use of CDI 1.0 and Servlet 3 in JBoss AS 7.
+This example demonstrates the use of CDI 1.0 and Servlet 3 in JBoss AS 7.1.
The example can be deployed using Maven from the command line or from Eclipse using JBoss Tools.
</description>
<size>8192</size>
<url>http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/jbossas7-examp...</url>
<fixes>
<fix type="wtpruntime">
- <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.70, org.jboss.ide.eclipse.as.runtime.71</property>
- <property name="description">works with JBoss AS 7.0/7.1</property>
- <property name="downloadId">org.jboss.tools.runtime.core.as.702</property>
+ <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.71</property>
+ <property name="description">works with JBoss 7.1</property>
+ <property name="downloadId">org.jboss.tools.runtime.core.as.710</property>
</fix>
<fix type="plugin">
<property name="id">org.eclipse.m2e.core</property>
@@ -99,9 +99,9 @@
<url>http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/jbossas7-examp...</url>
<fixes>
<fix type="wtpruntime">
- <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.70, org.jboss.ide.eclipse.as.runtime.71</property>
- <property name="description">works with JBoss AS 7.0/7.1</property>
- <property name="downloadId">org.jboss.tools.runtime.core.as.702</property>
+ <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.71</property>
+ <property name="description">works with JBoss AS 7.1</property>
+ <property name="downloadId">org.jboss.tools.runtime.core.as.710</property>
</fix>
<fix type="plugin">
<property name="id">org.eclipse.m2e.core</property>
@@ -144,7 +144,7 @@
<fix type="wtpruntime">
<property name="allowed-types">org.jboss.ide.eclipse.as.runtime.70, org.jboss.ide.eclipse.as.runtime.71</property>
<property name="description">works with JBoss AS 7.0/7.1</property>
- <property name="downloadId">org.jboss.tools.runtime.core.as.702</property>
+ <property name="downloadId">org.jboss.tools.runtime.core.as.710</property>
</fix>
<fix type="plugin">
<property name="id">org.eclipse.m2e.core</property>
@@ -186,9 +186,9 @@
<url>http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/jbossas7-examp...</url>
<fixes>
<fix type="wtpruntime">
- <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.70, org.jboss.ide.eclipse.as.runtime.71</property>
- <property name="description">works with JBoss AS 7.0/7.1</property>
- <property name="downloadId">org.jboss.tools.runtime.core.as.702</property>
+ <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.71</property>
+ <property name="description">works with JBoss AS 7.1</property>
+ <property name="downloadId">org.jboss.tools.runtime.core.as.710</property>
</fix>
<fix type="plugin">
<property name="id">org.eclipse.m2e.core</property>
@@ -230,9 +230,9 @@
<url>http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/jbossas7-examp...</url>
<fixes>
<fix type="wtpruntime">
- <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.70, org.jboss.ide.eclipse.as.runtime.71</property>
- <property name="description">works with JBoss AS 7.0/7.1</property>
- <property name="downloadId">org.jboss.tools.runtime.core.as.702</property>
+ <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.71</property>
+ <property name="description">works with JBoss AS 7.1</property>
+ <property name="downloadId">org.jboss.tools.runtime.core.as.710</property>
</fix>
<fix type="plugin">
<property name="id">org.eclipse.m2e.core</property>
@@ -261,19 +261,19 @@
</project>
<project>
<category>JBoss Quickstarts</category>
- <name>poh5-helloworld</name>
+ <name>helloworld-html5</name>
<priority>5</priority>
- <included-projects>poh5-helloworld</included-projects>
+ <included-projects>helloworld-html5</included-projects>
<shortDescription>HTML5</shortDescription>
<description>This example demonstrates the use of *CDI 1.0* and *JAX-RS* in *JBoss AS 7* using the Plain Old HTML5 (POH5) architecture.
POH5 is basically a smart, HTML5+CSS3+JavaScript front-end using RESTful services on the backend.</description>
<size>7266</size>
- <url>http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/jbossas7-examp...</url>
+ <url>http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/jbossas7-examp...</url>
<fixes>
<fix type="wtpruntime">
- <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.70, org.jboss.ide.eclipse.as.runtime.71</property>
- <property name="description">works with JBoss AS 7.0/7.1</property>
- <property name="downloadId">org.jboss.tools.runtime.core.as.702</property>
+ <property name="allowed-types">org.jboss.ide.eclipse.as.runtime.71</property>
+ <property name="description">works with JBoss AS 7.1</property>
+ <property name="downloadId">org.jboss.tools.runtime.core.as.710</property>
</fix>
<fix type="plugin">
<property name="id">org.eclipse.m2e.core</property>
@@ -297,7 +297,7 @@
<importType>maven</importType>
<importTypeDescription>The project example requires the m2eclipse, m2eclipse-wtp and JBoss Maven Project Examples feature.</importTypeDescription>
<!-- no cheatsheet yet
- <welcome type="cheatsheets" url="/poh5-helloworld/cheatsheets/poh5-helloworld.xml"/>
+ <welcome type="cheatsheets" url="/helloworld-html5/cheatsheets/helloworld-html5.xml"/>
-->
<tags>central</tags>
<icon path="icons/jboss.png" />
Added: workspace/snjeza/jbossas7-examples/helloworld-html5.zip
===================================================================
(Binary files differ)
Property changes on: workspace/snjeza/jbossas7-examples/helloworld-html5.zip
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: workspace/snjeza/jbossas7-examples/kitchensink.zip
===================================================================
(Binary files differ)
14 years, 1 month
JBoss Tools SVN: r39414 - trunk/documentation/whatsnew/openshift.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-03-09 13:40:33 -0500 (Fri, 09 Mar 2012)
New Revision: 39414
Modified:
trunk/documentation/whatsnew/openshift/openshift-news-3.3.0.Beta1.html
Log:
[JBIDE-11031] wrinting N&N for OpenShift
Modified: trunk/documentation/whatsnew/openshift/openshift-news-3.3.0.Beta1.html
===================================================================
--- trunk/documentation/whatsnew/openshift/openshift-news-3.3.0.Beta1.html 2012-03-09 18:39:37 UTC (rev 39413)
+++ trunk/documentation/whatsnew/openshift/openshift-news-3.3.0.Beta1.html 2012-03-09 18:40:33 UTC (rev 39414)
@@ -188,7 +188,6 @@
</p>
</td>
</tr>
- <tr><td colspan="2"><hr/></td></tr>
<tr>
<td colspan="2">
<hr />
14 years, 1 month
JBoss Tools SVN: r39413 - trunk/documentation/whatsnew/openshift.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-03-09 13:39:37 -0500 (Fri, 09 Mar 2012)
New Revision: 39413
Modified:
trunk/documentation/whatsnew/openshift/openshift-news-3.3.0.Beta1.html
Log:
[JBIDE-11031] wrinting N&N for OpenShift
Modified: trunk/documentation/whatsnew/openshift/openshift-news-3.3.0.Beta1.html
===================================================================
--- trunk/documentation/whatsnew/openshift/openshift-news-3.3.0.Beta1.html 2012-03-09 18:02:57 UTC (rev 39412)
+++ trunk/documentation/whatsnew/openshift/openshift-news-3.3.0.Beta1.html 2012-03-09 18:39:37 UTC (rev 39413)
@@ -131,49 +131,64 @@
</tr>
<tr>
<td valign="top" align="left"><a name="itemname3" id="itemname3"></a>
- <b>Create Application</b></td>
+ <b>Create Application</b>
+ </td>
<td valign="top">
- You may now create a new <b>OpenShift application</b> and import it to your workspace in a single hop.
- Choose name, type, embedded cartridges and get over to the settings for your local project.
- <p>
- <img src="images/wizard-new-application.png"/>
- </p>
- The next page allows you to choose to import the application to a <b>new project</b>
- or to enable OpenShift for an existing project in your workspace.
- <br /><p>
- <img src="images/wizard-project.png" />
- </p>
- A further option allows you to create the <b>OpenShift Express Server</b> adapter for easy publishing.
- <br /><br/>
- On last wizard page, you're able to pick custom settings when dealing with the OpenShift <b>git application repository</b>.
- The default settings are usually just fine and you can leave them alone.
- <p>
- <img src="images/wizard-git.png" />
- </p>
- <br />As soon as you finish the wizard, the whole process is executed: the tolling will create the application, import it to your workspace
- and create the server adapter for you.
+ You may now create a new <b>OpenShift application</b> and import it to your workspace in a single hop.
+ Choose name, type, embedded cartridges and get over to the settings for your local project.
<p>
+ <img src="images/wizard-new-application.png"/>
+ </p>
+ </td>
+ <tr><td colspan="2"><hr/></td></tr>
+ <tr>
+ <td valign="top" align="left"><a name="itemname3" id="itemname3"></a>
+ <b>Import Application</b></td>
+ <td valign="top">
+ When importing, the application creation wizard will preselect the application you've chosen in the express console.
+ <p>
+ <img src="images/wizard-import.png" />
+ </p>
+ You may of course also make up your mind and choose another OpenShift application.
+ A separate dialog allows you to pick among the applications you're currently running on your your Paas.
+ <p>
+ <img src="images/wizard-select-existing.png" />
+ </p>
+ <p>
<small>
<a href="https://issues.jboss.org/browse/JBIDE-10479">Related Jira</a>
</small>
</p>
</td>
+ </tr>
+ <tr><td colspan="2"><hr/></td></tr>
+ <tr>
+ <td valign="top" align="left"><a name="itemname3" id="itemname3"></a>
+ <b>Workspace project</b></td>
+ <td valign="top">
+ When you create or import an OpenShift application, you may choose to either import it to a new <b>new project</b>
+ or to enable OpenShift for an <b>existing project</b> in your workspace.
+ We currently allow you to enable OpenShift for <b>Eclipse WTP</b> projects but we'll widen this up in upcoming releases.<br />
+ <p>
+ <img src="images/wizard-project.png" />
+ </p>
+ </td>
</tr>
<tr><td colspan="2"><hr/></td></tr>
<tr>
<td valign="top" align="left"><a name="itemname3" id="itemname3"></a>
- <b>Import Application</b></td>
+ <b>OpenShift Maven Profile</b></td>
<td valign="top">
- When importing, the application creation wizard will preselect the application you've chosen in the express console.
- <p>
- <img src="images/wizard-import.png" />
- </p>
- You may of course also make up your mind and choose another OpenShift application. A separate dialog allows you to pick among the applications you're currently running on your your Paas.
- <p>
- <img src="images/wizard-select-existing.png" />
- </p>
+ When you enable OpenShift for an existing maven project in your workspace, we'll make shure it has the required
+ maven <b>openshift</b> profile. We add it to the pom if it's not present yet.
+ <p>
+ <small>
+ <a href="https://issues.jboss.org/browse/JBIDE-10444">Related Jira</a>
+ </small>
+ </p>
</td>
</tr>
+ <tr><td colspan="2"><hr/></td></tr>
<tr>
<td colspan="2">
<hr />
14 years, 1 month
JBoss Tools SVN: r39412 - trunk/central.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2012-03-09 13:02:57 -0500 (Fri, 09 Mar 2012)
New Revision: 39412
Modified:
trunk/central/README.Central.localhost.testing.txt
trunk/central/README.Central.milestone.testing.txt
Log:
update docs for testing Central (JBDS-1997)
Modified: trunk/central/README.Central.localhost.testing.txt
===================================================================
--- trunk/central/README.Central.localhost.testing.txt 2012-03-09 17:56:27 UTC (rev 39411)
+++ trunk/central/README.Central.localhost.testing.txt 2012-03-09 18:02:57 UTC (rev 39412)
@@ -6,17 +6,18 @@
cd /tmp; wget -nc http://elonen.iki.fi/code/nanohttpd/NanoHTTPD.java
javac NanoHTTPD.java; java NanoHTTPD -d /path/to/parent/folder/for/central/
-1. If you need to iterate through changes to the product/plugins/com.jboss.jbds.central plugin, you can do so, rebuild it, and reinstall it into a running JBDS instance.
+1. If you need to iterate through changes to the product/plugins/com.jboss.jbds.central plugin, you can do so, rebuild it, and reinstall it into a running Eclipse instance.
Help > Install new > file:///path/to/product/site/target/site/
-For example, you might want to edit central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/configurators/DefaultJBossCentralConfigurator.java to set a new path for JBOSS_DISCOVERY_DIRECTORY_3_3_0_XML:
+You may also want to rebuild this plugin to set a different default URL (jboss.discovery.directory.url) for the directory.xml file:
- private static final String JBOSS_DISCOVERY_DIRECTORY_3_3_0_XML = "http://localhost/central/site/target/site/jbosstools-directory.xml"; // for testing on localhost
+ examples/plugins/org.jboss.tools.project.examples/pom.xml
2. Rebuild:
- cd /path/to/central; mvn clean install
+ cd /path/to/examples; mvn install -DskipTests -Dmaven.test.skip
+ cd /path/to/central; mvn install -DskipTests -Dmaven.test.skip
3. Verify the directory.xml file is generated, and http-accessible:
@@ -29,11 +30,13 @@
instead of
1.0.0.v20120120-1459-H123-Beta1
-5. Launch JBDS like this:
+5. Launch Eclipse like this:
./eclipse -vmargs -Djboss.discovery.directory.url=file:///path/to/central/site/target/site/jbosstools-directory.xml
or
./eclipse -vmargs -Djboss.discovery.directory.url=http://localhost/central/site/target/site/jbosstools-directory.xml
+ or
+ add the -Djboss.discovery.directory.url flag to your eclipse.ini file after the -vmargs line
6. Select 'Help > Jboss Central' (if not already loaded). Check the 'Software/Updates' tab to review contents of the discovery site (as per org.jboss.tools.central.discovery/plugin.xml). Hit the refresh icon if necessary to see changes.
Modified: trunk/central/README.Central.milestone.testing.txt
===================================================================
--- trunk/central/README.Central.milestone.testing.txt 2012-03-09 17:56:27 UTC (rev 39411)
+++ trunk/central/README.Central.milestone.testing.txt 2012-03-09 18:02:57 UTC (rev 39412)
@@ -18,3 +18,5 @@
./eclipse -vmargs -Djboss.discovery.directory.url=http://download.jboss.org/jbosstools/updates/nightly/core/3.3.indigo/jbosstools-directory.xml
+Or, you can add the -Djboss.discovery.directory.url flag to your eclipse.ini file after the -vmargs line.
+
14 years, 1 month
JBoss Tools SVN: r39411 - trunk/documentation/whatsnew/openshift.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-03-09 12:56:27 -0500 (Fri, 09 Mar 2012)
New Revision: 39411
Modified:
trunk/documentation/whatsnew/openshift/openshift-news-3.3.0.Beta1.html
Log:
[JBIDE-11031] wrinting N&N for OpenShift
Modified: trunk/documentation/whatsnew/openshift/openshift-news-3.3.0.Beta1.html
===================================================================
--- trunk/documentation/whatsnew/openshift/openshift-news-3.3.0.Beta1.html 2012-03-09 17:51:11 UTC (rev 39410)
+++ trunk/documentation/whatsnew/openshift/openshift-news-3.3.0.Beta1.html 2012-03-09 17:56:27 UTC (rev 39411)
@@ -152,6 +152,11 @@
</p>
<br />As soon as you finish the wizard, the whole process is executed: the tolling will create the application, import it to your workspace
and create the server adapter for you.
+ <p>
+ <small>
+ <a href="https://issues.jboss.org/browse/JBIDE-10479">Related Jira</a>
+ </small>
+ </p>
</td>
</tr>
<tr><td colspan="2"><hr/></td></tr>
@@ -222,7 +227,7 @@
</p>
<p>
<small>
- <a href="https://issues.jboss.org/browse/JBIDE-10716">Related Jira</a>
+ <a href="https://issues.jboss.org/browse/JBIDE-10700">Related Jira</a>
</small>
</p>
</td>
14 years, 1 month
JBoss Tools SVN: r39410 - trunk/documentation/whatsnew/openshift.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-03-09 12:51:11 -0500 (Fri, 09 Mar 2012)
New Revision: 39410
Modified:
trunk/documentation/whatsnew/openshift/openshift-news-3.3.0.Beta1.html
Log:
[JBIDE-11031] wrinting N&N for OpenShift
Modified: trunk/documentation/whatsnew/openshift/openshift-news-3.3.0.Beta1.html
===================================================================
--- trunk/documentation/whatsnew/openshift/openshift-news-3.3.0.Beta1.html 2012-03-09 15:58:06 UTC (rev 39409)
+++ trunk/documentation/whatsnew/openshift/openshift-news-3.3.0.Beta1.html 2012-03-09 17:51:11 UTC (rev 39410)
@@ -143,13 +143,14 @@
<br /><p>
<img src="images/wizard-project.png" />
</p>
+ A further option allows you to create the <b>OpenShift Express Server</b> adapter for easy publishing.
+ <br /><br/>
On last wizard page, you're able to pick custom settings when dealing with the OpenShift <b>git application repository</b>.
The default settings are usually just fine and you can leave them alone.
<p>
<img src="images/wizard-git.png" />
</p>
- A further option allows you to create the <b>OpenShift Express Server</b> adapter for easy publishing.
- <br /><br />As soon as you finish the wizard, the whole process is executed: the tolling will create the application, import it to your workspace
+ <br />As soon as you finish the wizard, the whole process is executed: the tolling will create the application, import it to your workspace
and create the server adapter for you.
</td>
</tr>
@@ -241,6 +242,11 @@
copy them to the <b>deployments</b> folder of your project (the project the adapter is bound to)
and push them to the OpenShift application. The JBoss AS7.1 will then pick those wars and deploy them.
This is what we call the <b>binary</b> mode where binary artifacts are published to OpenShift.
+ <p>
+ <small>
+ <a href="https://issues.jboss.org/browse/JBIDE-10480">Related Jira</a>
+ </small>
+ </p>
</td>
</tr>
</table>
14 years, 1 month
JBoss Tools SVN: r39409 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-03-09 10:58:06 -0500 (Fri, 09 Mar 2012)
New Revision: 39409
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPageModel.java
Log:
[JBIDE-11240] setting the exsting application when the it's name is set to the model and it matches an existing application (was: only happened when browsing and selecting the application)
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java 2012-03-09 15:43:14 UTC (rev 39408)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java 2012-03-09 15:58:06 UTC (rev 39409)
@@ -207,7 +207,7 @@
final IApplication selectedApplication = appSelectionDialog.getSelectedApplication();
if (selectedApplication != null) {
try {
- pageModel.setExistingApplication(selectedApplication);
+ pageModel.setExistingApplicationName(selectedApplication.getName());
} catch (OpenShiftException ex) {
OpenShiftUIActivator.log(OpenShiftUIActivator.createErrorStatus(NLS.bind(
"Could not get embedded cartridges for application {0}",
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPageModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPageModel.java 2012-03-09 15:43:14 UTC (rev 39408)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPageModel.java 2012-03-09 15:58:06 UTC (rev 39409)
@@ -21,6 +21,7 @@
import org.jboss.tools.openshift.express.internal.core.console.UserDelegate;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
+import org.jboss.tools.openshift.express.internal.ui.utils.StringUtils;
import com.openshift.express.client.IApplication;
import com.openshift.express.client.ICartridge;
@@ -48,7 +49,7 @@
// start with a null value as a marker of non-initialized state (used during
// first pass validation)
- private List<IApplication> existingApplications = null;
+ private List<IApplication> existingApplications = new ArrayList<IApplication>();
private List<ICartridge> cartridges = new ArrayList<ICartridge>();
private List<IEmbeddableCartridge> embeddableCartridges = new ArrayList<IEmbeddableCartridge>();
private String existingApplicationName;
@@ -111,21 +112,24 @@
return existingApplicationName;
}
+ /**
+ * Sets the existing application in this model by name. If there's an
+ * existing application with the given name, all properties related to an
+ * existing application are also set.
+ *
+ * @param applicationName
+ * @throws OpenShiftException
+ *
+ * @see #doSetExistingApplication(IApplication)
+ */
public void setExistingApplicationName(String applicationName) throws OpenShiftException {
firePropertyChange(PROPERTY_EXISTING_APPLICATION_NAME
- , existingApplicationName
- , this.existingApplicationName = applicationName);
- if (applicationName != null) {
- for (IApplication application : getApplications()) {
- if (application.getName().equals(applicationName)) {
- setApplicationName(application.getName());
- setSelectedCartridge(application.getCartridge());
- setSelectedEmbeddableCartridges(new HashSet<IEmbeddableCartridge>(
- application.getEmbeddedCartridges()));
- }
- }
+ , this.existingApplicationName, this.existingApplicationName = applicationName);
+
+ if (!StringUtils.isEmpty(applicationName)
+ && isExistingApplication(applicationName)) {
+ doSetExistingApplication(getExistingApplication(applicationName));
}
-
}
public void loadExistingApplications() throws OpenShiftException {
@@ -146,15 +150,19 @@
return existingApplicationsLoaded;
}
- public boolean isExistingApplication(String applicationName) {
+ public IApplication getExistingApplication(String applicationName) {
for (IApplication application : getExistingApplications()) {
if (application.getName().equalsIgnoreCase(applicationName)) {
- return true;
+ return application;
}
}
- return false;
+ return null;
}
+ public boolean isExistingApplication(String applicationName) {
+ return getExistingApplication(applicationName) != null;
+ }
+
/**
* @param existingApplications
* the existingApplications to set
@@ -215,9 +223,40 @@
return cartridges;
}
+ /**
+ * Sets the properties in this model that are related to an existing
+ * application. The name of the existing application is set!.
+ *
+ * @param application
+ * @throws OpenShiftException
+ *
+ * @see #setExistingApplicationName(String)
+ * @see #setApplicationName(IApplication)
+ * @see #setSelectedCartridge(IApplication)
+ * @see #setSelectedEmbeddableCartridges(Set)
+ * @see #wizardModel#setApplication
+ */
public void setExistingApplication(IApplication application) throws OpenShiftException {
- if(application != null) {
+ if (application != null) {
setExistingApplicationName(application.getName());
+ doSetExistingApplication(application);
+ }
+ }
+
+ /**
+ * Sets the properties in this model that are related to an existing
+ * application. It does not set the name of the existing application!.
+ *
+ * @param application
+ * @throws OpenShiftException
+ *
+ * @see #setApplicationName(IApplication)
+ * @see #setSelectedCartridge(IApplication)
+ * @see #setSelectedEmbeddableCartridges(Set)
+ * @see #wizardModel#setApplication
+ */
+ protected void doSetExistingApplication(IApplication application) throws OpenShiftException {
+ if (application != null) {
setApplicationName(application.getName());
setSelectedCartridge(application.getCartridge());
setSelectedEmbeddableCartridges(new HashSet<IEmbeddableCartridge>(application.getEmbeddedCartridges()));
@@ -226,7 +265,7 @@
}
public void resetExistingApplication() throws OpenShiftException {
- setExistingApplication(null);
+ setExistingApplication((IApplication) null);
}
public void setApplicationName(String applicationName) {
14 years, 1 month