JBoss Tools SVN: r42631 - trunk/build/target-platform.
by jbosstools-commits@lists.jboss.org
Author: mickael_istria
Date: 2012-07-18 06:43:26 -0400 (Wed, 18 Jul 2012)
New Revision: 42631
Modified:
trunk/build/target-platform/pom.xml
Log:
JBIDE-12003: Maven job to publish TP first publish site and then validates targets. So unified.target validation was re-enabled by default since it always happen after mutliple.target was built.
Modified: trunk/build/target-platform/pom.xml
===================================================================
--- trunk/build/target-platform/pom.xml 2012-07-18 10:43:05 UTC (rev 42630)
+++ trunk/build/target-platform/pom.xml 2012-07-18 10:43:26 UTC (rev 42631)
@@ -39,7 +39,7 @@
<configuration>
<targetFiles>
<param>multiple.target</param>
- <!-- DO NOT VALIDATE unified.target because this cannot be validated until multiple.target is built and published -->
+ <!-- DO NOT VALIDATE unified.target until multiple.target is built and published -->
<param>unified.target</param>
<!-- DO NOT VALIDATE jbds.target since it's the same as multiple.target now (redundant step)
<param>jbds.target</param
13 years, 8 months
JBoss Tools SVN: r42630 - trunk/build/target-platform.
by jbosstools-commits@lists.jboss.org
Author: mickael_istria
Date: 2012-07-18 06:43:05 -0400 (Wed, 18 Jul 2012)
New Revision: 42630
Modified:
trunk/build/target-platform/pom.xml
Log:
JBIDE-12003: Maven job to publish TP first publish site and then validates targets. So unified.target validation was re-enabled by default since it always happen after mutliple.target was built.
Modified: trunk/build/target-platform/pom.xml
===================================================================
--- trunk/build/target-platform/pom.xml 2012-07-18 08:23:05 UTC (rev 42629)
+++ trunk/build/target-platform/pom.xml 2012-07-18 10:43:05 UTC (rev 42630)
@@ -39,9 +39,8 @@
<configuration>
<targetFiles>
<param>multiple.target</param>
- <!-- DO NOT VALIDATE unified.target because this cannot be validated until multiple.target is built and published
- <param>unified.target</param>
- -->
+ <!-- DO NOT VALIDATE unified.target because this cannot be validated until multiple.target is built and published -->
+ <param>unified.target</param>
<!-- DO NOT VALIDATE jbds.target since it's the same as multiple.target now (redundant step)
<param>jbds.target</param
-->
13 years, 8 months
JBoss Tools SVN: r42629 - trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernate40/console.
by jbosstools-commits@lists.jboss.org
Author: jpeterka
Date: 2012-07-18 04:23:05 -0400 (Wed, 18 Jul 2012)
New Revision: 42629
Modified:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernate40/console/pre-hibernate40.launch
Log:
Missing hibernate ui bot test console generation launcher added
Modified: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernate40/console/pre-hibernate40.launch
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernate40/console/pre-hibernate40.launch 2012-07-18 07:42:23 UTC (rev 42628)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/resources/prj/hibernate40/console/pre-hibernate40.launch 2012-07-18 08:23:05 UTC (rev 42629)
@@ -10,20 +10,35 @@
<stringAttribute key="org.hibernate.eclipse.launch.CFG_XML_FILE" value="/hibernatelib/cfg/hibernate.cfg.xml"/>
<stringAttribute key="org.hibernate.eclipse.launch.CONFIGURATION_FACTORY" value="CORE"/>
<listAttribute key="org.hibernate.eclipse.launch.FILE_MAPPINGS">
+<listEntry value="/hibernate40/src/org/pregen/hsqldb/Actor.hbm.xml"/>
+<listEntry value="/hibernate40/src/org/pregen/hsqldb/Address.hbm.xml"/>
+<listEntry value="/hibernate40/src/org/pregen/hsqldb/Category.hbm.xml"/>
+<listEntry value="/hibernate40/src/org/pregen/hsqldb/City.hbm.xml"/>
+<listEntry value="/hibernate40/src/org/pregen/hsqldb/Country.hbm.xml"/>
<listEntry value="/hibernate40/src/org/pregen/hsqldb/Customer.hbm.xml"/>
<listEntry value="/hibernate40/src/org/pregen/hsqldb/Customers.hbm.xml"/>
<listEntry value="/hibernate40/src/org/pregen/hsqldb/Dog.hbm.xml"/>
<listEntry value="/hibernate40/src/org/pregen/hsqldb/Employees.hbm.xml"/>
<listEntry value="/hibernate40/src/org/pregen/hsqldb/Event.hbm.xml"/>
+<listEntry value="/hibernate40/src/org/pregen/hsqldb/Film.hbm.xml"/>
+<listEntry value="/hibernate40/src/org/pregen/hsqldb/FilmActor.hbm.xml"/>
+<listEntry value="/hibernate40/src/org/pregen/hsqldb/FilmCategory.hbm.xml"/>
+<listEntry value="/hibernate40/src/org/pregen/hsqldb/FilmText.hbm.xml"/>
+<listEntry value="/hibernate40/src/org/pregen/hsqldb/Inventory.hbm.xml"/>
<listEntry value="/hibernate40/src/org/pregen/hsqldb/Kunde.hbm.xml"/>
+<listEntry value="/hibernate40/src/org/pregen/hsqldb/Language.hbm.xml"/>
<listEntry value="/hibernate40/src/org/pregen/hsqldb/Offices.hbm.xml"/>
<listEntry value="/hibernate40/src/org/pregen/hsqldb/Orderdetails.hbm.xml"/>
<listEntry value="/hibernate40/src/org/pregen/hsqldb/Orders.hbm.xml"/>
<listEntry value="/hibernate40/src/org/pregen/hsqldb/Passwordattributes.hbm.xml"/>
<listEntry value="/hibernate40/src/org/pregen/hsqldb/Passwordresourceauditlog.hbm.xml"/>
+<listEntry value="/hibernate40/src/org/pregen/hsqldb/Payment.hbm.xml"/>
<listEntry value="/hibernate40/src/org/pregen/hsqldb/Payments.hbm.xml"/>
<listEntry value="/hibernate40/src/org/pregen/hsqldb/Productlines.hbm.xml"/>
<listEntry value="/hibernate40/src/org/pregen/hsqldb/Products.hbm.xml"/>
+<listEntry value="/hibernate40/src/org/pregen/hsqldb/Rental.hbm.xml"/>
+<listEntry value="/hibernate40/src/org/pregen/hsqldb/Staff.hbm.xml"/>
+<listEntry value="/hibernate40/src/org/pregen/hsqldb/Store.hbm.xml"/>
</listAttribute>
<stringAttribute key="org.hibernate.eclipse.launch.HIBERNATE_VERSION" value="4.0"/>
</launchConfiguration>
13 years, 8 months
JBoss Tools SVN: r42628 - trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/launcher.
by jbosstools-commits@lists.jboss.org
Author: jpeterka
Date: 2012-07-18 03:42:23 -0400 (Wed, 18 Jul 2012)
New Revision: 42628
Modified:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/launcher/MappingFile.launch
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/launcher/Perspective.launch
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/launcher/RevengFile.launch
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/launcher/Validation.launch
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/launcher/View.launch
Log:
HB ui bot test launchers modified to avoid secure storage dlg
Modified: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/launcher/MappingFile.launch
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/launcher/MappingFile.launch 2012-07-18 00:27:14 UTC (rev 42627)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/launcher/MappingFile.launch 2012-07-18 07:42:23 UTC (rev 42628)
@@ -27,7 +27,7 @@
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.jboss.tools.hb.ui.bot.suite.MappingFileSuite"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog -eclipse.password /opt/.eclipse/master"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.jboss.tools.hibernate.ui.bot.test"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -XX:MaxPermSize=256m -Xms40m -Xmx512m -Xmx1024M -XX:PermSize=128M -XX:MaxPermSize=256M -Dusage_reporting_enabled=false -Dtest.configurations.dir=/home/jpeterka/etc/hb"/>
Modified: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/launcher/Perspective.launch
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/launcher/Perspective.launch 2012-07-18 00:27:14 UTC (rev 42627)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/launcher/Perspective.launch 2012-07-18 07:42:23 UTC (rev 42628)
@@ -27,7 +27,7 @@
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.jboss.tools.hb.ui.bot.suite.PerspectiveSuite"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog -eclipse.password /opt/.eclipse/master"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.jboss.tools.hibernate.ui.bot.test"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -XX:MaxPermSize=256m -Xms40m -Xmx512m -Xmx1024M -XX:PermSize=128M -XX:MaxPermSize=256M -Dusage_reporting_enabled=false -Dtest.configurations.dir=/home/jpeterka/etc/hb"/>
Modified: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/launcher/RevengFile.launch
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/launcher/RevengFile.launch 2012-07-18 00:27:14 UTC (rev 42627)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/launcher/RevengFile.launch 2012-07-18 07:42:23 UTC (rev 42628)
@@ -27,7 +27,7 @@
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.jboss.tools.hb.ui.bot.suite.RevengFileSuite"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog -eclipse.password /opt/.eclipse/master"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.jboss.tools.hibernate.ui.bot.test"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -XX:MaxPermSize=256m -Xms40m -Xmx512m -Xmx1024M -XX:PermSize=128M -XX:MaxPermSize=256M -Dusage_reporting_enabled=false -Dtest.configurations.dir=/home/jpeterka/etc/hb"/>
Modified: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/launcher/Validation.launch
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/launcher/Validation.launch 2012-07-18 00:27:14 UTC (rev 42627)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/launcher/Validation.launch 2012-07-18 07:42:23 UTC (rev 42628)
@@ -27,7 +27,7 @@
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.jboss.tools.hb.ui.bot.suite.ValidationSuite"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog -eclipse.password /opt/.eclipse/master"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.jboss.tools.hibernate.ui.bot.test"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -XX:MaxPermSize=256m -Xms40m -Xmx512m -Xmx1024M -XX:PermSize=128M -XX:MaxPermSize=256M -Dusage_reporting_enabled=false -Dtest.configurations.dir=/home/jpeterka/etc/hb"/>
Modified: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/launcher/View.launch
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/launcher/View.launch 2012-07-18 00:27:14 UTC (rev 42627)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/launcher/View.launch 2012-07-18 07:42:23 UTC (rev 42628)
@@ -27,7 +27,7 @@
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.jboss.tools.hb.ui.bot.suite.ViewSuite"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog -eclipse.password /opt/.eclipse/master"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.jboss.tools.hibernate.ui.bot.test"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -XX:MaxPermSize=256m -Xms40m -Xmx512m -Xmx1024M -XX:PermSize=128M -XX:MaxPermSize=256M -Dusage_reporting_enabled=false -Dtest.configurations.dir=/home/jpeterka/etc/hb"/>
13 years, 8 months
JBoss Tools SVN: r42627 - in trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test: .settings and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-07-17 20:27:14 -0400 (Tue, 17 Jul 2012)
New Revision: 42627
Added:
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/.settings/
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/.settings/org.eclipse.jdt.core.prefs
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/JSF2CompositeOpenOn/WebContent/params/
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/JSF2CompositeOpenOn/WebContent/params/a.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/JSF2CompositeOpenOn/WebContent/params/b.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/JSPELHyperlinkUIParamTest.java
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/.classpath
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/JsfTextExtAllTests.java
Log:
JBIDE-12295
https://issues.jboss.org/browse/JBIDE-12295
Test is added.
Modified: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/.classpath
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/.classpath 2012-07-17 23:39:35 UTC (rev 42626)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/.classpath 2012-07-18 00:27:14 UTC (rev 42627)
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/.settings/org.eclipse.jdt.core.prefs 2012-07-18 00:27:14 UTC (rev 42627)
@@ -0,0 +1,8 @@
+#Fri Sep 30 12:13:49 PDT 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/JSF2CompositeOpenOn/WebContent/params/a.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/JSF2CompositeOpenOn/WebContent/params/a.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/JSF2CompositeOpenOn/WebContent/params/a.xhtml 2012-07-18 00:27:14 UTC (rev 42627)
@@ -0,0 +1,12 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core">
+
+ <ui:composition template="/params/b.xhtml">
+ <ui:param name="myparam1" value="#{person}" />
+ <ui:param name="myparam2" value="abc" />
+ </ui:composition>
+
+</html>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/JSF2CompositeOpenOn/WebContent/params/b.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/JSF2CompositeOpenOn/WebContent/params/b.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/JSF2CompositeOpenOn/WebContent/params/b.xhtml 2012-07-18 00:27:14 UTC (rev 42627)
@@ -0,0 +1,10 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core">
+ <body>
+ #{myparam1}
+ #{myparam2}
+ </body>
+</html>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/JSPELHyperlinkUIParamTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/JSPELHyperlinkUIParamTest.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/JSPELHyperlinkUIParamTest.java 2012-07-18 00:27:14 UTC (rev 42627)
@@ -0,0 +1,105 @@
+/*******************************************************************************
+ * Copyright (c) 2012 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.jsf.text.ext.test;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.FindReplaceDocumentAdapter;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.hyperlink.IHyperlink;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.jst.text.ext.hyperlink.ELHyperlinkDetector;
+import org.jboss.tools.jst.web.kb.PageContextFactory;
+import org.jboss.tools.test.util.WorkbenchUtils;
+
+/**
+ *
+ *
+ * @author Viacheslav Kabanovich
+ */
+public class JSPELHyperlinkUIParamTest extends TestCase {
+ private static final String PROJECT_NAME = "JSF2CompositeOpenOn";
+ public IProject project = null;
+ private ELHyperlinkDetector elHyperlinkDetector = new ELHyperlinkDetector();
+
+ protected void setUp() {
+ project = ResourcesPlugin.getWorkspace().getRoot().getProject(
+ PROJECT_NAME);
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().closeAllEditors(false);
+ }
+
+ protected void tearDown() {
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().closeAllEditors(false);
+ }
+
+ public JSPELHyperlinkUIParamTest() {
+ super("JSP UI Param OpenOn test");
+ }
+
+
+ public void testJSPELHyperlinkUIParam() throws PartInitException, BadLocationException {
+ //Activate page, include model is lazy.
+ PageContextFactory.createPageContext(project.getFile(new Path("/WebContent/params/a.xhtml")));
+ String pageName = PROJECT_NAME+"/WebContent/params/b.xhtml";
+ String textToFind = "myparam1";
+ String[] resultEditor = new String[]{"a.xhtml", "Person.java"};
+ try {
+ doJSPELHyperlinkUIParam(pageName, textToFind, resultEditor);
+ } finally {
+ WorkbenchUtils.closeAllEditors();
+ }
+ textToFind = "myparam2";
+ resultEditor = new String[]{"a.xhtml", "String.java"};
+ try {
+ doJSPELHyperlinkUIParam(pageName, textToFind, resultEditor);
+ } finally {
+ WorkbenchUtils.closeAllEditors();
+ }
+ }
+
+ private void doJSPELHyperlinkUIParam(String pageName, String template, String... editorName) throws BadLocationException {
+ IEditorPart editor = WorkbenchUtils.openEditor(pageName);
+ assertTrue(editor instanceof JSPMultiPageEditor);
+ JSPMultiPageEditor jspMultyPageEditor = (JSPMultiPageEditor) editor;
+ ISourceViewer viewer = jspMultyPageEditor.getSourceEditor().getTextViewer();
+ assertNotNull("Viewer couldn't be found for " + pageName, viewer);
+ IDocument document = viewer.getDocument();
+ IRegion reg = new FindReplaceDocumentAdapter(document).find(0,
+ template, true, true, false, false);
+ assertNotNull("Text: "+ template +" not found",reg);
+
+ IHyperlink[] links = elHyperlinkDetector.detectHyperlinks(viewer, new Region(reg.getOffset() + reg.getLength() - 1, 0), true);
+
+ assertNotNull("Hyperlinks for EL:#{" + template + "} are not found",links);
+
+ assertTrue("Hyperlinks for EL: #{" + template + "} are not found",links.length!=0);
+
+ for(int i = 0; i < links.length; i++){
+ IHyperlink link = links[i];
+ assertNotNull(link.toString());
+
+ link.open();
+
+ IEditorPart resultEditor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ assertEquals("Link " + i + " leads to a wrong editor.", editorName[i], resultEditor.getTitle());
+ }
+ }
+}
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/JSPELHyperlinkUIParamTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/JsfTextExtAllTests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/JsfTextExtAllTests.java 2012-07-17 23:39:35 UTC (rev 42626)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/JsfTextExtAllTests.java 2012-07-18 00:27:14 UTC (rev 42627)
@@ -30,7 +30,8 @@
JSF2MessagesOpenOnTest.class,
JSF2CSSStylesheetOpenOnTest.class,
JSF2CCAttrsOpenOnTest.class,
- JSF2XMLOpenOnTest.class),
+ JSF2XMLOpenOnTest.class,
+ JSPELHyperlinkUIParamTest.class),
"org.jboss.tools.jsf.text.ext.test",
new String[]{"projects/JSF2CompositeOpenOn"},
new String[]{"JSF2CompositeOpenOn"}));
13 years, 8 months
JBoss Tools SVN: r42626 - trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2012-07-17 19:39:35 -0400 (Tue, 17 Jul 2012)
New Revision: 42626
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java
Log:
Make CDI Quick Fixes work for As-You-Type validator annotations https://issues.jboss.org/browse/JBIDE-12328
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java 2012-07-17 22:09:15 UTC (rev 42625)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/CDIUtil.java 2012-07-17 23:39:35 UTC (rev 42626)
@@ -24,6 +24,7 @@
import org.apache.tools.ant.util.FileUtils;
import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
@@ -56,7 +57,7 @@
import org.eclipse.wst.common.project.facet.core.IFacetedProject;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-import org.jboss.tools.cdi.internal.core.impl.CDIProject;
+import org.jboss.tools.cdi.internal.core.impl.CDIProjectAsYouType;
import org.jboss.tools.cdi.internal.core.impl.ClassBean;
import org.jboss.tools.cdi.internal.core.validation.AnnotationValidationDelegate;
import org.jboss.tools.cdi.internal.core.validation.CDICoreValidator;
@@ -67,7 +68,6 @@
import org.jboss.tools.common.java.IJavaReference;
import org.jboss.tools.common.java.IJavaSourceReference;
import org.jboss.tools.common.java.IParametedType;
-import org.jboss.tools.common.java.ITypeDeclaration;
import org.jboss.tools.common.model.util.EclipseJavaUtil;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.common.text.ITextSourceReference;
@@ -1269,5 +1269,15 @@
}
return null;
}
+
+ public static ICDIProject getCDIProject(IFile file, CDICoreNature cdiNature, boolean asYouType){
+ ICDIProject cdiProject = cdiNature.getDelegate();
+
+ if(asYouType){
+ return new CDIProjectAsYouType(cdiProject, file);
+ }else{
+ return cdiProject;
+ }
+ }
}
\ No newline at end of file
13 years, 8 months
JBoss Tools SVN: r42625 - trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2012-07-17 18:09:15 -0400 (Tue, 17 Jul 2012)
New Revision: 42625
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CDIProblemMarkerResolutionGenerator.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CreateCDIElementMarkerResolution.java
Log:
Make CDI Quick Fixes work for As-You-Type validator annotations https://issues.jboss.org/browse/JBIDE-12328
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CDIProblemMarkerResolutionGenerator.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CDIProblemMarkerResolutionGenerator.java 2012-07-17 18:19:12 UTC (rev 42624)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CDIProblemMarkerResolutionGenerator.java 2012-07-17 22:09:15 UTC (rev 42625)
@@ -35,8 +35,14 @@
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.IMarkerResolution;
import org.eclipse.ui.IMarkerResolutionGenerator2;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.ui.texteditor.DocumentProviderRegistry;
import org.eclipse.ui.texteditor.IDocumentProvider;
@@ -97,7 +103,84 @@
return -1;
}
- private IQuickFix[] findResolutions(ICompilationUnit compilationUnit, int problemId, int offset, ICDIMarkerResolutionGeneratorExtension[] extensions) throws JavaModelException{
+ private int getMessageID(TemporaryAnnotation annotation){
+ Integer attribute = ((Integer) annotation.getAttributes().get(CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME));
+ if (attribute != null)
+ return attribute.intValue();
+
+ return -1;
+ }
+
+ private IQuickFix[] findXMLResolutions(IFile file, int messageId, int start, int end, boolean asYouType) throws JavaModelException{
+ IJavaProject javaProject = EclipseUtil.getJavaProject(file.getProject());
+
+ FileEditorInput input = new FileEditorInput(file);
+ IDocumentProvider provider = DocumentProviderRegistry.getDefault().getDocumentProvider(input);
+ try {
+ provider.connect(input);
+ } catch (CoreException e) {
+ CDIUIPlugin.getDefault().logError(e);
+ }
+
+ IDocument document = provider.getDocument(input);
+
+ String text="";
+ try {
+ text = document.get(start, end-start);
+ } catch (BadLocationException e) {
+ CDIUIPlugin.getDefault().logError(e);
+ } finally {
+ provider.disconnect(input);
+ }
+ boolean correctTypeName = JavaConventionsUtil.validatePackageName(text, javaProject).isOK();
+
+ if(messageId == CDIValidationErrorManager.UNKNOWN_ALTERNATIVE_BEAN_CLASS_NAME_ID){
+ IJavaElement element = findJavaElementByQualifiedName(javaProject, text);
+ if(element == null && correctTypeName){
+ return new IQuickFix[] {
+ new CreateCDIElementMarkerResolution(file.getProject(), text, CreateCDIElementMarkerResolution.CREATE_BEAN_CLASS)
+ };
+ }
+ }else if(messageId == CDIValidationErrorManager.UNKNOWN_ALTERNATIVE_ANNOTATION_NAME_ID){
+ IJavaElement element = findJavaElementByQualifiedName(javaProject, text);
+ if(element == null && correctTypeName){
+ return new IQuickFix[] {
+ new CreateCDIElementMarkerResolution(file.getProject(), text, CreateCDIElementMarkerResolution.CREATE_STEREOTYPE)
+ };
+ }
+ }else if(messageId == CDIValidationErrorManager.ILLEGAL_ALTERNATIVE_BEAN_CLASS_ID){
+ IJavaElement element = getTypeToAddAlternativeToBean(javaProject, text, asYouType);
+ if(element != null){
+ return new IQuickFix[] {
+ new AddAnnotationMarkerResolution(element, CDIConstants.ALTERNATIVE_ANNOTATION_TYPE_NAME)
+ };
+ }
+ }else if(messageId == CDIValidationErrorManager.ILLEGAL_ALTERNATIVE_ANNOTATION_ID){
+ IJavaElement element = getTypeToAddAlternativeToStereotype(javaProject, text, asYouType);
+ if(element != null){
+ return new IQuickFix[] {
+ new AddAnnotationMarkerResolution(element, CDIConstants.ALTERNATIVE_ANNOTATION_TYPE_NAME)
+ };
+ }
+ }else if(messageId == CDIValidationErrorManager.UNKNOWN_DECORATOR_BEAN_CLASS_NAME_ID){
+ IJavaElement element = findJavaElementByQualifiedName(javaProject, text);
+ if(element == null && correctTypeName){
+ return new IQuickFix[] {
+ new CreateCDIElementMarkerResolution(file.getProject(), text, CreateCDIElementMarkerResolution.CREATE_DECORATOR)
+ };
+ }
+ }else if(messageId == CDIValidationErrorManager.UNKNOWN_INTERCEPTOR_CLASS_NAME_ID){
+ IJavaElement element = findJavaElementByQualifiedName(javaProject, text);
+ if(element == null && correctTypeName){
+ return new IQuickFix[] {
+ new CreateCDIElementMarkerResolution(file.getProject(), text, CreateCDIElementMarkerResolution.CREATE_INTERCEPTOR)
+ };
+ }
+ }
+ return new IQuickFix[]{};
+ }
+
+ private IQuickFix[] findJavaResolutions(ICompilationUnit compilationUnit, int problemId, int offset, ICDIMarkerResolutionGeneratorExtension[] extensions, boolean asYouType) throws JavaModelException{
if (problemId == CDIValidationErrorManager.ILLEGAL_PRODUCER_FIELD_IN_SESSION_BEAN_ID) {
IField field = findNonStaticField(compilationUnit, offset);
if(field != null){
@@ -143,7 +226,7 @@
List<IMarkerResolution> resolutions = new ArrayList<IMarkerResolution>();
- IInjectionPoint injectionPoint = findInjectionPoint(compilationUnit, offset);
+ IInjectionPoint injectionPoint = findInjectionPoint(compilationUnit, offset, asYouType);
if(injectionPoint != null){
List<IBean> beans;
if(problemId == CDIValidationErrorManager.AMBIGUOUS_INJECTION_POINTS_ID){
@@ -185,7 +268,7 @@
IField field = findPublicField(compilationUnit, offset);
CDICoreNature cdiNature = CDIUtil.getCDINatureWithProgress(field.getUnderlyingResource().getProject());
if(cdiNature != null){
- ICDIProject cdiProject = cdiNature.getDelegate();
+ ICDIProject cdiProject = CDIUtil.getCDIProject((IFile)compilationUnit.getUnderlyingResource(), cdiNature, asYouType);
if(cdiProject != null){
Set<IBean> beans = cdiProject.getBeans(field.getUnderlyingResource().getFullPath());
@@ -366,7 +449,7 @@
if(ta != null && ta.type != null){
CDICoreNature cdiNature = CDIUtil.getCDINatureWithProgress(ta.type.getUnderlyingResource().getProject());
if(cdiNature != null){
- ICDIProject cdiProject = cdiNature.getDelegate();
+ ICDIProject cdiProject = CDIUtil.getCDIProject((IFile)compilationUnit.getUnderlyingResource(), cdiNature, asYouType);;
IType declarationType = findNamedDeclarationType(cdiProject, ta.type, problemId == CDIValidationErrorManager.DECORATOR_HAS_NAME_ID);
ArrayList<IMarkerResolution> resolutions = new ArrayList<IMarkerResolution>();
if(declarationType != null){
@@ -470,7 +553,7 @@
}
}
}else if(problemId == CDIValidationErrorManager.PARAM_INJECTION_DECLARES_EMPTY_NAME_ID){
- List<IMarkerResolution> resolutions = getAddNameResolutions(compilationUnit, offset);
+ List<IMarkerResolution> resolutions = getAddNameResolutions(compilationUnit, offset, asYouType);
return resolutions.toArray(new IQuickFix[]{});
}else if(problemId == CDIValidationErrorManager.MULTIPLE_DISPOSING_PARAMETERS_ID){
ILocalVariable parameter = findParameter(compilationUnit, offset);
@@ -499,7 +582,7 @@
final IFile file = (IFile) marker.getResource();
- IJavaProject javaProject = EclipseUtil.getJavaProject(file.getProject());
+
Integer attribute = ((Integer) marker.getAttribute(IMarker.CHAR_START));
if (attribute == null)
@@ -516,78 +599,15 @@
if (JAVA_EXTENSION.equals(file.getFileExtension())) {
ICompilationUnit compilationUnit = EclipseUtil.getCompilationUnit(file);
- return findResolutions(compilationUnit, messageId, start, extensions);
+ return findJavaResolutions(compilationUnit, messageId, start, extensions, false);
}else if (XML_EXTENSION.equals(file.getFileExtension())){
- FileEditorInput input = new FileEditorInput(file);
- IDocumentProvider provider = DocumentProviderRegistry.getDefault().getDocumentProvider(input);
- try {
- provider.connect(input);
- } catch (CoreException e) {
- CDIUIPlugin.getDefault().logError(e);
- }
-
- IDocument document = provider.getDocument(input);
-
- String text="";
- try {
- text = document.get(start, end-start);
- } catch (BadLocationException e) {
- CDIUIPlugin.getDefault().logError(e);
- } finally {
- provider.disconnect(input);
- }
-
- boolean correctTypeName = JavaConventionsUtil.validatePackageName(text, javaProject).isOK();
-
- if(messageId == CDIValidationErrorManager.UNKNOWN_ALTERNATIVE_BEAN_CLASS_NAME_ID){
- IJavaElement element = findJavaElementByQualifiedName(javaProject, text);
- if(element == null && correctTypeName){
- return new IMarkerResolution[] {
- new CreateCDIElementMarkerResolution(file.getProject(), text, CreateCDIElementMarkerResolution.CREATE_BEAN_CLASS)
- };
- }
- }else if(messageId == CDIValidationErrorManager.UNKNOWN_ALTERNATIVE_ANNOTATION_NAME_ID){
- IJavaElement element = findJavaElementByQualifiedName(javaProject, text);
- if(element == null && correctTypeName){
- return new IMarkerResolution[] {
- new CreateCDIElementMarkerResolution(file.getProject(), text, CreateCDIElementMarkerResolution.CREATE_STEREOTYPE)
- };
- }
- }else if(messageId == CDIValidationErrorManager.ILLEGAL_ALTERNATIVE_BEAN_CLASS_ID){
- IJavaElement element = getTypeToAddAlternativeToBean(javaProject, text);
- if(element != null){
- return new IMarkerResolution[] {
- new AddAnnotationMarkerResolution(element, CDIConstants.ALTERNATIVE_ANNOTATION_TYPE_NAME)
- };
- }
- }else if(messageId == CDIValidationErrorManager.ILLEGAL_ALTERNATIVE_ANNOTATION_ID){
- IJavaElement element = getTypeToAddAlternativeToStereotype(javaProject, text);
- if(element != null){
- return new IMarkerResolution[] {
- new AddAnnotationMarkerResolution(element, CDIConstants.ALTERNATIVE_ANNOTATION_TYPE_NAME)
- };
- }
- }else if(messageId == CDIValidationErrorManager.UNKNOWN_DECORATOR_BEAN_CLASS_NAME_ID){
- IJavaElement element = findJavaElementByQualifiedName(javaProject, text);
- if(element == null && correctTypeName){
- return new IMarkerResolution[] {
- new CreateCDIElementMarkerResolution(file.getProject(), text, CreateCDIElementMarkerResolution.CREATE_DECORATOR)
- };
- }
- }else if(messageId == CDIValidationErrorManager.UNKNOWN_INTERCEPTOR_CLASS_NAME_ID){
- IJavaElement element = findJavaElementByQualifiedName(javaProject, text);
- if(element == null && correctTypeName){
- return new IMarkerResolution[] {
- new CreateCDIElementMarkerResolution(file.getProject(), text, CreateCDIElementMarkerResolution.CREATE_INTERCEPTOR)
- };
- }
- }
+ return findXMLResolutions(file, messageId, start, end, false);
}
return new IMarkerResolution[] {};
}
- private List<IMarkerResolution> getAddNameResolutions(ICompilationUnit compilationUnit, int start) throws JavaModelException{
+ private List<IMarkerResolution> getAddNameResolutions(ICompilationUnit compilationUnit, int start, boolean asYouType) throws JavaModelException{
List<IMarkerResolution> resolutions = new ArrayList<IMarkerResolution>();
ILocalVariable parameter = findParameter(compilationUnit, start);
if(parameter != null){
@@ -597,7 +617,7 @@
if(cdiNature == null)
return resolutions;
- ICDIProject cdiProject = cdiNature.getDelegate();
+ ICDIProject cdiProject = CDIUtil.getCDIProject((IFile)compilationUnit.getUnderlyingResource(), cdiNature, asYouType);
if(cdiProject == null){
return resolutions;
@@ -628,7 +648,7 @@
return resolutions;
}
- private IType getTypeToAddAlternativeToBean(IJavaProject javaProject, String qualifiedName){
+ private IType getTypeToAddAlternativeToBean(IJavaProject javaProject, String qualifiedName, boolean asYouType) throws JavaModelException{
IType type = null;
try {
type = javaProject.findType(qualifiedName);
@@ -639,7 +659,7 @@
if(type != null){
CDICoreNature cdiNature = CDIUtil.getCDINatureWithProgress(javaProject.getProject());
if(cdiNature != null){
- ICDIProject cdiProject = cdiNature.getDelegate();
+ ICDIProject cdiProject = CDIUtil.getCDIProject((IFile)type.getUnderlyingResource(), cdiNature, asYouType);
if(cdiProject != null){
IClassBean classBean = cdiProject.getBeanClass(type);
@@ -652,7 +672,7 @@
return null;
}
- private IType getTypeToAddAlternativeToStereotype(IJavaProject javaProject, String qualifiedName){
+ private IType getTypeToAddAlternativeToStereotype(IJavaProject javaProject, String qualifiedName, boolean asYouType) throws JavaModelException{
IType type = null;
try {
type = javaProject.findType(qualifiedName);
@@ -663,7 +683,7 @@
if(type != null){
CDICoreNature cdiNature = CDIUtil.getCDINatureWithProgress(javaProject.getProject());
if(cdiNature != null){
- ICDIProject cdiProject = cdiNature.getDelegate();
+ ICDIProject cdiProject = CDIUtil.getCDIProject((IFile)type.getUnderlyingResource(), cdiNature, asYouType);
if(cdiProject != null){
IStereotype stereotype = cdiProject.getStereotype(qualifiedName);
@@ -771,7 +791,7 @@
}
- private IInjectionPoint findInjectionPoint(ICompilationUnit compilationUnit, int start) throws JavaModelException{
+ private IInjectionPoint findInjectionPoint(ICompilationUnit compilationUnit, int start, boolean asYouType) throws JavaModelException{
IJavaElement element = findJavaElement(compilationUnit, start);
if(element == null)
return null;
@@ -780,7 +800,7 @@
if(cdiNature == null)
return null;
- ICDIProject cdiProject = cdiNature.getDelegate();
+ ICDIProject cdiProject = CDIUtil.getCDIProject((IFile)compilationUnit.getUnderlyingResource(), cdiNature, asYouType);
if(cdiProject == null){
return null;
@@ -1034,14 +1054,31 @@
@Override
public IJavaCompletionProposal[] getProposals(Annotation annotation) {
if(annotation instanceof TempJavaProblemAnnotation){
- int messageId = ((TempJavaProblemAnnotation) annotation).getId() - TempJavaProblem.TEMP_PROBLEM_ID;
- ICompilationUnit compilationUnit = ((TempJavaProblemAnnotation) annotation).getCompilationUnit();
- int start = ((TempJavaProblemAnnotation) annotation).getPosition();
+ TempJavaProblemAnnotation javaAnnotation = (TempJavaProblemAnnotation) annotation;
- ICDIMarkerResolutionGeneratorExtension[] extensions = CDIQuickFixExtensionManager.getInstances();
+ int messageId = javaAnnotation.getId() - TempJavaProblem.TEMP_PROBLEM_ID;
+ ICompilationUnit compilationUnit = javaAnnotation.getCompilationUnit();
+ if(compilationUnit != null){
+ int start = javaAnnotation.getPosition();
+
+ ICDIMarkerResolutionGeneratorExtension[] extensions = CDIQuickFixExtensionManager.getInstances();
+
+ try {
+ return findJavaResolutions(compilationUnit, messageId, start, extensions, true);
+ } catch (JavaModelException e) {
+ CDIUIPlugin.getDefault().logError(e);
+ }
+ }
+ }else if(annotation instanceof TemporaryAnnotation){
+ TemporaryAnnotation tempAnnotation = (TemporaryAnnotation)annotation;
+ IFile file = getFile();
+ int messageId = getMessageID(tempAnnotation);
+ int start = tempAnnotation.getPosition().getOffset();
+ int end = start + tempAnnotation.getPosition().getLength();
+
try {
- return findResolutions(compilationUnit, messageId, start, extensions);
+ return findXMLResolutions(file, messageId, start, end, true);
} catch (JavaModelException e) {
CDIUIPlugin.getDefault().logError(e);
}
@@ -1049,4 +1086,20 @@
return null;
}
+ private static IFile getFile(){
+ IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+ if(window != null){
+ IWorkbenchPage page = window.getActivePage();
+ if(page != null){
+ IEditorPart editor = page.getActiveEditor();
+ if(editor != null){
+ IEditorInput input = editor.getEditorInput();
+ if(input instanceof IFileEditorInput){
+ return ((IFileEditorInput) input).getFile();
+ }
+ }
+ }
+ }
+ return null;
+ }
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CreateCDIElementMarkerResolution.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CreateCDIElementMarkerResolution.java 2012-07-17 18:19:12 UTC (rev 42624)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CreateCDIElementMarkerResolution.java 2012-07-17 22:09:15 UTC (rev 42625)
@@ -12,12 +12,14 @@
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IProject;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.contentassist.IContextInformation;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IMarkerResolution2;
import org.eclipse.ui.PlatformUI;
import org.jboss.tools.cdi.core.CDIImages;
import org.jboss.tools.cdi.internal.core.refactoring.CDIMarkerResolutionUtils;
@@ -28,9 +30,10 @@
import org.jboss.tools.cdi.ui.wizard.NewInterceptorCreationWizard;
import org.jboss.tools.cdi.ui.wizard.NewStereotypeCreationWizard;
import org.jboss.tools.common.model.ui.wizards.NewTypeWizardAdapter;
+import org.jboss.tools.common.quickfix.IQuickFix;
import org.jboss.tools.common.refactoring.TestableResolutionWithDialog;
-public class CreateCDIElementMarkerResolution implements IMarkerResolution2, TestableResolutionWithDialog{
+public class CreateCDIElementMarkerResolution implements IQuickFix, TestableResolutionWithDialog{
private static final String OBJECT = "java.lang.Object";
public static final int CREATE_BEAN_CLASS = 1;
@@ -65,15 +68,15 @@
@Override
public void run(IMarker marker){
- internal_run(marker, false);
+ internal_run(false);
}
@Override
public void runForTest(IMarker marker) {
- internal_run(marker, true);
+ internal_run(true);
}
- private void internal_run(IMarker marker, boolean test) {
+ private void internal_run(boolean test) {
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
NewCDIElementWizard wizard = null;
switch(id){
@@ -123,5 +126,35 @@
return CDIImages.QUICKFIX_EDIT;
}
+ @Override
+ public int getRelevance() {
+ return 100;
+ }
+ @Override
+ public void apply(IDocument document) {
+ internal_run(false);
+ }
+
+ @Override
+ public Point getSelection(IDocument document) {
+ return null;
+ }
+
+ @Override
+ public String getAdditionalProposalInfo() {
+ return getLabel();
+ }
+
+ @Override
+ public String getDisplayString() {
+ return getLabel();
+ }
+
+ @Override
+ public IContextInformation getContextInformation() {
+ return null;
+ }
+
+
}
13 years, 8 months
JBoss Tools SVN: r42624 - trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2012-07-17 14:19:12 -0400 (Tue, 17 Jul 2012)
New Revision: 42624
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/JSPPageCreationTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/XHTMLPageCreationTest.java
Log:
Fix creating of page via webProject view
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/JSPPageCreationTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/JSPPageCreationTest.java 2012-07-17 15:28:40 UTC (rev 42623)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/JSPPageCreationTest.java 2012-07-17 18:19:12 UTC (rev 42624)
@@ -49,13 +49,13 @@
SWTBotTree tree = webProjects.tree();
tree.setFocus();
-
- bot.sleep(Timing.time5S());
+ // tree of webProject view is not populated properly. Project node has to be reexpanded
+ SWTBotTreeItem projectTreeItem = tree.getTreeItem(JBT_TEST_PROJECT_NAME);
+ projectTreeItem.expand();
+ projectTreeItem.collapse();
+ projectTreeItem.expand();
- SWTBotTreeItem webContentTreeItem = tree
- .getTreeItem(JBT_TEST_PROJECT_NAME)
- .expand()
- .getNode(IDELabel.WebProjectsTree.WEB_CONTENT);
+ SWTBotTreeItem webContentTreeItem = projectTreeItem.expand().getNode(IDELabel.WebProjectsTree.WEB_CONTENT);
webContentTreeItem.select();
// create new JSP file
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/XHTMLPageCreationTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/XHTMLPageCreationTest.java 2012-07-17 15:28:40 UTC (rev 42623)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/XHTMLPageCreationTest.java 2012-07-17 18:19:12 UTC (rev 42624)
@@ -50,13 +50,13 @@
SWTBotTree tree = webProjects.tree();
tree.setFocus();
-
- bot.sleep(Timing.time5S());
+ // tree of webProject view is not populated properly. Project node has to be reexpanded
+ SWTBotTreeItem projectTreeItem = tree.getTreeItem(JBT_TEST_PROJECT_NAME);
+ projectTreeItem.expand();
+ projectTreeItem.collapse();
+ projectTreeItem.expand();
- SWTBotTreeItem webContentTreeItem = tree
- .getTreeItem(JBT_TEST_PROJECT_NAME)
- .expand()
- .getNode(IDELabel.WebProjectsTree.WEB_CONTENT);
+ SWTBotTreeItem webContentTreeItem = projectTreeItem.expand().getNode(IDELabel.WebProjectsTree.WEB_CONTENT);
webContentTreeItem.select();
// create new JSP file
13 years, 8 months
JBoss Tools SVN: r42623 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/resource/java.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2012-07-17 11:28:40 -0400 (Tue, 17 Jul 2012)
New Revision: 42623
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/resource/java/TypeDefAnnotationImpl.java
Log:
https://issues.jboss.org/browse/JBIDE-12341
Fix regression bug: ClassCastException when TypeDef is used
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/resource/java/TypeDefAnnotationImpl.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/resource/java/TypeDefAnnotationImpl.java 2012-07-17 15:25:33 UTC (rev 42622)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/resource/java/TypeDefAnnotationImpl.java 2012-07-17 15:28:40 UTC (rev 42623)
@@ -306,7 +306,7 @@
AnnotatedElement annotatedElement, int index) {
IndexedDeclarationAnnotationAdapter idaa = buildTypeDefDeclarationAnnotationAdapter(index);
IndexedAnnotationAdapter iaa = buildTypeDefAnnotationAdapter(annotatedElement, idaa);
- return new GenericGeneratorAnnotationImpl(
+ return new TypeDefAnnotationImpl(
parent,
annotatedElement,
idaa,
13 years, 8 months
JBoss Tools SVN: r42622 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2012-07-17 11:25:33 -0400 (Tue, 17 Jul 2012)
New Revision: 42622
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/VpeEditorPart.java
Log:
https://issues.jboss.org/browse/JBIDE-12290 - In eclipse 4.2 getting command/context services could return null.
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 2012-07-17 15:21:55 UTC (rev 42621)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2012-07-17 15:25:33 UTC (rev 42622)
@@ -1828,12 +1828,16 @@
}
public void refreshCommands(){
- ICommandService commandService = (ICommandService) PlatformUI
- .getWorkbench().getService(ICommandService.class);
-
- //just refresh state of commands
+ ICommandService commandService = (ICommandService)
+ editPart.getSite().getService(ICommandService.class);
for (String commandId : getVpeCategoryCommands()) {
- commandService.refreshElements(commandId, null);
+ /*
+ * https://issues.jboss.org/browse/JBIDE-12290
+ * In eclipse 4.2 commandService could be null.
+ */
+ if (commandService != null) {
+ commandService.refreshElements(commandId, null);
+ }
}
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java 2012-07-17 15:21:55 UTC (rev 42621)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java 2012-07-17 15:25:33 UTC (rev 42622)
@@ -1166,15 +1166,20 @@
}
private void deactivateServices() {
- IWorkbench workbench = PlatformUI.getWorkbench();
if (fContextActivation != null) {
- IContextService contextService = (IContextService) workbench
- .getAdapter(IContextService.class);
- contextService.deactivateContext(fContextActivation);
+ IContextService contextService = (IContextService)
+ getSite().getService(IContextService.class);
+ /*
+ * https://issues.jboss.org/browse/JBIDE-12290
+ * In eclipse 4.2 contextService could be null.
+ */
+ if (contextService != null) {
+ contextService.deactivateContext(fContextActivation);
+ }
}
- IHandlerService handlerService = (IHandlerService) workbench
- .getService(IHandlerService.class);
+ IHandlerService handlerService = (IHandlerService)
+ getSite().getService(IHandlerService.class);
if (handlerService != null) {
if (sourceActivation != null)
handlerService.deactivateHandler(sourceActivation);
13 years, 8 months