JBoss Tools SVN: r40912 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action.
by jbosstools-commits@lists.jboss.org
Author: xcoulon
Date: 2012-05-10 09:37:51 -0400 (Thu, 10 May 2012)
New Revision: 40912
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/DeleteApplicationAction.java
Log:
Typo: removing extra '.' on second line of confirmation dialog box
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/DeleteApplicationAction.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/DeleteApplicationAction.java 2012-05-10 13:17:28 UTC (rev 40911)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/DeleteApplicationAction.java 2012-05-10 13:37:51 UTC (rev 40912)
@@ -67,7 +67,7 @@
Display.getCurrent().getActiveShell(),
"Application deletion",
NLS.bind(
- "You are about to destroy the \"{0}\" application.\n."
+ "You are about to destroy the \"{0}\" application.\n"
+
"This is NOT reversible, all remote data for this application will be removed.",
appsToDelete.get(0)));
12 years, 8 months
JBoss Tools SVN: r40911 - in trunk/maven: features/org.jboss.tools.maven.jdt.feature and 14 other directories.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2012-05-10 09:17:28 -0400 (Thu, 10 May 2012)
New Revision: 40911
Added:
trunk/maven/features/org.jboss.tools.maven.jdt.feature/
trunk/maven/features/org.jboss.tools.maven.jdt.feature/.project
trunk/maven/features/org.jboss.tools.maven.jdt.feature/build.properties
trunk/maven/features/org.jboss.tools.maven.jdt.feature/feature.properties
trunk/maven/features/org.jboss.tools.maven.jdt.feature/feature.xml
trunk/maven/features/org.jboss.tools.maven.jdt.feature/license.html
trunk/maven/features/org.jboss.tools.maven.jdt.feature/pom.xml
trunk/maven/features/org.jboss.tools.maven.jdt.feature/sourceTemplateFeature/
trunk/maven/features/org.jboss.tools.maven.jdt.feature/sourceTemplateFeature/.gitkeep
trunk/maven/plugins/org.jboss.tools.maven.jdt/
trunk/maven/plugins/org.jboss.tools.maven.jdt/.classpath
trunk/maven/plugins/org.jboss.tools.maven.jdt/.project
trunk/maven/plugins/org.jboss.tools.maven.jdt/.settings/
trunk/maven/plugins/org.jboss.tools.maven.jdt/.settings/org.eclipse.jdt.core.prefs
trunk/maven/plugins/org.jboss.tools.maven.jdt/.settings/org.eclipse.m2e.core.prefs
trunk/maven/plugins/org.jboss.tools.maven.jdt/META-INF/
trunk/maven/plugins/org.jboss.tools.maven.jdt/META-INF/MANIFEST.MF
trunk/maven/plugins/org.jboss.tools.maven.jdt/about.html
trunk/maven/plugins/org.jboss.tools.maven.jdt/about.ini
trunk/maven/plugins/org.jboss.tools.maven.jdt/about.mappings
trunk/maven/plugins/org.jboss.tools.maven.jdt/about.properties
trunk/maven/plugins/org.jboss.tools.maven.jdt/build.properties
trunk/maven/plugins/org.jboss.tools.maven.jdt/jboss_about.png
trunk/maven/plugins/org.jboss.tools.maven.jdt/lifecycle-mapping-metadata.xml
trunk/maven/plugins/org.jboss.tools.maven.jdt/plugin.properties
trunk/maven/plugins/org.jboss.tools.maven.jdt/plugin.xml
trunk/maven/plugins/org.jboss.tools.maven.jdt/pom.xml
trunk/maven/plugins/org.jboss.tools.maven.jdt/src/
trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/
trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/
trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/
trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/
trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/
trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/MavenJdtActivator.java
trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/configurators/
trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/configurators/ClasspathHelpers.java
trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/configurators/EndorsedLibProjectConfigurator.java
trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/configurators/EndorsedLibrariesContainer.java
trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/configurators/EndorsedLibrariesContainerInitializer.java
trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/configurators/EndorsedLibrariesManager.java
trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/configurators/JarFilter.java
trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/configurators/xpl/
trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/configurators/xpl/MavenClasspathContainerSaveHelper.java
Modified:
trunk/maven/features/pom.xml
trunk/maven/plugins/pom.xml
trunk/maven/site/category.xml
Log:
JBIDE-11738 : Solve/workaround the issue of needing endorsed libraries on Java 6
https://issues.jboss.org/browse/JBIDE-11738
Added: trunk/maven/features/org.jboss.tools.maven.jdt.feature/.project
===================================================================
--- trunk/maven/features/org.jboss.tools.maven.jdt.feature/.project (rev 0)
+++ trunk/maven/features/org.jboss.tools.maven.jdt.feature/.project 2012-05-10 13:17:28 UTC (rev 40911)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.maven.jdt.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
Added: trunk/maven/features/org.jboss.tools.maven.jdt.feature/build.properties
===================================================================
--- trunk/maven/features/org.jboss.tools.maven.jdt.feature/build.properties (rev 0)
+++ trunk/maven/features/org.jboss.tools.maven.jdt.feature/build.properties 2012-05-10 13:17:28 UTC (rev 40911)
@@ -0,0 +1,3 @@
+bin.includes = feature.xml,\
+ license.html,\
+ feature.properties
Added: trunk/maven/features/org.jboss.tools.maven.jdt.feature/feature.properties
===================================================================
--- trunk/maven/features/org.jboss.tools.maven.jdt.feature/feature.properties (rev 0)
+++ trunk/maven/features/org.jboss.tools.maven.jdt.feature/feature.properties 2012-05-10 13:17:28 UTC (rev 40911)
@@ -0,0 +1,53 @@
+###############################################################################
+# Copyright (c) 2010-2012 Red Hat, Inc. 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.
+##############################################################################
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=JBoss Maven Endorsed Libraries configurator
+
+# "providerName" property - name of the company that provides the feature
+providerName=JBoss by Red Hat
+
+# "updateSiteName" property - label for the update site
+updateSiteName=JBossTools Update Site
+
+# "description" property - description of the feature
+description=This feature provides additional m2e support for Endorsed Libraries
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=Copyright (c) 2010-2012 Red Hat, Inc. and others.\n\
+All rights reserved. This program and the accompanying materials\n\
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http\://www.eclipse.org/legal/epl-v10.html\n\nContributors\:\n\
+JBoss by Red Hat - Initial implementation.
+ ############### end of copyright property ####################################
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# START NON-TRANSLATABLE
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=Red Hat, Inc. licenses these features and plugins to you under \
+certain open source licenses (or aggregations of such licenses), which \
+in a particular case may include the Eclipse Public License, the GNU \
+Lesser General Public License, and/or certain other open source \
+licenses. For precise licensing details, consult the corresponding \
+source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive, \
+Raleigh NC 27606 USA.
+# END NON-TRANSLATABLE
+########### end of license property ##########################################
Added: trunk/maven/features/org.jboss.tools.maven.jdt.feature/feature.xml
===================================================================
--- trunk/maven/features/org.jboss.tools.maven.jdt.feature/feature.xml (rev 0)
+++ trunk/maven/features/org.jboss.tools.maven.jdt.feature/feature.xml 2012-05-10 13:17:28 UTC (rev 40911)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.jboss.tools.maven.jdt.feature"
+ label="%featureName"
+ version="1.3.0.qualifier"
+ provider-name="%providerName"
+ plugin="org.jboss.tools.maven.jdt">
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <requires>
+ <import feature="org.eclipse.m2e.feature" version="0.13.0" match="greaterOrEqual"/>
+ </requires>
+
+ <plugin
+ id="org.jboss.tools.maven.jdt"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
Added: trunk/maven/features/org.jboss.tools.maven.jdt.feature/license.html
===================================================================
--- trunk/maven/features/org.jboss.tools.maven.jdt.feature/license.html (rev 0)
+++ trunk/maven/features/org.jboss.tools.maven.jdt.feature/license.html 2012-05-10 13:17:28 UTC (rev 40911)
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+
+<body>
+<p>Red Hat, Inc. licenses these features and plugins to you under
+certain open source licenses (or aggregations of such licenses), which
+in a particular case may include the Eclipse Public License, the GNU
+Lesser General Public License, and/or certain other open source
+licenses. For precise licensing details, consult the corresponding
+source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive,
+Raleigh NC 27606 USA.
+</p>
+</body>
+</html>
\ No newline at end of file
Added: trunk/maven/features/org.jboss.tools.maven.jdt.feature/pom.xml
===================================================================
--- trunk/maven/features/org.jboss.tools.maven.jdt.feature/pom.xml (rev 0)
+++ trunk/maven/features/org.jboss.tools.maven.jdt.feature/pom.xml 2012-05-10 13:17:28 UTC (rev 40911)
@@ -0,0 +1,47 @@
+<?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.maven</groupId>
+ <artifactId>features</artifactId>
+ <version>1.3.0-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools.maven.features</groupId>
+ <artifactId>org.jboss.tools.maven.jdt.feature</artifactId>
+
+ <packaging>eclipse-feature</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho.extras</groupId>
+ <artifactId>tycho-source-feature-plugin</artifactId>
+ <version>${tychoExtrasVersion}</version>
+ <executions>
+ <execution>
+ <id>source-feature</id>
+ <phase>package</phase>
+ <goals>
+ <goal>source-feature</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-p2-plugin</artifactId>
+ <version>${tychoVersion}</version>
+ <executions>
+ <execution>
+ <id>attached-p2-metadata</id>
+ <phase>package</phase>
+ <goals>
+ <goal>p2-metadata</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added: trunk/maven/features/org.jboss.tools.maven.jdt.feature/sourceTemplateFeature/.gitkeep
===================================================================
Modified: trunk/maven/features/pom.xml
===================================================================
--- trunk/maven/features/pom.xml 2012-05-10 11:38:49 UTC (rev 40910)
+++ trunk/maven/features/pom.xml 2012-05-10 13:17:28 UTC (rev 40911)
@@ -27,6 +27,7 @@
<module>org.jboss.tools.maven.profiles.feature</module>
<module>org.jboss.tools.maven.gwt.feature</module>
<module>org.jboss.tools.maven.sourcelookup.feature</module>
+ <module>org.jboss.tools.maven.jdt.feature</module>
</modules>
<repositories>
Added: trunk/maven/plugins/org.jboss.tools.maven.jdt/.classpath
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jdt/.classpath (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.jdt/.classpath 2012-05-10 13:17:28 UTC (rev 40911)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src/"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
Added: trunk/maven/plugins/org.jboss.tools.maven.jdt/.project
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jdt/.project (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.jdt/.project 2012-05-10 13:17:28 UTC (rev 40911)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.maven.jdt</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: trunk/maven/plugins/org.jboss.tools.maven.jdt/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jdt/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.jdt/.settings/org.eclipse.jdt.core.prefs 2012-05-10 13:17:28 UTC (rev 40911)
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Added: trunk/maven/plugins/org.jboss.tools.maven.jdt/.settings/org.eclipse.m2e.core.prefs
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jdt/.settings/org.eclipse.m2e.core.prefs (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.jdt/.settings/org.eclipse.m2e.core.prefs 2012-05-10 13:17:28 UTC (rev 40911)
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
Added: trunk/maven/plugins/org.jboss.tools.maven.jdt/META-INF/MANIFEST.MF
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jdt/META-INF/MANIFEST.MF (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.jdt/META-INF/MANIFEST.MF 2012-05-10 13:17:28 UTC (rev 40911)
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.jboss.tools.maven.jdt;singleton:=true
+Bundle-Version: 1.3.0.qualifier
+Bundle-Activator: org.jboss.tools.maven.jdt.MavenJdtActivator
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.jdt.core,
+ org.eclipse.m2e.core;bundle-version="1.0.0",
+ org.eclipse.m2e.jdt;bundle-version="1.0.0",
+ org.eclipse.m2e.maven.runtime;bundle-version="1.0.0"
+Bundle-Localization: plugin
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6,
+ JavaSE-1.7
+Bundle-Vendor: %Bundle-Vendor
Added: trunk/maven/plugins/org.jboss.tools.maven.jdt/about.html
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jdt/about.html (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.jdt/about.html 2012-05-10 13:17:28 UTC (rev 40911)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>JBoss Maven CDI Configurator</title>
+<style type="text/css" media="screen">
+<!--
+ body {
+ font-family: Sans-serif, Arial, Helvetica;
+ }
+
+-->
+</style>
+</head>
+<body>
+<h1>JBoss Maven CDI Configurator</h1>
+
+<p>
+This plugin is part of the JBoss Tools developed by the <a href="http://www.jboss.com">JBoss Inc.</a>
+</p>
+
+<p>Information about this plugin is available at <a href="http://www.jboss.org/tools">JBoss Tools project page</a></p>
+
+<p>
+This software is distributed under the terms of the Eclipse Public License - v 1.0
+(see <a href="www.eclipse.org/legal/epl-v10.html">Eclipse Public License - Version 1.0</a>).
+</p>
+</body>
+</html>
\ No newline at end of file
Added: trunk/maven/plugins/org.jboss.tools.maven.jdt/about.ini
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jdt/about.ini (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.jdt/about.ini 2012-05-10 13:17:28 UTC (rev 40911)
@@ -0,0 +1,27 @@
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+# test
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%blurb
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=jboss_about.png
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (not translated)
+# needed for primary features only
+
+# Property "welcomePerspective" contains the id of the perspective in which the
+# welcome page is to be opened.
+# optional
+
+
+
Added: trunk/maven/plugins/org.jboss.tools.maven.jdt/about.mappings
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jdt/about.mappings (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.jdt/about.mappings 2012-05-10 13:17:28 UTC (rev 40911)
@@ -0,0 +1,5 @@
+# about.mappings
+# contains fill-ins for about.properties
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file does not need to be translated.
+
Added: trunk/maven/plugins/org.jboss.tools.maven.jdt/about.properties
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jdt/about.properties (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.jdt/about.properties 2012-05-10 13:17:28 UTC (rev 40911)
@@ -0,0 +1,2 @@
+blurb=JBoss Maven CDI Configurator\n\nVersion\: {featureVersion}\n\n(c) Copyright (c) Red Hat, Inc., contributors and others 2004 - 2012. All rights reserved.\nVisit http\://jboss.org/tools
+
Added: trunk/maven/plugins/org.jboss.tools.maven.jdt/build.properties
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jdt/build.properties (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.jdt/build.properties 2012-05-10 13:17:28 UTC (rev 40911)
@@ -0,0 +1,12 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ plugin.properties,\
+ about.html,\
+ about.ini,\
+ about.mappings,\
+ about.properties,\
+ jboss_about.png,\
+ lifecycle-mapping-metadata.xml
Added: trunk/maven/plugins/org.jboss.tools.maven.jdt/jboss_about.png
===================================================================
(Binary files differ)
Property changes on: trunk/maven/plugins/org.jboss.tools.maven.jdt/jboss_about.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/maven/plugins/org.jboss.tools.maven.jdt/lifecycle-mapping-metadata.xml
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jdt/lifecycle-mapping-metadata.xml (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.jdt/lifecycle-mapping-metadata.xml 2012-05-10 13:17:28 UTC (rev 40911)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<lifecycleMappingMetadata>
+
+ <pluginExecutions>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <versionRange>[2.0,)</versionRange>
+ <goals>
+ <goal>compile</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <configurator>
+ <id>org.jboss.tools.maven.jdt.configurator.endorsedlib</id>
+ </configurator>
+ </action>
+ </pluginExecution>
+ </pluginExecutions>
+
+</lifecycleMappingMetadata>
\ No newline at end of file
Added: trunk/maven/plugins/org.jboss.tools.maven.jdt/plugin.properties
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jdt/plugin.properties (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.jdt/plugin.properties 2012-05-10 13:17:28 UTC (rev 40911)
@@ -0,0 +1,3 @@
+Bundle-Vendor = JBoss by Red Hat
+Bundle-Name = JBoss Maven JDT Configurator
+Endorsed_Lib_Configurator_label = Endorsed lib configurator
Added: trunk/maven/plugins/org.jboss.tools.maven.jdt/plugin.xml
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jdt/plugin.xml (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.jdt/plugin.xml 2012-05-10 13:17:28 UTC (rev 40911)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+ <extension
+ point="org.eclipse.m2e.core.lifecycleMappingMetadataSource">
+ </extension>
+
+ <extension point="org.eclipse.jdt.core.classpathContainerInitializer"
+ id="endorsedLibrariesClasspathContainer"
+ name="Endorsed Libraries">
+ <classpathContainerInitializer
+ id="org.jboss.tools.maven.jdt.ENDORSED_LIB_CLASSPATH_CONTAINER"
+ class="org.jboss.tools.maven.jdt.configurators.EndorsedLibrariesContainerInitializer"/>
+ </extension>
+
+ <extension point="org.eclipse.m2e.core.projectConfigurators">
+ <configurator
+ id="org.jboss.tools.maven.jdt.configurator.endorsedlib"
+ class="org.jboss.tools.maven.jdt.configurators.EndorsedLibProjectConfigurator"
+ name="%Endorsed_Lib_Configurator_label"
+ secondaryTo="org.eclipse.m2e.jdt.javaConfigurator"/>
+ </extension>
+
+</plugin>
Added: trunk/maven/plugins/org.jboss.tools.maven.jdt/pom.xml
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jdt/pom.xml (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.jdt/pom.xml 2012-05-10 13:17:28 UTC (rev 40911)
@@ -0,0 +1,14 @@
+<?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.maven</groupId>
+ <artifactId>plugins</artifactId>
+ <version>1.3.0-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools.maven.plugins</groupId>
+ <artifactId>org.jboss.tools.maven.jdt</artifactId>
+
+ <packaging>eclipse-plugin</packaging>
+</project>
\ No newline at end of file
Added: trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/MavenJdtActivator.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/MavenJdtActivator.java (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/MavenJdtActivator.java 2012-05-10 13:17:28 UTC (rev 40911)
@@ -0,0 +1,87 @@
+/*************************************************************************************
+ * Copyright (c) 2012 Red Hat, Inc. 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.jdt;
+
+import java.io.File;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.jboss.tools.maven.jdt.configurators.EndorsedLibrariesManager;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class MavenJdtActivator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.jboss.tools.maven.jdt"; //$NON-NLS-1$
+
+ // The shared instance
+ private static MavenJdtActivator plugin;
+
+ private EndorsedLibrariesManager endorsedLibrariesManager;
+
+ /**
+ * The constructor
+ */
+ public MavenJdtActivator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ File stateLocationDir = getStateLocation().toFile();
+ endorsedLibrariesManager = new EndorsedLibrariesManager(stateLocationDir);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static MavenJdtActivator getDefault() {
+ return plugin;
+ }
+
+ public static void log(Throwable e) {
+ log(e.getLocalizedMessage(), e);
+ }
+
+ public static void log(String message) {
+ IStatus status = new Status(IStatus.WARNING, PLUGIN_ID, message, null);
+ getDefault().getLog().log(status);
+ }
+
+
+ public static void log(String message, Throwable e) {
+ IStatus status = new Status(IStatus.ERROR, PLUGIN_ID, message, e);
+ getDefault().getLog().log(status);
+ }
+
+ public EndorsedLibrariesManager getEndorsedLibrariesManager() {
+ return endorsedLibrariesManager;
+ }
+}
Added: trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/configurators/ClasspathHelpers.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/configurators/ClasspathHelpers.java (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/configurators/ClasspathHelpers.java 2012-05-10 13:17:28 UTC (rev 40911)
@@ -0,0 +1,92 @@
+package org.jboss.tools.maven.jdt.configurators;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jdt.core.IClasspathContainer;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.m2e.jdt.IClasspathDescriptor;
+import org.eclipse.m2e.jdt.IClasspathEntryDescriptor;
+import org.eclipse.m2e.jdt.internal.ClasspathDescriptor;
+import org.eclipse.m2e.jdt.internal.ClasspathEntryDescriptor;
+import org.eclipse.m2e.jdt.internal.MavenClasspathHelpers;
+import org.jboss.tools.maven.jdt.MavenJdtActivator;
+
+public class ClasspathHelpers {
+
+ public static final String CONTAINER_ID = MavenJdtActivator.PLUGIN_ID
+ + ".ENDORSED_LIB_CLASSPATH_CONTAINER";
+
+ public static boolean isEndorsedDirsClasspathContainer(IPath containerPath) {
+ return containerPath != null && containerPath.segmentCount() > 0
+ && CONTAINER_ID.equals(containerPath.segment(0));
+ }
+
+ public static IClasspathEntry getDefaultContainerEntry() {
+ return JavaCore.newContainerEntry(new Path(CONTAINER_ID));
+ }
+
+ public static IClasspathContainer getEndorsedDirsClasspathContainer(
+ IJavaProject project) throws JavaModelException {
+ IClasspathEntry[] entries = project.getRawClasspath();
+ for (int i = 0; i < entries.length; i++) {
+ IClasspathEntry entry = entries[i];
+ if (entry.getEntryKind() == IClasspathEntry.CPE_CONTAINER
+ && isEndorsedDirsClasspathContainer(entry.getPath())) {
+ return JavaCore.getClasspathContainer(entry.getPath(), project);
+ }
+ }
+ return null;
+ }
+
+ public static IClasspathEntry addEndorsedLibClasspathContainer(IClasspathDescriptor classpath) {
+ IClasspathEntry cpe = getDefaultContainerEntry();
+ ClasspathEntryDescriptor entry = new ClasspathEntryDescriptor(cpe);
+ entry.setClasspathAttribute("org.eclipse.jst.component.nondependency", "");
+ classpath.getEntryDescriptors().add(0,entry);
+ return cpe;
+ }
+
+ public static void removeEndorsedLibClasspathContainer( IClasspathDescriptor classpath ) {
+ // remove any old endorsed dirs container entries
+ classpath.removeEntry(new ClasspathDescriptor.EntryFilter() {
+ public boolean accept(IClasspathEntryDescriptor entry) {
+ return isEndorsedDirsClasspathContainer(entry.getPath());
+ }
+ });
+ }
+
+ public static IClasspathEntry getEndorsedDirsContainerEntry( IJavaProject javaProject ) {
+ if (javaProject != null) {
+ try {
+ for (IClasspathEntry entry : javaProject.getRawClasspath()) {
+ if (isEndorsedDirsClasspathContainer(entry.getPath())) {
+ return entry;
+ }
+ }
+ } catch (JavaModelException ex) {
+ return null;
+ }
+ }
+ return null;
+ }
+
+ public static void removeEndorsedLibClasspathContainer(IProject project) throws JavaModelException {
+ IJavaProject javaProject = JavaCore.create(project);
+ if(javaProject != null) {
+ // remove classpatch container from JavaProject
+ ArrayList<IClasspathEntry> newEntries = new ArrayList<IClasspathEntry>();
+ for(IClasspathEntry entry : javaProject.getRawClasspath()) {
+ if(!isEndorsedDirsClasspathContainer(entry.getPath())) {
+ newEntries.add(entry);
+ }
+ }
+ javaProject.setRawClasspath(newEntries.toArray(new IClasspathEntry[newEntries.size()]), null);
+ }
+ }
+}
Added: trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/configurators/EndorsedLibProjectConfigurator.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/configurators/EndorsedLibProjectConfigurator.java (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/configurators/EndorsedLibProjectConfigurator.java 2012-05-10 13:17:28 UTC (rev 40911)
@@ -0,0 +1,223 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 Red Hat, Inc. 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.jdt.configurators;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.apache.maven.execution.MavenExecutionRequest;
+import org.apache.maven.execution.MavenSession;
+import org.apache.maven.lifecycle.MavenExecutionPlan;
+import org.apache.maven.plugin.MojoExecution;
+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.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.m2e.core.project.IMavenProjectFacade;
+import org.eclipse.m2e.core.project.configurator.AbstractProjectConfigurator;
+import org.eclipse.m2e.core.project.configurator.ProjectConfigurationRequest;
+import org.eclipse.m2e.jdt.IClasspathDescriptor;
+import org.eclipse.m2e.jdt.IJavaProjectConfigurator;
+import org.jboss.tools.maven.jdt.MavenJdtActivator;
+
+
+/**
+ * Endorsed Libraries project configurator
+ *
+ * @author Fred Bricon
+ *
+ */
+public class EndorsedLibProjectConfigurator extends AbstractProjectConfigurator implements IJavaProjectConfigurator {
+
+ private static final Pattern jAVA_ENDORSED_DIRS_PATTERN = Pattern.compile("-Djava.endorsed.dirs=([^ \\t]+)");
+
+ @Override
+ public void configure(ProjectConfigurationRequest request, IProgressMonitor monitor) throws CoreException {
+
+ File[] endorsedDirs = getEndorsedDirs(request.getMavenProjectFacade(), monitor);
+ if (endorsedDirs == null || endorsedDirs.length == 0) {
+ return;
+ }
+
+ boolean missingEndorsedDir = checkMissingDirs(endorsedDirs);
+ if (missingEndorsedDir && canExecuteDependencyCopy()) {
+ //TODO trigger dependency:copy
+ missingEndorsedDir = checkMissingDirs(endorsedDirs);
+ }
+ if (missingEndorsedDir) {
+ //TODO add marker
+ System.err.println("Some Endorsed directories are missing for "+request.getProject().getName());
+ }
+ }
+
+ private boolean canExecuteDependencyCopy() {
+ //TODO check preferences?
+ return true;
+ }
+
+ private boolean checkMissingDirs(File[] endorsedDirs) {
+ for (File dir : endorsedDirs) {
+ if (!dir.exists()) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public void configureClasspath(IMavenProjectFacade facade,
+ IClasspathDescriptor classpath, IProgressMonitor monitor)
+ throws CoreException {
+ // Nothing to configure here
+ }
+
+ public void configureRawClasspath(ProjectConfigurationRequest request,
+ IClasspathDescriptor classpath, IProgressMonitor monitor)
+ throws CoreException {
+
+ IJavaProject javaProject = JavaCore.create(request.getProject());
+ if (javaProject == null) {
+ return;
+ }
+
+ File[] endorsedDirs = getEndorsedDirs(request.getMavenProjectFacade(), monitor);
+
+ if (endorsedDirs == null || endorsedDirs.length == 0){
+ ClasspathHelpers.removeEndorsedLibClasspathContainer(classpath);
+ return;
+ }
+
+ getEndorsedLibrariesManager().configureEndorsedLibs(javaProject, classpath, endorsedDirs, monitor);
+ }
+
+ private File[] getEndorsedDirs(IMavenProjectFacade mavenProjectFacade, IProgressMonitor monitor) throws CoreException {
+ MavenSession session = createSession(mavenProjectFacade, monitor);
+ MojoExecution mojoExecution = getCompilerMojoExecution(mavenProjectFacade, session, monitor);
+
+ //Parse <compilerArgument> for -Djava.endorsed.dirs
+ String compilerArgument = maven.getMojoParameterValue(session, mojoExecution, "compilerArgument", String.class);
+ File[] javaEndorsedDirs = parseJavaEndorsedDirs(mavenProjectFacade.getProject(), compilerArgument);
+
+ //Check <compilerArguments> for <endorseddirs>
+ @SuppressWarnings("unchecked")
+ Map<String, String> compilerArguments = maven.getMojoParameterValue(session, mojoExecution, "compilerArguments", Map.class);
+ String endorsedDirsArg = (compilerArguments == null)?null:compilerArguments.get("endorseddirs");
+ File[] endorsedDirs = parseEndorsedDirs(mavenProjectFacade.getProject(), endorsedDirsArg);
+
+ return concat(javaEndorsedDirs, endorsedDirs);
+ }
+
+ private File[] parseJavaEndorsedDirs(IProject project, String compilerArgument) {
+ if (compilerArgument == null) {
+ return null;
+ }
+ Matcher matcher = jAVA_ENDORSED_DIRS_PATTERN.matcher(compilerArgument);
+ if (matcher.matches()) {
+ String endorsedDirs = matcher.group(1);
+ return parseEndorsedDirs(project, endorsedDirs);
+ }
+ return null;
+ }
+
+ private File[] parseEndorsedDirs(IProject project, String endorsedDirs) {
+ if (endorsedDirs == null){
+ return null;
+ }
+ //Remove quotes, use system separators
+ endorsedDirs = endorsedDirs.replaceAll("\"", "");
+
+ //Quote from http://docs.oracle.com/javase/6/docs/technotes/guides/standards/
+ //"If more than one directory path is specified by java.endorsed.dirs,
+ //they must be separated by File.pathSeparatorChar."
+ String[] paths = endorsedDirs.split(""+File.pathSeparatorChar);
+
+ //Convert dir paths to Files
+ List<File> dirs = new ArrayList<File>(paths.length);
+ for (String path : paths) {
+ IPath p = new Path(useSystemSeparator(path));
+ if (!p.isAbsolute()) {
+ p = project.getLocation().append(p);
+ }
+ File lib = new File(p.toOSString());
+ dirs.add(lib);
+ }
+
+ return dirs.toArray(new File[0]);
+ }
+
+
+ private static String useSystemSeparator(String name) {
+ if (name == null) return null;
+ return name.replace('/', File.separatorChar)
+ .replace('\\', File.separatorChar);
+ }
+
+ private MojoExecution getCompilerMojoExecution(IMavenProjectFacade mavenProjectFacade,
+ MavenSession session,
+ IProgressMonitor monitor) throws CoreException {
+ MavenExecutionPlan executionPlan = maven.calculateExecutionPlan(session,
+ mavenProjectFacade.getMavenProject(),
+ Collections.singletonList("compile"),
+ true,
+ monitor);
+ MojoExecution mojoExecution = getExecution(executionPlan, "maven-compiler-plugin", "compile");
+ return mojoExecution;
+ }
+
+ private MavenSession createSession(IMavenProjectFacade mavenProjectFacade, IProgressMonitor monitor) throws CoreException {
+ IFile pomResource = mavenProjectFacade.getPom();
+ MavenExecutionRequest request = projectManager.createExecutionRequest(pomResource,
+ mavenProjectFacade.getResolverConfiguration(),
+ monitor);
+ MavenSession session = maven.createSession(request, mavenProjectFacade.getMavenProject());
+ return session;
+ }
+
+ private MojoExecution getExecution(MavenExecutionPlan executionPlan, String artifactId, String goal) throws CoreException {
+ for(MojoExecution execution : executionPlan.getMojoExecutions()) {
+ if(artifactId.equals(execution.getArtifactId()) && goal.equals(execution.getGoal())) {
+ return execution;
+ }
+ }
+ return null;
+ }
+
+ private static <T> T[] concat(T[] first, T[] second) {
+ if (second == null) {
+ return first;
+ }
+ if (first == null) {
+ return second;
+ }
+ T[] result = Arrays.copyOf(first, first.length + second.length);
+ System.arraycopy(second, 0, result, first.length, second.length);
+ return result;
+ }
+
+ private EndorsedLibrariesManager getEndorsedLibrariesManager() {
+ return MavenJdtActivator.getDefault().getEndorsedLibrariesManager();
+ }
+
+ public void unconfigure(ProjectConfigurationRequest request, IProgressMonitor monitor) throws CoreException {
+ super.unconfigure(request, monitor);
+ ClasspathHelpers.removeEndorsedLibClasspathContainer(request.getProject());
+ }
+
+}
Added: trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/configurators/EndorsedLibrariesContainer.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/configurators/EndorsedLibrariesContainer.java (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/configurators/EndorsedLibrariesContainer.java 2012-05-10 13:17:28 UTC (rev 40911)
@@ -0,0 +1,55 @@
+package org.jboss.tools.maven.jdt.configurators;
+
+import java.io.Serializable;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jdt.core.IClasspathContainer;
+import org.eclipse.jdt.core.IClasspathEntry;
+
+/**
+ * Endorsed libraries classpath container
+ */
+public class EndorsedLibrariesContainer implements IClasspathContainer, Serializable {
+ private static final long serialVersionUID = 1L;
+
+ private final IClasspathEntry[] entries;
+ private final IPath path;
+
+ public EndorsedLibrariesContainer(IPath path, IClasspathEntry[] entries) {
+ this.path = path;
+ this.entries = entries;
+ }
+
+ public String getDescription() {
+ return "Endorsed Libraries";
+ }
+
+ public int getKind() {
+ return IClasspathContainer.K_APPLICATION;
+ }
+
+ public synchronized IClasspathEntry[] getClasspathEntries() {
+ return entries;
+ }
+
+ public IPath getPath() {
+ return path;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ if (path != null){
+ sb.append(path.toPortableString());
+ }
+ if (entries != null) {
+ sb.append(" [");
+ for (IClasspathEntry cpe : entries) {
+ sb.append(cpe.getPath()).append(", ");
+ }
+ sb.append("]");
+ }
+ return sb.toString();
+ }
+
+}
Added: trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/configurators/EndorsedLibrariesContainerInitializer.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/configurators/EndorsedLibrariesContainerInitializer.java (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/configurators/EndorsedLibrariesContainerInitializer.java 2012-05-10 13:17:28 UTC (rev 40911)
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2008-2010 Sonatype, Inc. 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:
+ * Sonatype, Inc. - initial API and implementation
+ * Red Hat, Inc. - Changed behaviour to support Endorsed Libraries
+ *******************************************************************************/
+
+package org.jboss.tools.maven.jdt.configurators;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jdt.core.ClasspathContainerInitializer;
+import org.eclipse.jdt.core.IClasspathContainer;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.embedder.IMavenConfiguration;
+import org.eclipse.m2e.core.project.IMavenProjectRegistry;
+import org.eclipse.m2e.core.project.MavenUpdateRequest;
+import org.jboss.tools.maven.jdt.MavenJdtActivator;
+
+
+/**
+ * Endorsed Libraries Container Initializer
+ *
+ * @author Eugene Kuleshov
+ * @author Fred Bricon
+ */
+public class EndorsedLibrariesContainerInitializer extends ClasspathContainerInitializer {
+
+ public void initialize(IPath containerPath, IJavaProject project) {
+ if(ClasspathHelpers.isEndorsedDirsClasspathContainer(containerPath)) {
+ try {
+ IClasspathContainer mavenContainer = getBuildPathManager().getSavedContainer(project.getProject());
+ if(mavenContainer != null) {
+ JavaCore.setClasspathContainer(containerPath, new IJavaProject[] {project},
+ new IClasspathContainer[] {mavenContainer}, new NullProgressMonitor());
+ return;
+ }
+ } catch(CoreException ex) {
+ MavenJdtActivator.log("Exception initializing classpath container " + containerPath.toString(), ex);
+ }
+
+ // force refresh if can't read persisted state
+ IMavenConfiguration configuration = MavenPlugin.getMavenConfiguration();
+ MavenUpdateRequest request = new MavenUpdateRequest(project.getProject(), configuration.isOffline(), false);
+ getMavenProjectManager().refresh(request);
+ }
+ }
+
+
+ private EndorsedLibrariesManager getBuildPathManager() {
+ return MavenJdtActivator.getDefault().getEndorsedLibrariesManager();
+ }
+
+ private IMavenProjectRegistry getMavenProjectManager() {
+ return MavenPlugin.getMavenProjectRegistry();
+ }
+}
Added: trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/configurators/EndorsedLibrariesManager.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/configurators/EndorsedLibrariesManager.java (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/configurators/EndorsedLibrariesManager.java 2012-05-10 13:17:28 UTC (rev 40911)
@@ -0,0 +1,159 @@
+/*******************************************************************************
+ * Copyright (c) 2008-2012 Sonatype, Inc. 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:
+ * Sonatype, Inc. - initial API and implementation
+ * Red Hat, Inc. - Changed behaviour to support Endorsed Libraries
+ *******************************************************************************/
+
+package org.jboss.tools.maven.jdt.configurators;
+
+import java.io.Closeable;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+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.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jdt.core.IClasspathContainer;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.m2e.jdt.IClasspathDescriptor;
+import org.jboss.tools.maven.jdt.MavenJdtActivator;
+import org.jboss.tools.maven.jdt.configurators.xpl.MavenClasspathContainerSaveHelper;
+
+public class EndorsedLibrariesManager {
+
+ private File stateLocationDir;
+
+ public EndorsedLibrariesManager(File containerLocationDir) {
+ stateLocationDir = containerLocationDir;
+ }
+
+ /**
+ * Adds the Endorsed Libraries classpath library to a project's classpath. It's added beore any other classpath build path.
+ * @param javaProject
+ * @param classpath
+ * @param endorsedDirs
+ * @param monitor
+ * @throws CoreException
+ */
+ public void configureEndorsedLibs(IJavaProject javaProject, IClasspathDescriptor classpath, File[] endorsedDirs,
+ IProgressMonitor monitor) throws CoreException {
+
+ if(javaProject != null && classpath != null) {
+
+ IClasspathEntry[] classpathEntries = getClasspathEntries(javaProject, endorsedDirs, monitor);
+
+ ClasspathHelpers.removeEndorsedLibClasspathContainer(classpath);
+
+ if (classpathEntries.length > 0) {
+ IClasspathEntry containerEntry = ClasspathHelpers.addEndorsedLibClasspathContainer(classpath);
+ IPath path = containerEntry != null ? containerEntry.getPath() : new Path(ClasspathHelpers.CONTAINER_ID);
+ IClasspathContainer container = new EndorsedLibrariesContainer(path, classpathEntries);
+ JavaCore.setClasspathContainer(container.getPath(), new IJavaProject[] {javaProject},
+ new IClasspathContainer[] {container}, monitor);
+ saveContainerState(javaProject.getProject(), container);
+ }
+ }
+ }
+
+ /**
+ * Returns the classpath entries found under the endorsed directories
+ */
+ private IClasspathEntry[] getClasspathEntries(IJavaProject javaProject, File[] endorsedDirs, IProgressMonitor monitor) {
+ List<IClasspathEntry> cpes = new ArrayList<IClasspathEntry>();
+ for (File dir : endorsedDirs) {
+ if (dir.isDirectory() && dir.canRead()) {
+ setEntries(dir, cpes);
+ }
+ }
+ return (IClasspathEntry[]) cpes.toArray(new IClasspathEntry[0]);
+ }
+
+ /**
+ * Adds all the jar and zip files found under the lib directory to the list of {@link IClasspathEntry}
+ */
+ private void setEntries(File lib, List<IClasspathEntry> cpes) {
+ if (!lib.canRead()) {
+ return;
+ }
+ for (File f : lib.listFiles(new JarFilter())) {
+ if (f.isFile()) {
+ IPath fullPath = new Path(f.getAbsolutePath());
+ IClasspathEntry entry = JavaCore.newLibraryEntry(fullPath, null, null);
+ if (!cpes.contains(entry)) {
+ cpes.add(entry);
+ }
+ }
+ }
+ }
+
+
+ private void saveContainerState(IProject project, IClasspathContainer container) {
+ File containerStateFile = getContainerStateFile(project);
+ FileOutputStream is = null;
+ try {
+ is = new FileOutputStream(containerStateFile);
+ new MavenClasspathContainerSaveHelper().writeContainer(container, is);
+ } catch (IOException ex) {
+ MavenJdtActivator.log(
+ "Can't save classpath container state for " + project.getName(), ex); //$NON-NLS-1$
+ } finally {
+ closeQuietly(is, "Can't close output stream for " + containerStateFile.getAbsolutePath());
+ }
+ }
+
+ public IClasspathContainer getSavedContainer(IProject project)
+ throws CoreException {
+ File containerStateFile = getContainerStateFile(project);
+ if (!containerStateFile.exists()) {
+ return null;
+ }
+
+ FileInputStream is = null;
+ try {
+ is = new FileInputStream(containerStateFile);
+ return new MavenClasspathContainerSaveHelper().readContainer(is);
+ } catch (IOException ex) {
+ throw new CoreException(new Status(IStatus.ERROR,
+ MavenJdtActivator.PLUGIN_ID, -1, //
+ "Can't read classpath container state for "
+ + project.getName(), ex));
+ } catch (ClassNotFoundException ex) {
+ throw new CoreException(new Status(IStatus.ERROR,
+ MavenJdtActivator.PLUGIN_ID, -1, //
+ "Can't read classpath container state for "
+ + project.getName(), ex));
+ } finally {
+ closeQuietly(is, "Can't close output stream for " + containerStateFile.getAbsolutePath());
+ }
+ }
+
+ private void closeQuietly(Closeable c, String message) {
+ if (c != null) {
+ try {
+ c.close();
+ } catch (IOException e) {
+ MavenJdtActivator.log(message, e);
+ }
+ }
+ }
+
+ private File getContainerStateFile(IProject project) {
+ return new File(stateLocationDir, project.getName() + ".container"); //$NON-NLS-1$
+ }
+}
Added: trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/configurators/JarFilter.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/configurators/JarFilter.java (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/configurators/JarFilter.java 2012-05-10 13:17:28 UTC (rev 40911)
@@ -0,0 +1,12 @@
+package org.jboss.tools.maven.jdt.configurators;
+
+import java.io.File;
+import java.io.FilenameFilter;
+
+public class JarFilter implements FilenameFilter {
+
+ public boolean accept(File dir, String name) {
+ return name.endsWith(".jar") || name.endsWith(".zip");
+ }
+
+}
Added: trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/configurators/xpl/MavenClasspathContainerSaveHelper.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/configurators/xpl/MavenClasspathContainerSaveHelper.java (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/configurators/xpl/MavenClasspathContainerSaveHelper.java 2012-05-10 13:17:28 UTC (rev 40911)
@@ -0,0 +1,198 @@
+/*******************************************************************************
+ * Copyright (c) 2008-2010 Sonatype, Inc.
+ * 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:
+ * Sonatype, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.jboss.tools.maven.jdt.configurators.xpl;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.OutputStream;
+import java.io.Serializable;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jdt.core.IAccessRule;
+import org.eclipse.jdt.core.IClasspathAttribute;
+import org.eclipse.jdt.core.IClasspathContainer;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.JavaCore;
+
+
+/**
+ * BuildPath save helper copied as-is from {@link org.eclipse.m2e.jdt.internal.MavenClasspathContainerSaveHelper}
+ *
+ * @author Eugene Kuleshov
+ */
+public class MavenClasspathContainerSaveHelper {
+
+ public IClasspathContainer readContainer(InputStream input) throws IOException, ClassNotFoundException {
+ ObjectInputStream is = new ObjectInputStream(new BufferedInputStream(input)) {
+ {
+ enableResolveObject(true);
+ }
+ protected Object resolveObject(Object o) throws IOException {
+ if(o instanceof ProjectEntryReplace) {
+ return ((ProjectEntryReplace) o).getEntry();
+ } else if(o instanceof LibraryEntryReplace) {
+ return ((LibraryEntryReplace) o).getEntry();
+ } else if(o instanceof ClasspathAttributeReplace) {
+ return ((ClasspathAttributeReplace) o).getAttribute();
+ } else if(o instanceof AccessRuleReplace) {
+ return ((AccessRuleReplace) o).getAccessRule();
+ } else if(o instanceof PathReplace) {
+ return ((PathReplace) o).getPath();
+ }
+ return super.resolveObject(o);
+ }
+ };
+ return (IClasspathContainer) is.readObject();
+ }
+
+ public void writeContainer(IClasspathContainer container, OutputStream output) throws IOException {
+ ObjectOutputStream os = new ObjectOutputStream(new BufferedOutputStream(output)) {
+ {
+ enableReplaceObject(true);
+ }
+
+ protected Object replaceObject(Object o) throws IOException {
+ if(o instanceof IClasspathEntry) {
+ IClasspathEntry e = (IClasspathEntry) o;
+ if(e.getEntryKind()==IClasspathEntry.CPE_PROJECT) {
+ return new ProjectEntryReplace(e);
+ } else if(e.getEntryKind()==IClasspathEntry.CPE_LIBRARY) {
+ return new LibraryEntryReplace(e);
+ }
+ } else if(o instanceof IClasspathAttribute) {
+ return new ClasspathAttributeReplace((IClasspathAttribute) o);
+ } else if(o instanceof IAccessRule) {
+ return new AccessRuleReplace((IAccessRule) o);
+ } else if(o instanceof IPath) {
+ return new PathReplace((IPath) o);
+ }
+ return super.replaceObject(o);
+ }
+ };
+ os.writeObject(container);
+ os.flush();
+ }
+
+ /**
+ * A library IClasspathEntry replacement used for object serialization
+ */
+ static final class LibraryEntryReplace implements Serializable {
+ private static final long serialVersionUID = 3901667379326978799L;
+
+ private final IPath path;
+ private final IPath sourceAttachmentPath;
+ private final IPath sourceAttachmentRootPath;
+ private final IClasspathAttribute[] extraAttributes;
+ private final boolean exported;
+ private final IAccessRule[] accessRules;
+
+ LibraryEntryReplace(IClasspathEntry entry) {
+ this.path = entry.getPath();
+ this.sourceAttachmentPath = entry.getSourceAttachmentPath();
+ this.sourceAttachmentRootPath = entry.getSourceAttachmentRootPath();
+ this.accessRules = entry.getAccessRules();
+ this.extraAttributes = entry.getExtraAttributes();
+ this.exported = entry.isExported();
+ }
+
+ IClasspathEntry getEntry() {
+ return JavaCore.newLibraryEntry(path, sourceAttachmentPath, sourceAttachmentRootPath, //
+ accessRules, extraAttributes, exported);
+ }
+ }
+
+ /**
+ * A project IClasspathEntry replacement used for object serialization
+ */
+ static final class ProjectEntryReplace implements Serializable {
+ private static final long serialVersionUID = -2397483865904288762L;
+
+ private final IPath path;
+ private final IClasspathAttribute[] extraAttributes;
+ private final IAccessRule[] accessRules;
+ private final boolean exported;
+ private final boolean combineAccessRules;
+
+ ProjectEntryReplace(IClasspathEntry entry) {
+ this.path = entry.getPath();
+ this.accessRules = entry.getAccessRules();
+ this.extraAttributes = entry.getExtraAttributes();
+ this.exported = entry.isExported();
+ this.combineAccessRules = entry.combineAccessRules();
+ }
+
+ IClasspathEntry getEntry() {
+ return JavaCore.newProjectEntry(path, accessRules, //
+ combineAccessRules, extraAttributes, exported);
+ }
+ }
+
+ /**
+ * An IClasspathAttribute replacement used for object serialization
+ */
+ static final class ClasspathAttributeReplace implements Serializable {
+ private static final long serialVersionUID = 6370039352012628029L;
+
+ private final String name;
+ private final String value;
+
+ ClasspathAttributeReplace(IClasspathAttribute attribute) {
+ this.name = attribute.getName();
+ this.value = attribute.getValue();
+ }
+
+ IClasspathAttribute getAttribute() {
+ return JavaCore.newClasspathAttribute(name, value);
+ }
+ }
+
+ /**
+ * An IAccessRule replacement used for object serialization
+ */
+ static final class AccessRuleReplace implements Serializable {
+ private static final long serialVersionUID = 7315582893941374715L;
+
+ private final IPath pattern;
+ private final int kind;
+
+ AccessRuleReplace(IAccessRule accessRule) {
+ pattern = accessRule.getPattern();
+ kind = accessRule.getKind();
+ }
+
+ IAccessRule getAccessRule() {
+ return JavaCore.newAccessRule(pattern, kind);
+ }
+ }
+
+ /**
+ * An IPath replacement used for object serialization
+ */
+ static final class PathReplace implements Serializable {
+ private static final long serialVersionUID = -2361259525684491181L;
+
+ private final String path;
+
+ PathReplace(IPath path) {
+ this.path = path.toPortableString();
+ }
+
+ IPath getPath() {
+ return Path.fromPortableString(path);
+ }
+ }
+
+}
Modified: trunk/maven/plugins/pom.xml
===================================================================
--- trunk/maven/plugins/pom.xml 2012-05-10 11:38:49 UTC (rev 40910)
+++ trunk/maven/plugins/pom.xml 2012-05-10 13:17:28 UTC (rev 40911)
@@ -6,6 +6,7 @@
<groupId>org.jboss.tools</groupId>
<artifactId>maven</artifactId>
<version>1.3.0-SNAPSHOT</version>
+ <relativePath>..</relativePath>
</parent>
<groupId>org.jboss.tools.maven</groupId>
<artifactId>plugins</artifactId>
@@ -29,6 +30,7 @@
<module>org.jboss.tools.maven.gwt</module>
<module>org.jboss.tools.maven.sourcelookup.core</module>
<module>org.jboss.tools.maven.sourcelookup.ui</module>
- </modules>
+ <module>org.jboss.tools.maven.jdt</module>
+ </modules>
</project>
Modified: trunk/maven/site/category.xml
===================================================================
--- trunk/maven/site/category.xml 2012-05-10 11:38:49 UTC (rev 40910)
+++ trunk/maven/site/category.xml 2012-05-10 13:17:28 UTC (rev 40911)
@@ -47,6 +47,9 @@
<feature url="features/org.jboss.tools.maven.sourcelookup.feature_0.0.0.jar" id="org.jboss.tools.maven.sourcelookup.feature" version="0.0.0">
<category name="JBoss Tools maven Nightly Build Update Site"/>
</feature>
+ <feature url="features/org.jboss.tools.maven.jdt.feature_0.0.0.jar" id="org.jboss.tools.maven.jdt.feature" version="0.0.0">
+ <category name="JBoss Tools maven Nightly Build Update Site"/>
+ </feature>
<!-- Sources -->
<feature url="features/org.jboss.tools.maven.feature.source_0.0.0.jar" id="org.jboss.tools.maven.feature.source" version="0.0.0">
<category name="JBoss Tools maven Nightly Build Update Site"/>
@@ -90,4 +93,8 @@
<feature url="features/org.jboss.tools.maven.sourcelookup.feature.source_0.0.0.jar" id="org.jboss.tools.maven.sourcelookup.feature.source" version="0.0.0">
<category name="JBoss Tools maven Nightly Build Update Site"/>
</feature>
+ <feature url="features/org.jboss.tools.maven.jdt.feature.source_0.0.0.jar" id="org.jboss.tools.maven.jdt.feature.source" version="0.0.0">
+ <category name="JBoss Tools maven Nightly Build Update Site"/>
+ </feature>
+
</site>
12 years, 8 months
JBoss Tools SVN: r40910 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2012-05-10 07:38:49 -0400 (Thu, 10 May 2012)
New Revision: 40910
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/AS7DeploymentScannerUtility.java
Log:
JBIDE-9239 change mixedcase prefix to lowercase prefix
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/AS7DeploymentScannerUtility.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/AS7DeploymentScannerUtility.java 2012-05-10 08:22:10 UTC (rev 40909)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/AS7DeploymentScannerUtility.java 2012-05-10 11:38:49 UTC (rev 40910)
@@ -23,7 +23,7 @@
import org.jboss.ide.eclipse.as.management.core.JBoss7ManagerUtil;
public class AS7DeploymentScannerUtility {
- public static final String SCANNER_PREFIX = "JBossToolsScanner"; //$NON-NLS-1$
+ public static final String SCANNER_PREFIX = "jbosstoolsscanner"; //$NON-NLS-1$
public IStatus addDeploymentScanner(final IServer server, String scannerName, final String folder) {
ModelNode op = new ModelNode();
12 years, 8 months
JBoss Tools SVN: r40909 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-05-10 04:22:10 -0400 (Thu, 10 May 2012)
New Revision: 40909
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ServerAdapterFactory.java
Log:
JBIDE-11735 - context root changing
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ServerAdapterFactory.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ServerAdapterFactory.java 2012-05-10 08:09:51 UTC (rev 40908)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/appimport/ServerAdapterFactory.java 2012-05-10 08:22:10 UTC (rev 40909)
@@ -80,7 +80,6 @@
IRuntime runtime, IApplication application, UserDelegate user,
String deployProject, String remoteName, IProgressMonitor monitor) {
try {
- renameWebContextRoot(importedProjects);
IServer server = doCreateServerAdapter(serverType, runtime, application, user, deployProject, remoteName);
addModules(getModules(importedProjects), server, monitor);
} catch (CoreException ce) {
@@ -96,12 +95,6 @@
}
}
- private void renameWebContextRoot(List<IProject> importedProjects) {
- for (IProject project : importedProjects) {
- ComponentUtilities.setServerContextRoot(project, "/");
- }
- }
-
private IServer doCreateServerAdapter(IServerType serverType, IRuntime rt,
IApplication application, UserDelegate user, String deployProject, String remoteName) throws CoreException,
OpenShiftException, SocketTimeoutException {
12 years, 8 months
JBoss Tools SVN: r40908 - in trunk/as: plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-05-10 04:09:51 -0400 (Thu, 10 May 2012)
New Revision: 40908
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JSTPublisherXMLToucher.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IPublishCopyCallbackHandler.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DelegatingServerBehavior.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/xpl/LocalCopyCallback.java
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSERemotePublishHandler.java
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/v2/MockPublishMethod.java
Log:
JBIDE-11776
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JSTPublisherXMLToucher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JSTPublisherXMLToucher.java 2012-05-10 07:36:27 UTC (rev 40907)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JSTPublisherXMLToucher.java 2012-05-10 08:09:51 UTC (rev 40908)
@@ -15,6 +15,7 @@
import java.util.HashMap;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.wst.server.core.IModule;
import org.jboss.ide.eclipse.as.core.server.IPublishCopyCallbackHandler;
@@ -49,7 +50,7 @@
}
public void touchDescriptors(IPath moduleRoot, IPublishCopyCallbackHandler handler) {
for( int i = 0; i < paths.length; i++ ) {
- handler.touchResource(paths[i]);
+ handler.touchResource(paths[i], new NullProgressMonitor());
}
}
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IPublishCopyCallbackHandler.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IPublishCopyCallbackHandler.java 2012-05-10 07:36:27 UTC (rev 40907)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IPublishCopyCallbackHandler.java 2012-05-10 08:09:51 UTC (rev 40908)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.ide.eclipse.as.core.server;
import org.eclipse.core.runtime.CoreException;
@@ -66,5 +76,5 @@
* @param path
* @return
*/
- public IStatus[] touchResource(IPath path);
+ public IStatus[] touchResource(IPath path, IProgressMonitor monitor);
}
\ No newline at end of file
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DelegatingServerBehavior.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DelegatingServerBehavior.java 2012-05-10 07:36:27 UTC (rev 40907)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DelegatingServerBehavior.java 2012-05-10 08:09:51 UTC (rev 40908)
@@ -189,7 +189,8 @@
IPath depPath = PublishUtil.getDeployPath(method, module, ds);
if( ServerModelUtilities.isBinaryModule(module[module.length-1]) || ds.zipsWTPDeployments()) {
// touch the file
- method.getCallbackHandler(depPath.removeLastSegments(1), getServer()).touchResource(new Path(depPath.lastSegment()));
+ method.getCallbackHandler(depPath.removeLastSegments(1), getServer())
+ .touchResource(new Path(depPath.lastSegment()), monitor);
} else {
// touch the descriptor
IPublishCopyCallbackHandler callback = method.getCallbackHandler(AbstractServerToolsPublisher.getRootPath(depPath).append(depPath), getServer());
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/xpl/LocalCopyCallback.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/xpl/LocalCopyCallback.java 2012-05-10 07:36:27 UTC (rev 40907)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/xpl/LocalCopyCallback.java 2012-05-10 08:09:51 UTC (rev 40908)
@@ -327,7 +327,7 @@
return new IStatus[] {Status.OK_STATUS};
}
- public IStatus[] touchResource(IPath path) {
+ public IStatus[] touchResource(IPath path, IProgressMonitor monitor) {
File tmp = deployRootFolder.append(path).toFile();
if( !tmp.exists())
tmp = deployRootFolder.toFile();
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSERemotePublishHandler.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSERemotePublishHandler.java 2012-05-10 07:36:27 UTC (rev 40907)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSERemotePublishHandler.java 2012-05-10 08:09:51 UTC (rev 40908)
@@ -22,7 +22,8 @@
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Status;
-import org.eclipse.rse.services.clientserver.messages.SystemElementNotFoundException;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.rse.core.model.IHost;
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
import org.eclipse.wst.common.project.facet.core.util.internal.ProgressMonitorUtil;
@@ -30,9 +31,6 @@
import org.jboss.ide.eclipse.as.core.extensions.events.IEventCodes;
import org.jboss.ide.eclipse.as.core.publishers.PublishUtil;
import org.jboss.ide.eclipse.as.core.server.IPublishCopyCallbackHandler;
-import org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior;
-import org.jboss.ide.eclipse.as.core.server.xpl.PublishCopyUtil;
-import org.jboss.ide.eclipse.as.core.util.ServerConverter;
public class RSERemotePublishHandler implements IPublishCopyCallbackHandler {
protected IPath root;
@@ -46,28 +44,47 @@
public boolean shouldRestartModule() {
return shouldRestartModule;
}
- public IStatus[] copyFile(final IModuleFile mf, final IPath path,
- final IProgressMonitor monitor) throws CoreException {
- final File file = PublishUtil.getFile(mf);
- shouldRestartModule |= method.getBehaviour().changedFileRequiresModuleRestart(mf);
- final IPath remotePath = root.append(path);
+
+ private interface RunnableWithProgress2 {
+ public void run(IProgressMonitor monitor) throws CoreException, SystemMessageException, RuntimeException;
+ }
+
+ protected IStatus generateFailStatus(String message, String resource, Exception sme) {
+ String connectionName = RSEUtils.getRSEConnectionName(method.getBehaviour().getServer());
+ IHost host = RSEUtils.findHost(connectionName);
+ IStatus s = new Status(IStatus.ERROR, RSECorePlugin.PLUGIN_ID, IEventCodes.JST_PUB_FAIL,
+ NLS.bind(message, resource, host == null ? null : host.getName()), sme);
+ return s;
+ }
+
+ private IStatus[] wrapRemoteCall(final RunnableWithProgress2 runnable,
+ final String remoteResource, final String failErrorMessage,
+ final IProgressMonitor monitor) throws CoreException, RuntimeException {
+ return wrapRemoteCall(runnable, remoteResource, failErrorMessage, true, monitor);
+ }
+
+ private IStatus[] wrapRemoteCall(final RunnableWithProgress2 runnable,
+ final String remoteResource, final String failErrorMessage,
+ final boolean alwaysThrow, final IProgressMonitor monitor) throws CoreException, RuntimeException {
final CoreException[] coreEx = new CoreException[1];
final RuntimeException[] runtEx = new RuntimeException[1];
+ final IStatus[] failStat = new IStatus[1];
coreEx[0] = null;
runtEx[0] = null;
-
+ failStat[0] = null;
Thread t = new Thread("RSERemotePublishHandler") {
public void run() {
try {
- method.getFileService().upload(file, remotePath.removeLastSegments(1).toString(),
- remotePath.lastSegment(), true, null, null, monitor);
+ runnable.run(monitor);
} catch( CoreException ce ) {
coreEx[0] = ce;
} catch( SystemMessageException sme ) {
- IStatus s = new Status(IStatus.ERROR, RSECorePlugin.PLUGIN_ID, IEventCodes.JST_PUB_FAIL,
- "failed to copy to " + remotePath.toString(), sme);
- coreEx[0] = new CoreException(s);
+ IStatus stat = generateFailStatus(failErrorMessage, remoteResource, sme);
+ if( alwaysThrow )
+ coreEx[0] = new CoreException(stat);
+ else
+ failStat[0] = stat;
} catch( RuntimeException re) {
runtEx[0] = re;
}
@@ -87,45 +104,40 @@
}
if( runtEx[0] != null ) throw runtEx[0];
if( coreEx[0] != null ) throw coreEx[0];
+ if( failStat[0] != null ) return failStat;
return new IStatus[]{};
+
}
+
+ public IStatus[] copyFile(final IModuleFile mf, final IPath path,
+ final IProgressMonitor monitor) throws CoreException {
+ final File file = PublishUtil.getFile(mf);
+ shouldRestartModule |= method.getBehaviour().changedFileRequiresModuleRestart(mf);
+ final IPath remotePath = root.append(path);
+
+
+ RunnableWithProgress2 run = new RunnableWithProgress2() {
+ public void run(IProgressMonitor monitor) throws CoreException,
+ SystemMessageException, RuntimeException {
+ method.getFileService().upload(file, remotePath.removeLastSegments(1).toString(),
+ remotePath.lastSegment(), true, null, null, monitor);
+ }
+ };
+
+ return wrapRemoteCall(run, remotePath.toString(), "failed to copy to {0} on host {1}", monitor);
+ }
public IStatus[] deleteResource(final IPath path, final IProgressMonitor monitor)
throws CoreException {
final IPath remotePath = root.append(path);
- final CoreException[] coreEx = new CoreException[1];
- final RuntimeException[] runtEx = new RuntimeException[1];
- coreEx[0] = null;
- runtEx[0] = null;
- Thread t = new Thread("RSERemotePublishHandler") {
- public void run() {
- try {
- method.getFileService().delete(remotePath.removeLastSegments(1).toString(), remotePath.lastSegment(), monitor);
- } catch(SystemElementNotFoundException senfe ) {
- // ignore, file already does not exist remotely
- } catch( SystemMessageException sme ) {
- IStatus s = new Status(IStatus.ERROR, RSECorePlugin.PLUGIN_ID, IEventCodes.JST_PUB_FAIL,
- "failed to delete " + remotePath.toString(), sme);
- coreEx[0] = new CoreException(s);
- } catch(CoreException ce) {
- coreEx[0] = ce;
- } catch(RuntimeException re) {
- runtEx[0] = re;
- }
+ RunnableWithProgress2 run = new RunnableWithProgress2() {
+ public void run(IProgressMonitor monitor) throws CoreException,
+ SystemMessageException, RuntimeException {
+ method.getFileService().delete(remotePath.removeLastSegments(1).toString(), remotePath.lastSegment(), monitor);
}
};
- t.start();
- while(!monitor.isCanceled() && t.isAlive()) {
- try {
- Thread.sleep(500);
- } catch(InterruptedException ie) {}
- }
- if( monitor.isCanceled())
- throw new CoreException(Status.CANCEL_STATUS);
- if( runtEx[0] != null ) throw runtEx[0];
- if( coreEx[0] != null ) throw coreEx[0];
- return new IStatus[]{};
+ return wrapRemoteCall(run, remotePath.toString(), "failed to delete {0} on host {1}", monitor);
}
public IStatus[] makeDirectoryIfRequired(final IPath dir,
@@ -137,100 +149,54 @@
if( createdFolders.contains(toMake))
return new IStatus[]{Status.OK_STATUS};
- final CoreException[] coreEx = new CoreException[1];
- final RuntimeException[] runtEx = new RuntimeException[1];
- final IStatus[] failStat = new IStatus[1];
- coreEx[0] = null;
- runtEx[0] = null;
- failStat[0] = null;
- Thread t = new Thread("RSERemotePublishHandler") {
- public void run() {
- try {
- if( toMake.segmentCount() > 0 ) {
- method.getFileService().createFolder(toMake.removeLastSegments(1).toString(),
- toMake.lastSegment(), ProgressMonitorUtil.submon(monitor, 30));
- }
- } catch( SystemMessageException sme ) {
- IStatus s = new Status(IStatus.ERROR, RSECorePlugin.PLUGIN_ID, IEventCodes.JST_PUB_FAIL,
- "failed to create folder " + toMake.toString(), sme);
- failStat[0] = s;
- } catch( CoreException ce ) {
- coreEx[0] = ce;
- } catch( RuntimeException re) {
- runtEx[0] = re;
+ RunnableWithProgress2 run = new RunnableWithProgress2() {
+ public void run(IProgressMonitor monitor) throws CoreException,
+ SystemMessageException, RuntimeException {
+ if( toMake.segmentCount() > 0 ) {
+ method.getFileService().createFolder(toMake.removeLastSegments(1).toString(),
+ toMake.lastSegment(), monitor);
}
- createdFolders.add(toMake);
}
};
- t.start();
- while(!monitor.isCanceled() && t.isAlive()) {
- try {
- Thread.sleep(500);
- } catch(InterruptedException ie) {}
- }
-
- if( monitor.isCanceled())
- throw new CoreException(Status.CANCEL_STATUS);
- if( runtEx[0] != null ) throw runtEx[0];
- if( coreEx[0] != null ) throw coreEx[0];
- if( failStat[0] != null ) return failStat;
- monitor.done();
- return new IStatus[]{};
+ return wrapRemoteCall(run, toMake.toString(), "failed to create folder {0} on host {1}", false, monitor);
}
- // TODO DEPRECATE! This needs an IProgressMonitor api to avoid blockage! JBIDE-9384
- public IStatus[] touchResource(final IPath path) {
+ public IStatus[] touchResource(final IPath path, IProgressMonitor monitor) {
final IPath file = root.append(path);
- try {
- IRemoteFile rf = method.getFileServiceSubSystem().getRemoteFileObject(file.toString(), new NullProgressMonitor());
- if( !rf.exists()) {
- rf = method.getFileServiceSubSystem().getRemoteFileObject(root.toString(), new NullProgressMonitor());
+
+ RunnableWithProgress2 run = new RunnableWithProgress2() {
+ public void run(IProgressMonitor monitor) throws CoreException,
+ SystemMessageException, RuntimeException {
+ IRemoteFile rf = method.getFileServiceSubSystem().getRemoteFileObject(file.toString(), new NullProgressMonitor());
+ if( !rf.exists()) {
+ rf = method.getFileServiceSubSystem().getRemoteFileObject(root.toString(), new NullProgressMonitor());
+ }
+ method.getFileServiceSubSystem().setLastModified(rf, new Date().getTime(), null);
}
- method.getFileServiceSubSystem().setLastModified(rf, new Date().getTime(), null);
- } catch(SystemMessageException sme) {
- IStatus s = new Status(IStatus.ERROR, RSECorePlugin.PLUGIN_ID, IEventCodes.JST_PUB_FAIL,
- "failed to touch remote resource " + file.toString(), sme);
- return new IStatus[]{s};
+ };
+ try {
+ return wrapRemoteCall(run, file.toString(), "failed to touch resource {0} on host {1}", false, monitor);
+ } catch(CoreException ce) {
+ return new IStatus[]{ce.getStatus()};
}
- return new IStatus[]{};
}
public boolean isFile(final IPath path, final IProgressMonitor monitor)
throws CoreException {
final IPath file = root.append(path);
- final CoreException[] coreEx = new CoreException[1];
- final RuntimeException[] runtEx = new RuntimeException[1];
+
final Boolean[] boolRet = new Boolean[1];
- coreEx[0] = null;
- runtEx[0] = null;
boolRet[0] = null;
- Thread t = new Thread("RSERemotePublishHandler") {
- public void run() {
- try {
- IRemoteFile rf = method.getFileServiceSubSystem().getRemoteFileObject(file.toString(), new NullProgressMonitor());
- boolRet[0] = rf.exists() && rf.isFile();
- } catch(SystemMessageException sme) {
- IStatus s = new Status(IStatus.ERROR, RSECorePlugin.PLUGIN_ID, IEventCodes.JST_PUB_FAIL,
- "failed to touch remote resource " + file.toString(), sme);
- coreEx[0] = new CoreException(s);
- } catch( RuntimeException re) {
- runtEx[0] = re;
- }
+
+ RunnableWithProgress2 run = new RunnableWithProgress2() {
+ public void run(IProgressMonitor monitor) throws CoreException,
+ SystemMessageException, RuntimeException {
+ IRemoteFile rf = method.getFileServiceSubSystem().getRemoteFileObject(file.toString(), new NullProgressMonitor());
+ boolRet[0] = rf.exists() && rf.isFile();
}
};
- t.start();
- while(!monitor.isCanceled() && t.isAlive()) {
- try {
- Thread.sleep(500);
- } catch(InterruptedException ie) {}
- }
-
- if( monitor.isCanceled()) {
- throw new CoreException(Status.CANCEL_STATUS);
- }
- if( runtEx[0] != null ) throw runtEx[0];
- if( coreEx[0] != null ) throw coreEx[0];
- monitor.done();
+
+ wrapRemoteCall(run, file.toString(), "failed to verify the existence of {0} on host {1}", monitor);
return boolRet[0];
}
}
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/v2/MockPublishMethod.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/v2/MockPublishMethod.java 2012-05-10 07:36:27 UTC (rev 40907)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/v2/MockPublishMethod.java 2012-05-10 08:09:51 UTC (rev 40908)
@@ -106,7 +106,7 @@
return new IStatus[]{};
}
- public IStatus[] touchResource(IPath path) {
+ public IStatus[] touchResource(IPath path, IProgressMonitor monitor) {
// System.out.println("touching " + root.append(path));
IPath path2 = root.append(path);
if( !changed.contains(path2.makeRelative()))
12 years, 8 months
JBoss Tools SVN: r40907 - trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test.
by jbosstools-commits@lists.jboss.org
Author: apodhrad
Date: 2012-05-10 03:36:27 -0400 (Thu, 10 May 2012)
New Revision: 40907
Added:
trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/requirements.properties
Log:
BPEL bot tests: added requirements.properties
Added: trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/requirements.properties
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/requirements.properties (rev 0)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.bot.test/requirements.properties 2012-05-10 07:36:27 UTC (rev 40907)
@@ -0,0 +1 @@
+requirements=soap
\ No newline at end of file
12 years, 8 months
JBoss Tools SVN: r40906 - trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test.
by jbosstools-commits@lists.jboss.org
Author: ljelinko
Date: 2012-05-10 03:06:59 -0400 (Thu, 10 May 2012)
New Revision: 40906
Modified:
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/pom.xml
Log:
Added mac os to target platform configuration.
Modified: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/pom.xml
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/pom.xml 2012-05-10 06:13:31 UTC (rev 40905)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/pom.xml 2012-05-10 07:06:59 UTC (rev 40906)
@@ -69,6 +69,48 @@
</dependencies>
</configuration>
</plugin>
+
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>target-platform-configuration</artifactId>
+ <version>${tychoVersion}</version>
+ <configuration>
+ <resolver>p2</resolver>
+ <ignoreTychoRepositories>true</ignoreTychoRepositories>
+ <environments>
+ <environment>
+ <os>macosx</os>
+ <ws>cocoa</ws>
+ <arch>x86</arch>
+ </environment>
+ <environment>
+ <os>macosx</os>
+ <ws>cocoa</ws>
+ <arch>x86_64</arch>
+ </environment>
+ <environment>
+ <os>win32</os>
+ <ws>win32</ws>
+ <arch>x86</arch>
+ </environment>
+ <environment>
+ <os>win32</os>
+ <ws>win32</ws>
+ <arch>x86_64</arch>
+ </environment>
+ <environment>
+ <os>linux</os>
+ <ws>gtk</ws>
+ <arch>x86</arch>
+ </environment>
+ <environment>
+ <os>linux</os>
+ <ws>gtk</ws>
+ <arch>x86_64</arch>
+ </environment>
+ </environments>
+ </configuration>
+ </plugin>
</plugins>
</build>
</project>
12 years, 8 months
JBoss Tools SVN: r40905 - in trunk/openshift/docs/reference/en-US: images/Creating_an_OpenShift_Express_Application and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2012-05-10 02:13:31 -0400 (Thu, 10 May 2012)
New Revision: 40905
Modified:
trunk/openshift/docs/reference/en-US/Creating_an_OpenShift_Express_Application.xml
trunk/openshift/docs/reference/en-US/images/Creating_an_OpenShift_Express_Application/application_creation_02.png
Log:
updated with new info
Modified: trunk/openshift/docs/reference/en-US/Creating_an_OpenShift_Express_Application.xml
===================================================================
--- trunk/openshift/docs/reference/en-US/Creating_an_OpenShift_Express_Application.xml 2012-05-10 03:50:53 UTC (rev 40904)
+++ trunk/openshift/docs/reference/en-US/Creating_an_OpenShift_Express_Application.xml 2012-05-10 06:13:31 UTC (rev 40905)
@@ -22,27 +22,24 @@
After clicking on the <guilabel>OpenShift Application</guilabel> link, the creation wizard will launch.
</para>
<figure id="application_creation_02">
- <title>Validating OpenShift credentials</title>
+ <title>Input OpenShift credentials</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/Creating_an_OpenShift_Express_Application/application_creation_02.png" format="PNG" />
</imageobject>
<textobject>
<phrase>
- Sever connection screen where you will validate your username and password for OpenShift or you can sign up for an account.
+ Sever connection screen where you will input your username and password for OpenShift or you can sign up for an account.
</phrase>
</textobject>
</mediaobject>
</figure>
<para>
- If you have already signed up for an OpenShift account then you can input your <guilabel>Username</guilabel> and <guilabel>Password</guilabel> here and click <guilabel>Validate</guilabel>. If validation is successful you will see the button is now unavailable and no error was presented.
+ If you have already signed up for an OpenShift account then you can input your <guilabel>Username</guilabel> and <guilabel>Password</guilabel> here and click the <guibutton>Next</guibutton> button. If validation is successful you will see the <guilabel>Setup OpenShift Application<guilabel> screen.
</para>
<para>
If you do not have an OpenShift account, you can create one through the link at the top of the wizard screen. This will open the OpenShift sign-up page within your workbench. Once you have created an account you will need to relaunch the <guilabel>OpenShift Application</guilabel> wizard and input your new username and password.
</para>
- <para>
- Click the <guibutton>Next</guibutton> button to proceed.
- </para>
<figure id="application_creation_03">
<title>Setting the domain name</title>
<mediaobject>
@@ -81,7 +78,7 @@
</para>
</note>
<para>
- Click the <guibutton>New</guibutton> in the <guilabel>Available Applications</guilabel> section of the wizard to begin creating your first OpenShift application for the specified domain.
+ Click the <guibutton>New</guibutton> button in the <guilabel>Available Applications</guilabel> section of the wizard to begin creating your first OpenShift application, for the specified domain.
</para>
<figure id="application_creation_05">
<title>Creating a new OpenShift application</title>
Modified: trunk/openshift/docs/reference/en-US/images/Creating_an_OpenShift_Express_Application/application_creation_02.png
===================================================================
(Binary files differ)
12 years, 8 months
JBoss Tools SVN: r40904 - in trunk/as/plugins: org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/containers/custom and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-05-09 23:50:53 -0400 (Wed, 09 May 2012)
New Revision: 40904
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/filesets/Fileset.java
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/filesets/FilesetDialog.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/containers/custom/CustomClasspathPreferencePage.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ExtendedServerPropertiesAdapterFactory.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/extendedproperties/JBossAS7ExtendedProperties.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/extendedproperties/JBossExtendedProperties.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/extendedproperties/ServerExtendedProperties.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/preferences/ServerTypePreferencePage.java
Log:
JBIDE-11820 to trunk cr1
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/filesets/Fileset.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/filesets/Fileset.java 2012-05-10 03:19:53 UTC (rev 40903)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/filesets/Fileset.java 2012-05-10 03:50:53 UTC (rev 40904)
@@ -60,7 +60,7 @@
return getFolder(folder, runtime, true);
}
public static String getFolder(String folder, IRuntime runtime, boolean ignoreError) {
- String tmp = new ConfigNameResolver().performSubstitutions(folder, runtime.getName(), ignoreError);
+ String tmp = new ConfigNameResolver().performSubstitutions(folder, runtime == null ? null : runtime.getName(), ignoreError);
IPath p = new Path(tmp);
if( !p.isAbsolute() && runtime != null ) {
p = runtime.getLocation().append(p);
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/filesets/FilesetDialog.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/filesets/FilesetDialog.java 2012-05-10 03:19:53 UTC (rev 40903)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/filesets/FilesetDialog.java 2012-05-10 03:50:53 UTC (rev 40904)
@@ -44,12 +44,14 @@
private FilesetPreviewComposite preview;
private IServer server;
private boolean showViewer = true;
+
+ private boolean requiresName = true;
protected FilesetDialog(Shell parentShell, String defaultLocation, IServer server) {
super(parentShell);
this.fileset = new Fileset();
this.fileset.setFolder(defaultLocation);
this.fileset.setServer(server);
- this.fileset.setIncludesPattern("**/*.xml"); //$NON-NLS-1$
+ this.fileset.setIncludesPattern(getDefaultIncludesPattern());
this.server = server;
}
protected FilesetDialog(Shell parentShell, Fileset fileset) {
@@ -57,6 +59,15 @@
this.fileset = (Fileset)fileset.clone();
this.server = fileset.getServer();
}
+
+ protected String getDefaultIncludesPattern() {
+ return "**/*.xml"; //$NON-NLS-1$
+ }
+
+ public void setRequiresName(boolean required) {
+ requiresName = required;
+ }
+
public void setShowViewer(boolean val) {
showViewer = val;
}
@@ -83,8 +94,9 @@
main.setLayout(new GridLayout(3, false));
main.setLayoutData(new GridData(GridData.FILL_BOTH));
fillArea(main);
-
- nameText.setText(fileset.getName());
+
+ if( requiresName )
+ nameText.setText(fileset.getName());
folderText.setText(fileset.getRawFolder());
includesText.setText(fileset.getIncludesPattern());
excludesText.setText(fileset.getExcludesPattern());
@@ -101,7 +113,8 @@
textModified();
}
};
- nameText.addModifyListener(mListener);
+ if( requiresName )
+ nameText.addModifyListener(mListener);
folderText.addModifyListener(mListener);
includesText.addModifyListener(mListener);
excludesText.addModifyListener(mListener);
@@ -134,7 +147,8 @@
}
protected void textModified() {
- name = nameText.getText();
+ if( requiresName )
+ name = nameText.getText();
dir = folderText.getText();
includes = includesText.getText();
excludes = excludesText.getText();
@@ -148,7 +162,7 @@
protected void validate() {
String error = null;
- if( name.equals("")) //$NON-NLS-1$
+ if( requiresName && name.equals("")) //$NON-NLS-1$
error = Messages.FilesetsDialogEmptyName;
else if( dir.equals("")) //$NON-NLS-1$
error = Messages.FilesetsDialogEmptyFolder;
@@ -166,12 +180,14 @@
}
protected void fillArea(Composite main) {
- Label nameLabel = new Label(main, SWT.NONE);
- nameLabel.setText(Messages.FilesetsNewName);
-
- nameText = new Text(main, SWT.BORDER);
- nameText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
-
+
+ if( requiresName ) {
+ Label nameLabel = new Label(main, SWT.NONE);
+ nameLabel.setText(Messages.FilesetsNewName);
+ nameText = new Text(main, SWT.BORDER);
+ nameText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
+ }
+
Label folderLabel = new Label(main, SWT.NONE);
folderLabel.setText(Messages.FilesetsNewRootDir);
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/containers/custom/CustomClasspathPreferencePage.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/containers/custom/CustomClasspathPreferencePage.java 2012-05-10 03:19:53 UTC (rev 40903)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/containers/custom/CustomClasspathPreferencePage.java 2012-05-10 03:50:53 UTC (rev 40904)
@@ -23,6 +23,7 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
@@ -56,6 +57,8 @@
import org.jboss.ide.eclipse.as.classpath.core.runtime.CustomRuntimeClasspathModel.IDefaultPathProvider;
import org.jboss.ide.eclipse.as.classpath.ui.ClasspathUIPlugin;
import org.jboss.ide.eclipse.as.classpath.ui.Messages;
+import org.jboss.ide.eclipse.as.core.server.internal.ExtendedServerPropertiesAdapterFactory;
+import org.jboss.ide.eclipse.as.core.server.internal.extendedproperties.ServerExtendedProperties;
import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
import org.jboss.ide.eclipse.as.ui.preferences.ServerTypePreferencePage;
import org.osgi.service.prefs.BackingStoreException;
@@ -272,15 +275,35 @@
protected EntryFilesetDialog(Shell parentShell,
String defaultLocation, IServer server) {
super(parentShell, defaultLocation, server);
+ setRequiresName(false);
}
public Fileset getFileset() {
return new CustomRuntimeClasspathModel.PathProviderFileset(fileset);
}
+ protected void configureShell(Shell shell) {
+ super.configureShell(shell);
+ shell.setText("New Default Classpath Fileset Entry");
+ }
+
+ protected Control createDialogArea(Composite parent) {
+ Control c = super.createDialogArea(parent);
+ setTitle("New Default Classpath Fileset Entry");
+ setMessage("Create a new classpath fileset which can be added to all projects targeting this runtime-type");
+ return c;
+ }
+ protected String getDefaultIncludesPattern() {
+ return "**/*.jar"; //$NON-NLS-1$
+ }
}
@Override
protected void addPressed() {
- FilesetDialog d = new EntryFilesetDialog(addButton.getShell(), "", null); //$NON-NLS-1$
+ String id = getCurrentId();
+ IRuntimeType rtt = id == null ? null : ServerCore.findRuntimeType(id);
+ ServerExtendedProperties props = rtt == null ? null :
+ (ServerExtendedProperties)Platform.getAdapterManager().getAdapter(rtt, ServerExtendedProperties.class);
+ String defaultLocation = props == null ? "" : props.getNewClasspathFilesetDefaultRootFolder();
+ FilesetDialog d = new EntryFilesetDialog(addButton.getShell(), defaultLocation, null);
d.setShowViewer(false);
if( d.open() == Window.OK) {
// For now, just add fileset
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ExtendedServerPropertiesAdapterFactory.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ExtendedServerPropertiesAdapterFactory.java 2012-05-10 03:19:53 UTC (rev 40903)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/ExtendedServerPropertiesAdapterFactory.java 2012-05-10 03:50:53 UTC (rev 40904)
@@ -14,8 +14,10 @@
import org.eclipse.core.runtime.IAdapterFactory;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.wst.server.core.IRuntime;
+import org.eclipse.wst.server.core.IRuntimeType;
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.IServerAttributes;
+import org.eclipse.wst.server.core.IServerType;
import org.jboss.ide.eclipse.as.core.server.internal.extendedproperties.JBossAS6ExtendedProperties;
import org.jboss.ide.eclipse.as.core.server.internal.extendedproperties.JBossAS710ExtendedProperties;
import org.jboss.ide.eclipse.as.core.server.internal.extendedproperties.JBossAS7ExtendedProperties;
@@ -53,6 +55,10 @@
} else if( adaptableObject instanceof IRuntime ) {
typeId = ((IRuntime)adaptableObject).getRuntimeType().getId();
r = (IRuntime)adaptableObject;
+ } else if( adaptableObject instanceof IRuntimeType ) {
+ typeId = ((IRuntimeType)adaptableObject).getId();
+ } else if( adaptableObject instanceof IServerType ) {
+ typeId = ((IServerType)adaptableObject).getId();
}
IAdaptable adaptable = s == null ? r : s;
if( typeId != null ) {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/extendedproperties/JBossAS7ExtendedProperties.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/extendedproperties/JBossAS7ExtendedProperties.java 2012-05-10 03:19:53 UTC (rev 40903)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/extendedproperties/JBossAS7ExtendedProperties.java 2012-05-10 03:50:53 UTC (rev 40904)
@@ -33,6 +33,11 @@
return IJBossRuntimeResourceConstants.AS7_STANDALONE + "/" + IJBossRuntimeResourceConstants.CONFIGURATION; //$NON-NLS-1$
}
+ public String getNewClasspathFilesetDefaultRootFolder() {
+ return IJBossRuntimeResourceConstants.AS7_MODULES + "/org"; //$NON-NLS-1$
+ }
+
+
public int getJMXProviderType() {
return JMX_DEFAULT_PROVIDER;
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/extendedproperties/JBossExtendedProperties.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/extendedproperties/JBossExtendedProperties.java 2012-05-10 03:19:53 UTC (rev 40903)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/extendedproperties/JBossExtendedProperties.java 2012-05-10 03:50:53 UTC (rev 40904)
@@ -59,7 +59,7 @@
}
protected ServerBeanLoader getServerBeanLoader() {
- return new ServerBeanLoader(runtime.getLocation().toFile());
+ return runtime == null ? null : new ServerBeanLoader(runtime.getLocation().toFile());
}
/**
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/extendedproperties/ServerExtendedProperties.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/extendedproperties/ServerExtendedProperties.java 2012-05-10 03:19:53 UTC (rev 40903)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/extendedproperties/ServerExtendedProperties.java 2012-05-10 03:50:53 UTC (rev 40904)
@@ -31,8 +31,11 @@
}
public String getNewFilesetDefaultRootFolder() {
- return "servers/${jboss_config}"; //$NON-NLS-1$
+ return "${jboss_config_dir}"; //$NON-NLS-1$
}
+ public String getNewClasspathFilesetDefaultRootFolder() {
+ return getNewFilesetDefaultRootFolder();
+ }
public static final int JMX_NULL_PROVIDER = -1;
public static final int JMX_DEFAULT_PROVIDER = 0;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2012-05-10 03:19:53 UTC (rev 40903)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2012-05-10 03:50:53 UTC (rev 40904)
@@ -1195,23 +1195,27 @@
<factory
adaptableType="org.eclipse.wst.server.core.IServer"
class="org.jboss.ide.eclipse.as.core.server.internal.ExtendedServerPropertiesAdapterFactory">
- <adapter
- type="org.jboss.ide.eclipse.as.core.server.internal.extendedproperties.ServerExtendedProperties">
- </adapter>
- <adapter
- type="org.jboss.ide.eclipse.as.core.server.internal.extendedproperties.JBossExtendedProperties">
- </adapter>
+ <adapter type="org.jboss.ide.eclipse.as.core.server.internal.extendedproperties.ServerExtendedProperties"/>
+ <adapter type="org.jboss.ide.eclipse.as.core.server.internal.extendedproperties.JBossExtendedProperties"/>
</factory>
<factory
adaptableType="org.eclipse.wst.server.core.IRuntime"
class="org.jboss.ide.eclipse.as.core.server.internal.ExtendedServerPropertiesAdapterFactory">
- <adapter
- type="org.jboss.ide.eclipse.as.core.server.internal.extendedproperties.ServerExtendedProperties">
- </adapter>
- <adapter
- type="org.jboss.ide.eclipse.as.core.server.internal.extendedproperties.JBossExtendedProperties">
- </adapter>
+ <adapter type="org.jboss.ide.eclipse.as.core.server.internal.extendedproperties.ServerExtendedProperties"/>
+ <adapter type="org.jboss.ide.eclipse.as.core.server.internal.extendedproperties.JBossExtendedProperties"/>
</factory>
+ <factory
+ adaptableType="org.eclipse.wst.server.core.IServerType"
+ class="org.jboss.ide.eclipse.as.core.server.internal.ExtendedServerPropertiesAdapterFactory">
+ <adapter type="org.jboss.ide.eclipse.as.core.server.internal.extendedproperties.ServerExtendedProperties"/>
+ <adapter type="org.jboss.ide.eclipse.as.core.server.internal.extendedproperties.JBossExtendedProperties"/>
+ </factory>
+ <factory
+ adaptableType="org.eclipse.wst.server.core.IRuntimeType"
+ class="org.jboss.ide.eclipse.as.core.server.internal.ExtendedServerPropertiesAdapterFactory">
+ <adapter type="org.jboss.ide.eclipse.as.core.server.internal.extendedproperties.ServerExtendedProperties"/>
+ <adapter type="org.jboss.ide.eclipse.as.core.server.internal.extendedproperties.JBossExtendedProperties"/>
+ </factory>
</extension>
</plugin>
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/preferences/ServerTypePreferencePage.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/preferences/ServerTypePreferencePage.java 2012-05-10 03:19:53 UTC (rev 40903)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/preferences/ServerTypePreferencePage.java 2012-05-10 03:50:53 UTC (rev 40904)
@@ -181,7 +181,7 @@
}
public String getDescriptionLabel() {
- return "Desc label";
+ return "";
}
protected void createRightColumnButtons(Composite c) {
insertAddRemove(c);
12 years, 8 months
JBoss Tools SVN: r40903 - trunk/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2012-05-09 23:19:53 -0400 (Wed, 09 May 2012)
New Revision: 40903
Modified:
trunk/build/pom.xml
Log:
add get-bootstrap profile
Modified: trunk/build/pom.xml
===================================================================
--- trunk/build/pom.xml 2012-05-10 01:05:02 UTC (rev 40902)
+++ trunk/build/pom.xml 2012-05-10 03:19:53 UTC (rev 40903)
@@ -517,6 +517,18 @@
</profile>
<profile>
+ <id>gwt-bootstrap</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <modules>
+ <module>../tests</module>
+ <module>../gwt</module>
+ <module>../usage</module>
+ </modules>
+ </profile>
+
+ <profile>
<id>deltacloud</id>
<activation>
<activeByDefault>true</activeByDefault>
12 years, 8 months