JBoss Tools SVN: r26022 - in trunk/common/tests/org.jboss.tools.common.model.test: projects/TestJar and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-10-25 06:02:48 -0400 (Mon, 25 Oct 2010)
New Revision: 26022
Added:
trunk/common/tests/org.jboss.tools.common.model.test/projects/TestJar/
trunk/common/tests/org.jboss.tools.common.model.test/projects/TestJar/.classpath
trunk/common/tests/org.jboss.tools.common.model.test/projects/TestJar/.project
trunk/common/tests/org.jboss.tools.common.model.test/projects/TestJar/lib/
trunk/common/tests/org.jboss.tools.common.model.test/projects/TestJar/lib/standard.jar
trunk/common/tests/org.jboss.tools.common.model.test/src/org/jboss/tools/common/model/test/JarAccessTest.java
Modified:
trunk/common/tests/org.jboss.tools.common.model.test/src/org/jboss/tools/common/model/test/CommonModelAllTests.java
Log:
JBIDE-7399
https://jira.jboss.org/browse/JBIDE-7399
Added: trunk/common/tests/org.jboss.tools.common.model.test/projects/TestJar/.classpath
===================================================================
--- trunk/common/tests/org.jboss.tools.common.model.test/projects/TestJar/.classpath (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.model.test/projects/TestJar/.classpath 2010-10-25 10:02:48 UTC (rev 26022)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="lib" path="lib/standard.jar"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Property changes on: trunk/common/tests/org.jboss.tools.common.model.test/projects/TestJar/.classpath
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.model.test/projects/TestJar/.project
===================================================================
--- trunk/common/tests/org.jboss.tools.common.model.test/projects/TestJar/.project (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.model.test/projects/TestJar/.project 2010-10-25 10:02:48 UTC (rev 26022)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>TestJar</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Property changes on: trunk/common/tests/org.jboss.tools.common.model.test/projects/TestJar/.project
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/tests/org.jboss.tools.common.model.test/projects/TestJar/lib/standard.jar
===================================================================
(Binary files differ)
Property changes on: trunk/common/tests/org.jboss.tools.common.model.test/projects/TestJar/lib/standard.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/common/tests/org.jboss.tools.common.model.test/src/org/jboss/tools/common/model/test/CommonModelAllTests.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.model.test/src/org/jboss/tools/common/model/test/CommonModelAllTests.java 2010-10-25 09:57:05 UTC (rev 26021)
+++ trunk/common/tests/org.jboss.tools.common.model.test/src/org/jboss/tools/common/model/test/CommonModelAllTests.java 2010-10-25 10:02:48 UTC (rev 26022)
@@ -31,6 +31,7 @@
suite.addTestSuite(DeveloperExceptionTest.class);
suite.addTestSuite(XModelTransferBufferTest.class);
suite.addTestSuite(PropertiesLoaderTest.class);
+ suite.addTestSuite(JarAccessTest.class);
return suite;
}
}
Added: trunk/common/tests/org.jboss.tools.common.model.test/src/org/jboss/tools/common/model/test/JarAccessTest.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.model.test/src/org/jboss/tools/common/model/test/JarAccessTest.java (rev 0)
+++ trunk/common/tests/org.jboss.tools.common.model.test/src/org/jboss/tools/common/model/test/JarAccessTest.java 2010-10-25 10:02:48 UTC (rev 26022)
@@ -0,0 +1,45 @@
+package org.jboss.tools.common.model.test;
+
+import java.io.File;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.jboss.tools.common.model.filesystems.impl.TestJarAccess;
+import org.jboss.tools.test.util.JobUtils;
+import org.jboss.tools.test.util.TestProjectProvider;
+
+import junit.framework.TestCase;
+
+public class JarAccessTest extends TestCase {
+ static String BUNDLE_NAME = "org.jboss.tools.common.model.test";
+ TestProjectProvider provider1 = null;
+ IProject project1 = null;
+
+ public void setUp() throws Exception {
+ provider1 = new TestProjectProvider(BUNDLE_NAME, null, "TestJar", true);
+ project1 = provider1.getProject();
+
+ project1.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
+
+ JobUtils.waitForIdle();
+ }
+
+ public void testJarAccess() throws Exception {
+ IFile jar = project1.getFile(new Path("lib/standard.jar"));
+ assertTrue(jar.exists());
+ String file = jar.getLocation().toFile().getAbsolutePath();
+ assertTrue(new File(file).isFile());
+ TestJarAccess test = new TestJarAccess(file);
+ test.runAll();
+ List<String> errors = test.getErrors();
+ String message = "There were errors:";
+ for (String error: errors) {
+ message += "\n\t" + error;
+ }
+ assertTrue(message, errors.isEmpty());
+ }
+}
Property changes on: trunk/common/tests/org.jboss.tools.common.model.test/src/org/jboss/tools/common/model/test/JarAccessTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years, 2 months
JBoss Tools SVN: r26021 - 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: 2010-10-25 05:57:05 -0400 (Mon, 25 Oct 2010)
New Revision: 26021
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/Libs.java
Log:
JBIDE-7148
https://jira.jboss.org/browse/JBIDE-7148
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 2010-10-25 09:54:30 UTC (rev 26020)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemsImpl.java 2010-10-25 09:57:05 UTC (rev 26021)
@@ -43,6 +43,11 @@
public Libs getLibs() {
return libs;
}
+
+ protected void onSetEntity(String entity) {
+ super.onSetEntity(entity);
+ libs.init();
+ }
public String getPresentationString() {
IProject p = EclipseResourceUtil.getProject(this);
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 2010-10-25 09:54:30 UTC (rev 26020)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/Libs.java 2010-10-25 09:57:05 UTC (rev 26021)
@@ -48,10 +48,18 @@
public Libs(FileSystemsImpl object) {
this.object = object;
+ }
+
+ public void init() {
JavaCore.addElementChangedListener(this);
}
private IProject getProjectResource() {
+ try {
+ EclipseResourceUtil.getProject(object);
+ } catch (NullPointerException e) {
+ e.printStackTrace();
+ }
return EclipseResourceUtil.getProject(object);
}
14 years, 2 months
JBoss Tools SVN: r26020 - 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: 2010-10-25 05:54:30 -0400 (Mon, 25 Oct 2010)
New Revision: 26020
Added:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/TestJarAccess.java
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/JarAccess.java
Log:
JBIDE-7399
https://jira.jboss.org/browse/JBIDE-7399
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/JarAccess.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/JarAccess.java 2010-10-25 09:39:51 UTC (rev 26019)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/JarAccess.java 2010-10-25 09:54:30 UTC (rev 26020)
@@ -15,10 +15,12 @@
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
+import java.util.ArrayList;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
+import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.zip.ZipEntry;
@@ -45,14 +47,20 @@
private long timeStamp = -1;
private long size = -1;
+ List<String> errors = new ArrayList<String>();
+
public JarAccess() {}
+ public List<String> getErrors() {
+ return errors;
+ }
+
public void setLocation(String location) {
this.location = location;
validate();
}
- public void lockJar() {
+ public synchronized void lockJar() {
jarLock++;
}
@@ -129,9 +137,9 @@
}
public void unlockJar() {
- jarLock--;
- if(jarLock > 0 || jar == null) return;
synchronized (this) {
+ jarLock--;
+ if(jarLock > 0 || jar == null) return;
if(jar != null && jarLock == 0) {
try {
jar.close();
@@ -203,6 +211,7 @@
ZipEntry entry = jar.getEntry(path);
if(entry == null) {
String error = "JarAccess: cannot obtain entry for path '" + path + "' from jar '" + location + "'."; //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
+ errors.add(error);
ModelPlugin.getDefault().logError(error);
return ""; //$NON-NLS-1$
}
@@ -227,6 +236,7 @@
}
return sb.toString();
} catch (IOException e) {
+ errors.add(e.getClass().getName() + ": " + e.getMessage());
ModelPlugin.getPluginLog().logError(e);
return ""; //$NON-NLS-1$
} finally {
Added: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/TestJarAccess.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/TestJarAccess.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/TestJarAccess.java 2010-10-25 09:54:30 UTC (rev 26020)
@@ -0,0 +1,79 @@
+package org.jboss.tools.common.model.filesystems.impl;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.tools.common.model.XModelObjectConstants;
+
+public class TestJarAccess {
+ int threadCount = 10;
+ JarAccess acc = new JarAccess();
+
+ List<String> errors = new ArrayList<String>();
+
+ public TestJarAccess(String location) {
+ acc.setLocation(location);
+ }
+
+ public void runAll() {
+ Thread[] ts = new Thread[threadCount];
+ for (int i = 0; i < threadCount; i++) {
+ Runner r = new Runner(i);
+ Thread t = new Thread(r);
+ t.start();
+ ts[i] = t;
+ }
+ boolean b = true;
+ while(b) {
+ b = false;
+ for (int i = 0; i < threadCount; i++) {
+ if(ts[i].isAlive()) b = true;
+ }
+ if(b) {
+ try {
+ Thread.sleep(1000);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ }
+
+ public List<String> getErrors() {
+ errors.addAll(acc.getErrors());
+ return errors;
+ }
+
+ class Runner implements Runnable {
+ int id;
+
+ public Runner(int id) {
+ this.id = id;
+ }
+ public void run() {
+ try {
+ for (int i = 0; i < 100; i++) {
+ readAllFiles("");
+ }
+ } catch (Exception e) {
+ errors.add(e.getClass().getName() + ": " + e.getMessage());
+ }
+ }
+
+ }
+
+ void readAllFiles(String path) {
+ String[] ps = acc.getChildren(path);
+ String parentPath = (path.length() == 0) ? "" : path + XModelObjectConstants.SEPARATOR;
+ if(ps != null) for (int i = 0; i < ps.length; i++) {
+ boolean d = ps[i].endsWith(XModelObjectConstants.SEPARATOR);
+ if(d) ps[i] = ps[i].substring(0, ps[i].length() - 1);
+ if(d) {
+ readAllFiles(parentPath + ps[i]);
+ } else {
+ acc.getContent(parentPath + ps[i]);
+ }
+ }
+ }
+
+}
Property changes on: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/TestJarAccess.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years, 2 months
JBoss Tools SVN: r26019 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-10-25 05:39:51 -0400 (Mon, 25 Oct 2010)
New Revision: 26019
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CustomWizardDialog.java
Log:
[JBIDE-7402] added copyright headers
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CustomWizardDialog.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CustomWizardDialog.java 2010-10-25 04:26:22 UTC (rev 26018)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CustomWizardDialog.java 2010-10-25 09:39:51 UTC (rev 26019)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.tools.internal.deltacloud.ui.wizards;
import org.eclipse.jface.dialogs.IDialogConstants;
14 years, 2 months
JBoss Tools SVN: r26018 - trunk/documentation/guides/JBDS_Release_Notes/en-US.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2010-10-25 00:26:22 -0400 (Mon, 25 Oct 2010)
New Revision: 26018
Modified:
trunk/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml
Log:
updated with added fixed issues
Modified: trunk/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml
===================================================================
--- trunk/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml 2010-10-24 20:22:38 UTC (rev 26017)
+++ trunk/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml 2010-10-25 04:26:22 UTC (rev 26018)
@@ -7,18 +7,28 @@
<para>
Following is a list of new and noteworthy features and bug fixes in this release:
</para>
-<!-- <formalpara>
+ <formalpara>
<title>Contexts and Dependency Injection (CDI)</title>
<para>
<itemizedlist>
<listitem>
<para>
- <ulink url="http://jira.jboss.com/jira/browse/JBIDE-"> </ulink>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-7025">JBIDE-7025</ulink>: OpenOn support has been added for the <filename>beans.xml</filename> editor. OpenOn support allows you to easily navigate around your project without the use of the <guilabel>Package Explorer</guilabel> or <guilabel>Project Explorer</guilabel>. This is achieved by using the class and method names in your code as links to those code segments.
</para>
</listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6998">JBIDE-6998</ulink>: The <productname>Weld</productname> project extensions (beans_1_1.xsd) are now supported by the <filename>beans.xml</filename> editor.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6983">JBIDE-6983</ulink>: The <filename>beans.xml</filename> editor now correctly supports elements in other namespaces. This has been achieved by supporting any child element of the <beans> root element and providing dynamic extentions to <filename>beans.xml</filename> in order to support different namespaces.
+ </para>
+ </listitem>
</itemizedlist>
</para>
- </formalpara> -->
+ </formalpara>
<formalpara>
<title>ESB</title>
<para>
@@ -33,6 +43,19 @@
<ulink url="http://jira.jboss.com/jira/browse/JBIDE-7235">JBIDE-7235</ulink>: The ESB validator has been extended to cover the <classname>BussinessRulesProcessor</classname> class. This ensures that only one <methodname>ruleSet</methodname> is specified by the <classname>BussinessRulesProcessor</classname>, inhibiting conflicts.
</para>
</listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-7055">JBIDE-7055</ulink>: Eclipse Helios provides a new view called the <guilabel>Annotation Properties</guilabel> view that is focused on JAXB and JAX-WS annotations. The new view is now extended with support for ESB annotations for action definitions.
+ </para>
+ <para>
+ To open the new <guilabel>Annotation Properties</guilabel> view, navigate to <menuchoice><guimenuitem>Window</guimenuitem><guimenuitem>Show View</guimenuitem><guimenuitem>Other</guimenuitem><guimenuitem>JAX-WS</guimenuitem><guimenuitem>Annotation Properties</guimenuitem></menuchoice> and clicking <guibutton>OK</guibutton>. The view can be filtered to display only ESB annotations by selecting the <guimenuitem>Filters</guimenuitem> option from the <guilabel>Annotation Properties</guilabel> view menu and then selecting all annotation categories except for <guilabel>JBoss ESB</guilabel> and clicking <guibutton>OK</guibutton>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6908">JBIDE-6908</ulink>: Support for ESB 4.9 has been added to the ESB project editor.
+ </para>
+ </listitem>
</itemizedlist>
</para>
</formalpara>
@@ -75,18 +98,26 @@
</itemizedlist>
</para>
</formalpara>
-<!-- <formalpara>
+ <formalpara>
<title>Hibernate</title>
<para>
<itemizedlist>
<listitem>
<para>
-
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6988">JBIDE-6988</ulink>: Console configuration would not take into account the schema and catalog being specified for a JPA project. This meant that if two schemas existed for one databse when a user opened the created console confitguration, it would error indicating there was two database schemas. The expected result is that the schema that has been set for the project would be used.
</para>
+ <para>
+ Expected behavior has been implemented by setting a <property>default_schema</property> property in the properties for the project as if this was being set in the <filename>hibernate.properties</filename> file. However properties in the <filename>hibernate.properties</filename> file will overwrite project properties.
+ </para>
</listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6974">JBIDE-6974</ulink>: Support for comments in the HQL editor has been added for this release. Comments are annotated with <emphasis>--</emphasis> at the beginning of each comment line.
+ </para>
+ </listitem>
</itemizedlist>
</para>
- </formalpara> -->
+ </formalpara>
<!-- <formalpara>
<title>jBPM</title>
<para>
@@ -108,9 +139,31 @@
<ulink url="http://jira.jboss.com/jira/browse/JBIDE-7147">JBIDE-7147</ulink>: The validators create a marker for each problem found when conducting validation. An issue would arise where system performance would be drammatically decreased when an excesive amount of problems were discovered and subsequently marked. To ensure a system does not receive a performance hit, the <guimenuitem>Validator</guimenuitem> preferences screen now includes the ability to set the maximum number of problems reported per file. If there are more issues in a file than the maximum number to be reported, once the reported issues are corrected the others will be reported in subsequent validation attempts.
</para>
</listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-7086">JBIDE-7086</ulink>: MyFaces uses the library <filename>myfaces-metadata.xml</filename> to enable tag auto-completion, a plug-in that was not supported. MyFaces plug-in library support has been added, allowing for MyFaces tag auto-completion.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-7021">JBIDE-7021</ulink>: Low performance issues existed for validation of web pages. Performance issues were caused by the XHTML syntax validator performing to slow if a DOCTYPE was not declared at the top of XHTML files, the <methodname>PageContextFactory.createPageContext</methodname> method created a SSE model for non-facelet pages, if a page contained Expression Language (EL) errors or warnings, a memory leak appeared in the <methodname>PageContextFactory.getSheetForTagAttribute</methodname> method by registerting <classname>ExtendedLinkElementAdapter</classname> and never releasing the memory allocated to it. These issues have been addressed in this release and the <classname>PageContextFactory</classname> class has been removed from the resource listeners since resources can be modified without changing their context in other places apart from the included validators.
+ </para>
+ </listitem>
</itemizedlist>
</para>
</formalpara>
+ <formalpara>
+ <title>JBoss Application Server</title>
+ <para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6973">JBIDE-6973</ulink>: A HTTP poller has been added for JBoss servers to detect if the server is running. This added feature will be useful for remote and local servers, being less resource-intensive than polling with JMX.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ </formalpara>
<!-- <formalpara>
<title>Portlet</title>
<para>
@@ -178,31 +231,51 @@
<para>
<itemizedlist>
<listitem>
- <para>
- <ulink url="http://jira.jboss.com/jira/browse/JBIDE-7144">JBIDE-7144</ulink>: A preference page is provided that details all settings currently being reported.
- </para>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-7144">JBIDE-7144</ulink>: A preference page is provided that details all settings currently being reported.
+ </para>
</listitem>
<listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-7142">JBIDE-7142</ulink>: Originally usage reporting only reported an operating system version if it was either Macintosh or Windows, missing Linux. Support for reporting Linux operating system versions was added through completion of this issue.
+ </para>
+ </listitem>
+ <listitem>
<para>
- <ulink url="http://jira.jboss.com/jira/browse/JBIDE-7142">JBIDE-7142</ulink>: Originally usage reporting only reported an operating system version if it was either Macintosh or Windows, missing Linux. Support for reporting Linux operating system versions was added through completion of this issue.
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-7082">JBIDE-7082</ulink>: Originally usage reporting would only report on components that started with <filename>org.jboss.tools</filename>, excluding components such as the application server and Hibernate. Reporting of these components has been achieved by the modification of the <filename>JBossToolsComponents.java</filename> file.
</para>
</listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-7041">JBIDE-7041</ulink>: Originally usage reporting would not report on the version of the application being used. This information is useful to us as it gives an indication of how fast users move to a newly released version. Functionality for this is now included in the usage plug-in.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-7034">JBIDE-7034</ulink>, <ulink url="http://jira.jboss.com/jira/browse/JBIDE-">JBIDE-</ulink> and <ulink url="http://jira.jboss.com/jira/browse/JBIDE-">JBIDE-</ulink>: New reporting fields were added to the usage plug-in for the gathering of user data. See the individual JIRAs for specific field details.
+ </para>
+ </listitem>
</itemizedlist>
</para>
</formalpara> -->
-<!-- <formalpara>
+ <formalpara>
<title>Visual Page Editor</title>
<para>
<itemizedlist>
<listitem>
<para>
- <ulink url="http://jira.jboss.com/jira/browse/JBIDE-"> </ulink>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-7059">JBIDE-7059</ulink>: XulRunner (XR) has become an optional install of the Visual Page Editor. This decision has meant that the buttons of the Visual Page Editor plug-in have been moved to be apart of the Eclipse icon bar.
</para>
</listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6981">JBIDE-6981</ulink>: Functionality has been added that provides a drop-down menu in the tag breadcrumbs that enables easy selection of any child element to the selected tag. If there are no children to be expanded, the last tag will remain highlighted.
+ </para>
+ </listitem>
</itemizedlist>
</para>
- </formalpara> -->
+ </formalpara>
<formalpara id="Fixed_Issues-Web_Tools_Platform">
<title>Web Tools Platform</title>
<para>
14 years, 2 months
JBoss Tools SVN: r26017 - in trunk/documentation/whatsnew/smooks: images and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: tfennelly
Date: 2010-10-24 16:22:38 -0400 (Sun, 24 Oct 2010)
New Revision: 26017
Added:
trunk/documentation/whatsnew/smooks/images/Smooks_direct-mapping.png
trunk/documentation/whatsnew/smooks/smooks-news-1.2.0.beta1.html
Log:
Added N&N for Smooks.
Added: trunk/documentation/whatsnew/smooks/images/Smooks_direct-mapping.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/smooks/images/Smooks_direct-mapping.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/smooks/smooks-news-1.2.0.beta1.html
===================================================================
--- trunk/documentation/whatsnew/smooks/smooks-news-1.2.0.beta1.html (rev 0)
+++ trunk/documentation/whatsnew/smooks/smooks-news-1.2.0.beta1.html 2010-10-24 20:22:38 UTC (rev 26017)
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Language" content="en-us" />
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<link rel="stylesheet" href="../whatsnew.css" />
+<title>Smooks tools 1.1.0.M4 What's New</title>
+</head>
+<body>
+<h1>Smooks tools 1.2.0.beta1 What's New</h1>
+
+<p align="right"><a href="../index.html">< Main Index</a></p>
+
+
+<table border="0" cellpadding="10" cellspacing="0" width="80%">
+
+ <tr>
+ <td colspan="2">
+ <hr />
+ <h3>Smooks Configuration Editor</h3>
+ <hr />
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="right"><a name="itemname1" id="itemname1"></a><b>Direct Source to Target Templating</b></td>
+ <td valign="top">
+ <p>Added support for transforming directly from a source message (XML, EDI, Java, CSV etc) to a target (XML or CSV)
+ without requiring an intermediate Java Mapping Model.</p>
+
+ <img src="images/Smooks_direct-mapping.png">
+
+ <p>
+ The last version of this plugin required an intermediate Java Mapping Model in situations
+ where the user simply wanted to apply a templating transformation e.g. XML-<i>A</i> to XML-<i>B</i>. This
+ is no longer a requirement. The user can now apply a template drectly to the input data
+ model.
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <hr />
+ </td>
+ </tr>
+
+</table>
+
+</body>
+
+</html>
+
+
14 years, 2 months
JBoss Tools SVN: r26016 - branches/jbosstools-3.2.0.Beta1/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2010-10-23 18:17:42 -0400 (Sat, 23 Oct 2010)
New Revision: 26016
Modified:
branches/jbosstools-3.2.0.Beta1/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizardPage.java
Log:
JBIDE-7397 New Example -> Project Examples -> dialog size changed significantly
Modified: branches/jbosstools-3.2.0.Beta1/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizardPage.java
===================================================================
--- branches/jbosstools-3.2.0.Beta1/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizardPage.java 2010-10-23 00:00:33 UTC (rev 26015)
+++ branches/jbosstools-3.2.0.Beta1/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizardPage.java 2010-10-23 22:17:42 UTC (rev 26016)
@@ -71,6 +71,7 @@
*/
public class NewProjectExamplesWizardPage extends WizardPage {
+ private static final int DEFAULT_WIDTH = 600;
private IStructuredSelection selection;
private Button showQuickFixButton;
private Combo siteCombo;
@@ -92,7 +93,7 @@
Composite composite = new Composite(parent,SWT.NONE);
composite.setLayout(new GridLayout(1,false));
- GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
+ GridData gd = new GridData(SWT.FILL, SWT.FILL, false, false);
composite.setLayoutData(gd);
@@ -157,7 +158,8 @@
Composite internal = new Composite(composite, SWT.NULL);
internal.setLayout(new GridLayout(2,false));
- gd = new GridData(GridData.FILL_BOTH);
+ gd = new GridData(GridData.FILL, GridData.FILL, true, false);
+ gd.widthHint = DEFAULT_WIDTH;
internal.setLayoutData(gd);
Label projectNameLabel = new Label(internal,SWT.NULL);
@@ -305,7 +307,7 @@
private void configureSizeAndLocation() {
Shell shell = getContainer().getShell();
- Point size = new Point(600,shell.getSize().y);
+ Point size = new Point(DEFAULT_WIDTH,shell.getSize().y);
shell.setSize(size);
Point location = getInitialLocation(size, shell);
shell.setBounds(getConstrainedShellBounds(new Rectangle(location.x,
14 years, 3 months
JBoss Tools SVN: r26015 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core: src/org/jboss/tools/deltacloud/core and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: jjohnstn
Date: 2010-10-22 20:00:33 -0400 (Fri, 22 Oct 2010)
New Revision: 26015
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java
Log:
* src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImage.java: New file.
* src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java: New file.
* src/org/jboss/tools/deltacloud/ui/views/ImageViewLabelAndContentProvider.java (setFilter): Allow
use of a temporary filter that isn't saved in the cloud.
(filter): Ditto.
* src/org/jboss/tools/internal/deltacloud/ui/common/databinding/validator/MandatoryStringValidator.java (validate):
Make the message a warning rather than an error as a field will be unfilled in at first and
shouldn't be listed as in error.
(createControl): Add support for finding an image.
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog 2010-10-22 23:46:26 UTC (rev 26014)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog 2010-10-23 00:00:33 UTC (rev 26015)
@@ -1,3 +1,8 @@
+2010-10-22 Jeff Johnston <jjohnstn(a)redhat.com>
+
+ * src/org/jboss/tools/deltacloud/core/DeltaCloud.java (DeltaCloud): Don't add
+ "api" to URL in constructor as the client is adding this as well.
+
2010-10-22 André Dietisheim <adietish(a)redhat.com>
* src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2010-10-22 23:46:26 UTC (rev 26014)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2010-10-23 00:00:33 UTC (rev 26015)
@@ -66,7 +66,7 @@
public DeltaCloud(String name, String url, String username, String passwd,
String type, boolean persistent,
String imageFilterRules, String instanceFilterRules) throws MalformedURLException {
- this.client = new DeltaCloudClient(new URL(url + "/api"), username, passwd); //$NON-NLS-1$
+ this.client = new DeltaCloudClient(new URL(url), username, passwd); //$NON-NLS-1$
this.url = url;
this.name = name;
this.username = username;
14 years, 3 months
JBoss Tools SVN: r26014 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui: src/org/jboss/tools/deltacloud/ui/views and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: jjohnstn
Date: 2010-10-22 19:46:26 -0400 (Fri, 22 Oct 2010)
New Revision: 26014
Added:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImage.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/ImageViewLabelAndContentProvider.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/common/databinding/validator/MandatoryStringValidator.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage2.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties
Log:
* src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImage.java: New file.
* src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java: New file.
* src/org/jboss/tools/deltacloud/ui/views/ImageViewLabelAndContentProvider.java (setFilter): Allow
use of a temporary filter that isn't saved in the cloud.
(filter): Ditto.
* src/org/jboss/tools/internal/deltacloud/ui/common/databinding/validator/MandatoryStringValidator.java (validate):
Make the message a warning rather than an error as a field will be unfilled in at first and
shouldn't be listed as in error.
(createControl): Add support for finding an image.
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-10-22 21:46:37 UTC (rev 26013)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-10-22 23:46:26 UTC (rev 26014)
@@ -1,9 +1,18 @@
2010-10-22 Jeff Johnston <jjohnstn(a)redhat.com>
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImage.java: New file.
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java: New file.
+ * src/org/jboss/tools/deltacloud/ui/views/ImageViewLabelAndContentProvider.java (setFilter): Allow
+ use of a temporary filter that isn't saved in the cloud.
+ (filter): Ditto.
+ * src/org/jboss/tools/internal/deltacloud/ui/common/databinding/validator/MandatoryStringValidator.java (validate):
+ Make the message a warning rather than an error as a field will be unfilled in at first and
+ shouldn't be listed as in error.
* src/org/jboss/tools/deltacloud/ui/commands/CreateInstanceHandler2.java: New file.
* src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstance2.java: New file.
* src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceModel.java: New file.
* src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage2.java: New file.
+ (createControl): Add support for finding an image.
* plugin.xml: Add menu item for launching an instance when the selected item(s) are not
images that will require entry of the image id.
* src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties: Add new
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/ImageViewLabelAndContentProvider.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/ImageViewLabelAndContentProvider.java 2010-10-22 21:46:37 UTC (rev 26013)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/ImageViewLabelAndContentProvider.java 2010-10-22 23:46:26 UTC (rev 26014)
@@ -27,6 +27,7 @@
public class ImageViewLabelAndContentProvider extends BaseLabelProvider implements IStructuredContentProvider, ITableLabelProvider {
private DeltaCloud cloud;
+ private IImageFilter localFilter;
private DeltaCloudImage[] images;
public enum Column {
@@ -91,9 +92,16 @@
}
}
+ // Allow override of filter for Finding Images
+ public void setFilter(IImageFilter filter) {
+ this.localFilter = filter;
+ }
+
private DeltaCloudImage[] filter(DeltaCloudImage[] input) {
ArrayList<DeltaCloudImage> array = new ArrayList<DeltaCloudImage>();
- IImageFilter f = cloud.getImageFilter();
+ IImageFilter f = localFilter;
+ if (localFilter == null)
+ f = cloud.getImageFilter();
for (int i = 0; i < input.length; ++i) {
DeltaCloudImage image = input[i];
if (f.isVisible(image))
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/common/databinding/validator/MandatoryStringValidator.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/common/databinding/validator/MandatoryStringValidator.java 2010-10-22 21:46:37 UTC (rev 26013)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/common/databinding/validator/MandatoryStringValidator.java 2010-10-22 23:46:26 UTC (rev 26014)
@@ -33,7 +33,7 @@
*/
public IStatus validate(Object value) {
if (!((value instanceof String) && ((String) value).length() > 0)) {
- return ValidationStatus.error(errorMessage);
+ return ValidationStatus.warning(errorMessage);
}
return ValidationStatus.ok();
}
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImage.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImage.java 2010-10-22 23:46:26 UTC (rev 26014)
@@ -0,0 +1,38 @@
+package org.jboss.tools.internal.deltacloud.ui.wizards;
+
+import org.eclipse.jface.wizard.Wizard;
+import org.jboss.tools.deltacloud.core.DeltaCloud;
+
+public class FindImage extends Wizard {
+
+ private DeltaCloud cloud;
+ private FindImagePage mainPage;
+ private String imageId;
+
+ public FindImage(DeltaCloud cloud) {
+ this.cloud = cloud;
+ }
+
+ public String getImageId() {
+ return imageId;
+ }
+
+ @Override
+ public void addPages() {
+ // TODO Auto-generated method stub
+ mainPage = new FindImagePage(cloud);
+ addPage(mainPage);
+ }
+
+ @Override
+ public boolean canFinish() {
+ return mainPage.isPageComplete();
+ }
+
+ @Override
+ public boolean performFinish() {
+ imageId = mainPage.getImageId();
+ return true;
+ }
+
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImage.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java 2010-10-22 23:46:26 UTC (rev 26014)
@@ -0,0 +1,305 @@
+package org.jboss.tools.internal.deltacloud.ui.wizards;
+
+import org.eclipse.jface.layout.TableColumnLayout;
+import org.eclipse.jface.viewers.ColumnWeightData;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.Text;
+import org.jboss.tools.deltacloud.core.AllImageFilter;
+import org.jboss.tools.deltacloud.core.DeltaCloud;
+import org.jboss.tools.deltacloud.core.DeltaCloudImage;
+import org.jboss.tools.deltacloud.core.IImageFilter;
+import org.jboss.tools.deltacloud.core.ImageFilter;
+import org.jboss.tools.deltacloud.ui.SWTImagesFactory;
+import org.jboss.tools.deltacloud.ui.views.CVMessages;
+import org.jboss.tools.deltacloud.ui.views.ImageComparator;
+import org.jboss.tools.deltacloud.ui.views.ImageViewLabelAndContentProvider;
+
+public class FindImagePage extends WizardPage {
+
+ private final static String NAME = "FindImage.name"; //$NON-NLS-1$
+ private final static String TITLE = "FindImage.title"; //$NON-NLS-1$
+ private final static String DESC = "FindImage.desc"; //$NON-NLS-1$
+ private final static String FILTER_LABEL = "Filter.label"; //$NON-NLS-1$
+ private final static String NAME_LABEL = "Name.label"; //$NON-NLS-1$
+ private final static String ID_LABEL = "Id.label"; //$NON-NLS-1$
+ private final static String ARCH_LABEL = "Arch.label"; //$NON-NLS-1$
+ private final static String DESC_LABEL = "Desc.label"; //$NON-NLS-1$
+ private final static String EMPTY_RULE = "ErrorFilterEmptyRule.msg"; //$NON-NLS-1$
+ private final static String INVALID_SEMICOLON = "ErrorFilterSemicolon.msg"; //$NON-NLS-1$
+
+ private DeltaCloud cloud;
+ private TableViewer viewer;
+ private Composite container;
+
+ private ImageViewLabelAndContentProvider contentProvider;
+
+ private Text nameText;
+ private Text idText;
+ private Text archText;
+ private Text descText;
+
+ private IImageFilter filter;
+ private DeltaCloudImage selectedElement;
+ private String oldRules;
+
+ private ModifyListener textListener = new ModifyListener() {
+
+ @Override
+ public void modifyText(ModifyEvent e) {
+ // TODO Auto-generated method stub
+ validate();
+ }
+
+ };
+
+ private class ColumnListener extends SelectionAdapter {
+
+ private int column;
+ private TableViewer viewer;
+
+ public ColumnListener(int column, TableViewer viewer) {
+ this.column = column;
+ this.viewer = viewer;
+ }
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ ImageComparator comparator = (ImageComparator)viewer.getComparator();
+ Table t = viewer.getTable();
+ if (comparator.getColumn() == column) {
+ comparator.reverseDirection();
+ }
+ comparator.setColumn(column);
+ TableColumn tc = (TableColumn)e.getSource();
+ t.setSortColumn(tc);
+ t.setSortDirection(SWT.NONE);
+ viewer.refresh();
+ }
+
+ };
+
+ public FindImagePage(DeltaCloud cloud) {
+ super(WizardMessages.getString(NAME));
+ this.cloud = cloud;
+ filter = new AllImageFilter();
+ setDescription(WizardMessages.getString(DESC));
+ setTitle(WizardMessages.getString(TITLE));
+ setImageDescriptor(SWTImagesFactory.DESC_DELTA_LARGE);
+ setPageComplete(false);
+ }
+
+ public String getImageId() {
+ if (selectedElement != null)
+ return selectedElement.getId();
+ return "";
+ }
+
+ private void validate() {
+ boolean hasError = false;
+ boolean isComplete = true;
+
+ String name = nameText.getText();
+ String id = idText.getText();
+ String arch = archText.getText();
+ String desc = descText.getText();
+
+ if (name.contains(";") || //$NON-NLS-1$
+ id.contains(";") || //$NON-NLS-1$
+ arch.contains(";") || //$NON-NLS-1$
+ desc.contains(";")) { //$NON-NLS-1$
+ setErrorMessage(WizardMessages.getString(INVALID_SEMICOLON));
+ hasError = true;
+ }
+
+ if (selectedElement == null)
+ isComplete = false;
+
+ if (!hasError) {
+ setErrorMessage(null);
+ String newRules = name + "*;" //$NON-NLS-1$
+ + id + "*;" //$NON-NLS-1$
+ + arch + "*;" //$NON-NLS-1$
+ + desc + "*"; //$NON-NLS-1$
+
+ if (!newRules.equals(oldRules)) {
+ filter = new ImageFilter();
+ filter.setRules(newRules);
+ oldRules = newRules;
+ Display.getDefault().asyncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ contentProvider.setFilter(filter);
+ viewer.setInput(cloud.getCurrImages());
+ viewer.refresh();
+ }
+
+ });
+ }
+ }
+ setPageComplete(isComplete && !hasError);
+ }
+
+ @Override
+ public void createControl(Composite parent) {
+ // TODO Auto-generated method stub
+ container = new Composite(parent, SWT.NULL);
+ FormLayout layout = new FormLayout();
+ layout.marginHeight = 5;
+ layout.marginWidth = 5;
+ container.setLayout(layout);
+
+
+ Label nameLabel = new Label(container, SWT.NULL);
+ nameLabel.setText(WizardMessages.getString(NAME_LABEL));
+
+ nameText = new Text(container, SWT.BORDER | SWT.SINGLE);
+ nameText.setText(filter.getNameRule().toString());
+ nameText.addModifyListener(textListener);
+
+ Label idLabel = new Label(container, SWT.NULL);
+ idLabel.setText(WizardMessages.getString(ID_LABEL));
+
+ idText = new Text(container, SWT.BORDER | SWT.SINGLE);
+ idText.setText(filter.getIdRule().toString());
+ idText.addModifyListener(textListener);
+
+ Label archLabel = new Label(container, SWT.NULL);
+ archLabel.setText(WizardMessages.getString(ARCH_LABEL));
+
+ archText = new Text(container, SWT.BORDER | SWT.SINGLE);
+ archText.setText(filter.getArchRule().toString());
+ archText.addModifyListener(textListener);
+
+ Label descLabel = new Label(container, SWT.NULL);
+ descLabel.setText(WizardMessages.getString(DESC_LABEL));
+
+ descText = new Text(container, SWT.BORDER | SWT.SINGLE);
+ descText.setText(filter.getDescRule().toString());
+ descText.addModifyListener(textListener);
+
+ Composite tableArea = new Composite(container, SWT.NULL);
+ TableColumnLayout tableLayout = new TableColumnLayout();
+ tableArea.setLayout(tableLayout);
+
+ viewer = new TableViewer(tableArea, SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
+ Table table = viewer.getTable();
+ table.setHeaderVisible(true);
+ table.setLinesVisible(true);
+ contentProvider = new ImageViewLabelAndContentProvider();
+ viewer.setContentProvider(contentProvider);
+ viewer.setLabelProvider(contentProvider);
+ ImageComparator comparator = new ImageComparator(0);
+ viewer.setComparator(comparator);
+
+ for (int i = 0; i < ImageViewLabelAndContentProvider.Column.getSize(); ++i) {
+ ImageViewLabelAndContentProvider.Column c =
+ ImageViewLabelAndContentProvider.Column.getColumn(i);
+ TableColumn tc = new TableColumn(table, SWT.NONE);
+ if (i == 0)
+ table.setSortColumn(tc);
+ tc.setText(CVMessages.getString(c.name()));
+ tableLayout.setColumnData(tc, new ColumnWeightData(c.getWeight(), true));
+ tc.addSelectionListener(new ColumnListener(i, viewer));
+ }
+ table.setSortDirection(SWT.NONE);
+
+ Point p1 = nameLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+ Point p2 = nameText.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+ int centering = (p2.y - p1.y + 1) / 2;
+
+ FormData f = new FormData();
+// f.left = new FormAttachment(0, 5);
+// f.top = new FormAttachment(0, 5 + centering);
+// filterLabel.setLayoutData(f);
+
+ f = new FormData();
+ f.left = new FormAttachment(0, 10);
+ f.top = new FormAttachment(0, 5 + centering);
+ nameLabel.setLayoutData(f);
+
+ f = new FormData();
+ f.left = new FormAttachment(nameLabel, 5);
+ f.top = new FormAttachment(0, 5);
+ f.right = new FormAttachment(22, -10);
+ nameText.setLayoutData(f);
+
+ f = new FormData();
+ f.left = new FormAttachment(22);
+ f.top = new FormAttachment(0, 5 + centering);
+ idLabel.setLayoutData(f);
+
+ f = new FormData();
+ f.left = new FormAttachment(idLabel, 5);
+ f.top = new FormAttachment(0, 5);
+ f.right = new FormAttachment(40, -10);
+ idText.setLayoutData(f);
+
+ f = new FormData();
+ f.left = new FormAttachment(40);
+ f.top = new FormAttachment(0, 5 + centering);
+ archLabel.setLayoutData(f);
+
+ f = new FormData();
+ f.left = new FormAttachment(archLabel, 5);
+ f.top = new FormAttachment(0, 5);
+ f.right = new FormAttachment(67, -10);
+ archText.setLayoutData(f);
+
+ f = new FormData();
+ f.left = new FormAttachment(67);
+ f.top = new FormAttachment(0, 5 + centering);
+ descLabel.setLayoutData(f);
+
+ f = new FormData();
+ f.left = new FormAttachment(descLabel, 5);
+ f.top = new FormAttachment(0, 5);
+ f.right = new FormAttachment(100, -10);
+ descText.setLayoutData(f);
+
+ f = new FormData();
+ f.top = new FormAttachment(nameText, 13);
+ f.left = new FormAttachment(0, 0);
+ f.right = new FormAttachment(100, 0);
+ f.bottom = new FormAttachment(100, 0);
+ tableArea.setLayoutData(f);
+
+ setControl(container);
+
+ hookSelection();
+ validate();
+ }
+
+ private void hookSelection() {
+ viewer.addSelectionChangedListener(new ISelectionChangedListener() {
+ @Override
+ public void selectionChanged(SelectionChangedEvent event) {
+ handleSelection();
+ }
+ });
+ }
+
+ private void handleSelection() {
+ IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
+ selectedElement = (DeltaCloudImage)selection.getFirstElement();
+ validate();
+ }
+
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage2.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage2.java 2010-10-22 21:46:37 UTC (rev 26013)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage2.java 2010-10-22 23:46:26 UTC (rev 26014)
@@ -69,6 +69,7 @@
private static final String REALM_LABEL = "Realm.label"; //$NON-NLS-1$
private static final String KEY_LABEL = "Key.label"; //$NON-NLS-1$
private static final String MANAGE_BUTTON_LABEL = "ManageButton.label"; //$NON-NLS-1$
+ private static final String FIND_BUTTON_LABEL = "FindButton.label"; //$NON-NLS-1$
private static final String PROPERTIES_LABEL = "Properties.label"; //$NON-NLS-1$
private static final String MUST_ENTER_A_NAME = "ErrorMustProvideName.text"; //$NON-NLS-1$
private static final String MUST_ENTER_A_KEYNAME = "ErrorMustProvideKeyName.text"; //$NON-NLS-1$
@@ -85,6 +86,7 @@
private Text keyText;
private Combo hardware;
private Button keyManage;
+ private Button findImage;
private Control realm;
private ProfileComposite currPage;
private Map<String, ProfileComposite> profilePages;
@@ -117,7 +119,23 @@
}
};
+
+ private SelectionListener findListener = new SelectionAdapter() {
+
+ public void widgetSelected(SelectionEvent event) {
+ Shell shell = getShell();
+ FindImage wizard = new FindImage(cloud);
+ WizardDialog dialog = new CustomWizardDialog(shell, wizard,
+ IDialogConstants.OK_LABEL);
+ dialog.create();
+ dialog.open();
+ String imageId = wizard.getImageId();
+ if (imageId != null)
+ imageText.setText(imageId);
+ }
+ };
+
public NewInstancePage2(DeltaCloud cloud) {
super(WizardMessages.getString(NAME));
this.cloud = cloud;
@@ -247,6 +265,10 @@
WizardMessages.getString(MUST_ENTER_IMAGE_ID))),
null);
+ findImage = new Button(container, SWT.NULL);
+ findImage.setText(WizardMessages.getString(FIND_BUTTON_LABEL));
+ findImage.addSelectionListener(findListener);
+
arch = new Label(container, SWT.NULL);
bindArchLabel(dbc, imageText, arch, this);
@@ -299,10 +321,18 @@
profilePages.put(p.getId(), pc);
pc.setVisible(false);
}
+
+ keyManage = new Button(container, SWT.NULL);
+ keyManage.setText(WizardMessages.getString(MANAGE_BUTTON_LABEL));
+ keyManage.addSelectionListener(manageListener);
+ if (cloud.getType().equals(DeltaCloudInstance.MOCK_TYPE))
+ keyManage.setEnabled(false);
Point p1 = nameLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT);
Point p2 = nameText.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+ Point p3 = findImage.computeSize(SWT.DEFAULT, SWT.DEFAULT);
int centering = (p2.y - p1.y + 1) / 2;
+ int centering2 = (p3.y - p2.y + 1) / 2;
FormData f = new FormData();
f.left = new FormAttachment(0, 0);
@@ -321,14 +351,26 @@
nameText.setLayoutData(f);
f = new FormData();
- f.top = new FormAttachment(nameText, 8 + centering);
+ f.top = new FormAttachment(nameText, 8 + centering + centering2);
f.left = new FormAttachment(0, 0);
imageLabel.setLayoutData(f);
+ int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
+ Point minSize1 = findImage.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
+ Point minSize2 = keyManage.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
+ int buttonWidth = Math.max(widthHint, minSize1.x);
+ buttonWidth = Math.max(buttonWidth, minSize2.x);
+
f = new FormData();
+ f.width = buttonWidth;
f.top = new FormAttachment(nameText, 8);
+ f.right = new FormAttachment(realm, 0, SWT.RIGHT);
+ findImage.setLayoutData(f);
+
+ f = new FormData();
+ f.top = new FormAttachment(nameText, 8 + centering2);
f.left = new FormAttachment(hardwareLabel, 5);
- f.right = new FormAttachment(100, 0);
+ f.right = new FormAttachment(findImage, -10);
imageText.setLayoutData(f);
f = new FormData();
@@ -353,6 +395,7 @@
f.right = new FormAttachment(100, 0);
realm.setLayoutData(f);
+
Control control = realm;
Label keyLabel = new Label(container, SWT.NULL);
@@ -361,13 +404,6 @@
keyText = new Text(container, SWT.BORDER | SWT.SINGLE);
bindText(dbc, keyText, NewInstanceModel.PROPERTY_KEYNAME, MUST_ENTER_A_KEYNAME);
- keyManage = new Button(container, SWT.NULL);
- keyManage.setText(WizardMessages.getString(MANAGE_BUTTON_LABEL));
- keyManage.addSelectionListener(manageListener);
- if (cloud.getType().equals(DeltaCloudInstance.MOCK_TYPE))
- keyManage.setEnabled(false);
- Point p3 = keyManage.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- int centering2 = (p3.y - p2.y + 1) / 2;
f = new FormData();
f.top = new FormAttachment(realm, 8 + centering + centering2);
@@ -375,9 +411,7 @@
keyLabel.setLayoutData(f);
f = new FormData();
- int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
- Point minSize = keyManage.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
- f.width = Math.max(widthHint, minSize.x);
+ f.width = buttonWidth;
f.top = new FormAttachment(realm, 8);
f.right = new FormAttachment(realm, 0, SWT.RIGHT);
keyManage.setLayoutData(f);
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties 2010-10-22 21:46:37 UTC (rev 26013)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties 2010-10-22 23:46:26 UTC (rev 26014)
@@ -39,6 +39,7 @@
Key.label=Key Name:
BrowseButton.label=Browse...
ManageButton.label=Manage...
+FindButton.label=Find...
NewButton.label=New...
DeleteButton.label=Delete
DefaultButton.label=Default
@@ -83,10 +84,16 @@
ManageKeys.title=Manage Keys
ManageKeys.name=Manage Keys
+FindImage.desc=Select an image to use. Use the filters to narrow down your choice.
+FindImage.title=Find Image
+FindImage.name=Find Image
+
ImageFilter.desc=Specify rules to determine which Images will appear in the dialog.
ImageFilter.title=Image Filter
ImageFilter.name=Image Filter
+Filter.label=Filter:
+
ImageFilter.label=Show all images which match the following rules (* \= wildcard)\:
ErrorFilterEmptyRule.msg=Rules cannot be empty strings
ErrorFilterSemicolon.msg=Rules cannot contain a semi-colon character
14 years, 3 months
JBoss Tools SVN: r26013 - trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-10-22 17:46:37 -0400 (Fri, 22 Oct 2010)
New Revision: 26013
Modified:
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/InstanceMockIntegrationTest.java
Log:
[JBIDE-7401] fixed start/stop-instance by changing to POST request [JBIDE-7371] added tests
Modified: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/InstanceMockIntegrationTest.java
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/InstanceMockIntegrationTest.java 2010-10-22 21:40:19 UTC (rev 26012)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/InstanceMockIntegrationTest.java 2010-10-22 21:46:37 UTC (rev 26013)
@@ -160,7 +160,7 @@
client.shutdownInstance(testInstance.getId());
}
client.startInstance(testInstance.getId());
- testInstance = client.listInstances(testInstance.getId());
+ testInstance = client.listInstances(testInstance.getId()); // reload!
assertEquals(State.RUNNING, testInstance.getState());
}
}
14 years, 3 months