JBoss Tools SVN: r30819 - in branches/jbosstools-3.2.x/maven/plugins: org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/configurators and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-04-25 14:59:58 -0400 (Mon, 25 Apr 2011)
New Revision: 30819
Modified:
branches/jbosstools-3.2.x/maven/plugins/org.jboss.tools.maven.hibernate/src/org/jboss/tools/maven/hibernate/configurators/HibernateProjectConfigurator.java
branches/jbosstools-3.2.x/maven/plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/configurators/JSFProjectConfigurator.java
branches/jbosstools-3.2.x/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/Activator.java
branches/jbosstools-3.2.x/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/Messages.java
branches/jbosstools-3.2.x/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/messages.properties
branches/jbosstools-3.2.x/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/preferences/ConfiguratorPreferencePage.java
branches/jbosstools-3.2.x/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/preferences/ConfiguratorPreferencesInitializer.java
Log:
JBIDE-8687 JSF tooling adds an Faces Servlet declaration with no servlet mappings on project import
Modified: branches/jbosstools-3.2.x/maven/plugins/org.jboss.tools.maven.hibernate/src/org/jboss/tools/maven/hibernate/configurators/HibernateProjectConfigurator.java
===================================================================
--- branches/jbosstools-3.2.x/maven/plugins/org.jboss.tools.maven.hibernate/src/org/jboss/tools/maven/hibernate/configurators/HibernateProjectConfigurator.java 2011-04-25 17:56:57 UTC (rev 30818)
+++ branches/jbosstools-3.2.x/maven/plugins/org.jboss.tools.maven.hibernate/src/org/jboss/tools/maven/hibernate/configurators/HibernateProjectConfigurator.java 2011-04-25 18:59:58 UTC (rev 30819)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 JBoss by Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
package org.jboss.tools.maven.hibernate.configurators;
import java.util.ArrayList;
@@ -12,6 +22,7 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.preferences.IScopeContext;
+import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jface.preference.IPreferenceStore;
import org.hibernate.eclipse.console.properties.HibernatePropertiesConstants;
import org.hibernate.eclipse.console.utils.ProjectUtils;
@@ -22,6 +33,11 @@
import org.maven.ide.eclipse.project.configurator.ProjectConfigurationRequest;
import org.osgi.service.prefs.Preferences;
+/**
+ *
+ * @author snjeza
+ *
+ */
public class HibernateProjectConfigurator extends AbstractProjectConfigurator {
private static final String HIBERNATE_GROUP_ID = "org.hibernate"; //$NON-NLS-1$
@@ -43,7 +59,7 @@
return;
}
- if (isHibernateProject(mavenProject)) {
+ if (project.hasNature(JavaCore.NATURE_ID) && isHibernateProject(mavenProject)) {
IScopeContext scope = new ProjectScope(project);
Preferences node = scope.getNode(HibernatePropertiesConstants.HIBERNATE_CONSOLE_NODE);
if (node != null) {
Modified: branches/jbosstools-3.2.x/maven/plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/configurators/JSFProjectConfigurator.java
===================================================================
--- branches/jbosstools-3.2.x/maven/plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/configurators/JSFProjectConfigurator.java 2011-04-25 17:56:57 UTC (rev 30818)
+++ branches/jbosstools-3.2.x/maven/plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/configurators/JSFProjectConfigurator.java 2011-04-25 18:59:58 UTC (rev 30819)
@@ -1,9 +1,27 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 JBoss by Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
package org.jboss.tools.maven.jsf.configurators;
+import java.io.File;
+import java.io.IOException;
+
+import org.apache.maven.model.Plugin;
import org.apache.maven.project.MavenProject;
+import org.codehaus.plexus.util.xml.Xpp3Dom;
+import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Path;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.wst.common.componentcore.ModuleCoreNature;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
@@ -11,35 +29,47 @@
import org.eclipse.wst.common.project.facet.core.IProjectFacet;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
+import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
import org.jboss.tools.maven.core.IJBossMavenConstants;
import org.jboss.tools.maven.core.internal.project.facet.MavenFacetInstallDataModelProvider;
import org.jboss.tools.maven.jsf.MavenJSFActivator;
+import org.jboss.tools.maven.jsf.Messages;
import org.jboss.tools.maven.ui.Activator;
-import org.jboss.tools.maven.jsf.Messages;
import org.maven.ide.eclipse.project.IMavenProjectFacade;
import org.maven.ide.eclipse.project.MavenProjectChangedEvent;
import org.maven.ide.eclipse.project.configurator.AbstractProjectConfigurator;
import org.maven.ide.eclipse.project.configurator.ProjectConfigurationRequest;
+import org.maven.ide.eclipse.wtp.WTPProjectsUtil;
+/**
+ *
+ * @author snjeza
+ *
+ */
public class JSFProjectConfigurator extends AbstractProjectConfigurator {
private static final String JSF_API_GROUP_ID = "javax.faces"; //$NON-NLS-1$
private static final String JSF_API2_GROUP_ID = "com.sun.faces"; //$NON-NLS-1$
private static final String JSF_API_ARTIFACT_ID = "jsf-api"; //$NON-NLS-1$
-
+
+ private static final String WEB_XML = "WEB-INF/web.xml";
+ private static final String WAR_SOURCE_FOLDER = "/src/main/webapp";
+
protected static final IProjectFacet dynamicWebFacet;
protected static final IProjectFacetVersion dynamicWebVersion;
-
+
protected static final IProjectFacet jsfFacet;
protected static final IProjectFacetVersion jsfVersion20;
protected static final IProjectFacetVersion jsfVersion12;
protected static final IProjectFacetVersion jsfVersion11;
protected static final IProjectFacet m2Facet;
protected static final IProjectFacetVersion m2Version;
-
+
static {
dynamicWebFacet = ProjectFacetsManager.getProjectFacet("jst.web"); //$NON-NLS-1$
- dynamicWebVersion = dynamicWebFacet.getVersion("2.5"); //$NON-NLS-1$
+ dynamicWebVersion = dynamicWebFacet.getVersion("2.5"); //$NON-NLS-1$
jsfFacet = ProjectFacetsManager.getProjectFacet("jst.jsf"); //$NON-NLS-1$
jsfVersion20 = jsfFacet.getVersion("2.0"); //$NON-NLS-1$
jsfVersion12 = jsfFacet.getVersion("1.2"); //$NON-NLS-1$
@@ -47,97 +77,225 @@
m2Facet = ProjectFacetsManager.getProjectFacet("jboss.m2"); //$NON-NLS-1$
m2Version = m2Facet.getVersion("1.0"); //$NON-NLS-1$
}
-
+
@Override
public void configure(ProjectConfigurationRequest request,
IProgressMonitor monitor) throws CoreException {
MavenProject mavenProject = request.getMavenProject();
IProject project = request.getProject();
- configureInternal(mavenProject,project, monitor);
+ configureInternal(mavenProject, project, monitor);
}
-
- private void configureInternal(MavenProject mavenProject,IProject project,
+
+ private void configureInternal(MavenProject mavenProject, IProject project,
IProgressMonitor monitor) throws CoreException {
IPreferenceStore store = Activator.getDefault().getPreferenceStore();
boolean configureJSF = store.getBoolean(Activator.CONFIGURE_JSF);
if (!configureJSF) {
return;
}
-
+
String packaging = mavenProject.getPackaging();
- String jsfVersion = getJSFVersion(mavenProject);
- if (jsfVersion != null) {
- final IFacetedProject fproj = ProjectFacetsManager.create(project);
- if (fproj != null && "war".equals(packaging)) { //$NON-NLS-1$
- installWarFacets(fproj, jsfVersion, monitor);
- }
- }
+ String jsfVersion = getJSFVersion(mavenProject);
+ if (jsfVersion != null) {
+ final IFacetedProject fproj = ProjectFacetsManager.create(project);
+ if (fproj != null && "war".equals(packaging)) { //$NON-NLS-1$
+ installWarFacets(fproj, jsfVersion, mavenProject, monitor);
+ }
+ }
}
-
@Override
public void mavenProjectChanged(MavenProjectChangedEvent event,
IProgressMonitor monitor) throws CoreException {
IMavenProjectFacade facade = event.getMavenProject();
- if(facade != null) {
- IProject project = facade.getProject();
- if(isWTPProject(project)) {
- MavenProject mavenProject = facade.getMavenProject(monitor);
- configureInternal(mavenProject, project, monitor);
- }
- }
+ if (facade != null) {
+ IProject project = facade.getProject();
+ if (isWTPProject(project)) {
+ MavenProject mavenProject = facade.getMavenProject(monitor);
+ configureInternal(mavenProject, project, monitor);
+ }
+ }
super.mavenProjectChanged(event, monitor);
}
private boolean isWTPProject(IProject project) {
- return ModuleCoreNature.getModuleCoreNature(project) != null;
- }
-
- private void installM2Facet(IFacetedProject fproj, IProgressMonitor monitor) throws CoreException {
+ return ModuleCoreNature.getModuleCoreNature(project) != null;
+ }
+
+ private void installM2Facet(IFacetedProject fproj, IProgressMonitor monitor)
+ throws CoreException {
if (!fproj.hasProjectFacet(m2Facet)) {
- IDataModel config = (IDataModel) new MavenFacetInstallDataModelProvider().create();
- config.setBooleanProperty(IJBossMavenConstants.MAVEN_PROJECT_EXISTS, true);
+ IDataModel config = (IDataModel) new MavenFacetInstallDataModelProvider()
+ .create();
+ config.setBooleanProperty(
+ IJBossMavenConstants.MAVEN_PROJECT_EXISTS, true);
fproj.installProjectFacet(m2Version, config, monitor);
}
}
-
- private void installWarFacets(IFacetedProject fproj, String jsfVersion,IProgressMonitor monitor) throws CoreException {
-
+ private void installWarFacets(IFacetedProject fproj, String jsfVersion,
+ MavenProject mavenProject, IProgressMonitor monitor)
+ throws CoreException {
+
if (!fproj.hasProjectFacet(dynamicWebFacet)) {
- Activator.log(Messages.JSFProjectConfigurator_The_project_does_not_contain_the_Web_Module_facet);
+ Activator
+ .log(Messages.JSFProjectConfigurator_The_project_does_not_contain_the_Web_Module_facet);
}
- installJSFFacet(fproj, jsfVersion, monitor);
+ installJSFFacet(fproj, jsfVersion, mavenProject, monitor);
installM2Facet(fproj, monitor);
-
+
}
-
- private void installJSFFacet(IFacetedProject fproj, String jsfVersionString, IProgressMonitor monitor)
- throws CoreException {
+ private void installJSFFacet(IFacetedProject fproj,
+ String jsfVersionString, MavenProject mavenProject,
+ IProgressMonitor monitor) throws CoreException {
if (!fproj.hasProjectFacet(jsfFacet)) {
if (jsfVersionString.startsWith("1.1")) { //$NON-NLS-1$
- IDataModel model = MavenJSFActivator.getDefault().createJSFDataModel(fproj,jsfVersion11);
- fproj.installProjectFacet(jsfVersion11, model, monitor);
+ IDataModel model = MavenJSFActivator.getDefault()
+ .createJSFDataModel(fproj, jsfVersion11);
+ fproj.installProjectFacet(jsfVersion11, model, monitor);
}
if (jsfVersionString.startsWith("1.2")) { //$NON-NLS-1$
- IDataModel model = MavenJSFActivator.getDefault().createJSFDataModel(fproj,jsfVersion12);
- fproj.installProjectFacet(jsfVersion12, model, monitor);
+ IDataModel model = MavenJSFActivator.getDefault()
+ .createJSFDataModel(fproj, jsfVersion12);
+ fproj.installProjectFacet(jsfVersion12, model, monitor);
}
if (jsfVersionString.startsWith("2.0")) { //$NON-NLS-1$
- IDataModel model = MavenJSFActivator.getDefault().createJSFDataModel(fproj,jsfVersion20);
- fproj.installProjectFacet(jsfVersion20, model, monitor);
+ String webXmlString = null;
+ IFile webXml = null;
+ webXml = getWebXml(fproj, mavenProject);
+ boolean webXmlExists = webXml != null && webXml.exists();
+ if (!configureWebxml() && webXmlExists) {
+ IStructuredModel webXmlModel = null;
+ try {
+ webXmlModel = StructuredModelManager.getModelManager().getModelForRead(webXml);
+ IStructuredDocument doc = webXmlModel.getStructuredDocument();
+ webXmlString = doc.get();
+ } catch (IOException e) {
+ MavenJSFActivator.log(e);
+ } finally {
+ if (webXmlModel != null) {
+ webXmlModel.releaseFromRead();
+ }
+ }
+ }
+ IDataModel model = MavenJSFActivator.getDefault()
+ .createJSFDataModel(fproj, jsfVersion20);
+ fproj.installProjectFacet(jsfVersion20, model, monitor);
+ if (!configureWebxml() && webXmlExists && webXmlString != null) {
+ IStructuredModel webXmlModel = null;
+ try {
+ webXmlModel = StructuredModelManager.getModelManager().getModelForEdit(webXml);
+ IStructuredDocument doc = webXmlModel.getStructuredDocument();
+ doc.set(webXmlString);
+ webXmlModel.save();
+ } catch (IOException e) {
+ MavenJSFActivator.log(e);
+ } finally {
+ if (webXmlModel != null) {
+ webXmlModel.releaseFromEdit();
+ }
+ }
+ }
}
}
}
+
+ private IFile getWebXml(IFacetedProject fproj, MavenProject mavenProject) {
+ IFile webXml;
+ String customWebXml = getCustomWebXml(mavenProject,
+ fproj.getProject());
+ if (customWebXml == null) {
+ webXml = fproj.getProject().getFolder(getWarSourceDirectory(mavenProject,fproj.getProject())).getFile(WEB_XML);
+ } else {
+ webXml = fproj.getProject().getFile(customWebXml);
+ }
+ return webXml;
+ }
+
+ private String getWarSourceDirectory(MavenProject mavenProject,
+ IProject project) {
+ Plugin plugin = mavenProject
+ .getPlugin("org.apache.maven.plugins:maven-war-plugin");
+ if (plugin == null) {
+ return null;
+ }
+ Xpp3Dom config = (Xpp3Dom) plugin.getConfiguration();
+ if (config == null) {
+ return WAR_SOURCE_FOLDER;
+ }
+ Xpp3Dom[] warSourceDirectory = config.getChildren("warSourceDirectory");
+ if (warSourceDirectory != null && warSourceDirectory.length > 0) {
+ String dir = warSourceDirectory[0].getValue();
+ if (project != null) {
+ return tryProjectRelativePath(project, dir).toOSString();
+ }
+ return dir;
+ }
+ return WAR_SOURCE_FOLDER;
+ }
+
+ private IPath tryProjectRelativePath(IProject project,
+ String resourceLocation) {
+ if (resourceLocation == null) {
+ return null;
+ }
+ IPath projectLocation = project.getLocation();
+ IPath directory = Path.fromOSString(resourceLocation);
+ if (projectLocation == null || !projectLocation.isPrefixOf(directory)) {
+ return directory;
+ }
+ return directory.removeFirstSegments(projectLocation.segmentCount())
+ .makeRelative().setDevice(null);
+ }
+
+ public String getCustomWebXml(MavenProject mavenProject, IProject project) {
+ Plugin plugin = mavenProject
+ .getPlugin("org.apache.maven.plugins:maven-war-plugin");
+ if (plugin == null) {
+ return null;
+ }
+ Xpp3Dom config = (Xpp3Dom) plugin.getConfiguration();
+ if (config != null) {
+ Xpp3Dom webXmlDom = config.getChild("webXml");
+ if (webXmlDom != null && webXmlDom.getValue() != null) {
+ String webXmlFile = webXmlDom.getValue().trim();
+ webXmlFile = getRelativePath(project, webXmlFile);
+ return webXmlFile;
+ }
+ }
+ return null;
+ }
+
+ private static String getRelativePath(IProject project, String absolutePath) {
+ File basedir = project.getLocation().toFile();
+ String relative;
+ if (absolutePath.equals(basedir.getAbsolutePath())) {
+ relative = ".";
+ } else if (absolutePath.startsWith(basedir.getAbsolutePath())) {
+ relative = absolutePath.substring(basedir.getAbsolutePath()
+ .length() + 1);
+ } else {
+ relative = absolutePath;
+ }
+ return relative.replace('\\', '/'); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ private boolean configureWebxml() {
+ IPreferenceStore store = Activator.getDefault().getPreferenceStore();
+ return store.getBoolean(Activator.CONFIGURE_WEBXML_JSF20);
+ }
+
private String getJSFVersion(MavenProject mavenProject) {
String version = null;
- version = Activator.getDefault().getDependencyVersion(mavenProject, JSF_API_GROUP_ID, JSF_API_ARTIFACT_ID);
+ version = Activator.getDefault().getDependencyVersion(mavenProject,
+ JSF_API_GROUP_ID, JSF_API_ARTIFACT_ID);
if (version == null) {
- version = Activator.getDefault().getDependencyVersion(mavenProject, JSF_API2_GROUP_ID, JSF_API_ARTIFACT_ID);
+ version = Activator.getDefault().getDependencyVersion(mavenProject,
+ JSF_API2_GROUP_ID, JSF_API_ARTIFACT_ID);
}
- return version;
+ return version;
}
}
Modified: branches/jbosstools-3.2.x/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/Activator.java
===================================================================
--- branches/jbosstools-3.2.x/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/Activator.java 2011-04-25 17:56:57 UTC (rev 30818)
+++ branches/jbosstools-3.2.x/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/Activator.java 2011-04-25 18:59:58 UTC (rev 30819)
@@ -44,6 +44,10 @@
public static final boolean CONFIGURE_JSF_VALUE = true;
+ public static final String CONFIGURE_WEBXML_JSF20 = "configureWebxmlJSF20"; //$NON-NLS-1$
+
+ public static final boolean CONFIGURE_WEBXML_JSF20_VALUE = false;
+
public static final boolean CONFIGURE_PORTLET_VALUE = true;
public static final String CONFIGURE_JSFPORTLET = "configureJSFPortlet"; //$NON-NLS-1$
Modified: branches/jbosstools-3.2.x/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/Messages.java
===================================================================
--- branches/jbosstools-3.2.x/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/Messages.java 2011-04-25 17:56:57 UTC (rev 30818)
+++ branches/jbosstools-3.2.x/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/Messages.java 2011-04-25 18:59:58 UTC (rev 30819)
@@ -4,6 +4,7 @@
public class Messages extends NLS {
private static final String BUNDLE_NAME = "org.jboss.tools.maven.ui.messages"; //$NON-NLS-1$
+ public static String ConfiguratorPreferencePage_Configure_Webxml_JSF20;
public static String AutoResizeTableLayout_Unknown_column_layout_data;
public static String MavenFacetInstallPage_Add_M2_capabilities_to_this_Web_Project;
public static String MavenFacetInstallPage_Artifact_Id;
Modified: branches/jbosstools-3.2.x/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/messages.properties
===================================================================
--- branches/jbosstools-3.2.x/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/messages.properties 2011-04-25 17:56:57 UTC (rev 30818)
+++ branches/jbosstools-3.2.x/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/messages.properties 2011-04-25 18:59:58 UTC (rev 30819)
@@ -26,6 +26,7 @@
ConfiguratorPreferencePage_Configure_JBoss_Portlet_Core_facet=JBoss Portlet Core facet
ConfiguratorPreferencePage_Configure_JBoss_Seam_Portlet_facet=JBoss Seam Portlet facet
ConfiguratorPreferencePage_Configure_JSF_facet=JSF facet
+ConfiguratorPreferencePage_Configure_Webxml_JSF20=web.xml for JSF 2.0 facet
ConfiguratorPreferencePage_Configure_CDI_facet=CDI facet
ConfiguratorPreferencePage_Configure_Hibernate=Hibernate
ConfiguratorPreferencePage_Configure_Seam_Artifacts=Seam Artifacts (view folder, model source folder, package ...)
Modified: branches/jbosstools-3.2.x/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/preferences/ConfiguratorPreferencePage.java
===================================================================
--- branches/jbosstools-3.2.x/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/preferences/ConfiguratorPreferencePage.java 2011-04-25 17:56:57 UTC (rev 30818)
+++ branches/jbosstools-3.2.x/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/preferences/ConfiguratorPreferencePage.java 2011-04-25 18:59:58 UTC (rev 30819)
@@ -31,6 +31,7 @@
private Button configureSeamRuntimeButton;
private Button configureSeamArtifactsButton;
private Button configureJSFButton;
+ private Button configureWebxmlJSF20Button;
private Button configurePortletButton;
private Button configureJSFPortletButton;
private Button configureSeamPortletButton;
@@ -83,6 +84,11 @@
configureJSFButton.setText(Messages.ConfiguratorPreferencePage_Configure_JSF_facet);
boolean configureJSF = store.getBoolean(Activator.CONFIGURE_JSF);
configureJSFButton.setSelection(configureJSF);
+
+ configureWebxmlJSF20Button = new Button(composite,SWT.CHECK);
+ configureWebxmlJSF20Button.setText(Messages.ConfiguratorPreferencePage_Configure_Webxml_JSF20);
+ boolean configureWebxml = store.getBoolean(Activator.CONFIGURE_WEBXML_JSF20);
+ configureWebxmlJSF20Button.setSelection(configureWebxml);
}
if (bundleExists(ORG_JBOSS_TOOLS_MAVEN_PORTLET)) {
@@ -132,6 +138,7 @@
protected void performDefaults() {
if (bundleExists(ORG_JBOSS_TOOLS_MAVEN_JSF)) {
configureJSFButton.setSelection(Activator.CONFIGURE_JSF_VALUE);
+ configureWebxmlJSF20Button.setSelection(Activator.CONFIGURE_WEBXML_JSF20_VALUE);
}
if (bundleExists(ORG_JBOSS_TOOLS_MAVEN_SEAM)) {
configureSeamButton.setSelection(Activator.CONFIGURE_SEAM_VALUE);
@@ -189,6 +196,7 @@
IPreferenceStore store = Activator.getDefault().getPreferenceStore();
if (bundleExists(ORG_JBOSS_TOOLS_MAVEN_JSF)) {
store.setValue(Activator.CONFIGURE_JSF, configureJSFButton.getSelection());
+ store.setValue(Activator.CONFIGURE_WEBXML_JSF20, configureWebxmlJSF20Button.getSelection());
}
if (bundleExists(ORG_JBOSS_TOOLS_MAVEN_PORTLET)) {
Modified: branches/jbosstools-3.2.x/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/preferences/ConfiguratorPreferencesInitializer.java
===================================================================
--- branches/jbosstools-3.2.x/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/preferences/ConfiguratorPreferencesInitializer.java 2011-04-25 17:56:57 UTC (rev 30818)
+++ branches/jbosstools-3.2.x/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/preferences/ConfiguratorPreferencesInitializer.java 2011-04-25 18:59:58 UTC (rev 30819)
@@ -26,6 +26,9 @@
Activator.CONFIGURE_JSF,
Activator.CONFIGURE_JSF_VALUE);
node.putBoolean(
+ Activator.CONFIGURE_WEBXML_JSF20,
+ Activator.CONFIGURE_WEBXML_JSF20_VALUE);
+ node.putBoolean(
Activator.CONFIGURE_PORTLET,
Activator.CONFIGURE_PORTLET_VALUE);
node.putBoolean(
14 years, 11 months
Newsletter Mon, 25 Apr 2011 15:58:53 -0300
by jbosstools-commits@lists.jboss.org
Hi!!
Do you want a pleasant future, go up in money, and the recognition of all?
Special offer:
We can assist with Diplomas from prestigious universities based on your present knowledge and work experience.
Get a Degree in 4 weeks with our program!
~Our program will help ALL with professional experience
gain a 100% verified Degree:
~Doctorate
~Bachelors
~Masters
- Just think about it...
- Just follow YOUR Dreams!
- Live a wonderful life by earning or upgrading your degree.
This is a good chance to make a right move and receive your due
benefits... if you are qualified but are lacking that piece of paper. Get one from us in a short time.
If you want to get better - you must Call us NOW to start improving your life!
~CALL~
1-301-396-3506
You should leave us a message with your phone number with country code if outside USA and name and we will call you as soon as possible.
It is your move...
Make the right decision.
Best regards.
Do Not Reply to this Email.
We do not reply to text inquiries, and our server will reject all response traffic.
We apologize for any inconvenience this may have caused you.
14 years, 11 months
JBoss Tools SVN: r30818 - in trunk/cdi: plugins/org.jboss.tools.cdi.seam.text.ext.test/src/org/jboss/tools/cdi/seam/text/ext/test and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2011-04-25 13:56:57 -0400 (Mon, 25 Apr 2011)
New Revision: 30818
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck/WebContent/WEB-INF/lib/seam-solder-test.jar
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/openon/ResourceLoader.java
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext.test/META-INF/MANIFEST.MF
trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext.test/src/org/jboss/tools/cdi/seam/text/ext/test/CDISeamResourceLoadingHyperlinkDetectorTest.java
Log:
https://issues.jboss.org/browse/JBIDE-8202
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext.test/META-INF/MANIFEST.MF 2011-04-25 17:42:30 UTC (rev 30817)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext.test/META-INF/MANIFEST.MF 2011-04-25 17:56:57 UTC (rev 30818)
@@ -17,7 +17,8 @@
org.eclipse.wst.xml.ui,
org.eclipse.jface,
org.jboss.tools.cdi.text.ext.test,
- org.jboss.tools.cdi.seam.text.ext
+ org.jboss.tools.cdi.seam.text.ext,
+ org.jboss.tools.common
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %Bundle-Vendor.0
Export-Package: org.jboss.tools.cdi.seam.text.ext.test
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext.test/src/org/jboss/tools/cdi/seam/text/ext/test/CDISeamResourceLoadingHyperlinkDetectorTest.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext.test/src/org/jboss/tools/cdi/seam/text/ext/test/CDISeamResourceLoadingHyperlinkDetectorTest.java 2011-04-25 17:42:30 UTC (rev 30817)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext.test/src/org/jboss/tools/cdi/seam/text/ext/test/CDISeamResourceLoadingHyperlinkDetectorTest.java 2011-04-25 17:56:57 UTC (rev 30818)
@@ -2,21 +2,29 @@
import java.util.ArrayList;
+import org.eclipse.core.resources.IFile;
import org.eclipse.jface.text.Region;
import org.jboss.tools.cdi.seam.text.ext.hyperlink.CDISeamResourceLoadingHyperlinkDetector;
import org.jboss.tools.cdi.text.ext.test.HyperlinkDetectorTest;
+import org.jboss.tools.common.util.FileUtil;
public class CDISeamResourceLoadingHyperlinkDetectorTest extends HyperlinkDetectorTest{
+ private static final String FILENAME = "JavaSource/org/jboss/jsr299/tck/tests/jbt/openon/ResourceLoader.java";
public void testCDISeamResourceLoadingHyperlinkDetector() throws Exception {
+ IFile file = tckProject.getFile(FILENAME);
+ String text = FileUtil.readStream(file);
+
+
ArrayList<Region> regionList = new ArrayList<Region>();
- regionList.add(new Region(115, 6));
- regionList.add(new Region(133, 6));
- regionList.add(new Region(140, 6));
- regionList.add(new Region(196, 6));
- regionList.add(new Region(250, 6));
- checkRegions("JavaSource/org/jboss/jsr299/tck/tests/jbt/openon/ResourceLoader.java", regionList, new CDISeamResourceLoadingHyperlinkDetector());
+ int injectPosition = text.indexOf("@Inject");
+ System.out.println("injectPosition - "+injectPosition);
+ if(injectPosition > 0){
+ regionList.add(new Region(injectPosition, 58));
+ }
+
+ checkRegions(FILENAME, regionList, new CDISeamResourceLoadingHyperlinkDetector());
}
}
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck/WebContent/WEB-INF/lib/seam-solder-test.jar
===================================================================
(Binary files differ)
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/projects/tck/WebContent/WEB-INF/lib/seam-solder-test.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/openon/ResourceLoader.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/openon/ResourceLoader.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/openon/ResourceLoader.java 2011-04-25 17:56:57 UTC (rev 30818)
@@ -0,0 +1,30 @@
+package org.jboss.jsr299.tck.tests.jbt.openon;
+
+import java.net.URL;
+
+import javax.inject.Inject;
+
+import org.jboss.seam.solder.resourceLoader.Resource;
+
+public class ResourceLoader
+{
+ @Inject
+ @Resource("WEB-INF/beans.xml")
+ URL beansXml;
+
+ private String foo;
+
+ public ResourceLoader(String foo)
+ {
+ this.foo = foo;
+ }
+
+ /**
+ * @return the foo
+ */
+ public String getFoo()
+ {
+ return foo;
+ }
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/openon/ResourceLoader.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
14 years, 11 months
JBoss Tools SVN: r30816 - trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: bbrodt
Date: 2011-04-25 13:41:32 -0400 (Mon, 25 Apr 2011)
New Revision: 30816
Modified:
trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/wizards/NewFileWizardPage2.java
Log:
https://issues.jboss.org/browse/JBIDE-8591
Should be able to create a BPEL Process File in any project but display warning message in New File wizard if not a BPEL Project
Modified: trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/wizards/NewFileWizardPage2.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/wizards/NewFileWizardPage2.java 2011-04-25 17:40:24 UTC (rev 30815)
+++ trunk/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/wizards/NewFileWizardPage2.java 2011-04-25 17:41:32 UTC (rev 30816)
@@ -86,16 +86,16 @@
if (resource instanceof IContainer) {
IContainer container = (IContainer)resource;
// https://issues.jboss.org/browse/JBIDE-8591
+ setMessage(null);
if (!ModuleCoreNature.isFlexibleProject(resource.getProject())) {
setMessage(Messages.NewFileWizard_Not_A_Faceted_Project, WizardPage.WARNING);
- return false;
+// return false;
}
if ( container.findMember(processName +".bpel") != null ) { //$NON-NLS-1$
setMessage(Messages.NewFileWizardPage1_12, WizardPage.ERROR);
return false;
}
- setMessage(null);
return true;
}
return false;
@@ -125,8 +125,8 @@
if (container==null)
return false;
- if (!ModuleCoreNature.isFlexibleProject(container.getProject()))
- return false;
+// if (!ModuleCoreNature.isFlexibleProject(container.getProject()))
+// return false;
if ( container.findMember(processName +".bpel") != null ) //$NON-NLS-1$
return false;
14 years, 11 months
JBoss Tools SVN: r30814 - in trunk/cdi: plugins/org.jboss.tools.cdi.seam.text.ext/META-INF and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-04-25 13:21:34 -0400 (Mon, 25 Apr 2011)
New Revision: 30814
Added:
trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext.test/pom.xml
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext.test/META-INF/MANIFEST.MF
trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/META-INF/MANIFEST.MF
trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/pom.xml
trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/pom.xml
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/pom.xml
Log:
https://issues.jboss.org/browse/JBIDE-8572 https://issues.jboss.org/browse/JBIDE-8705
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/META-INF/MANIFEST.MF 2011-04-25 15:13:43 UTC (rev 30813)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/META-INF/MANIFEST.MF 2011-04-25 17:21:34 UTC (rev 30814)
@@ -14,5 +14,5 @@
org.eclipse.jdt.ui;bundle-version="3.5.0",
org.jboss.tools.cdi.ui;bundle-version="1.2.0",
org.jboss.tools.jst.web;bundle-version="3.2.0"
-Bundle-Version: 1.2.0.qualifier
+Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/pom.xml
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/pom.xml 2011-04-25 15:13:43 UTC (rev 30813)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/pom.xml 2011-04-25 17:21:34 UTC (rev 30814)
@@ -8,6 +8,6 @@
</parent>
<groupId>org.jboss.tools.cdi.plugins</groupId>
<artifactId>org.jboss.tools.cdi.seam.text.ext</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
\ No newline at end of file
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext.test/META-INF/MANIFEST.MF 2011-04-25 15:13:43 UTC (rev 30813)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext.test/META-INF/MANIFEST.MF 2011-04-25 17:21:34 UTC (rev 30814)
@@ -2,22 +2,22 @@
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name.0
Bundle-SymbolicName: org.jboss.tools.cdi.seam.text.ext.test
-Bundle-Version: 1.2.0.qualifier
-Require-Bundle: org.junit;bundle-version="3.8.2",
- org.eclipse.core.resources;bundle-version="3.5.0",
- org.eclipse.jface.text;bundle-version="3.5.0",
- org.eclipse.ui.ide;bundle-version="3.5.0",
- org.jboss.tools.common.text.ext;bundle-version="2.0.0",
- org.eclipse.core.runtime;bundle-version="3.5.0",
- org.jboss.tools.cdi.text.ext;bundle-version="1.0.0",
- org.eclipse.jdt.ui;bundle-version="3.5.0",
- org.eclipse.core.commands;bundle-version="3.5.0",
- org.jboss.tools.cdi.core.test;bundle-version="1.0.0",
- org.eclipse.jdt.core;bundle-version="3.5.0",
+Bundle-Version: 1.0.0.qualifier
+Require-Bundle: org.junit,
+ org.eclipse.core.resources,
+ org.eclipse.jface.text,
+ org.eclipse.ui.ide,
+ org.jboss.tools.common.text.ext,
+ org.eclipse.core.runtime,
+ org.jboss.tools.cdi.text.ext,
+ org.eclipse.jdt.ui,
+ org.eclipse.core.commands,
+ org.jboss.tools.cdi.core.test,
+ org.eclipse.jdt.core,
org.eclipse.wst.xml.ui,
- org.eclipse.jface;bundle-version="3.6.0",
- org.jboss.tools.cdi.text.ext.test;bundle-version="1.2.0",
- org.jboss.tools.cdi.seam.text.ext;bundle-version="1.2.0"
+ org.eclipse.jface,
+ org.jboss.tools.cdi.text.ext.test,
+ org.jboss.tools.cdi.seam.text.ext
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %Bundle-Vendor.0
Export-Package: org.jboss.tools.cdi.seam.text.ext.test
Added: trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext.test/pom.xml
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext.test/pom.xml (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext.test/pom.xml 2011-04-25 17:21:34 UTC (rev 30814)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>org.jboss.tools.parent.pom</artifactId>
+ <version>0.0.2-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools.cdi.tests</groupId>
+ <artifactId>org.jboss.tools.cdi.seam.text.ext.test</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.sonatype.tycho</groupId>
+ <artifactId>maven-osgi-test-plugin</artifactId>
+ <configuration>
+ <explodedBundles>
+ <bundle>org.jboss.tools.cdi.core.test</bundle>
+ </explodedBundles>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.sonatype.tycho</groupId>
+ <artifactId>maven-osgi-test-plugin</artifactId>
+ <configuration>
+ <explodedBundles>
+ <bundle>org.jboss.tools.cdi.seam.text.ext.test</bundle>
+ </explodedBundles>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext.test/pom.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/pom.xml
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/pom.xml 2011-04-25 15:13:43 UTC (rev 30813)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/pom.xml 2011-04-25 17:21:34 UTC (rev 30814)
@@ -10,18 +10,4 @@
<artifactId>org.jboss.tools.cdi.seam.faces.core.test</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.sonatype.tycho</groupId>
- <artifactId>maven-osgi-test-plugin</artifactId>
- <configuration>
- <explodedBundles>
- <bundle>org.jboss.tools.cdi.seam.faces.core.test</bundle>
- </explodedBundles>
- </configuration>
- </plugin>
- </plugins>
- </build>
</project>
\ No newline at end of file
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/pom.xml
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/pom.xml 2011-04-25 15:13:43 UTC (rev 30813)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/pom.xml 2011-04-25 17:21:34 UTC (rev 30814)
@@ -23,6 +23,15 @@
<artifactId>maven-osgi-test-plugin</artifactId>
<configuration>
<explodedBundles>
+ <bundle>org.jboss.tools.cdi.core.test</bundle>
+ </explodedBundles>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.sonatype.tycho</groupId>
+ <artifactId>maven-osgi-test-plugin</artifactId>
+ <configuration>
+ <explodedBundles>
<bundle>org.jboss.tools.cdi.seam.solder.core.test</bundle>
</explodedBundles>
</configuration>
14 years, 11 months
JBoss Tools SVN: r30813 - in trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples: fixes and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-04-25 11:13:43 -0400 (Mon, 25 Apr 2011)
New Revision: 30813
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/dialog/FixDialog.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/PluginFix.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/ProjectExamplesFix.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/SeamRuntimeFix.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/WTPRuntimeFix.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectFix.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/SiteCategory.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/ProjectExamplesPreferencePage.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/ProjectExamplesPreferencesInitializer.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/SiteDialog.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/Sites.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/SiteFilter.java
Log:
JBIDE-8399 Improve US States SOAP Service Project Example
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/dialog/FixDialog.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/dialog/FixDialog.java 2011-04-25 15:12:36 UTC (rev 30812)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/dialog/FixDialog.java 2011-04-25 15:13:43 UTC (rev 30813)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 JBoss by Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
package org.jboss.tools.project.examples.dialog;
import java.util.ArrayList;
@@ -34,6 +44,11 @@
import org.jboss.tools.project.examples.model.ProjectFix;
import org.jboss.tools.project.examples.wizard.NewProjectExamplesWizardPage;
+/**
+ *
+ * @author snjeza
+ *
+ */
public class FixDialog extends Dialog {
private static final int FIX_BUTTON = 1;
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/PluginFix.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/PluginFix.java 2011-04-25 15:12:36 UTC (rev 30812)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/PluginFix.java 2011-04-25 15:13:43 UTC (rev 30813)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 JBoss by Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
package org.jboss.tools.project.examples.fixes;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -9,6 +19,11 @@
import org.jboss.tools.project.examples.model.ProjectFix;
import org.osgi.framework.Bundle;
+/**
+ *
+ * @author snjeza
+ *
+ */
public class PluginFix implements ProjectExamplesFix {
public boolean canFix(Project project, ProjectFix fix) {
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/ProjectExamplesFix.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/ProjectExamplesFix.java 2011-04-25 15:12:36 UTC (rev 30812)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/ProjectExamplesFix.java 2011-04-25 15:13:43 UTC (rev 30813)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 JBoss by Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
package org.jboss.tools.project.examples.fixes;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -4,6 +14,11 @@
import org.jboss.tools.project.examples.model.Project;
import org.jboss.tools.project.examples.model.ProjectFix;
+/**
+ *
+ * @author snjeza
+ *
+ */
public interface ProjectExamplesFix {
boolean canFix(Project project, ProjectFix fix);
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/SeamRuntimeFix.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/SeamRuntimeFix.java 2011-04-25 15:12:36 UTC (rev 30812)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/SeamRuntimeFix.java 2011-04-25 15:13:43 UTC (rev 30813)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 JBoss by Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
package org.jboss.tools.project.examples.fixes;
import java.util.StringTokenizer;
@@ -16,6 +26,11 @@
import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
import org.osgi.service.prefs.BackingStoreException;
+/**
+ *
+ * @author snjeza
+ *
+ */
public class SeamRuntimeFix implements ProjectExamplesFix {
public boolean canFix(Project project, ProjectFix fix) {
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/WTPRuntimeFix.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/WTPRuntimeFix.java 2011-04-25 15:12:36 UTC (rev 30812)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/WTPRuntimeFix.java 2011-04-25 15:13:43 UTC (rev 30813)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 JBoss by Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
package org.jboss.tools.project.examples.fixes;
import java.io.File;
@@ -28,16 +38,24 @@
import org.eclipse.wst.server.core.ServerCore;
import org.jboss.ide.eclipse.as.core.server.IJBossServerConstants;
import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
+import org.jboss.ide.eclipse.as.core.util.IJBossRuntimeResourceConstants;
import org.jboss.tools.portlet.core.internal.PortletRuntimeComponentProvider;
import org.jboss.tools.project.examples.Messages;
import org.jboss.tools.project.examples.ProjectExamplesActivator;
import org.jboss.tools.project.examples.model.Project;
import org.jboss.tools.project.examples.model.ProjectFix;
+/**
+ *
+ * @author snjeza
+ *
+ */
public class WTPRuntimeFix implements ProjectExamplesFix {
+ private static final String TEIID_DEPLOYER = "teiid.deployer"; //$NON-NLS-1$
private static final String RIFTSAW_SAR = "riftsaw.sar"; //$NON-NLS-1$
private static final String BPEL = "bpel"; //$NON-NLS-1$
+ private static final String TEIID = "teiid"; //$NON-NLS-1$
private static final String JBOSSESB_SAR = "jbossesb.sar"; //$NON-NLS-1$
private static final String JBOSSESB_ESB = "jbossesb.esb"; //$NON-NLS-1$
private static final String ESB = "esb"; //$NON-NLS-1$
@@ -66,6 +84,9 @@
IProject eclipseProject = eclipseProjects[i];
try {
IFacetedProject facetedProject = ProjectFacetsManager.create(eclipseProject);
+ if (facetedProject == null) {
+ continue;
+ }
org.eclipse.wst.common.project.facet.core.runtime.IRuntime wtpRuntime = facetedProject.getPrimaryRuntime();
if (wtpRuntime != null) {
IRuntime runtime = getRuntime(wtpRuntime);
@@ -212,6 +233,11 @@
return null;
}
}
+ if (TEIID.equals(component)) {
+ if (!isTeiidPresent(location, runtime)) {
+ return null;
+ }
+ }
return runtime;
}
return null;
@@ -248,6 +274,20 @@
}
return false;
}
+
+ public static boolean isTeiidPresent(final File location,
+ IRuntime runtime) {
+ IJBossServerRuntime jbossRuntime = (IJBossServerRuntime)runtime.loadAdapter(IJBossServerRuntime.class, new NullProgressMonitor());
+ if (jbossRuntime != null) {
+ IPath jbossLocation = runtime.getLocation();
+ IPath configPath = jbossLocation.append(IJBossServerConstants.SERVER).append(jbossRuntime.getJBossConfiguration());
+ IPath deployersPath = configPath.append(IJBossRuntimeResourceConstants.DEPLOYERS);
+ File deployersFile = deployersPath.toFile();
+ File teiidFile = new File(deployersFile, TEIID_DEPLOYER);
+ return teiidFile.exists();
+ }
+ return false;
+ }
private static boolean exists(final File location,String esbDir) {
if (Platform.getOS().equals(Platform.OS_WIN32)) {
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectFix.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectFix.java 2011-04-25 15:12:36 UTC (rev 30812)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectFix.java 2011-04-25 15:13:43 UTC (rev 30813)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 JBoss by Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
package org.jboss.tools.project.examples.model;
import java.util.HashMap;
@@ -3,12 +13,7 @@
import java.util.Map;
-import org.eclipse.equinox.internal.p2.ui.sdk.ProvSDKUIActivator;
-import org.eclipse.equinox.p2.core.ProvisionException;
import org.eclipse.equinox.internal.p2.ui.IProvHelpContextIds;
-import org.eclipse.equinox.internal.p2.ui.ProvUIActivator;
-import org.eclipse.equinox.internal.p2.ui.QueryableMetadataRepositoryManager;
import org.eclipse.equinox.internal.p2.ui.dialogs.InstallWizard;
import org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningWizardDialog;
-import org.eclipse.equinox.p2.ui.Policy;
import org.eclipse.equinox.p2.ui.ProvisioningUI;
import org.eclipse.jface.preference.PreferenceDialog;
@@ -18,8 +23,12 @@
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.dialogs.PreferencesUtil;
import org.jboss.tools.project.examples.Messages;
-import org.jboss.tools.project.examples.ProjectExamplesActivator;
+/**
+ *
+ * @author snjeza
+ *
+ */
public class ProjectFix {
public final static String WTP_RUNTIME = "wtpruntime"; //$NON-NLS-1$
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/SiteCategory.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/SiteCategory.java 2011-04-25 15:12:36 UTC (rev 30812)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/SiteCategory.java 2011-04-25 15:13:43 UTC (rev 30813)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 JBoss by Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
package org.jboss.tools.project.examples.model;
import java.util.Set;
@@ -2,2 +12,7 @@
+/**
+ *
+ * @author snjeza
+ *
+ */
public class SiteCategory implements IProjectExampleSite {
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/ProjectExamplesPreferencePage.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/ProjectExamplesPreferencePage.java 2011-04-25 15:12:36 UTC (rev 30812)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/ProjectExamplesPreferencePage.java 2011-04-25 15:13:43 UTC (rev 30813)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 JBoss by Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
package org.jboss.tools.project.examples.preferences;
import java.net.URL;
@@ -32,6 +42,11 @@
import org.jboss.tools.project.examples.model.ProjectUtil;
import org.jboss.tools.project.examples.model.SiteCategory;
+/**
+ *
+ * @author snjeza
+ *
+ */
public class ProjectExamplesPreferencePage extends PreferencePage implements
IWorkbenchPreferencePage {
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/ProjectExamplesPreferencesInitializer.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/ProjectExamplesPreferencesInitializer.java 2011-04-25 15:12:36 UTC (rev 30812)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/ProjectExamplesPreferencesInitializer.java 2011-04-25 15:13:43 UTC (rev 30813)
@@ -1,11 +1,26 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 JBoss by Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
+
package org.jboss.tools.project.examples.preferences;
-
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
import org.eclipse.core.runtime.preferences.DefaultScope;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.jboss.tools.project.examples.ProjectExamplesActivator;
+/**
+ *
+ * @author snjeza
+ *
+ */
public class ProjectExamplesPreferencesInitializer extends
AbstractPreferenceInitializer {
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/SiteDialog.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/SiteDialog.java 2011-04-25 15:12:36 UTC (rev 30812)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/SiteDialog.java 2011-04-25 15:13:43 UTC (rev 30813)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 JBoss by Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
package org.jboss.tools.project.examples.preferences;
import java.io.File;
@@ -27,6 +37,11 @@
import org.jboss.tools.project.examples.ProjectExamplesActivator;
import org.jboss.tools.project.examples.model.ProjectExampleSite;
+/**
+ *
+ * @author snjeza
+ *
+ */
public class SiteDialog extends TitleAreaDialog {
private static final String ADD_PROJECT_EXAMPLE_SITE = Messages.SiteDialog_Add_Project_Example_Site;
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/Sites.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/Sites.java 2011-04-25 15:12:36 UTC (rev 30812)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/Sites.java 2011-04-25 15:13:43 UTC (rev 30813)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 JBoss by Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
package org.jboss.tools.project.examples.preferences;
import java.util.HashSet;
@@ -8,6 +18,11 @@
import org.jboss.tools.project.examples.model.ProjectUtil;
import org.jboss.tools.project.examples.model.SiteCategory;
+/**
+ *
+ * @author snjeza
+ *
+ */
public class Sites {
private SiteCategory[] siteCategories;
private SiteCategory userSite;
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/SiteFilter.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/SiteFilter.java 2011-04-25 15:12:36 UTC (rev 30812)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/SiteFilter.java 2011-04-25 15:13:43 UTC (rev 30813)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 JBoss by Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
package org.jboss.tools.project.examples.wizard;
import java.util.List;
@@ -9,6 +19,11 @@
import org.jboss.tools.project.examples.model.Project;
import org.jboss.tools.project.examples.model.ProjectModelElement;
+/**
+ *
+ * @author snjeza
+ *
+ */
public class SiteFilter extends ViewerFilter {
private String site;
14 years, 11 months
JBoss Tools SVN: r30812 - in branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples: fixes and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-04-25 11:12:36 -0400 (Mon, 25 Apr 2011)
New Revision: 30812
Modified:
branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/dialog/FixDialog.java
branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/PluginFix.java
branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/ProjectExamplesFix.java
branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/SeamRuntimeFix.java
branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/WTPRuntimeFix.java
branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectFix.java
branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/SiteCategory.java
branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/ProjectExamplesPreferencePage.java
branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/ProjectExamplesPreferencesInitializer.java
branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/SiteDialog.java
branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/Sites.java
branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/SiteFilter.java
Log:
JBIDE-8399 Improve US States SOAP Service Project Example
Modified: branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/dialog/FixDialog.java
===================================================================
--- branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/dialog/FixDialog.java 2011-04-24 16:39:08 UTC (rev 30811)
+++ branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/dialog/FixDialog.java 2011-04-25 15:12:36 UTC (rev 30812)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 JBoss by Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
package org.jboss.tools.project.examples.dialog;
import java.util.ArrayList;
@@ -34,6 +44,11 @@
import org.jboss.tools.project.examples.model.ProjectFix;
import org.jboss.tools.project.examples.wizard.NewProjectExamplesWizardPage;
+/**
+ *
+ * @author snjeza
+ *
+ */
public class FixDialog extends Dialog {
private static final int FIX_BUTTON = 1;
Modified: branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/PluginFix.java
===================================================================
--- branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/PluginFix.java 2011-04-24 16:39:08 UTC (rev 30811)
+++ branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/PluginFix.java 2011-04-25 15:12:36 UTC (rev 30812)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 JBoss by Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
package org.jboss.tools.project.examples.fixes;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -9,6 +19,11 @@
import org.jboss.tools.project.examples.model.ProjectFix;
import org.osgi.framework.Bundle;
+/**
+ *
+ * @author snjeza
+ *
+ */
public class PluginFix implements ProjectExamplesFix {
public boolean canFix(Project project, ProjectFix fix) {
Modified: branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/ProjectExamplesFix.java
===================================================================
--- branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/ProjectExamplesFix.java 2011-04-24 16:39:08 UTC (rev 30811)
+++ branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/ProjectExamplesFix.java 2011-04-25 15:12:36 UTC (rev 30812)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 JBoss by Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
package org.jboss.tools.project.examples.fixes;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -4,6 +14,11 @@
import org.jboss.tools.project.examples.model.Project;
import org.jboss.tools.project.examples.model.ProjectFix;
+/**
+ *
+ * @author snjeza
+ *
+ */
public interface ProjectExamplesFix {
boolean canFix(Project project, ProjectFix fix);
Modified: branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/SeamRuntimeFix.java
===================================================================
--- branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/SeamRuntimeFix.java 2011-04-24 16:39:08 UTC (rev 30811)
+++ branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/SeamRuntimeFix.java 2011-04-25 15:12:36 UTC (rev 30812)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 JBoss by Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
package org.jboss.tools.project.examples.fixes;
import java.util.StringTokenizer;
@@ -16,6 +26,11 @@
import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
import org.osgi.service.prefs.BackingStoreException;
+/**
+ *
+ * @author snjeza
+ *
+ */
public class SeamRuntimeFix implements ProjectExamplesFix {
public boolean canFix(Project project, ProjectFix fix) {
Modified: branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/WTPRuntimeFix.java
===================================================================
--- branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/WTPRuntimeFix.java 2011-04-24 16:39:08 UTC (rev 30811)
+++ branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/fixes/WTPRuntimeFix.java 2011-04-25 15:12:36 UTC (rev 30812)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 JBoss by Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
package org.jboss.tools.project.examples.fixes;
import java.io.File;
@@ -28,16 +38,24 @@
import org.eclipse.wst.server.core.ServerCore;
import org.jboss.ide.eclipse.as.core.server.IJBossServerConstants;
import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
+import org.jboss.ide.eclipse.as.core.util.IJBossRuntimeResourceConstants;
import org.jboss.tools.portlet.core.internal.PortletRuntimeComponentProvider;
import org.jboss.tools.project.examples.Messages;
import org.jboss.tools.project.examples.ProjectExamplesActivator;
import org.jboss.tools.project.examples.model.Project;
import org.jboss.tools.project.examples.model.ProjectFix;
+/**
+ *
+ * @author snjeza
+ *
+ */
public class WTPRuntimeFix implements ProjectExamplesFix {
+ private static final String TEIID_DEPLOYER = "teiid.deployer"; //$NON-NLS-1$
private static final String RIFTSAW_SAR = "riftsaw.sar"; //$NON-NLS-1$
private static final String BPEL = "bpel"; //$NON-NLS-1$
+ private static final String TEIID = "teiid"; //$NON-NLS-1$
private static final String JBOSSESB_SAR = "jbossesb.sar"; //$NON-NLS-1$
private static final String JBOSSESB_ESB = "jbossesb.esb"; //$NON-NLS-1$
private static final String ESB = "esb"; //$NON-NLS-1$
@@ -66,6 +84,9 @@
IProject eclipseProject = eclipseProjects[i];
try {
IFacetedProject facetedProject = ProjectFacetsManager.create(eclipseProject);
+ if (facetedProject == null) {
+ continue;
+ }
org.eclipse.wst.common.project.facet.core.runtime.IRuntime wtpRuntime = facetedProject.getPrimaryRuntime();
if (wtpRuntime != null) {
IRuntime runtime = getRuntime(wtpRuntime);
@@ -212,6 +233,11 @@
return null;
}
}
+ if (TEIID.equals(component)) {
+ if (!isTeiidPresent(location, runtime)) {
+ return null;
+ }
+ }
return runtime;
}
return null;
@@ -248,6 +274,20 @@
}
return false;
}
+
+ public static boolean isTeiidPresent(final File location,
+ IRuntime runtime) {
+ IJBossServerRuntime jbossRuntime = (IJBossServerRuntime)runtime.loadAdapter(IJBossServerRuntime.class, new NullProgressMonitor());
+ if (jbossRuntime != null) {
+ IPath jbossLocation = runtime.getLocation();
+ IPath configPath = jbossLocation.append(IJBossServerConstants.SERVER).append(jbossRuntime.getJBossConfiguration());
+ IPath deployersPath = configPath.append(IJBossRuntimeResourceConstants.DEPLOYERS);
+ File deployersFile = deployersPath.toFile();
+ File teiidFile = new File(deployersFile, TEIID_DEPLOYER);
+ return teiidFile.exists();
+ }
+ return false;
+ }
private static boolean exists(final File location,String esbDir) {
if (Platform.getOS().equals(Platform.OS_WIN32)) {
Modified: branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectFix.java
===================================================================
--- branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectFix.java 2011-04-24 16:39:08 UTC (rev 30811)
+++ branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectFix.java 2011-04-25 15:12:36 UTC (rev 30812)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 JBoss by Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
package org.jboss.tools.project.examples.model;
import java.util.HashMap;
@@ -3,12 +13,7 @@
import java.util.Map;
-import org.eclipse.equinox.internal.p2.ui.sdk.ProvSDKUIActivator;
-import org.eclipse.equinox.p2.core.ProvisionException;
import org.eclipse.equinox.internal.p2.ui.IProvHelpContextIds;
-import org.eclipse.equinox.internal.p2.ui.ProvUIActivator;
-import org.eclipse.equinox.internal.p2.ui.QueryableMetadataRepositoryManager;
import org.eclipse.equinox.internal.p2.ui.dialogs.InstallWizard;
import org.eclipse.equinox.internal.p2.ui.dialogs.ProvisioningWizardDialog;
-import org.eclipse.equinox.p2.ui.Policy;
import org.eclipse.equinox.p2.ui.ProvisioningUI;
import org.eclipse.jface.preference.PreferenceDialog;
@@ -18,8 +23,12 @@
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.dialogs.PreferencesUtil;
import org.jboss.tools.project.examples.Messages;
-import org.jboss.tools.project.examples.ProjectExamplesActivator;
+/**
+ *
+ * @author snjeza
+ *
+ */
public class ProjectFix {
public final static String WTP_RUNTIME = "wtpruntime"; //$NON-NLS-1$
Modified: branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/SiteCategory.java
===================================================================
--- branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/SiteCategory.java 2011-04-24 16:39:08 UTC (rev 30811)
+++ branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/SiteCategory.java 2011-04-25 15:12:36 UTC (rev 30812)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 JBoss by Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
package org.jboss.tools.project.examples.model;
import java.util.Set;
@@ -2,2 +12,7 @@
+/**
+ *
+ * @author snjeza
+ *
+ */
public class SiteCategory implements IProjectExampleSite {
Modified: branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/ProjectExamplesPreferencePage.java
===================================================================
--- branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/ProjectExamplesPreferencePage.java 2011-04-24 16:39:08 UTC (rev 30811)
+++ branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/ProjectExamplesPreferencePage.java 2011-04-25 15:12:36 UTC (rev 30812)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 JBoss by Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
package org.jboss.tools.project.examples.preferences;
import java.net.URL;
@@ -32,6 +42,11 @@
import org.jboss.tools.project.examples.model.ProjectUtil;
import org.jboss.tools.project.examples.model.SiteCategory;
+/**
+ *
+ * @author snjeza
+ *
+ */
public class ProjectExamplesPreferencePage extends PreferencePage implements
IWorkbenchPreferencePage {
Modified: branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/ProjectExamplesPreferencesInitializer.java
===================================================================
--- branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/ProjectExamplesPreferencesInitializer.java 2011-04-24 16:39:08 UTC (rev 30811)
+++ branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/ProjectExamplesPreferencesInitializer.java 2011-04-25 15:12:36 UTC (rev 30812)
@@ -1,11 +1,26 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 JBoss by Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
+
package org.jboss.tools.project.examples.preferences;
-
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
import org.eclipse.core.runtime.preferences.DefaultScope;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.jboss.tools.project.examples.ProjectExamplesActivator;
+/**
+ *
+ * @author snjeza
+ *
+ */
public class ProjectExamplesPreferencesInitializer extends
AbstractPreferenceInitializer {
Modified: branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/SiteDialog.java
===================================================================
--- branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/SiteDialog.java 2011-04-24 16:39:08 UTC (rev 30811)
+++ branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/SiteDialog.java 2011-04-25 15:12:36 UTC (rev 30812)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 JBoss by Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
package org.jboss.tools.project.examples.preferences;
import java.io.File;
@@ -27,6 +37,11 @@
import org.jboss.tools.project.examples.ProjectExamplesActivator;
import org.jboss.tools.project.examples.model.ProjectExampleSite;
+/**
+ *
+ * @author snjeza
+ *
+ */
public class SiteDialog extends TitleAreaDialog {
private static final String ADD_PROJECT_EXAMPLE_SITE = Messages.SiteDialog_Add_Project_Example_Site;
Modified: branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/Sites.java
===================================================================
--- branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/Sites.java 2011-04-24 16:39:08 UTC (rev 30811)
+++ branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/Sites.java 2011-04-25 15:12:36 UTC (rev 30812)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 JBoss by Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
package org.jboss.tools.project.examples.preferences;
import java.util.HashSet;
@@ -8,6 +18,11 @@
import org.jboss.tools.project.examples.model.ProjectUtil;
import org.jboss.tools.project.examples.model.SiteCategory;
+/**
+ *
+ * @author snjeza
+ *
+ */
public class Sites {
private SiteCategory[] siteCategories;
private SiteCategory userSite;
Modified: branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/SiteFilter.java
===================================================================
--- branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/SiteFilter.java 2011-04-24 16:39:08 UTC (rev 30811)
+++ branches/jbosstools-3.2.x/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/SiteFilter.java 2011-04-25 15:12:36 UTC (rev 30812)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 JBoss by Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
package org.jboss.tools.project.examples.wizard;
import java.util.List;
@@ -9,6 +19,11 @@
import org.jboss.tools.project.examples.model.Project;
import org.jboss.tools.project.examples.model.ProjectModelElement;
+/**
+ *
+ * @author snjeza
+ *
+ */
public class SiteFilter extends ViewerFilter {
private String site;
14 years, 11 months
Newsletter Mon, 25 Apr 2011 06:17:37 +0200
by jbosstools-commits@lists.jboss.org
Hello!
Do you want an improved future, double in money earning, and the praise of all?
Today only:
We can assist with Diplomas from prestigious universities based on your present knowledge and work experience.
Get a Degree in 4 weeks with our program!
~Our program will let EVERYONE with professional experience
gain a 100% verified Degree:
~Doctorate
~Bachelors
~Masters
- Think about it...
- Follow YOUR Dreams!
- Live a better life by earning or upgrading your degree.
This is a good way to make a right move and receive your due
benefits... if you are qualified but are lacking that piece of paper. Get one from us in a fraction of the time.
If you want to get better - you must Contact Us 24/7 to start improving your life!
~CALL~
1-310-205-2502
You should leave us a voice message with your name and phone number with country code if outside USA and we'll call you back as soon as possible.
It is your way...
Make the right decision.
Best regards.
Do Not Reply to this Email.
We do not reply to text inquiries, and our server will reject all response traffic.
We apologize for any inconvenience this may have caused you.
14 years, 11 months