JBoss Tools SVN: r18188 - trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2009-10-20 18:58:21 -0400 (Tue, 20 Oct 2009)
New Revision: 18188
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/XModelObjectTreeViewComponent.java
Log:
The exceptions in JUnit tests were fixed:
Caused by: java.lang.NullPointerException
[java] at org.jboss.tools.common.editor.XModelObjectTreeViewComponent$4.run(XModelObjectTreeViewComponent.java:134)
[java] at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
[java] at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
[java] ... 28 more
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/XModelObjectTreeViewComponent.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/XModelObjectTreeViewComponent.java 2009-10-20 21:48:11 UTC (rev 18187)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/XModelObjectTreeViewComponent.java 2009-10-20 22:58:21 UTC (rev 18188)
@@ -127,14 +127,14 @@
});
final TreeViewer treeViewer = getViewer();
Menu menu = menuMgr.createContextMenu(treeViewer.getTree());
- treeViewer.getTree().setMenu(menu);
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- ModelUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow()
- .getActivePage().getActiveEditor().getSite()
- .registerContextMenu(menuMgr, treeViewer);
- }
- });
+ treeViewer.getTree().setMenu(menu);
+// Display.getDefault().asyncExec(new Runnable() {
+// public void run() {
+// ModelUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow()
+// .getActivePage().getActiveEditor().getSite()
+// .registerContextMenu(menuMgr, treeViewer);
+// }
+// });
}
protected void fillContextMenu(IMenuManager menu) {
14 years, 8 months
JBoss Tools SVN: r18187 - trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/src/org/jboss/ide/eclipse/as/ssh/server.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-10-20 17:48:11 -0400 (Tue, 20 Oct 2009)
New Revision: 18187
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/src/org/jboss/ide/eclipse/as/ssh/server/SSHZippedJSTPublisher.java
Log:
Handling of remove-module
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/src/org/jboss/ide/eclipse/as/ssh/server/SSHZippedJSTPublisher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/src/org/jboss/ide/eclipse/as/ssh/server/SSHZippedJSTPublisher.java 2009-10-20 17:18:05 UTC (rev 18186)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/src/org/jboss/ide/eclipse/as/ssh/server/SSHZippedJSTPublisher.java 2009-10-20 21:48:11 UTC (rev 18187)
@@ -69,12 +69,14 @@
deployRoot.toOSString(), module, publishType, delta, monitor);
IPath outputFilepath = localDelegate.getOutputFilePath();
+ String deployFolder = getRemoteDeployFolder(server);
+ String deployFile = new Path(deployFolder).append(outputFilepath.lastSegment()).toString();
+
// Am I a removal? If yes, remove me, and return
if( publishType == IJBossServerPublisher.REMOVE_PUBLISH) {
- System.out.println("remove remote");
+ launchRemoveCommand(method2.getSession(),
+ outputFilepath.toString(), deployFile);
} else {
- String deployFolder = getRemoteDeployFolder(server);
- String deployFile = new Path(deployFolder).append(outputFilepath.lastSegment()).toString();
launchCopyCommand(method2.getSession(),
outputFilepath.toString(), deployFile);
}
@@ -85,19 +87,40 @@
return ((Server)server).getAttribute(ISSHDeploymentConstants.DEPLOY_DIRECTORY, (String)null);
}
+ protected void launchRemoveCommand(Session session, String localFile, String remoteLocation) throws CoreException {
+ Channel channel = null;
+ try {
+ String command = "rm " + remoteLocation;
+ channel = session.openChannel("exec");
+ ((ChannelExec) channel).setCommand(command);
+
+ // get I/O streams for remote scp
+ channel.connect();
+ while(!channel.isClosed()) {
+ try {Thread.sleep(300);} catch(InterruptedException ie) {}
+ }
+ } catch( JSchException jsche ) {
+ throw new CoreException(new Status(IStatus.ERROR, SSHDeploymentPlugin.PLUGIN_ID, "Error Removing Remote File"));
+ } finally {
+ channel.disconnect();
+ }
+
+ }
+
protected void launchCopyCommand(Session session, String localFile, String remoteLocation) throws CoreException {
+ Channel channel = null;
+ OutputStream out = null;
try {
// exec 'scp -t rfile' remotely
String command = "scp -p -t " + remoteLocation;
- Channel channel = session.openChannel("exec");
+ channel = session.openChannel("exec");
((ChannelExec) channel).setCommand(command);
// get I/O streams for remote scp
- OutputStream out = channel.getOutputStream();
+ out = channel.getOutputStream();
InputStream in = channel.getInputStream();
channel.connect();
if (checkAck(in) != 0) {
- // TODO throw new exception
throw new CoreException(new Status(IStatus.ERROR, SSHDeploymentPlugin.PLUGIN_ID, "no idea bug"));
}
@@ -115,7 +138,7 @@
out.flush();
if (checkAck(in) != 0) {
// TODO throw new exception
- throw new CoreException(new Status(IStatus.ERROR, SSHDeploymentPlugin.PLUGIN_ID, "no idea bug"));
+ throw new CoreException(new Status(IStatus.ERROR, SSHDeploymentPlugin.PLUGIN_ID, "Error transfering file"));
}
// send a content of lfile
@@ -136,15 +159,19 @@
if (checkAck(in) != 0) {
System.exit(0);
}
- out.close();
- channel.disconnect();
} catch( JSchException jsche ) {
- // TODO
- jsche.printStackTrace();
+ throw new CoreException(new Status(IStatus.ERROR, SSHDeploymentPlugin.PLUGIN_ID, "Error transfering file"));
} catch( IOException ioe) {
- // TODO
- ioe.printStackTrace();
+ throw new CoreException(new Status(IStatus.ERROR, SSHDeploymentPlugin.PLUGIN_ID, "Error transfering file"));
+ } finally {
+ if( channel != null )
+ channel.disconnect();
+ if( out != null ) {
+ try {
+ out.close();
+ } catch(IOException ioe) {}
+ }
}
}
14 years, 8 months
JBoss Tools SVN: r18186 - in trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test: res/project/test/annotated/getters and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-10-20 13:18:05 -0400 (Tue, 20 Oct 2009)
New Revision: 18186
Added:
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/fields/ZTypesComplex.java
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/getters/ZTypesComplex.java
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/fields/ZTypesComplex.java
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/getters/ZTypesComplex.java
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/JPAMapTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5050 - fix
Added: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/fields/ZTypesComplex.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/fields/ZTypesComplex.java (rev 0)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/fields/ZTypesComplex.java 2009-10-20 17:18:05 UTC (rev 18186)
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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 test.annotated.fields;
+
+class TypeA {
+
+ public double id2 = 2.0;
+
+ public TypeA() {
+ }
+
+ protected Integer version;
+
+ public Integer getVersion() {
+ return version;
+ }
+
+ public void setVersion(Integer version) {
+ this.version = version;
+ }
+};
+
+class TypeB {
+
+ public int id = 0;
+
+ public TypeB() {
+ }
+
+ protected Integer version;
+};
Added: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/getters/ZTypesComplex.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/getters/ZTypesComplex.java (rev 0)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/getters/ZTypesComplex.java 2009-10-20 17:18:05 UTC (rev 18186)
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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 test.annotated.getters;
+
+class TypeA {
+
+ public double id2 = 2.0;
+
+ public TypeA() {
+ }
+
+ protected Integer version;
+
+ public Integer getVersion() {
+ return version;
+ }
+
+ public void setVersion(Integer version) {
+ this.version = version;
+ }
+};
+
+class TypeB {
+
+ public int id = 0;
+
+ public TypeB() {
+ }
+
+ protected Integer version;
+};
Added: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/fields/ZTypesComplex.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/fields/ZTypesComplex.java (rev 0)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/fields/ZTypesComplex.java 2009-10-20 17:18:05 UTC (rev 18186)
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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 test.annotated.fields;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.Version;
+
+@Entity
+class TypeA {
+
+ @Id
+ @GeneratedValue
+ public double id2 = 2.0;
+
+ public TypeA() {
+ }
+
+ @Version
+ protected Integer version;
+
+ public Integer getVersion() {
+ return version;
+ }
+
+ public void setVersion(Integer version) {
+ this.version = version;
+ }
+};
+
+@Entity
+class TypeB {
+
+ @Id
+ @GeneratedValue
+ public int id = 0;
+
+ public TypeB() {
+ }
+
+ @Version
+ protected Integer version;
+
+ public Integer getVersion() {
+ return version;
+ }
+
+ public void setVersion(Integer version) {
+ this.version = version;
+ }
+};
Added: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/getters/ZTypesComplex.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/getters/ZTypesComplex.java (rev 0)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/getters/ZTypesComplex.java 2009-10-20 17:18:05 UTC (rev 18186)
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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 test.annotated.getters;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.Version;
+
+@Entity
+class TypeA {
+
+ public double id2 = 2.0;
+
+ public TypeA() {
+ }
+
+ protected Integer version;
+
+ @Version
+ public Integer getVersion() {
+ return version;
+ }
+
+ public void setVersion(Integer version) {
+ this.version = version;
+ }
+};
+
+@Entity
+class TypeB {
+
+ public int id = 0;
+
+ public TypeB() {
+ }
+
+ protected Integer version;
+
+ @Version
+ public Integer getVersion() {
+ return version;
+ }
+
+ public void setVersion(Integer version) {
+ this.version = version;
+ }
+};
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/JPAMapTest.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/JPAMapTest.java 2009-10-20 17:15:43 UTC (rev 18185)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/JPAMapTest.java 2009-10-20 17:18:05 UTC (rev 18186)
@@ -110,24 +110,33 @@
"test.annotated." + testSelection + ".Staff"); //$NON-NLS-1$ //$NON-NLS-2$
ICompilationUnit icu3 = Utils.findCompilationUnit(javaProject,
"test.annotated." + testSelection + ".FotoXPerson"); //$NON-NLS-1$ //$NON-NLS-2$
+ ICompilationUnit icu4 = Utils.findCompilationUnit(javaProject,
+ "test.annotated." + testSelection + ".ZTypesComplex"); //$NON-NLS-1$ //$NON-NLS-2$
+ try {
+ icu4.becomeWorkingCopy(null);
+ } catch (JavaModelException e) {
+ // ignore
+ }
//ICompilationUnit icu = Utils.findCompilationUnit(javaProject,
// "test.annotated." + testSelection + ".Foto"); //$NON-NLS-1$ //$NON-NLS-2$
//ICompilationUnit icu2 = Utils.findCompilationUnit(javaProject,
// "test.annotated." + testSelection + ".Person"); //$NON-NLS-1$ //$NON-NLS-2$
- ICompilationUnit icu4 = null;
+ ICompilationUnit icu44 = null;
if (testSelection.equals(TEST_GETTERS)) {
- icu4 = Utils.findCompilationUnit(javaProject,
+ icu44 = Utils.findCompilationUnit(javaProject,
"test.annotated." + testSelection + ".FotoXPerson"); //$NON-NLS-1$ //$NON-NLS-2$
}
assertNotNull(icu);
assertNotNull(icu2);
assertNotNull(icu3);
+ assertNotNull(icu4);
collector.initCollector(javaProject);
collector.collect(icu);
collector.collect(icu2);
collector.collect(icu3);
- if (icu4 != null) {
- collector.collect(icu4);
+ collector.collect(icu4);
+ if (icu44 != null) {
+ collector.collect(icu44);
}
collector.resolveRelations();
processor.setEnableOptLock(true);
@@ -143,7 +152,8 @@
checkItem("PersonXFoto"); //$NON-NLS-1$
checkItem("Country"); //$NON-NLS-1$
checkItem("Visa"); //$NON-NLS-1$
- if (icu4 != null) {
+ checkItem("ZTypesComplex"); //$NON-NLS-1$
+ if (icu44 != null) {
checkItem("Entity"); //$NON-NLS-1$
}
}
14 years, 8 months
JBoss Tools SVN: r18185 - in branches/jbosstools-3.1.0.M4/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res: project/test/annotated/getters and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-10-20 13:15:43 -0400 (Tue, 20 Oct 2009)
New Revision: 18185
Added:
branches/jbosstools-3.1.0.M4/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/fields/ZTypesComplex.java
branches/jbosstools-3.1.0.M4/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/getters/ZTypesComplex.java
branches/jbosstools-3.1.0.M4/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/fields/ZTypesComplex.java
branches/jbosstools-3.1.0.M4/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/getters/ZTypesComplex.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5050 - fix
Added: branches/jbosstools-3.1.0.M4/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/fields/ZTypesComplex.java
===================================================================
--- branches/jbosstools-3.1.0.M4/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/fields/ZTypesComplex.java (rev 0)
+++ branches/jbosstools-3.1.0.M4/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/fields/ZTypesComplex.java 2009-10-20 17:15:43 UTC (rev 18185)
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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 test.annotated.fields;
+
+class TypeA {
+
+ public double id2 = 2.0;
+
+ public TypeA() {
+ }
+
+ protected Integer version;
+
+ public Integer getVersion() {
+ return version;
+ }
+
+ public void setVersion(Integer version) {
+ this.version = version;
+ }
+};
+
+class TypeB {
+
+ public int id = 0;
+
+ public TypeB() {
+ }
+
+ protected Integer version;
+};
Added: branches/jbosstools-3.1.0.M4/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/getters/ZTypesComplex.java
===================================================================
--- branches/jbosstools-3.1.0.M4/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/getters/ZTypesComplex.java (rev 0)
+++ branches/jbosstools-3.1.0.M4/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/project/test/annotated/getters/ZTypesComplex.java 2009-10-20 17:15:43 UTC (rev 18185)
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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 test.annotated.getters;
+
+class TypeA {
+
+ public double id2 = 2.0;
+
+ public TypeA() {
+ }
+
+ protected Integer version;
+
+ public Integer getVersion() {
+ return version;
+ }
+
+ public void setVersion(Integer version) {
+ this.version = version;
+ }
+};
+
+class TypeB {
+
+ public int id = 0;
+
+ public TypeB() {
+ }
+
+ protected Integer version;
+};
Added: branches/jbosstools-3.1.0.M4/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/fields/ZTypesComplex.java
===================================================================
--- branches/jbosstools-3.1.0.M4/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/fields/ZTypesComplex.java (rev 0)
+++ branches/jbosstools-3.1.0.M4/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/fields/ZTypesComplex.java 2009-10-20 17:15:43 UTC (rev 18185)
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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 test.annotated.fields;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.Version;
+
+@Entity
+class TypeA {
+
+ @Id
+ @GeneratedValue
+ public double id2 = 2.0;
+
+ public TypeA() {
+ }
+
+ @Version
+ protected Integer version;
+
+ public Integer getVersion() {
+ return version;
+ }
+
+ public void setVersion(Integer version) {
+ this.version = version;
+ }
+};
+
+@Entity
+class TypeB {
+
+ @Id
+ @GeneratedValue
+ public int id = 0;
+
+ public TypeB() {
+ }
+
+ @Version
+ protected Integer version;
+
+ public Integer getVersion() {
+ return version;
+ }
+
+ public void setVersion(Integer version) {
+ this.version = version;
+ }
+};
Added: branches/jbosstools-3.1.0.M4/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/getters/ZTypesComplex.java
===================================================================
--- branches/jbosstools-3.1.0.M4/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/getters/ZTypesComplex.java (rev 0)
+++ branches/jbosstools-3.1.0.M4/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/getters/ZTypesComplex.java 2009-10-20 17:15:43 UTC (rev 18185)
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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 test.annotated.getters;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.Version;
+
+@Entity
+class TypeA {
+
+ public double id2 = 2.0;
+
+ public TypeA() {
+ }
+
+ protected Integer version;
+
+ @Version
+ public Integer getVersion() {
+ return version;
+ }
+
+ public void setVersion(Integer version) {
+ this.version = version;
+ }
+};
+
+@Entity
+class TypeB {
+
+ public int id = 0;
+
+ public TypeB() {
+ }
+
+ protected Integer version;
+
+ @Version
+ public Integer getVersion() {
+ return version;
+ }
+
+ public void setVersion(Integer version) {
+ this.version = version;
+ }
+};
14 years, 8 months
JBoss Tools SVN: r18184 - branches/jbosstools-3.1.0.M4/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-10-20 13:13:42 -0400 (Tue, 20 Oct 2009)
New Revision: 18184
Modified:
branches/jbosstools-3.1.0.M4/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/JPAMapTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5050 - fix
Modified: branches/jbosstools-3.1.0.M4/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/JPAMapTest.java
===================================================================
--- branches/jbosstools-3.1.0.M4/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/JPAMapTest.java 2009-10-20 16:01:23 UTC (rev 18183)
+++ branches/jbosstools-3.1.0.M4/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/JPAMapTest.java 2009-10-20 17:13:42 UTC (rev 18184)
@@ -110,24 +110,33 @@
"test.annotated." + testSelection + ".Staff"); //$NON-NLS-1$ //$NON-NLS-2$
ICompilationUnit icu3 = Utils.findCompilationUnit(javaProject,
"test.annotated." + testSelection + ".FotoXPerson"); //$NON-NLS-1$ //$NON-NLS-2$
+ ICompilationUnit icu4 = Utils.findCompilationUnit(javaProject,
+ "test.annotated." + testSelection + ".ZTypesComplex"); //$NON-NLS-1$ //$NON-NLS-2$
+ try {
+ icu4.becomeWorkingCopy(null);
+ } catch (JavaModelException e) {
+ // ignore
+ }
//ICompilationUnit icu = Utils.findCompilationUnit(javaProject,
// "test.annotated." + testSelection + ".Foto"); //$NON-NLS-1$ //$NON-NLS-2$
//ICompilationUnit icu2 = Utils.findCompilationUnit(javaProject,
// "test.annotated." + testSelection + ".Person"); //$NON-NLS-1$ //$NON-NLS-2$
- ICompilationUnit icu4 = null;
+ ICompilationUnit icu44 = null;
if (testSelection.equals(TEST_GETTERS)) {
- icu4 = Utils.findCompilationUnit(javaProject,
+ icu44 = Utils.findCompilationUnit(javaProject,
"test.annotated." + testSelection + ".FotoXPerson"); //$NON-NLS-1$ //$NON-NLS-2$
}
assertNotNull(icu);
assertNotNull(icu2);
assertNotNull(icu3);
+ assertNotNull(icu4);
collector.initCollector(javaProject);
collector.collect(icu);
collector.collect(icu2);
collector.collect(icu3);
- if (icu4 != null) {
- collector.collect(icu4);
+ collector.collect(icu4);
+ if (icu44 != null) {
+ collector.collect(icu44);
}
collector.resolveRelations();
processor.setEnableOptLock(true);
@@ -143,7 +152,8 @@
checkItem("PersonXFoto"); //$NON-NLS-1$
checkItem("Country"); //$NON-NLS-1$
checkItem("Visa"); //$NON-NLS-1$
- if (icu4 != null) {
+ checkItem("ZTypesComplex"); //$NON-NLS-1$
+ if (icu44 != null) {
checkItem("Entity"); //$NON-NLS-1$
}
}
14 years, 8 months
JBoss Tools SVN: r18183 - trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2009-10-20 12:01:23 -0400 (Tue, 20 Oct 2009)
New Revision: 18183
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageContextFactory.java
Log:
JBIDE-3563: Code assist for "class" and "styleClass" attributes for html and jsf tags.
Output to the log is added
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageContextFactory.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageContextFactory.java 2009-10-20 15:55:41 UTC (rev 18182)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageContextFactory.java 2009-10-20 16:01:23 UTC (rev 18183)
@@ -315,9 +315,9 @@
sModel = StructuredModelManager.getModelManager()
.getModelForRead(file);
} catch (IOException e) {
- // Ignore. The sModel will be set to null
+ WebKbPlugin.getDefault().logError(e);
} catch (CoreException e) {
- // Ignore. The sModel will be set to null
+ WebKbPlugin.getDefault().logError(e);
}
if (sModel == null)
@@ -382,7 +382,7 @@
try {
provider.connect(input);
} catch (CoreException e) {
- // Ignore. The provider probably will return null in this case
+ WebKbPlugin.getDefault().logError(e);
}
return provider.getDocument(input);
}
@@ -400,9 +400,9 @@
sModel = StructuredModelManager.getModelManager()
.getModelForRead(file);
} catch (IOException e) {
- // Ignore. The sModel will be set to null
+ WebKbPlugin.getDefault().logError(e);
} catch (CoreException e) {
- // Ignore. The sModel will be set to null
+ WebKbPlugin.getDefault().logError(e);
}
if (sModel == null)
@@ -433,9 +433,9 @@
sModel = StructuredModelManager.getModelManager()
.getModelForRead(context.getResource());
} catch (IOException e) {
- // Ignore. The sModel will be set to null
+ WebKbPlugin.getDefault().logError(e);
} catch (CoreException e) {
- // Ignore. The sModel will be set to null
+ WebKbPlugin.getDefault().logError(e);
}
if (sModel == null)
@@ -538,9 +538,9 @@
sModel = StructuredModelManager.getModelManager()
.getModelForRead(context.getResource());
} catch (IOException e) {
- // Ignore. The sModel will be set to null
+ WebKbPlugin.getDefault().logError(e);
} catch (CoreException e) {
- // Ignore. The sModel will be set to null
+ WebKbPlugin.getDefault().logError(e);
}
if (sModel == null)
@@ -656,9 +656,9 @@
try {
sModel = StructuredModelManager.getModelManager().getModelForRead(context.getResource());
} catch (IOException e) {
- // Ignore. The sModel will be set to null
+ WebKbPlugin.getDefault().logError(e);
} catch (CoreException e) {
- // Ignore. The sModel will be set to null
+ WebKbPlugin.getDefault().logError(e);
}
if (sModel == null)
14 years, 8 months
JBoss Tools SVN: r18182 - trunk/hibernatetools/docs/reference/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2009-10-20 11:55:41 -0400 (Tue, 20 Oct 2009)
New Revision: 18182
Modified:
trunk/hibernatetools/docs/reference/en/modules/plugins.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-899 - adding the description of the 'Save As' functionality for the mapping diagram and Mapping diagram restoring;
Modified: trunk/hibernatetools/docs/reference/en/modules/plugins.xml
===================================================================
--- trunk/hibernatetools/docs/reference/en/modules/plugins.xml 2009-10-20 15:53:26 UTC (rev 18181)
+++ trunk/hibernatetools/docs/reference/en/modules/plugins.xml 2009-10-20 15:55:41 UTC (rev 18182)
@@ -2035,7 +2035,45 @@
<imagedata fileref="images/plugins/expandState.png"/>
</imageobject></inlinemediaobject>) is used for expanding/collapsing fields of the item.</para></listitem>
</itemizedlist>
- <para>All the described types of the context menu are also available in the Outline view.</para>
+ <para>All the described types of the context menu are also available in the <property>Outline</property> view.</para>
+
+ <para>It's possible to save the diagram in the eclipse workspace. Click the usual <emphasis>
+ <property>File > Save As</property></emphasis> option, the wizard will ask you to set the location within you project
+ where to save the file and give the name for the diagram. The item's names concatenated with the ampersand
+ symbols are set as the default name for a diagram. The file is saved with the <literal>.hibernate</literal> extension.</para>
+
+ <figure>
+ <title>The Diagram saved in the Workspace</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/plugins/saveDiagram.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <tip>
+ <title>Note:</title>
+ <para>If you restart the Eclipse with the mapping diagram opened, the mapping diagram will be restored with the
+ message like on the figure below. To view the diagram content, you should perform the refreshing.</para>
+ </tip>
+
+ <figure>
+ <title>The Diagram after Restarting the Eclipse</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/plugins/diagram1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <figure>
+ <title>The Diagram after Refreshing</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/plugins/diagram2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
</section>
</section>
14 years, 8 months
JBoss Tools SVN: r18181 - trunk/hibernatetools/docs/reference/en/images/plugins.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2009-10-20 11:53:26 -0400 (Tue, 20 Oct 2009)
New Revision: 18181
Added:
trunk/hibernatetools/docs/reference/en/images/plugins/diagram1.png
trunk/hibernatetools/docs/reference/en/images/plugins/diagram2.png
trunk/hibernatetools/docs/reference/en/images/plugins/saveDiagram.png
Log:
https://jira.jboss.org/jira/browse/JBDS-899 - adding new screens with the mapping diagrams;
Added: trunk/hibernatetools/docs/reference/en/images/plugins/diagram1.png
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/docs/reference/en/images/plugins/diagram1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/hibernatetools/docs/reference/en/images/plugins/diagram2.png
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/docs/reference/en/images/plugins/diagram2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/hibernatetools/docs/reference/en/images/plugins/saveDiagram.png
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/docs/reference/en/images/plugins/saveDiagram.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
14 years, 8 months
JBoss Tools SVN: r18180 - trunk/bpel/plugins/org.eclipse.bpel.apache.ode.deploy.model.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2009-10-20 11:10:07 -0400 (Tue, 20 Oct 2009)
New Revision: 18180
Modified:
trunk/bpel/plugins/org.eclipse.bpel.apache.ode.deploy.model/build.properties
Log:
tweak build.properties
Modified: trunk/bpel/plugins/org.eclipse.bpel.apache.ode.deploy.model/build.properties
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.apache.ode.deploy.model/build.properties 2009-10-20 14:34:51 UTC (rev 18179)
+++ trunk/bpel/plugins/org.eclipse.bpel.apache.ode.deploy.model/build.properties 2009-10-20 15:10:07 UTC (rev 18180)
@@ -1,13 +1,6 @@
-
-# <copyright>
-# </copyright>
-#
-# $Id: build.properties,v 1.2 2008/11/08 13:59:16 smoser Exp $
-
-bin.includes = model/,\
- META-INF/,\
- plugin.xml,\
- plugin.properties
-jars.compile.order = .
-output.. = bin/
source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ model/,\
+ .,\
+ plugin.*
14 years, 8 months
JBoss Tools SVN: r18179 - in trunk: vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2009-10-20 10:34:51 -0400 (Tue, 20 Oct 2009)
New Revision: 18179
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/TaglibMapping.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4839, https://jira.jboss.org/jira/browse/JBIDE-5053
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/TaglibMapping.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/TaglibMapping.java 2009-10-20 13:48:00 UTC (rev 18178)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/tld/TaglibMapping.java 2009-10-20 14:34:51 UTC (rev 18179)
@@ -17,7 +17,6 @@
import java.util.StringTokenizer;
import org.eclipse.core.resources.IResource;
-
import org.jboss.tools.common.model.XModel;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.event.XModelTreeEvent;
@@ -49,7 +48,7 @@
model.addModelTreeListener(listener = new TaglibModelTreeListener());
}
- synchronized public void revalidate(XModelObject webxml) {
+ public void revalidate(XModelObject webxml) {
if (webxml == null || isLoading) return;
model = webxml.getModel();
long jts = getJarsTimeStamp();
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2009-10-20 13:48:00 UTC (rev 18178)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2009-10-20 14:34:51 UTC (rev 18179)
@@ -15,6 +15,7 @@
import java.util.List;
import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
@@ -73,10 +74,12 @@
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
import org.jboss.tools.common.el.core.ELReferenceList;
+import org.jboss.tools.common.model.XModel;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.event.XModelTreeEvent;
import org.jboss.tools.common.model.event.XModelTreeListener;
import org.jboss.tools.common.model.options.PreferenceModelUtilities;
+import org.jboss.tools.common.model.project.IModelNature;
import org.jboss.tools.common.model.ui.dnd.ModelTransfer;
import org.jboss.tools.common.model.ui.editor.IModelObjectEditorInput;
import org.jboss.tools.common.model.ui.editors.dnd.DropCommandFactory;
@@ -97,6 +100,8 @@
import org.jboss.tools.jst.jsp.jspeditor.dnd.JSPTagProposalFactory;
import org.jboss.tools.jst.jsp.preferences.IVpePreferencesPage;
import org.jboss.tools.jst.jsp.preferences.VpePreference;
+import org.jboss.tools.jst.web.model.helpers.WebAppHelper;
+import org.jboss.tools.jst.web.project.WebProject;
import org.jboss.tools.jst.web.tld.URIConstants;
import org.jboss.tools.jst.web.tld.model.TLDUtil;
import org.jboss.tools.vpe.VpeDebug;
@@ -254,21 +259,21 @@
}
sourceModel.addModelLifecycleListener(this);
-// IEditorInput editorInput = pageContext.getEditPart().getEditorInput();
+ IEditorInput editorInput = pageContext.getEditPart().getEditorInput();
//commented by Maksim Areshkau, as fix for https://jira.jboss.org/jira/browse/JBIDE-4534
-// if(editorInput instanceof IFileEditorInput) {
-// XModel xm = null;
-// IProject project = ((IFileEditorInput) editorInput).getFile()
-// .getProject();
-// IModelNature mn = EclipseResourceUtil.getModelNature(project);
-// if (mn != null) {
-// xm = mn.getModel();
-// }
-// if (xm != null) {
-// WebProject.getInstance(xm).getTaglibMapping().revalidate(
-// WebAppHelper.getWebApp(xm));
-// }
-// }
+ if(editorInput instanceof IFileEditorInput) {
+ XModel xm = null;
+ IProject project = ((IFileEditorInput) editorInput).getFile()
+ .getProject();
+ IModelNature mn = EclipseResourceUtil.getModelNature(project);
+ if (mn != null) {
+ xm = mn.getModel();
+ }
+ if (xm != null) {
+ WebProject.getInstance(xm).getTaglibMapping().revalidate(
+ WebAppHelper.getWebApp(xm));
+ }
+ }
IDOMDocument sourceDocument = sourceModel.getDocument();
// FIXED FOR JBIDE-3799 by sdzmitrovich, moved calling of this method to buid dom
14 years, 8 months