JBoss Tools SVN: r35672 - trunk/cdi/plugins/org.jboss.tools.cdi.seam.core/src/org/jboss/tools/cdi/seam/core/persistence.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-10-14 13:07:21 -0400 (Fri, 14 Oct 2011)
New Revision: 35672
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.seam.core/src/org/jboss/tools/cdi/seam/core/persistence/CDIPersistenceConstants.java
trunk/cdi/plugins/org.jboss.tools.cdi.seam.core/src/org/jboss/tools/cdi/seam/core/persistence/CDISeamPersistenceExtension.java
Log:
JBIDE-9852
https://issues.jboss.org/browse/JBIDE-9852
Seam persistence updated according to migration of solder to 3.1.
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.seam.core/src/org/jboss/tools/cdi/seam/core/persistence/CDIPersistenceConstants.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.core/src/org/jboss/tools/cdi/seam/core/persistence/CDIPersistenceConstants.java 2011-10-14 17:07:06 UTC (rev 35671)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.core/src/org/jboss/tools/cdi/seam/core/persistence/CDIPersistenceConstants.java 2011-10-14 17:07:21 UTC (rev 35672)
@@ -16,7 +16,8 @@
*
*/
public interface CDIPersistenceConstants {
- public String EXTENSION_MANAGED_ANNOTATION_TYPE_NAME = "org.jboss.seam.solder.core.ExtensionManaged";
+ public String EXTENSION_MANAGED_ANNOTATION_TYPE_NAME = "org.jboss.solder.core.ExtensionManaged";
+ public String EXTENSION_MANAGED_ANNOTATION_TYPE_NAME_30 = "org.jboss.seam.solder.core.ExtensionManaged";
public String ENTITY_MANAGER_FACTORY_TYPE_NAME = "javax.persistence.EntityManagerFactory";
public String ENTITY_MANAGER_TYPE_NAME = "javax.persistence.EntityManager";
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.seam.core/src/org/jboss/tools/cdi/seam/core/persistence/CDISeamPersistenceExtension.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.core/src/org/jboss/tools/cdi/seam/core/persistence/CDISeamPersistenceExtension.java 2011-10-14 17:07:06 UTC (rev 35671)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.core/src/org/jboss/tools/cdi/seam/core/persistence/CDISeamPersistenceExtension.java 2011-10-14 17:07:21 UTC (rev 35672)
@@ -19,7 +19,6 @@
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;
import org.jboss.tools.cdi.core.CDIConstants;
-import org.jboss.tools.cdi.core.CDICoreNature;
import org.jboss.tools.cdi.core.IProducer;
import org.jboss.tools.cdi.core.extension.AbstractDefinitionContextExtension;
import org.jboss.tools.cdi.core.extension.ICDIExtension;
@@ -28,12 +27,12 @@
import org.jboss.tools.cdi.internal.core.impl.BeanMember;
import org.jboss.tools.cdi.internal.core.impl.CDIProject;
import org.jboss.tools.cdi.internal.core.impl.ClassBean;
-import org.jboss.tools.cdi.internal.core.impl.definition.BeanMemberDefinition;
import org.jboss.tools.cdi.internal.core.impl.definition.FieldDefinition;
import org.jboss.tools.cdi.internal.core.impl.definition.MethodDefinition;
import org.jboss.tools.cdi.internal.core.impl.definition.TypeDefinition;
import org.jboss.tools.cdi.internal.core.scanner.FileSet;
import org.jboss.tools.cdi.seam.core.CDISeamCorePlugin;
+import org.jboss.tools.common.java.IAnnotated;
import org.jboss.tools.common.java.ParametedType;
import org.jboss.tools.common.java.TypeDeclaration;
import org.jboss.tools.common.model.XModelObject;
@@ -102,7 +101,7 @@
bean.setDefinition(def);
Set<IProducer> ps = bean.getProducers();
for (IProducer p: ps) {
- if(p.getAnnotation(CDIPersistenceConstants.EXTENSION_MANAGED_ANNOTATION_TYPE_NAME) != null) {
+ if(isArtefact(p)) {
BeanMember m = (BeanMember)p;
TypeDeclaration d = m.getTypeDeclaration();
@@ -140,9 +139,10 @@
return false;
}
- boolean isArtefact(BeanMemberDefinition m) {
- return m.isAnnotationPresent(CDIConstants.PRODUCES_ANNOTATION_TYPE_NAME)
- && m.isAnnotationPresent(CDIPersistenceConstants.EXTENSION_MANAGED_ANNOTATION_TYPE_NAME);
+ boolean isArtefact(IAnnotated m) {
+ return (m instanceof IProducer || m.isAnnotationPresent(CDIConstants.PRODUCES_ANNOTATION_TYPE_NAME))
+ && (m.isAnnotationPresent(CDIPersistenceConstants.EXTENSION_MANAGED_ANNOTATION_TYPE_NAME)
+ || m.isAnnotationPresent(CDIPersistenceConstants.EXTENSION_MANAGED_ANNOTATION_TYPE_NAME_30));
}
private ParametedType getType(String name, CDIProject project) {
13 years, 3 months
JBoss Tools SVN: r35671 - in trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects: Seam3PersistenceTest and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-10-14 13:07:06 -0400 (Fri, 14 Oct 2011)
New Revision: 35671
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/Seam3PersistenceTest/lib/solder-api.jar
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/Seam3PersistenceTest/lib/solder-impl.jar
Removed:
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/Seam3PersistenceTest/lib/seam-solder.jar
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/Seam3DependentPersistenceTest/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/Seam3PersistenceTest/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/Seam3PersistenceTest/src/test/EntityManagerTest.java
Log:
JBIDE-9852
https://issues.jboss.org/browse/JBIDE-9852
Seam persistence updated according to migration of solder to 3.1.
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/Seam3DependentPersistenceTest/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/Seam3DependentPersistenceTest/.classpath 2011-10-14 17:05:33 UTC (rev 35670)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/Seam3DependentPersistenceTest/.classpath 2011-10-14 17:07:06 UTC (rev 35671)
@@ -7,7 +7,8 @@
<classpathentry kind="lib" path="/Seam3PersistenceTest/lib/hibernate3.jar"/>
<classpathentry kind="lib" path="/Seam3PersistenceTest/lib/javax.inject.jar"/>
<classpathentry kind="lib" path="/Seam3PersistenceTest/lib/seam-persistence.jar"/>
- <classpathentry kind="lib" path="/Seam3PersistenceTest/lib/seam-solder.jar"/>
+ <classpathentry kind="lib" path="/Seam3PersistenceTest/lib/solder-api.jar"/>
+ <classpathentry kind="lib" path="/Seam3PersistenceTest/lib/solder-impl.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/Seam3PersistenceTest"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/Seam3PersistenceTest/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/Seam3PersistenceTest/.classpath 2011-10-14 17:05:33 UTC (rev 35670)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/Seam3PersistenceTest/.classpath 2011-10-14 17:07:06 UTC (rev 35671)
@@ -7,6 +7,7 @@
<classpathentry kind="lib" path="lib/hibernate3.jar"/>
<classpathentry kind="lib" path="lib/javax.inject.jar"/>
<classpathentry kind="lib" path="lib/seam-persistence.jar"/>
- <classpathentry kind="lib" path="lib/seam-solder.jar"/>
+ <classpathentry kind="lib" path="lib/solder-api.jar"/>
+ <classpathentry kind="lib" path="lib/solder-impl.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/Seam3PersistenceTest/lib/seam-solder.jar
===================================================================
(Binary files differ)
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/Seam3PersistenceTest/lib/solder-api.jar
===================================================================
(Binary files differ)
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/Seam3PersistenceTest/lib/solder-api.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/Seam3PersistenceTest/lib/solder-impl.jar
===================================================================
(Binary files differ)
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/Seam3PersistenceTest/lib/solder-impl.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/Seam3PersistenceTest/src/test/EntityManagerTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/Seam3PersistenceTest/src/test/EntityManagerTest.java 2011-10-14 17:05:33 UTC (rev 35670)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/projects/Seam3PersistenceTest/src/test/EntityManagerTest.java 2011-10-14 17:07:06 UTC (rev 35671)
@@ -7,7 +7,7 @@
import org.hibernate.Session;
import org.hibernate.SessionFactory;
-import org.jboss.seam.solder.core.ExtensionManaged;
+import org.jboss.solder.core.ExtensionManaged;
public class EntityManagerTest {
13 years, 3 months
JBoss Tools SVN: r35670 - in trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test: international and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2011-10-14 13:05:33 -0400 (Fri, 14 Oct 2011)
New Revision: 35670
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/international/SeamResourceBundleELTooltipTest.java
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/CDISeamCoreAllTests.java
Log:
JBIDE-9731 Tooltip for EL referenced to message bundles
JUnit test for EL Tooltips is added for CDI Seam International Module enabled project
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/CDISeamCoreAllTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/CDISeamCoreAllTests.java 2011-10-14 16:04:59 UTC (rev 35669)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/CDISeamCoreAllTests.java 2011-10-14 17:05:33 UTC (rev 35670)
@@ -17,6 +17,7 @@
import org.eclipse.wst.validation.ValidationFramework;
import org.jboss.tools.cdi.seam.core.test.international.BundleModelTest;
import org.jboss.tools.cdi.seam.core.test.international.SeamResourceBundleCdiElResolverTest;
+import org.jboss.tools.cdi.seam.core.test.international.SeamResourceBundleELTooltipTest;
import org.jboss.tools.cdi.seam.core.test.international.SeamResourceBundlesTest;
import org.jboss.tools.cdi.seam.core.test.jms.SeamJmsValidationTest;
import org.jboss.tools.cdi.seam.core.test.persistence.SeamPersistenceTest;
@@ -45,8 +46,10 @@
suite.addTestSuite(SeamResourceBundlesTest.class);
suite.addTestSuite(SeamJmsValidationTest.class);
suite.addTestSuite(SeamResourceBundleCdiElResolverTest.class);
+ suite.addTestSuite(SeamResourceBundleELTooltipTest.class);
suite.addTestSuite(SeamRestValidationTest.class);
suite.addTestSuite(BundleModelTest.class); // should be the last in this suite because it removes/adds seam-international.jar
+
suiteAll.addTest(new SeamCoreTestSetup(suite));
suite = new TestSuite("Seam Persistence Project Tests");
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/international/SeamResourceBundleELTooltipTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/international/SeamResourceBundleELTooltipTest.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/international/SeamResourceBundleELTooltipTest.java 2011-10-14 17:05:33 UTC (rev 35670)
@@ -0,0 +1,110 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.seam.core.test.international;
+
+import java.lang.reflect.Method;
+
+import org.eclipse.jface.text.ITextHover;
+import org.eclipse.jface.text.ITextHoverExtension2;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.TextViewer;
+import org.jboss.tools.cdi.seam.core.test.SeamCoreTest;
+import org.jboss.tools.jst.jsp.test.ca.ContentAssistantTestCase;
+
+/**
+ * The JUnit test cases for JBIDE-9731 issues
+ *
+ * @author Victor Rubezhny
+ */
+public class SeamResourceBundleELTooltipTest extends SeamCoreTest {
+ private static final String PAGE_NAME = "WebContent/seam-international.xhtml";
+
+ private ContentAssistantTestCase caTest = new ContentAssistantTestCase();
+
+ private static final String EL_PREFIX[] = {
+ "value=\"#{bundles.messages",
+ "value=\"#{bundles.messages.home_header"
+ };
+ private static final String EL_VALUE[] = {"bundles.messages", "prompt"};
+ private static final String EL_TOOLTIP_TEXT[] = {
+ "<b>Base Name:</b> messages<br><br><b>Resource Bundle:</b> /SeamCoreTest/src/messages.properties<br><b>Resource Bundle:</b> /SeamCoreTest/src/messages_de.properties<br>",
+ "<b>Property:</b> home_header<br><b>Base Name:</b> messages<br><br><b>Resource Bundle:</b> /SeamCoreTest/src/messages.properties<br><b>Value:</b> About this example application<br><br>"
+ };
+
+ @SuppressWarnings("deprecation")
+ private void doELTooltipTest(String prefix, String value, String compare) {
+ String documentContent = caTest.getDocument().get();
+ int start = (documentContent == null ? -1 : documentContent.indexOf(prefix));
+ assertFalse("Required node '" + prefix + "' not found in document", (start == -1));
+ int offsetToTest = start + prefix.length();
+
+ ITextHover hover = getTextHover(caTest.getViewer(), offsetToTest - 1);
+ assertNotNull("Hover not found for value: '" + value + "'", hover);
+
+ String hoverText = null;
+ if (hover instanceof ITextHoverExtension2) {
+ Object hoverInfo2 = ((ITextHoverExtension2)hover).getHoverInfo2(caTest.getViewer(), hover.getHoverRegion(caTest.getViewer(), offsetToTest));
+ hoverText = String.valueOf(hoverInfo2);
+ } else {
+ hoverText = ((ITextHover)hover).getHoverInfo(caTest.getViewer(), hover.getHoverRegion(caTest.getViewer(), offsetToTest));
+ }
+ String hoverTextValue = html2Text(hoverText);
+ String compareValue = html2Text(compare);
+ //System.out.println("Hover Text: [" + hoverTextValue + "]\nExpected Value: [" + compareValue + "]\nEqual: " + compareValue.equalsIgnoreCase(hoverTextValue) + "\n");
+ assertTrue("Hover exists but its value is not expected:\nHover Text: [" + hoverTextValue + "]\nExpected Value: [" + compareValue + "]", compareValue.equalsIgnoreCase(hoverTextValue));
+ }
+
+ String html2Text(String html) {
+ StringBuilder sb = new StringBuilder();
+ int state = 0;
+ for (char ch : html.toCharArray()) {
+ switch (state) {
+ case (int)'<':
+ // Read to null until '>'-char is read
+ if (ch != '>')
+ continue;
+ state = 0;
+ break;
+ default:
+ if (ch == '<') {
+ state = '<';
+ continue;
+ }
+ sb.append(ch);
+ break;
+ }
+ }
+ return sb.toString();
+ }
+
+ public ITextHover getTextHover(ITextViewer viewer, int offset) {
+ try {
+ Method m = TextViewer.class.getDeclaredMethod("getTextHover", int.class, int.class); //$NON-NLS-1$
+ m.setAccessible(true);
+ return (ITextHover)m.invoke(viewer, Integer.valueOf(offset), Integer.valueOf(0));
+ } catch (Exception e) {
+ fail(e.getMessage());
+ }
+ return null;
+ }
+
+ public void testELTooltip() throws Exception {
+ caTest.setProject(getTestProject());
+ caTest.openEditor(PAGE_NAME);
+ try {
+ for (int i = 0; i < EL_PREFIX.length; i++) {
+ doELTooltipTest(EL_PREFIX[i], EL_VALUE[i], EL_TOOLTIP_TEXT[i]);
+ }
+ } finally {
+ caTest.closeEditor();
+ }
+ }
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.core.test/src/org/jboss/tools/cdi/seam/core/test/international/SeamResourceBundleELTooltipTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
13 years, 3 months
JBoss Tools SVN: r35669 - branches/jbosstools-3.2.x/build/parent.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-10-14 12:04:59 -0400 (Fri, 14 Oct 2011)
New Revision: 35669
Modified:
branches/jbosstools-3.2.x/build/parent/pom.xml
Log:
bump from M2 to CR1
Modified: branches/jbosstools-3.2.x/build/parent/pom.xml
===================================================================
--- branches/jbosstools-3.2.x/build/parent/pom.xml 2011-10-14 15:38:21 UTC (rev 35668)
+++ branches/jbosstools-3.2.x/build/parent/pom.xml 2011-10-14 16:04:59 UTC (rev 35669)
@@ -17,7 +17,7 @@
<scmBranch>branches/jbosstools-3.2.x</scmBranch>
<JBT_VERSION>3.2.2</JBT_VERSION>
<JBDS_VERSION>4.1.1</JBDS_VERSION>
- <BUILD_ALIAS>M2</BUILD_ALIAS>
+ <BUILD_ALIAS>CR1</BUILD_ALIAS>
<memoryOptions1>-Xms512m -Xmx1024m -XX:PermSize=256m</memoryOptions1>
<memoryOptions2>-XX:MaxPermSize=256m</memoryOptions2>
<systemProperties></systemProperties>
13 years, 3 months
JBoss Tools SVN: r35668 - trunk/build/target-platform.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-10-14 11:38:21 -0400 (Fri, 14 Oct 2011)
New Revision: 35668
Modified:
trunk/build/target-platform/publish.sh
trunk/build/target-platform/target2p2mirror.xml
Log:
add comments to remind about updating releng/org.jboss.ide.eclipse.releng/requirements/jbds-target-platform/build.properties when moving to new TP zip name
Modified: trunk/build/target-platform/publish.sh
===================================================================
--- trunk/build/target-platform/publish.sh 2011-10-14 15:38:17 UTC (rev 35667)
+++ trunk/build/target-platform/publish.sh 2011-10-14 15:38:21 UTC (rev 35668)
@@ -3,7 +3,7 @@
# defaults for JBoss Tools
# don't forget to increment these files when moving up a version:
-# build.xml, *.target*, publish.sh, target2p2mirror.xml
+# build.xml, *.target*, publish.sh, target2p2mirror.xml; also jbds/trunk/releng/org.jboss.ide.eclipse.releng/requirements/jbds-target-platform/build.properties
targetZipFile=e371-wtp331.target
repoDir=/home/hudson/static_build_env/jbds/tools/sources/REPO
destinationPath=/home/hudson/static_build_env/jbds/target-platform
Modified: trunk/build/target-platform/target2p2mirror.xml
===================================================================
--- trunk/build/target-platform/target2p2mirror.xml 2011-10-14 15:38:17 UTC (rev 35667)
+++ trunk/build/target-platform/target2p2mirror.xml 2011-10-14 15:38:21 UTC (rev 35668)
@@ -1,6 +1,6 @@
<project default="custom.build" name="jbosstools target platform p2.mirror generator">
<!-- don't forget to increment these files when moving up a version:
- build.xml, *.target*, publish.sh, target2p2mirror.xml -->
+ build.xml, *.target*, publish.sh, target2p2mirror.xml; also jbds/trunk/releng/org.jboss.ide.eclipse.releng/requirements/jbds-target-platform/build.properties -->
<property name="targetFile" value="e371-wtp331.target" />
<!-- if useLatest = true, omit versions from p2.mirror script to fetch latest version available;
13 years, 3 months
JBoss Tools SVN: r35667 - trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/org/jboss/tools/forge/runtime/ext.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2011-10-14 11:38:17 -0400 (Fri, 14 Oct 2011)
New Revision: 35667
Modified:
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/org/jboss/tools/forge/runtime/ext/MetaCommandAction.java
Log:
JBIDE-9915
Modified: trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/org/jboss/tools/forge/runtime/ext/MetaCommandAction.java
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/org/jboss/tools/forge/runtime/ext/MetaCommandAction.java 2011-10-14 14:48:29 UTC (rev 35666)
+++ trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/org/jboss/tools/forge/runtime/ext/MetaCommandAction.java 2011-10-14 15:38:17 UTC (rev 35667)
@@ -2,8 +2,6 @@
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
-import java.io.BufferedWriter;
-import java.io.FileWriter;
import java.io.IOException;
import java.util.List;
import java.util.Map;
@@ -46,16 +44,16 @@
private void handleHiddenCommand(String text) {
try {
- FileWriter fileWriter = new FileWriter("/Users/koen/Temp/handleHiddenCommand.txt", true);
- BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);
- bufferedWriter.write("handleHiddenCommand(" + text + ")\n");
+// FileWriter fileWriter = new FileWriter("/Users/koen/Temp/handleHiddenCommand.txt", true);
+// BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);
+// bufferedWriter.write("handleHiddenCommand(" + text + ")\n");
if ("plugin-candidates-query".equals(text)) {
- bufferedWriter.write("query is plugin-candidates-query\n");
+// bufferedWriter.write("query is plugin-candidates-query\n");
shell.print(ESCAPE + "plugin-candidates-answer: " + getPluginCandidates() + ESCAPE);
- bufferedWriter.write("response sent back to tools\n");
+// bufferedWriter.write("response sent back to tools\n");
}
- bufferedWriter.write("about to exit handleHiddenCommand\n");
- bufferedWriter.flush();
+// bufferedWriter.write("about to exit handleHiddenCommand\n");
+// bufferedWriter.flush();
// fileWriter.close();
} catch (Exception e) {
// ignored
@@ -64,35 +62,35 @@
private String getPluginCandidates() {
try {
- FileWriter fileWriter = new FileWriter("/Users/koen/Temp/getPluginCandidates.txt", true);
- BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);
- bufferedWriter.write("getPluginCandidates()\n");
+// FileWriter fileWriter = new FileWriter("/Users/koen/Temp/getPluginCandidates.txt", true);
+// BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);
+// bufferedWriter.write("getPluginCandidates()\n");
StringBuffer resultBuffer = new StringBuffer();
Map<String, List<PluginMetadata>> plugins = registry.getPlugins();
- bufferedWriter.write("got the plugins\n");
+// bufferedWriter.write("got the plugins\n");
for (Entry<String, List<PluginMetadata>> entry : plugins.entrySet()) {
- bufferedWriter.write("processing entry : " + entry.getKey() + "\n");
+// bufferedWriter.write("processing entry : " + entry.getKey() + "\n");
for (PluginMetadata pluginMeta : entry.getValue()) {
- bufferedWriter.write("processing pluginMeta : " + pluginMeta.getName());
+// bufferedWriter.write("processing pluginMeta : " + pluginMeta.getName());
if (pluginMeta.constrantsSatisfied(shell)) {
- bufferedWriter.write("pluginMeta : " + pluginMeta.getName() + " satisfies constraints\n");
+// bufferedWriter.write("pluginMeta : " + pluginMeta.getName() + " satisfies constraints\n");
List<CommandMetadata> commands = pluginMeta.getAllCommands();
- bufferedWriter.write("got the commands\n");
+// bufferedWriter.write("got the commands\n");
if (!commands.isEmpty()) {
- bufferedWriter.write("commands is not empty\n");
+// bufferedWriter.write("commands is not empty\n");
resultBuffer.append("p:").append(pluginMeta.getName()).append(' ');
- bufferedWriter.write("result becomes : " + resultBuffer.toString() + "\n");
+// bufferedWriter.write("result becomes : " + resultBuffer.toString() + "\n");
for (CommandMetadata commandMeta : commands) {
- bufferedWriter.write("processing command : " + commandMeta.getName() + "\n");
+// bufferedWriter.write("processing command : " + commandMeta.getName() + "\n");
resultBuffer.append("c:").append(commandMeta.getName()).append(' ');
- bufferedWriter.write("result becomes : " + resultBuffer.toString() + "\n");
+// bufferedWriter.write("result becomes : " + resultBuffer.toString() + "\n");
}
}
}
}
}
- bufferedWriter.write("about to return result : " + resultBuffer.toString() + "\n");
- bufferedWriter.flush();
+// bufferedWriter.write("about to return result : " + resultBuffer.toString() + "\n");
+// bufferedWriter.flush();
return resultBuffer.toString();
} catch (Exception e) {
return null;
13 years, 3 months
JBoss Tools SVN: r35666 - in branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse: launch and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2011-10-14 10:48:29 -0400 (Fri, 14 Oct 2011)
New Revision: 35666
Modified:
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConsoleConfigurationMainTab.java
Log:
Fix missprint and externalize
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java 2011-10-14 14:48:23 UTC (rev 35665)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java 2011-10-14 14:48:29 UTC (rev 35666)
@@ -388,6 +388,8 @@
public static String CodeGenerationSettingsTab_use_generation_in_external_process;
public static String CodeGenerationSettingsTab_script_can_not_be_generated_correctly_without;
public static String ConsoleConfigurationLaunchDelegate_direct_launch_not_supported;
+ public static String ConsoleConfigurationMainTab_0;
+
public static String ConsoleConfigurationMainTab_annotations;
public static String ConsoleConfigurationMainTab_cfg_xml;
public static String ConsoleConfigurationMainTab_choose_file_to_use_as_hibernate_cfg_xml;
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties 2011-10-14 14:48:23 UTC (rev 35665)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties 2011-10-14 14:48:29 UTC (rev 35666)
@@ -391,6 +391,7 @@
CodeGenerationSettingsTab_use_generation_in_external_process=Use generation in external process
CodeGenerationSettingsTab_script_can_not_be_generated_correctly_without=The script can not be generated correctly without "Generate basic typed composite ids" flag set.
ConsoleConfigurationLaunchDelegate_direct_launch_not_supported=Direct launch not supported
+ConsoleConfigurationMainTab_0=Hibernate Version:
ConsoleConfigurationMainTab_annotations=Annotations (jdk 1.5+)
ConsoleConfigurationMainTab_cfg_xml=cfg.xml
ConsoleConfigurationMainTab_choose_file_to_use_as_hibernate_cfg_xml=Choose file to use as hibernate.cfg.xml
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConsoleConfigurationMainTab.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConsoleConfigurationMainTab.java 2011-10-14 14:48:23 UTC (rev 35665)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConsoleConfigurationMainTab.java 2011-10-14 14:48:29 UTC (rev 35666)
@@ -128,7 +128,7 @@
comp2.setLayout(new GridLayout(2, false));
comp2.setLayoutData(new GridData(GridData.BEGINNING, -1, false, false, 2, 1));
Label hLabel = new Label(comp2, SWT.NULL);
- hLabel.setText("Hiberante Version:");
+ hLabel.setText(HibernateConsoleMessages.ConsoleConfigurationMainTab_0);
hibernateVersion = new Combo(comp2, SWT.READ_ONLY);
hibernateVersion.setItems((String[])ExtensionManager.getExporterDefinitionsAsMap().keySet().toArray(new String[0]));
hibernateVersion.select(0);
@@ -216,7 +216,7 @@
try {
ConfigurationMode cm = ConfigurationMode.parse(configuration.getAttribute( IConsoleConfigurationLaunchConstants.CONFIGURATION_FACTORY, "" )); //$NON-NLS-1$
coreMode.setSelection( cm.equals( ConfigurationMode.CORE ) );
- hibernateVersion.setText(configuration.getAttribute( IConsoleConfigurationLaunchConstants.HIBERNATE_VERSION, ""));
+ hibernateVersion.setText(configuration.getAttribute( IConsoleConfigurationLaunchConstants.HIBERNATE_VERSION, "")); //$NON-NLS-1$
annotationsMode.setSelection( cm.equals( ConfigurationMode.ANNOTATIONS ) );
jpaMode.setSelection( cm.equals( ConfigurationMode.JPA ) );
@@ -516,7 +516,7 @@
}
public String getHibernateVersion(){
- return "".equals(hibernateVersion.getText()) ? null : hibernateVersion.getText();
+ return "".equals(hibernateVersion.getText()) ? null : hibernateVersion.getText(); //$NON-NLS-1$
}
String getProjectName() {
13 years, 3 months
JBoss Tools SVN: r35665 - trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/info.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2011-10-14 10:48:23 -0400 (Fri, 14 Oct 2011)
New Revision: 35665
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/info/ELInfoHoverMessages.properties
Log:
JBIDE-9909 Let's use a bold font for tooltip of message bundles in ELs
Labels like Base Name, Property name, Resource Bundle and Value are made to be bold.
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/info/ELInfoHoverMessages.properties
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/info/ELInfoHoverMessages.properties 2011-10-14 14:26:08 UTC (rev 35664)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/info/ELInfoHoverMessages.properties 2011-10-14 14:48:23 UTC (rev 35665)
@@ -3,10 +3,10 @@
ELInfoHover_noAttachedJavadoc= <em>Note: This element has no attached Javadoc and the Javadoc could not be found in the attached source.</em>
ELInfoHover_noInformation= <em>Note: The Javadoc for this element could neither be found in the attached source nor the attached Javadoc.</em>
ELInfoHover_error_gettingJavadoc= <em>Note: An exception occurred while getting the Javadoc. See log for details.</em>
-ELInfoHover_baseName=Base Name: {0}<br>
-ELInfoHover_propertyName=Property: {0}<br>
-ELInfoHover_resourceBundle=Resource Bundle: {0}<br>
-ELInfoHover_resourceBundlePropertyValue=Value: {0}{1}<br>
+ELInfoHover_baseName=<b>Base Name:</b> {0}<br>
+ELInfoHover_propertyName=<b>Property:</b> {0}<br>
+ELInfoHover_resourceBundle=<b>Resource Bundle:</b> {0}<br>
+ELInfoHover_resourceBundlePropertyValue=<b>Value:</b> {0}{1}<br>
ELInfoHover_resourceBundlePropertyValueNotDefined=[Value not defined]
ELInfoHover_resourceBundleNotDefined=[Resource Bundle not defined]
ELInfoHover_newLine=<br>
13 years, 3 months
JBoss Tools SVN: r35664 - in branches/dead/hibernatetools-multiversion2/plugins: org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0 and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2011-10-14 10:26:08 -0400 (Fri, 14 Oct 2011)
New Revision: 35664
Modified:
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/HibernateExtension3_5.java
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/HibernateExtension4_0.java
Log:
Handle Throwable instead of Exception as incompatible libraries versions (when ConsoleConfiguration and user libraries has different versions) throw Exceptions which actually subclasses of Error
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/HibernateExtension3_5.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/HibernateExtension3_5.java 2011-10-14 14:23:38 UTC (rev 35663)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/HibernateExtension3_5.java 2011-10-14 14:26:08 UTC (rev 35664)
@@ -93,7 +93,10 @@
try {
session = sessionFactory.openSession();
return QueryExecutor.executeCriteriaQuery(session, criteriaCode, model);
- } catch (Exception e){
+ } catch (Throwable e){
+ //Incompatible library versions could throw subclasses of Error, like AbstractMethodError
+ //may be there is a sense to say to user that the reason is probably a wrong CC version
+ //(when catch a subclass of Error)
return new QueryResultImpl(e);
}
} finally {
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/HibernateExtension4_0.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/HibernateExtension4_0.java 2011-10-14 14:23:38 UTC (rev 35663)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/HibernateExtension4_0.java 2011-10-14 14:26:08 UTC (rev 35664)
@@ -101,7 +101,10 @@
try {
session = sessionFactory.openSession();
return QueryExecutor.executeCriteriaQuery(session, criteriaCode, model);
- } catch (Exception e){
+ } catch (Throwable e){
+ //Incompatible library versions could throw subclasses of Error, like AbstractMethodError
+ //may be there is a sense to say to user that the reason is probably a wrong CC version
+ //(when catch a subclass of Error)
return new QueryResultImpl(e);
}
} finally {
13 years, 3 months
JBoss Tools SVN: r35663 - branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2011-10-14 10:23:38 -0400 (Fri, 14 Oct 2011)
New Revision: 35663
Modified:
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/HQLQueryPage.java
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/JavaPage.java
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/QueryResult.java
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/QueryResultImpl.java
Log:
Handle Throwable instead of Exception as incompatible libraries versions (when ConsoleConfiguration and user libraries has different versions) throw Exceptions which actually subclasses of Error
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/HQLQueryPage.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/HQLQueryPage.java 2011-10-14 14:23:25 UTC (rev 35662)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/HQLQueryPage.java 2011-10-14 14:23:38 UTC (rev 35663)
@@ -54,7 +54,7 @@
}
pcs.firePropertyChange("list", null, list); //$NON-NLS-1$
} else {
- for (Exception e : queryResult.getExceptions()) {
+ for (Throwable e : queryResult.getExceptions()) {
addException(e);
}
}
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/JavaPage.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/JavaPage.java 2011-10-14 14:23:25 UTC (rev 35662)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/JavaPage.java 2011-10-14 14:23:38 UTC (rev 35663)
@@ -62,7 +62,7 @@
}
pcs.firePropertyChange("list", null, list); //$NON-NLS-1$
} else {
- for (Exception e : queryResult.getExceptions()) {
+ for (Throwable e : queryResult.getExceptions()) {
addException(e);
}
}
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/QueryResult.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/QueryResult.java 2011-10-14 14:23:25 UTC (rev 35662)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/QueryResult.java 2011-10-14 14:23:38 UTC (rev 35663)
@@ -26,7 +26,7 @@
public boolean hasExceptions();
- public List<Exception> getExceptions();
+ public List<Throwable> getExceptions();
public void setPathNames(List<String> pathNames);
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/QueryResultImpl.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/QueryResultImpl.java 2011-10-14 14:23:25 UTC (rev 35662)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/QueryResultImpl.java 2011-10-14 14:23:38 UTC (rev 35663)
@@ -26,7 +26,7 @@
private long execTime;
- private List<Exception> exceptions = new ArrayList<Exception>();
+ private List<Throwable> exceptions = new ArrayList<Throwable>();
public QueryResultImpl(List<Object> list, long execTime){
this.list = list;
@@ -38,7 +38,7 @@
this.pathNames = pathNames;
}
- public QueryResultImpl(Exception e){
+ public QueryResultImpl(Throwable e){
exceptions.add(e);
}
@@ -66,11 +66,11 @@
return execTime;
}
- public void addException(Exception e){
+ public void addException(Throwable e){
exceptions.add(e);
}
- public List<Exception> getExceptions(){
+ public List<Throwable> getExceptions(){
return this.exceptions;
}
13 years, 3 months