JBoss Tools SVN: r28473 - in trunk/cdi: plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2011-01-21 11:08:25 -0500 (Fri, 21 Jan 2011)
New Revision: 28473
Added:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/TestableResolutionWithSelectionWizard.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Animal.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Armchiar.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Chiar.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Couch.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Cow.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Cupboard.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Desk.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Dog.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Farm_Broken1.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Farm_Broken2.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Furniture.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/HighStool.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/HomeFurniture.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/OfficeFurniture.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Office_Broken1.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Office_Broken2.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Sheep.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/SmallFarmAnimals.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Sofa.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Stool.java
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeInjectedPointUnambiguousMarkerResolution.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/SelectBeanMarkerResolution.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/AddQualifiersToBeanComposite.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/AddQualifiersToBeanWizard.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/AddQualifiersToBeanWizardPage.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/SelectBeanWizard.java
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIMarkerResolutionTest.java
Log:
https://issues.jboss.org/browse/JBIDE-7635
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeInjectedPointUnambiguousMarkerResolution.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeInjectedPointUnambiguousMarkerResolution.java 2011-01-21 14:48:16 UTC (rev 28472)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/MakeInjectedPointUnambiguousMarkerResolution.java 2011-01-21 16:08:25 UTC (rev 28473)
@@ -11,6 +11,7 @@
package org.jboss.tools.cdi.ui.marker;
import java.text.MessageFormat;
+import java.util.ArrayList;
import java.util.List;
import java.util.Set;
@@ -33,7 +34,7 @@
/**
* @author Daniel Azarov
*/
-public class MakeInjectedPointUnambiguousMarkerResolution implements IMarkerResolution2 {
+public class MakeInjectedPointUnambiguousMarkerResolution implements IMarkerResolution2, TestableResolutionWithSelectionWizard {
private String label;
private IInjectionPoint injectionPoint;
private List<IBean> beans;
@@ -49,17 +50,50 @@
public String getLabel() {
return label;
}
+
+ public void selectFirstElementAndRun(IMarker marker){
+ internal_run(marker, true);
+ }
+
+ public void run(IMarker marker) {
+ internal_run(marker, false);
+ }
- public void run(IMarker marker) {
+ private void internal_run(IMarker marker, boolean test) {
if(checkBeans()){
Shell shell = Workbench.getInstance().getActiveWorkbenchWindow().getShell();
AddQualifiersToBeanWizard wizard = new AddQualifiersToBeanWizard(injectionPoint, beans, selectedBean);
WizardDialog dialog = new WizardDialog(shell, wizard);
- int status = dialog.open();
- if(status != WizardDialog.OK)
- return;
- List<IQualifier> deployed = wizard.getDeployedQualifiers();
+ List<IQualifier> deployed;
+
+ if(test){
+ dialog.setBlockOnOpen(false);
+ dialog.open();
+
+ List<IQualifier> qualifiers = new ArrayList<IQualifier>();
+ qualifiers.addAll(wizard.getAvailableQualifiers());
+ if(qualifiers.isEmpty())
+ return;
+ for(IQualifier qualifier : qualifiers){
+ if(wizard.checkBeans())
+ break;
+ wizard.deploy(qualifier);
+ }
+ deployed = wizard.getDeployedQualifiers();
+ wizard.performCancel();
+ dialog.close();
+ }else{
+ int status = dialog.open();
+
+ if(status != WizardDialog.OK)
+ return;
+
+ deployed = wizard.getDeployedQualifiers();
+ }
+
+
+ deployed = wizard.getDeployedQualifiers();
MarkerResolutionUtils.addQualifiersToBean(deployed, selectedBean);
try {
Job.getJobManager().join(ResourcesPlugin.FAMILY_AUTO_BUILD, null);
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/SelectBeanMarkerResolution.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/SelectBeanMarkerResolution.java 2011-01-21 14:48:16 UTC (rev 28472)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/SelectBeanMarkerResolution.java 2011-01-21 16:08:25 UTC (rev 28473)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.cdi.ui.marker;
+import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.resources.IMarker;
@@ -30,7 +31,7 @@
/**
* @author Daniel Azarov
*/
-public class SelectBeanMarkerResolution implements IMarkerResolution2 {
+public class SelectBeanMarkerResolution implements IMarkerResolution2, TestableResolutionWithSelectionWizard {
private String label;
private IInjectionPoint injectionPoint;
private List<IBean> beans;
@@ -45,17 +46,55 @@
return label;
}
+ public void selectFirstElementAndRun(IMarker marker){
+ internal_run(marker, true);
+ }
+
public void run(IMarker marker) {
+ internal_run(marker, false);
+ }
+
+ private void internal_run(IMarker marker, boolean test) {
Shell shell = Workbench.getInstance().getActiveWorkbenchWindow().getShell();
SelectBeanWizard wizard = new SelectBeanWizard(injectionPoint, beans);
WizardDialog dialog = new WizardDialog(shell, wizard);
- int status = dialog.open();
- if(status != WizardDialog.OK)
- return;
- IBean selectedBean = wizard.getBean();
+ IBean selectedBean = null;
+ List<IQualifier> deployed;
- List<IQualifier> deployed = wizard.getDeployedQualifiers();
+ if(test){
+ if(beans.isEmpty())
+ return;
+
+ dialog.setBlockOnOpen(false);
+ dialog.open();
+
+ selectedBean = beans.get(0);
+
+ wizard.init(selectedBean);
+
+ List<IQualifier> qualifiers = new ArrayList<IQualifier>();
+ qualifiers.addAll(wizard.getAvailableQualifiers());
+ if(qualifiers.isEmpty())
+ return;
+ for(IQualifier qualifier : qualifiers){
+ if(wizard.checkBeans())
+ break;
+ wizard.deploy(qualifier);
+ }
+ deployed = wizard.getDeployedQualifiers();
+ wizard.performCancel();
+ dialog.close();
+ }else{
+ int status = dialog.open();
+
+ if(status != WizardDialog.OK)
+ return;
+
+ selectedBean = wizard.getBean();
+ deployed = wizard.getDeployedQualifiers();
+ }
+
MarkerResolutionUtils.addQualifiersToBean(deployed, selectedBean);
try {
Job.getJobManager().join(ResourcesPlugin.FAMILY_AUTO_BUILD, null);
Added: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/TestableResolutionWithSelectionWizard.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/TestableResolutionWithSelectionWizard.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/TestableResolutionWithSelectionWizard.java 2011-01-21 16:08:25 UTC (rev 28473)
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * 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.cdi.ui.marker;
+
+import org.eclipse.core.resources.IMarker;
+
+/**
+ * @author Daniel Azarov
+ */
+public interface TestableResolutionWithSelectionWizard {
+ public void selectFirstElementAndRun(IMarker marker);
+}
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/TestableResolutionWithSelectionWizard.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/AddQualifiersToBeanComposite.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/AddQualifiersToBeanComposite.java 2011-01-21 14:48:16 UTC (rev 28472)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/AddQualifiersToBeanComposite.java 2011-01-21 16:08:25 UTC (rev 28473)
@@ -77,7 +77,7 @@
private Button remove, removeAll;
private Label nLabel;
-
+
protected boolean isComplete = true;
public AddQualifiersToBeanComposite(Composite parent, WizardPage wizard) {
@@ -155,7 +155,7 @@
});
}
- private boolean checkBeans(){
+ public boolean checkBeans(){
total.clear();
total.addAll(originalQualifiers);
total.addAll(deployed);
@@ -540,7 +540,16 @@
return total;
}
+
+ public void deploy(IQualifier qualifier){
+ IQualifier[] qualifiers = new IQualifier[]{qualifier};
+ moveAll(qualifiers, true);
+ }
+ public ArrayList<IQualifier> getAvailableQualifiers(){
+ return qualifiers;
+ }
+
class QualifiersListLabelProvider implements ILabelProvider{
public void addListener(ILabelProviderListener listener) {
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/AddQualifiersToBeanWizard.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/AddQualifiersToBeanWizard.java 2011-01-21 14:48:16 UTC (rev 28472)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/AddQualifiersToBeanWizard.java 2011-01-21 16:08:25 UTC (rev 28473)
@@ -42,4 +42,15 @@
return page.getDeployedQualifiers();
}
+ public List<IQualifier> getAvailableQualifiers(){
+ return page.getAvailableQualifiers();
+ }
+
+ public void deploy(IQualifier qualifier){
+ page.deploy(qualifier);
+ }
+
+ public boolean checkBeans(){
+ return page.checkBeans();
+ }
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/AddQualifiersToBeanWizardPage.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/AddQualifiersToBeanWizardPage.java 2011-01-21 14:48:16 UTC (rev 28472)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/AddQualifiersToBeanWizardPage.java 2011-01-21 16:08:25 UTC (rev 28473)
@@ -21,7 +21,7 @@
public class AddQualifiersToBeanWizardPage extends WizardPage{
private AddQualifiersToBeanComposite composite;
-
+
protected AddQualifiersToBeanWizardPage(String pageName) {
super(pageName);
setTitle(CDIUIMessages.ADD_QUALIFIERS_TO_BEAN_WIZARD_TITLE);
@@ -35,9 +35,20 @@
public ArrayList<IQualifier> getDeployedQualifiers(){
return composite.getDeployedQualifiers();
}
+
+ public ArrayList<IQualifier> getAvailableQualifiers(){
+ return composite.getAvailableQualifiers();
+ }
public void init(IBean bean){
composite.init(bean);
}
+ public void deploy(IQualifier qualifier){
+ composite.deploy(qualifier);
+ }
+
+ public boolean checkBeans(){
+ return composite.checkBeans();
+ }
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/SelectBeanWizard.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/SelectBeanWizard.java 2011-01-21 14:48:16 UTC (rev 28472)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/SelectBeanWizard.java 2011-01-21 16:08:25 UTC (rev 28473)
@@ -56,10 +56,27 @@
page = new AddQualifiersToBeanWizardPage("");
addPage(page);
}
+
public java.util.List<IQualifier> getDeployedQualifiers(){
return page.getDeployedQualifiers();
}
+ public java.util.List<IQualifier> getAvailableQualifiers(){
+ return page.getAvailableQualifiers();
+ }
+
+ public void init(IBean bean){
+ page.init(bean);
+ }
+
+ public void deploy(IQualifier qualifier){
+ page.deploy(qualifier);
+ }
+
+ public boolean checkBeans(){
+ return page.checkBeans();
+ }
+
@Override
public boolean performFinish() {
return true;
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Animal.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Animal.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Animal.java 2011-01-21 16:08:25 UTC (rev 28473)
@@ -0,0 +1,22 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+interface Animal
+{
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Animal.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Armchiar.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Armchiar.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Armchiar.java 2011-01-21 16:08:25 UTC (rev 28473)
@@ -0,0 +1,5 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+public class Armchiar implements Furniture {
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Armchiar.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Chiar.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Chiar.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Chiar.java 2011-01-21 16:08:25 UTC (rev 28473)
@@ -0,0 +1,5 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+public class Chiar implements Furniture {
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Chiar.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Couch.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Couch.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Couch.java 2011-01-21 16:08:25 UTC (rev 28473)
@@ -0,0 +1,5 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+public class Couch implements Furniture {
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Couch.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Cow.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Cow.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Cow.java 2011-01-21 16:08:25 UTC (rev 28473)
@@ -0,0 +1,22 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+class Cow implements Animal
+{
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Cow.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Cupboard.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Cupboard.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Cupboard.java 2011-01-21 16:08:25 UTC (rev 28473)
@@ -0,0 +1,5 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+public class Cupboard implements Furniture {
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Cupboard.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Desk.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Desk.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Desk.java 2011-01-21 16:08:25 UTC (rev 28473)
@@ -0,0 +1,5 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+public class Desk implements Furniture {
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Desk.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Dog.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Dog.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Dog.java 2011-01-21 16:08:25 UTC (rev 28473)
@@ -0,0 +1,5 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+public class Dog implements Animal {
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Dog.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Farm_Broken1.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Farm_Broken1.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Farm_Broken1.java 2011-01-21 16:08:25 UTC (rev 28473)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.inject.Inject;
+
+
+public class Farm_Broken1 {
+ @SuppressWarnings("unused")
+ @Inject private Animal animal;
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Farm_Broken1.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Farm_Broken2.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Farm_Broken2.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Farm_Broken2.java 2011-01-21 16:08:25 UTC (rev 28473)
@@ -0,0 +1,8 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.inject.Inject;
+
+public class Farm_Broken2 {
+ @SuppressWarnings("unused")
+ @Inject @SmallFarmAnimals private Animal animal2;
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Farm_Broken2.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Furniture.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Furniture.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Furniture.java 2011-01-21 16:08:25 UTC (rev 28473)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+interface Furniture
+{
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Furniture.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/HighStool.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/HighStool.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/HighStool.java 2011-01-21 16:08:25 UTC (rev 28473)
@@ -0,0 +1,5 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+public class HighStool extends Stool {
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/HighStool.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/HomeFurniture.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/HomeFurniture.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/HomeFurniture.java 2011-01-21 16:08:25 UTC (rev 28473)
@@ -0,0 +1,21 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Qualifier
+@Target({ TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+public @interface HomeFurniture {
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/HomeFurniture.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/OfficeFurniture.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/OfficeFurniture.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/OfficeFurniture.java 2011-01-21 16:08:25 UTC (rev 28473)
@@ -0,0 +1,21 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Qualifier
+@Target({ TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+public @interface OfficeFurniture {
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/OfficeFurniture.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Office_Broken1.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Office_Broken1.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Office_Broken1.java 2011-01-21 16:08:25 UTC (rev 28473)
@@ -0,0 +1,8 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.inject.Inject;
+
+public class Office_Broken1 {
+ @SuppressWarnings("unused")
+ @Inject private Furniture furniture;
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Office_Broken1.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Office_Broken2.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Office_Broken2.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Office_Broken2.java 2011-01-21 16:08:25 UTC (rev 28473)
@@ -0,0 +1,8 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import javax.inject.Inject;
+
+public class Office_Broken2 {
+ @SuppressWarnings("unused")
+ @Inject @OfficeFurniture private Furniture officeFurniture;
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Office_Broken2.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Sheep.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Sheep.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Sheep.java 2011-01-21 16:08:25 UTC (rev 28473)
@@ -0,0 +1,22 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+class Sheep implements Animal
+{
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Sheep.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/SmallFarmAnimals.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/SmallFarmAnimals.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/SmallFarmAnimals.java 2011-01-21 16:08:25 UTC (rev 28473)
@@ -0,0 +1,21 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Qualifier
+@Target({ TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+public @interface SmallFarmAnimals {
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/SmallFarmAnimals.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Sofa.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Sofa.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Sofa.java 2011-01-21 16:08:25 UTC (rev 28473)
@@ -0,0 +1,5 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+public class Sofa implements Furniture {
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Sofa.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Stool.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Stool.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Stool.java 2011-01-21 16:08:25 UTC (rev 28473)
@@ -0,0 +1,5 @@
+package org.jboss.jsr299.tck.tests.jbt.quickfixes;
+
+public class Stool implements Furniture {
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/quickfixes/Stool.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIMarkerResolutionTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIMarkerResolutionTest.java 2011-01-21 14:48:16 UTC (rev 28472)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIMarkerResolutionTest.java 2011-01-21 16:08:25 UTC (rev 28473)
@@ -33,9 +33,12 @@
import org.jboss.tools.cdi.ui.marker.DeleteAllDisposerDuplicantMarkerResolution;
import org.jboss.tools.cdi.ui.marker.DeleteAllInjectedConstructorsMarkerResolution;
import org.jboss.tools.cdi.ui.marker.MakeFieldStaticMarkerResolution;
+import org.jboss.tools.cdi.ui.marker.MakeInjectedPointUnambiguousMarkerResolution;
import org.jboss.tools.cdi.ui.marker.MakeMethodBusinessMarkerResolution;
import org.jboss.tools.cdi.ui.marker.MakeMethodPublicMarkerResolution;
+import org.jboss.tools.cdi.ui.marker.SelectBeanMarkerResolution;
import org.jboss.tools.cdi.ui.marker.TestableResolutionWithRefactoringProcessor;
+import org.jboss.tools.cdi.ui.marker.TestableResolutionWithSelectionWizard;
import org.jboss.tools.common.util.FileUtil;
import org.jboss.tools.test.util.JobUtils;
@@ -97,14 +100,23 @@
CompositeChange rootChange = (CompositeChange)processor.createChange(new NullProgressMonitor());
rootChange.perform(new NullProgressMonitor());
+ }else if(resolution instanceof TestableResolutionWithSelectionWizard){
+ ((TestableResolutionWithSelectionWizard)resolution).selectFirstElementAndRun(marker);
}else{
resolution.run(marker);
}
refresh(project);
- IMarker[] newMarkers = file.findMarkers(markerType, true, IResource.DEPTH_INFINITE);
+ IMarker[] newMarkers = file.findMarkers(markerType, true, IResource.DEPTH_INFINITE);
+ System.out.println("Before: "+markers.length+" after: "+newMarkers.length);
+
+ for(IMarker m : newMarkers){
+ String text = (String)m.getAttribute(IMarker.TEXT,"none");
+ System.out.println("After quick fix: "+text);
+ }
+
assertTrue("Marker resolution did not decrease number of problems. was: "+markers.length+" now: "+newMarkers.length, newMarkers.length < markers.length);
checkResults(project, fileNames, results);
@@ -367,4 +379,48 @@
DeleteAllInjectedConstructorsMarkerResolution.class);
}
+ public void testMakeInjectedPointUnambiguousResolution() throws CoreException {
+ checkResolution(tckProject,
+ new String[]{
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/Farm_Broken1.java"
+ },
+ MARKER_TYPE,
+ CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
+ CDIValidationErrorManager.AMBIGUOUS_INJECTION_POINTS_ID,
+ MakeInjectedPointUnambiguousMarkerResolution.class);
+ }
+
+ public void testSelectBeanResolution() throws CoreException {
+ checkResolution(tckProject,
+ new String[]{
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/Office_Broken1.java"
+ },
+ MARKER_TYPE,
+ CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
+ CDIValidationErrorManager.AMBIGUOUS_INJECTION_POINTS_ID,
+ SelectBeanMarkerResolution.class);
+ }
+
+ public void testMakeInjectedPointUnambiguousResolution2() throws CoreException {
+ checkResolution(tckProject,
+ new String[]{
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/Farm_Broken2.java"
+ },
+ MARKER_TYPE,
+ CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
+ CDIValidationErrorManager.UNSATISFIED_INJECTION_POINTS_ID,
+ MakeInjectedPointUnambiguousMarkerResolution.class);
+ }
+
+ public void testSelectBeanResolution2() throws CoreException {
+ checkResolution(tckProject,
+ new String[]{
+ "JavaSource/org/jboss/jsr299/tck/tests/jbt/quickfixes/Office_Broken2.java"
+ },
+ MARKER_TYPE,
+ CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME,
+ CDIValidationErrorManager.UNSATISFIED_INJECTION_POINTS_ID,
+ SelectBeanMarkerResolution.class);
+ }
+
}
13 years, 9 months
JBoss Tools SVN: r28472 - in trunk/documentation/whatsnew/teiid: images and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: blafond
Date: 2011-01-21 09:48:16 -0500 (Fri, 21 Jan 2011)
New Revision: 28472
Added:
trunk/documentation/whatsnew/teiid/images/new-teiid-instance-dialog.png
trunk/documentation/whatsnew/teiid/teiid-news-7.1.0.CR1.html
Log:
JBDS-8172 Added Teiid Designer N&N for CR1 release
Added: trunk/documentation/whatsnew/teiid/images/new-teiid-instance-dialog.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/teiid/images/new-teiid-instance-dialog.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/teiid/teiid-news-7.1.0.CR1.html
===================================================================
--- trunk/documentation/whatsnew/teiid/teiid-news-7.1.0.CR1.html (rev 0)
+++ trunk/documentation/whatsnew/teiid/teiid-news-7.1.0.CR1.html 2011-01-21 14:48:16 UTC (rev 28472)
@@ -0,0 +1,94 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <meta http-equiv="Content-Language" content="en-us">
+ <meta http-equiv="Content-Type"
+ content="text/html; charset=ISO-8859-1">
+ <link rel="stylesheet" href="../whatsnew.css">
+ <title>Teiid Designer What's New</title>
+</head>
+<body>
+<h1>Teiid Designer 7.1.0 CR1 What's New</h1>
+<p align="right"><a href="../index.html">< Main Index</a></p>
+<p>Last revised January 20, 2010</p>
+<p><b>Teiid Designer</b> is a graphical data modeling tool that enables
+rapid definition, integration, management and testing of data services
+without programming using the <b>Teiid</b> runtime engine.</p>
+<p>For more details on <a href="http://www.jboss.org/teiid.html">Teiid</a>
+and <a href="http://www.jboss.org/teiiddesigner.html">Teiid Designer</a>
+visit: <a href="http://www.teiid.org">http://www.teiid.org</a></p>
+<table width="80%" border="0" cellpadding="10" cellspacing="0">
+ <tbody>
+ <tr>
+ <td colspan="2">
+ <hr>
+ <h3>New Teiid Instance Wizard</h3>
+ <hr> </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p><b>New Teiid Instance<br>
+ </b></p>
+ </td>
+ <td valign="top">
+ <p> The New Teiid Instance wizard has changed to allow separate
+input for host and port as well as username and password. Also featured
+are options to change security setting (SSL) and to save
+password.</p>
+ <p>Lastly, this wizard page contains Teiid JDBC connection
+info as well. This information is required for the Preview Data and
+Execute VDB features. Note that the JDBC URL field contains a placeholder that will be filled in
+when either action is performed.</p>
+ <p><img style="border: 1px solid ; width: 525px; height: 546px;"
+ src="images/new-teiid-instance-dialog.png"
+ alt="New Teiid Instance dialog"></p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left"><br>
+ </td>
+ <td valign="top"><br>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <hr>
+ <h3>DDL Export Options<br>
+ </h3>
+ <hr> </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p><b>Sybase</b></p>
+ </td>
+ <td valign="top">In CR1 Sybase has been included as an option in
+the DDL Export wizard.<br>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p><b>PostgreSQL</b></p>
+ </td>
+ <td valign="top">In CR1 PostgreSQL has been included as an option
+in
+the DDL Export wizard.<br>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2"><br>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left"><br>
+ </td>
+ <td valign="top"><br>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <hr></td>
+ </tr>
+ </tbody>
+</table>
+</body>
+</html>
Property changes on: trunk/documentation/whatsnew/teiid/teiid-news-7.1.0.CR1.html
___________________________________________________________________
Name: svn:mime-type
+ text/plain
13 years, 9 months
JBoss Tools SVN: r28471 - branches/jbosstools-3.2.0.CR1/documentation/whatsnew/bpel.
by jbosstools-commits@lists.jboss.org
Author: bbrodt
Date: 2011-01-21 08:56:54 -0500 (Fri, 21 Jan 2011)
New Revision: 28471
Added:
branches/jbosstools-3.2.0.CR1/documentation/whatsnew/bpel/bpel-news-1.1.0.CR1.html
Log:
https://issues.jboss.org/browse/JBIDE-8170
Added: branches/jbosstools-3.2.0.CR1/documentation/whatsnew/bpel/bpel-news-1.1.0.CR1.html
===================================================================
--- branches/jbosstools-3.2.0.CR1/documentation/whatsnew/bpel/bpel-news-1.1.0.CR1.html (rev 0)
+++ branches/jbosstools-3.2.0.CR1/documentation/whatsnew/bpel/bpel-news-1.1.0.CR1.html 2011-01-21 13:56:54 UTC (rev 28471)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Language" content="en-us" />
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<link rel="stylesheet" href="../whatsnew.css" />
+<title>BPEL Tools 1.1.0.beta1 What's New</title>
+</head>
+<body>
+<h1>JBoss Eclipse BPEL Editor 1.1.0.CR1 What's New</h1>
+
+<p align="right"><a href="../index.html">< Main Index</a> <a href="../esb/esb-news-1.4.0.M2.html">ESB Tools ></a></p>
+<table border="0" cellpadding="10" cellspacing="0" width="80%">
+ <tr>
+ <td colspan="2">
+ <hr />
+ <h3>General</h3>
+ <hr />
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="right"><a name="itemname3" id="itemname3"></a><b>BPEL
+ Editor</b></td>
+ <td valign="top">The following issues were fixed.
+ <ol>
+<a href="https://jira.jboss.org/jira/browse/JBIDE-6879">JBIDE-6879</a> BPEL deployer should not be using PublishCopyUtili.java in JBoss as.core package <br></br>
+<a href="https://jira.jboss.org/jira/browse/JBIDE-7334">JBIDE-7334</a> Change the bpeldeploy.xml to deploy.xml <br></br>
+<a href="https://jira.jboss.org/jira/browse/JBIDE-7786">JBIDE-7786</a> Unable to associate BPEL project with SOA 5.1 runtime. <br></br>
+<a href="https://jira.jboss.org/jira/browse/JBIDE-7861">JBIDE-7861</a> Unable to define invoke, receive, reply atributes by entering data without the use of "Quick Pick" or "Content Assist". <br></br>
+<a href="https://jira.jboss.org/jira/browse/JBIDE-8042">JBIDE-8042</a> BPEL validator does not recognize counter variable inside forEach. <br></br>
+<a href="https://jira.jboss.org/jira/browse/JBIDE-8044">JBIDE-8044</a> ArrayIndexOutOfBoundsException when adding compensateScope activity. <br></br>
+<a href="https://jira.jboss.org/jira/browse/JBIDE-8048">JBIDE-8048</a> OnEvent Handler throws NPE when selecting PartnerLink and Operation in Properties tab <br></br>
+<a href="https://jira.jboss.org/jira/browse/JBIDE-8087">JBIDE-8087</a> Incorrect imports in artifacts WSDL. <br></br>
+ </tr>
+
+</table>
+
+</body>
+
+</html>
13 years, 9 months
JBoss Tools SVN: r28470 - branches/jbosstools-3.2.0.CR1/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2011-01-21 08:37:43 -0500 (Fri, 21 Jan 2011)
New Revision: 28470
Modified:
branches/jbosstools-3.2.0.CR1/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/OpenMappingUtils.java
Log:
https://issues.jboss.org/browse/JBIDE-8116 - fixed
Modified: branches/jbosstools-3.2.0.CR1/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/OpenMappingUtils.java
===================================================================
--- branches/jbosstools-3.2.0.CR1/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/OpenMappingUtils.java 2011-01-21 13:37:32 UTC (rev 28469)
+++ branches/jbosstools-3.2.0.CR1/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/OpenMappingUtils.java 2011-01-21 13:37:43 UTC (rev 28470)
@@ -477,7 +477,7 @@
if (resourceAttr == null) {
continue;
}
- IPath path = paths.get(i).append(resourceAttr.getValue());
+ IPath path = paths.get(i).append(resourceAttr.getValue().trim());
file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
if (file == null || !file.exists()) {
file = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(path);
13 years, 9 months
JBoss Tools SVN: r28469 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2011-01-21 08:37:32 -0500 (Fri, 21 Jan 2011)
New Revision: 28469
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/OpenMappingUtils.java
Log:
https://issues.jboss.org/browse/JBIDE-8116 - fixed
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/OpenMappingUtils.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/OpenMappingUtils.java 2011-01-21 07:29:17 UTC (rev 28468)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/OpenMappingUtils.java 2011-01-21 13:37:32 UTC (rev 28469)
@@ -477,7 +477,7 @@
if (resourceAttr == null) {
continue;
}
- IPath path = paths.get(i).append(resourceAttr.getValue());
+ IPath path = paths.get(i).append(resourceAttr.getValue().trim());
file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
if (file == null || !file.exists()) {
file = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(path);
13 years, 9 months
JBoss Tools SVN: r28468 - trunk/build/aggregate/site.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-01-21 02:29:17 -0500 (Fri, 21 Jan 2011)
New Revision: 28468
Modified:
trunk/build/aggregate/site/build.xml
Log:
store bytes instead of kb for .filesize values
Modified: trunk/build/aggregate/site/build.xml
===================================================================
--- trunk/build/aggregate/site/build.xml 2011-01-21 06:06:35 UTC (rev 28467)
+++ trunk/build/aggregate/site/build.xml 2011-01-21 07:29:17 UTC (rev 28468)
@@ -146,10 +146,10 @@
</echo>
<!-- set variable for filesize in Kb -->
<length file="${aggregate.zips.dir}/@{zipPath}" property="fs.length.b" />
- <math operand2="${fs.length.b}" operation="/" operand1="1024" result="fs.length.kb" datatype="float" />
+ <!-- <math operand2="${fs.length.b}" operation="/" operand1="1024" result="fs.length.kb" datatype="float" /> -->
<!-- <math operand2="${fs.length.b}" operation="/" operand1="1048576" result="fs.length.mb" datatype="float"/> -->
- <echo level="verbose">${aggregate.zips.dir}/@{zipPath}: ${fs.length.kb} Kb, ${fs.length.mb} Mb</echo>
- <echo file="${aggregate.zips.dir}/build.properties.file.txt" append="true">${filePrefix}.filesize = ${fs.length.kb} Kb
+ <!-- <echo level="verbose">${aggregate.zips.dir}/@{zipPath}: ${fs.length.kb} Kb, ${fs.length.mb} Mb</echo> -->
+ <echo file="${aggregate.zips.dir}/build.properties.file.txt" append="true">${filePrefix}.filesize = ${fs.length.b}
</echo>
<var name="fs.length.b" unset="true" />
<var name="fs.length.kb" unset="true" />
13 years, 9 months
JBoss Tools SVN: r28467 - trunk/hibernatetools/docs/reference/en-US.
by jbosstools-commits@lists.jboss.org
Author: mcaspers
Date: 2011-01-21 01:06:35 -0500 (Fri, 21 Jan 2011)
New Revision: 28467
Modified:
trunk/hibernatetools/docs/reference/en-US/reverseengineering.xml
Log:
General Updates
Modified: trunk/hibernatetools/docs/reference/en-US/reverseengineering.xml
===================================================================
--- trunk/hibernatetools/docs/reference/en-US/reverseengineering.xml 2011-01-21 06:05:25 UTC (rev 28466)
+++ trunk/hibernatetools/docs/reference/en-US/reverseengineering.xml 2011-01-21 06:06:35 UTC (rev 28467)
@@ -152,7 +152,7 @@
<section>
<title>Example</title>
- <para>The following is an example of a type-mapping which shows the flexibility and the importance of ordering of the type mappings.</para>
+ <para>The following is an example of a type-mapping which shows the flexibility and the importance of the ordering of the type mappings.</para>
<programlisting role="XML"><![CDATA[<type-mapping>
<sql-type jdbc-type="NUMERIC" precision="15" hibernate-type="big_decimal"/>
13 years, 9 months
JBoss Tools SVN: r28466 - trunk/hibernatetools/docs/reference/en-US.
by jbosstools-commits@lists.jboss.org
Author: mcaspers
Date: 2011-01-21 01:05:25 -0500 (Fri, 21 Jan 2011)
New Revision: 28466
Modified:
trunk/hibernatetools/docs/reference/en-US/Revision_History.xml
trunk/hibernatetools/docs/reference/en-US/codegen.xml
trunk/hibernatetools/docs/reference/en-US/reverseengineering.xml
Log:
General Updates
Modified: trunk/hibernatetools/docs/reference/en-US/Revision_History.xml
===================================================================
--- trunk/hibernatetools/docs/reference/en-US/Revision_History.xml 2011-01-21 05:36:20 UTC (rev 28465)
+++ trunk/hibernatetools/docs/reference/en-US/Revision_History.xml 2011-01-21 06:05:25 UTC (rev 28466)
@@ -2,31 +2,51 @@
<!DOCTYPE Book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
]>
<appendix>
- <title>Revision History</title>
- <simpara>
- <revhistory>
- <revision>
- <revnumber>1</revnumber><date>Wed Jun 09 2010</date>
- <author>
- <firstname>JBoss Tools</firstname><surname>Documentation Team</surname><email>irooskov(a)redhat.com</email>
- </author>
- <revdescription>
- <simplelist>
- <member>General updates</member>
- </simplelist>
- </revdescription>
- </revision>
- <revision>
- <revnumber>0</revnumber><date>Fri Nov 20 2009</date>
- <author>
- <firstname>Isaac</firstname><surname>Rooskov</surname><email>irooskov(a)redhat.com</email>
- </author>
- <revdescription>
- <simplelist>
- <member>Initial creation of book by publican</member>
- </simplelist>
- </revdescription>
- </revision>
- </revhistory>
- </simpara>
+ <title>Revision History</title>
+ <simpara>
+ <revhistory>
+ <revision>
+ <revnumber>2</revnumber>
+ <date>Fri Jan 21 2011</date>
+ <author>
+ <firstname>JBoss Tools</firstname>
+ <surname>Documentation Team</surname>
+ <email>mcaspers(a)redhat.com</email>
+ </author>
+ <revdescription>
+ <simplelist>
+ <member>General updates</member>
+ </simplelist>
+ </revdescription>
+ </revision>
+ <revision>
+ <revnumber>1</revnumber>
+ <date>Wed Jun 09 2010</date>
+ <author>
+ <firstname>JBoss Tools</firstname>
+ <surname>Documentation Team</surname>
+ <email>irooskov(a)redhat.com</email>
+ </author>
+ <revdescription>
+ <simplelist>
+ <member>General updates</member>
+ </simplelist>
+ </revdescription>
+ </revision>
+ <revision>
+ <revnumber>0</revnumber>
+ <date>Fri Nov 20 2009</date>
+ <author>
+ <firstname>Isaac</firstname>
+ <surname>Rooskov</surname>
+ <email>irooskov(a)redhat.com</email>
+ </author>
+ <revdescription>
+ <simplelist>
+ <member>Initial creation of book by publican</member>
+ </simplelist>
+ </revdescription>
+ </revision>
+ </revhistory>
+ </simpara>
</appendix>
Modified: trunk/hibernatetools/docs/reference/en-US/codegen.xml
===================================================================
--- trunk/hibernatetools/docs/reference/en-US/codegen.xml 2011-01-21 05:36:20 UTC (rev 28465)
+++ trunk/hibernatetools/docs/reference/en-US/codegen.xml 2011-01-21 06:05:25 UTC (rev 28466)
@@ -2,28 +2,22 @@
<chapter id="codegen">
<title>Controlling POJO code generation</title>
- <para>When using <code><hbm2java></code> or the eclipse plugin to generate POJO java code you have the possibility to control
- certain aspects of the code generation. This is primarily done with the <code><meta></code>
- tag in the mapping files. The following section describes the possible <code>
- <meta>
- </code> tags and their use.</para>
+ <para>
+ When using <code><hbm2java></code> or the Eclipse plugin to generate POJO Java code you have the ability to control certain aspects of the code generation. This is primarily done with the <code><meta></code> tag in the mapping files. The following section describes the possible <code><meta></code> tags and their use.
+ </para>
<section>
<title>The <meta> attribute</title>
- <para>The <code><meta></code> tag is a simple way of annotating the <emphasis>
- <property>hbm.xml</property>
- </emphasis> with information, so tools have a natural place to store/read information that is
- not directly related to the Hibernate core.</para>
+ <para>
+ The <code><meta></code> tag is a simple way of annotating the <filename>hbm.xml</filename> with information, so tools have a natural place to store and read information that is not directly related to the Hibernate core.
+ </para>
- <para>You can use the <code><meta></code> tag to e.g. tell <code><hbm2java></code>
- to only generate <emphasis>
- <property>"protected"</property>
- </emphasis> setters, have classes always implement a certain set of interfaces or even have
- them extend a certain base class and even more.</para>
+ <para>
+ As an example, you can use the <code><meta></code> tag to tell <code><hbm2java></code> to only generate <code>"protected"</code> setters, have classes always implement a certain set of interfaces or even have them extend a certain base class and even more.
+ </para>
- <para>The following example shows how to use various <code><meta></code>
- attributes and the resulting java code.</para>
+ <para>The following example shows how to use various <code><meta></code> attributes and the resulting Java code.</para>
<programlisting role="XML"><![CDATA[<class name="Person">
<meta attribute="class-description">
@@ -40,10 +34,9 @@
</property>
</class>]]></programlisting>
- <para>The above <emphasis>
- <property>hbm.xml</property>
- </emphasis> will produce something like the following (code shortened for better
- understanding). Notice the Javadoc comment and the protected set methods:</para>
+ <para>
+ The above <filename>hbm.xml</filename> file will produce something like the following (the code abbreviated for clarity). Notice the Javadoc comment and the protected set methods:
+ </para>
<programlisting role="JAVA"><![CDATA[// default package
@@ -112,7 +105,7 @@
<literal>class-description</literal>
</entry>
- <entry>inserted into the javadoc for classes</entry>
+ <entry>inserted into the Javadoc for classes</entry>
</row>
<row>
@@ -120,7 +113,7 @@
<literal>field-description</literal>
</entry>
- <entry>inserted into the javadoc for fields/properties</entry>
+ <entry>inserted into the Javadoc for fields and properties</entry>
</row>
<row>
@@ -192,7 +185,7 @@
<literal>default-value</literal>
</entry>
- <entry>default initialization value for a field</entry>
+ <entry>Default initialization value for a field.</entry>
</row>
<row>
@@ -200,7 +193,7 @@
<literal>use-in-tostring</literal>
</entry>
- <entry>include this property in the <literal>toString()</literal></entry>
+ <entry>Include this property in the <code>toString()</code> method.</entry>
</row>
<row>
@@ -208,9 +201,9 @@
<literal>use-in-equals</literal>
</entry>
- <entry>include this property in the <literal>equals()</literal> and
- <literal>hashCode()</literal> method. If no use-in-equals is specified, no
- equals/hashcode will be generated.</entry>
+ <entry>
+ Include this property in the <code>equals()</code> and <code>hashCode()</code> methods. If no use-in-equals is specified, no equals or hashcode method will be generated.
+ </entry>
</row>
<row>
@@ -218,7 +211,7 @@
<literal>gen-property</literal>
</entry>
- <entry>property will not be generated if false (use with care)</entry>
+ <entry>Property will not be generated if false (use with care).</entry>
</row>
<row>
@@ -226,8 +219,7 @@
<literal>property-type</literal>
</entry>
- <entry>Overrides the default type of property. Use this with any tag's to specify the
- concrete type instead of just Object.</entry>
+ <entry>Overrides the default type of property. Use this with any tag's to specify the concrete type instead of just <code>Object</code>.</entry>
</row>
<row>
@@ -249,56 +241,36 @@
</tgroup>
</table>
- <para>Attributes declared via the <code><meta></code>
- tag are per default <emphasis>
- <property>"inherited"</property>
- </emphasis> inside an <emphasis>
- <property>hbm.xml</property>
- </emphasis> file.</para>
+ <para>
+ Attributes declared via the <code><meta></code> tag are per default <code>"inherited"</code> inside an <code>hbm.xml</code> file.
+ </para>
- <para>What does that mean? It means that if you e.g want to have all your classes implement
- <property>IAuditable</property> then you just add an <code> <meta
- attribute="implements">IAuditable</meta></code> in the top of the <emphasis>
- <property>hbm.xml</property>
- </emphasis> file, just after <code><hibernate-mapping></code>. Now all classes defined
- in that <emphasis>
- <property>hbm.xml</property>
- </emphasis> file will implement <property>IAuditable</property>!</para>
+ <para>
+ What does that mean? As an example if you want to have all your classes implement <code>IAuditable</code> then you just add an <code> <meta attribute="implements">IAuditable</meta></code> in the top of the <filename>hbm.xml</filename> file, just after <code><hibernate-mapping></code>. Now all classes defined in that <filename>hbm.xml</filename> file will implement <property>IAuditable</property>.
+ </para>
<note>
<title>Note:</title>
- <para>This applies to <emphasis>all</emphasis>
- <code><meta></code>-tags. Thus it can also e.g. be used to specify that
- all fields should be declare protected, instead of the default private. This is done by
- adding <code><meta
- attribute="scope-field">protected</meta></code> at e.g. just under
- the <code><class></code> tag and all fields of that class will be
- protected.</para>
+ <para>
+ This applies to <emphasis>all</emphasis> <code><meta></code>-tags. Thus it can also be used to specify that all fields should be declare protected, instead of the default private. This is done by adding <code><meta attribute="scope-field">protected</meta></code> just under the <code><class></code> tag and all fields of that class will be protected.
+ </para>
</note>
- <para>To avoid having a <code><meta></code>
- tag inherited then you can simply specify <code> inherit = "false"</code>
- for the attribute, e.g. <code> <meta attribute = "scope-class" inherit =
- "false">public abstract</meta></code> will restrict the <emphasis>
- <property>"class-scope"</property>
- </emphasis> to the current class, not the subclasses.</para>
+ <para>
+ To avoid having a <code><meta></code> tag inherited then you can simply specify <code> inherit = "false"</code> for the attribute. For example <code> <meta attribute = "scope-class" inherit = "false">public abstract</meta></code> will restrict the <code>"class-scope"</code> to the current class, not the subclasses.
+ </para>
<section>
<title>Recommendations</title>
- <para>The following are some good practices when using
- <code><meta></code>
- attributes.</para>
+ <para>The following are some good practices to employ when using <code><meta></code> attributes.</para>
<section>
- <title>Dangers of a class level <property>use-in-string and use-in-equals</property> meta
- attributes when having bi-directional associations</title>
+ <title>Dangers of a class level <property>use-in-string and use-in-equals</property> meta attributes when having bi-directional associations</title>
- <para>If we have two entities with a bi-directional association between them and define at
- class scope level the meta attributes: <emphasis>
- <property>use-in-string</property>, </emphasis>
- <emphasis>
- <property>use-in-equals</property>: </emphasis></para>
+ <para>
+ If we have two entities with a bi-directional association between them and define at class scope level the meta attributes: <code>use-in-string</code>, <code>use-in-equals</code>:
+ </para>
<programlisting role="XML"><![CDATA[<hibernate-mapping>
<class name="Person">
@@ -308,9 +280,7 @@
</class>
</hibernate-mapping>]]></programlisting>
- <para>And for <emphasis>
- <property>Event.hbm</property>
- </emphasis> file:</para>
+ <para>And for <filename>Event.hbm</filename> file:</para>
<programlisting role="XML"><![CDATA[<hibernate-mapping>
<class name="events.Event" table="EVENTS">
@@ -328,21 +298,15 @@
</class>
</hibernate-mapping>]]></programlisting>
- <para>Then <code><hbm2java></code>
- will assume you want to include all properties and collections in the
- <code>toString()/equals()</code> methods and this can result in infinite
- recursive calls.</para>
+ <para>
+ Then <code><hbm2java></code> will assume you want to include all properties and collections in the <code>toString()</code> and <code>equals()</code> methods and this can result in infinite recursive calls.
+ </para>
- <para>To remedy this you have to decide which side of the association will include the other
- part (if at all) in the <code>toString()/equals()</code> methods. Therefore it is
- not a good practice to put at class scope such <emphasis>
- <property>meta</property>
- </emphasis> attributes, unless you are defining a class without bi-directional
- associations.</para>
+ <para>
+ To remedy this you have to decide which side of the association will include the other part (if at all) in the <code>toString()</code> and <code>equals()</code> methods. Therefore it is not a good practice to put at class scope such <code>meta</code> attributes, unless you are defining a class without bi-directional associations.
+ </para>
- <para>We recommend instead to add the <emphasis>
- <property>meta</property>
- </emphasis> attributes at the property level:</para>
+ <para>We recommend instead to add the <code>meta</code> attributes at the property level:</para>
<programlisting role="XML"><![CDATA[<hibernate-mapping>
<class name="events.Event" table="EVENTS">
@@ -362,7 +326,7 @@
</class>
</hibernate-mapping>]]></programlisting>
- <para>and now for <property>Person</property>:</para>
+ <para>and now for <code>Person</code>:</para>
<programlisting role="XML"><![CDATA[<hibernate-mapping>
<class name="Person">
@@ -385,68 +349,51 @@
</section>
<section>
- <title>Be aware of putting at class scope level <meta>
- attributeuse-in-equals</title>
+ <title>Be aware of putting at class scope level <meta> attributeuse-in-equals</title>
- <para>For <code>equal()/hashCode()</code> method generation, you have to take into
- account that the attributes that participate on such method definition, should take into
- account only attributes with business meaning (the name, social security number, etc, but
- no generated id's, for example).</para>
+ <para>
+ For <code>equal()</code> and <code>hashCode()</code> method generation, you have to take into account that the attributes that participate on such method definition, should take into account only attributes with business meaning (the name, social security number, etc, but no generated id's, for example).
+ </para>
- <para>This is important because Java's hashbased collections, such as
- <property>java.util.Set</property> relies on <property>equals()</property> and
- <property>hashcode()</property> to be correct and not change for objects in the set;
- this can be a problem if the id gets assigned for an object after you inserted it into a
- set.</para>
+ <para>
+ This is important because Java's hashbased collections, such as <code>java.util.Set</code>, rely on <code>equals()</code> and <code>hashcode()</code> being correct and not changing for objects in the set; this can be a problem if the id gets assigned for an object after you inserted it into a set.
+ </para>
- <para>Therefore automatically configuration of the generation of
- <property>equals()/hashCode()</property> methods specifying at class scope level the <code><meta></code> attribute <emphasis>
- <property>use-in-equals</property>
- </emphasis> could be a dangerous decision that could produce non expected
- side-effect.</para>
+ <para>
+ Therefore automatically configuration of the generation of <code>equals()</code> and <code>hashCode()</code> methods specifying the <code><meta></code> attribute <code>use-in-equals</code> at class scope level could be a dangerous decision that could produce unexpected side-effects.
+ </para>
- <para><ulink url="http://www.hibernate.org/109.html">On www.hibernate.org </ulink> you can get more in-depth
- explanation on the subject of <property>equals()</property> and
- <property>hashcode()</property>.</para>
+ <para>
+ On <ulink url="http://www.hibernate.org/109.html">www.hibernate.org </ulink> you can get a more in-depth explanation on the subject of <code>equals()</code> and <code>hashcode()</code> methods.
+ </para>
</section>
</section>
<section>
<title>Advanced <meta> attribute examples</title>
- <para>This section shows an example for using meta attributes (including userspecific
- attributes) together with the code generation features in <property>Hibernate
- Tools</property>.</para>
+ <para>
+ This section shows an example for using meta attributes (including userspecific attributes) together with the code generation features in <productname>Hibernate Tools</productname>.
+ </para>
- <para>The usecase being implemented is to automatically insert some pre- and post-conditions
- into the getter and setters of the generated POJO. </para>
+ <para>The example shown below automatically inserts some pre and post conditions into the getter and setters of the generated POJO. </para>
<section>
<title>Generate pre/post-conditions for methods</title>
- <para>With a <code> <meta attribute="class-code"></code>, you can add
- additional methods on a given class, nevertheless such <code><meta></code>
- attribute can not be used at a property scope level and <property>Hibernate
- Tools</property> does not provide such <code>
- ><meta>
- </code> attributes.</para>
+ <para>
+ With the <code> <meta attribute="class-code"></code>, you can add additional methods on a given class, nevertheless such <code><meta></code> attribute can not be used at a property scope level and <property>Hibernate Tools</property> does not provide such <code><meta></code> attributes.
+ </para>
- <para>A possible solution for this is to modify the freemarker templates responsible for
- generating the POJO's. If you look inside <emphasis>
- <property>hibernate-tools.jar</property>, </emphasis> you can find the template: <emphasis>
- <property>pojo/PojoPropertyAccessor.ftl</property>
- </emphasis></para>
+ <para>
+ A possible solution for this is to modify the freemarker templates responsible for generating the POJO's. If you look inside <filename>hibernate-tools.jar</filename>, you can find the template <filename>pojo/PojoPropertyAccessor.ftl</filename>.
+ </para>
- <para>This file is as the name indicates used to generate property accessors for
- pojo's.</para>
+ <para>As its name indicates, this file is used to generate property accessors for POJO's.</para>
- <para>Extract the <emphasis>
- <property>PojoPropertyAccessor.ftl</property>
- </emphasis> into a local folder i.e. <emphasis>
- <property>${hbm.template.path}</property>, </emphasis> respecting the whole path, for
- example: <emphasis>
- <property>${hbm.template.path}/pojo/PojoPropertyAccessor.ftl</property>
- </emphasis></para>
+ <para>
+ Extract the <filename>PojoPropertyAccessor.ftl</filename> into a local folder i.e. <filename>${hbm.template.path}</filename>, respecting the whole path, for example: <filename>${hbm.template.path}/pojo/PojoPropertyAccessor.ftl</filename>.
+ </para>
<para>The contents of the file is something like this:</para>
@@ -464,8 +411,9 @@
}
</#foreach>]]></programlisting>
- <para>We can add conditionally pre/post-conditions on our <literal>set</literal> method
- generation just adding a little Freemarker syntax to the above source code:</para>
+ <para>
+ We can add conditionally pre and post conditions on our <code>set</code> method generation just adding a little Freemarker syntax to the above source code:
+ </para>
<programlisting role="XML"><![CDATA[<#foreach property in pojo.getAllPropertiesIterator()>
${pojo.getPropertyGetModifiers(property)}
@@ -489,19 +437,13 @@
</#foreach>]]>
</programlisting>
- <para>Now if in any <emphasis>
- <property>.hbm.xml</property>
- </emphasis> file we define the <emphasis>
- <property><meta></property>
- </emphasis> attributes: <code>pre-cond</code> or <code>post-cond</code>, their
- contents will be generated into the body of the relevant <literal>set</literal>
- method.</para>
+ <para>
+ Now if in any <filename>.hbm.xml</filename> file we define the <code><meta></code> attributes: <code>pre-cond</code> or <code>post-cond</code>, and their contents will be generated into the body of the relevant <code>set</code> method.
+ </para>
- <para>As an example let us add a pre-condition for property <code>name</code>
- preventing no <property>Person</property> can have an empty name. Hence we have to modify
- the <emphasis>
- <property>Person.hbm.xml</property>
- </emphasis> file like this:</para>
+ <para>
+ As an example let us add a pre-condition for property <code>name</code> which will prevent the <code>Person</code> class from having an empty name. To achieve this we have to modify the <filename>Person.hbm.xml</filename> file like so:
+ </para>
<programlisting role="XML"><![CDATA[<hibernate-mapping>
<class name="Person">
@@ -520,18 +462,15 @@
<note>
<title>Note:</title>
- <para>I) To escape the & symbol we put &amp;. You can use
- <code> <![CDATA[]]></code> instead.</para>
- <para>II) Note that we are referring to "firstName" directly and this is the parameter
- name not the actual field name. If you want to refer the field you have to use
- "this.firstName" instead. </para>
+ <para>I) To escape the & symbol we put &amp;. You can use <code> <![CDATA[]]></code> instead.</para>
+ <para>
+ II) Note that we are referring to <code>firstName</code> directly and this is the parameter name not the actual field name. If you want to refer the field you have to use <code>this.firstName</code> instead.
+ </para>
</note>
- <para>Finally we have to generate the <emphasis>
- <property>Person.java</property>
- </emphasis> class, for this we can use both Eclipse and Ant as long as you remember to set
- or fill in the templatepath setting. For Ant we configure <code><hibernatetool></code>
- task via <literal>the templatepath</literal> attribute as in:</para>
+ <para>
+ Finally we have to generate the <filename>Person.java</filename> class. For this we can use both Eclipse and Ant, as long as you remember to set or fill in the templatepath setting. For Ant we configure <code><hibernatetool></code> task via <literal>the templatepath</literal> attribute as in:
+ </para>
<programlisting role="XML"><![CDATA[
<target name="hbm2java">
@@ -552,12 +491,9 @@
</hibernatetool>
</target>]]></programlisting>
- <para>Invoking the target <code><hbm2java></code>
- will generate on the <emphasis>
- <property>${hbm2java.dest.dir}</property>
- </emphasis> the file <emphasis>
- <property>Person.java</property>
- </emphasis>:</para>
+ <para>
+ Invoking the target <code><hbm2java></code> will generate on the <filename>${hbm2java.dest.dir}</filename> the file <filename>Person.java</filename>:
+ </para>
<programlisting role="JAVA"><![CDATA[// default package
import java.io.Serializable;
@@ -594,22 +530,19 @@
}
}]]></programlisting>
- <para>In conclusion, this document is intended to introduce you to Hibernate plugin specific
- features related to tools bath for the Eclipse and Ant tasks.</para>
+ <para>
+ In conclusion, this document is intended to introduce you to Hibernate plugin specific features related to tools bath for the Eclipse and Ant tasks.
+ </para>
- <para>In the <xref linkend="plugins"/> chapter you've learnt
- about a set of wizards for creating Mapping files, Configuration file, Console
- Configuration, got familiar with Mapping and Configuration files editors, tooling for
- organizing and controlling Reverse Engineering, Hibernate Console and Mapping diagram as
- well.</para>
+ <para>
+ In the <xref linkend="plugins"/> chapter you've learned about a set of wizards for creating Mapping files, Configuration file, Console Configuration, become familiar with Mapping and Configuration files editors, tooling for organizing and controlling Reverse Engineering, Hibernate Console and Mapping diagram as well.
+ </para>
- <para>The rest chapters have shown the aspects of using the <property>Hibernate
- Tools</property> via Ant tasks.</para>
+ <para>The rest chapters have explored the use of the <productname>Hibernate Tools</productname> via Ant tasks.</para>
- <para>Please, visit <ulink
- url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=201">JBoss
- Tools Users Forum</ulink> to leave questions or/and suggestions on the topic. Your
- feedback is always appreciated.</para>
+ <para>
+ Please visit <ulink url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=201">JBoss Tools Users Forum</ulink> to leave questions or/and suggestions on the topic. Your feedback is always appreciated.
+ </para>
</section>
</section>
Modified: trunk/hibernatetools/docs/reference/en-US/reverseengineering.xml
===================================================================
--- trunk/hibernatetools/docs/reference/en-US/reverseengineering.xml 2011-01-21 05:36:20 UTC (rev 28465)
+++ trunk/hibernatetools/docs/reference/en-US/reverseengineering.xml 2011-01-21 06:05:25 UTC (rev 28466)
@@ -146,7 +146,7 @@
</type-mapping>]]></programlisting>
<para>
- The number of attributes specified and the sequence of the <code>sql-type</code>'s is important. Meaning that <programname>Hibernate</programname> will search for the most specific first, and if no specific match is found it will seek from top to bottom when trying to resolve a type mapping.
+ The number of attributes specified and the sequence of the <code>sql-type</code>'s is important. Meaning that <productname>Hibernate</productname> will search for the most specific first, and if no specific match is found it will seek from top to bottom when trying to resolve a type mapping.
</para>
<section>
13 years, 9 months
JBoss Tools SVN: r28465 - trunk/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-01-21 00:36:20 -0500 (Fri, 21 Jan 2011)
New Revision: 28465
Modified:
trunk/build/publish.sh
Log:
rename md5sums file; empty timestamp-Hxx.txt file; ensure build.properties.all.xml is kept; remove SVN_REVISION from build.properties
Modified: trunk/build/publish.sh
===================================================================
--- trunk/build/publish.sh 2011-01-21 04:37:52 UTC (rev 28464)
+++ trunk/build/publish.sh 2011-01-21 05:36:20 UTC (rev 28465)
@@ -59,12 +59,9 @@
sed -e "s#<module>\(http[^<>]\+\)</module><revision>\([0-9]\+\)</revision>#\1\@\2\n#g" ${rl}.xml | sed -e "s#<[^<>]\+>##g" > ${rl}.txt
METAFILE="${BUILD_ID}-H${BUILD_NUMBER}.txt"
-if [[ ${SVN_REVISION} ]]; then
- METAFILE="${BUILD_ID}-H${BUILD_NUMBER}-r${SVN_REVISION}.txt"
- echo "SVN_REVISION = ${SVN_REVISION}" > ${STAGINGDIR}/logs/${METAFILE}
-else
- echo -n "" > ${STAGINGDIR}/logs/${METAFILE}
-fi
+touch ${STAGINGDIR}/logs/${METAFILE}
+METAFILE=build.properties
+
echo "JOB_NAME = ${JOB_NAME}" >> ${STAGINGDIR}/logs/${METAFILE}
echo "BUILD_NUMBER = ${BUILD_NUMBER}" >> ${STAGINGDIR}/logs/${METAFILE}
echo "BUILD_ID = ${BUILD_ID}" >> ${STAGINGDIR}/logs/${METAFILE}
@@ -72,7 +69,6 @@
echo "HUDSON_SLAVE = $(uname -a)" >> ${STAGINGDIR}/logs/${METAFILE}
echo "RELEASE = ${RELEASE}" >> ${STAGINGDIR}/logs/${METAFILE}
echo "ZIPSUFFIX = ${ZIPSUFFIX}" >> ${STAGINGDIR}/logs/${METAFILE}
-cp ${STAGINGDIR}/logs/${METAFILE} ${STAGINGDIR}/logs/build.properties
#echo "$z ..."
if [[ $z != "" ]] && [[ -f $z ]] ; then
@@ -138,6 +134,8 @@
popd
z=${STAGINGDIR}/all/${srczipname}; for m in $(md5sum ${z}); do if [[ $m != ${z} ]]; then echo $m > ${z}.MD5; fi; done
+mkdir -p ${STAGINGDIR}/logs
+
# collect component zips from upstream aggregated build jobs
if [[ ${JOB_NAME/.aggregate} != ${JOB_NAME} ]] && [[ -d ${WORKSPACE}/sources/aggregate/site/zips ]]; then
mkdir -p ${STAGINGDIR}/components
@@ -163,11 +161,15 @@
rm -fr ${STAGINGDIR}/all/sources
z=${STAGINGDIR}/all/${SRCSNAME}; for m in $(md5sum ${z}); do if [[ $m != ${z} ]]; then echo $m > ${z}.MD5; fi; done
+
+ # JBIDE-7444 get aggregate metadata xml properties file
+ if [[ -f ${WORKSPACE}/sources/aggregate/site/zips/build.properties.all.xml ]]; then
+ rsync -aq ${WORKSPACE}/sources/aggregate/site/zips/build.properties.all.xml ${STAGINGDIR}/logs/
+ fi
fi
# generate list of zips in this job
METAFILE=zip.list.txt
-mkdir -p ${STAGINGDIR}/logs
echo "ALL_ZIPS = \\" >> ${STAGINGDIR}/logs/${METAFILE}
for z in $(find ${STAGINGDIR} -name "*Update*.zip") $(find ${STAGINGDIR} -name "*Sources*.zip"); do
# list zips in staging dir
@@ -176,7 +178,7 @@
echo "" >> ${STAGINGDIR}/logs/${METAFILE}
# generate md5sums in a single file
-md5sumsFile=${STAGINGDIR}/logs/${JOB_NAME}-md5sums-${BUILD_ID}-H${BUILD_NUMBER}.txt
+md5sumsFile=${STAGINGDIR}/logs/md5sums.txt
echo "# Update Site Zips" > ${md5sumsFile}
echo "# ----------------" >> ${md5sumsFile}
md5sum $(find . -name "*Update*.zip" | egrep -v "aggregate-Sources|nightly-Update") >> ${md5sumsFile}
@@ -186,6 +188,7 @@
md5sum $(find . -name "*Source*.zip" | egrep -v "aggregate-Sources|nightly-Update") >> ${md5sumsFile}
echo " " >> ${md5sumsFile}
+# TODO: JBIDE-7045 this is obsolete - replace it with xslt'd transform of build.properties.all.xml (agg site overall metadata)
# generate HTML snippet, download-snippet.html, for inclusion on jboss.org
mkdir -p ${STAGINGDIR}/logs
ANT_PARAMS=" -DZIPSUFFIX=${ZIPSUFFIX} -DJOB_NAME=${JOB_NAME} -Dinput.dir=${STAGINGDIR} -Doutput.dir=${STAGINGDIR}/logs -DWORKSPACE=${WORKSPACE}"
13 years, 9 months
JBoss Tools SVN: r28464 - trunk/hibernatetools/docs/reference/en-US.
by jbosstools-commits@lists.jboss.org
Author: mcaspers
Date: 2011-01-20 23:37:52 -0500 (Thu, 20 Jan 2011)
New Revision: 28464
Modified:
trunk/hibernatetools/docs/reference/en-US/reverseengineering.xml
Log:
General Updates
Modified: trunk/hibernatetools/docs/reference/en-US/reverseengineering.xml
===================================================================
--- trunk/hibernatetools/docs/reference/en-US/reverseengineering.xml 2011-01-21 04:06:45 UTC (rev 28463)
+++ trunk/hibernatetools/docs/reference/en-US/reverseengineering.xml 2011-01-21 04:37:52 UTC (rev 28464)
@@ -2,54 +2,41 @@
<chapter id="reverseengineering">
<title>Controlling reverse engineering</title>
- <para>When using the <code><jdbcconfiguration></code>, the ant task will read the
- database metadata and thus will perform a reverse engineering of the database schema into a
- normal Hibernate Configuration. It is from this object e.g. <code><hbm2java></code>can generate other artifacts such as <emphasis>
- <property>.java</property>
- </emphasis>, <emphasis>
- <property>.hbm.xml</property>
- </emphasis> etc.</para>
+ <para>
+ When using the <code><jdbcconfiguration></code>, the Ant task will read the database metadata and then perform a reverse engineering of the database schema into a normal Hibernate Configuration. It is from this object e.g. <code><hbm2java></code>can generate other artifacts such as <filename>.java</filename>, <filename>.hbm.xml</filename> etc.
+ </para>
- <para>To govern this process <property>Hibernate</property> uses a reverse engineering strategy. A
- reverse engineering strategy is mainly called to provide more java like names for tables, column
- and foreignkeys into classes, properties and associations. It also used to provide mappings from
- SQL types to <property>Hibernate</property> types. The strategy can be customized by a user. The
- user can even provide its own custom reverse engineering strategy if the provided strategy is
- not enough, or simply just provide a small part of the strategy and delegate the rest to the
- default strategy.</para>
+ <para>
+ To govern this process <productname>Hibernate</productname> uses a reverse engineering strategy. A reverse engineering strategy is mainly called to provide more Java like names for tables, column and foreign keys into classes, properties and associations. It also used to provide mappings from SQL types to <productname>Hibernate</productname> types. The strategy can be customized by a user. The user can even provide its own custom reverse engineering strategy if the provided strategy does not provide the required functionality, or simply define a small component of the strategy and delegate the rest to the default strategy.
+ </para>
- <para>Thus, further in this chapter we will discuss how you can configure the process of a reverse
- engineering, what default reverse engineering strategy includes as well as some custom concepts.</para>
+ <para>
+ Thus, further in this chapter we will discuss how you can configure the process of reverse engineering, what the default reverse engineering strategy includes as well as some custom concepts.
+ </para>
<section>
<title>Default reverse engineering strategy</title>
- <para>The default strategy uses some rules for mapping JDBC artifact names to java artifact
- names. It also provide basic typemappings from JDBC types to <property>Hibernate</property>
- types. It is the default strategy that uses the packagename attribute to convert a table name
- to a fully qualified classname.</para>
+ <para>
+ The default strategy uses some rules for mapping JDBC artifact names to java artifact names. It also provide basic typemappings from JDBC types to <productname>Hibernate</productname> types. It is the default strategy that uses the packagename attribute to convert a table name to a fully qualified classname.
+ </para>
</section>
<section id="hibernaterevengxmlfile">
<title>hibernate.reveng.xml file</title>
- <para>To have fine control over the process a <emphasis>
- <property>hibernate.reveng.xml</property>
- </emphasis> file can be provided. In this file you can specify type mappings and table
- filtering. This file can be created by hand (it's just basic XML) or you can use the
- <ulink url="http://www.hibernate.org/30.html">Hibernate plugins</ulink> which have a
- specialized editor.</para>
+ <para>
+ A <filename>hibernate.reveng.xml</filename> file can provide a finer degree of control of the process. In this file you can specify type mappings and table filtering. This file can be created by hand (it's just basic XML) or you can use the <ulink url="http://www.hibernate.org/30.html">Hibernate plugins</ulink> which has a specialized editor.
+ </para>
<note>
<title>Note:</title>
- <para>Many databases are case-sensitive with their names and thus if you cannot make some
- table match and you are sure it is not excluded by a <code><table-filter></code> then check
- if the case matches; most databases stores table names in uppercase.</para>
+ <para>
+ Many databases have case-sensitive names and thus if a table does not match, and you are sure it is not excluded by a <code><table-filter></code>, check if the case matches. Most databases stores table names in uppercase.
+ </para>
</note>
- <para>Below you can see an example of a <emphasis>
- <property>reveng.xml</property>. </emphasis> Following the example gives you more details
- about the format.</para>
+ <para>Below you can see an example of a <filename>reveng.xml</filename> file. Following the example gives you more details about the format.</para>
<programlisting role="XML"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-reverse-engineering
@@ -106,44 +93,33 @@
<section>
<title>Schema Selection (<schema-selection>)</title>
- <para><code><schema-selection></code> is used to drive which schemas the reverse engineering will try and
- process.</para>
+ <para><code><schema-selection></code> is used to determine which schemas the reverse engineering will try and process.</para>
- <para>By default the reverse engineering will read all schemas and then use <code><table-filter></code>
- to decide which tables get reverse engineered and which do not; this makes it
- easy to get started but can be inefficient on databases with many schemas.</para>
+ <para>
+ By default the reverse engineering will read all schemas and then use <code><table-filter></code> to decide which tables get reverse engineered and which do not; this makes it easy to get started but can be inefficient on databases with many schemas.
+ </para>
- <para>With <code><schema-selection></code> it is thus possible to limit the actual processed schemas and thus significantly
- speed-up the reverse engineering. <code><table-filter></code> is still used to then decide which tables will be included/excluded.</para>
+ <para>
+ With <code><schema-selection></code> it is thus possible to limit which schemas are processed, thus significantly speed-up the reverse engineering. <code><table-filter></code> is still used to then decide which tables will be included and excluded.
+ </para>
<note>
<title>Note:</title>
- <para>If no <code><schema-selection></code> is specified, the reverse
- engineering works as if all schemas should be processed. This is equal to:
- <![CDATA[<schema-selection/>]]>. Which in turn is equal to:
- <![CDATA[<schema-selection match-catalog=".*" match-schema=".*" match-table=".*"/>]]></para>
+ <para>
+ If no <code><schema-selection></code> is specified, the reverse engineering works as if all schemas should be processed. This is equal to: <![CDATA[<schema-selection/>]]>, which in turn is equal to: <![CDATA[<schema-selection match-catalog=".*" match-schema=".*" match-table=".*"/>]]>
+ </para>
</note>
<section>
<title>Examples</title>
- <para>The following will process all tables from <emphasis>
- <property>"MY_SCHEMA"</property>.
- </emphasis></para>
+ <para>The following will process all tables from <code>"MY_SCHEMA"</code>.</para>
<programlisting role="XML"><![CDATA[<schema-selection match-schema="MY_SCHEMA"/>]]></programlisting>
- <para>It is possible to have multiple <literal>schema-selection</literal>'s to support
- multi-schema reading or simply to limit the processing to very specific tables. The
- following example processes all tables in <emphasis>
- <property>"MY_SCHEMA"</property>,
- </emphasis> a specific <emphasis>
- <property>"CITY"</property>
- </emphasis> table plus all tables that starts with <emphasis>
- <property>"CODES_"</property>
- </emphasis> in <emphasis>
- <property>"COMMON_SCHEMA"</property>.
- </emphasis></para>
+ <para>
+ It is possible to have multiple <code>schema-selection</code>'s to support multi-schema reading, or simply to limit the processing to very specific tables. The following example processes all tables in <code>"MY_SCHEMA"</code>, a specific <code>"CITY"</code> table plus all tables that start with <code>"CODES_"</code> in <code>"COMMON_SCHEMA"</code>.
+ </para>
<programlisting role="XML"><![CDATA[<schema-selection match-schema="MY_SCHEMA"/>
<schema-selection match-schema="COMMON_SCHEMA" match-table="CITY"/>
@@ -154,13 +130,9 @@
<section id="type_map">
<title>Type mappings (<type-mapping>)</title>
- <para>The <code><type-mapping></code> section specifies how the JDBC types found in the database should be mapped to
- Hibernate types. e.g. <emphasis>
- <property>java.sql.Types.VARCHAR</property></emphasis> with a length of 1 should be mapped to the
- Hibernate type <emphasis>
- <property>yes_no</property></emphasis> or <emphasis>
- <property>java.sql.Types.NUMERIC</property></emphasis> should generally just be
- converted to the Hibernate type <literal>long</literal>.</para>
+ <para>
+ The <code><type-mapping></code> section specifies how the JDBC types found in the database should be mapped to Hibernate types. e.g. <code>java.sql.Types.VARCHAR</code> with a length of 1 should be mapped to the Hibernate type <code>yes_no</code>, or <code>java.sql.Types.NUMERIC</code> should generally just be converted to the Hibernate type <code>long</code>.
+ </para>
<programlisting role="XML"><![CDATA[<type-mapping>
<sql-type
@@ -173,16 +145,14 @@
/>
</type-mapping>]]></programlisting>
- <para>The number of attributes specified and the sequence of the <literal>sql-type</literal>'s
- is important. Meaning that <property>Hibernate</property> will search for the most specific
- first, and if no specific match is found it will seek from top to bottom when trying to
- resolve a type mapping.</para>
+ <para>
+ The number of attributes specified and the sequence of the <code>sql-type</code>'s is important. Meaning that <programname>Hibernate</programname> will search for the most specific first, and if no specific match is found it will seek from top to bottom when trying to resolve a type mapping.
+ </para>
<section>
<title>Example</title>
- <para>The following is an example of a type-mapping which shows the flexibility and the
- importance of ordering of the type mappings.</para>
+ <para>The following is an example of a type-mapping which shows the flexibility and the importance of ordering of the type mappings.</para>
<programlisting role="XML"><![CDATA[<type-mapping>
<sql-type jdbc-type="NUMERIC" precision="15" hibernate-type="big_decimal"/>
@@ -195,8 +165,7 @@
<sql-type jdbc-type="VARCHAR" hibernate-type="string"/>
</type-mapping>]]></programlisting>
- <para>The following table shows how this affects an example table named <emphasis>
- <property>CUSTOMER</property>:</emphasis></para>
+ <para>The following table shows how this affects an example table named <code>CUSTOMER</code>:</para>
<table frame="topbot">
<title>sql-type examples</title>
@@ -264,9 +233,9 @@
<entry>your.package.TrimStringUserType</entry>
- <entry>No type-mapping matches length=30 and not-null=false, but type-mapping
- matches the 2 mappings which only specifies VARCHAR. The type-mapping that comes
- first is chosen.</entry>
+ <entry>
+ No type-mapping matches <code>length=30</code> and <code>not-null=false</code>, but type-mapping matches the 2 mappings which only specifies <code>VARCHAR</code>. The type-mapping that comes first is chosen.
+ </entry>
</row>
<row>
@@ -282,10 +251,8 @@
<entry>char</entry>
- <entry>Even though there is a generic match for VARCHAR, the more specific
- type-mapping for VARCHAR with not-null="false" is chosen. The first VARCHAR
- sql-type matches in length but has no value for not-null and thus is not
- considered.</entry>
+ <entry>
+ Even though there is a generic match for <code>VARCHAR</code>, the more specific type-mapping for <code>VARCHAR</code> with <code>not-null="false"</code> is chosen. The first <code>VARCHAR</code> sql-type matches in length but has no value for not-null and thus is not considered.</entry>
</row>
<row>
@@ -301,7 +268,7 @@
<entry>java.lang.Character</entry>
- <entry>The most specific VARCHAR with not-null="true" is selected</entry>
+ <entry>The most specific <code>VARCHAR</code> with <code>not-null="true"</code> is selected</entry>
</row>
<row>
@@ -317,7 +284,7 @@
<entry>big_decimal</entry>
- <entry>There is a precise match for NUMERIC with precision 15</entry>
+ <entry>There is a precise match for <code>NUMERIC</code> with precision 15</entry>
</row>
<row>
@@ -333,7 +300,7 @@
<entry>java.lang.Long</entry>
- <entry>type-mapping for NUMERIC with not-null="false"</entry>
+ <entry>type-mapping for <code>NUMERIC</code> with <code>not-null="false"</code></entry>
</row>
</tbody>
</tgroup>
@@ -346,10 +313,9 @@
<section>
<title>Table filters (<table-filter>)</title>
- <para>The <code><table-filter></code>
- let you specify matching rules for performing general filtering/setup for
- tables, e.g. let you include or exclude specific tables based on the schema or even a
- specific prefix.</para>
+ <para>
+ The <code><table-filter></code> lets you specify matching rules for performing general filtering and setup for tables, e.g. let you include or exclude specific tables based on the schema or even a specific prefix.
+ </para>
<programlisting role="XML"><![CDATA[<table-filter
match-catalog="catalog_matching_rule"
@@ -433,10 +399,9 @@
<section id="tab_and_col">
<title>Specific table configuration (<table>)</title>
- <para><code><table></code>
- allows you to provide explicit configuration on how a table should be reverse
- engineered. Amongst other things it allows controlling over the naming of a class for the
- table, specifying which identifier generator should be used for the primary key etc.</para>
+ <para>
+ <code><table></code> allows you to provide explicit configuration on how a table should be reverse engineered. Amongst other things it allows control over the naming of a class for the table, provides a way to specify which identifier generator should be used for the primary key etc.
+ </para>
<programlisting role="XML"><![CDATA[<table
catalog="catalog_name"
@@ -475,9 +440,10 @@
<row>
<entry><para>catalog</para></entry>
- <entry><para>Catalog name for a table. It has to be specified if you are
- reverse engineering multiple catalogs or if it is not equal to
- hiberante.default_catalog.</para></entry>
+ <entry>
+ <para>Catalog name for a table. It has to be specified if you are reverse engineering multiple catalogs or if it is not equal to hiberante.default_catalog.
+ </para>
+ </entry>
<entry><para>Optional</para></entry>
</row>
@@ -485,9 +451,11 @@
<row>
<entry><para>schema</para></entry>
- <entry><para>Schema name for a table. It has to be specified if you are
- reverse engineering multiple schemas or if it is not equal to
- hiberante.default_schema.</para></entry>
+ <entry>
+ <para>
+ Schema name for a table. It has to be specified if you are reverse engineering multiple schemas or if it is not equal to hiberante.default_schema.
+ </para>
+ </entry>
<entry><para>Optional</para></entry>
</row>
@@ -503,8 +471,7 @@
<row>
<entry><para>class</para></entry>
- <entry><para>The class name for a table. Default name is a camelcase version
- of the table name.</para></entry>
+ <entry><para>The class name for a table. Default name is a CamelCase version of the table name.</para></entry>
<entry><para>Optional</para></entry>
</row>
@@ -517,9 +484,9 @@
<section>
<title><primary-key></title>
- <para>A <code><primary-key></code> allows you to define a primary-key for tables that don't have it
- defined in the database, and probably more importantly it allows you to define which
- identifier strategy should be used (even for already existing primary-key's).</para>
+ <para>
+ A <code><primary-key></code> allows you to define a primary-key for tables that do not have one defined in the database, and probably more importantly it allows you to define which identifier strategy should be used (even for already existing primary-key's).
+ </para>
<programlisting role="XML"><![CDATA[<primary-key
<generator class="generatorname">
@@ -554,9 +521,11 @@
<row>
<entry><para>generator/class</para></entry>
- <entry><para>Defines which identifier generator should be used.
- The class name is any hibernate short hand name or fully qualified class name for an
- identifier strategy.</para></entry>
+ <entry>
+ <para>
+ Defines which identifier generator should be used. The class name is any hibernate short hand name or fully qualified class name for an identifier strategy.
+ </para>
+ </entry>
<entry><para>Optional</para></entry>
</row>
@@ -564,8 +533,7 @@
<row>
<entry><para>generator/param</para></entry>
- <entry><para>Allows to specify which parameter with a name and
- value should be passed to the identifier generator.</para></entry>
+ <entry><para>Allows to specify which parameter with a name and value should be passed to the identifier generator.</para></entry>
<entry><para>Optional</para></entry>
</row>
@@ -573,8 +541,11 @@
<row>
<entry><para>key-column</para></entry>
- <entry><para>Specifies which column(s ) the primary-key consists of. A
- key-column is same as column, but does not have the exclude property.</para></entry>
+ <entry>
+ <para>
+ Specifies which column(s ) the primary-key consists of. A key-column is same as column, but does not have the exclude property.
+ </para>
+ </entry>
<entry><para>Optional</para></entry>
</row>
@@ -589,11 +560,11 @@
<section>
<title><column></title>
- <para>With a <code><column></code> it is possible to explicitly name the resulting property for a column. It is
- also possible to redefine what jdbc and/or Hibernate type a column should be processed as
- and finally it is possible to completely exclude a column from processing.</para>
+ <para>
+ With a <code><column></code> it is possible to explicitly name the resulting property for a column. It is also possible to redefine what JDBC and/or Hibernate type a column should be processed as and finally it is possible to completely exclude a column from processing.
+ </para>
- <programlisting role="XML"><![CDATA[<column
+ <programlisting role="XML"><![CDATA[<column
name="column_name"
jdbc-type="java.sql.Types type"
type="hibernate_type"
@@ -635,9 +606,11 @@
<row>
<entry><para>jdbc-type</para></entry>
- <entry><para>Which jdbc-type this column should be processed as. A
- value from java.sql.Types, either numerical (93) or the constant name
- (TIMESTAMP).</para></entry>
+ <entry>
+ <para>
+ Which jdbc-type this column should be processed as. A value from <code>java.sql.Types</code>, either numerical (e.g. 93) or the constant name (e.g. <code>TIMESTAMP</code>).
+ </para>
+ </entry>
<entry><para>Optional</para></entry>
</row>
@@ -654,8 +627,7 @@
<row>
<entry><para>property</para></entry>
- <entry><para>What property name will be generated for this
- column</para></entry>
+ <entry><para>What property name will be generated for this column</para></entry>
<entry><para>Optional</para></entry>
</row>
@@ -678,12 +650,11 @@
<section>
<title><foreign-key></title>
- <para>The <code><foreign-key></code>
- has two purposes. One for allowing to define foreign-keys in databases that
- does not support them or does not have them defined in their schema. Secondly, to allow
- defining the name of the resulting properties (many-to-one, one-to-one and one-to-many's).</para>
+ <para>
+ The <code><foreign-key></code> has two purposes. The first is to define foreign-keys in databases that does not support them or do not have them defined in their schema. The second is to define the name of the resulting properties (many-to-one, one-to-one and one-to-many's).
+ </para>
- <programlisting role="XML"><![CDATA[<foreign-key
+ <programlisting role="XML"><![CDATA[<foreign-key
constraint-name="foreignKeyName"
foreign-catalog="catalogName"
foreign-schema="schemaName"
@@ -730,9 +701,11 @@
<row>
<entry><para>constraint-name</para></entry>
- <entry><para>Name of the foreign key constraint. Important when
- naming many-to-one, one-to-one and set. It is the constraint-name that is used to link the
- processed foreign-keys with the resulting property names.</para></entry>
+ <entry>
+ <para>
+ Name of the foreign key constraint. Important when naming many-to-one, one-to-one and set. It is the constraint-name that is used to link the processed foreign-keys with the resulting property names.
+ </para>
+ </entry>
<entry><para>Required</para></entry>
</row>
@@ -740,8 +713,7 @@
<row>
<entry><para>foreign-catalog</para></entry>
- <entry><para>Name of the foreign table's catalog. (Only
- relevant if you want to explicitly define a foreign key).</para></entry>
+ <entry><para>Name of the foreign table's catalog. (Only relevant if you want to explicitly define a foreign key).</para></entry>
<entry><para>Optional</para></entry>
</row>
@@ -749,8 +721,7 @@
<row>
<entry><para>foreign-schema</para></entry>
- <entry><para>Name of the foreign table's schema. (Only relevant
- if you want to explicitly define a foreign key).</para></entry>
+ <entry><para>Name of the foreign table's schema. (Only relevant if you want to explicitly define a foreign key).</para></entry>
<entry><para>Optional</para></entry>
</row>
@@ -759,8 +730,7 @@
<row>
<entry><para>foreign-table</para></entry>
- <entry><para>Name of the foreign table. (Only relevant if you
- want to explicitly define a foreign key).</para></entry>
+ <entry><para>Name of the foreign table. (Only relevant if you want to explicitly define a foreign key).</para></entry>
<entry><para>Optional</para></entry>
</row>
@@ -768,9 +738,11 @@
<row>
<entry><para>column-ref </para></entry>
- <entry><para>Defines that the foreign-key constraint between a
- local-column and foreign-column name. (Only relevant if you want to explicitly
- define a foreign key).</para></entry>
+ <entry>
+ <para>
+ Defines the foreign-key constraint between a local-column and foreign-column name. (Only relevant if you want to explicitly define a foreign key).
+ </para>
+ </entry>
<entry><para>Optional</para></entry>
</row>
@@ -778,9 +750,11 @@
<row>
<entry><para>many-to-one</para></entry>
- <entry><para>Defines that a many-to-one should be created and the
- property attribute specifies the name of the resulting property. Exclude can be
- used to explicitly define that it should be created or not.</para></entry>
+ <entry>
+ <para>
+ Defines that a many-to-one should be created and the property attribute specifies the name of the resulting property. Exclude can be used to explicitly define that it should be created or not.
+ </para>
+ </entry>
<entry><para>Optional</para></entry>
</row>
@@ -788,9 +762,11 @@
<row>
<entry><para>set</para></entry>
- <entry><para>Defines that a set should be created based on this foreign-key
- and the property attribute specifies the name of the resulting (set) property.
- Exclude can be used to explicitly define that it should be created or not.</para></entry>
+ <entry>
+ <para>
+ Defines that a set should be created based on this foreign-key and the property attribute specifies the name of the resulting (set) property. Exclude can be used to explicitly define that it should be created or not.
+ </para>
+ </entry>
<entry><para>Optional</para></entry>
</row>
@@ -798,9 +774,11 @@
<row>
<entry><para>one-to-one</para></entry>
- <entry><para>Defines that a one-to-one should be created and the
- property attribute specifies the name of the resulting property. Exclude can be
- used to explicitly define that it should be created or not.</para></entry>
+ <entry>
+ <para>
+ Defines that a one-to-one should be created and the property attribute specifies the name of the resulting property. Exclude can be used to explicitly define that it should be created or not.
+ </para>
+ </entry>
<entry><para>Optional</para></entry>
</row>
@@ -808,9 +786,11 @@
<row>
<entry><para>inverse-one-to-one</para></entry>
- <entry><para>Defines that an inverse one-to-one should be created based on this foreign-key
- and the property attribute specifies the name of the resulting property.
- Exclude can be used to explicitly define that it should be created or not.</para></entry>
+ <entry>
+ <para>
+ Defines that an inverse one-to-one should be created based on this foreign-key and the property attribute specifies the name of the resulting property. Exclude can be used to explicitly define that it should be created or not.
+ </para>
+ </entry>
<entry><para>Optional</para></entry>
</row>
@@ -826,17 +806,9 @@
<section id="custom-reveng-strategy">
<title>Custom strategy</title>
- <para>It is possible to implement a user strategy. Such strategy must implement <emphasis>
- <property>org.hibernate.cfg.reveng.ReverseEngineeringStrategy</property>.
- </emphasis> It is recommended that one uses the
- <property>DelegatingReverseEngineeringStrategy</property> and provide a public constructor
- which takes another <property>ReverseEngineeringStrategy </property> as an argument. This will
- allow you to only implement the relevant methods and provide a fallback strategy. Example of
- custom delegating strategy which converts all column names that ends with <emphasis>
- <property>"PK"</property>
- </emphasis> into a property named <emphasis>
- <property>"id"</property>.
- </emphasis></para>
+ <para>
+ It is possible to implement a user strategy. Such a strategy must implement <code>org.hibernate.cfg.reveng.ReverseEngineeringStrategy</code>. It is recommended that you use the <code>DelegatingReverseEngineeringStrategy</code> and provide a public constructor which takes another <code>ReverseEngineeringStrategy</code> as an argument. This will allow you to only implement the relevant methods and provide a fall back strategy. Below is an example of a custom delegating strategy which converts all column names that ends with <code>"PK"</code> into a property named <code>"id"</code>.
+ </para>
<programlisting role="JAVA"><![CDATA[public class ExampleStrategy extends DelegatingReverseEngineeringStrategy {
@@ -857,21 +829,16 @@
<section>
<title>Custom Database Metadata</title>
- <para>By default the reverse engineering is performed by reading using the JDBC database
- metadata API. This is done via the class <emphasis>
- <property>org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect</property>
- </emphasis> which is an implementation of <emphasis>
- <property>org.hibernate.cfg.reveng.dialect.MetaDataDialect</property>.
- </emphasis></para>
+ <para>
+ By default the reverse engineering is performed using the JDBC database metadata API. This is done via the class <code>org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect</code> which is an implementation of <code>org.hibernate.cfg.reveng.dialect.MetaDataDialect</code>.
+ </para>
- <para>The default implementation can be replaced with an alternative implementation by setting
- the property <emphasis>
- <property>hibernatetool.metadatadialect</property>
- </emphasis> to a fully qualified classname for a class that implements
- <property>JDBCMetaDataDialect</property>.</para>
+ <para>
+ The default implementation can be replaced with an alternative implementation by setting the property <code>hibernatetool.metadatadialect</code> to a fully qualified classname for a class that implements <code>JDBCMetaDataDialect</code>.
+ </para>
- <para>This can be used to provide database specific optimized metadata reading. If you create an
- optimized/better metadata reading for your database it will be a very welcome
- contribution.</para>
+ <para>
+ This can be used to provide database specific optimized metadata reading. If you create an optimized metadata reader for your database it will be a very welcome contribution.
+ </para>
</section>
</chapter>
13 years, 9 months