JBoss Tools SVN: r36818 - trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2011-11-30 21:00:59 -0500 (Wed, 30 Nov 2011)
New Revision: 36818
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/HQLQueryValidatorTest.java
Log:
Project should be deleted after the test
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/HQLQueryValidatorTest.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/HQLQueryValidatorTest.java 2011-12-01 01:38:24 UTC (rev 36817)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/HQLQueryValidatorTest.java 2011-12-01 02:00:59 UTC (rev 36818)
@@ -149,7 +149,7 @@
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().setPerspective(
PlatformUI.getWorkbench().getPerspectiveRegistry().findPerspectiveWithId("org.eclipse.ui.resourcePerspective")); //$NON-NLS-1$
- //getProject().deleteIProject(false);
+ getProject().deleteIProject(false);
waitForJobs();
}
public void testHQLDetector() throws JavaModelException {
14 years
JBoss Tools SVN: r36817 - in trunk/vpe/plugins: org.jboss.tools.vpe.browsersim.browser and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2011-11-30 20:38:24 -0500 (Wed, 30 Nov 2011)
New Revision: 36817
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.browser/pom.xml
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/pom.xml
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/pom.xml
Log:
fixed parent pom reference in browsersim plugins
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/pom.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/pom.xml 2011-12-01 01:37:38 UTC (rev 36816)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/pom.xml 2011-12-01 01:38:24 UTC (rev 36817)
@@ -2,8 +2,8 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>vpe</artifactId>
+ <groupId>org.jboss.tools.vpe</groupId>
+ <artifactId>plugins</artifactId>
<version>3.3.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.vpe.browsersim</groupId>
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.browser/pom.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.browser/pom.xml 2011-12-01 01:37:38 UTC (rev 36816)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.browser/pom.xml 2011-12-01 01:38:24 UTC (rev 36817)
@@ -2,8 +2,8 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>vpe</artifactId>
+ <groupId>org.jboss.tools.vpe</groupId>
+ <artifactId>plugins</artifactId>
<version>3.3.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.vpe.browsersim</groupId>
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/pom.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/pom.xml 2011-12-01 01:37:38 UTC (rev 36816)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/pom.xml 2011-12-01 01:38:24 UTC (rev 36817)
@@ -2,8 +2,8 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>vpe</artifactId>
+ <groupId>org.jboss.tools.vpe</groupId>
+ <artifactId>plugins</artifactId>
<version>3.3.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.vpe.browsersim</groupId>
14 years
JBoss Tools SVN: r36816 - trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-11-30 20:37:38 -0500 (Wed, 30 Nov 2011)
New Revision: 36816
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/AppRegisterWizard.java
Log:
JBIDE-10245
https://issues.jboss.org/browse/JBIDE-10245
ImageRegistry is used to manage images.
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/AppRegisterWizard.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/AppRegisterWizard.java 2011-12-01 01:36:33 UTC (rev 36815)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/AppRegisterWizard.java 2011-12-01 01:37:38 UTC (rev 36816)
@@ -140,7 +140,7 @@
WizardDialog dialog = new WizardDialog(shell, this);
dialog.create();
dialog.getShell().setText("" + p.getProperty("title")); //$NON-NLS-1$ //$NON-NLS-2$
- dialog.setTitleImage(ModelUIImages.getImageDescriptor(ModelUIImages.WIZARD_DEFAULT).createImage(null));
+ dialog.setTitleImage(ModelUIImages.getImage(ModelUIImages.WIZARD_DEFAULT));
return dialog.open();
}
14 years
JBoss Tools SVN: r36815 - trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-11-30 20:36:33 -0500 (Wed, 30 Nov 2011)
New Revision: 36815
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeResourcesDialog.java
Log:
JBIDE-10245
https://issues.jboss.org/browse/JBIDE-10245
ImageRegistry is used to manage images.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeResourcesDialog.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeResourcesDialog.java 2011-12-01 01:34:10 UTC (rev 36814)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeResourcesDialog.java 2011-12-01 01:36:33 UTC (rev 36815)
@@ -20,11 +20,8 @@
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
@@ -36,7 +33,6 @@
import org.jboss.tools.common.model.ui.ModelUIImages;
import org.jboss.tools.common.model.ui.action.CommandBar;
import org.jboss.tools.common.resref.core.ResourceReference;
-import org.jboss.tools.common.util.SwtUtil;
public class VpeResourcesDialog extends TitleAreaDialog {
@@ -74,10 +70,7 @@
protected Control createDialogArea(Composite parent) {
getShell().setText(Messages.VRD_DEFAULT_WINDOW_TITLE);
setTitle(Messages.VRD_DEFAULT_TITLE);
- final Image wizardDefaultImage = ModelUIImages.getImageDescriptor(
- ModelUIImages.WIZARD_DEFAULT).createImage(null);
- setTitleImage(wizardDefaultImage);
- SwtUtil.bindDisposal(wizardDefaultImage, parent);
+ setTitleImage(ModelUIImages.getImage(ModelUIImages.WIZARD_DEFAULT)); // image is managed by registry
setMessage(Messages.VRD_PAGE_DESIGN_OPTIONS_ABOUT);
Composite composite = new Composite(parent, SWT.NONE);
14 years
JBoss Tools SVN: r36814 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-11-30 20:34:10 -0500 (Wed, 30 Nov 2011)
New Revision: 36814
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeEditAnyDialog.java
Log:
JBIDE-10245
https://issues.jboss.org/browse/JBIDE-10245
ImageRegistry is used to manage images.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeEditAnyDialog.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeEditAnyDialog.java 2011-12-01 01:29:57 UTC (rev 36813)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeEditAnyDialog.java 2011-12-01 01:34:10 UTC (rev 36814)
@@ -40,7 +40,6 @@
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.jboss.tools.common.model.ui.ModelUIImages;
-import org.jboss.tools.common.util.SwtUtil;
import org.jboss.tools.jst.css.CSSPlugin;
import org.jboss.tools.jst.css.dialog.CSSStyleDialog;
import org.jboss.tools.jst.css.dialog.common.Util;
@@ -97,10 +96,7 @@
*/
getShell().setText(VpeUIMessages.TEMPLATE);
setTitle(VpeUIMessages.TAG_ATTRIBUTES);
- final Image titleImage = ModelUIImages.getImageDescriptor(
- ModelUIImages.WIZARD_DEFAULT).createImage(null);
- setTitleImage(titleImage);
- SwtUtil.bindDisposal(titleImage, getShell());
+ setTitleImage(ModelUIImages.getImage(ModelUIImages.WIZARD_DEFAULT)); //image is managed by registry
setMessage(VpeUIMessages.USER_SPECIFIED_TAG_DIALOG_DESCRIPTION);
/*
14 years
JBoss Tools SVN: r36813 - tags.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-11-30 20:29:57 -0500 (Wed, 30 Nov 2011)
New Revision: 36813
Added:
tags/jbosstools-3.2.2.Final/
Log:
tag for 3.2.2.Final release
14 years
JBoss Tools SVN: r36812 - in trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui: action and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-11-30 20:27:30 -0500 (Wed, 30 Nov 2011)
New Revision: 36812
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/ModelUIImages.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/ActionX.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/XModelObjectAction.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/navigator/LabelDecoratorImpl.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/query/AbstractQueryDialog.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/query/AbstractQueryWizardView.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/special/DefaultSpecialWizardDialog.java
Log:
JBIDE-10245
https://issues.jboss.org/browse/JBIDE-10245
ImageRegistry is used to manage images.
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/ModelUIImages.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/ModelUIImages.java 2011-12-01 01:17:02 UTC (rev 36811)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/ModelUIImages.java 2011-12-01 01:27:30 UTC (rev 36812)
@@ -15,6 +15,7 @@
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.swt.graphics.Image;
public class ModelUIImages {
@@ -52,17 +53,29 @@
}
public static Image getImage(String key) {
- if(ModelUIPlugin.isDebugEnabled()) {
- ModelUIPlugin.getPluginLog().logInfo("Create image for key '"+key+"'."); //$NON-NLS-1$ //$NON-NLS-2$
+ getImageDescriptor(key); // provide image in the registry
+ ImageRegistry registry = ModelUIPlugin.getDefault().getImageRegistry();
+ synchronized(registry) {
+ return registry.get(key);
}
- return INSTANCE.createImageDescriptor(key).createImage();
}
public static ImageDescriptor getImageDescriptor(String key) {
- if(ModelUIPlugin.isDebugEnabled()) {
- ModelUIPlugin.getPluginLog().logInfo("Create image descriptor for key '"+key+"'."); //$NON-NLS-1$ //$NON-NLS-2$
+ ImageDescriptor result = null;
+ ImageRegistry registry = ModelUIPlugin.getDefault().getImageRegistry();
+ synchronized(registry) {
+ result = registry.getDescriptor(key);
}
- return INSTANCE.createImageDescriptor(key);
+ if(result == null) {
+ result = INSTANCE.createImageDescriptor(key);
+ if(result != null) {
+ synchronized (registry) {
+ registry.remove(key);
+ registry.put(key, result);
+ }
+ }
+ }
+ return result;
}
public static void setImageDescriptors(IAction action, String iconName) {
@@ -94,10 +107,6 @@
this(url,null);
}
- public Image getImageByFileName(String key) {
- return createImageDescriptor(key).createImage();
- }
-
public ImageDescriptor createImageDescriptor(String key) {
try {
return ImageDescriptor.createFromURL(makeIconFileURL(key));
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/ActionX.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/ActionX.java 2011-12-01 01:17:02 UTC (rev 36811)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/ActionX.java 2011-12-01 01:27:30 UTC (rev 36812)
@@ -53,11 +53,13 @@
setText(displayName);
- String iconKey = action.getIconKey();
- Image image = action.getMetaModel().getIconList().getImage(iconKey);
- setImageDescriptor(new XImageDescriptor(image));
+ setImageDescriptor(new XImageDescriptor(getImage()));
setEnabled(enabled);
}
+
+ public Image getImage() {
+ return action.getMetaModel().getIconList().getImage(action.getIconKey());
+ }
class XImageDescriptor extends ImageDescriptor {
Image image;
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/XModelObjectAction.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/XModelObjectAction.java 2011-12-01 01:17:02 UTC (rev 36811)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/action/XModelObjectAction.java 2011-12-01 01:27:30 UTC (rev 36812)
@@ -142,7 +142,7 @@
item.addSelectionListener(new AL());
item.setText(eclipseAction.getText());
item.setEnabled(eclipseAction.isEnabled());
- item.setImage(eclipseAction.getImageDescriptor().createImage());
+ item.setImage(eclipseAction.getImage());
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/navigator/LabelDecoratorImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/navigator/LabelDecoratorImpl.java 2011-12-01 01:17:02 UTC (rev 36811)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/navigator/LabelDecoratorImpl.java 2011-12-01 01:27:30 UTC (rev 36812)
@@ -14,11 +14,13 @@
import org.eclipse.core.resources.IMarker;
import org.eclipse.jface.resource.CompositeImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.jface.viewers.*;
import org.eclipse.swt.graphics.*;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.markers.XMarkerManager;
import org.jboss.tools.common.model.ui.ModelUIImages;
+import org.jboss.tools.common.model.ui.ModelUIPlugin;
public class LabelDecoratorImpl implements ILabelDecorator {
public static Image emptyImage = ModelUIImages.getImage("empty_co.gif"); //$NON-NLS-1$
@@ -48,9 +50,10 @@
private Image getErrorImage(Image image) {
Image i = (Image)errorImages.get(image);
- if(i == null) {
+ if(i == null || i.isDisposed()) {
ErrorImageDescriptor d = new ErrorImageDescriptor(image, IMarker.SEVERITY_ERROR);
i = d.createImage();
+ registerImage(i);
errorImages.put(image, i);
}
return i;
@@ -58,14 +61,24 @@
private Image getWarningImage(Image image) {
Image i = (Image)warningImages.get(image);
- if(i == null) {
+ if(i == null || i.isDisposed()) {
ErrorImageDescriptor d = new ErrorImageDescriptor(image, IMarker.SEVERITY_WARNING);
i = d.createImage();
+ registerImage(i);
warningImages.put(image, i);
}
return i;
}
+ private void registerImage(Image i) {
+ ImageRegistry registry = ModelUIPlugin.getDefault().getImageRegistry();
+ String key = "" + Math.random(); //We retrieve created images by maps, let use unique random key for registry.
+ synchronized(registry) {
+ registry.remove(key); //Just in case, to be on the safe side.
+ registry.put(key, i);
+ }
+ }
+
int getErrorState(Object element) {
if(!(element instanceof XModelObject)) return 0;
return XMarkerManager.getInstance().getErrorState((XModelObject)element);
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/query/AbstractQueryDialog.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/query/AbstractQueryDialog.java 2011-12-01 01:17:02 UTC (rev 36811)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/query/AbstractQueryDialog.java 2011-12-01 01:27:30 UTC (rev 36812)
@@ -43,7 +43,7 @@
}
protected Control createDialogArea(Composite parent) {
- setTitleImage(ModelUIImages.getImageDescriptor(ModelUIImages.WIZARD_DEFAULT).createImage(null));
+ setTitleImage(ModelUIImages.getImage(ModelUIImages.WIZARD_DEFAULT));
Composite composite = new Composite(parent, SWT.NONE);
GridLayout gridLayout = new GridLayout(1, false);
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/query/AbstractQueryWizardView.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/query/AbstractQueryWizardView.java 2011-12-01 01:17:02 UTC (rev 36811)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/query/AbstractQueryWizardView.java 2011-12-01 01:27:30 UTC (rev 36812)
@@ -150,7 +150,7 @@
if ((titleImage!=null)&&(titleDialog!=null)) {
titleDialog.setTitleImage(titleImage);
} else {
- titleDialog.setTitleImage(ModelUIImages.getImageDescriptor(ModelUIImages.WIZARD_DEFAULT).createImage(null));
+ titleDialog.setTitleImage(ModelUIImages.getImage(ModelUIImages.WIZARD_DEFAULT));
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/special/DefaultSpecialWizardDialog.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/special/DefaultSpecialWizardDialog.java 2011-12-01 01:17:02 UTC (rev 36811)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizards/special/DefaultSpecialWizardDialog.java 2011-12-01 01:27:30 UTC (rev 36812)
@@ -53,7 +53,7 @@
stepPage = null;
}
ISpecialWizardStep wizardStep = wizard.getWizardStep();
- this.setTitleImage(ModelUIImages.getImageDescriptor(ModelUIImages.WIZARD_DEFAULT).createImage(null));
+ this.setTitleImage(ModelUIImages.getImage(ModelUIImages.WIZARD_DEFAULT));
return wizardStep.createControl(parent);
}
14 years
JBoss Tools SVN: r36811 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2011-11-30 20:17:02 -0500 (Wed, 30 Nov 2011)
New Revision: 36811
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/GenerateInitWizardPage.java
Log:
Added combobox with hibernate version to jpa generate wizards
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/GenerateInitWizardPage.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/GenerateInitWizardPage.java 2011-12-01 01:10:48 UTC (rev 36810)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/GenerateInitWizardPage.java 2011-12-01 01:17:02 UTC (rev 36811)
@@ -42,6 +42,7 @@
import org.hibernate.console.ConnectionProfileUtil;
import org.hibernate.console.ConsoleConfiguration;
import org.hibernate.console.KnownConfigurations;
+import org.hibernate.console.ext.HibernateExtensionManager;
import org.hibernate.console.preferences.ConsoleConfigurationPreferences;
import org.hibernate.console.preferences.ConsoleConfigurationPreferences.ConfigurationMode;
import org.hibernate.eclipse.console.EclipseConsoleConfigurationPreferences;
@@ -67,6 +68,8 @@
private StringButtonDialogField outputdir;
+ private ComboDialogField hibernateVersion;
+
private ComboDialogField connectionProfileName;
private StringButtonDialogField schemaName;
@@ -137,6 +140,7 @@
public void widgetSelected(SelectionEvent e) {
consoleConfigurationName.setEnabled(selectMethod.getSelection());
+ hibernateVersion.setEnabled(!selectMethod.getSelection());
connectionProfileName.setEnabled(!selectMethod.getSelection());
schemaName.setEnabled(!selectMethod.getSelection());
dialectName.setEnabled(!selectMethod.getSelection());
@@ -159,10 +163,17 @@
consoleConfigurationName.setDialogFieldListener(fieldlistener);
consoleConfigurationName.doFillIntoGrid(container, numColumns);
- createDBGroup(container, numColumns);
-
+ hibernateVersion = new ComboDialogField(SWT.READ_ONLY);
+ hibernateVersion.setLabelText(HibernateConsoleMessages.ConsoleConfigurationMainTab_0);
+ hibernateVersion.setItems((String[])HibernateExtensionManager.getHibernateExtensionDefinitionsAsMap().keySet().toArray(new String[0]));
+ hibernateVersion.selectItem(0);
+ hibernateVersion.setDialogFieldListener(fieldlistener);
+ hibernateVersion.doFillIntoGrid(container, numColumns);
+ hibernateVersion.setEnabled(false);
+
+ createDBGroup(container, numColumns);
+
setControl(container);
-
if (StringHelper.isEmpty(consoleConfigurationName.getText())) {
setPageComplete(false);
}
@@ -226,6 +237,9 @@
schemaName.setEnabled(!selectMethod.getSelection());
}
+ protected String getHibernateVersion(){
+ return hibernateVersion.getText();
+ }
protected void dialogChanged() {
@@ -285,7 +299,7 @@
String dialect = determineDialect();
String ccName = launchManager.generateLaunchConfigurationName(HibernateConsoleMessages.AddConfigurationAction_hibernate);
ConsoleConfigurationPreferences prefs = new EclipseConsoleConfigurationPreferences(ccName,
- ConfigurationMode.JPA, null, jpaProject.getName(), true,
+ ConfigurationMode.JPA, getHibernateVersion(), jpaProject.getName(), true,
null, null, null,
new IPath[0], new IPath[0], null, null,
getConnectionProfileName(), dialect);
14 years
JBoss Tools SVN: r36810 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2011-11-30 20:10:48 -0500 (Wed, 30 Nov 2011)
New Revision: 36810
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/LazyDatabaseSchemaWorkbenchAdapter.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/TableContainer.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/TableContainerWorkbenchAdapter.java
Log:
Restore Database tree to work
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/LazyDatabaseSchemaWorkbenchAdapter.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/LazyDatabaseSchemaWorkbenchAdapter.java 2011-12-01 01:09:41 UTC (rev 36809)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/LazyDatabaseSchemaWorkbenchAdapter.java 2011-12-01 01:10:48 UTC (rev 36810)
@@ -43,10 +43,10 @@
import org.hibernate.console.ConsoleConfiguration;
import org.hibernate.console.ImageConstants;
import org.hibernate.console.execution.ExecutionContext;
-import org.hibernate.console.ext.api.ITable;
import org.hibernate.eclipse.console.HibernateConsoleMessages;
import org.hibernate.eclipse.console.HibernateConsolePlugin;
import org.hibernate.eclipse.console.utils.EclipseImages;
+import org.hibernate.mapping.Table;
public class LazyDatabaseSchemaWorkbenchAdapter extends BasicWorkbenchAdapter {
@@ -66,9 +66,9 @@
List<TableContainer> result = new ArrayList<TableContainer>();
- Iterator<Map.Entry<String, List<ITable>>> qualifierEntries = db.getQualifierEntries();
+ Iterator<Map.Entry<String, List<Table>>> qualifierEntries = db.getQualifierEntries();
while (qualifierEntries.hasNext()) {
- Map.Entry<String, List<ITable>> entry = qualifierEntries.next();
+ Map.Entry<String, List<Table>> entry = qualifierEntries.next();
result.add(new TableContainer(entry.getKey(), entry.getValue()));
}
res = toArray(result.iterator(), TableContainer.class, new Comparator<TableContainer>() {
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/TableContainer.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/TableContainer.java 2011-12-01 01:09:41 UTC (rev 36809)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/TableContainer.java 2011-12-01 01:10:48 UTC (rev 36810)
@@ -23,19 +23,19 @@
import java.util.List;
-import org.hibernate.console.ext.api.ITable;
+import org.hibernate.mapping.Table;
public class TableContainer {
- private final List<ITable> tables;
+ private final List<Table> tables;
private final String name;
- public TableContainer(String name, List<ITable> tables) {
+ public TableContainer(String name, List<Table> tables) {
this.tables = tables;
this.name = name;
}
- public List<ITable> getTables() {
+ public List<Table> getTables() {
return tables;
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/TableContainerWorkbenchAdapter.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/TableContainerWorkbenchAdapter.java 2011-12-01 01:09:41 UTC (rev 36809)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/TableContainerWorkbenchAdapter.java 2011-12-01 01:10:48 UTC (rev 36810)
@@ -25,17 +25,17 @@
import org.eclipse.jface.resource.ImageDescriptor;
import org.hibernate.console.ImageConstants;
-import org.hibernate.console.ext.api.ITable;
import org.hibernate.eclipse.console.HibernateConsoleMessages;
import org.hibernate.eclipse.console.utils.EclipseImages;
+import org.hibernate.mapping.Table;
public class TableContainerWorkbenchAdapter extends BasicWorkbenchAdapter {
public Object[] getChildren(Object o) {
TableContainer tc = getTableContainer( o );
- return toArray(tc.getTables().iterator(), ITable.class, new Comparator<ITable>() {
+ return toArray(tc.getTables().iterator(), Table.class, new Comparator<Table>() {
- public int compare(ITable arg0, ITable arg1) {
+ public int compare(Table arg0, Table arg1) {
return arg0.getName().compareTo(arg1.getName());
}
14 years
JBoss Tools SVN: r36809 - trunk/jsf/tests/org.jboss.tools.jsf.verification.test/src/org/jboss/tools/jsf/verification/test.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-11-30 20:09:41 -0500 (Wed, 30 Nov 2011)
New Revision: 36809
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.verification.test/src/org/jboss/tools/jsf/verification/test/JSFVerificationTest.java
trunk/jsf/tests/org.jboss.tools.jsf.verification.test/src/org/jboss/tools/jsf/verification/test/JsfVerificationAllTests.java
Log:
JBIDE-10190
https://issues.jboss.org/browse/JBIDE-10190
Old verification validator test removed.
Modified: trunk/jsf/tests/org.jboss.tools.jsf.verification.test/src/org/jboss/tools/jsf/verification/test/JSFVerificationTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.verification.test/src/org/jboss/tools/jsf/verification/test/JSFVerificationTest.java 2011-12-01 01:07:06 UTC (rev 36808)
+++ trunk/jsf/tests/org.jboss.tools.jsf.verification.test/src/org/jboss/tools/jsf/verification/test/JSFVerificationTest.java 2011-12-01 01:09:41 UTC (rev 36809)
@@ -35,6 +35,10 @@
provider = new TestProjectProvider("org.jboss.tools.jsf.verification.test", null, "TestJSFVerification", makeCopy);
project = provider.getProject();
}
+
+ public void testDummy() {
+ //for automatic test to have non-empty set
+ }
//verification removed, see JBIDE-10190
public void _testPaths() {
Modified: trunk/jsf/tests/org.jboss.tools.jsf.verification.test/src/org/jboss/tools/jsf/verification/test/JsfVerificationAllTests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.verification.test/src/org/jboss/tools/jsf/verification/test/JsfVerificationAllTests.java 2011-12-01 01:07:06 UTC (rev 36808)
+++ trunk/jsf/tests/org.jboss.tools.jsf.verification.test/src/org/jboss/tools/jsf/verification/test/JsfVerificationAllTests.java 2011-12-01 01:09:41 UTC (rev 36809)
@@ -21,7 +21,7 @@
//$JUnit-BEGIN$
//verification removed, see JBIDE-10190
-// suite.addTestSuite(JSFVerificationTest.class);
+ suite.addTestSuite(JSFVerificationTest.class);
// suite.addTestSuite(WebVerificationTest.class);
//$JUnit-END$
14 years