JBoss Tools SVN: r28966 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-02-03 07:33:08 -0500 (Thu, 03 Feb 2011)
New Revision: 28966
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/ICloudElementFilter.java
Log:
[JBIDE-8322]
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 2011-02-03 12:16:49 UTC (rev 28965)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2011-02-03 12:33:08 UTC (rev 28966)
@@ -88,7 +88,7 @@
this.driver = driver;
this.passwordStore = createSecurePasswordStore(name, username, password);
this.client = createClient(url, username, passwordStore.getPassword());
- this.imageFilter = new ImageFilter(instanceFilterRules, this);
+ this.imageFilter = new ImageFilter(imageFilterRules, this);
this.instanceFilter = new InstanceFilter(instanceFilterRules, this);
this.instanceAliasMappings = instanceAliasMappings;
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/ICloudElementFilter.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/ICloudElementFilter.java 2011-02-03 12:16:49 UTC (rev 28965)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/ICloudElementFilter.java 2011-02-03 12:33:08 UTC (rev 28966)
@@ -12,9 +12,9 @@
import java.util.Collection;
-
/**
- * A filter interface that may be applied on IDeltaCloudElement. Known implementors are IImageFilter and IInstanceFilter
+ * A filter interface that may be applied on IDeltaCloudElement. Known
+ * implementors are IImageFilter and IInstanceFilter
*
* @see IDeltaCloudElement
* @see IImageFilter
@@ -30,7 +30,8 @@
public static final String ALL_MATCHER_EXPRESSION = "*"; //$NON-NLS-1$
public static final String ALL_STRING =
- ALL_MATCHER_EXPRESSION + EXPRESSION_DELIMITER // name
+ ALL_MATCHER_EXPRESSION + EXPRESSION_DELIMITER // alias
+ + ALL_MATCHER_EXPRESSION + EXPRESSION_DELIMITER // name
+ ALL_MATCHER_EXPRESSION + EXPRESSION_DELIMITER // id
+ ALL_MATCHER_EXPRESSION + EXPRESSION_DELIMITER // arch
+ ALL_MATCHER_EXPRESSION; // desc
13 years, 11 months
JBoss Tools SVN: r28965 - in trunk/hibernatetools/tests/org.hibernate.eclipse.console.test: res/project/src/mapping/dynamicentity and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2011-02-03 07:16:49 -0500 (Thu, 03 Feb 2011)
New Revision: 28965
Added:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/interceptor/Address.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/interceptor/Company.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/interceptor/Customer.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/interceptor/Person.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/tuplizer/Address.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/tuplizer/Company.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/tuplizer/Customer.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/tuplizer/Person.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/BaseTestSetCase.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/CheckConsoleConfigTest.java
Removed:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/lib/dom4j-1.6.1.jar
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/lib/ejb3-persistence.jar
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/lib/hibernate3.jar
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/Address.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/Company.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/Customer.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/Person.java
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/interceptor/Customer.hbm.xml
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/tuplizer/Customer.hbm.xml
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/HbmExportExceptionTest.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/MappingTestsAnnotations.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/MappingTestsJpa.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenMappingDiagramTest.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenMappingFileTest.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenSourceFileTest.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/TestSet.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/project/ConfigurableTestProject.java
Log:
https://issues.jboss.org/browse/JBIDE-8147 - update junit tests -> check Hibernate Configuration & code refactoring
Deleted: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/lib/dom4j-1.6.1.jar
===================================================================
(Binary files differ)
Deleted: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/lib/ejb3-persistence.jar
===================================================================
(Binary files differ)
Deleted: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/lib/hibernate3.jar
===================================================================
(Binary files differ)
Deleted: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/Address.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/Address.java 2011-02-03 12:10:12 UTC (rev 28964)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/Address.java 2011-02-03 12:16:49 UTC (rev 28965)
@@ -1,18 +0,0 @@
-package mapping.dynamicentity;
-
-/**
- * @author <a href="mailto:steve@hibernate.org">Steve Ebersole </a>
- */
-public interface Address {
- public Long getId();
- public void setId(Long id);
-
- public String getStreet();
- public void setStreet(String street);
-
- public String getCity();
- public void setCity(String city);
-
- public String getPostalCode();
- public void setPostalCode(String postalCode);
-}
Deleted: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/Company.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/Company.java 2011-02-03 12:10:12 UTC (rev 28964)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/Company.java 2011-02-03 12:16:49 UTC (rev 28965)
@@ -1,11 +0,0 @@
-package mapping.dynamicentity;
-
-/**
- * @author <a href="mailto:steve@hibernate.org">Steve Ebersole </a>
- */
-public interface Company {
- public Long getId();
- public void setId(Long id);
- public String getName();
- public void setName(String name);
-}
Deleted: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/Customer.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/Customer.java 2011-02-03 12:10:12 UTC (rev 28964)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/Customer.java 2011-02-03 12:16:49 UTC (rev 28965)
@@ -1,9 +0,0 @@
-package mapping.dynamicentity;
-
-/**
- * @author <a href="mailto:steve@hibernate.org">Steve Ebersole </a>
- */
-public interface Customer extends Person {
- public Company getCompany();
- public void setCompany(Company company);
-}
Deleted: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/Person.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/Person.java 2011-02-03 12:10:12 UTC (rev 28964)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/Person.java 2011-02-03 12:16:49 UTC (rev 28965)
@@ -1,17 +0,0 @@
-package mapping.dynamicentity;
-
-import java.util.Set;
-
-/**
- * @author <a href="mailto:steve@hibernate.org">Steve Ebersole </a>
- */
-public interface Person {
- public Long getId();
- public void setId(Long id);
- public String getName();
- public void setName(String name);
- public Address getAddress();
- public void setAddress(Address address);
- public Set getFamily();
- public void setFamily(Set family);
-}
Added: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/interceptor/Address.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/interceptor/Address.java (rev 0)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/interceptor/Address.java 2011-02-03 12:16:49 UTC (rev 28965)
@@ -0,0 +1,18 @@
+package mapping.dynamicentity.interceptor;
+
+/**
+ * @author <a href="mailto:steve@hibernate.org">Steve Ebersole </a>
+ */
+public interface Address {
+ public Long getId();
+ public void setId(Long id);
+
+ public String getStreet();
+ public void setStreet(String street);
+
+ public String getCity();
+ public void setCity(String city);
+
+ public String getPostalCode();
+ public void setPostalCode(String postalCode);
+}
Added: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/interceptor/Company.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/interceptor/Company.java (rev 0)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/interceptor/Company.java 2011-02-03 12:16:49 UTC (rev 28965)
@@ -0,0 +1,11 @@
+package mapping.dynamicentity.interceptor;
+
+/**
+ * @author <a href="mailto:steve@hibernate.org">Steve Ebersole </a>
+ */
+public interface Company {
+ public Long getId();
+ public void setId(Long id);
+ public String getName();
+ public void setName(String name);
+}
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/interceptor/Customer.hbm.xml
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/interceptor/Customer.hbm.xml 2011-02-03 12:10:12 UTC (rev 28964)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/interceptor/Customer.hbm.xml 2011-02-03 12:16:49 UTC (rev 28965)
@@ -3,7 +3,7 @@
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping package="mapping.dynamicentity">
+<hibernate-mapping package="mapping.dynamicentity.interceptor">
<!--
Mapping the Customer and Company interfaces. Our custom Interceptor
Added: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/interceptor/Customer.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/interceptor/Customer.java (rev 0)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/interceptor/Customer.java 2011-02-03 12:16:49 UTC (rev 28965)
@@ -0,0 +1,9 @@
+package mapping.dynamicentity.interceptor;
+
+/**
+ * @author <a href="mailto:steve@hibernate.org">Steve Ebersole </a>
+ */
+public interface Customer extends Person {
+ public Company getCompany();
+ public void setCompany(Company company);
+}
Added: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/interceptor/Person.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/interceptor/Person.java (rev 0)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/interceptor/Person.java 2011-02-03 12:16:49 UTC (rev 28965)
@@ -0,0 +1,17 @@
+package mapping.dynamicentity.interceptor;
+
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:steve@hibernate.org">Steve Ebersole </a>
+ */
+public interface Person {
+ public Long getId();
+ public void setId(Long id);
+ public String getName();
+ public void setName(String name);
+ public Address getAddress();
+ public void setAddress(Address address);
+ public Set getFamily();
+ public void setFamily(Set family);
+}
Copied: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/tuplizer/Address.java (from rev 28039, trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/Address.java)
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/tuplizer/Address.java (rev 0)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/tuplizer/Address.java 2011-02-03 12:16:49 UTC (rev 28965)
@@ -0,0 +1,18 @@
+package mapping.dynamicentity.tuplizer;
+
+/**
+ * @author <a href="mailto:steve@hibernate.org">Steve Ebersole </a>
+ */
+public interface Address {
+ public Long getId();
+ public void setId(Long id);
+
+ public String getStreet();
+ public void setStreet(String street);
+
+ public String getCity();
+ public void setCity(String city);
+
+ public String getPostalCode();
+ public void setPostalCode(String postalCode);
+}
Copied: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/tuplizer/Company.java (from rev 28039, trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/Company.java)
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/tuplizer/Company.java (rev 0)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/tuplizer/Company.java 2011-02-03 12:16:49 UTC (rev 28965)
@@ -0,0 +1,11 @@
+package mapping.dynamicentity.tuplizer;
+
+/**
+ * @author <a href="mailto:steve@hibernate.org">Steve Ebersole </a>
+ */
+public interface Company {
+ public Long getId();
+ public void setId(Long id);
+ public String getName();
+ public void setName(String name);
+}
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/tuplizer/Customer.hbm.xml
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/tuplizer/Customer.hbm.xml 2011-02-03 12:10:12 UTC (rev 28964)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/tuplizer/Customer.hbm.xml 2011-02-03 12:16:49 UTC (rev 28965)
@@ -3,7 +3,7 @@
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping package="mapping.dynamicentity">
+<hibernate-mapping package="mapping.dynamicentity.tuplizer">
<!--
Mapping the Customer and Company interfaces. Our custom Interceptor
Copied: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/tuplizer/Customer.java (from rev 28039, trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/Customer.java)
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/tuplizer/Customer.java (rev 0)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/tuplizer/Customer.java 2011-02-03 12:16:49 UTC (rev 28965)
@@ -0,0 +1,9 @@
+package mapping.dynamicentity.tuplizer;
+
+/**
+ * @author <a href="mailto:steve@hibernate.org">Steve Ebersole </a>
+ */
+public interface Customer extends Person {
+ public Company getCompany();
+ public void setCompany(Company company);
+}
Copied: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/tuplizer/Person.java (from rev 28039, trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/Person.java)
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/tuplizer/Person.java (rev 0)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/res/project/src/mapping/dynamicentity/tuplizer/Person.java 2011-02-03 12:16:49 UTC (rev 28965)
@@ -0,0 +1,17 @@
+package mapping.dynamicentity.tuplizer;
+
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:steve@hibernate.org">Steve Ebersole </a>
+ */
+public interface Person {
+ public Long getId();
+ public void setId(Long id);
+ public String getName();
+ public void setName(String name);
+ public Address getAddress();
+ public void setAddress(Address address);
+ public Set getFamily();
+ public void setFamily(Set family);
+}
Added: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/BaseTestSetCase.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/BaseTestSetCase.java (rev 0)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/BaseTestSetCase.java 2011-02-03 12:16:49 UTC (rev 28965)
@@ -0,0 +1,136 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.hibernate.eclipse.console.test.mappingproject;
+
+import org.eclipse.jdt.core.IPackageFragment;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.hibernate.InvalidMappingException;
+import org.hibernate.cfg.Configuration;
+import org.hibernate.console.ConsoleConfiguration;
+import org.hibernate.console.KnownConfigurations;
+import org.hibernate.console.execution.ExecutionContext;
+import org.hibernate.eclipse.console.test.ConsoleTestMessages;
+import org.hibernate.eclipse.console.workbench.ConfigurationWorkbenchAdapter;
+import org.hibernate.eclipse.console.workbench.ConsoleConfigurationWorkbenchAdapter;
+import org.hibernate.eclipse.console.workbench.PersistentClassWorkbenchAdapter;
+import org.hibernate.eclipse.console.workbench.PropertyWorkbenchAdapter;
+
+import junit.framework.TestCase;
+
+/**
+ * @author vy (vyemialyanchyk(a)gmail.com)
+ */
+public class BaseTestSetCase extends TestCase {
+
+ protected int openEditors = 0;
+
+ protected String consoleConfigName = null;
+
+ protected IPackageFragment testPackage = null;
+
+ final static protected ConsoleConfigurationWorkbenchAdapter ccWorkbenchAdapter = new ConsoleConfigurationWorkbenchAdapter();
+
+ final static protected ConfigurationWorkbenchAdapter configWorkbenchAdapter = new ConfigurationWorkbenchAdapter();
+
+ final static protected PersistentClassWorkbenchAdapter pcWorkbenchAdapter = new PersistentClassWorkbenchAdapter();
+
+ final static protected PropertyWorkbenchAdapter propertyWorkbenchAdapter = new PropertyWorkbenchAdapter();
+
+ public BaseTestSetCase() {
+ }
+
+ public BaseTestSetCase(String name) {
+ super(name);
+ }
+
+ protected void setUp() throws Exception {
+ }
+
+ protected void tearDown() throws Exception {
+ consoleConfigName = null;
+ testPackage = null;
+ closeAllEditors();
+ }
+
+ public Object[] getPersistenceClasses(boolean resetCC) {
+ final ConsoleConfiguration consCFG = getConsoleConfig();
+ if (resetCC) {
+ consCFG.reset();
+ consCFG.build();
+ }
+ assertTrue(consCFG.hasConfiguration());
+ if (resetCC) {
+ consCFG.execute(new ExecutionContext.Command() {
+ public Object execute() {
+ if (consCFG.hasConfiguration()) {
+ consCFG.getConfiguration().buildMappings();
+ }
+ return consCFG;
+ }
+ });
+ }
+ Object[] configs = null;
+ Object[] persClasses = null;
+ try {
+ configs = ccWorkbenchAdapter.getChildren(consCFG);
+ assertNotNull(configs);
+ assertEquals(3, configs.length);
+ assertTrue(configs[0] instanceof Configuration);
+ persClasses = configWorkbenchAdapter.getChildren(configs[0]);
+ } catch (InvalidMappingException ex) {
+ String out = NLS.bind(ConsoleTestMessages.OpenMappingDiagramTest_mapping_diagrams_for_package_cannot_be_opened,
+ new Object[] { testPackage.getElementName(), ex.getMessage() });
+ fail(out);
+ }
+ return persClasses;
+ }
+
+ public ConsoleConfiguration getConsoleConfig() {
+ KnownConfigurations knownConfigurations = KnownConfigurations.getInstance();
+ final ConsoleConfiguration consCFG = knownConfigurations.find(consoleConfigName);
+ assertNotNull(consCFG);
+ return consCFG;
+ }
+
+ public String getConsoleConfigName() {
+ return consoleConfigName;
+ }
+
+ public void setConsoleConfigName(String consoleConfigName) {
+ this.consoleConfigName = consoleConfigName;
+ }
+
+ public IPackageFragment getTestPackage() {
+ return testPackage;
+ }
+
+ public void setTestPackage(IPackageFragment testPackage) {
+ this.testPackage = testPackage;
+ }
+
+ protected void closeAllEditors() {
+ final IWorkbenchWindow workbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+ if (workbenchWindow != null) {
+ final IWorkbenchPage workbenchPage = workbenchWindow.getActivePage();
+ if (workbenchPage != null) {
+ openEditors += workbenchPage.getEditorReferences().length;
+ workbenchPage.closeAllEditors(false);
+ }
+ }
+ // clean up event queue to avoid "memory leak",
+ // this is necessary to fix https://jira.jboss.org/jira/browse/JBIDE-4824
+ while (Display.getCurrent().readAndDispatch());
+ }
+}
Added: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/CheckConsoleConfigTest.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/CheckConsoleConfigTest.java (rev 0)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/CheckConsoleConfigTest.java 2011-02-03 12:16:49 UTC (rev 28965)
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.hibernate.eclipse.console.test.mappingproject;
+
+import org.hibernate.mapping.PersistentClass;
+
+/**
+ * @author vy (vyemialyanchyk(a)gmail.com)
+ */
+public class CheckConsoleConfigTest extends BaseTestSetCase {
+
+ public CheckConsoleConfigTest() {
+ }
+
+ public CheckConsoleConfigTest(String name) {
+ super(name);
+ }
+
+ public void testCheckConsoleConfiguration() {
+ Object[] persClasses = getPersistenceClasses(true);
+ assertTrue(persClasses.length > 0);
+ for (int i = 0; i < persClasses.length; i++) {
+ assertTrue(persClasses[i] instanceof PersistentClass);
+ }
+ }
+}
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/HbmExportExceptionTest.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/HbmExportExceptionTest.java 2011-02-03 12:10:12 UTC (rev 28964)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/HbmExportExceptionTest.java 2011-02-03 12:16:49 UTC (rev 28965)
@@ -13,21 +13,17 @@
import java.io.File;
import java.io.PrintWriter;
-import junit.framework.TestCase;
-
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.IPackageFragmentRoot;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.internal.core.PackageFragmentRoot;
import org.eclipse.osgi.util.NLS;
import org.hibernate.cfg.Configuration;
import org.hibernate.console.ConsoleConfiguration;
-import org.hibernate.console.KnownConfigurations;
import org.hibernate.console.execution.ExecutionContext;
import org.hibernate.eclipse.console.test.ConsoleTestMessages;
import org.hibernate.eclipse.console.test.project.ConfigurableTestProject;
@@ -42,11 +38,7 @@
*
*/
@SuppressWarnings("restriction")
-public class HbmExportExceptionTest extends TestCase {
-
- protected String consoleConfigName = null;
-
- protected IPackageFragment testPackage = null;
+public class HbmExportExceptionTest extends BaseTestSetCase {
protected ConfigurableTestProject testProject = null;
@@ -56,39 +48,22 @@
public HbmExportExceptionTest(String name) {
super(name);
}
-
- protected void setUp() throws Exception {
- }
protected void tearDown() throws Exception {
testProject = null;
- consoleConfigName = null;
- testPackage = null;
+ super.tearDown();
}
public void testHbmExportExceptionTest() throws Exception {
try {
- KnownConfigurations knownConfigurations = KnownConfigurations.getInstance();
- final ConsoleConfiguration consCFG = knownConfigurations.find(consoleConfigName);
- assertNotNull(consCFG);
- consCFG.reset();
- consCFG.build();
- assertTrue(consCFG.hasConfiguration());
- consCFG.execute( new ExecutionContext.Command() {
+ Object[] persClassesInit = getPersistenceClasses(false);
- public Object execute() {
- if(consCFG.hasConfiguration()) {
- consCFG.getConfiguration().buildMappings();
- }
- return consCFG;
- }
- } );
+ final ConsoleConfiguration consCFG = getConsoleConfig();
Configuration config = consCFG.getConfiguration();
-
//delete old hbm files
- assertNotNull( testPackage );
+ assertNotNull(testPackage);
int nDeleted = 0;
- if (testPackage.getNonJavaResources().length > 0){
+ if (testPackage.getNonJavaResources().length > 0) {
Object[] ress = testPackage.getNonJavaResources();
for (int i = 0; i < ress.length; i++) {
if (ress[i] instanceof IFile){
@@ -103,9 +78,8 @@
HibernateMappingGlobalSettings hmgs = new HibernateMappingGlobalSettings();
-
HibernateMappingExporter hce = new HibernateMappingExporter(config,
- getSrcFolder());
+ getSrcFolder());
hce.setGlobalSettings(hmgs);
try {
@@ -119,19 +93,17 @@
ConsoleConfigUtils.customizeCfgXmlForPack(testPackage);
assertNotNull(consCFG);
consCFG.reset();
-
- consCFG.build();
- assertTrue(consCFG.hasConfiguration());
- consCFG.execute( new ExecutionContext.Command() {
-
- public Object execute() {
- if(consCFG.hasConfiguration()) {
- consCFG.getConfiguration().buildMappings();
- }
- return consCFG;
+ consCFG.build();
+ assertTrue(consCFG.hasConfiguration());
+ consCFG.execute(new ExecutionContext.Command() {
+ public Object execute() {
+ if(consCFG.hasConfiguration()) {
+ consCFG.getConfiguration().buildMappings();
}
- } );
- config = consCFG.getConfiguration();
+ return consCFG;
+ }
+ });
+ config = consCFG.getConfiguration();
} catch (CoreException e) {
String out = NLS.bind(ConsoleTestMessages.UpdateConfigurationTest_error_customising_file_for_package,
new Object[] { ConsoleConfigUtils.CFG_FILE_NAME, testPackage.getPath(), e.getMessage() } );
@@ -141,11 +113,13 @@
throw (Exception)e.getCause();
}
//
+ Object[] persClassesReInit = getPersistenceClasses(false);
+ //
int nCreated = 0;
- if (testPackage.getNonJavaResources().length > 0){
+ if (testPackage.getNonJavaResources().length > 0) {
Object[] ress = testPackage.getNonJavaResources();
for (int i = 0; i < ress.length; i++) {
- if (ress[i] instanceof IFile){
+ if (ress[i] instanceof IFile) {
IFile res = (IFile)ress[i];
if (res.getName().endsWith(".hbm.xml")) { //$NON-NLS-1$
nCreated++;
@@ -154,7 +128,10 @@
}
}
//
- assert(nDeleted <= nCreated);
+ assertTrue(persClassesInit.length == persClassesReInit.length);
+ assertTrue(nCreated > 0);
+ assertTrue(nDeleted >= 0 && persClassesInit.length > 0);
+ assertTrue(nCreated <= persClassesInit.length);
} catch (Exception e){
String newMessage = "\nPackage " + testPackage.getElementName() + ":"; //$NON-NLS-1$ //$NON-NLS-2$
throw new WripperException(newMessage, e);
@@ -173,22 +150,6 @@
return packageFragmentRoot.getResource().getLocation().toFile();
}
- public String getConsoleConfigName() {
- return consoleConfigName;
- }
-
- public void setConsoleConfigName(String consoleConfigName) {
- this.consoleConfigName = consoleConfigName;
- }
-
- public IPackageFragment getTestPackage() {
- return testPackage;
- }
-
- public void setTestPackage(IPackageFragment testPackage) {
- this.testPackage = testPackage;
- }
-
public ConfigurableTestProject getTestProject() {
return testProject;
}
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/MappingTestsAnnotations.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/MappingTestsAnnotations.java 2011-02-03 12:10:12 UTC (rev 28964)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/MappingTestsAnnotations.java 2011-02-03 12:16:49 UTC (rev 28965)
@@ -43,7 +43,7 @@
projName, File.separator + projName + File.separator + annotationsMarkerCfgXml);
}
- static final String annotationsMarkerStr = TestProject.SRC_FOLDER + File.separator + "annotations"; //$NON-NLS-1$
+ public static final String annotationsMarkerStr = TestProject.SRC_FOLDER + File.separator + "annotations"; //$NON-NLS-1$
public static final FileFilter filterFoldersAnnotations = new FileFilter() {
public boolean accept(File f) {
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/MappingTestsJpa.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/MappingTestsJpa.java 2011-02-03 12:10:12 UTC (rev 28964)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/MappingTestsJpa.java 2011-02-03 12:16:49 UTC (rev 28965)
@@ -35,8 +35,8 @@
testProject.getIProject().getName(), "PetClinic"); //$NON-NLS-1$
}
- static final String jpaMarkerStr = TestProject.SRC_FOLDER + File.separator + "jpa"; //$NON-NLS-1$
- static final String jpaMarkerMetaInf = TestProject.SRC_FOLDER + File.separator + "meta-inf"; //$NON-NLS-1$
+ public static final String jpaMarkerStr = TestProject.SRC_FOLDER + File.separator + "jpa"; //$NON-NLS-1$
+ public static final String jpaMarkerMetaInf = TestProject.SRC_FOLDER + File.separator + "meta-inf"; //$NON-NLS-1$
public static final FileFilter filterFoldersJpa = new FileFilter() {
public boolean accept(File f) {
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenMappingDiagramTest.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenMappingDiagramTest.java 2011-02-03 12:10:12 UTC (rev 28964)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenMappingDiagramTest.java 2011-02-03 12:16:49 UTC (rev 28965)
@@ -10,24 +10,12 @@
******************************************************************************/
package org.hibernate.eclipse.console.test.mappingproject;
-import junit.framework.TestCase;
-
-import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.hibernate.InvalidMappingException;
-import org.hibernate.cfg.Configuration;
import org.hibernate.console.ConsoleConfiguration;
-import org.hibernate.console.KnownConfigurations;
import org.hibernate.eclipse.console.test.ConsoleTestMessages;
import org.hibernate.eclipse.console.test.utils.Utils;
-import org.hibernate.eclipse.console.workbench.ConfigurationWorkbenchAdapter;
-import org.hibernate.eclipse.console.workbench.ConsoleConfigurationWorkbenchAdapter;
import org.hibernate.mapping.PersistentClass;
import org.jboss.tools.hibernate.ui.view.OpenDiagramActionDelegate;
@@ -35,99 +23,38 @@
* @author Dmitry Geraskov
*
*/
-public class OpenMappingDiagramTest extends TestCase {
+public class OpenMappingDiagramTest extends BaseTestSetCase {
- protected String consoleConfigName = null;
-
- protected IPackageFragment testPackage = null;
-
- protected int openEditors = 0;
-
public OpenMappingDiagramTest() {
}
public OpenMappingDiagramTest(String name) {
super(name);
}
-
- protected void setUp() throws Exception {
- }
- protected void tearDown() throws Exception {
- consoleConfigName = null;
- testPackage = null;
- closeAllEditors();
- }
-
public void testOpenMappingDiagram() {
- KnownConfigurations knownConfigurations = KnownConfigurations.getInstance();
- final ConsoleConfiguration consCFG = knownConfigurations.find(consoleConfigName);
- assertNotNull(consCFG);
- consCFG.reset();
- Object[] configs = null;
- Object[] persClasses = null;
- try {
- configs = new ConsoleConfigurationWorkbenchAdapter().getChildren(consCFG);
- assertTrue(configs[0] instanceof Configuration);
- persClasses = new ConfigurationWorkbenchAdapter().getChildren(configs[0]);
- } catch (InvalidMappingException ex){
- String out = NLS.bind(ConsoleTestMessages.OpenMappingDiagramTest_mapping_diagrams_for_package_cannot_be_opened,
- new Object[]{testPackage.getElementName(), ex.getMessage()});
- fail(out);
- }
+ final Object[] persClasses = getPersistenceClasses(false);
+ final ConsoleConfiguration consCFG = getConsoleConfig();
+ for (int i = 0; i < persClasses.length; i++) {
+ assertTrue(persClasses[i] instanceof PersistentClass);
+ PersistentClass persClass = (PersistentClass) persClasses[i];
- if (persClasses.length > 0){
- for (int i = 0; i < persClasses.length; i++) {
- assertTrue(persClasses[i] instanceof PersistentClass);
- PersistentClass persClass = (PersistentClass) persClasses[i];
-
- IEditorPart editor = null;
- Throwable ex = null;
- try {
- editor = new OpenDiagramActionDelegate().openEditor(persClass, consCFG);
- } catch (PartInitException e) {
- ex = e;
- }
- if (ex == null ) {
- ex = Utils.getExceptionIfItOccured(editor);
- }
- if (ex != null) {
- String out = NLS.bind(ConsoleTestMessages.OpenMappingDiagramTest_mapping_diagram_for_not_opened,
- new Object[]{persClass.getClassName(), ex.getMessage()});
- fail(out);
- }
+ IEditorPart editor = null;
+ Throwable ex = null;
+ try {
+ editor = new OpenDiagramActionDelegate().openEditor(persClass, consCFG);
+ } catch (PartInitException e) {
+ ex = e;
}
+ if (ex == null ) {
+ ex = Utils.getExceptionIfItOccured(editor);
+ }
+ if (ex != null) {
+ String out = NLS.bind(ConsoleTestMessages.OpenMappingDiagramTest_mapping_diagram_for_not_opened,
+ new Object[]{persClass.getClassName(), ex.getMessage()});
+ fail(out);
+ }
}
//close all editors
}
-
- public String getConsoleConfigName() {
- return consoleConfigName;
- }
-
- public void setConsoleConfigName(String consoleConfigName) {
- this.consoleConfigName = consoleConfigName;
- }
-
- public IPackageFragment getTestPackage() {
- return testPackage;
- }
-
- public void setTestPackage(IPackageFragment testPackage) {
- this.testPackage = testPackage;
- }
-
- protected void closeAllEditors() {
- final IWorkbenchWindow workbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if (workbenchWindow != null) {
- final IWorkbenchPage workbenchPage = workbenchWindow.getActivePage();
- if (workbenchPage != null) {
- openEditors += workbenchPage.getEditorReferences().length;
- workbenchPage.closeAllEditors(false);
- }
- }
- // clean up event queue to avoid "memory leak",
- // this is necessary to fix https://jira.jboss.org/jira/browse/JBIDE-4824
- while (Display.getCurrent().readAndDispatch());
- }
}
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenMappingFileTest.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenMappingFileTest.java 2011-02-03 12:10:12 UTC (rev 28964)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenMappingFileTest.java 2011-02-03 12:16:49 UTC (rev 28965)
@@ -12,28 +12,14 @@
import java.io.FileNotFoundException;
-import junit.framework.TestCase;
-
-import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.hibernate.InvalidMappingException;
-import org.hibernate.cfg.Configuration;
import org.hibernate.console.ConsoleConfiguration;
-import org.hibernate.console.KnownConfigurations;
import org.hibernate.eclipse.console.actions.OpenMappingAction;
import org.hibernate.eclipse.console.test.ConsoleTestMessages;
import org.hibernate.eclipse.console.test.utils.Utils;
-import org.hibernate.eclipse.console.workbench.ConfigurationWorkbenchAdapter;
-import org.hibernate.eclipse.console.workbench.ConsoleConfigurationWorkbenchAdapter;
-import org.hibernate.eclipse.console.workbench.PersistentClassWorkbenchAdapter;
-import org.hibernate.eclipse.console.workbench.PropertyWorkbenchAdapter;
import org.hibernate.mapping.PersistentClass;
import org.hibernate.mapping.Property;
@@ -41,71 +27,40 @@
* @author Dmitry Geraskov
*
*/
-public class OpenMappingFileTest extends TestCase {
+public class OpenMappingFileTest extends BaseTestSetCase {
- protected String consoleConfigName = null;
-
- protected IPackageFragment testPackage = null;
-
- protected int openEditors = 0;
-
public OpenMappingFileTest() {
}
public OpenMappingFileTest(String name) {
super(name);
}
-
- protected void setUp() throws Exception {
- }
- protected void tearDown() throws Exception {
- consoleConfigName = null;
- testPackage = null;
- closeAllEditors();
- }
-
public void testOpenMappingFileTest() {
- KnownConfigurations knownConfigurations = KnownConfigurations.getInstance();
- final ConsoleConfiguration consCFG = knownConfigurations.find(consoleConfigName);
- assertNotNull(consCFG);
- consCFG.reset();
- Object[] configs = null;
- Object[] persClasses = null;
- Object[] props = null;
- try {
- configs = new ConsoleConfigurationWorkbenchAdapter().getChildren(consCFG);
- assertTrue(configs[0] instanceof Configuration);
- persClasses = new ConfigurationWorkbenchAdapter().getChildren(configs[0]);
- } catch (InvalidMappingException ex){
- String out = NLS.bind(ConsoleTestMessages.OpenMappingFileTest_mapping_files_for_package_cannot_be_opened,
- new Object[]{testPackage.getElementName(), ex.getMessage()});
- fail(out);
- }
- if (persClasses.length > 0) {
- final String testClass = "class"; //$NON-NLS-1$
- for (int i = 0; i < persClasses.length; i++) {
- assertTrue(persClasses[i] instanceof PersistentClass);
- PersistentClass persClass = (PersistentClass) persClasses[i];
- openTest(persClass, consCFG);
- props = new PersistentClassWorkbenchAdapter().getChildren(persClass);
- for (int j = 0; j < props.length; j++) {
- if (props[j].getClass() != Property.class) {
+ final Object[] persClasses = getPersistenceClasses(false);
+ final ConsoleConfiguration consCFG = getConsoleConfig();
+ final String testClass = "class"; //$NON-NLS-1$
+ for (int i = 0; i < persClasses.length; i++) {
+ assertTrue(persClasses[i] instanceof PersistentClass);
+ PersistentClass persClass = (PersistentClass) persClasses[i];
+ openTest(persClass, consCFG);
+ Object[] props = pcWorkbenchAdapter.getChildren(persClass);
+ for (int j = 0; j < props.length; j++) {
+ if (props[j].getClass() != Property.class) {
+ continue;
+ }
+ openTest(props[j], consCFG);
+ Object[] compProperties = propertyWorkbenchAdapter.getChildren(props[j]);
+ for (int k = 0; k < compProperties.length; k++) {
+ //test Composite properties
+ if (compProperties[k].getClass() != Property.class) {
continue;
}
- openTest(props[j], consCFG);
- Object[] compProperties = new PropertyWorkbenchAdapter().getChildren(props[j]);
- for (int k = 0; k < compProperties.length; k++) {
- //test Composite properties
- if (compProperties[k].getClass() != Property.class) {
- continue;
- }
- final Property prop = (Property)compProperties[k];
- if (testClass.equals(prop.getNodeName()) || testClass.equals(prop.getName())) {
- continue;
- }
- openPropertyTest((Property)compProperties[k], (Property) props[j], consCFG);
+ final Property prop = (Property)compProperties[k];
+ if (testClass.equals(prop.getNodeName()) || testClass.equals(prop.getName())) {
+ continue;
}
+ openPropertyTest((Property)compProperties[k], (Property) props[j], consCFG);
}
}
}
@@ -123,7 +78,7 @@
new Object[]{compositeProperty.getNodeName(), testPackage.getElementName()});
fail(out);
}
- Object[] compProperties = new PropertyWorkbenchAdapter().getChildren(compositeProperty);
+ Object[] compProperties = propertyWorkbenchAdapter.getChildren(compositeProperty);
for (int k = 0; k < compProperties.length; k++) {
//test Composite properties
assertTrue(compProperties[k] instanceof Property);
@@ -174,34 +129,4 @@
fail(out);
}
}
-
- public String getConsoleConfigName() {
- return consoleConfigName;
- }
-
- public void setConsoleConfigName(String consoleConfigName) {
- this.consoleConfigName = consoleConfigName;
- }
-
- public IPackageFragment getTestPackage() {
- return testPackage;
- }
-
- public void setTestPackage(IPackageFragment testPackage) {
- this.testPackage = testPackage;
- }
-
- protected void closeAllEditors() {
- final IWorkbenchWindow workbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if (workbenchWindow != null) {
- final IWorkbenchPage workbenchPage = workbenchWindow.getActivePage();
- if (workbenchPage != null) {
- openEditors += workbenchPage.getEditorReferences().length;
- workbenchPage.closeAllEditors(false);
- }
- }
- // clean up event queue to avoid "memory leak",
- // this is necessary to fix https://jira.jboss.org/jira/browse/JBIDE-4824
- while (Display.getCurrent().readAndDispatch());
- }
}
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenSourceFileTest.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenSourceFileTest.java 2011-02-03 12:10:12 UTC (rev 28964)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenSourceFileTest.java 2011-02-03 12:16:49 UTC (rev 28965)
@@ -12,28 +12,14 @@
import java.io.FileNotFoundException;
-import junit.framework.TestCase;
-
-import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.hibernate.InvalidMappingException;
-import org.hibernate.cfg.Configuration;
import org.hibernate.console.ConsoleConfiguration;
-import org.hibernate.console.KnownConfigurations;
import org.hibernate.eclipse.console.actions.OpenSourceAction;
import org.hibernate.eclipse.console.test.ConsoleTestMessages;
import org.hibernate.eclipse.console.test.utils.Utils;
-import org.hibernate.eclipse.console.workbench.ConfigurationWorkbenchAdapter;
-import org.hibernate.eclipse.console.workbench.ConsoleConfigurationWorkbenchAdapter;
-import org.hibernate.eclipse.console.workbench.PersistentClassWorkbenchAdapter;
-import org.hibernate.eclipse.console.workbench.PropertyWorkbenchAdapter;
import org.hibernate.mapping.Component;
import org.hibernate.mapping.PersistentClass;
import org.hibernate.mapping.Property;
@@ -42,75 +28,44 @@
* @author Dmitry Geraskov
*
*/
-public class OpenSourceFileTest extends TestCase {
+public class OpenSourceFileTest extends BaseTestSetCase {
- protected String consoleConfigName = null;
-
- protected IPackageFragment testPackage = null;
-
- protected int openEditors = 0;
-
public OpenSourceFileTest() {
}
public OpenSourceFileTest(String name) {
super(name);
}
-
- protected void setUp() throws Exception {
- }
- protected void tearDown() throws Exception {
- consoleConfigName = null;
- testPackage = null;
- closeAllEditors();
- }
-
public void testOpenSourceFileTest() {
//fail("test fail");
- KnownConfigurations knownConfigurations = KnownConfigurations.getInstance();
- final ConsoleConfiguration consCFG = knownConfigurations.find(consoleConfigName);
- assertNotNull(consCFG);
- consCFG.reset();
- Object[] configs = null;
- Object[] persClasses = null;
- Object[] fields = null;
- try {
- configs = new ConsoleConfigurationWorkbenchAdapter().getChildren(consCFG);
- assertTrue(configs[0] instanceof Configuration);
- persClasses = new ConfigurationWorkbenchAdapter().getChildren(configs[0]);
- } catch (InvalidMappingException ex) {
- String out = NLS.bind(ConsoleTestMessages.OpenSourceFileTest_source_files_for_package_cannot_be_opened,
- testPackage.getElementName(), ex.getMessage());
- fail(out);
- }
- if (persClasses.length > 0) {
- for (int i = 0; i < persClasses.length; i++) {
- assertTrue(persClasses[0] instanceof PersistentClass);
- PersistentClass persClass = (PersistentClass) persClasses[i];
- String fullyQualifiedName = persClass.getClassName();
- // test PersistentClasses
- openTest(persClass, consCFG, fullyQualifiedName);
- fields = new PersistentClassWorkbenchAdapter().getChildren(persClass);
- for (int j = 0; j < fields.length; j++) {
- if (fields[j].getClass() != Property.class) {
- continue;
- }
- fullyQualifiedName = persClass.getClassName();
- // test Properties
- openTest(fields[j], consCFG, fullyQualifiedName);
- if (fields[j] instanceof Property
- && ((Property)fields[j]).isComposite()) {
- fullyQualifiedName =((Component)((Property) fields[j]).getValue()).getComponentClassName();
+ final Object[] persClasses = getPersistenceClasses(false);
+ final ConsoleConfiguration consCFG = getConsoleConfig();
+ for (int i = 0; i < persClasses.length; i++) {
+ assertTrue(persClasses[i] instanceof PersistentClass);
+ PersistentClass persClass = (PersistentClass) persClasses[i];
+ String fullyQualifiedName = persClass.getClassName();
+ // test PersistentClasses
+ openTest(persClass, consCFG, fullyQualifiedName);
+ Object[] fields = pcWorkbenchAdapter.getChildren(persClass);
+ for (int j = 0; j < fields.length; j++) {
+ if (fields[j].getClass() != Property.class) {
+ continue;
+ }
+ fullyQualifiedName = persClass.getClassName();
+ // test Properties
+ openTest(fields[j], consCFG, fullyQualifiedName);
+ if (fields[j] instanceof Property
+ && ((Property)fields[j]).isComposite()) {
+ fullyQualifiedName =((Component)((Property) fields[j]).getValue()).getComponentClassName();
- Object[] compProperties = new PropertyWorkbenchAdapter().getChildren(fields[j]);
- for (int k = 0; k < compProperties.length; k++) {
- if (compProperties[k].getClass() != Property.class) {
- continue;
- }
- //test Composite properties
- openTest(compProperties[k], consCFG, fullyQualifiedName);
+ Object[] compProperties = propertyWorkbenchAdapter.getChildren(fields[j]);
+ for (int k = 0; k < compProperties.length; k++) {
+ if (compProperties[k].getClass() != Property.class) {
+ continue;
}
+ //test Composite properties
+ openTest(compProperties[k], consCFG, fullyQualifiedName);
}
}
}
@@ -139,41 +94,13 @@
} catch (FileNotFoundException e) {
ex = e;
}
- if (ex == null ) ex = Utils.getExceptionIfItOccured(editor);
+ if (ex == null ) {
+ ex = Utils.getExceptionIfItOccured(editor);
+ }
if (ex != null) {
String out = NLS.bind(ConsoleTestMessages.OpenSourceFileTest_mapping_file_for_not_opened,
fullyQualifiedName/*.getClassName()*/, ex.getMessage());
fail(out);
}
}
-
- public String getConsoleConfigName() {
- return consoleConfigName;
- }
-
- public void setConsoleConfigName(String consoleConfigName) {
- this.consoleConfigName = consoleConfigName;
- }
-
- public IPackageFragment getTestPackage() {
- return testPackage;
- }
-
- public void setTestPackage(IPackageFragment testPackage) {
- this.testPackage = testPackage;
- }
-
- protected void closeAllEditors() {
- final IWorkbenchWindow workbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if (workbenchWindow != null) {
- final IWorkbenchPage workbenchPage = workbenchWindow.getActivePage();
- if (workbenchPage != null) {
- openEditors += workbenchPage.getEditorReferences().length;
- workbenchPage.closeAllEditors(false);
- }
- }
- // clean up event queue to avoid "memory leak",
- // this is necessary to fix https://jira.jboss.org/jira/browse/JBIDE-4824
- while (Display.getCurrent().readAndDispatch());
- }
}
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/TestSet.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/TestSet.java 2011-02-03 12:10:12 UTC (rev 28964)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/TestSet.java 2011-02-03 12:16:49 UTC (rev 28965)
@@ -47,7 +47,13 @@
test4.setConsoleConfigName(consoleConfigName);
test4.setTestPackage(testPackage);
/**/
+ CheckConsoleConfigTest test0 = new CheckConsoleConfigTest("testCheckConsoleConfiguration"); //$NON-NLS-1$
+ test0.setConsoleConfigName(consoleConfigName);
+ test0.setTestPackage(testPackage);
//
+ // CheckConsoleConfigTest should be a first test in the suite array,
+ // cause it build Hibernate Console Configuration for testing
+ suite.addTest(test0);
/**/
suite.addTest(test4);
suite.addTest(test2);
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/project/ConfigurableTestProject.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/project/ConfigurableTestProject.java 2011-02-03 12:10:12 UTC (rev 28964)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/project/ConfigurableTestProject.java 2011-02-03 12:16:49 UTC (rev 28965)
@@ -13,17 +13,24 @@
import java.io.File;
import java.io.FileFilter;
import java.io.IOException;
+import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.IPackageFragmentRoot;
import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.osgi.util.NLS;
+import org.hibernate.eclipse.HibernatePlugin;
+import org.hibernate.eclipse.console.test.ConsoleTestMessages;
import org.hibernate.eclipse.console.test.mappingproject.Customization;
+import org.hibernate.eclipse.console.test.mappingproject.MappingTestsAnnotations;
+import org.hibernate.eclipse.console.test.mappingproject.MappingTestsJpa;
import org.hibernate.eclipse.console.test.utils.FilesTransfer;
/**
@@ -35,6 +42,7 @@
public static final String RESOURCE_SRC_PATH = "res/project/src/".replaceAll("//", File.separator); //$NON-NLS-1$ //$NON-NLS-2$
public static final String RESOURCE_LIB_PATH = "res/project/lib/".replaceAll("//", File.separator); //$NON-NLS-1$ //$NON-NLS-2$
+ public static final String HIBERNATE_PLUGIN_LIB_PATH = "lib"; //$NON-NLS-1$
protected ArrayList<String> foldersList = new ArrayList<String>();
@@ -53,6 +61,9 @@
long startCopyLibs = System.currentTimeMillis();
final File libFolder = getFolder(RESOURCE_LIB_PATH);
List<IPath> libs = copyLibs(libFolder);
+ final File libFolderHibernatePlugin = getHibernatePluginFolder(HIBERNATE_PLUGIN_LIB_PATH);
+ List<IPath> libsHibernatePlugin = copyLibs(libFolderHibernatePlugin);
+ libs.addAll(libsHibernatePlugin);
long startBuild = System.currentTimeMillis();
generateClassPath(libs, sourcePackageFragment);
fullBuild();
@@ -64,6 +75,18 @@
System.out.println("build: " + ( ( stopBuild - startBuild ) / 1000 )); //$NON-NLS-1$
}
}
+
+ protected File getHibernatePluginFolder(String path) throws IOException {
+ URL entry = HibernatePlugin.getDefault().getBundle().getEntry(path);
+ URL resProject = FileLocator.resolve(entry);
+ String resolvePath = FileLocator.resolve(resProject).getFile();
+ File folder = new File(resolvePath);
+ if (!folder.exists()) {
+ String out = NLS.bind(ConsoleTestMessages.MappingTestProject_folder_not_found, path);
+ throw new RuntimeException(out);
+ }
+ return folder;
+ }
public void restartTestFolders() {
activePackage = -1;
@@ -119,8 +142,17 @@
return true;
}
+ public static final FileFilter filterFoldersOnlyCore = new FileFilter() {
+ public boolean accept(File f) {
+ return f.exists() && f.isDirectory() && !f.isHidden() &&
+ (!f.getAbsolutePath().toLowerCase().contains(MappingTestsAnnotations.annotationsMarkerStr)) &&
+ (!f.getAbsolutePath().toLowerCase().contains(MappingTestsJpa.jpaMarkerStr)) &&
+ (!f.getAbsolutePath().toLowerCase().contains(MappingTestsJpa.jpaMarkerMetaInf));
+ }
+ };
+
public boolean createTestFoldersList() {
- return createTestFoldersList(FilesTransfer.filterFilesJava, FilesTransfer.filterFolders);
+ return createTestFoldersList(FilesTransfer.filterFilesJava, filterFoldersOnlyCore);
}
public boolean useAllSources() {
13 years, 11 months
JBoss Tools SVN: r28964 - 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: 2011-02-03 07:10:12 -0500 (Thu, 03 Feb 2011)
New Revision: 28964
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ImageFilterPage.java
Log:
[JBIDE-8187] added capability to filter for instance alias
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ImageFilterPage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ImageFilterPage.java 2011-02-03 11:54:41 UTC (rev 28963)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ImageFilterPage.java 2011-02-03 12:10:12 UTC (rev 28964)
@@ -25,6 +25,7 @@
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.jboss.tools.deltacloud.core.DeltaCloud;
+import org.jboss.tools.deltacloud.core.ICloudElementFilter;
import org.jboss.tools.deltacloud.ui.SWTImagesFactory;
/**
@@ -43,18 +44,18 @@
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 DEFAULT_LABEL = "DefaultButton.label"; //$NON-NLS-1$
-
+
private DeltaCloud cloud;
private Text nameText;
private Text idText;
private Text archText;
private Text descText;
-
+
private Button defaultName;
private Button defaultId;
private Button defaultArch;
private Button defaultDesc;
-
+
public ImageFilterPage(DeltaCloud cloud) {
super(WizardMessages.getString(NAME));
this.cloud = cloud;
@@ -63,23 +64,23 @@
setImageDescriptor(SWTImagesFactory.DESC_DELTA_LARGE);
setPageComplete(false);
}
-
+
public String getNameRule() {
return nameText.getText();
}
-
+
public String getIdRule() {
return idText.getText();
}
-
+
public String getArchRule() {
return archText.getText();
}
-
+
public String getDescRule() {
return descText.getText();
}
-
+
private ModifyListener Listener = new ModifyListener() {
@Override
@@ -88,32 +89,45 @@
validate();
}
};
-
+
private SelectionAdapter ButtonListener = new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
- Button b = (Button)e.widget;
- if (b == defaultName)
- nameText.setText("*"); //$NON-NLS-1$
- else if (b == defaultId)
- idText.setText("*"); //$NON-NLS-1$
- else if (b == defaultArch)
- archText.setText("*"); //$NON-NLS-1$
- else if (b == defaultDesc)
- descText.setText("*"); //$NON-NLS-1$
+ Button b = (Button) e.widget;
+ Text text = getTextWidget(b);
+ if (text != null) {
+ text.setText(ICloudElementFilter.ALL_MATCHER_EXPRESSION);
+ }
}
-
+
+ private Text getTextWidget(Button button) {
+ Text text = null;
+ if (button == defaultName) {
+ text = nameText;
+ }
+ else if (button == defaultId) {
+ text = idText;
+ }
+ else if (button == defaultArch) {
+ text = archText;
+ }
+ else if (button == defaultDesc) {
+ text = descText;
+ }
+ return text;
+ }
+
};
-
+
private void validate() {
boolean complete = true;
boolean error = false;
-
+
if (nameText.getText().length() == 0 ||
idText.getText().length() == 0 ||
archText.getText().length() == 0 ||
descText.getText().length() == 0) {
-
+
setErrorMessage(WizardMessages.getString(EMPTY_RULE));
error = true;
} else if (nameText.getText().contains(";") ||
@@ -123,7 +137,7 @@
setErrorMessage(WizardMessages.getString(INVALID_SEMICOLON));
error = true;
}
-
+
if (!error)
setErrorMessage(null);
setPageComplete(complete && !error);
@@ -135,18 +149,18 @@
FormLayout layout = new FormLayout();
layout.marginHeight = 5;
layout.marginWidth = 5;
- container.setLayout(layout);
+ container.setLayout(layout);
Label label = new Label(container, SWT.NULL);
label.setText(WizardMessages.getString(FILTER_LABEL));
-
+
Label nameLabel = new Label(container, SWT.NULL);
nameLabel.setText(WizardMessages.getString(NAME_LABEL));
-
+
nameText = new Text(container, SWT.BORDER | SWT.SINGLE);
nameText.setText(cloud.getImageFilter().getNameRule().toString());
nameText.addModifyListener(Listener);
-
+
defaultName = new Button(container, SWT.NULL);
defaultName.setText(WizardMessages.getString(DEFAULT_LABEL));
defaultName.addSelectionListener(ButtonListener);
@@ -164,11 +178,11 @@
Label archLabel = new Label(container, SWT.NULL);
archLabel.setText(WizardMessages.getString(ARCH_LABEL));
-
+
archText = new Text(container, SWT.BORDER | SWT.SINGLE);
archText.setText(cloud.getImageFilter().getArchRule().toString());
archText.addModifyListener(Listener);
-
+
defaultArch = new Button(container, SWT.NULL);
defaultArch.setText(WizardMessages.getString(DEFAULT_LABEL));
defaultArch.addSelectionListener(ButtonListener);
@@ -179,7 +193,7 @@
descText = new Text(container, SWT.BORDER | SWT.SINGLE);
descText.setText(cloud.getImageFilter().getDescRule().toString());
descText.addModifyListener(Listener);
-
+
defaultDesc = new Button(container, SWT.NULL);
defaultDesc.setText(WizardMessages.getString(DEFAULT_LABEL));
defaultDesc.addSelectionListener(ButtonListener);
@@ -193,28 +207,28 @@
FormData f = new FormData();
f.top = new FormAttachment(0);
label.setLayoutData(f);
-
+
f = new FormData();
f.top = new FormAttachment(label, 11 + centering + centering2);
f.left = new FormAttachment(0, 0);
nameLabel.setLayoutData(f);
-
+
f = new FormData();
f.top = new FormAttachment(label, 11);
f.right = new FormAttachment(100);
defaultName.setLayoutData(f);
-
+
f = new FormData();
f.top = new FormAttachment(label, 11 + centering2);
f.left = new FormAttachment(archLabel, 5);
f.right = new FormAttachment(defaultName, -10);
nameText.setLayoutData(f);
-
+
f = new FormData();
f.top = new FormAttachment(nameLabel, 11 + centering + centering2);
f.left = new FormAttachment(0, 0);
idLabel.setLayoutData(f);
-
+
f = new FormData();
f.top = new FormAttachment(nameLabel, 11);
f.right = new FormAttachment(100);
@@ -230,7 +244,7 @@
f.top = new FormAttachment(idLabel, 11 + centering + centering2);
f.left = new FormAttachment(0, 0);
archLabel.setLayoutData(f);
-
+
f = new FormData();
f.top = new FormAttachment(idLabel, 11);
f.right = new FormAttachment(100);
@@ -241,12 +255,12 @@
f.left = new FormAttachment(archLabel, 5);
f.right = new FormAttachment(defaultArch, -10);
archText.setLayoutData(f);
-
+
f = new FormData();
f.top = new FormAttachment(archLabel, 11 + centering + centering2);
f.left = new FormAttachment(0, 0);
descLabel.setLayoutData(f);
-
+
f = new FormData();
f.top = new FormAttachment(archLabel, 11);
f.right = new FormAttachment(100);
13 years, 11 months
JBoss Tools SVN: r28963 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-02-03 06:54:41 -0500 (Thu, 03 Feb 2011)
New Revision: 28963
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/InstanceFilter.java
Log:
[JBIDE-8321]
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/InstanceFilter.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/InstanceFilter.java 2011-02-03 11:34:39 UTC (rev 28962)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/InstanceFilter.java 2011-02-03 11:54:41 UTC (rev 28963)
@@ -24,10 +24,10 @@
private IFieldMatcher aliasRule;
private IFieldMatcher imageIdRule;
- private IFieldMatcher realmRule;
- private IFieldMatcher profileRule;
private IFieldMatcher ownerIdRule;
private IFieldMatcher keyNameRule;
+ private IFieldMatcher realmRule;
+ private IFieldMatcher profileRule;
public InstanceFilter(DeltaCloud cloud) {
this(new AllMatcher(), new AllMatcher(), new AllMatcher(), new AllMatcher(), new AllMatcher(),
@@ -35,11 +35,10 @@
}
public InstanceFilter(IFieldMatcher nameMatcher, IFieldMatcher idMatcher, IFieldMatcher aliasMatcher,
- IFieldMatcher imageIdMatcher, IFieldMatcher realmMatcher, IFieldMatcher profileMatcher,
- IFieldMatcher ownerIdMatcher, IFieldMatcher keyMatcher, DeltaCloud cloud) {
+ IFieldMatcher imageIdMatcher, IFieldMatcher ownerIdMatcher, IFieldMatcher keyMatcher,
+ IFieldMatcher realmMatcher, IFieldMatcher profileMatcher, DeltaCloud cloud) {
super(nameMatcher, idMatcher, cloud);
- setRules(aliasMatcher, imageIdMatcher, realmMatcher, profileMatcher, ownerIdMatcher,
- keyMatcher);
+ setRules(aliasMatcher, imageIdMatcher, ownerIdMatcher, keyMatcher, realmMatcher, profileMatcher);
}
public InstanceFilter(String rulesString, DeltaCloud cloud) {
@@ -67,12 +66,12 @@
createRule(realmRule), createRule(profileRule));
}
- private void setRules(IFieldMatcher aliasMatcher, IFieldMatcher imageIdMatcher, IFieldMatcher realmMatcher,
- IFieldMatcher profileMatcher, IFieldMatcher ownerIdMatcher, IFieldMatcher keyNameMatcher) {
+ private void setRules(IFieldMatcher aliasMatcher, IFieldMatcher imageIdMatcher, IFieldMatcher ownerIdMatcher,
+ IFieldMatcher keyNameMatcher, IFieldMatcher realmMatcher, IFieldMatcher profileMatcher) {
this.aliasRule = aliasMatcher;
this.imageIdRule = imageIdMatcher;
- this.ownerIdRule = ownerIdMatcher;
this.keyNameRule = keyNameMatcher;
+ this.ownerIdRule = ownerIdMatcher;
this.realmRule = realmMatcher;
this.profileRule = profileMatcher;
}
13 years, 11 months
JBoss Tools SVN: r28962 - 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: 2011-02-03 06:34:39 -0500 (Thu, 03 Feb 2011)
New Revision: 28962
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/InstanceFilterPage.java
Log:
[JBIDE-8321]
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/InstanceFilterPage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/InstanceFilterPage.java 2011-02-03 11:09:00 UTC (rev 28961)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/InstanceFilterPage.java 2011-02-03 11:34:39 UTC (rev 28962)
@@ -246,7 +246,7 @@
Label realmLabel = createRuleLabel(WizardMessages.getString(REALM_LABEL), container);
GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.CENTER).applyTo(realmLabel);
- this.realmText = createRuleText(filter.getKeyNameRule(), container);
+ this.realmText = createRuleText(filter.getRealmRule(), container);
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).applyTo(realmText);
this.defaultRealm = createDefaultRuleButton(container);
GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(defaultRealm);
13 years, 11 months
JBoss Tools SVN: r28961 - trunk/jst/plugins/org.jboss.tools.jst.web.tiles.ui/src/org/jboss/tools/jst/web/tiles/ui/editor.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-02-03 06:09:00 -0500 (Thu, 03 Feb 2011)
New Revision: 28961
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.tiles.ui/src/org/jboss/tools/jst/web/tiles/ui/editor/TilesCompoundEditor.java
Log:
JBIDE-8316
https://issues.jboss.org/browse/JBIDE-8316
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.tiles.ui/src/org/jboss/tools/jst/web/tiles/ui/editor/TilesCompoundEditor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.tiles.ui/src/org/jboss/tools/jst/web/tiles/ui/editor/TilesCompoundEditor.java 2011-02-03 10:59:00 UTC (rev 28960)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.tiles.ui/src/org/jboss/tools/jst/web/tiles/ui/editor/TilesCompoundEditor.java 2011-02-03 11:09:00 UTC (rev 28961)
@@ -63,7 +63,7 @@
protected void createGuiPage() {
guiEditor = new TilesGuiEditor();
try {
- int index = addPage(guiEditor, guiEditor.getEditorInput());
+ int index = addPage(guiEditor, getEditorInput());
setPageText(index, WebUIMessages.DIAGRAM);
guiEditor.setInput(input);
selectionProvider.setHost(guiEditor.getSelectionProvider());
13 years, 11 months
JBoss Tools SVN: r28960 - in trunk/deltacloud/plugins: org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-02-03 05:59:00 -0500 (Thu, 03 Feb 2011)
New Revision: 28960
Added:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AllMatcher.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/StringMatcher.java
Removed:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AllFieldMatcher.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AllImageFilter.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AllInstanceFilter.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/FieldMatcher.java
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AbstractCloudElementFilter.java
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/ICloudElementFilter.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/IInstanceFilter.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/ImageFilter.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/InstanceFilter.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/SecurePasswordStore.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
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/ImageFilterWizard.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/InstanceFilterPage.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/InstanceFilterWizard.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties
Log:
[JBIDE-8187] added capability to filter for instance alias
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog 2011-02-03 10:55:48 UTC (rev 28959)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog 2011-02-03 10:59:00 UTC (rev 28960)
@@ -1,3 +1,10 @@
+2011-02-03 André Dietisheim <André Dietisheim@adietisheim-thinkpad>
+
+ * src/org/jboss/tools/deltacloud/core/ImageFilter.java:
+ * src/org/jboss/tools/deltacloud/core/InstanceFilter.java:
+ * src/org/jboss/tools/deltacloud/core/AbstractCloudElementFilter.java:
+ [JBIDE-8187] added capability to filter for instance alias
+
2011-01-27 André Dietisheim <André Dietisheim@adietisheim-thinkpad>
* src/org/jboss/tools/deltacloud/core/client/DeltaCloudClientImpl.java (getServerType):
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AbstractCloudElementFilter.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AbstractCloudElementFilter.java 2011-02-03 10:55:48 UTC (rev 28959)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AbstractCloudElementFilter.java 2011-02-03 10:59:00 UTC (rev 28960)
@@ -15,10 +15,7 @@
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
-import java.util.regex.PatternSyntaxException;
-import org.eclipse.core.runtime.Assert;
-
/**
* @author Jeff Johnston
* @author André Dietisheim
@@ -30,10 +27,37 @@
private IFieldMatcher nameRule;
private IFieldMatcher idRule;
+
public AbstractCloudElementFilter(DeltaCloud cloud) {
+ setRules(new AllMatcher(), new AllMatcher());
this.cloud = cloud;
}
+ public AbstractCloudElementFilter(String nameRule, String idRule, DeltaCloud cloud) {
+ setRules(nameRule, idRule);
+ this.cloud = cloud;
+ }
+
+ public AbstractCloudElementFilter(IFieldMatcher nameRule, IFieldMatcher idRule, DeltaCloud cloud) {
+ setRules(nameRule, idRule);
+ this.cloud = cloud;
+ }
+
+ protected Iterator<String> setRules(String rules) {
+ Iterator<String> rulesIterator = Arrays.asList(rules.split(EXPRESSION_DELIMITER)).iterator();
+ setRules(createRule(rulesIterator), createRule(rulesIterator));
+ return rulesIterator;
+ }
+
+ private void setRules(String nameRule, String idRule) {
+ setRules(createRule(nameRule), createRule(idRule));
+ }
+
+ private void setRules(IFieldMatcher nameMatcher, IFieldMatcher idMatcher) {
+ this.nameRule = nameMatcher;
+ this.idRule = idMatcher;
+ }
+
public Collection<CLOUDELEMENT> filter(CLOUDELEMENT[] cloudElements) throws DeltaCloudException {
List<CLOUDELEMENT> filteredElements = new ArrayList<CLOUDELEMENT>();
for (CLOUDELEMENT cloudElement : cloudElements) {
@@ -49,33 +73,25 @@
&& idRule.matches(cloudElement.getId());
}
- public abstract void setRules(String rulesString) throws PatternSyntaxException;
-
- protected Iterator<String> setRules(String ruleString, Iterator<String> rulesIterator)
- throws PatternSyntaxException {
- this.nameRule = createRule(rulesIterator);
- this.idRule = createRule(rulesIterator);
- return rulesIterator;
+ protected IFieldMatcher createRule(Iterator<String> rulesIterator) {
+ if (!rulesIterator.hasNext()) {
+ return new AllMatcher();
+ }
+ return createRule(rulesIterator.next());
}
- protected Iterator<String> getRulesIterator(String ruleString) {
- return Arrays.asList(ruleString.split(";")).iterator();
- }
-
- protected IFieldMatcher createRule(Iterator<String> rulesIterator) {
- Assert.isLegal(rulesIterator.hasNext());
- String expression = rulesIterator.next();
- if (expression.equals(ALL_MATCHER_EXPRESSION)) {
- return new AllFieldMatcher();
+ protected IFieldMatcher createRule(String rule) {
+ if (rule == null || rule.equals(ALL_MATCHER_EXPRESSION)) {
+ return new AllMatcher();
} else {
- return new FieldMatcher(expression);
+ return new StringMatcher(rule);
}
}
protected DeltaCloud getCloud() {
return cloud;
}
-
+
@Override
public String toString() {
return nameRule + ";" //$NON-NLS-1$
Deleted: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AllFieldMatcher.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AllFieldMatcher.java 2011-02-03 10:55:48 UTC (rev 28959)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AllFieldMatcher.java 2011-02-03 10:59:00 UTC (rev 28960)
@@ -1,15 +0,0 @@
-package org.jboss.tools.deltacloud.core;
-
-public class AllFieldMatcher implements IFieldMatcher {
-
- @Override
- public boolean matches(String input) {
- return true;
- }
-
- @Override
- public String toString() {
- return "*"; //$NON-NLS-1$
- }
-
-}
Deleted: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AllImageFilter.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AllImageFilter.java 2011-02-03 10:55:48 UTC (rev 28959)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AllImageFilter.java 2011-02-03 10:59:00 UTC (rev 28960)
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * 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.deltacloud.core;
-
-/**
- * A filter for images that matches on all elements (no criteria checked)
- *
- * @see IImageFilter
- * @see DeltaCloud#getImageFilter()
- *
- * @author Jeff Johnston
- * @author André Dietisheim
- */
-public class AllImageFilter extends AbstractCloudElementFilter<DeltaCloudImage> implements IImageFilter {
-
- private IFieldMatcher matcher = new AllFieldMatcher();
-
- public AllImageFilter(DeltaCloud cloud) {
- super(cloud);
- }
-
- @Override
- public boolean matches(DeltaCloudImage image) {
- return true;
- }
-
- @Override
- public void setRules(String ruleString) {
- // ignore, never set the rules for this filter
- }
-
- @Override
- public IFieldMatcher getNameRule() {
- return matcher;
- }
-
- @Override
- public IFieldMatcher getIdRule() {
- return matcher;
- }
-
- public IFieldMatcher getArchRule() {
- return matcher;
- }
-
- public IFieldMatcher getDescRule() {
- return matcher;
- }
-
- @Override
- public String toString() {
- return ALL_STRING;
- }
-}
Deleted: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AllInstanceFilter.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AllInstanceFilter.java 2011-02-03 10:55:48 UTC (rev 28959)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AllInstanceFilter.java 2011-02-03 10:59:00 UTC (rev 28960)
@@ -1,70 +0,0 @@
-package org.jboss.tools.deltacloud.core;
-
-/**
- * A filter for instances that matches on all elements (no criteria checked)
- *
- * @see IInstanceFilter
- * @see DeltaCloud#getInstanceFilter()
- *
- * @author Jeff Johnston
- * @author André Dietisheim
- */
-public class AllInstanceFilter extends AbstractCloudElementFilter<DeltaCloudInstance> implements IInstanceFilter {
-
- public AllInstanceFilter(DeltaCloud cloud) {
- super(cloud);
- }
-
- private IFieldMatcher matcher = new AllFieldMatcher();
-
- @Override
- public boolean matches(DeltaCloudInstance instance) {
- return true;
- }
-
- @Override
- public void setRules(String ruleString) {
- // ignore, never set the rules for this filter
- }
-
-
- @Override
- public IFieldMatcher getNameRule() {
- return matcher;
- }
-
- @Override
- public IFieldMatcher getIdRule() {
- return matcher;
- }
-
- @Override
- public IFieldMatcher getImageIdRule() {
- return matcher;
- }
-
- @Override
- public IFieldMatcher getKeyNameRule() {
- return matcher;
- }
-
- @Override
- public IFieldMatcher getOwnerIdRule() {
- return matcher;
- }
-
- @Override
- public IFieldMatcher getProfileRule() {
- return matcher;
- }
-
- @Override
- public IFieldMatcher getRealmRule() {
- return matcher;
- }
-
- @Override
- public String toString() {
- return ALL_STRING;
- }
-}
Copied: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AllMatcher.java (from rev 28745, trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AllFieldMatcher.java)
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AllMatcher.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/AllMatcher.java 2011-02-03 10:59:00 UTC (rev 28960)
@@ -0,0 +1,15 @@
+package org.jboss.tools.deltacloud.core;
+
+public class AllMatcher implements IFieldMatcher {
+
+ @Override
+ public boolean matches(String input) {
+ return true;
+ }
+
+ @Override
+ public String toString() {
+ return "*"; //$NON-NLS-1$
+ }
+
+}
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 2011-02-03 10:55:48 UTC (rev 28959)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2011-02-03 10:59:00 UTC (rev 28960)
@@ -15,7 +15,6 @@
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
-import java.util.regex.PatternSyntaxException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.jboss.tools.deltacloud.core.client.API.Driver;
@@ -70,7 +69,8 @@
public DeltaCloud(String name, String url, String username, String password, DeltaCloudDriver driver)
throws DeltaCloudException {
- this(name, url, username, password, driver, IImageFilter.ALL_STRING, IInstanceFilter.ALL_STRING, new ArrayList<IInstanceAliasMapping>());
+ this(name, url, username, password, driver, IImageFilter.ALL_STRING, IInstanceFilter.ALL_STRING,
+ new ArrayList<IInstanceAliasMapping>());
}
public DeltaCloud(String name, String url, String username, DeltaCloudDriver driver, String imageFilterRules,
@@ -88,8 +88,8 @@
this.driver = driver;
this.passwordStore = createSecurePasswordStore(name, username, password);
this.client = createClient(url, username, passwordStore.getPassword());
- this.imageFilter = createImageFilter(imageFilterRules);
- this.instanceFilter = createInstanceFilter(instanceFilterRules);
+ this.imageFilter = new ImageFilter(instanceFilterRules, this);
+ this.instanceFilter = new InstanceFilter(instanceFilterRules, this);
this.instanceAliasMappings = instanceAliasMappings;
}
@@ -211,64 +211,29 @@
return instanceFilter;
}
- public void updateInstanceFilter(String ruleString) throws Exception {
- String rules = getInstanceFilter().toString();
- instanceFilter = createInstanceFilter(ruleString);
- if (!rules.equals(ruleString)) {
- // TODO: remove notification with all instanceRepo, replace by
- // notifying the changed instance
- firePropertyChange(
+ public void updateInstanceFilter(String nameRule, String idRule, String aliasRule, String imageIdRule,
+ String ownerIdRule, String keyNameRule, String realmRule, String profileRule) throws Exception {
+ instanceFilter =
+ new InstanceFilter(nameRule, idRule, aliasRule, imageIdRule, ownerIdRule, keyNameRule, realmRule,
+ profileRule, this);
+ firePropertyChange(
PROP_INSTANCES, getInstancesRepository().get(), getInstancesRepository().get());
- DeltaCloudManager.getDefault().saveClouds();
- }
+ DeltaCloudManager.getDefault().saveClouds();
}
- private IInstanceFilter createInstanceFilter(String ruleString) {
- IInstanceFilter instanceFilter = null;
- if (IInstanceFilter.ALL_STRING.equals(ruleString)) {
- instanceFilter = new AllInstanceFilter(this);
- } else {
- try {
- instanceFilter = new InstanceFilter(this);
- instanceFilter.setRules(ruleString);
- } catch (PatternSyntaxException e) {
- instanceFilter.setRules(IInstanceFilter.ALL_STRING);
- }
- }
- return instanceFilter;
- }
-
public IImageFilter getImageFilter() {
return imageFilter;
}
- public void updateImageFilter(String ruleString) throws Exception {
- String rules = getImageFilter().toString();
- this.imageFilter = createImageFilter(ruleString);
- if (!rules.equals(ruleString)) {
- // TODO: remove notification with all instanceRepo, replace by
- // notifying the changed instance
- firePropertyChange(PROP_IMAGES, getImagesRepository().get(), getImagesRepository().get());
- // TODO: move to notification based approach
- DeltaCloudManager.getDefault().saveClouds();
- }
+ public void updateImageFilter(String nameRule, String idRule, String archRule, String descRule) throws Exception {
+ this.imageFilter = new ImageFilter(nameRule, idRule, archRule, descRule, this);
+ // TODO: remove notification with all instanceRepo, replace by
+ // notifying the changed instance
+ firePropertyChange(PROP_IMAGES, getImagesRepository().get(), getImagesRepository().get());
+ // TODO: move to notification based approach
+ DeltaCloudManager.getDefault().saveClouds();
}
- private IImageFilter createImageFilter(String ruleString) {
- IImageFilter imageFilter = null;
- if (IImageFilter.ALL_STRING.equals(ruleString)) {
- imageFilter = new AllImageFilter(this);
- } else {
- try {
- imageFilter = new ImageFilter(this);
- imageFilter.setRules(ruleString);
- } catch (PatternSyntaxException e) {
- imageFilter.setRules(IImageFilter.ALL_STRING);
- }
- }
- return imageFilter;
- }
-
/**
* Loads all children of this delta cloud instance (regardless if things
* have already been loaded before). Catched and collects individual errors
Deleted: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/FieldMatcher.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/FieldMatcher.java 2011-02-03 10:55:48 UTC (rev 28959)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/FieldMatcher.java 2011-02-03 10:59:00 UTC (rev 28960)
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * 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.deltacloud.core;
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import java.util.regex.PatternSyntaxException;
-
-/**
- * @author Jeff Johnston
- * @author André Dietisheim
- */
-public class FieldMatcher implements IFieldMatcher {
-
- private String rule;
- private Pattern pattern;
-
- public FieldMatcher(String rule) throws PatternSyntaxException {
- this.rule = rule;
- String regexRule = transform(rule);
- pattern = Pattern.compile(regexRule, Pattern.CASE_INSENSITIVE);
- }
-
- private String transform(String rule) {
- StringBuffer buffer = new StringBuffer();
- for (int i = 0; i < rule.length(); ++i) {
- char ch = rule.charAt(i);
- if (Character.isLetterOrDigit(ch))
- buffer.append(ch);
- else if (ch == '*') {
- buffer.append(".*?");
- } else {
- buffer.append('\\');
- buffer.append(ch);
- }
- }
- return buffer.toString();
- }
-
- @Override
- public boolean matches(String input) {
- Matcher m = pattern.matcher(input);
- return m.matches();
- }
-
- @Override
- public String toString() {
- return rule;
- }
-
-}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/ICloudElementFilter.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/ICloudElementFilter.java 2011-02-03 10:55:48 UTC (rev 28959)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/ICloudElementFilter.java 2011-02-03 10:59:00 UTC (rev 28960)
@@ -37,8 +37,6 @@
public Collection<CLOUDELEMENT> filter(CLOUDELEMENT[] cloudElements) throws DeltaCloudException;
- public void setRules(String ruleString);
-
public IFieldMatcher getNameRule();
public IFieldMatcher getIdRule();
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/IInstanceFilter.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/IInstanceFilter.java 2011-02-03 10:55:48 UTC (rev 28959)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/IInstanceFilter.java 2011-02-03 10:59:00 UTC (rev 28960)
@@ -16,6 +16,7 @@
*/
public interface IInstanceFilter extends ICloudElementFilter<DeltaCloudInstance> {
+ public IFieldMatcher getAliasRule();
public IFieldMatcher getImageIdRule();
public IFieldMatcher getOwnerIdRule();
public IFieldMatcher getKeyNameRule();
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/ImageFilter.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/ImageFilter.java 2011-02-03 10:55:48 UTC (rev 28959)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/ImageFilter.java 2011-02-03 10:59:00 UTC (rev 28960)
@@ -11,7 +11,6 @@
package org.jboss.tools.deltacloud.core;
import java.util.Iterator;
-import java.util.regex.PatternSyntaxException;
/**
* A filter that may be applied on DeltaCloudImages
@@ -24,39 +23,57 @@
public class ImageFilter extends AbstractCloudElementFilter<DeltaCloudImage> implements IImageFilter {
private IFieldMatcher archRule;
+ private IFieldMatcher descRule;
public ImageFilter(DeltaCloud cloud) {
+ super(new AllMatcher(), new AllMatcher(), cloud);
+ setRules(new AllMatcher(), new AllMatcher());
+ }
+
+ public ImageFilter(String rules, DeltaCloud cloud) {
super(cloud);
+ setRules(rules);
}
- private IFieldMatcher descRule;
-
+ public ImageFilter(String nameRule, String idRule, String archRule, String descRule, DeltaCloud cloud) {
+ super(nameRule, idRule, cloud);
+ setRules(archRule, descRule);
+ }
+
@Override
+ protected Iterator<String> setRules(String rules) {
+ Iterator<String> rulesIterator = super.setRules(rules);
+ setRules(createRule(rulesIterator), createRule(rulesIterator));
+ return rulesIterator;
+ }
+
+ private void setRules(String archRule, String descRule) {
+ setRules(createRule(archRule), createRule(descRule));
+ }
+
+ private void setRules(IFieldMatcher archMatcher, IFieldMatcher descMatcher) {
+ this.archRule = archMatcher;
+ this.descRule = descMatcher;
+ }
+
+ @Override
public boolean matches(DeltaCloudImage image) {
return super.matches(image) &&
- archRule.matches(image.getArchitecture()) &&
- descRule.matches(image.getDescription());
+ archRule.matches(image.getArchitecture()) &&
+ descRule.matches(image.getDescription());
}
@Override
- public void setRules(String ruleString) throws PatternSyntaxException {
- // TODO: replace filter passing (;-delimited string) by list
- Iterator<String> rulesIterator = super.setRules(ruleString, getRulesIterator(ruleString));
- this.archRule = createRule(rulesIterator);
- this.descRule = createRule(rulesIterator);
- }
-
- @Override
public String toString() {
- return super.toString() //$NON-NLS-1$
- + archRule + ";" //$NON-NLS-1$
- + descRule; //$NON-NLS-1$
+ return super.toString() //$NON-NLS-1$
+ + archRule + EXPRESSION_DELIMITER //$NON-NLS-1$
+ + descRule; //$NON-NLS-1$
}
-
+
public IFieldMatcher getArchRule() {
return archRule;
}
-
+
public IFieldMatcher getDescRule() {
return descRule;
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/InstanceFilter.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/InstanceFilter.java 2011-02-03 10:55:48 UTC (rev 28959)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/InstanceFilter.java 2011-02-03 10:59:00 UTC (rev 28960)
@@ -11,7 +11,6 @@
package org.jboss.tools.deltacloud.core;
import java.util.Iterator;
-import java.util.regex.PatternSyntaxException;
/**
* A filter that may be applied on DeltaCloudInstances
@@ -23,6 +22,7 @@
*/
public class InstanceFilter extends AbstractCloudElementFilter<DeltaCloudInstance> implements IInstanceFilter {
+ private IFieldMatcher aliasRule;
private IFieldMatcher imageIdRule;
private IFieldMatcher realmRule;
private IFieldMatcher profileRule;
@@ -30,37 +30,73 @@
private IFieldMatcher keyNameRule;
public InstanceFilter(DeltaCloud cloud) {
+ this(new AllMatcher(), new AllMatcher(), new AllMatcher(), new AllMatcher(), new AllMatcher(),
+ new AllMatcher(), new AllMatcher(), new AllMatcher(), cloud);
+ }
+
+ public InstanceFilter(IFieldMatcher nameMatcher, IFieldMatcher idMatcher, IFieldMatcher aliasMatcher,
+ IFieldMatcher imageIdMatcher, IFieldMatcher realmMatcher, IFieldMatcher profileMatcher,
+ IFieldMatcher ownerIdMatcher, IFieldMatcher keyMatcher, DeltaCloud cloud) {
+ super(nameMatcher, idMatcher, cloud);
+ setRules(aliasMatcher, imageIdMatcher, realmMatcher, profileMatcher, ownerIdMatcher,
+ keyMatcher);
+ }
+
+ public InstanceFilter(String rulesString, DeltaCloud cloud) {
super(cloud);
+ setRules(rulesString);
}
-
+
+ public InstanceFilter(String nameRule, String idRule, String aliasRule, String imageIdRule,
+ String ownerIdRule, String keyNameRule, String realmRule, String profileRule, DeltaCloud cloud) {
+ super(nameRule, idRule, cloud);
+ setRules(aliasRule, imageIdRule, ownerIdRule, keyNameRule, realmRule, profileRule);
+ }
+
@Override
+ protected Iterator<String> setRules(String rules) {
+ Iterator<String> rulesIterator = super.setRules(rules);
+ setRules(createRule(rulesIterator), createRule(rulesIterator), createRule(rulesIterator),
+ createRule(rulesIterator), createRule(rulesIterator), createRule(rulesIterator));
+ return rulesIterator;
+ }
+
+ private void setRules(String aliasRule, String imageIdRule, String ownerIdRule, String keyNameRule,
+ String realmRule, String profileRule) {
+ setRules(createRule(aliasRule), createRule(imageIdRule), createRule(ownerIdRule), createRule(keyNameRule),
+ createRule(realmRule), createRule(profileRule));
+ }
+
+ private void setRules(IFieldMatcher aliasMatcher, IFieldMatcher imageIdMatcher, IFieldMatcher realmMatcher,
+ IFieldMatcher profileMatcher, IFieldMatcher ownerIdMatcher, IFieldMatcher keyNameMatcher) {
+ this.aliasRule = aliasMatcher;
+ this.imageIdRule = imageIdMatcher;
+ this.ownerIdRule = ownerIdMatcher;
+ this.keyNameRule = keyNameMatcher;
+ this.realmRule = realmMatcher;
+ this.profileRule = profileMatcher;
+ }
+
+ @Override
public boolean matches(DeltaCloudInstance instance) {
return super.matches(instance) &&
- imageIdRule.matches(instance.getImageId()) &&
- ownerIdRule.matches(instance.getOwnerId()) &&
- keyNameRule.matches(instance.getKeyId()) &&
- realmRule.matches(instance.getRealmId()) &&
- profileRule.matches(instance.getProfileId());
+ aliasRule.matches(instance.getAlias()) &&
+ imageIdRule.matches(instance.getImageId()) &&
+ ownerIdRule.matches(instance.getOwnerId()) &&
+ keyNameRule.matches(instance.getKeyId()) &&
+ realmRule.matches(instance.getRealmId()) &&
+ profileRule.matches(instance.getProfileId());
}
@Override
- public void setRules(String ruleString) throws PatternSyntaxException {
- Iterator<String> rulesIterator = super.setRules(ruleString, getRulesIterator(ruleString));
- this.imageIdRule = createRule(rulesIterator);
- this.ownerIdRule = createRule(rulesIterator);
- this.keyNameRule = createRule(rulesIterator);
- this.realmRule = createRule(rulesIterator);
- this.profileRule = createRule(rulesIterator);
- }
-
- @Override
public String toString() {
return super.toString()
- + imageIdRule + ";" //$NON-NLS-1$
- + ownerIdRule + ";" //$NON-NLS-1$
- + keyNameRule + ";" //$NON-NLS-1$
- + realmRule + ";" //$NON-NLS-1$
- + profileRule; //$NON-NLS-1$
+ + aliasRule + EXPRESSION_DELIMITER
+ + imageIdRule + EXPRESSION_DELIMITER
+ + ownerIdRule + EXPRESSION_DELIMITER
+ + keyNameRule + EXPRESSION_DELIMITER
+ + realmRule + EXPRESSION_DELIMITER
+ + profileRule; //$NON-NLS-1$
}
@Override
@@ -69,6 +105,11 @@
}
@Override
+ public IFieldMatcher getAliasRule() {
+ return aliasRule;
+ }
+
+ @Override
public IFieldMatcher getKeyNameRule() {
return keyNameRule;
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/SecurePasswordStore.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/SecurePasswordStore.java 2011-02-03 10:55:48 UTC (rev 28959)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/SecurePasswordStore.java 2011-02-03 10:59:00 UTC (rev 28960)
@@ -100,7 +100,7 @@
if (password == null) {
return null;
}
- return EncodingUtils.encodeBase64(password.getBytes());
+ return new String(EncodingUtils.decodeBase64(password));
}
private void storeInPreferences(String password, IStorageKey key) throws DeltaCloudException {
Copied: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/StringMatcher.java (from rev 28745, trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/FieldMatcher.java)
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/StringMatcher.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/StringMatcher.java 2011-02-03 10:59:00 UTC (rev 28960)
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * 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.deltacloud.core;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
+
+/**
+ * @author Jeff Johnston
+ * @author André Dietisheim
+ */
+public class StringMatcher implements IFieldMatcher {
+
+ private String rule;
+ private Pattern pattern;
+
+ public StringMatcher(String rule) throws PatternSyntaxException {
+ this.rule = rule;
+ String regexRule = transform(rule);
+ pattern = Pattern.compile(regexRule, Pattern.CASE_INSENSITIVE);
+ }
+
+ private String transform(String rule) {
+ StringBuffer buffer = new StringBuffer();
+ for (int i = 0; i < rule.length(); ++i) {
+ char ch = rule.charAt(i);
+ if (Character.isLetterOrDigit(ch))
+ buffer.append(ch);
+ else if (ch == '*') {
+ buffer.append(".*?");
+ } else {
+ buffer.append('\\');
+ buffer.append(ch);
+ }
+ }
+ return buffer.toString();
+ }
+
+ @Override
+ public boolean matches(String input) {
+ if (input == null) {
+ return false;
+ }
+ Matcher m = pattern.matcher(input);
+ return m.matches();
+ }
+
+ @Override
+ public String toString() {
+ return rule;
+ }
+
+}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2011-02-03 10:55:48 UTC (rev 28959)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2011-02-03 10:59:00 UTC (rev 28960)
@@ -1,3 +1,9 @@
+2011-02-03 André Dietisheim <André Dietisheim@adietisheim-thinkpad>
+
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties:
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/InstanceFilterPage.java:
+ [JBIDE-8187] added capability to filter for instance alias
+
2011-02-02 André Dietisheim <André Dietisheim@adietisheim-thinkpad>
* src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java
Modified: 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 2011-02-03 10:55:48 UTC (rev 28959)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java 2011-02-03 10:59:00 UTC (rev 28960)
@@ -39,7 +39,6 @@
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.DeltaCloudException;
import org.jboss.tools.deltacloud.core.DeltaCloudImage;
@@ -120,7 +119,7 @@
public FindImagePage(DeltaCloud cloud) {
super(WizardMessages.getString(NAME));
this.cloud = cloud;
- filter = new AllImageFilter(cloud);
+ filter = new ImageFilter(cloud);
setDescription(WizardMessages.getString(DESC));
setTitle(WizardMessages.getString(TITLE));
setImageDescriptor(SWTImagesFactory.DESC_DELTA_LARGE);
@@ -158,8 +157,7 @@
+ desc + "*"; //$NON-NLS-1$
if (!newRules.equals(oldRules)) {
- filter = new ImageFilter(cloud);
- filter.setRules(newRules);
+ filter = new ImageFilter(newRules, cloud);
oldRules = newRules;
asyncSetImagesToViewer(filter);
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ImageFilterWizard.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ImageFilterWizard.java 2011-02-03 10:55:48 UTC (rev 28959)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ImageFilterWizard.java 2011-02-03 10:59:00 UTC (rev 28960)
@@ -44,11 +44,7 @@
String descRule = mainPage.getDescRule();
try {
- getDeltaCloud().updateImageFilter(
- nameRule + ";" + //$NON-NLS-1$
- idRule + ";" + //$NON-NLS-1$
- archRule + ";" + //$NON-NLS-1$
- descRule);
+ getDeltaCloud().updateImageFilter(nameRule, idRule, archRule, descRule);
} catch (Exception e) {
// TODO: internationalize strings
ErrorUtils.handleError(
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/InstanceFilterPage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/InstanceFilterPage.java 2011-02-03 10:55:48 UTC (rev 28959)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/InstanceFilterPage.java 2011-02-03 10:59:00 UTC (rev 28960)
@@ -10,21 +10,23 @@
******************************************************************************/
package org.jboss.tools.internal.deltacloud.ui.wizards;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.layout.GridLayoutFactory;
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.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.jboss.tools.deltacloud.core.DeltaCloud;
+import org.jboss.tools.deltacloud.core.ICloudElementFilter;
+import org.jboss.tools.deltacloud.core.IFieldMatcher;
+import org.jboss.tools.deltacloud.core.IInstanceFilter;
import org.jboss.tools.deltacloud.ui.SWTImagesFactory;
/**
@@ -40,30 +42,33 @@
private final static String INVALID_SEMICOLON = "ErrorFilterSemicolon.msg"; //$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 ALIAS_LABEL = "Alias.label"; //$NON-NLS-1$
private final static String OWNER_ID_LABEL = "OwnerId.label"; //$NON-NLS-1$
private final static String IMAGE_ID_LABEL = "ImageId.label"; //$NON-NLS-1$
private final static String KEYNAME_LABEL = "Key.label"; //$NON-NLS-1$
private final static String REALM_LABEL = "Realm.label"; //$NON-NLS-1$
private final static String PROFILE_LABEL = "Profile.label"; //$NON-NLS-1$
private final static String DEFAULT_LABEL = "DefaultButton.label"; //$NON-NLS-1$
-
+
private DeltaCloud cloud;
private Text nameText;
private Text idText;
+ private Text aliasText;
private Text imageIdText;
private Text ownerIdText;
- private Text keyNameText;
+ private Text keyIdText;
private Text realmText;
private Text profileText;
-
+
private Button defaultName;
private Button defaultId;
+ private Button defaultAlias;
private Button defaultImageId;
private Button defaultOwnerId;
private Button defaultKeyId;
private Button defaultRealm;
private Button defaultProfile;
-
+
public InstanceFilterPage(DeltaCloud cloud) {
super(WizardMessages.getString(NAME));
this.cloud = cloud;
@@ -72,35 +77,39 @@
setImageDescriptor(SWTImagesFactory.DESC_DELTA_LARGE);
setPageComplete(false);
}
-
+
public String getNameRule() {
return nameText.getText();
}
-
+
public String getIdRule() {
return idText.getText();
}
-
+
+ public String getAliasRule() {
+ return aliasText.getText();
+ }
+
public String getImageIdRule() {
return imageIdText.getText();
}
-
+
public String getOwnerIdRule() {
return ownerIdText.getText();
}
-
+
public String getKeyNameRule() {
- return keyNameText.getText();
+ return keyIdText.getText();
}
-
+
public String getRealmRule() {
return realmText.getText();
}
-
+
public String getProfileRule() {
return profileText.getText();
}
-
+
private ModifyListener Listener = new ModifyListener() {
@Override
@@ -109,54 +118,74 @@
validate();
}
};
-
- private SelectionAdapter ButtonListener = new SelectionAdapter() {
+
+ private SelectionAdapter buttonListener = new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
- Button b = (Button)e.widget;
- if (b == defaultName)
- nameText.setText("*"); //$NON-NLS-1$
- else if (b == defaultId)
- idText.setText("*"); //$NON-NLS-1$
- else if (b == defaultImageId)
- imageIdText.setText("*"); //$NON-NLS-1$
- else if (b == defaultOwnerId)
- ownerIdText.setText("*"); //$NON-NLS-1$
- else if (b == defaultKeyId)
- keyNameText.setText("*"); //$NON-NLS-1$
- else if (b == defaultRealm)
- realmText.setText("*"); //$NON-NLS-1$
- else if (b == defaultProfile)
- profileText.setText("*"); //$NON-NLS-1$
+ Button b = (Button) e.widget;
+ Text text = getTextWidget(b);
+ if (text != null) {
+ text.setText(ICloudElementFilter.ALL_MATCHER_EXPRESSION);
+ }
}
-
+
+ private Text getTextWidget(Button button) {
+ Text text = null;
+ if (button == defaultName) {
+ text = nameText;
+ }
+ else if (button == defaultId) {
+ text = idText;
+ }
+ else if (button == defaultAlias) {
+ text = aliasText;
+ }
+ else if (button == defaultImageId) {
+ text = imageIdText;
+ }
+ else if (button == defaultOwnerId) {
+ text = ownerIdText;
+ }
+ else if (button == defaultKeyId) {
+ text = keyIdText;
+ }
+ else if (button == defaultRealm) {
+ text = realmText;
+ }
+ else if (button == defaultProfile) {
+ text = profileText;
+ }
+ return text;
+ }
};
-
+
private void validate() {
boolean complete = true;
boolean error = false;
-
+
if (nameText.getText().length() == 0 ||
idText.getText().length() == 0 ||
+ aliasText.getText().length() == 0 ||
imageIdText.getText().length() == 0 ||
ownerIdText.getText().length() == 0 ||
- keyNameText.getText().length() == 0 ||
+ keyIdText.getText().length() == 0 ||
realmText.getText().length() == 0 ||
profileText.getText().length() == 0) {
-
+
setErrorMessage(WizardMessages.getString(EMPTY_RULE));
error = true;
} else if (nameText.getText().contains(";") ||
idText.getText().contains(";") ||
+ aliasText.getText().contains(";") ||
imageIdText.getText().contains(";") ||
ownerIdText.getText().contains(";") ||
- keyNameText.getText().contains(";") ||
+ keyIdText.getText().contains(";") ||
realmText.getText().contains(";") ||
profileText.getText().contains(";")) {
setErrorMessage(WizardMessages.getString(INVALID_SEMICOLON));
error = true;
}
-
+
if (!error)
setErrorMessage(null);
setPageComplete(complete && !error);
@@ -165,215 +194,93 @@
@Override
public void createControl(Composite parent) {
final Composite container = new Composite(parent, SWT.NULL);
- FormLayout layout = new FormLayout();
- layout.marginHeight = 5;
- layout.marginWidth = 5;
- container.setLayout(layout);
-
+ GridLayoutFactory.fillDefaults().numColumns(3).spacing(8, 4).applyTo(container);
+
Label label = new Label(container, SWT.NULL);
label.setText(WizardMessages.getString(FILTER_LABEL));
+ GridDataFactory.fillDefaults().span(3, 1).align(SWT.LEFT, SWT.CENTER).indent(0, 14).hint(SWT.DEFAULT, 30).applyTo(label);
- Label nameLabel = new Label(container, SWT.NULL);
- nameLabel.setText(WizardMessages.getString(NAME_LABEL));
-
- nameText = new Text(container, SWT.BORDER | SWT.SINGLE);
- nameText.setText(cloud.getInstanceFilter().getNameRule().toString());
- nameText.addModifyListener(Listener);
-
- defaultName = new Button(container, SWT.NULL);
- defaultName.setText(WizardMessages.getString(DEFAULT_LABEL));
- defaultName.addSelectionListener(ButtonListener);
+ IInstanceFilter filter = cloud.getInstanceFilter();
- Label idLabel = new Label(container, SWT.NULL);
- idLabel.setText(WizardMessages.getString(ID_LABEL));
+ Label nameLabel = createRuleLabel(WizardMessages.getString(NAME_LABEL), container);
+ GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.CENTER).applyTo(nameLabel);
+ this.nameText = createRuleText(filter.getNameRule(), container);
+ GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).applyTo(nameText);
+ this.defaultName = createDefaultRuleButton(container);
+ GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(defaultName);
- idText = new Text(container, SWT.BORDER | SWT.SINGLE);
- idText.setText(cloud.getInstanceFilter().getIdRule().toString());
- idText.addModifyListener(Listener);
+ Label aliasLabel = createRuleLabel(WizardMessages.getString(ALIAS_LABEL), container);
+ GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.CENTER).applyTo(aliasLabel);
+ this.aliasText = createRuleText(filter.getAliasRule(), container);
+ GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).applyTo(aliasText);
+ this.defaultAlias = createDefaultRuleButton(container);
+ GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(defaultAlias);
- defaultId = new Button(container, SWT.NULL);
- defaultId.setText(WizardMessages.getString(DEFAULT_LABEL));
- defaultId.addSelectionListener(ButtonListener);
+ Label idLabel = createRuleLabel(WizardMessages.getString(ID_LABEL), container);
+ GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.CENTER).applyTo(idLabel);
+ this.idText = createRuleText(filter.getIdRule(), container);
+ GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).applyTo(idText);
+ this.defaultId = createDefaultRuleButton(container);
+ GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(defaultId);
- Label imageIdLabel = new Label(container, SWT.NULL);
- imageIdLabel.setText(WizardMessages.getString(IMAGE_ID_LABEL));
-
- imageIdText = new Text(container, SWT.BORDER | SWT.SINGLE);
- imageIdText.setText(cloud.getInstanceFilter().getImageIdRule().toString());
- imageIdText.addModifyListener(Listener);
-
- defaultImageId = new Button(container, SWT.NULL);
- defaultImageId.setText(WizardMessages.getString(DEFAULT_LABEL));
- defaultImageId.addSelectionListener(ButtonListener);
+ Label imageIdLabel = createRuleLabel(WizardMessages.getString(IMAGE_ID_LABEL), container);
+ GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.CENTER).applyTo(imageIdLabel);
+ this.imageIdText = createRuleText(filter.getImageIdRule(), container);
+ GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).applyTo(imageIdText);
+ this.defaultImageId = createDefaultRuleButton(container);
+ GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(defaultImageId);
- Label ownerIdLabel = new Label(container, SWT.NULL);
- ownerIdLabel.setText(WizardMessages.getString(OWNER_ID_LABEL));
+ Label ownerIdLabel = createRuleLabel(WizardMessages.getString(OWNER_ID_LABEL), container);
+ GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.CENTER).applyTo(ownerIdLabel);
+ this.ownerIdText = createRuleText(filter.getOwnerIdRule(), container);
+ GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).applyTo(ownerIdText);
+ this.defaultOwnerId = createDefaultRuleButton(container);
+ GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(defaultOwnerId);
- ownerIdText = new Text(container, SWT.BORDER | SWT.SINGLE);
- ownerIdText.setText(cloud.getInstanceFilter().getOwnerIdRule().toString());
- ownerIdText.addModifyListener(Listener);
-
- defaultOwnerId = new Button(container, SWT.NULL);
- defaultOwnerId.setText(WizardMessages.getString(DEFAULT_LABEL));
- defaultOwnerId.addSelectionListener(ButtonListener);
+ Label keyNameLabel = createRuleLabel(WizardMessages.getString(KEYNAME_LABEL), container);
+ GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.CENTER).applyTo(keyNameLabel);
+ this.keyIdText = createRuleText(filter.getKeyNameRule(), container);
+ GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).applyTo(keyIdText);
+ this.defaultKeyId = createDefaultRuleButton(container);
+ GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(defaultKeyId);
- Label keyNameLabel = new Label(container, SWT.NULL);
- keyNameLabel.setText(WizardMessages.getString(KEYNAME_LABEL));
+ Label realmLabel = createRuleLabel(WizardMessages.getString(REALM_LABEL), container);
+ GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.CENTER).applyTo(realmLabel);
+ this.realmText = createRuleText(filter.getKeyNameRule(), container);
+ GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).applyTo(realmText);
+ this.defaultRealm = createDefaultRuleButton(container);
+ GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(defaultRealm);
- keyNameText = new Text(container, SWT.BORDER | SWT.SINGLE);
- keyNameText.setText(cloud.getInstanceFilter().getKeyNameRule().toString());
- keyNameText.addModifyListener(Listener);
-
- defaultKeyId = new Button(container, SWT.NULL);
- defaultKeyId.setText(WizardMessages.getString(DEFAULT_LABEL));
- defaultKeyId.addSelectionListener(ButtonListener);
+ Label profileLabel = createRuleLabel(WizardMessages.getString(PROFILE_LABEL), container);
+ GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.CENTER).applyTo(profileLabel);
+ this.profileText = createRuleText(filter.getProfileRule(), container);
+ GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).applyTo(profileText);
+ this.defaultProfile = createDefaultRuleButton(container);
+ GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(defaultProfile);
- Label realmLabel = new Label(container, SWT.NULL);
- realmLabel.setText(WizardMessages.getString(REALM_LABEL));
+ setControl(container);
+ setPageComplete(true);
+ }
- realmText = new Text(container, SWT.BORDER | SWT.SINGLE);
- realmText.setText(cloud.getInstanceFilter().getRealmRule().toString());
- realmText.addModifyListener(Listener);
-
- defaultRealm = new Button(container, SWT.NULL);
- defaultRealm.setText(WizardMessages.getString(DEFAULT_LABEL));
- defaultRealm.addSelectionListener(ButtonListener);
-
- Label profileLabel = new Label(container, SWT.NULL);
- profileLabel.setText(WizardMessages.getString(PROFILE_LABEL));
+ private Label createRuleLabel(String text, Composite container) {
+ Label label = new Label(container, SWT.NULL);
+ label.setText(text);
+ return label;
+ }
- profileText = new Text(container, SWT.BORDER | SWT.SINGLE);
- profileText.setText(cloud.getInstanceFilter().getProfileRule().toString());
- profileText.addModifyListener(Listener);
-
- defaultProfile = new Button(container, SWT.NULL);
- defaultProfile.setText(WizardMessages.getString(DEFAULT_LABEL));
- defaultProfile.addSelectionListener(ButtonListener);
-
- Point p1 = label.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- Point p2 = nameText.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- Point p3 = defaultName.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- int centering = (p2.y - p1.y + 1) / 2;
- int centering2 = (p3.y - p2.y + 1) / 2;
+ private Button createDefaultRuleButton(final Composite container) {
+ Button button = new Button(container, SWT.NULL);
+ button.setText(WizardMessages.getString(DEFAULT_LABEL));
+ button.addSelectionListener(buttonListener);
+ return button;
+ }
- FormData f = new FormData();
- f.top = new FormAttachment(0);
- label.setLayoutData(f);
+ private Text createRuleText(IFieldMatcher rule, final Composite container) {
+ Assert.isNotNull(rule, "Rule may not be null");
- f = new FormData();
- f.top = new FormAttachment(label, 11 + centering + centering2);
- f.left = new FormAttachment(0, 0);
- nameLabel.setLayoutData(f);
-
- f = new FormData();
- f.top = new FormAttachment(label, 11);
- f.right = new FormAttachment(100);
- defaultName.setLayoutData(f);
-
- f = new FormData();
- f.top = new FormAttachment(label, 11 + centering2);
- f.left = new FormAttachment(profileLabel, 5);
- f.right = new FormAttachment(defaultName, -10);
- nameText.setLayoutData(f);
-
- f = new FormData();
- f.top = new FormAttachment(nameLabel, 11 + centering + centering2);
- f.left = new FormAttachment(0, 0);
- idLabel.setLayoutData(f);
-
- f = new FormData();
- f.top = new FormAttachment(nameLabel, 11);
- f.right = new FormAttachment(100);
- defaultId.setLayoutData(f);
-
- f = new FormData();
- f.top = new FormAttachment(nameLabel, 11 + centering2);
- f.left = new FormAttachment(profileLabel, 5);
- f.right = new FormAttachment(defaultId, -10);
- idText.setLayoutData(f);
-
- f = new FormData();
- f.top = new FormAttachment(idLabel, 11 + centering + centering2);
- f.left = new FormAttachment(0, 0);
- imageIdLabel.setLayoutData(f);
-
- f = new FormData();
- f.top = new FormAttachment(idLabel, 11);
- f.right = new FormAttachment(100);
- defaultImageId.setLayoutData(f);
-
- f = new FormData();
- f.top = new FormAttachment(idLabel, 11 + centering2);
- f.left = new FormAttachment(profileLabel, 5);
- f.right = new FormAttachment(defaultImageId, -10);
- imageIdText.setLayoutData(f);
-
- f = new FormData();
- f.top = new FormAttachment(imageIdLabel, 11 + centering + centering2);
- f.left = new FormAttachment(0, 0);
- ownerIdLabel.setLayoutData(f);
-
- f = new FormData();
- f.top = new FormAttachment(imageIdLabel, 11);
- f.right = new FormAttachment(100);
- defaultOwnerId.setLayoutData(f);
-
- f = new FormData();
- f.top = new FormAttachment(imageIdLabel, 11 + centering2);
- f.left = new FormAttachment(profileLabel, 5);
- f.right = new FormAttachment(defaultOwnerId, -10);
- ownerIdText.setLayoutData(f);
-
- f = new FormData();
- f.top = new FormAttachment(ownerIdLabel, 11 + centering + centering2);
- f.left = new FormAttachment(0, 0);
- keyNameLabel.setLayoutData(f);
-
- f = new FormData();
- f.top = new FormAttachment(ownerIdLabel, 11);
- f.right = new FormAttachment(100);
- defaultKeyId.setLayoutData(f);
-
- f = new FormData();
- f.top = new FormAttachment(ownerIdLabel, 11 + centering2);
- f.left = new FormAttachment(profileLabel, 5);
- f.right = new FormAttachment(defaultKeyId, -10);
- keyNameText.setLayoutData(f);
-
- f = new FormData();
- f.top = new FormAttachment(keyNameLabel, 11 + centering + centering2);
- f.left = new FormAttachment(0, 0);
- realmLabel.setLayoutData(f);
-
- f = new FormData();
- f.top = new FormAttachment(keyNameLabel, 11);
- f.right = new FormAttachment(100);
- defaultRealm.setLayoutData(f);
-
- f = new FormData();
- f.top = new FormAttachment(keyNameLabel, 11 + centering2);
- f.left = new FormAttachment(profileLabel, 5);
- f.right = new FormAttachment(defaultRealm, -10);
- realmText.setLayoutData(f);
-
- f = new FormData();
- f.top = new FormAttachment(realmLabel, 11 + centering + centering2);
- f.left = new FormAttachment(0, 0);
- profileLabel.setLayoutData(f);
-
- f = new FormData();
- f.top = new FormAttachment(realmLabel, 11);
- f.right = new FormAttachment(100);
- defaultProfile.setLayoutData(f);
-
- f = new FormData();
- f.top = new FormAttachment(realmLabel, 11 + centering2);
- f.left = new FormAttachment(profileLabel, 5);
- f.right = new FormAttachment(defaultProfile, -10);
- profileText.setLayoutData(f);
-
- setControl(container);
- setPageComplete(true);
+ Text text = new Text(container, SWT.BORDER | SWT.SINGLE);
+ text.setText(rule.toString());
+ text.addModifyListener(Listener);
+ return text;
}
-
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/InstanceFilterWizard.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/InstanceFilterWizard.java 2011-02-03 10:55:48 UTC (rev 28959)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/InstanceFilterWizard.java 2011-02-03 10:59:00 UTC (rev 28960)
@@ -20,47 +20,43 @@
public class InstanceFilterWizard extends AbstractDeltaCloudWizard {
private InstanceFilterPage mainPage;
-
+
public InstanceFilterWizard(DeltaCloud cloud) {
super(cloud);
}
-
+
@Override
public void addPages() {
mainPage = new InstanceFilterPage(getDeltaCloud());
addPage(mainPage);
}
-
+
@Override
public boolean canFinish() {
return mainPage.isPageComplete();
}
-
+
@Override
public boolean performFinish() {
String nameRule = mainPage.getNameRule();
String idRule = mainPage.getIdRule();
+ String aliasRule = mainPage.getAliasRule();
String imageIdRule = mainPage.getImageIdRule();
String ownerIdRule = mainPage.getOwnerIdRule();
String keyNameRule = mainPage.getKeyNameRule();
String realmRule = mainPage.getRealmRule();
String profileRule = mainPage.getProfileRule();
-
+
try {
- getDeltaCloud().updateInstanceFilter(nameRule + ";" + //$NON-NLS-1$
- idRule + ";" + //$NON-NLS-1$
- imageIdRule + ";" + //$NON-NLS-1$
- ownerIdRule + ";" + //$NON-NLS-1$
- keyNameRule + ";" + //$NON-NLS-1$
- realmRule + ";" + //$NON-NLS-1$
- profileRule);
+ getDeltaCloud().updateInstanceFilter(
+ nameRule, idRule, aliasRule, imageIdRule, ownerIdRule, keyNameRule, realmRule, profileRule);
} catch (Exception e) {
// TODO: internationalize strings
ErrorUtils.handleError(
"Error",
"Could not update filters", e, Display.getDefault().getActiveShell());
}
-
+
return true;
}
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 2011-02-03 10:55:48 UTC (rev 28959)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties 2011-02-03 10:59:00 UTC (rev 28960)
@@ -25,6 +25,7 @@
Url.label=URL:
Name.label=Name:
+Alias.label=Alias:
Type.label=Type:
UserName.label=Username:
Password.label=Password:
13 years, 11 months
JBoss Tools SVN: r28959 - trunk/jsf/docs/userguide/en-US.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2011-02-03 05:55:48 -0500 (Thu, 03 Feb 2011)
New Revision: 28959
Modified:
trunk/jsf/docs/userguide/en-US/Visual_Web_Tools.xml
trunk/jsf/docs/userguide/en-US/css_perspective.xml
trunk/jsf/docs/userguide/en-US/editors.xml
trunk/jsf/docs/userguide/en-US/palette.xml
trunk/jsf/docs/userguide/en-US/preferences.xml
trunk/jsf/docs/userguide/en-US/vwt_faq.xml
trunk/jsf/docs/userguide/en-US/web_projects.xml
Log:
Fix typos
Modified: trunk/jsf/docs/userguide/en-US/Visual_Web_Tools.xml
===================================================================
--- trunk/jsf/docs/userguide/en-US/Visual_Web_Tools.xml 2011-02-03 10:32:40 UTC (rev 28958)
+++ trunk/jsf/docs/userguide/en-US/Visual_Web_Tools.xml 2011-02-03 10:55:48 UTC (rev 28959)
@@ -121,9 +121,9 @@
<row>
<entry>Content Assist</entry>
- <entry>Code completion proposals while working with html, java, JavaScript , xml, jsp, xhtml, xhtml, seam project
- and jsf configuration files. Content assist based on project data (dynamic code assist); with
- graphical editor. Code completion for values from property files, beans attributes and
+ <entry>Code completion proposals while working with html, java, JavaScript , xml, jsp, xhtml, seam project
+ and jsf configuration files. Content assist based on project data (dynamic code assist). Code completion
+ for values from property files, beans attributes and
methods, navigation rule outcomes and jsf variables.</entry>
<entry>
<xref linkend="CodeAssistAndDynamicCodeAssist42BasedOnProjectData"/>
Modified: trunk/jsf/docs/userguide/en-US/css_perspective.xml
===================================================================
--- trunk/jsf/docs/userguide/en-US/css_perspective.xml 2011-02-03 10:32:40 UTC (rev 28958)
+++ trunk/jsf/docs/userguide/en-US/css_perspective.xml 2011-02-03 10:55:48 UTC (rev 28959)
@@ -9,16 +9,16 @@
</keywordset>
</chapterinfo>
<title>CSS Editing Perspective</title>
- <para>In this chapter we will discuss CSS Editing Perspective views,
- more information about style sheets can be found in
+ <para>In this chapter we will discuss CSS Editing Perspective views.
+ More information about style sheets can be found in
<xref linkend="pages_styling"/>
of Editor chapter.
</para>
<para>The CSS Editing Perspective combines a set of views which allow you to see the structure of
- your css files,edit them and see the results.
- To use this perspective you need to choose <emphasis><property>Window >Open Perspective> CSS Editing </property></emphasis>
- .All of the views are fully synchronized with each other:the changes being made in one view are reflected in othes at once.</para>
- <para>As you know, there are three ways of inserting a style sheet:
+ your css files, edit them and see the results.
+ To use this perspective you need to choose <emphasis><property>Window >Open Perspective> CSS Editing </property></emphasis>.
+ All of the views are fully synchronized with each other:the changes being made in one view are reflected in othes at once.</para>
+ <para>As you know there are three ways of inserting a style sheet:
</para>
<itemizedlist>
<listitem><para>External style sheet (.css file)</para>
@@ -29,7 +29,7 @@
</listitem>
</itemizedlist>
<para>Using CSS Editing Perspective you can change your style sheet,
- inserted in any of the possible places described before, in three ways:</para>
+ inserted in any of the possible places described before in three ways:</para>
<itemizedlist>
<listitem>
<para>directly in your Editor
@@ -57,8 +57,8 @@
<section id="OutlineView">
<?dbhtml filename="OutlineView.html"?>
<title>Outline view</title>
- <para>Using this view you can easily skip between the selectors described in the source files,
- see the list of properties in any selector just by clicking the triangle near it.
+ <para>Using this view you can easily skip between the selectors described in the source files.
+ See the list of properties in any selector just by clicking the triangle near it.
</para>
<figure>
@@ -165,7 +165,7 @@
</mediaobject>
</figure>
<para>
- When you click <emphasis><property>Ok</property></emphasis> the chosen fonts should appear in <emphasis><property>Font Family</property></emphasis> text field and in the sourse css file.
+ When you click <emphasis><property>Ok</property></emphasis> the choosen fonts should appear in <emphasis><property>Font Family</property></emphasis> text field and in the sourse css file.
To define other properties in CSS <emphasis><property>Text/Font</property></emphasis> tab you should just click button near the
corresponding field you want and select the appropriate option in the list.
Or if you are absolutely sure of the property's value to use you can just write it in the text field.
@@ -213,7 +213,7 @@
</figure>
</listitem>
<listitem>
- <para id="edited_properties"><emphasis><property>Edited Properties</property></emphasis> tab contains only "overflow-y" property,
+ <para id="edited_properties"><emphasis><property>Edited Properties</property></emphasis> tab contains only "overflow-y" property
which determines clipping of the element's content at the top and bottom edges.
</para>
<figure>
Modified: trunk/jsf/docs/userguide/en-US/editors.xml
===================================================================
--- trunk/jsf/docs/userguide/en-US/editors.xml 2011-02-03 10:32:40 UTC (rev 28958)
+++ trunk/jsf/docs/userguide/en-US/editors.xml 2011-02-03 10:55:48 UTC (rev 28959)
@@ -22,8 +22,8 @@
<title>Editors Features</title>
<para><property>JBoss Developer Studio</property> has powerful editor features that help you
easily navigate within your application and make use of content and code assist no
- matter what project file (<literal>.jsp</literal>, <literal>.xhtml</literal>, <literal
- >.xml</literal>, <literal>.css</literal>, etc.) you are working on.</para>
+ matter what type of project file (<literal>.jsp</literal>, <literal>.xhtml</literal>, <literal
+ >.xml</literal>, <literal>.css</literal> etc.) you are working on.</para>
<para>The mentioned features are the following:</para>
<itemizedlist>
<listitem>
@@ -73,13 +73,13 @@
</itemizedlist>
<section id="XMLFiles232">
<title>XML Files</title>
- <para>Press and hold down the <emphasis><property>Ctrl</property></emphasis> key. As you move the mouse cursor over different file references in the file, they display an underline. In this state these file references effectively become links, and when they are clicked the appropriate file will open in its own editor.</para>
+ <para>Press and hold down the <emphasis><property>Ctrl</property></emphasis> key. As you move the mouse cursor over different file references in the file, they display an underline. In this state these file references effectively become links and when they are clicked the appropriate file will open in its own editor.</para>
<para>Use the OpenOn functionality for the next entries defined in XML file:</para>
<orderedlist>
<listitem>
<para>Managed beans</para>
- <para>In this example the managed bean <emphasis><property
- >"User"</property></emphasis> will open.</para>
+ <para>In this example source code of the managed bean <emphasis><property
+ >"User"</property></emphasis> will be open.</para>
<figure>
<title>Opening a Managed Bean</title>
<mediaobject>
@@ -848,7 +848,7 @@
<section id="ContentAssistForJavaFiles">
<title>Content Assist for Java Files</title>
<para>Various tools tips provide you additional information about Java elements
- (JavaDocs, source classes, return types, method names, params, and etc.) when
+ (JavaDocs, source classes, return types, method names, params and etc.) when
working with java files.</para>
<figure>
<title>Content assist for JavaDoc</title>
@@ -996,11 +996,11 @@
</section>
<section id="FullControlOverSourceFiles-SynchronizedSourcAndVisualEditing74">
<title>Synchronized Source and Visual Editing</title>
- <para><property>JBoss Developer Studio</property> offers the ability to edit the source code of a file, as well as providing visual editors for many file types. The source code and visual editors can be viewed and edited at the same time in a split screen view, and any changes you make in the source code editor will immediately appear in the visual editor.</para>
+ <para><property>JBoss Developer Studio</property> offers the ability to edit the source code of a file, as well as providing visual editors for many file types. The source code and visual editors can be viewed and edited at the same time in a split screen view and any changes you make in the source code editor will immediately appear in the visual editor.</para>
<para>The JSF configuration file editor has three views: <property>Diagram</property>,
<property>Tree</property> and <property>Source</property>. All views are
- synchronized, and you can edit the file in any view.</para>
+ synchronized and you can edit the file in any view.</para>
<figure>
<title>Three Views are Synchronized</title>
<mediaobject>
@@ -1109,7 +1109,7 @@
these elements will open additional options that allow other specific elements to be added
in their appropriate positions.</para>
<para>The Properties view shows the property names and their values for a selected item. The
- values are editable; just select any value and click on the button that will appear to choose
+ values are editable just select any value and click on the button that will appear to choose
a new value. The key combination <property>Ctrl+Z</property> will return the previous
value, while <property>Ctrl+Y</property> will return the new value again. The Properties
view has additional options and can be set up to display categories and advanced
@@ -1800,7 +1800,7 @@
<para> When you open <emphasis>
<property>main.jsp</property>
</emphasis> in <property>Visual Page Editor</property>, it will not be able to
- resolve the image from the header, however, it will work fine in runtime. To fix
+ resolve the image from the header, however it will work fine in runtime. To fix
this in design time, click the <emphasis>
<property>Page Design Options</property>
</emphasis> button and set <emphasis>
@@ -1832,7 +1832,7 @@
</imageobject>
</mediaobject>
</figure>
- <para>Here bath in Source and Visual modes you see the EL expression
+ <para>Here both in Source and Visual modes you see the EL expression
<emphasis>#{user.name}</emphasis>. When you switch to <property>Preview
view</property>, you'll also see this expression. Now press <emphasis>
<property>Page Design Options</property>
@@ -2142,7 +2142,7 @@
</section>
<section id="SetupnotesforLinu895x">
<title>Setup notes for Linux</title>
- <para>Linux users who are going to use earlier then JBoss Tools 3.1.0.M4 versions may
+ <para>Linux users who are going to use earlier versions of JBoss Tools then 3.1.0.M4 may
need to do the following to get the <property>Visual Page Editor</property> to work
correctly on their machines.</para>
<para> The Visual Page Editor requires the library libstdc++.so.5. This library is
@@ -2166,13 +2166,13 @@
]]></programlisting>
</listitem>
<listitem>
- <para>On Debian based distributives run the following command: </para>
+ <para>On Debian based distributions run the following command: </para>
<programlisting role="JAVA"><![CDATA[apt-get install compat-libstdc++-33.i386
]]></programlisting>
</listitem>
</itemizedlist>
<para> In case you have the library installed and you still have issue with starting the
- visual page editor then close all browser views/editors and leave one visual page
+ Visual Page Editor then close all browser views/editors and leave one visual page
editor open and restart eclipse. This should force a load of the right XULRunner
viewer.</para>
<para> If it doesn't help and you use Fedora Core Linux and Eclipse Version: 3.4.1,the
@@ -2193,7 +2193,7 @@
location and add the following line: </para>
<programlisting role="JAVA"><![CDATA[-Dswt.library.path=/usr/lib/eclipse
]]></programlisting>
- <para>,where <code>/usr/lib/eclipse</code> is the path to your eclipse
+ <para>where <code>/usr/lib/eclipse</code> is the path to your eclipse
folder.</para>
</listitem>
</itemizedlist>
@@ -2241,12 +2241,12 @@
<section id="more_editors">
<title>More Editors</title>
<para>Besides Visual Page Editor JBDS is supplied with a huge range of various editors for
- different file types: properties, TLD, web.xml, tiles, and so on.</para>
+ different file types: properties, TLD, web.xml, tiles and so on.</para>
<section id="GraphicalPropertiesEditor">
<title>Graphical Properties Editor</title>
<para><property>The Properties editor</property> allows you to work in two different
modes and also supports unicode characters.</para>
- <para>To create a new properties file, in the Package Explorer view, select <emphasis>
+ <para>To create a new properties file in the Package Explorer view, select <emphasis>
<property>New > Properties File</property>
</emphasis> from the right-click context menu on the folder where you want to create
the file.</para>
@@ -2429,7 +2429,7 @@
<section id="ErrorCheckingAndValidation">
<title>Errors Checking and Validation</title>
<para>If errors occur anywhere in the file, small red dots will appear next to the
- lines where the errors occurred. Also, note that the file is marked by a small x
+ lines where the errors occurred. Also note that the file is marked by a small x
in the Package Explorer view.</para>
<figure>
<title>Errors Reporting</title>
@@ -2557,7 +2557,7 @@
</imageobject>
</mediaobject>
</figure>
- <para>In the Design viewer, you can drill down on an element by double-clicking on
+ <para>In the Design viewer you can drill down on an element by double-clicking on
it:</para>
<figure>
<title>Design Viewer in XSD Editor</title>
@@ -2613,9 +2613,9 @@
</figure>
<note>
<title>Note:</title>
- <para>On case you want to use your own DTD or XML Schema make sure that this DTD or
+ <para>In case you want to use your own DTD or XML Schema make sure that this DTD or
XML Schema is not listed in XML Catalog. If it is, you can't work with your DTD
- and XML Scheme and JBoss Tool,which uses this DTD or XML Schema. More
+ and XML Schema and JBoss Tool which uses this DTD or XML Schema. More
information about XML Catalog you can find in <ulink
url="http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.wst.xmledito..."
>Eclipse Documentation</ulink> and on <ulink
Modified: trunk/jsf/docs/userguide/en-US/palette.xml
===================================================================
--- trunk/jsf/docs/userguide/en-US/palette.xml 2011-02-03 10:32:40 UTC (rev 28958)
+++ trunk/jsf/docs/userguide/en-US/palette.xml 2011-02-03 10:55:48 UTC (rev 28959)
@@ -23,7 +23,7 @@
</itemizedlist>
<para>The JBoss Tools Palette contains a developer's project tag libraries and provides
possibility to add any tag libraries to it. Also you can choose a necessary one from the
- list of already existed tag libraries:</para>
+ list of already existing tag libraries:</para>
<itemizedlist>
<listitem>
<para>HTML</para>
@@ -62,22 +62,22 @@
<emphasis><property>Window > Show View Other... > JBoss Tools Web > JBoss Tools
Palette</property></emphasis> from the menu bar. </para>
<para>The standard <property>Eclipse Palette</property> is displayed by default in both Web Development and Seam
- perspectives. Now, the standard <property>Eclipse Palette</property> is featured with all <property>JBoss Tools Palette</property>
+ perspectives. Now the standard <property>Eclipse Palette</property> is featured with all <property>JBoss Tools Palette</property>
options and capabilities. </para>
<para>To open the standard <property>Eclipse Palette</property> navigate to <emphasis><property>Window->Show
View->Others->General->Palette</property></emphasis>. </para>
<para>The differences between the two palettes are as follows:</para>
<itemizedlist>
<listitem>
- <para>The standard <property>Eclipse Palette</property> is blank by default; the content of the palette
+ <para>The standard <property>Eclipse Palette</property> is blank by default. Content of the palette
is available only if Visual Page Editor is open and active, while JBoss Tools
Palette always contains a predefined set of components.</para>
</listitem>
<listitem>
<para>The Expanded/Collapsed state of components in the standard Eclipse Palette is
- not global as in JBoss Tools Palette: the state is associated with an instance
+ not global as in JBoss Tools Palette. State is associated with an instance
of Visual Page Editor. It means that the state can be different for various
- files, and each new file opened in Visual Page Editor will have the default
+ files and each new file opened in Visual Page Editor will have the default
state of Palette with all components collapsed. </para>
</listitem>
</itemizedlist>
@@ -85,7 +85,7 @@
<section id="PaletteOptions">
<?dbhtml filename="PaletteOptions.html"?>
<title>Palette Options</title>
- <para>To facilitate your work, you can configure the Palette in your own way, by selecting
+ <para>To facilitate your work, you can configure the Palette in your own way by selecting
the corresponding icon on the Palette toolbar.</para>
<para>There is a possibility to configure the JBoss Tools Palette:</para>
<itemizedlist>
@@ -94,10 +94,10 @@
changing the palette elements</para>
</listitem>
<listitem>
- <para> to <property>show/hide groups</property>, subgroups</para>
+ <para> to <property>show/hide</property> groups, subgroups</para>
</listitem>
<listitem>
- <para>to <property>import groups</property>, subgroups</para>
+ <para>to <property>import</property> groups, subgroups</para>
</listitem>
</itemizedlist>
<figure>
@@ -113,7 +113,7 @@
<title>Palette Editor</title>
<para>JBoss Tools Palette contains existing libraries of tags, thus the
<property>Palette editor</property> is intended to work with them or create your
- new one, as well.</para>
+ new one as well.</para>
<para>To open the editor, click on the <emphasis>
<property>Palette Editor</property>
</emphasis> icon(<inlinemediaobject> <imageobject>
@@ -170,7 +170,7 @@
</figure>
<para>Also you can delete the set. Right click on the set of icons that you wish
to remove and chose the <emphasis>
- <property>Delete Set</property>
+ <property>Delete</property>
</emphasis> option from the pop-up menu or click the <emphasis>
<property>Delete</property>
</emphasis> keyboard button.</para>
@@ -214,7 +214,7 @@
</imageobject>
</mediaobject>
</figure>
- <para>You are allowed to edit or delete a group, as well. If you'd like
+ <para>You are allowed to edit or delete a group as well. If you'd like
to change attributes of a group, use the right editing window of the palette
editor or the <emphasis>
<property>Edit...</property>
@@ -280,7 +280,7 @@
</imageobject>
</mediaobject>
</figure>
- <para>In the <property>Add Palette Macro</property> window, you can configure
+ <para>In the <property>Add Palette Macro</property> window you can configure
the tag element. Attribute <emphasis>
<property>Name</property>
</emphasis> is mandatory to fill and it will be the name of the tag element.
@@ -330,7 +330,7 @@
</itemizedlist>
- <para>If you have changed any abject in the tree view and you don't like the final result you can always use the <emphasis><property>Restore Defaults</property></emphasis> button. Click on it will restore defaults for the object selected and for its children elements. Please remember that the button will only restore data for objects defined in the default palette. If selected object is created by you, the button will be disabled. Child objects added by you will not be removed.</para>
+ <para>If you have changed any object in the tree view and you don't like the final result you can always use the <emphasis><property>Restore Defaults</property></emphasis> button. Click on it will restore defaults for the object selected and for its children elements. Please remember that the button will only restore data for objects defined in the default palette. If selected object is created by you, the button will be disabled. Child objects added by you will not be removed.</para>
<para>When updating JBoss Tools the palette content is not updated.</para>
</section>
<section id="show_hide">
@@ -405,11 +405,11 @@
<para>A new tag can be added into any text file including jsp, htm, html and xhtml.</para>
<para>Let's do it. Open your JSP file and place the cursor in a place where
you'd like to add a tag and then click that tag in the palette. In the
- <property>Insert Tag</property> window, that appears, you can set the value of<emphasis>
+ <property>Insert Tag</property> window that appears, you can set the value of<emphasis>
<property>general</property>
</emphasis> and <emphasis>
<property>advanced</property>
- </emphasis> attributes of the tag that you chose.</para>
+ </emphasis> attributes of the tag that you choose.</para>
<figure>
<title>Inserting Tag</title>
<mediaobject>
@@ -418,7 +418,7 @@
</imageobject>
</mediaobject>
</figure>
- <para>In the example below, the <emphasis>
+ <para>In the example below the <emphasis>
<property>commandButton</property>
</emphasis> tag has been inserted.</para>
<figure>
@@ -450,7 +450,7 @@
</figure>
<para> Above you can see where the cursor position for <emphasis>
<property>HTML > Form > input</property>
- </emphasis> is set. Thus, after adding this tag into your file the cursor will be in
+ </emphasis> is set. Thus after adding this tag into your file the cursor will be in
the attribute "type". Then, you can straight use the combination
of buttons <property>Ctrl + Space</property> to inquire about a prompting. </para>
<figure>
@@ -484,7 +484,7 @@
</emphasis> that includes your tag library under the lib folder in your project.
Or you can just add <emphasis> <property>".tld"</property>
</emphasis>or <emphasis>
- <property>".jar"</property></emphasis> file to the classpath , and the library will be added to the Tag Library List in Web Projects View.</para>
+ <property>".jar"</property></emphasis> file to the classpath and the library will be added to the Tag Library List in Web Projects View.</para>
<section id="Drag_and_Drop65332">
<?dbhtml filename="DragAndDrop.html"?>
<title>Drag-and-Drop</title>
@@ -511,7 +511,7 @@
<property>prefix</property>
</emphasis> of the library and <emphasis>
<property>Library URL</property>
- </emphasis> are detected, thus just need to set the <emphasis>
+ </emphasis> are detected thus just need to set the <emphasis>
<property>Group</property>
</emphasis> name to which you wish to place this tag library. You can either add
this tag library to an existing Group or just create a new one.</para>
Modified: trunk/jsf/docs/userguide/en-US/preferences.xml
===================================================================
--- trunk/jsf/docs/userguide/en-US/preferences.xml 2011-02-03 10:32:40 UTC (rev 28958)
+++ trunk/jsf/docs/userguide/en-US/preferences.xml 2011-02-03 10:55:48 UTC (rev 28959)
@@ -240,7 +240,7 @@
</row>
<row>
- <entry>Show node in all proejcts</entry>
+ <entry>Show node in all projects</entry>
<entry>Selecting this setting enables the Projects Archiving view to show
node in all projects.</entry>
<entry>Off</entry>
@@ -348,7 +348,7 @@
<row>
<entry>Show warning when project has no JBoss Tools capabilities</entry>
- <entry>Check this option to be sure that any JBoss Tools editor fully
+ <entry>Check this option to be sure that any JBoss Tools editor is fully
available for a particular type of file. If no, you'll be
warned about this.</entry>
<entry>On</entry>
@@ -565,7 +565,7 @@
</row>
<row>
- <entry>Edit</entry>
+ <entry>Export</entry>
<entry>Allows you to export all selected templates to the file system. </entry>
</row>
</tbody>
@@ -767,7 +767,7 @@
<para>The first two items control the background grid for the diagram. The next two items
allow you to control the appearance of the labels for views (pages) and the transitions
- between views. For these two items, clicking the <emphasis>
+ between views. For these two items clicking the <emphasis>
<property>Change... </property>
</emphasis>button allows you to assign a font with a dialog box.</para>
@@ -775,10 +775,10 @@
transition connecting it to another view yet should be written to the source code as a
partial navigation rule. The next check box determines whether the diagram cursor
reverts immediately to the standard selection mode after it's used in the
- transition-drawing mode to draw a transition. Finally, the last two check boxes concern
+ transition-drawing mode to draw a transition. Finally the last two check boxes concern
shortcuts. A shortcut is a transition that is there but isn't actually displayed in the
diagram as going all the way to the target view it's connected to, in order to make the
- diagram clearer. With the check boxes, you can decide whether to display a small
+ diagram clearer. With the check boxes you can decide whether to display a small
shortcut icon as part of the shortcut and also whether to display the target view as a
label or not.</para>
<figure>
@@ -789,7 +789,7 @@
</imageobject>
</mediaobject>
</figure>
- <para>Selecting the Add Page tab in the JSF Flow Diagram screen allows you to determine the
+ <para>Selecting the Add View tab in the JSF Flow Diagram screen allows you to determine the
default template and file extension for views (pages) you add directly into the diagram
using a context menu or the view-adding mode of the diagram cursor.</para>
</section>
@@ -809,7 +809,7 @@
</mediaobject>
</figure>
- <para>On this page you can determine the format for a text output near the decoration label
+ <para>On this page you can determine the format for a text output near to the decoration label
for different Web resources. To change the value for selected element, click <emphasis>
<property>Add Variable...</property>
</emphasis> button next to <emphasis>
@@ -875,7 +875,7 @@
<para>In order to customize the layout of the Diagram used for editing and composing <property>page.xml</property> file in <property>Graphical mode</property> of <property>Seam Pages Editor</property> you can go to
- <property>Window > Preferences > JBoss Tools > Web > Seam > Editors > Seam Pages Diagram</property>.
+ <property>Window > Preferences > JBoss Tools > Web > Editors > Seam Pages Diagram</property>.
</para>
<figure>
@@ -955,7 +955,7 @@
<?dbhtml filename="ResourceInsets.html"?>
<title>Resource Insets</title>
<para>To see Resource Insets preference page select <emphasis>
- <property>JBoss Tools > Web > Strats > Automation > Resource Insets</property>
+ <property>JBoss Tools > Web > Struts > Automation > Resource Insets</property>
</emphasis>.</para>
<para>On <emphasis>
<property>Resource Insets</property>
Modified: trunk/jsf/docs/userguide/en-US/vwt_faq.xml
===================================================================
--- trunk/jsf/docs/userguide/en-US/vwt_faq.xml 2011-02-03 10:32:40 UTC (rev 28958)
+++ trunk/jsf/docs/userguide/en-US/vwt_faq.xml 2011-02-03 10:55:48 UTC (rev 28959)
@@ -25,7 +25,7 @@
</listitem>
<listitem>
- <para>On Debian based distributives run the following command: </para>
+ <para>On Debian based distributions run the following command: </para>
<programlisting role="JAVA"><![CDATA[apt-get install compat-libstdc++-33.i386
]]></programlisting>
</listitem>
@@ -35,7 +35,7 @@
<property>Visual Page Editor</property> then close all browser views/editors and leave one <property>Visual Page
Editor</property> open and restart eclipse. This should force a load of the right XULRunner
viewer.</para>
- <para> If it doesn't help and you use Fedora Core Linux and Eclipse Version: 3.4.1,the issue can be produced because libswt-xulrunner-gtk-3449.so file doesn't present
+ <para> If it doesn't help and you use Fedora Core Linux and Eclipse Version: 3.4.1, the issue can be produced because libswt-xulrunner-gtk-3449.so file doesn't present
in eclipse-swt-3.4.1-5.fc10.x86_64.rpm/eclipse/plugins/org.eclipse.swt.gtk.linux.x86_64_3.4.1.v3449c.jar.To add this file to eclipse you should:
</para>
<itemizedlist>
@@ -94,7 +94,7 @@
</orderedlist>
<para>
-If you are shure that your project does not need JSF capabilities, just disable this message box by checking <property>Do not show this dialog again!</property> checkbox.
+If you are sure that your project does not need JSF capabilities, just disable this message box by checking <property>Do not show this dialog again!</property> checkbox.
</para>
</section>
Modified: trunk/jsf/docs/userguide/en-US/web_projects.xml
===================================================================
--- trunk/jsf/docs/userguide/en-US/web_projects.xml 2011-02-03 10:32:40 UTC (rev 28958)
+++ trunk/jsf/docs/userguide/en-US/web_projects.xml 2011-02-03 10:55:48 UTC (rev 28959)
@@ -4,7 +4,7 @@
<title>Web Projects View</title>
<para><property>Web Projects</property> is a special view that comes with JBoss Developer Studio.</para>
<para>If the Web Projects view's tab is not visible next to the Package Explorer tab, select <emphasis><property>Window > Show View > Other > JBoss Tools Web > Web Projects</property></emphasis> from the menu bar.</para>
-<para>With the Web Projects view, you can:</para>
+<para>With the Web Projects view you can:</para>
<itemizedlist>
<listitem><para>Visualize the project better because the project artifacts for JSF, Struts and Seam projects are organized and displayed by function.</para></listitem>
@@ -76,7 +76,7 @@
</imageobject>
</mediaobject>
</figure>
-<para>You can actually place the tag anywhere in the page, not just inside an existing tag. In this case,
+<para>You can actually place the tag anywhere in the page, not just inside an existing tag. In this case
JBoss Developer Studio will place the complete tag <code><h:outputText value="#{Message.header}"/></code> in the page.</para>
</section>
<section id="ForManagedBeanAttributes">
13 years, 11 months
JBoss Tools SVN: r28958 - trunk/hibernatetools/docs/reference/en-US.
by jbosstools-commits@lists.jboss.org
Author: jpeterka
Date: 2011-02-03 05:32:40 -0500 (Thu, 03 Feb 2011)
New Revision: 28958
Modified:
trunk/hibernatetools/docs/reference/en-US/setup.xml
Log:
[hibernatedoc] Inaccurate&Unsupported dropins installation paragraph removed
Modified: trunk/hibernatetools/docs/reference/en-US/setup.xml
===================================================================
--- trunk/hibernatetools/docs/reference/en-US/setup.xml 2011-02-03 10:10:17 UTC (rev 28957)
+++ trunk/hibernatetools/docs/reference/en-US/setup.xml 2011-02-03 10:32:40 UTC (rev 28958)
@@ -6,75 +6,19 @@
</para>
<note>
<title>Note:</title>
- <para>The <productname>Hibernate Tools 3.3.0</productname> (the current release version) requires Eclipse Galileo 3.5.</para>
+ <para>The <productname>Hibernate Tools 3.4.0</productname> (the current release version) requires Eclipse Helios (3.6).</para>
</note>
<section>
<title>JBoss Tools</title>
<para>
- <productname>JBoss Tools 3.2.0</productname> (the latest release) includes <productname>Hibernate Tools 3.3.0</productname> and thus no additional steps are required beyond downloading and installing <productname>JBoss Tools</productname>. If you need to update to a newer version of the <productname>Hibernate Tools</productname> just follow the instructions in <xref linkend="eclipse_ide"/>.
+ <productname>JBoss Tools 3.4.0</productname> (the latest release) includes <productname>Hibernate Tools 3.3.0</productname> and thus no additional steps are required beyond downloading and installing <productname>JBoss Tools</productname>. If you need to update to a newer version of the <productname>Hibernate Tools</productname> just follow the instructions in <xref linkend="eclipse_ide"/>.
</para>
</section>
<section id="eclipse_ide">
<title>Eclipse IDE</title>
<para>
- To install the <productname>Hibernate Tools</productname> into any <productname>Eclipse 3.5</productname> based IDE you can either use the <ulink url="http://download.jboss.org/jbosstools/updates/stable/">JBoss Tools Update Site</ulink> or install it manually.
+ To install the <productname>Hibernate Tools</productname> into any <productname>Eclipse 3.6</productname> based IDE you can either use the <ulink url="http://download.jboss.org/jbosstools/updates/stable/">JBoss Tools Update Site</ulink>.
</para>
- <para>If you want to install the <property>Hibernate Tools</property> distribution manually you need to:</para>
- <itemizedlist>
- <listitem>
- <para>Download from www.eclipse.org:</para>
- <itemizedlist>
- <listitem>
- <para>birt-report-framework-2_5_0.zip</para>
- </listitem>
- <listitem>
- <para>birt-wtp-integration-sdk-2_3_2.zip</para>
- </listitem>
- <listitem>
- <para>dtp-sdk_1.7.0.zip</para>
- </listitem>
- <listitem>
- <para>eclipse-SDK-3.5-win32.zip</para>
- </listitem>
- <listitem>
- <para>emf-runtime-2.5.0.zip</para>
- </listitem>
- <listitem>
- <para>GEF-SDK-3.5.0.zip</para>
- </listitem>
- <listitem>
- <para>org.eclipse.swtbot.eclipse.test-2.0.0.371-dev-e35.zip</para>
- </listitem>
- <listitem>
- <para>org.eclipse.swtbot.eclipse-2.0.0.340-dev.zip</para>
- </listitem>
- <listitem>
- <para>site-1.6.2.zip</para>
- </listitem>
- <listitem>
- <para>tptp.sdk-TPTP-4.6.0.zip</para>
- </listitem>
- <listitem>
- <para>wtp-sdk-R-3.1-20090616035105.zip</para>
- </listitem>
- <listitem>
- <para>xsd-runtime-2.5.0.zip</para>
- </listitem>
- </itemizedlist>
- </listitem>
- <listitem>
- <para>Unpack these files into the <productname>Eclipse</productname> install folder.</para>
- </listitem>
- <listitem>
- <para>
- Download <ulink url="http://downloads.sourceforge.net/project/jboss/JBossTools/JBossTools3.1.0...">Hibernate Tools</ulink>from <ulink url="https://www.hibernate.org/6.html">hibernate.org-Download Overview</ulink>.
- </para>
-
- </listitem>
- <listitem>
- <para>Unpack <property>Hibernate Tools</property> in the <filename>eclipse/dropins</filename> folder</para>
- </listitem>
- </itemizedlist>
<note>
<title>Note:</title>
<para>
13 years, 11 months