JBoss Tools SVN: r26998 - in trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test: src/org/jboss/tools/jsf/text/ext/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2010-11-29 05:58:15 -0500 (Mon, 29 Nov 2010)
New Revision: 26998
Added:
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/JSF2CompositeOpenOn/WebContent/WEB-INF/lib/jsf-tlds.jar
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/JSF2CompositeOpenOnTest.java
Log:
https://jira.jboss.org/browse/JBIDE-7703
Added: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/JSF2CompositeOpenOn/WebContent/WEB-INF/lib/jsf-tlds.jar
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/JSF2CompositeOpenOn/WebContent/WEB-INF/lib/jsf-tlds.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/JSF2CompositeOpenOnTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/JSF2CompositeOpenOnTest.java 2010-11-29 09:46:56 UTC (rev 26997)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/src/org/jboss/tools/jsf/text/ext/test/JSF2CompositeOpenOnTest.java 2010-11-29 10:58:15 UTC (rev 26998)
@@ -21,7 +21,6 @@
import org.eclipse.jface.text.hyperlink.IHyperlink;
import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.jboss.tools.common.text.ext.hyperlink.HyperlinkDetector;
@@ -39,7 +38,6 @@
PROJECT_NAME);
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().closeAllEditors(false);
JobUtils.waitForIdle();
- IWorkbench workbench = PlatformUI.getWorkbench();
}
protected void tearDown() {
@@ -51,23 +49,38 @@
}
private void testTag(String tagName, String editorName) throws PartInitException, BadLocationException {
- JSPMultiPageEditor editor = (JSPMultiPageEditor)WorkbenchUtils.openEditor(PAGE_NAME);
+ IEditorPart editor = WorkbenchUtils.openEditor(PAGE_NAME);
+ assertTrue(editor instanceof JSPMultiPageEditor);
JobUtils.waitForIdle();
- ISourceViewer viewer = editor.getSourceEditor().getTextViewer();
+ JSPMultiPageEditor jspMultyPageEditor = (JSPMultiPageEditor) editor;
+ ISourceViewer viewer = jspMultyPageEditor.getSourceEditor().getTextViewer();
IDocument document = viewer.getDocument();
IRegion reg = new FindReplaceDocumentAdapter(document).find(0,
tagName, true, true, false, false);
- IHyperlink[] links = HyperlinkDetector.getInstance().detectHyperlinks(viewer, reg, false);
- assertNotNull(links);
- assertTrue(links.length!=0);
- assertNotNull(links[0].toString());
- links[0].open();
- JobUtils.waitForIdle();
+ assertNotNull("Tag:"+tagName+" not found",reg);
- IEditorPart resultEdotor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
- assertEquals(editorName, resultEdotor.getTitle());
+ IHyperlink[] links = HyperlinkDetector.getInstance().detectHyperlinks(viewer, reg, true);
+
+ assertNotNull("Hyperlinks for tag:"+tagName+" are not found",links);
+
+ assertTrue("Hyperlinks for tag:"+tagName+" are not found",links.length!=0);
+
+ boolean found = false;
+ for(IHyperlink link : links){
+ assertNotNull(link.toString());
+
+ link.open();
+ JobUtils.waitForIdle(2000);
+
+ IEditorPart resultEdotor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ if(editorName.equals(resultEdotor.getTitle())){
+ found = true;
+ return;
+ }
+ }
+ assertTrue("OpenOn have not opened "+editorName+" editor",found);
}
public void testFormOpenOn() throws PartInitException, BadLocationException {
14 years
JBoss Tools SVN: r26997 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/criteriaeditor.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2010-11-29 04:46:56 -0500 (Mon, 29 Nov 2010)
New Revision: 26997
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/criteriaeditor/JavaCompletionProcessor.java
Log:
https://jira.jboss.org/browse/JBIDE-7749
Forgot to assign variable and it always was null. Fixed.
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/criteriaeditor/JavaCompletionProcessor.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/criteriaeditor/JavaCompletionProcessor.java 2010-11-29 09:45:10 UTC (rev 26996)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/criteriaeditor/JavaCompletionProcessor.java 2010-11-29 09:46:56 UTC (rev 26997)
@@ -94,7 +94,7 @@
IJavaCompletionProposal[] results = new IJavaCompletionProposal[0];
IJavaProject[] projects = null;
//try {
- ProjectUtils.findJavaProjects(editor.getConsoleConfiguration());
+ projects = ProjectUtils.findJavaProjects(editor.getConsoleConfiguration());
/*} catch (RuntimeException e){
String mess = NLS.bind(HibernateConsoleMessages.JavaCompletionProcessor_error_find_project,
editor.getConsoleConfiguration().getName());
14 years
JBoss Tools SVN: r26996 - branches/jbosstools-3.2.0.Beta2/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/criteriaeditor.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2010-11-29 04:45:10 -0500 (Mon, 29 Nov 2010)
New Revision: 26996
Modified:
branches/jbosstools-3.2.0.Beta2/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/criteriaeditor/JavaCompletionProcessor.java
Log:
https://jira.jboss.org/browse/JBIDE-7749
Forgot to assign variable and it always was null. Fixed.
Modified: branches/jbosstools-3.2.0.Beta2/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/criteriaeditor/JavaCompletionProcessor.java
===================================================================
--- branches/jbosstools-3.2.0.Beta2/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/criteriaeditor/JavaCompletionProcessor.java 2010-11-29 09:21:44 UTC (rev 26995)
+++ branches/jbosstools-3.2.0.Beta2/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/criteriaeditor/JavaCompletionProcessor.java 2010-11-29 09:45:10 UTC (rev 26996)
@@ -94,7 +94,7 @@
IJavaCompletionProposal[] results = new IJavaCompletionProposal[0];
IJavaProject[] projects = null;
//try {
- ProjectUtils.findJavaProjects(editor.getConsoleConfiguration());
+ projects = ProjectUtils.findJavaProjects(editor.getConsoleConfiguration());
/*} catch (RuntimeException e){
String mess = NLS.bind(HibernateConsoleMessages.JavaCompletionProcessor_error_find_project,
editor.getConsoleConfiguration().getName());
14 years
JBoss Tools SVN: r26995 - trunk/tests/plugins/org.jboss.tools.ui.bot.ext/META-INF.
by jbosstools-commits@lists.jboss.org
Author: psrna
Date: 2010-11-29 04:21:44 -0500 (Mon, 29 Nov 2010)
New Revision: 26995
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/META-INF/MANIFEST.MF
Log:
* removed teiid extension dependencies
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/META-INF/MANIFEST.MF
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/META-INF/MANIFEST.MF 2010-11-29 09:16:50 UTC (rev 26994)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/META-INF/MANIFEST.MF 2010-11-29 09:21:44 UTC (rev 26995)
@@ -37,7 +37,6 @@
org.jboss.tools.ui.bot.ext.gen,
org.jboss.tools.ui.bot.ext.helper,
org.jboss.tools.ui.bot.ext.parts,
- org.jboss.tools.ui.bot.ext.teiid,
org.jboss.tools.ui.bot.ext.types,
org.jboss.tools.ui.bot.ext.view,
org.jboss.tools.ui.bot.ext.widgets,
@@ -45,8 +44,4 @@
Bundle-Vendor: JBoss by Red Hat
Bundle-ClassPath: .,
resources/drv/hsqldb.jar
-Import-Package: com.metamatrix.modeler.diagram.ui.figure,
- com.metamatrix.modeler.diagram.ui.notation.uml.figure,
- com.metamatrix.modeler.transformation.ui,
- com.metamatrix.modeler.transformation.ui.figure,
- org.eclipse.gef
+Import-Package: org.eclipse.gef
14 years
JBoss Tools SVN: r26993 - trunk/as/plugins/org.jboss.ide.eclipse.as.core.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2010-11-28 23:48:56 -0500 (Sun, 28 Nov 2010)
New Revision: 26993
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
Log:
JBIDE-7743 - esb 4.9 not supported for deploy-only server
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2010-11-28 00:48:58 UTC (rev 26992)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2010-11-29 04:48:56 UTC (rev 26993)
@@ -510,7 +510,7 @@
versions="1.0"/>
<moduleType
types="jst.jboss.esb"
- versions="4.2,4.3,4.4,4.5,4.6,4.7">
+ versions="4.2,4.3,4.4,4.5,4.6,4.7,4.9">
</moduleType>
<moduleType
types="jbt.bpel.module"
14 years
JBoss Tools SVN: r26992 - trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2010-11-27 19:48:58 -0500 (Sat, 27 Nov 2010)
New Revision: 26992
Modified:
trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet/PortletPostInstallListener.java
Log:
JBDS-1410 RichFaces don't work in portlet generated by JBDS - fixing jdk5 compile errors
Modified: trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet/PortletPostInstallListener.java
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet/PortletPostInstallListener.java 2010-11-28 00:47:29 UTC (rev 26991)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet/PortletPostInstallListener.java 2010-11-28 00:48:58 UTC (rev 26992)
@@ -450,7 +450,6 @@
private List<File> prepareEarList(File seamLib) {
File[] files = seamLib.listFiles(new FileFilter() {
- @Override
public boolean accept(File pathname) {
String name = pathname.getName();
if (name.endsWith(".jar") && name.startsWith("richfaces-api")) { //$NON-NLS-1$ //$NON-NLS-2$
14 years
JBoss Tools SVN: r26991 - workspace/snjeza/seam-examples.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2010-11-27 19:47:29 -0500 (Sat, 27 Nov 2010)
New Revision: 26991
Modified:
workspace/snjeza/seam-examples/booking22.zip
Log:
JBDS-1333 Seam Project Examples have included wrong version of jboss-seam.jar
Modified: workspace/snjeza/seam-examples/booking22.zip
===================================================================
(Binary files differ)
14 years
JBoss Tools SVN: r26990 - in trunk/portlet/plugins: org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2010-11-27 18:44:07 -0500 (Sat, 27 Nov 2010)
New Revision: 26990
Modified:
trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/IPortletConstants.java
trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/Messages.java
trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/PortletCoreActivator.java
trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet/JSFPortletFacetInstallDataModelProvider.java
trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet/JSFPortletFacetInstallDelegate.java
trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet/PortletFacetInstallDataModelProvider.java
trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet/PortletPostInstallListener.java
trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/libprov/AbstractLibraryProviderInstallOperationConfig.java
trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/libprov/JSFPortletbridgeRuntimeLibraryProviderInstallOperation.java
trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/libprov/JSFPortletbridgeRuntimeLibraryProviderInstallOperationConfig.java
trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/messages.properties
trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/IPortletUIConstants.java
trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/Messages.java
trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/libprov/AbstractPortletProviderInstallPanel.java
trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/libprov/JSFPortletServerRuntimeProviderInstallPanel.java
trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/libprov/JSFPortletbridgeRuntimeProviderInstallPanel.java
trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/messages.properties
Log:
JBDS-1410 RichFaces don't work in portlet generated by JBDS
Modified: trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/IPortletConstants.java
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/IPortletConstants.java 2010-11-27 00:06:12 UTC (rev 26989)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/IPortletConstants.java 2010-11-27 23:44:07 UTC (rev 26990)
@@ -93,6 +93,8 @@
static final String RICHFACES_RUNTIME = "RICHFACES_RUNTIME"; //$NON-NLS-1$
+ static final String IS_EPP = "IS_EPP"; //$NON-NLS-1$
+
static final String RICHFACES_LIBRARIES_SELECTED = "RICHFACES_LIBRARIES_SELECTED"; //$NON-NLS-1$
static final String RICHFACES_LIBRARIES_TYPE = "RICHFACES_LIBRARIES_TYPE"; //$NON-NLS-1$
Modified: trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/Messages.java
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/Messages.java 2010-11-27 00:06:12 UTC (rev 26989)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/Messages.java 2010-11-27 23:44:07 UTC (rev 26990)
@@ -36,6 +36,7 @@
public static String PortletPostInstallListener_Cannot_find_Portletbridge_Runtime;
public static String PortletPostInstallListener_Cannot_find_the_examples_directory;
public static String PortletPostInstallListener_Cannot_find_the_RichFacesPortlet_war_file;
+ public static String PortletPostInstallListener_Cannot_find_the_seam_lib_directory;
public static String PortletPostInstallListener_Invalid_Portletbridge_Runtime;
public static String SeamPortletConfigurationPresetFactory10_JBoss_Seam_Portlet_Project_v1_0;
public static String SeamPortletFacetInstallDelegate_Cannot_configure_web_module_for_JBoss_Seam_Portlet_Facet;
Modified: trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/PortletCoreActivator.java
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/PortletCoreActivator.java 2010-11-27 00:06:12 UTC (rev 26989)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/PortletCoreActivator.java 2010-11-27 23:44:07 UTC (rev 26990)
@@ -3,6 +3,7 @@
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileOutputStream;
+import java.io.FilenameFilter;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintWriter;
@@ -22,8 +23,10 @@
import org.eclipse.jst.j2ee.model.ModelProviderManager;
import org.eclipse.ui.dialogs.IOverwriteQuery;
import org.eclipse.wst.common.componentcore.ComponentCore;
+import org.eclipse.wst.common.project.facet.core.IFacetedProjectBase;
import org.eclipse.wst.server.core.IRuntime;
import org.eclipse.wst.server.core.ServerCore;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
import org.osgi.framework.BundleContext;
/**
@@ -31,6 +34,8 @@
*/
public class PortletCoreActivator extends Plugin {
+ public static final String PORTLETBRIDGE = "portletbridge"; //$NON-NLS-1$
+ public static final String SEAM = "seam"; //$NON-NLS-1$
// The plug-in ID
public static final String PLUGIN_ID = "org.jboss.tools.portlet.core"; //$NON-NLS-1$
public static final String RESOURCES_FOLDER = "resources"; //$NON-NLS-1$
@@ -262,4 +267,74 @@
return null;
}
+
+ public static boolean isEPP(IFacetedProjectBase facetedProject) {
+ if (facetedProject == null) {
+ return false;
+ }
+ boolean hasSeamAndPortletBridge = getEPPDir(facetedProject, PORTLETBRIDGE) != null &&
+ getEPPDir(facetedProject, PORTLETBRIDGE).isDirectory() &&
+ getEPPDir(facetedProject, SEAM) != null &&
+ getEPPDir(facetedProject, SEAM).isDirectory();
+ if (!hasSeamAndPortletBridge) {
+ return false;
+ }
+ File portletBridgeHome = getEPPDir(facetedProject, PORTLETBRIDGE);
+ String[] list = portletBridgeHome.list(new FilenameFilter() {
+
+ public boolean accept(File dir, String name) {
+ if (name.startsWith("portletbridge") && name.endsWith(".jar")) { //$NON-NLS-1$//$NON-NLS-2$
+ return true;
+ }
+ return false;
+ }
+ });
+ boolean ok = list != null && list.length >= 2;
+ if (!ok) {
+ return false;
+ }
+ File seamHome = getEPPDir(facetedProject, SEAM);
+ File seamLib = new File(seamHome, "lib"); //$NON-NLS-1$
+ list = seamLib.list(new FilenameFilter() {
+
+ public boolean accept(File dir, String name) {
+ if (name.startsWith("jsf-facelets") && name.endsWith(".jar")) { //$NON-NLS-1$//$NON-NLS-2$
+ return true;
+ }
+ return false;
+ }
+ });
+ return list != null && list.length >= 1;
+ }
+
+ public static File getEPPDir(IFacetedProjectBase facetedProject, String dir) {
+ File location = getRuntimeLocation(facetedProject);
+ if (location != null) {
+ return new File(location.getParentFile(), dir);
+ }
+ return null;
+ }
+
+ private static File getRuntimeLocation(IFacetedProjectBase facetedProject) {
+ if (facetedProject == null) {
+ return null;
+ }
+ org.eclipse.wst.common.project.facet.core.runtime.IRuntime facetRuntime = facetedProject.getPrimaryRuntime();
+ if (facetRuntime == null) {
+ return null;
+ }
+ IRuntime runtime = getRuntime(facetRuntime);
+ if (runtime == null) {
+ return null;
+ }
+ File location = runtime.getLocation().toFile();
+ if (location == null || !location.isDirectory()) {
+ return null;
+ }
+ IJBossServerRuntime jbossRuntime = (IJBossServerRuntime)runtime.loadAdapter(IJBossServerRuntime.class, new NullProgressMonitor());
+ if (jbossRuntime != null) {
+ return location;
+ }
+ return null;
+ }
}
Modified: trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet/JSFPortletFacetInstallDataModelProvider.java
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet/JSFPortletFacetInstallDataModelProvider.java 2010-11-27 00:06:12 UTC (rev 26989)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet/JSFPortletFacetInstallDataModelProvider.java 2010-11-27 23:44:07 UTC (rev 26990)
@@ -75,6 +75,9 @@
if (propertyName.equals(IPortletConstants.IMPLEMENTATION_LIBRARY)) {
return IPortletConstants.LIBRARIES_PROVIDED_BY_PORTLETBRIDGE;
}
+ if (propertyName.equals(IPortletConstants.IS_EPP)) {
+ return Boolean.FALSE;
+ }
if (propertyName.equals(IPortletConstants.USER_LIBRARY_NAME)) {
return ""; //$NON-NLS-1$
}
@@ -90,6 +93,7 @@
propertyNames.add(IPortletConstants.DEPLOY_JARS);
propertyNames.add(IPortletConstants.PORTLET_BRIDGE_RUNTIME);
propertyNames.add(IPortletConstants.IMPLEMENTATION_LIBRARY);
+ propertyNames.add(IPortletConstants.IS_EPP);
propertyNames.add(IPortletConstants.USER_LIBRARY_NAME);
propertyNames.add(IPortletConstants.RICHFACES_RUNTIME);
propertyNames.add(IPortletConstants.RICHFACES_LIBRARIES_SELECTED);
Modified: trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet/JSFPortletFacetInstallDelegate.java
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet/JSFPortletFacetInstallDelegate.java 2010-11-27 00:06:12 UTC (rev 26989)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet/JSFPortletFacetInstallDelegate.java 2010-11-27 23:44:07 UTC (rev 26990)
@@ -363,8 +363,9 @@
throws JavaModelException {
String implementationLibrary = config.getStringProperty(IPortletConstants.IMPLEMENTATION_LIBRARY);
+ boolean isEPP = config.getBooleanProperty(IPortletConstants.IS_EPP);
- if (IPortletConstants.LIBRARIES_PROVIDED_BY_PORTLETBRIDGE.equals(implementationLibrary)) {
+ if (IPortletConstants.LIBRARIES_PROVIDED_BY_PORTLETBRIDGE.equals(implementationLibrary) || isEPP) {
addLibrariesFromPortletBridgeRuntime(project,monitor,config);
} else if (IPortletConstants.LIBRARIES_PROVIDED_BY_SERVER_RUNTIME.equals(implementationLibrary)) {
addLibrariesFromServerRuntime(project,monitor,config);
Modified: trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet/PortletFacetInstallDataModelProvider.java
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet/PortletFacetInstallDataModelProvider.java 2010-11-27 00:06:12 UTC (rev 26989)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet/PortletFacetInstallDataModelProvider.java 2010-11-27 23:44:07 UTC (rev 26990)
@@ -61,6 +61,9 @@
if (propertyName.equals(IPortletConstants.ENABLE_IMPLEMENTATION_LIBRARY)) {
return Boolean.TRUE;
}
+ if (propertyName.equals(IPortletConstants.IS_EPP)) {
+ return Boolean.FALSE;
+ }
if (propertyName.equals(IPortletConstants.USER_LIBRARY_NAME)) {
return ""; //$NON-NLS-1$
}
@@ -88,6 +91,7 @@
propertyNames.add(IPortletConstants.ENABLE_IMPLEMENTATION_LIBRARY);
propertyNames.add(IPortletConstants.USER_LIBRARY_NAME);
propertyNames.add(IPortletConstants.IMPLEMENTATION_LIBRARY);
+ propertyNames.add(IPortletConstants.IS_EPP);
propertyNames.add(PORTLET_LIBRARY_PROVIDER_DELEGATE);
return propertyNames;
Modified: trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet/PortletPostInstallListener.java
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet/PortletPostInstallListener.java 2010-11-27 00:06:12 UTC (rev 26989)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/internal/project/facet/PortletPostInstallListener.java 2010-11-27 23:44:07 UTC (rev 26990)
@@ -1,9 +1,11 @@
package org.jboss.tools.portlet.core.internal.project.facet;
import java.io.File;
+import java.io.FileFilter;
import java.io.FilenameFilter;
import java.io.IOException;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Enumeration;
import java.util.List;
import java.util.Set;
@@ -63,6 +65,7 @@
};
private String portletbridgeRuntime;
private boolean richfacesCapabilities = false;
+ private boolean isEPP = false;
//private boolean richfacesSelected;
private String richfacesType;
private String richfacesRuntime;
@@ -115,6 +118,7 @@
|| PortletCoreActivator.JSFPORTLET_LIBRARY_PROVIDER.equals(providerId)) {
AbstractLibraryProviderInstallOperationConfig libraryConfig = (AbstractLibraryProviderInstallOperationConfig) libraryDelegate.getLibraryProviderOperationConfig(libraryProvider);
richfacesCapabilities = libraryConfig.isAddRichfacesCapabilities();
+ isEPP = libraryConfig.isEPP();
richfacesRuntime = libraryConfig.getRichfacesRuntime();
richfacesType = libraryConfig.getRichfacesType();
}
@@ -126,7 +130,7 @@
}
if (isJSFPortlet) {
- if (portletbridgeRuntime != null) {
+ if (portletbridgeRuntime != null || isEPP) {
addLibrariesFromPortletBridgeRuntime(facetedProject,portletbridgeRuntime);
}
else if (richfacesFromServerRuntime) {
@@ -137,7 +141,7 @@
private void addLibrariesFromServerRuntime(IFacetedProject facetedProject) {
final boolean isSeamProject = facetedProject.hasProjectFacet(seamFacet);
- final boolean addRichfacesFromRichfacesRuntime = richfacesCapabilities && IPortletConstants.LIBRARIES_PROVIDED_BY_RICHFACES.equals(richfacesType);
+ final boolean addRichfacesFromRichfacesRuntime = richfacesCapabilities && IPortletConstants.LIBRARIES_PROVIDED_BY_RICHFACES.equals(richfacesType) && !isEPP;
if (addRichfacesFromRichfacesRuntime) {
addRichfacesFromRichfacesRuntime(facetedProject);
}
@@ -374,7 +378,12 @@
}
private void addLibrariesFromPortletBridgeRuntime(IFacetedProject facetedProject, String portletbridgeRuntime) {
- File portletbridgeHome = new File(portletbridgeRuntime);
+ File portletbridgeHome;
+ if (isEPP) {
+ portletbridgeHome = PortletCoreActivator.getEPPDir(facetedProject, PortletCoreActivator.PORTLETBRIDGE);
+ } else {
+ portletbridgeHome = new File(portletbridgeRuntime);
+ }
if (!portletbridgeHome.exists()) {
PortletCoreActivator.log(null, Messages.PortletPostInstallListener_Cannot_find_Portletbridge_Runtime);
return;
@@ -383,33 +392,162 @@
PortletCoreActivator.log(null, Messages.PortletPostInstallListener_Invalid_Portletbridge_Runtime);
return;
}
- File examplesHome = new File(portletbridgeHome,"examples"); //$NON-NLS-1$
+ if (isEPP) {
+ getLibrariesFromEPP(facetedProject);
+ } else {
+ getLibrariesFromExamples(facetedProject, portletbridgeHome);
+ }
+ }
+
+ private void getLibrariesFromEPP(IFacetedProject facetedProject) {
+ File seamHome = PortletCoreActivator.getEPPDir(facetedProject,
+ PortletCoreActivator.SEAM);
+ File seamLib = new File(seamHome, "lib"); //$NON-NLS-1$
+ if (seamLib == null || !seamLib.isDirectory()) {
+ PortletCoreActivator.log(null,
+ Messages.PortletPostInstallListener_Cannot_find_the_seam_lib_directory);
+ return;
+ }
+ try {
+ boolean isSeamProject = facetedProject.hasProjectFacet(seamFacet);
+ IProject project = facetedProject.getProject();
+ List<File> filesToImport = prepareList(seamLib, facetedProject,
+ isSeamProject);
+ if (filesToImport != null) {
+ IVirtualComponent component = ComponentCore
+ .createComponent(project);
+ IVirtualFolder rootFolder = component.getRootFolder();
+ IContainer folder = rootFolder.getUnderlyingFolder();
+ IContainer webinf = folder.getFolder(new Path(
+ IPortletConstants.WEB_INF_LIB));
+ ImportOperation op = new ImportOperation(webinf.getFullPath(),
+ seamLib, FileSystemStructureProvider.INSTANCE,
+ OVERWRITE_NONE_QUERY, filesToImport);
+ op.setCreateContainerStructure(false);
+ op.run(new NullProgressMonitor());
+ }
+ IProject earProject = getEarProject(project, isSeamProject);
+ filesToImport = prepareEarList(seamLib);
+ if (earProject != null && filesToImport != null) {
+
+ IVirtualComponent component = ComponentCore.createComponent(earProject);
+ IVirtualFolder rootFolder = component.getRootFolder();
+ IContainer folder = rootFolder.getUnderlyingFolder();
+ deleteOldRichFacesApi(folder);
+
+ ImportOperation op = new ImportOperation(folder.getFullPath(), seamLib,
+ FileSystemStructureProvider.INSTANCE,
+ OVERWRITE_NONE_QUERY, filesToImport);
+ op.setCreateContainerStructure(false);
+ op.run(new NullProgressMonitor());
+ updateEARLibraries(project, isSeamProject);
+ }
+ } catch (Exception e) {
+ PortletCoreActivator.log(e);
+ }
+ }
+
+ private List<File> prepareEarList(File seamLib) {
+ File[] files = seamLib.listFiles(new FileFilter() {
+
+ @Override
+ public boolean accept(File pathname) {
+ String name = pathname.getName();
+ if (name.endsWith(".jar") && name.startsWith("richfaces-api")) { //$NON-NLS-1$ //$NON-NLS-2$
+ return true;
+
+ }
+ return false;
+ }
+ });
+ if (files == null) {
+ return null;
+ }
+ return Arrays.asList(files);
+ }
+
+ private List<File> prepareList(File directory,
+ IFacetedProject facetedProject, final boolean isSeamProject) {
+
+ final IProject earProject = getEarProject(facetedProject.getProject(),isSeamProject);
+ File[] files = directory.listFiles(new FileFilter() {
+
+ public boolean accept(File pathname) {
+ String name = pathname.getName();
+ if (name == null) {
+ return false;
+ }
+ if (!name.endsWith(".jar")) { //$NON-NLS-1$
+ return false;
+ }
+ if (name.startsWith("jsf-facelets")) { //$NON-NLS-1$
+ return true;
+ }
+ if (richfacesCapabilities) {
+ if (name.startsWith("richfaces-ui")) { //$NON-NLS-1$
+ return true;
+ }
+ if (name.startsWith("richfaces-impl")) { //$NON-NLS-1$
+ return true;
+ }
+ if (earProject == null) {
+ if (name.startsWith("richfaces-api")) { //$NON-NLS-1$
+ return true;
+ }
+ }
+ }
+ if (!isSeamProject) {
+ if (name.startsWith("commons-beanutils")) { //$NON-NLS-1$
+ return true;
+ }
+ if (name.startsWith("commons-digester")) { //$NON-NLS-1$
+ return true;
+ }
+ }
+ return false;
+ }
+ });
+ if (files == null) {
+ return null;
+ }
+ return Arrays.asList(files);
+ }
+
+ private void getLibrariesFromExamples(IFacetedProject facetedProject,
+ File portletbridgeHome) {
+ File examplesHome = new File(portletbridgeHome, "examples"); //$NON-NLS-1$
if (!examplesHome.exists() || !examplesHome.isDirectory()) {
- PortletCoreActivator.log(null, Messages.PortletPostInstallListener_Cannot_find_the_examples_directory);
+ PortletCoreActivator.log(null,
+ Messages.PortletPostInstallListener_Cannot_find_the_examples_directory);
return;
}
File richFacesPortletZip = getRichFacesExamples(examplesHome);
if (!richFacesPortletZip.exists() || !richFacesPortletZip.isFile()) {
- PortletCoreActivator.log(null, Messages.PortletPostInstallListener_Cannot_find_the_RichFacesPortlet_war_file);
+ PortletCoreActivator.log(null,
+ Messages.PortletPostInstallListener_Cannot_find_the_RichFacesPortlet_war_file);
return;
}
try {
ZipFile zipFile = new ZipFile(richFacesPortletZip);
ZipFileStructureProvider structureProvider = new ZipFileStructureProvider(
- zipFile );
- boolean isSeamProject = facetedProject.hasProjectFacet(seamFacet);
- final boolean addRichfacesFromRichfacesRuntime = richfacesCapabilities && IPortletConstants.LIBRARIES_PROVIDED_BY_RICHFACES.equals(richfacesType);
+ zipFile);
+ boolean isSeamProject = facetedProject
+ .hasProjectFacet(seamFacet);
+ final boolean addRichfacesFromRichfacesRuntime = richfacesCapabilities
+ && IPortletConstants.LIBRARIES_PROVIDED_BY_RICHFACES
+ .equals(richfacesType);
if (addRichfacesFromRichfacesRuntime) {
addRichfacesFromRichfacesRuntime(facetedProject);
}
- List<ZipEntry> list = prepareList(zipFile, facetedProject, isSeamProject, addRichfacesFromRichfacesRuntime);
-
+ List<ZipEntry> list = prepareList(zipFile, facetedProject,
+ isSeamProject, addRichfacesFromRichfacesRuntime);
+
IProject project = facetedProject.getProject();
IProject earProject = getEarProject(project, isSeamProject);
-
+
IVirtualComponent component = ComponentCore
- .createComponent(project);
-
+ .createComponent(project);
+
IVirtualFolder rootFolder = component.getRootFolder();
IContainer folder = rootFolder.getUnderlyingFolder();
IContainer webinf = folder.getFolder(new Path(
@@ -418,34 +556,33 @@
deleteOldRichfacesLibs(earProject, webinf);
}
IPath destPath = folder.getFullPath();
-
- ImportOperation op = new ImportOperation( destPath,
- structureProvider.getRoot( ), structureProvider, OVERWRITE_NONE_QUERY,
- list );
- op.run(new NullProgressMonitor() );
+
+ ImportOperation op = new ImportOperation(destPath,
+ structureProvider.getRoot(), structureProvider,
+ OVERWRITE_NONE_QUERY, list);
+ op.run(new NullProgressMonitor());
if (earProject != null) {
list = prepareEarList(zipFile);
-
- component = ComponentCore
- .createComponent(earProject);
+
+ component = ComponentCore.createComponent(earProject);
rootFolder = component.getRootFolder();
folder = rootFolder.getUnderlyingFolder();
deleteOldRichFacesApi(folder);
destPath = folder.getFullPath();
- ZipEntry root = zipFile.getEntry(IPortletConstants.WEB_INF_LIB);
+ ZipEntry root = zipFile
+ .getEntry(IPortletConstants.WEB_INF_LIB);
if (root == null) {
root = zipFile.getEntry(IPortletConstants.LIB);
}
- op = new ImportOperation( destPath,
- root, structureProvider, OVERWRITE_NONE_QUERY,
- list );
+ op = new ImportOperation(destPath, root, structureProvider,
+ OVERWRITE_NONE_QUERY, list);
op.setCreateContainerStructure(false);
- op.run(new NullProgressMonitor() );
+ op.run(new NullProgressMonitor());
updateEARLibraries(project, isSeamProject);
}
} catch (Exception e) {
PortletCoreActivator.log(e);
- }
+ }
}
private File getRichFacesExamples(File examplesHome) {
Modified: trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/libprov/AbstractLibraryProviderInstallOperationConfig.java
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/libprov/AbstractLibraryProviderInstallOperationConfig.java 2010-11-27 00:06:12 UTC (rev 26989)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/libprov/AbstractLibraryProviderInstallOperationConfig.java 2010-11-27 23:44:07 UTC (rev 26990)
@@ -23,6 +23,7 @@
private boolean addRichfacesCapabilities;
private String richfacesType;
private String richfacesRuntime;
+ private Boolean isEPP = null;
@Override
public synchronized IStatus validate() {
@@ -33,6 +34,9 @@
if (!addRichfacesCapabilities) {
return status;
}
+ if (isEPP()) {
+ return status;
+ }
if (!IPortletConstants.LIBRARIES_PROVIDED_BY_RICHFACES.equals(richfacesType)) {
return status;
}
@@ -79,6 +83,7 @@
Preferences prefs = FacetedProjectFramework.getPreferences( f );
prefs = prefs.node(IPortletConstants.PORTLET_BRIDGE_HOME);
prefs.putBoolean(IPortletConstants.RICHFACES_CAPABILITIES, addRichfacesCapabilities);
+ prefs.putBoolean(IPortletConstants.IS_EPP, isEPP());
prefs.put(IPortletConstants.RICHFACES_LIBRARIES_TYPE, richfacesType);
prefs.put(IPortletConstants.RICHFACES_RUNTIME, richfacesRuntime);
} catch (BackingStoreException e) {
@@ -100,6 +105,7 @@
@Override
public void reset() {
super.reset();
+ isEPP = null;
IProjectFacet f = getProjectFacet();
try {
Preferences prefs = FacetedProjectFramework.getPreferences( f );
@@ -138,4 +144,23 @@
notifyListeners(IPortletConstants.RICHFACES_RUNTIME, oldValue, richfacesRuntime);
updatePreferences();
}
+
+ public boolean isEPP() {
+ if (isEPP == null) {
+ IFacetedProjectBase facetedProject = getFacetedProject();
+ if (facetedProject == null) {
+ return false;
+ }
+ isEPP = PortletCoreActivator.isEPP(facetedProject);
+ IProjectFacet f = getProjectFacet();
+ try {
+ Preferences prefs = FacetedProjectFramework.getPreferences( f );
+ prefs.putBoolean(IPortletConstants.IS_EPP, isEPP());
+ } catch (BackingStoreException e) {
+ PortletCoreActivator.log(e);
+ }
+ }
+ return isEPP;
+ }
+
}
Modified: trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/libprov/JSFPortletbridgeRuntimeLibraryProviderInstallOperation.java
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/libprov/JSFPortletbridgeRuntimeLibraryProviderInstallOperation.java 2010-11-27 00:06:12 UTC (rev 26989)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/libprov/JSFPortletbridgeRuntimeLibraryProviderInstallOperation.java 2010-11-27 23:44:07 UTC (rev 26990)
@@ -36,6 +36,7 @@
String pbRuntime = portletbridgeConfig.getPortletbridgeHome();
getPortletbridgeLibraries(monitor, project, pbRuntime);
boolean addRichfacesCapabilities = portletbridgeConfig.isAddRichfacesCapabilities();
+ boolean isEPP = portletbridgeConfig.isEPP();
String richfacesType = portletbridgeConfig.getRichfacesType();
String richfacesRuntime = portletbridgeConfig.getRichfacesRuntime();
try {
@@ -43,6 +44,7 @@
prefs = prefs.node(IPortletConstants.PORTLET_BRIDGE_HOME);
prefs.put(IPortletConstants.PREFS_PORTLETBRIDGE_HOME, pbRuntime);
prefs.putBoolean(IPortletConstants.RICHFACES_CAPABILITIES, addRichfacesCapabilities);
+ prefs.putBoolean(IPortletConstants.IS_EPP, isEPP);
prefs.put(IPortletConstants.RICHFACES_LIBRARIES_TYPE, richfacesType);
prefs.put(IPortletConstants.RICHFACES_RUNTIME, richfacesRuntime);
prefs.flush();
Modified: trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/libprov/JSFPortletbridgeRuntimeLibraryProviderInstallOperationConfig.java
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/libprov/JSFPortletbridgeRuntimeLibraryProviderInstallOperationConfig.java 2010-11-27 00:06:12 UTC (rev 26989)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/libprov/JSFPortletbridgeRuntimeLibraryProviderInstallOperationConfig.java 2010-11-27 23:44:07 UTC (rev 26990)
@@ -27,6 +27,9 @@
if (!status.isOK()) {
return status;
}
+ if (isEPP()) {
+ return status;
+ }
if (portletbridgeHome == null) {
return getInvalidPortletbridgeRuntime();
}
@@ -61,6 +64,9 @@
}
public String getPortletbridgeHome() {
+ if (isEPP()) {
+ return PortletCoreActivator.getEPPDir(getFacetedProject(), PortletCoreActivator.PORTLETBRIDGE).getAbsolutePath();
+ }
return portletbridgeHome;
}
Modified: trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/messages.properties
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/messages.properties 2010-11-27 00:06:12 UTC (rev 26989)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.core/src/org/jboss/tools/portlet/core/messages.properties 2010-11-27 23:44:07 UTC (rev 26990)
@@ -25,6 +25,7 @@
PortletPostInstallListener_Cannot_find_Richfaces_Runtime=Cannot find Richfaces Runtime.
PortletPostInstallListener_Cannot_find_the_examples_directory=Cannot find the examples directory.
PortletPostInstallListener_Cannot_find_the_RichFacesPortlet_war_file=Cannot find the RichFacesPortlet.war file.
+PortletPostInstallListener_Cannot_find_the_seam_lib_directory=Cannot find the seam/lib directory within the EPP distribution.
PortletPostInstallListener_Invalid_Portletbridge_Runtime=Invalid Portletbridge Runtime.
PortletPostInstallListener_Invalid_Richfaces_Runtime=Invalid Richfaces Runtime.
SeamPortletConfigurationPresetFactory10_JBoss_Seam_Portlet_Project_v1_0=JBoss Seam Portlet Project v1.0
Modified: trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/IPortletUIConstants.java
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/IPortletUIConstants.java 2010-11-27 00:06:12 UTC (rev 26989)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/IPortletUIConstants.java 2010-11-27 23:44:07 UTC (rev 26990)
@@ -73,7 +73,7 @@
static final String ADD_JBOSS_APP_LABEL = Messages.IPortletUIConstants_Create_JBoss_Application;
static final String ADD_JBOSS_PORTLET_LABEL = Messages.IPortletUIConstants_Add_the_jboss_portlet_xml_file;
static final String COPY_JSF_TEMPLATES_LABEL = Messages.IPortletUIConstants_Copy_JSF_Templates;
- static final String CONFIGURE_GATEIN_PARAMETERS_LABEL = "Configure GateIn parameters";
+ static final String CONFIGURE_GATEIN_PARAMETERS_LABEL = Messages.IPortletUIConstants_Configure_GateIn_parameters;
}
Modified: trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/Messages.java
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/Messages.java 2010-11-27 00:06:12 UTC (rev 26989)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/Messages.java 2010-11-27 23:44:07 UTC (rev 26990)
@@ -22,6 +22,7 @@
public static String NewPortletWizard_Specify_modifiers_interfaces_to_implement_and_method_stubs_to_generate;
public static String No_portlets_exist_to_add;
public static String IPortletUIConstants_Add_the_jboss_portlet_xml_file;
+ public static String IPortletUIConstants_Configure_GateIn_parameters;
public static String IPortletUIConstants_Copy_JSF_Templates;
public static String IPortletUIConstants_Create_JBoss_Application;
public static String IPortletUIConstants_Create_JBoss_JSF_Portlet;
@@ -46,22 +47,13 @@
public static String JSFPortletFacetInstallPage_Add_Change_Richfaces_Libraries;
public static String JSFPortletFacetInstallPage_Add_JBoss_JSF_Portlet_capabilities_to_this_Web_Project;
public static String JSFPortletFacetInstallPage_Browse;
- public static String JSFPortletFacetInstallPage_Deploy_jars;
- public static String JSFPortletFacetInstallPage_Invalid_Portletbridge_Runtime_directory;
- public static String JSFPortletFacetInstallPage_Invalid_Richfaces_Runtime_directory;
public static String JSFPortletFacetInstallPage_JBoss_JSF_Portlet_Capabilities;
public static String JSFPortletFacetInstallPage_Portletbridge_Runtime;
- public static String JSFPortletFacetInstallPage_Portletbridge_Runtime_directory_is_required;
public static String JSFPortletFacetInstallPage_Richfaces_Capabilities;
- public static String JSFPortletFacetInstallPage_RichFaces_Runtime_directory_is_required;
public static String JSFPortletFacetInstallPage_Select_Portletbridge_Runtime;
public static String JSFPortletFacetInstallPage_Select_RichFaces_Runtime;
- public static String PortletFacetInstallPage_Add;
public static String PortletFacetInstallPage_Add_JBoss_Portlet_capabilities_to_this_Web_Project;
- //public static String PortletFacetInstallPage_Enable_implementation_library;
public static String PortletFacetInstallPage_JBoss_Portlet_Capabilities;
- public static String PortletFacetInstallPage_User_Library;
- //public static String PortletFacetInstallPage_You_have_to_choose_an_user_library;
public static String PortletServerRuntimeProviderInstallPanel_The_targeted_runtime_contains_a_portlet_library;
public static String PortletUIActivator_The_portlet_xml_file_doesnt_exist;
static {
Modified: trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/libprov/AbstractPortletProviderInstallPanel.java
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/libprov/AbstractPortletProviderInstallPanel.java 2010-11-27 00:06:12 UTC (rev 26989)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/libprov/AbstractPortletProviderInstallPanel.java 2010-11-27 23:44:07 UTC (rev 26990)
@@ -19,7 +19,9 @@
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
+import org.eclipse.wst.common.project.facet.core.IFacetedProjectBase;
import org.jboss.tools.portlet.core.IPortletConstants;
+import org.jboss.tools.portlet.core.PortletCoreActivator;
import org.jboss.tools.portlet.core.libprov.AbstractLibraryProviderInstallOperationConfig;
import org.jboss.tools.portlet.ui.Messages;
@@ -30,6 +32,7 @@
private Text richfacesText;
private AbstractLibraryProviderInstallOperationConfig config;
private Button richfacesButton;
+ private boolean isEPP;
@Override
public Control createControl( final Composite parent )
@@ -38,22 +41,24 @@
final GridLayout layout = new GridLayout( 1, false );
config = (AbstractLibraryProviderInstallOperationConfig) getOperationConfig();
+ isEPP = config.isEPP();
+
layout.marginWidth = 0;
layout.marginHeight = 0;
composite.setLayout( layout );
addMessage(composite);
- addPortletBridgeGroup(composite);
- addRichfacesGroup(composite);
+ addPortletBridgeGroup(composite, isEPP);
+ addRichfacesGroup(composite, isEPP);
return composite;
}
protected abstract void addMessage(Composite composite);
- protected abstract void addPortletBridgeGroup(Composite composite);
+ protected abstract void addPortletBridgeGroup(Composite composite, boolean isEPP);
protected abstract List<String> getRichfacesTypes();
- private void addRichfacesGroup(Composite composite) {
+ private void addRichfacesGroup(Composite composite, boolean isEPP) {
Group richfacesGroup = new Group(composite, SWT.NONE);
richfacesGroup.setLayout(new GridLayout(2, false));
richfacesGroup.setText(Messages.JSFPortletFacetInstallPage_Richfaces_Capabilities);
@@ -70,6 +75,9 @@
}
});
+ if (isEPP) {
+ return;
+ }
richFacesLibraryCombo = new Combo(richfacesGroup, SWT.READ_ONLY);
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan=2;
@@ -93,6 +101,11 @@
enableRichfacesLibraries();
richFacesLibraryCombo.select(0);
config.setRichfacesType(richFacesLibraryCombo.getText());
+ if (isEPP) {
+ richFacesLibraryCombo.setEnabled(false);
+ richfacesButton.setEnabled(false);
+ richfacesText.setEnabled(false);
+ }
}
private void configureRichfacesCombo() {
@@ -145,6 +158,9 @@
}
private void enableRichfacesLibraries() {
+ if (isEPP) {
+ return;
+ }
boolean enabled = addRichFacesLibraries.getSelection();
richFacesLibraryCombo.setEnabled(enabled);
if (enabled) {
@@ -161,5 +177,4 @@
return Display.getCurrent().getActiveShell();
}
-
}
Modified: trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/libprov/JSFPortletServerRuntimeProviderInstallPanel.java
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/libprov/JSFPortletServerRuntimeProviderInstallPanel.java 2010-11-27 00:06:12 UTC (rev 26989)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/libprov/JSFPortletServerRuntimeProviderInstallPanel.java 2010-11-27 23:44:07 UTC (rev 26990)
@@ -22,7 +22,7 @@
}
@Override
- protected void addPortletBridgeGroup(Composite composite) {
+ protected void addPortletBridgeGroup(Composite composite, boolean isEPP) {
}
@Override
Modified: trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/libprov/JSFPortletbridgeRuntimeProviderInstallPanel.java
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/libprov/JSFPortletbridgeRuntimeProviderInstallPanel.java 2010-11-27 00:06:12 UTC (rev 26989)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/libprov/JSFPortletbridgeRuntimeProviderInstallPanel.java 2010-11-27 23:44:07 UTC (rev 26990)
@@ -20,6 +20,7 @@
import org.eclipse.swt.widgets.Text;
import org.eclipse.wst.common.project.facet.core.IFacetedProjectBase;
import org.jboss.tools.portlet.core.IPortletConstants;
+import org.jboss.tools.portlet.core.PortletCoreActivator;
import org.jboss.tools.portlet.core.libprov.JSFPortletbridgeRuntimeLibraryProviderInstallOperationConfig;
import org.jboss.tools.portlet.ui.Messages;
import org.jboss.tools.portlet.ui.PortletUIActivator;
@@ -41,7 +42,12 @@
}
@Override
- protected void addPortletBridgeGroup(Composite composite) {
+ protected void addPortletBridgeGroup(Composite composite, boolean isEPP) {
+ final JSFPortletbridgeRuntimeLibraryProviderInstallOperationConfig config = (JSFPortletbridgeRuntimeLibraryProviderInstallOperationConfig) getOperationConfig();
+
+ if (config.isEPP()) {
+ return;
+ }
GridData gd;
Group portletBridgeGroup = new Group(composite, SWT.NONE);
portletBridgeGroup.setText(Messages.JSFPortletFacetInstallPage_Portletbridge_Runtime);
@@ -52,43 +58,47 @@
final Text folderText = new Text(portletBridgeGroup, SWT.SINGLE | SWT.BORDER);
folderText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- final JSFPortletbridgeRuntimeLibraryProviderInstallOperationConfig config = (JSFPortletbridgeRuntimeLibraryProviderInstallOperationConfig) getOperationConfig();
-
- folderText.addModifyListener(new ModifyListener() {
+ if (config.isEPP()) {
+ String portletBridgeHome = PortletCoreActivator.getEPPDir(config.getFacetedProject(), PortletCoreActivator.PORTLETBRIDGE).getAbsolutePath();
+ folderText.setText(portletBridgeHome);
+ folderText.setEnabled(false);
+ } else {
+ folderText.setEnabled(true);
+ folderText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- config.setPortletbridgeHome(folderText.getText());
+ public void modifyText(ModifyEvent e) {
+ config.setPortletbridgeHome(folderText.getText());
+ IDialogSettings section = getPortletBridgeSection();
+ section.put(IPortletConstants.PORTLET_BRIDGE_HOME, folderText.getText());
+ }
+ });
+ String portletbridgeRuntime = config.getPortletbridgeHome();
+ if (portletbridgeRuntime == null) {
IDialogSettings section = getPortletBridgeSection();
- section.put(IPortletConstants.PORTLET_BRIDGE_HOME, folderText.getText());
+ portletbridgeRuntime = section.get(IPortletConstants.PORTLET_BRIDGE_HOME);
+ if (portletbridgeRuntime == null){
+ portletbridgeRuntime = ""; //$NON-NLS-1$
+ }
+ config.setPortletbridgeHome(portletbridgeRuntime);
}
- });
- String portletbridgeRuntime = config.getPortletbridgeHome();
- if (portletbridgeRuntime == null) {
- IDialogSettings section = getPortletBridgeSection();
- portletbridgeRuntime = section.get(IPortletConstants.PORTLET_BRIDGE_HOME);
- if (portletbridgeRuntime == null){
- portletbridgeRuntime = ""; //$NON-NLS-1$
- }
- config.setPortletbridgeHome(portletbridgeRuntime);
- }
- if (portletbridgeRuntime == null || portletbridgeRuntime.length() == 0 ) {
- IFacetedProjectBase facetedProject = config.getFacetedProject();
- IPath configPath = PortletUIActivator.getJBossConfigPath(facetedProject);
- if (configPath != null) {
- IPath portalPath = configPath.append(IPortletConstants.SERVER_DEFAULT_DEPLOY_GATEIN);
- File portalFile = portalPath.toFile();
- if (portalFile != null && portalFile.exists()) {
- IPath eppHome = configPath.removeLastSegments(3);
- IPath pbPath = eppHome.append("portletbridge"); //$NON-NLS-1$
- File pbFile = pbPath.toFile();
- if (pbFile != null && pbFile.exists()) {
- portletbridgeRuntime = pbFile.getAbsolutePath();
+ if (portletbridgeRuntime == null || portletbridgeRuntime.length() == 0 ) {
+ IFacetedProjectBase facetedProject = config.getFacetedProject();
+ IPath configPath = PortletUIActivator.getJBossConfigPath(facetedProject);
+ if (configPath != null) {
+ IPath portalPath = configPath.append(IPortletConstants.SERVER_DEFAULT_DEPLOY_GATEIN);
+ File portalFile = portalPath.toFile();
+ if (portalFile != null && portalFile.exists()) {
+ IPath eppHome = configPath.removeLastSegments(3);
+ IPath pbPath = eppHome.append("portletbridge"); //$NON-NLS-1$
+ File pbFile = pbPath.toFile();
+ if (pbFile != null && pbFile.exists()) {
+ portletbridgeRuntime = pbFile.getAbsolutePath();
+ }
}
}
}
+ folderText.setText(portletbridgeRuntime);
}
- folderText.setText(portletbridgeRuntime);
-
Button folderButton = new Button(portletBridgeGroup, SWT.PUSH);
folderButton.setText(Messages.JSFPortletFacetInstallPage_Browse);
folderButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
@@ -98,6 +108,8 @@
}
});
+ folderButton.setEnabled(!isEPP);
+
}
private IDialogSettings getPortletBridgeSection() {
Modified: trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/messages.properties
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/messages.properties 2010-11-27 00:06:12 UTC (rev 26989)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/messages.properties 2010-11-27 23:44:07 UTC (rev 26990)
@@ -3,6 +3,7 @@
AddPortletWizardPage_Portlet_Modes=Portlet Modes
AddPortletWizardPage_View=View
IPortletUIConstants_Add_the_jboss_portlet_xml_file=Add the jboss-portlet.xml file
+IPortletUIConstants_Configure_GateIn_parameters=Configure GateIn parameters
IPortletUIConstants_Copy_JSF_Templates=Copy JSF Templates
IPortletUIConstants_Create_JBoss_Application=Create JBoss Application
IPortletUIConstants_Create_JBoss_JSF_Portlet=Create JBoss JSF Portlet
@@ -27,22 +28,13 @@
JSFPortletFacetInstallPage_Add_Change_Richfaces_Libraries=Add/Change Richfaces Libraries
JSFPortletFacetInstallPage_Add_JBoss_JSF_Portlet_capabilities_to_this_Web_Project=Add JBoss JSF Portlet capabilities to this Web Project
JSFPortletFacetInstallPage_Browse=Browse...
-JSFPortletFacetInstallPage_Deploy_jars=Deploy jars to WEB-INF/lib
-JSFPortletFacetInstallPage_Invalid_Portletbridge_Runtime_directory=Invalid Portletbridge Runtime directory.
-JSFPortletFacetInstallPage_Invalid_Richfaces_Runtime_directory=Invalid Richfaces Runtime directory.
JSFPortletFacetInstallPage_JBoss_JSF_Portlet_Capabilities=JBoss JSF Portlet Capabilities
JSFPortletFacetInstallPage_Portletbridge_Runtime=Portletbridge Runtime
-JSFPortletFacetInstallPage_Portletbridge_Runtime_directory_is_required=Portletbridge Runtime directory is required.
JSFPortletFacetInstallPage_Richfaces_Capabilities=Richfaces Capabilities
-JSFPortletFacetInstallPage_RichFaces_Runtime_directory_is_required=RichFaces Runtime directory is required.
JSFPortletFacetInstallPage_Select_Portletbridge_Runtime=Select Portletbridge Runtime
JSFPortletFacetInstallPage_Select_RichFaces_Runtime=Select RichFaces Runtime
-PortletFacetInstallPage_Add=Add...
PortletFacetInstallPage_Add_JBoss_Portlet_capabilities_to_this_Web_Project=Add JBoss Portlet capabilities to this Web Project
-#PortletFacetInstallPage_Enable_implementation_library=Enable implementation library
PortletFacetInstallPage_JBoss_Portlet_Capabilities=JBoss Portlet Capabilities
-PortletFacetInstallPage_User_Library=User Library
-#PortletFacetInstallPage_You_have_to_choose_an_user_library=You have to choose an user library
PortletUIActivator_The_portlet_xml_file_doesnt_exist=The portlet.xml file doesn't exist
NewJSFPortletClassWizardPage_Choose_a_JSF_portlet_class=Choose a JSF portlet class:
NewJSFPortletClassWizardPage_Choose_a_Seam_portlet_class=Choose a Seam portlet class:
14 years
JBoss Tools SVN: r26989 - in branches/jbosstools-3.2.0.Beta2/common/plugins: org.jboss.tools.common.resref.ui and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-11-26 19:06:12 -0500 (Fri, 26 Nov 2010)
New Revision: 26989
Modified:
branches/jbosstools-3.2.0.Beta2/common/plugins/org.jboss.tools.common.model.ui.capabilities/build.properties
branches/jbosstools-3.2.0.Beta2/common/plugins/org.jboss.tools.common.resref.ui/build.properties
Log:
https://jira.jboss.org/browse/JBDS-1367 Missing Plugins Info
build.properjties adjusted to include about.htm in build for plugins:
org.jboss.tools.common.model.ui.capabilities
org.jboss.tools.common.resref.ui
Modified: branches/jbosstools-3.2.0.Beta2/common/plugins/org.jboss.tools.common.model.ui.capabilities/build.properties
===================================================================
--- branches/jbosstools-3.2.0.Beta2/common/plugins/org.jboss.tools.common.model.ui.capabilities/build.properties 2010-11-27 00:04:15 UTC (rev 26988)
+++ branches/jbosstools-3.2.0.Beta2/common/plugins/org.jboss.tools.common.model.ui.capabilities/build.properties 2010-11-27 00:06:12 UTC (rev 26989)
@@ -3,4 +3,5 @@
bin.includes = META-INF/,\
.,\
plugin.xml,\
- plugin.properties
+ plugin.properties,\
+ about.html
Modified: branches/jbosstools-3.2.0.Beta2/common/plugins/org.jboss.tools.common.resref.ui/build.properties
===================================================================
--- branches/jbosstools-3.2.0.Beta2/common/plugins/org.jboss.tools.common.resref.ui/build.properties 2010-11-27 00:04:15 UTC (rev 26988)
+++ branches/jbosstools-3.2.0.Beta2/common/plugins/org.jboss.tools.common.resref.ui/build.properties 2010-11-27 00:06:12 UTC (rev 26989)
@@ -2,4 +2,5 @@
output.. = bin/
bin.includes = META-INF/,\
.,\
- plugin.properties
+ plugin.properties,\
+ about.html
14 years