Author: dgeraskov
Date: 2010-11-01 09:00:20 -0400 (Mon, 01 Nov 2010)
New Revision: 26157
Added:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/TextDialogCellEditor.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/annotations/hibernate-jpa-2.0-api-1.0.0.Final.jar
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/QueryParametersPage.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/.classpath
trunk/hibernatetools/plugins/org.hibernate.eclipse/META-INF/MANIFEST.MF
trunk/hibernatetools/plugins/org.hibernate.eclipse/build.properties
trunk/hibernatetools/plugins/org.hibernate.eclipse/hibernate-build.xml
trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/hibernate3.jar
trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/tools/hibernate-tools.jar
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenSourceFileTest.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/project/ConfigurableTestProject.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/project/TestProject.java
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/HQLQueryValidatorTest.java
Log:
JBIDE-7241
move hibernate plugins to hibernte-tools3.4.0.Beta2
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/.classpath
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/.classpath 2010-11-01 12:39:23 UTC
(rev 26156)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/.classpath 2010-11-01 13:00:20 UTC
(rev 26157)
@@ -6,6 +6,10 @@
<classpathentry exported="true" kind="lib"
path="lib/hibernate/asm.jar"/>
<classpathentry exported="true" kind="lib"
path="lib/hibernate/asm-attrs.jar"/>
<classpathentry exported="true" kind="lib"
path="lib/hibernate/dom4j-1.6.1.jar"/>
+ <classpathentry exported="true" kind="lib"
path="lib/hibernate/commons-logging-1.0.4.jar"/>
+ <classpathentry exported="true" kind="lib"
path="lib/hibernate/concurrent-1.3.2.jar"/>
+ <classpathentry exported="true" kind="lib"
path="lib/hibernate/connector.jar"/>
+ <classpathentry exported="true" kind="lib"
path="lib/annotations/hibernate-jpa-2.0-api-1.0.0.Final.jar"/>
<classpathentry exported="true" kind="lib"
path="lib/hibernate/hibernate3.jar"/>
<classpathentry exported="true" kind="lib"
path="lib/hibernate/jboss-cache.jar"/>
<classpathentry exported="true" kind="lib"
path="lib/hibernate/jboss-common.jar"/>
@@ -17,28 +21,20 @@
<classpathentry exported="true" kind="lib"
path="lib/hibernate/oscache-2.1.jar"/>
<classpathentry exported="true" kind="lib"
path="lib/hibernate/proxool-0.8.3.jar"/>
<classpathentry exported="true" kind="lib"
path="lib/hibernate/swarmcache-1.0rc2.jar"/>
+ <classpathentry exported="true" kind="lib"
path="lib/tools/freemarker.jar"/>
+ <classpathentry exported="true" kind="lib"
path="lib/tools/hibernate-tools.jar"/>
<classpathentry exported="true" kind="lib"
path="lib/bsh-core-2.0b4.jar"/>
- <classpathentry exported="true" kind="lib"
path="lib/annotations/hibernate-annotations.jar"/>
<classpathentry exported="true" kind="lib"
path="lib/hibernate/jgroups-2.2.8.jar"/>
<classpathentry exported="true" kind="lib"
path="lib/hibernate/antlr-2.7.6.jar"/>
- <classpathentry exported="true" kind="lib"
path="lib/annotations/hibernate-entitymanager.jar"/>
+ <classpathentry exported="true" kind="lib"
path="lib/tools/jtidy-r8-20060801.jar"/>
<classpathentry exported="true" kind="lib"
path="lib/hibernate/javassist.jar"/>
+ <classpathentry exported="true" kind="lib"
path="lib/hibernate/ehcache-1.2.3.jar"/>
+ <classpathentry exported="true" kind="lib"
path="lib/hibernate/c3p0-0.9.1.jar"/>
<classpathentry exported="true" kind="lib"
path="lib/annotations/hibernate-validator.jar"/>
<classpathentry exported="true" kind="lib"
path="lib/hibernate/log4j-1.2.15.jar"/>
- <classpathentry exported="true" kind="lib"
path="lib/hibernate/hibernate-jmx.jar"/>
+ <classpathentry exported="true" kind="lib"
path="lib/hibernate/cglib-2.2.jar"/>
<classpathentry exported="true" kind="lib"
path="lib/hibernate/commons-collections-3.1.jar"/>
<classpathentry exported="true" kind="lib"
path="lib/hibernate/slf4j-api-1.5.8.jar"/>
- <classpathentry exported="true" kind="lib"
path="lib/hibernate/cglib-2.2.jar"/>
- <classpathentry exported="true" kind="lib"
path="lib/annotations/hibernate-commons-annotations.jar"/>
- <classpathentry exported="true" kind="lib"
path="lib/annotations/ejb3-persistence.jar"/>
- <classpathentry exported="true" kind="lib"
path="lib/hibernate/c3p0-0.9.1.jar"/>
- <classpathentry exported="true" kind="lib"
path="lib/hibernate/commons-logging-1.0.4.jar"/>
- <classpathentry exported="true" kind="lib"
path="lib/hibernate/concurrent-1.3.2.jar"/>
- <classpathentry exported="true" kind="lib"
path="lib/hibernate/connector.jar"/>
- <classpathentry exported="true" kind="lib"
path="lib/hibernate/ehcache-1.2.3.jar"/>
<classpathentry exported="true" kind="lib"
path="lib/hibernate/slf4j-log4j12-1.5.8.jar"/>
- <classpathentry exported="true" kind="lib"
path="lib/tools/freemarker.jar"/>
- <classpathentry exported="true" kind="lib"
path="lib/tools/hibernate-tools.jar"/>
- <classpathentry exported="true" kind="lib"
path="lib/tools/jtidy-r8-20060801.jar"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/META-INF/MANIFEST.MF
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/META-INF/MANIFEST.MF 2010-11-01
12:39:23 UTC (rev 26156)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/META-INF/MANIFEST.MF 2010-11-01
13:00:20 UTC (rev 26157)
@@ -24,21 +24,17 @@
lib/tools/hibernate-tools.jar,
lib/tools/freemarker.jar,
lib/bsh-core-2.0b4.jar,
- lib/annotations/ejb3-persistence.jar,
- lib/annotations/hibernate-annotations.jar,
lib/hibernate/jgroups-2.2.8.jar,
lib/hibernate/antlr-2.7.6.jar,
lib/tools/jtidy-r8-20060801.jar,
- lib/annotations/hibernate-entitymanager.jar,
+ lib/annotations/hibernate-jpa-2.0-api-1.0.0.Final.jar,
lib/hibernate/javassist.jar,
lib/hibernate/ehcache-1.2.3.jar,
lib/hibernate/c3p0-0.9.1.jar,
- lib/annotations/hibernate-commons-annotations.jar,
lib/annotations/hibernate-validator.jar,
lib/hibernate/log4j-1.2.15.jar,
lib/hibernate/cglib-2.2.jar,
lib/hibernate/commons-collections-3.1.jar,
- lib/hibernate/hibernate-jmx.jar,
lib/hibernate/slf4j-api-1.5.8.jar,
lib/hibernate/slf4j-log4j12-1.5.8.jar,
lib/hibernate/commons-collections-3.1.jar
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/build.properties
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/build.properties 2010-11-01
12:39:23 UTC (rev 26156)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/build.properties 2010-11-01
13:00:20 UTC (rev 26157)
@@ -3,11 +3,10 @@
hibernate-log4j.properties,\
about.html,\
lib/tools/jtidy-r8-20060801.jar,\
- lib/annotations/hibernate-entitymanager.jar,\
+ lib/annotations/hibernate-jpa-2.0-api-1.0.0.Final.jar,\
lib/hibernate/javassist.jar,\
lib/hibernate/ehcache-1.2.3.jar,\
lib/hibernate/c3p0-0.9.1.jar,\
- lib/annotations/hibernate-commons-annotations.jar,\
lib/annotations/hibernate-validator.jar,\
lib/hibernate/log4j-1.2.15.jar,\
lib/hibernate/slf4j-api-1.5.8.jar,\
@@ -19,7 +18,6 @@
plugin.properties,\
lib/hibernate/cglib-2.2.jar,\
lib/hibernate/commons-collections-3.1.jar,\
- lib/hibernate/hibernate-jmx.jar,\
org.hibernate.eclipse.jar
jars.compile.order = org.hibernate.eclipse.jar
src.includes = about.html,\
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/hibernate-build.xml
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/hibernate-build.xml 2010-11-01
12:39:23 UTC (rev 26156)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/hibernate-build.xml 2010-11-01
13:00:20 UTC (rev 26157)
@@ -5,7 +5,7 @@
<project name="org.hibernate.eclipse" basedir="."
default="update">
- <property name="hibernate.root"
location="/home/max/work/os/hibernate/branches/Branch_3_2"/>
+ <property name="hibernate.root"
location="C:/dev/workspaces/RedHat/hibernate_trunk-orig/"/>
<available file="${hibernate.root}"
property="hibernate.root.exists"/>
<fail unless="hibernate.root.exists">hibernate.root needs to be set to
the root of the hibernate svn checkout. Currently it is ${hibernate.root} which does not
exist.</fail>
Added:
trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/annotations/hibernate-jpa-2.0-api-1.0.0.Final.jar
===================================================================
(Binary files differ)
Property changes on:
trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/annotations/hibernate-jpa-2.0-api-1.0.0.Final.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/hibernate3.jar
===================================================================
(Binary files differ)
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/tools/hibernate-tools.jar
===================================================================
(Binary files differ)
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/QueryParametersPage.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/QueryParametersPage.java 2010-11-01
12:39:23 UTC (rev 26156)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/QueryParametersPage.java 2010-11-01
13:00:20 UTC (rev 26157)
@@ -48,6 +48,7 @@
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.TextCellEditor;
import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.window.Window;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
@@ -62,6 +63,7 @@
import org.eclipse.ui.part.Page;
import org.hibernate.console.ConsoleQueryParameter;
import org.hibernate.console.ImageConstants;
+import org.hibernate.console.ParametersListDialog;
import org.hibernate.console.QueryInputModel;
import org.hibernate.eclipse.console.HibernateConsoleMessages;
import org.hibernate.eclipse.console.QueryEditor;
@@ -122,8 +124,6 @@
toggleActive.setChecked(model.ignoreParameters());
tableViewer.getTable().setEnabled(!model.ignoreParameters());
tableViewer.setInput(model);
-
-
}
private void createStatusLabel() {
@@ -224,11 +224,27 @@
}
}
if ( VALUE_PROPERTY.equals( property ) ) {
- cqp.setValueFromString((String) value);
+ String[] inputStrings;
+ if (value instanceof String[]){
+ inputStrings = (String[])value;
+ } else {
+ inputStrings = new String[]{(String) value};
+ }
+ Object[] values = new Object[inputStrings.length];
+ for (int i = 0; i < inputStrings.length; i++) {
+ values[i] = cqp.convertStringToValue(inputStrings[i]);
+ }
+ if (values.length > 1){
+ cqp.setValue(values);
+ } else if (values.length == 1){
+ cqp.setValue(values[0]);
+ } else {
+ cqp.setValue(null);
+ }
}
if ( NULL_PROPERTY.equals( property ) ) {
if(cqp.isNull()) {
- cqp.setValueFromString( "" ); // best attempt to "unnull"
//$NON-NLS-1$
+ cqp.setValue(cqp.convertStringToValue( "" )); // best attempt to
"unnull" //$NON-NLS-1$
} else {
cqp.setNull();
}
@@ -253,7 +269,11 @@
}
}
if ( VALUE_PROPERTY.equals( property ) ) {
- return cqp.getValueAsString();
+ return cqp.getStringValues();
+ /*if (cqp.isArrayValue()){
+ return cqp.convertValueToString(((Object[])cqp.getValue())[0]);
+ }
+ return cqp.convertValueToString(cqp.getValue());*/
}
if ( NULL_PROPERTY.equals( property )) {
return Boolean.valueOf(cqp.isNull());
@@ -294,7 +314,21 @@
CellEditor[] editors = new CellEditor[columnProperties.length];
editors[0] = new TextCellEditor( queryParametersTable );
editors[1] = new ComboBoxCellEditor( queryParametersTable, valueTypes );
- editors[2] = new TextCellEditor( queryParametersTable );
+ editors[2] = new TextDialogCellEditor(queryParametersTable) {
+
+ @Override
+ protected Object openDialogBox(Control cellEditorWindow) {
+ Object firstElement =
((IStructuredSelection)tableViewer.getSelection()).getFirstElement();
+ if(firstElement instanceof ConsoleQueryParameter) {
+ ParametersListDialog pld = new ParametersListDialog(null, (ConsoleQueryParameter)
firstElement);
+ if (pld.open()==Window.OK){
+ return pld.getValue();//String[]
+ }
+ }
+ return getValue();//could be String or String[]
+ }
+ };
+
editors[3] = new CheckboxCellEditor( queryParametersTable );
tableViewer.setCellEditors( editors );
@@ -323,7 +357,7 @@
case 1:
return cqp.getType().getName();
case 2:
- return cqp.getValueAsString();
+ return cqp.getStringValues()[0];
case 3:
return null; //cqp.isNull()?"X":"";
default:
Added:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/TextDialogCellEditor.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/TextDialogCellEditor.java
(rev 0)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/TextDialogCellEditor.java 2010-11-01
13:00:20 UTC (rev 26157)
@@ -0,0 +1,243 @@
+/*******************************************************************************
+ * 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.hibernate.eclipse.console.views;
+
+import java.text.MessageFormat;
+
+import org.eclipse.jface.viewers.TextCellEditor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.FocusListener;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Layout;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public abstract class TextDialogCellEditor extends TextCellEditor {
+
+ private Text text;
+
+ /**
+ * The button.
+ */
+ private Button button;
+
+ /**
+ * The editor control.
+ */
+ private Composite editor;
+
+ private String[] strValues = null;
+
+ private FocusListener buttonFocusListener;
+
+ protected TextDialogCellEditor(Composite parent) {
+ super(parent);
+ }
+
+ @Override
+ protected Control createControl(Composite parent) {
+ Font font = parent.getFont();
+ Color bg = parent.getBackground();
+
+ editor = new Composite(parent, getStyle());
+ editor.setFont(font);
+ editor.setBackground(bg);
+ editor.setLayout(new DialogCellLayout());
+
+ text = (Text) super.createControl(editor);
+ updateContents(strValues);
+
+ button = createButton(editor);
+ button.setFont(font);
+
+ button.addKeyListener(new KeyAdapter() {
+ /* (non-Javadoc)
+ * @see
org.eclipse.swt.events.KeyListener#keyReleased(org.eclipse.swt.events.KeyEvent)
+ */
+ public void keyReleased(KeyEvent e) {
+ if (e.character == '\u001b') { // Escape
+ fireCancelEditor();
+ }
+ }
+ });
+
+ button.addFocusListener(getButtonFocusListener());
+
+ button.addSelectionListener(new SelectionAdapter() {
+ /* (non-Javadoc)
+ * @see
org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+ */
+ public void widgetSelected(SelectionEvent event) {
+ // Remove the button's focus listener since it's guaranteed
+ // to lose focus when the dialog opens
+ button.removeFocusListener(getButtonFocusListener());
+
+ Object newValue = openDialogBox(editor);
+
+ // Re-add the listener once the dialog closes
+ button.addFocusListener(getButtonFocusListener());
+
+ if (newValue != null) {
+ boolean newValidState = isCorrect(newValue);
+ if (newValidState) {
+ markDirty();
+ doSetValue(newValue);
+ } else {
+ // try to insert the current value into the error message.
+ setErrorMessage(MessageFormat.format(getErrorMessage(),
+ new Object[] { newValue.toString() }));
+ }
+ fireApplyEditorValue();
+ }
+ }
+
+
+ });
+
+ setValueValid(true);
+
+ return editor;
+ }
+
+ @Override
+ protected void focusLost() {
+ if (isActivated()) {
+ if (button != null && !button.isDisposed() &&
!button.isFocusControl()) {
+ if (text != null && !text.isDisposed() &&
!text.isFocusControl()){
+ fireApplyEditorValue();
+ deactivate();
+ }
+ }
+ }
+ }
+
+ protected abstract Object openDialogBox(Control cellEditorWindow);
+
+ private FocusListener getButtonFocusListener() {
+ if (buttonFocusListener == null) {
+ buttonFocusListener = new FocusListener() {
+
+ /* (non-Javadoc)
+ * @see
org.eclipse.swt.events.FocusListener#focusGained(org.eclipse.swt.events.FocusEvent)
+ */
+ public void focusGained(FocusEvent e) {
+
+ }
+
+ /* (non-Javadoc)
+ * @see
org.eclipse.swt.events.FocusListener#focusLost(org.eclipse.swt.events.FocusEvent)
+ */
+ public void focusLost(FocusEvent e) {
+ TextDialogCellEditor.this.focusLost();
+ }
+ };
+ }
+
+ return buttonFocusListener;
+ }
+
+ protected Button createButton(Composite parent) {
+ Button result = new Button(parent, SWT.DOWN);
+ result.setText("..."); //$NON-NLS-1$
+ return result;
+ }
+
+ public void deactivate() {
+ if (button != null && !button.isDisposed()) {
+ button.removeFocusListener(getButtonFocusListener());
+ }
+
+ super.deactivate();
+ }
+
+ @Override
+ protected void editOccured(ModifyEvent e) {
+ String text = this.text.getText();
+ if (strValues == null || strValues.length == 0){
+ strValues = new String[]{text};
+ } else {
+ strValues[0] = text;
+ }
+ super.editOccured(e);
+ }
+
+ protected Object doGetValue() {
+ return strValues;
+ }
+
+ protected void doSetValue(Object value) {
+ if (value == null) {
+ value = "";
+ this.strValues = new String[]{""};
+ } else if (value.getClass().isArray()){
+ this.strValues = (String[])value;
+ value = this.strValues[0];
+ }
+ super.doSetValue(value);
+ }
+
+ protected void updateContents(String[] value) {
+ if (text == null) {
+ return;
+ }
+
+ String strVal = "";//$NON-NLS-1$
+ if (value != null && value.length > 0) {
+ strVal = value[0];
+ }
+ text.setText(strVal);
+ }
+
+ private class DialogCellLayout extends Layout {
+ public void layout(Composite editor, boolean force) {
+ Rectangle bounds = editor.getClientArea();
+ Point size = button.computeSize(SWT.DEFAULT, SWT.DEFAULT, force);
+ if (text != null) {
+ text.setBounds(0, 0, bounds.width - size.x, bounds.height);
+ }
+ button.setBounds(bounds.width - size.x, 0, size.x, bounds.height);
+ }
+
+ public Point computeSize(Composite editor, int wHint, int hHint,
+ boolean force) {
+ if (wHint != SWT.DEFAULT && hHint != SWT.DEFAULT) {
+ return new Point(wHint, hHint);
+ }
+ Point contentsSize = text.computeSize(SWT.DEFAULT, SWT.DEFAULT,
+ force);
+ Point buttonSize = button.computeSize(SWT.DEFAULT, SWT.DEFAULT,
+ force);
+ // Just return the button width to ensure the button is not clipped
+ // if the label is long.
+ // The label will just use whatever extra width there is
+ Point result = new Point(buttonSize.x, Math.max(contentsSize.y,
+ buttonSize.y));
+ return result;
+ }
+ }
+
+
+}
\ No newline at end of file
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenSourceFileTest.java
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenSourceFileTest.java 2010-11-01
12:39:23 UTC (rev 26156)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenSourceFileTest.java 2010-11-01
13:00:20 UTC (rev 26157)
@@ -124,6 +124,9 @@
Throwable ex = null;
try {
editor = OpenSourceAction.run(consCFG, selection, fullyQualifiedName);
+ if (Object.class.getName().equals(fullyQualifiedName)){
+ return;
+ }
boolean highlighted = Utils.hasSelection(editor);
if (!highlighted) {
String out =
NLS.bind(ConsoleTestMessages.OpenSourceFileTest_highlighted_region_for_is_empty,
selection);
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/project/ConfigurableTestProject.java
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/project/ConfigurableTestProject.java 2010-11-01
12:39:23 UTC (rev 26156)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/project/ConfigurableTestProject.java 2010-11-01
13:00:20 UTC (rev 26157)
@@ -170,7 +170,8 @@
public void fullBuild() throws CoreException {
IPackageFragmentRoot sourcePackageFragment = createSourceFolder();
- sourcePackageFragment.getResource().refreshLocal(IResource.DEPTH_INFINITE, null);
+ project.refreshLocal(IResource.DEPTH_INFINITE, null);
+ //sourcePackageFragment.getResource().refreshLocal();
project.build(IncrementalProjectBuilder.FULL_BUILD, new NullProgressMonitor());
}
}
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/project/TestProject.java
===================================================================
---
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/project/TestProject.java 2010-11-01
12:39:23 UTC (rev 26156)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/project/TestProject.java 2010-11-01
13:00:20 UTC (rev 26157)
@@ -5,6 +5,7 @@
import java.util.ArrayList;
import java.util.List;
+import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IProjectDescription;
@@ -73,7 +74,9 @@
public void deleteIProject(boolean deleteContent) {
try {
+ IContainer container = project.getParent();
project.delete(deleteContent, true, null);
+ container.refreshLocal(IResource.DEPTH_ONE, null);
} catch (CoreException ce) {
throw new RuntimeException(ce);
}
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 2010-11-01
12:39:23 UTC (rev 26156)
+++
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/HQLQueryValidatorTest.java 2010-11-01
13:00:20 UTC (rev 26157)
@@ -67,8 +67,12 @@
assertEquals(3,getIJavaProject().getRawClasspath().length);
getIProject().getFolder("src/META-INF").create(true, true, new
NullProgressMonitor()); //$NON-NLS-1$
- getIProject().getFile("src/META-INF/persistence.xml").create(
//$NON-NLS-1$
- new ByteArrayInputStream(("<persistence>\n" +
//$NON-NLS-1$
+ getIProject().getFile("src/META-INF/persistence.xml").create(
//$NON-NLS-1$
+ new ByteArrayInputStream(("<persistence
version=\"1.0\"
xmlns=\"http://java.sun.com/xml/ns/persistence\"\n" +
+
"xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n" +
+
"xsi:schemaLocation=\"http://java.sun.com/xml/ns/persistence " +
+
"http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd\">\n" +
+ " \n" + //$NON-NLS-1$
" <persistence-unit name=\"manager1\"
transaction-type=\"RESOURCE_LOCAL\">\n" + //$NON-NLS-1$
" <class>test.TestClass</class>\n" +
//$NON-NLS-1$
" <properties>\n" + //$NON-NLS-1$