JBoss Tools SVN: r41284 - in trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test: uiutils and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-05-23 07:28:54 -0400 (Wed, 23 May 2012)
New Revision: 41284
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDITestBase.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIProjectHelper.java
Log:
method for set configured runtime as targeted runtime moved to ui.bot.ext
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDITestBase.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDITestBase.java 2012-05-23 11:27:39 UTC (rev 41283)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDITestBase.java 2012-05-23 11:28:54 UTC (rev 41284)
@@ -84,10 +84,8 @@
String projectLocation, String dir) {
ImportHelper.importProject(projectLocation, dir, PluginActivator.PLUGIN_ID);
-
- /** configure JDK and required runtime */
- projectHelper.addDefaultJDKIntoProject(projectName);
- projectHelper.addConfiguredRuntimeIntoProject(projectName,
+
+ eclipse.addConfiguredRuntimeIntoProject(projectName,
configuredState.getServer().name);
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIProjectHelper.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIProjectHelper.java 2012-05-23 11:27:39 UTC (rev 41283)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIProjectHelper.java 2012-05-23 11:28:54 UTC (rev 41284)
@@ -14,7 +14,6 @@
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.jboss.tools.cdi.bot.test.CDIConstants;
@@ -87,37 +86,6 @@
}
/**
- * Add defined runtime into project as targeted runtime
- * @param project
- */
- public void addConfiguredRuntimeIntoProject(String project,
- String configuredRuntime) {
- projectExplorer.selectProject(project);
- bot.menu(IDELabel.Menu.FILE).menu(
- IDELabel.Menu.PROPERTIES).click();
- bot.waitForShell(IDELabel.Shell.PROPERTIES_FOR + " " + project);
- SWTBotShell propertiesShell = bot.shell(
- IDELabel.Shell.PROPERTIES_FOR + " " + project);
- propertiesShell.activate();
- SWTBotTreeItem item = bot.tree().getTreeItem("Targeted Runtimes");
- item.select();
- SWTBotTable runtimes = bot.table();
- for (int i = 0; i < runtimes.rowCount(); i++) {
- runtimes.getTableItem(i).uncheck();
- }
- for (int i = 0; i < runtimes.rowCount(); i++) {
- if (runtimes.getTableItem(i).getText().equals(configuredRuntime)) {
- runtimes.getTableItem(i).check();
- }
- }
- bot.button(IDELabel.Button.OK).click();
- bot.waitWhile(new ShellIsActiveCondition(propertiesShell),
- TaskDuration.LONG.getTimeout());
- util.waitForNonIgnoredJobs();
-
- }
-
- /**
* Set system default jdk in the project
* @param projectName
*/
12 years, 9 months
JBoss Tools SVN: r41283 - trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-05-23 07:27:39 -0400 (Wed, 23 May 2012)
New Revision: 41283
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java
Log:
method for selecting configured runtime as targeted runtime for entered project
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java 2012-05-23 11:26:12 UTC (rev 41282)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java 2012-05-23 11:27:39 UTC (rev 41283)
@@ -47,6 +47,8 @@
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.hamcrest.Matcher;
import org.jboss.tools.ui.bot.ext.condition.ButtonIsDisabled;
+import org.jboss.tools.ui.bot.ext.condition.ShellIsActiveCondition;
+import org.jboss.tools.ui.bot.ext.condition.TaskDuration;
import org.jboss.tools.ui.bot.ext.entity.JavaClassEntity;
import org.jboss.tools.ui.bot.ext.entity.JavaProjectEntity;
import org.jboss.tools.ui.bot.ext.gen.ActionItem;
@@ -1794,5 +1796,38 @@
}
return tiNode;
}
+
+ /**
+ * Add configured runtime into project as targeted runtime
+ * @param project
+ */
+ public void addConfiguredRuntimeIntoProject(String project,
+ String configuredRuntime) {
+ if (bot == null || project == null || configuredRuntime == null) {
+ throw new NullPointerException();
+ }
+ bot = openPropertiesOfProject(project);
+ SWTBotShell propertiesShell = bot.shell(
+ IDELabel.Shell.PROPERTIES_FOR + " " + project);
+ propertiesShell.activate();
+ SWTBotTreeItem item = bot.tree().getTreeItem("Targeted Runtimes");
+ item.select();
+ SWTBotTable runtimes = bot.table();
+ bot.checkBox("Show all runtimes").select();
+ for (int i = 0; i < runtimes.rowCount(); i++) {
+ runtimes.getTableItem(i).uncheck();
+ }
+ for (int i = 0; i < runtimes.rowCount(); i++) {
+ if (runtimes.getTableItem(i).getText().equals(configuredRuntime)) {
+ runtimes.getTableItem(i).check();
+ break;
+ }
+ }
+ bot.button(IDELabel.Button.OK).click();
+ bot.waitWhile(new ShellIsActiveCondition(propertiesShell),
+ TaskDuration.LONG.getTimeout());
+ util.waitForNonIgnoredJobs();
+
+ }
}
\ No newline at end of file
12 years, 9 months
JBoss Tools SVN: r41282 - trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples.
by jbosstools-commits@lists.jboss.org
Author: ldimaggio
Date: 2012-05-23 07:26:12 -0400 (Wed, 23 May 2012)
New Revision: 41282
Added:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/WebServiceProducerHttp.java
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/WebServiceProducerSocket.java
Modified:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/WebServiceProducer.java
Log:
Divided examples/WebServiceProducer.java into 3 tests - to avoid server intermittent logging issues
Modified: trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/WebServiceProducer.java
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/WebServiceProducer.java 2012-05-23 11:10:15 UTC (rev 41281)
+++ trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/WebServiceProducer.java 2012-05-23 11:26:12 UTC (rev 41282)
@@ -23,13 +23,13 @@
assertNotNull("Calling Send message failed, nothing appended to server log",text);
assertTrue("Calling Send message failed, unexpected server output :"+text,text.contains("Ah Goodbye then!!!!"));
- text = executeClientGetServerOutput("org.jboss.soa.esb.samples.quickstart.webserviceproducer.test.SendMessage","http 8765");
- assertNotNull("Calling Send message failed, nothing appended (http) to server log",text);
- assertTrue("Calling Send message failed, unexpected server output :"+text,text.contains("Ah Goodbye then!!!!"));
-
- text = executeClientGetServerOutput("org.jboss.soa.esb.samples.quickstart.webserviceproducer.test.SendMessage","socket 8888");
- assertNotNull("Calling Send message failed, nothing appended (socket) to server log",text);
- assertTrue("Calling Send message failed, unexpected server output :"+text,text.contains("Ah Goodbye then!!!!"));
+// text = executeClientGetServerOutput("org.jboss.soa.esb.samples.quickstart.webserviceproducer.test.SendMessage","http 8765");
+// assertNotNull("Calling Send message failed, nothing appended (http) to server log",text);
+// assertTrue("Calling Send message failed, unexpected server output :"+text,text.contains("Ah Goodbye then!!!!"));
+//
+// text = executeClientGetServerOutput("org.jboss.soa.esb.samples.quickstart.webserviceproducer.test.SendMessage","socket 8888");
+// assertNotNull("Calling Send message failed, nothing appended (socket) to server log",text);
+// assertTrue("Calling Send message failed, unexpected server output :"+text,text.contains("Ah Goodbye then!!!!"));
SWTTestExt.servers.removeAllProjectsFromServer();
}
Added: trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/WebServiceProducerHttp.java
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/WebServiceProducerHttp.java (rev 0)
+++ trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/WebServiceProducerHttp.java 2012-05-23 11:26:12 UTC (rev 41282)
@@ -0,0 +1,28 @@
+package org.jboss.tools.esb.ui.bot.tests.examples;
+
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerType;
+
+@Require(server=(a)Server(type=ServerType.SOA,state=ServerState.Running),perspective="Java")
+public class WebServiceProducerHttp extends ESBExampleTest {
+ @Override
+ public String getExampleName() {
+ return "JBoss ESB Web Service producer Example";
+ }
+ public String[] getProjectNames() {
+ return new String[] {"webservice_producer","webservice_producer_client"};
+ }
+ @Override
+ protected void executeExample() {
+ super.executeExample();
+
+ String text = executeClientGetServerOutput("org.jboss.soa.esb.samples.quickstart.webserviceproducer.test.SendMessage","http 8765");
+ assertNotNull("Calling Send message failed, nothing appended (http) to server log",text);
+ assertTrue("Calling Send message failed, unexpected server output :"+text,text.contains("Ah Goodbye then!!!!"));
+
+ SWTTestExt.servers.removeAllProjectsFromServer();
+ }
+}
Added: trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/WebServiceProducerSocket.java
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/WebServiceProducerSocket.java (rev 0)
+++ trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/WebServiceProducerSocket.java 2012-05-23 11:26:12 UTC (rev 41282)
@@ -0,0 +1,28 @@
+package org.jboss.tools.esb.ui.bot.tests.examples;
+
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ServerType;
+
+@Require(server=(a)Server(type=ServerType.SOA,state=ServerState.Running),perspective="Java")
+public class WebServiceProducerSocket extends ESBExampleTest {
+ @Override
+ public String getExampleName() {
+ return "JBoss ESB Web Service producer Example";
+ }
+ public String[] getProjectNames() {
+ return new String[] {"webservice_producer","webservice_producer_client"};
+ }
+ @Override
+ protected void executeExample() {
+ super.executeExample();
+
+ String text = executeClientGetServerOutput("org.jboss.soa.esb.samples.quickstart.webserviceproducer.test.SendMessage","socket 8888");
+ assertNotNull("Calling Send message failed, nothing appended (socket) to server log",text);
+ assertTrue("Calling Send message failed, unexpected server output :"+text,text.contains("Ah Goodbye then!!!!"));
+
+ SWTTestExt.servers.removeAllProjectsFromServer();
+ }
+}
12 years, 9 months
JBoss Tools SVN: r41281 - in trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects: exact-beans and 43 other directories.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-05-23 07:10:15 -0400 (Wed, 23 May 2012)
New Revision: 41281
Removed:
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/exact-beans/.settings/org.eclipse.jdt.core.prefs
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/exact-interface/.settings/org.eclipse.jdt.core.prefs
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified1/.settings/org.eclipse.jdt.core.prefs
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified2/.settings/org.eclipse.jdt.core.prefs
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified3/.settings/org.eclipse.jdt.core.prefs
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified4/.settings/org.eclipse.jdt.core.prefs
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified5/.settings/org.eclipse.jdt.core.prefs
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified6/.settings/org.eclipse.jdt.core.prefs
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified7/.settings/org.eclipse.jdt.core.prefs
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/generic/.settings/org.eclipse.jdt.core.prefs
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/.settings/org.eclipse.jdt.core.prefs
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/requires1/.settings/org.eclipse.jdt.core.prefs
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/requires3/.settings/org.eclipse.jdt.core.prefs
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/requires4/.settings/org.eclipse.jdt.core.prefs
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/requires5/.settings/org.eclipse.jdt.core.prefs
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/resource/.settings/org.eclipse.jdt.core.prefs
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto1/.settings/org.eclipse.jdt.core.prefs
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto2/.settings/org.eclipse.jdt.core.prefs
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto3/.settings/org.eclipse.jdt.core.prefs
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto4/.settings/org.eclipse.jdt.core.prefs
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/.settings/org.eclipse.jdt.core.prefs
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/defaultBeans/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/exact-beans/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/exact-interface/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified1/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified2/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified3/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified4/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified5/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified6/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified7/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/generic/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/requires1/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/requires2/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/requires2/.settings/org.eclipse.jdt.core.prefs
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/requires3/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/requires4/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/requires5/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/resource/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto1/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto2/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto3/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto4/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/.classpath
Log:
jdk used in all projects set as workspace default
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/defaultBeans/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/defaultBeans/.classpath 2012-05-23 10:56:45 UTC (rev 41280)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/defaultBeans/.classpath 2012-05-23 11:10:15 UTC (rev 41281)
@@ -8,7 +8,7 @@
<attribute name="owner.project.facets" value="jst.web"/>
</attributes>
</classpathentry>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_29">
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/exact-beans/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/exact-beans/.classpath 2012-05-23 10:56:45 UTC (rev 41280)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/exact-beans/.classpath 2012-05-23 11:10:15 UTC (rev 41281)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_29">
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/exact-beans/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/exact-beans/.settings/org.eclipse.jdt.core.prefs 2012-05-23 10:56:45 UTC (rev 41280)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/exact-beans/.settings/org.eclipse.jdt.core.prefs 2012-05-23 11:10:15 UTC (rev 41281)
@@ -1,7 +0,0 @@
-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
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/exact-interface/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/exact-interface/.classpath 2012-05-23 10:56:45 UTC (rev 41280)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/exact-interface/.classpath 2012-05-23 11:10:15 UTC (rev 41281)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_29">
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/exact-interface/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/exact-interface/.settings/org.eclipse.jdt.core.prefs 2012-05-23 10:56:45 UTC (rev 41280)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/exact-interface/.settings/org.eclipse.jdt.core.prefs 2012-05-23 11:10:15 UTC (rev 41281)
@@ -1,7 +0,0 @@
-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
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified1/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified1/.classpath 2012-05-23 10:56:45 UTC (rev 41280)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified1/.classpath 2012-05-23 11:10:15 UTC (rev 41281)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_29">
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified1/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified1/.settings/org.eclipse.jdt.core.prefs 2012-05-23 10:56:45 UTC (rev 41280)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified1/.settings/org.eclipse.jdt.core.prefs 2012-05-23 11:10:15 UTC (rev 41281)
@@ -1,7 +0,0 @@
-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
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified2/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified2/.classpath 2012-05-23 10:56:45 UTC (rev 41280)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified2/.classpath 2012-05-23 11:10:15 UTC (rev 41281)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_29">
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified2/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified2/.settings/org.eclipse.jdt.core.prefs 2012-05-23 10:56:45 UTC (rev 41280)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified2/.settings/org.eclipse.jdt.core.prefs 2012-05-23 11:10:15 UTC (rev 41281)
@@ -1,7 +0,0 @@
-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
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified3/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified3/.classpath 2012-05-23 10:56:45 UTC (rev 41280)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified3/.classpath 2012-05-23 11:10:15 UTC (rev 41281)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_29">
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified3/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified3/.settings/org.eclipse.jdt.core.prefs 2012-05-23 10:56:45 UTC (rev 41280)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified3/.settings/org.eclipse.jdt.core.prefs 2012-05-23 11:10:15 UTC (rev 41281)
@@ -1,7 +0,0 @@
-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
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified4/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified4/.classpath 2012-05-23 10:56:45 UTC (rev 41280)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified4/.classpath 2012-05-23 11:10:15 UTC (rev 41281)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_29">
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified4/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified4/.settings/org.eclipse.jdt.core.prefs 2012-05-23 10:56:45 UTC (rev 41280)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified4/.settings/org.eclipse.jdt.core.prefs 2012-05-23 11:10:15 UTC (rev 41281)
@@ -1,7 +0,0 @@
-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
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified5/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified5/.classpath 2012-05-23 10:56:45 UTC (rev 41280)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified5/.classpath 2012-05-23 11:10:15 UTC (rev 41281)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_29">
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified5/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified5/.settings/org.eclipse.jdt.core.prefs 2012-05-23 10:56:45 UTC (rev 41280)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified5/.settings/org.eclipse.jdt.core.prefs 2012-05-23 11:10:15 UTC (rev 41281)
@@ -1,7 +0,0 @@
-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
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified6/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified6/.classpath 2012-05-23 10:56:45 UTC (rev 41280)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified6/.classpath 2012-05-23 11:10:15 UTC (rev 41281)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_29">
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified6/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified6/.settings/org.eclipse.jdt.core.prefs 2012-05-23 10:56:45 UTC (rev 41280)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified6/.settings/org.eclipse.jdt.core.prefs 2012-05-23 11:10:15 UTC (rev 41281)
@@ -1,7 +0,0 @@
-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
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified7/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified7/.classpath 2012-05-23 10:56:45 UTC (rev 41280)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified7/.classpath 2012-05-23 11:10:15 UTC (rev 41281)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_29">
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified7/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified7/.settings/org.eclipse.jdt.core.prefs 2012-05-23 10:56:45 UTC (rev 41280)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/fullyQualified7/.settings/org.eclipse.jdt.core.prefs 2012-05-23 11:10:15 UTC (rev 41281)
@@ -1,7 +0,0 @@
-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
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/generic/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/generic/.classpath 2012-05-23 10:56:45 UTC (rev 41280)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/generic/.classpath 2012-05-23 11:10:15 UTC (rev 41281)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_29">
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/generic/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/generic/.settings/org.eclipse.jdt.core.prefs 2012-05-23 10:56:45 UTC (rev 41280)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/generic/.settings/org.eclipse.jdt.core.prefs 2012-05-23 11:10:15 UTC (rev 41281)
@@ -1,7 +0,0 @@
-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
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/.classpath 2012-05-23 10:56:45 UTC (rev 41280)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/.classpath 2012-05-23 11:10:15 UTC (rev 41281)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_29">
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/.settings/org.eclipse.jdt.core.prefs 2012-05-23 10:56:45 UTC (rev 41280)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/named/.settings/org.eclipse.jdt.core.prefs 2012-05-23 11:10:15 UTC (rev 41281)
@@ -1,7 +0,0 @@
-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
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/requires1/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/requires1/.classpath 2012-05-23 10:56:45 UTC (rev 41280)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/requires1/.classpath 2012-05-23 11:10:15 UTC (rev 41281)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_29">
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/requires1/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/requires1/.settings/org.eclipse.jdt.core.prefs 2012-05-23 10:56:45 UTC (rev 41280)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/requires1/.settings/org.eclipse.jdt.core.prefs 2012-05-23 11:10:15 UTC (rev 41281)
@@ -1,7 +0,0 @@
-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
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/requires2/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/requires2/.classpath 2012-05-23 10:56:45 UTC (rev 41280)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/requires2/.classpath 2012-05-23 11:10:15 UTC (rev 41281)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_29">
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/requires2/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/requires2/.settings/org.eclipse.jdt.core.prefs 2012-05-23 10:56:45 UTC (rev 41280)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/requires2/.settings/org.eclipse.jdt.core.prefs 2012-05-23 11:10:15 UTC (rev 41281)
@@ -1,8 +1,2 @@
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.problem.unhandledWarningToken=ignore
-org.eclipse.jdt.core.compiler.source=1.6
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/requires3/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/requires3/.classpath 2012-05-23 10:56:45 UTC (rev 41280)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/requires3/.classpath 2012-05-23 11:10:15 UTC (rev 41281)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_29">
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/requires3/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/requires3/.settings/org.eclipse.jdt.core.prefs 2012-05-23 10:56:45 UTC (rev 41280)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/requires3/.settings/org.eclipse.jdt.core.prefs 2012-05-23 11:10:15 UTC (rev 41281)
@@ -1,7 +0,0 @@
-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
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/requires4/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/requires4/.classpath 2012-05-23 10:56:45 UTC (rev 41280)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/requires4/.classpath 2012-05-23 11:10:15 UTC (rev 41281)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_29">
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/requires4/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/requires4/.settings/org.eclipse.jdt.core.prefs 2012-05-23 10:56:45 UTC (rev 41280)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/requires4/.settings/org.eclipse.jdt.core.prefs 2012-05-23 11:10:15 UTC (rev 41281)
@@ -1,7 +0,0 @@
-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
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/requires5/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/requires5/.classpath 2012-05-23 10:56:45 UTC (rev 41280)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/requires5/.classpath 2012-05-23 11:10:15 UTC (rev 41281)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_29">
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/requires5/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/requires5/.settings/org.eclipse.jdt.core.prefs 2012-05-23 10:56:45 UTC (rev 41280)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/requires5/.settings/org.eclipse.jdt.core.prefs 2012-05-23 11:10:15 UTC (rev 41281)
@@ -1,7 +0,0 @@
-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
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/resource/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/resource/.classpath 2012-05-23 10:56:45 UTC (rev 41280)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/resource/.classpath 2012-05-23 11:10:15 UTC (rev 41281)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_29">
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/resource/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/resource/.settings/org.eclipse.jdt.core.prefs 2012-05-23 10:56:45 UTC (rev 41280)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/resource/.settings/org.eclipse.jdt.core.prefs 2012-05-23 11:10:15 UTC (rev 41281)
@@ -1,7 +0,0 @@
-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
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto1/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto1/.classpath 2012-05-23 10:56:45 UTC (rev 41280)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto1/.classpath 2012-05-23 11:10:15 UTC (rev 41281)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_29">
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto1/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto1/.settings/org.eclipse.jdt.core.prefs 2012-05-23 10:56:45 UTC (rev 41280)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto1/.settings/org.eclipse.jdt.core.prefs 2012-05-23 11:10:15 UTC (rev 41281)
@@ -1,7 +0,0 @@
-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
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto2/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto2/.classpath 2012-05-23 10:56:45 UTC (rev 41280)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto2/.classpath 2012-05-23 11:10:15 UTC (rev 41281)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_29">
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto2/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto2/.settings/org.eclipse.jdt.core.prefs 2012-05-23 10:56:45 UTC (rev 41280)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto2/.settings/org.eclipse.jdt.core.prefs 2012-05-23 11:10:15 UTC (rev 41281)
@@ -1,7 +0,0 @@
-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
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto3/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto3/.classpath 2012-05-23 10:56:45 UTC (rev 41280)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto3/.classpath 2012-05-23 11:10:15 UTC (rev 41281)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_29">
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto3/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto3/.settings/org.eclipse.jdt.core.prefs 2012-05-23 10:56:45 UTC (rev 41280)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto3/.settings/org.eclipse.jdt.core.prefs 2012-05-23 11:10:15 UTC (rev 41281)
@@ -1,7 +0,0 @@
-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
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto4/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto4/.classpath 2012-05-23 10:56:45 UTC (rev 41280)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto4/.classpath 2012-05-23 11:10:15 UTC (rev 41281)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_29">
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto4/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto4/.settings/org.eclipse.jdt.core.prefs 2012-05-23 10:56:45 UTC (rev 41280)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto4/.settings/org.eclipse.jdt.core.prefs 2012-05-23 11:10:15 UTC (rev 41281)
@@ -1,7 +0,0 @@
-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
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/.classpath 2012-05-23 10:56:45 UTC (rev 41280)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/.classpath 2012-05-23 11:10:15 UTC (rev 41281)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_29">
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/.settings/org.eclipse.jdt.core.prefs 2012-05-23 10:56:45 UTC (rev 41280)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/resources/projects/veto5/.settings/org.eclipse.jdt.core.prefs 2012-05-23 11:10:15 UTC (rev 41281)
@@ -1,7 +0,0 @@
-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
12 years, 9 months
JBoss Tools SVN: r41280 - trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-05-23 06:56:45 -0400 (Wed, 23 May 2012)
New Revision: 41280
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
Log:
Project Archives view added
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2012-05-23 10:55:26 UTC (rev 41279)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2012-05-23 10:56:45 UTC (rev 41280)
@@ -302,6 +302,7 @@
public static final String PROCESS_INSTANCES = "Process Instances";
public static final String RULES = "Rules";
public static final String WORKING_MEMORY = "Working Memory";
+ public static final String PROJECT_ARCHIVES = "Project Archives";
}
public class ViewGroup {
12 years, 9 months
JBoss Tools SVN: r41279 - in trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/projects: AssignableDialogFilterTest/.settings and 6 other directories.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-05-23 06:55:26 -0400 (Wed, 23 May 2012)
New Revision: 41279
Added:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/projects/AssignableDialogFilterTest/.settings/org.eclipse.wst.ws.service.policy.prefs
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/projects/CDIQuickFixProposals/.settings/org.hibernate.eclipse.console.prefs
Removed:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/projects/AssignableDialogFilterTest/.settings/org.eclipse.jdt.core.prefs
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/projects/CDIAssignableDialogTest/.settings/org.eclipse.jdt.core.prefs
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/projects/CDIQuickFixProposals/.settings/org.eclipse.jdt.core.prefs
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/projects/DecoratorFromWebBean/.settings/org.eclipse.jdt.core.prefs
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/projects/AssignableDialogFilterTest/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/projects/CDIAssignableDialogTest/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/projects/CDIQuickFixProposals/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/projects/DecoratorFromWebBean/.classpath
Log:
jdk used in all projects set as workspace default
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/projects/AssignableDialogFilterTest/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/projects/AssignableDialogFilterTest/.classpath 2012-05-23 10:43:09 UTC (rev 41278)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/projects/AssignableDialogFilterTest/.classpath 2012-05-23 10:55:26 UTC (rev 41279)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_29">
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/projects/AssignableDialogFilterTest/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/projects/AssignableDialogFilterTest/.settings/org.eclipse.jdt.core.prefs 2012-05-23 10:43:09 UTC (rev 41278)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/projects/AssignableDialogFilterTest/.settings/org.eclipse.jdt.core.prefs 2012-05-23 10:55:26 UTC (rev 41279)
@@ -1,7 +0,0 @@
-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/cdi/tests/org.jboss.tools.cdi.bot.test/resources/projects/AssignableDialogFilterTest/.settings/org.eclipse.wst.ws.service.policy.prefs
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/projects/AssignableDialogFilterTest/.settings/org.eclipse.wst.ws.service.policy.prefs (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/projects/AssignableDialogFilterTest/.settings/org.eclipse.wst.ws.service.policy.prefs 2012-05-23 10:55:26 UTC (rev 41279)
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+org.eclipse.wst.ws.service.policy.projectEnabled=false
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/projects/CDIAssignableDialogTest/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/projects/CDIAssignableDialogTest/.classpath 2012-05-23 10:43:09 UTC (rev 41278)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/projects/CDIAssignableDialogTest/.classpath 2012-05-23 10:55:26 UTC (rev 41279)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_29">
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/projects/CDIAssignableDialogTest/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/projects/CDIAssignableDialogTest/.settings/org.eclipse.jdt.core.prefs 2012-05-23 10:43:09 UTC (rev 41278)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/projects/CDIAssignableDialogTest/.settings/org.eclipse.jdt.core.prefs 2012-05-23 10:55:26 UTC (rev 41279)
@@ -1,7 +0,0 @@
-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
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/projects/CDIQuickFixProposals/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/projects/CDIQuickFixProposals/.classpath 2012-05-23 10:43:09 UTC (rev 41278)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/projects/CDIQuickFixProposals/.classpath 2012-05-23 10:55:26 UTC (rev 41279)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_29">
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/projects/CDIQuickFixProposals/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/projects/CDIQuickFixProposals/.settings/org.eclipse.jdt.core.prefs 2012-05-23 10:43:09 UTC (rev 41278)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/projects/CDIQuickFixProposals/.settings/org.eclipse.jdt.core.prefs 2012-05-23 10:55:26 UTC (rev 41279)
@@ -1,7 +0,0 @@
-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/cdi/tests/org.jboss.tools.cdi.bot.test/resources/projects/CDIQuickFixProposals/.settings/org.hibernate.eclipse.console.prefs
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/projects/CDIQuickFixProposals/.settings/org.hibernate.eclipse.console.prefs (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/projects/CDIQuickFixProposals/.settings/org.hibernate.eclipse.console.prefs 2012-05-23 10:55:26 UTC (rev 41279)
@@ -0,0 +1,3 @@
+default.configuration=
+eclipse.preferences.version=1
+hibernate3.enabled=false
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/projects/DecoratorFromWebBean/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/projects/DecoratorFromWebBean/.classpath 2012-05-23 10:43:09 UTC (rev 41278)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/projects/DecoratorFromWebBean/.classpath 2012-05-23 10:55:26 UTC (rev 41279)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_29">
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/projects/DecoratorFromWebBean/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/projects/DecoratorFromWebBean/.settings/org.eclipse.jdt.core.prefs 2012-05-23 10:43:09 UTC (rev 41278)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/resources/projects/DecoratorFromWebBean/.settings/org.eclipse.jdt.core.prefs 2012-05-23 10:55:26 UTC (rev 41279)
@@ -1,7 +0,0 @@
-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
12 years, 9 months
JBoss Tools SVN: r41278 - in trunk/maven: plugins/org.jboss.tools.maven.jdt/META-INF and 25 other directories.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2012-05-23 06:43:09 -0400 (Wed, 23 May 2012)
New Revision: 41278
Added:
trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/endorsedlib/
trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/endorsedlib/IEndorsedLibrariesManager.java
trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/internal/
trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/internal/endorsedlib/
trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/internal/endorsedlib/EndorsedLibrariesContainer.java
trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/internal/endorsedlib/EndorsedLibrariesContainerInitializer.java
trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/internal/endorsedlib/EndorsedLibrariesManager.java
trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/internal/endorsedlib/JarFilter.java
trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/internal/endorsedlib/xpl/
trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/internal/endorsedlib/xpl/MavenClasspathContainerSaveHelper.java
trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/internal/jobs/
trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/internal/jobs/ExecutePhaseJob.java
trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/internal/jobs/UpdateMavenProjectJob.java
trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/internal/markers/
trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/internal/markers/ExecuteDependencyCopyMarkerResolution.java
trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/internal/markers/MissingEndorsedLibMarkerResolutionGenerator.java
trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/utils/
trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/utils/ClasspathHelpers.java
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/endorsed_lib/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/endorsed_lib/broken_endorsing/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/endorsed_lib/broken_endorsing/pom.xml
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/endorsed_lib/broken_endorsing/src/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/endorsed_lib/broken_endorsing/src/main/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/endorsed_lib/broken_endorsing/src/main/java/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/endorsed_lib/broken_endorsing/src/main/java/foo/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/endorsed_lib/broken_endorsing/src/main/java/foo/Bar.java
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/endorsed_lib/broken_endorsing/src/main/resources/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/endorsed_lib/broken_endorsing/src/test/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/endorsed_lib/broken_endorsing/src/test/java/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/endorsed_lib/broken_endorsing/src/test/resources/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/endorsed_lib/endorsing/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/endorsed_lib/endorsing/pom.xml
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/endorsed_lib/endorsing/src/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/endorsed_lib/endorsing/src/main/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/endorsed_lib/endorsing/src/main/java/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/endorsed_lib/endorsing/src/main/java/foo/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/endorsed_lib/endorsing/src/main/java/foo/Bar.java
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/endorsed_lib/endorsing/src/main/resources/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/endorsed_lib/endorsing/src/test/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/endorsed_lib/endorsing/src/test/java/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/endorsed_lib/endorsing/src/test/resources/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/src/org/jboss/tools/maven/configurators/tests/EndorsedLibConfiguratorTest.java
Removed:
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/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/
Modified:
trunk/maven/plugins/org.jboss.tools.maven.jdt/META-INF/MANIFEST.MF
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/src/org/jboss/tools/maven/jdt/MavenJdtActivator.java
trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/configurators/EndorsedLibProjectConfigurator.java
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/META-INF/MANIFEST.MF
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/src/org/jboss/tools/maven/configurators/tests/AbstractMavenConfiguratorTest.java
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/src/org/jboss/tools/maven/configurators/tests/JpaConfiguratorTest.java
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/src/org/jboss/tools/maven/configurators/tests/SeamConfiguratorTest.java
Log:
JBIDE-11738 : Add quick fix for missing endorsed libraries
Added test cases
Modified: trunk/maven/plugins/org.jboss.tools.maven.jdt/META-INF/MANIFEST.MF
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jdt/META-INF/MANIFEST.MF 2012-05-23 10:17:24 UTC (rev 41277)
+++ trunk/maven/plugins/org.jboss.tools.maven.jdt/META-INF/MANIFEST.MF 2012-05-23 10:43:09 UTC (rev 41278)
@@ -10,9 +10,16 @@
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"
+ org.eclipse.m2e.maven.runtime;bundle-version="1.0.0",
+ org.eclipse.ui.ide,
+ org.eclipse.m2e.core.ui
Bundle-Localization: plugin
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6,
JavaSE-1.7
Bundle-Vendor: %Bundle-Vendor
+Export-Package: org.jboss.tools.maven.jdt,
+ org.jboss.tools.maven.jdt.configurators,
+ org.jboss.tools.maven.jdt.endorsedlib,
+ org.jboss.tools.maven.jdt.internal.markers,
+ org.jboss.tools.maven.jdt.utils
Modified: trunk/maven/plugins/org.jboss.tools.maven.jdt/plugin.properties
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jdt/plugin.properties 2012-05-23 10:17:24 UTC (rev 41277)
+++ trunk/maven/plugins/org.jboss.tools.maven.jdt/plugin.properties 2012-05-23 10:43:09 UTC (rev 41278)
@@ -1,3 +1,5 @@
Bundle-Vendor = JBoss by Red Hat
Bundle-Name = JBoss Maven JDT Configurator
-Endorsed_Lib_Configurator_label = Endorsed lib configurator
+Endorsed_Lib_Configurator_label = Endorsed libraries configurator
+Maven_Configuration_Problem=Maven Configuration Problem
+Maven_Configuration_Problems=Maven Configuration Problems
Modified: trunk/maven/plugins/org.jboss.tools.maven.jdt/plugin.xml
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jdt/plugin.xml 2012-05-23 10:17:24 UTC (rev 41277)
+++ trunk/maven/plugins/org.jboss.tools.maven.jdt/plugin.xml 2012-05-23 10:43:09 UTC (rev 41278)
@@ -21,5 +21,31 @@
name="%Endorsed_Lib_Configurator_label"
secondaryTo="org.eclipse.m2e.jdt.javaConfigurator"/>
</extension>
+
+ <extension point="org.eclipse.core.resources.markers"
+ id="org.jbosstools.maven.configuration.jdt.endorsedlib"
+ name="%Maven_Configuration_Problem">
+ <super type="org.eclipse.m2e.core.maven2Problem.configuration"/>
+ <persistent value="true"/>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.ide.markerSupport">
+ <markerTypeCategory
+ name="%Maven_Configuration_Problems">
+ <markerTypeReference
+ id="org.jbosstools.maven.configuration.jdt.endorsedlib">
+ </markerTypeReference>
+ </markerTypeCategory>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.ide.markerResolution">
+ <markerResolutionGenerator
+ class="org.jboss.tools.maven.jdt.internal.markers.MissingEndorsedLibMarkerResolutionGenerator"
+ markerType="org.jbosstools.maven.configuration.jdt.endorsedlib">
+ </markerResolutionGenerator>
+ </extension>
+
</plugin>
Modified: 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 2012-05-23 10:17:24 UTC (rev 41277)
+++ trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/MavenJdtActivator.java 2012-05-23 10:43:09 UTC (rev 41278)
@@ -15,7 +15,8 @@
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.jboss.tools.maven.jdt.endorsedlib.IEndorsedLibrariesManager;
+import org.jboss.tools.maven.jdt.internal.endorsedlib.EndorsedLibrariesManager;
import org.osgi.framework.BundleContext;
/**
@@ -29,7 +30,7 @@
// The shared instance
private static MavenJdtActivator plugin;
- private EndorsedLibrariesManager endorsedLibrariesManager;
+ private IEndorsedLibrariesManager endorsedLibrariesManager;
/**
* The constructor
@@ -81,7 +82,7 @@
getDefault().getLog().log(status);
}
- public EndorsedLibrariesManager getEndorsedLibrariesManager() {
+ public IEndorsedLibrariesManager getEndorsedLibrariesManager() {
return endorsedLibrariesManager;
}
}
Deleted: 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 2012-05-23 10:17:24 UTC (rev 41277)
+++ trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/configurators/ClasspathHelpers.java 2012-05-23 10:43:09 UTC (rev 41278)
@@ -1,92 +0,0 @@
-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);
- }
- }
-}
Modified: 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 2012-05-23 10:17:24 UTC (rev 41277)
+++ trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/configurators/EndorsedLibProjectConfigurator.java 2012-05-23 10:43:09 UTC (rev 41278)
@@ -1,5 +1,5 @@
/*************************************************************************************
- * Copyright (c) 2008-2011 Red Hat, Inc. and others.
+ * 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
@@ -14,8 +14,10 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
+import java.util.HashSet;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -24,6 +26,7 @@
import org.apache.maven.lifecycle.MavenExecutionPlan;
import org.apache.maven.plugin.MojoExecution;
import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
@@ -31,12 +34,17 @@
import org.eclipse.core.runtime.Path;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.m2e.core.internal.markers.SourceLocation;
+import org.eclipse.m2e.core.internal.markers.SourceLocationHelper;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
import org.eclipse.m2e.core.project.configurator.AbstractProjectConfigurator;
+import org.eclipse.m2e.core.project.configurator.MojoExecutionKey;
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;
+import org.jboss.tools.maven.jdt.endorsedlib.IEndorsedLibrariesManager;
+import org.jboss.tools.maven.jdt.utils.ClasspathHelpers;
/**
@@ -48,38 +56,50 @@
public class EndorsedLibProjectConfigurator extends AbstractProjectConfigurator implements IJavaProjectConfigurator {
private static final Pattern jAVA_ENDORSED_DIRS_PATTERN = Pattern.compile("-Djava.endorsed.dirs=([^ \\t]+)");
+
+ private static final String MISSING_ENDORSED_DIRS_MARKER = "org.jbosstools.maven.configuration.jdt.endorsedlib";
+ @SuppressWarnings("restriction")
@Override
public void configure(ProjectConfigurationRequest request, IProgressMonitor monitor) throws CoreException {
- File[] endorsedDirs = getEndorsedDirs(request.getMavenProjectFacade(), monitor);
+ markerManager.deleteMarkers(request.getProject(), MISSING_ENDORSED_DIRS_MARKER);
+
+ IMavenProjectFacade mavenProjectFacade = request.getMavenProjectFacade();
+ File[] endorsedDirs = getEndorsedDirs(mavenProjectFacade, monitor);
if (endorsedDirs == null || endorsedDirs.length == 0) {
return;
}
- boolean missingEndorsedDir = checkMissingDirs(endorsedDirs);
- if (missingEndorsedDir && canExecuteDependencyCopy()) {
- //TODO trigger dependency:copy
- missingEndorsedDir = checkMissingDirs(endorsedDirs);
+ Set<File> missingEndorsedDir = checkMissingDirs(endorsedDirs);
+ if (!missingEndorsedDir.isEmpty()) {
+ MojoExecutionKey key = new MojoExecutionKey("org.apache.maven.plugins","maven-compiler-plugin",null,null,null,null);
+ SourceLocation sourceLocation = SourceLocationHelper.findLocation(mavenProjectFacade.getMavenProject(), key);
+ for (File dir : missingEndorsedDir) {
+ addMissingDirWarning(request.getProject(), sourceLocation, dir);
+ }
}
- 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;
+ @SuppressWarnings("restriction")
+ private void addMissingDirWarning(IProject project, SourceLocation sourceLocation, File dir) throws CoreException {
+
+ IMarker marker = markerManager.addMarker(project.getFile("pom.xml"),
+ MISSING_ENDORSED_DIRS_MARKER,
+ "Endorsed directory '" + dir.getAbsolutePath() + "' is missing. " +
+ "You may need to a perform a Maven command line build in order to create it."
+ ,sourceLocation.getLineNumber(), IMarker.SEVERITY_ERROR);
+ marker.setAttribute("outputDirectory", dir.getAbsolutePath());
}
-
- private boolean checkMissingDirs(File[] endorsedDirs) {
+
+ private Set<File> checkMissingDirs(File[] endorsedDirs) {
+ Set<File> missingDirs = new HashSet<File>(endorsedDirs.length);
for (File dir : endorsedDirs) {
if (!dir.exists()) {
- return true;
+ missingDirs.add(dir);
}
}
- return false;
+ return missingDirs;
}
public void configureClasspath(IMavenProjectFacade facade,
@@ -211,7 +231,7 @@
return result;
}
- private EndorsedLibrariesManager getEndorsedLibrariesManager() {
+ private IEndorsedLibrariesManager getEndorsedLibrariesManager() {
return MavenJdtActivator.getDefault().getEndorsedLibrariesManager();
}
Deleted: 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 2012-05-23 10:17:24 UTC (rev 41277)
+++ trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/configurators/EndorsedLibrariesContainer.java 2012-05-23 10:43:09 UTC (rev 41278)
@@ -1,55 +0,0 @@
-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();
- }
-
-}
Deleted: 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 2012-05-23 10:17:24 UTC (rev 41277)
+++ trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/configurators/EndorsedLibrariesContainerInitializer.java 2012-05-23 10:43:09 UTC (rev 41278)
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * 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();
- }
-}
Deleted: 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 2012-05-23 10:17:24 UTC (rev 41277)
+++ trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/configurators/EndorsedLibrariesManager.java 2012-05-23 10:43:09 UTC (rev 41278)
@@ -1,159 +0,0 @@
-/*******************************************************************************
- * 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$
- }
-}
Deleted: 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 2012-05-23 10:17:24 UTC (rev 41277)
+++ trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/configurators/JarFilter.java 2012-05-23 10:43:09 UTC (rev 41278)
@@ -1,12 +0,0 @@
-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/endorsedlib/IEndorsedLibrariesManager.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/endorsedlib/IEndorsedLibrariesManager.java (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/endorsedlib/IEndorsedLibrariesManager.java 2012-05-23 10:43:09 UTC (rev 41278)
@@ -0,0 +1,29 @@
+package org.jboss.tools.maven.jdt.endorsedlib;
+
+import java.io.File;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jdt.core.IClasspathContainer;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.m2e.jdt.IClasspathDescriptor;
+
+public interface IEndorsedLibrariesManager {
+
+ /**
+ * 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 abstract void configureEndorsedLibs(IJavaProject javaProject,
+ IClasspathDescriptor classpath, File[] endorsedDirs,
+ IProgressMonitor monitor) throws CoreException;
+
+ public abstract IClasspathContainer getSavedContainer(IProject project)
+ throws CoreException;
+
+}
\ No newline at end of file
Added: trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/internal/endorsedlib/EndorsedLibrariesContainer.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/internal/endorsedlib/EndorsedLibrariesContainer.java (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/internal/endorsedlib/EndorsedLibrariesContainer.java 2012-05-23 10:43:09 UTC (rev 41278)
@@ -0,0 +1,65 @@
+/*************************************************************************************
+ * 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.internal.endorsedlib;
+
+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/internal/endorsedlib/EndorsedLibrariesContainerInitializer.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/internal/endorsedlib/EndorsedLibrariesContainerInitializer.java (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/internal/endorsedlib/EndorsedLibrariesContainerInitializer.java 2012-05-23 10:43:09 UTC (rev 41278)
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * 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.internal.endorsedlib;
+
+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;
+import org.jboss.tools.maven.jdt.endorsedlib.IEndorsedLibrariesManager;
+import org.jboss.tools.maven.jdt.utils.ClasspathHelpers;
+
+
+/**
+ * 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 IEndorsedLibrariesManager 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/internal/endorsedlib/EndorsedLibrariesManager.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/internal/endorsedlib/EndorsedLibrariesManager.java (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/internal/endorsedlib/EndorsedLibrariesManager.java 2012-05-23 10:43:09 UTC (rev 41278)
@@ -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.internal.endorsedlib;
+
+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.endorsedlib.IEndorsedLibrariesManager;
+import org.jboss.tools.maven.jdt.internal.endorsedlib.xpl.MavenClasspathContainerSaveHelper;
+import org.jboss.tools.maven.jdt.utils.ClasspathHelpers;
+
+public class EndorsedLibrariesManager implements IEndorsedLibrariesManager {
+
+ private File stateLocationDir;
+
+ public EndorsedLibrariesManager(File containerLocationDir) {
+ stateLocationDir = containerLocationDir;
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.maven.jdt.endorsedlib.IEndorsedLibrariesManager#configureEndorsedLibs(org.eclipse.jdt.core.IJavaProject, org.eclipse.m2e.jdt.IClasspathDescriptor, java.io.File[], org.eclipse.core.runtime.IProgressMonitor)
+ */
+ 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());
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.maven.jdt.endorsedlib.IEndorsedLibrariesManager#getSavedContainer(org.eclipse.core.resources.IProject)
+ */
+ 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/internal/endorsedlib/JarFilter.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/internal/endorsedlib/JarFilter.java (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/internal/endorsedlib/JarFilter.java 2012-05-23 10:43:09 UTC (rev 41278)
@@ -0,0 +1,22 @@
+/*************************************************************************************
+ * 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.internal.endorsedlib;
+
+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/internal/endorsedlib/xpl/MavenClasspathContainerSaveHelper.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/internal/endorsedlib/xpl/MavenClasspathContainerSaveHelper.java (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/internal/endorsedlib/xpl/MavenClasspathContainerSaveHelper.java 2012-05-23 10:43:09 UTC (rev 41278)
@@ -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.internal.endorsedlib.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);
+ }
+ }
+
+}
Added: trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/internal/jobs/ExecutePhaseJob.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/internal/jobs/ExecutePhaseJob.java (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/internal/jobs/ExecutePhaseJob.java 2012-05-23 10:43:09 UTC (rev 41278)
@@ -0,0 +1,77 @@
+/*************************************************************************************
+ * 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.internal.jobs;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+import org.apache.maven.execution.MavenExecutionRequest;
+import org.apache.maven.execution.MavenExecutionResult;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.WorkspaceJob;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.embedder.IMaven;
+import org.eclipse.m2e.core.project.IMavenProjectFacade;
+import org.eclipse.m2e.jdt.MavenJdtPlugin;
+
+public class ExecutePhaseJob extends WorkspaceJob {
+
+ private final IMavenProjectFacade mavenProjectFacade;
+ private final String phase;
+
+ public ExecutePhaseJob(String name, IMavenProjectFacade mavenProjectFacade, String phase) {
+ super(name);
+ this.mavenProjectFacade = mavenProjectFacade;
+ this.phase = phase;
+ setRule(MavenPlugin.getProjectConfigurationManager().getRule());
+ }
+
+ @Override
+ public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException {
+
+ IMaven maven = MavenPlugin.getMaven();
+
+ MavenExecutionRequest request = maven.createExecutionRequest(monitor);
+ request.setPom(mavenProjectFacade.getPomFile());
+ request.setGoals(Arrays.asList(phase));
+
+ MavenExecutionResult result = maven.execute(request, monitor);
+
+ if (result.hasExceptions()) {
+ IStatus errorStatus;
+ if (result.getExceptions().size() > 1) {
+ ArrayList<IStatus> errors = new ArrayList<IStatus>();
+ for (Throwable t : result.getExceptions()) {
+ errors.add(toStatus(t));
+ }
+ errorStatus = new MultiStatus(MavenJdtPlugin.PLUGIN_ID, -1,
+ errors.toArray(new IStatus[errors.size()]), "Unable to execute mvn "+phase, null);
+ } else {
+ errorStatus = toStatus(result.getExceptions().get(0));
+ }
+ return errorStatus;
+ }
+
+ UpdateMavenProjectJob updateProjectJob = new UpdateMavenProjectJob(new IProject[]{mavenProjectFacade.getProject()});
+ updateProjectJob.schedule();
+ return Status.OK_STATUS;
+ }
+
+ private Status toStatus(Throwable t) {
+ return new Status(IStatus.ERROR, MavenJdtPlugin.PLUGIN_ID, t.getLocalizedMessage());
+ }
+
+}
\ No newline at end of file
Added: trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/internal/jobs/UpdateMavenProjectJob.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/internal/jobs/UpdateMavenProjectJob.java (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/internal/jobs/UpdateMavenProjectJob.java 2012-05-23 10:43:09 UTC (rev 41278)
@@ -0,0 +1,160 @@
+/*******************************************************************************
+ * Copyright (c) 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.internal.jobs;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.resources.WorkspaceJob;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.project.IMavenProjectRegistry;
+import org.eclipse.m2e.core.project.IProjectConfigurationManager;
+import org.eclipse.m2e.core.project.MavenUpdateRequest;
+import org.eclipse.m2e.core.ui.internal.M2EUIPluginActivator;
+import org.eclipse.m2e.core.ui.internal.Messages;
+import org.eclipse.m2e.core.ui.internal.actions.OpenMavenConsoleAction;
+import org.eclipse.m2e.core.ui.internal.util.M2EUIUtils;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.progress.IProgressConstants;
+
+/**
+ * Class copied from org.eclipse.m2e.core.ui.internal.UpdateMavenProjectJob in m2e 1.1
+ * to keep compatibility between m2e 1.0/1.1.
+ *
+ * @author Fred Bricon
+ *
+ * <ul>
+ * <li>added legacy constructor</li>
+ * <li>changed loggers</li>
+ * </ul>
+ */
+@SuppressWarnings("restriction")
+public class UpdateMavenProjectJob extends WorkspaceJob {
+
+ private final IProject[] projects;
+
+ private final boolean offline;
+
+ private final boolean forceUpdateDependencies;
+
+ private final boolean updateConfiguration;
+
+ private final boolean rebuild;
+
+ public UpdateMavenProjectJob(IProject[] projects, boolean offline, boolean forceUpdateDependencies) {
+ this(projects, offline, forceUpdateDependencies,
+ true /*updateConfiguration*/, true /*rebuild*/);
+ }
+
+ public UpdateMavenProjectJob(IProject[] projects) {
+ this(projects, MavenPlugin.getMavenConfiguration().isOffline(), false /*forceUpdateDependencies*/,
+ true /*updateConfiguration*/, true /*rebuild*/);
+ }
+
+
+ public UpdateMavenProjectJob(IProject[] projects, boolean offline, boolean forceUpdateDependencies,
+ boolean updateConfiguration, boolean rebuild) {
+
+ super(Messages.UpdateSourcesAction_job_update_conf);
+
+ this.projects = projects;
+ this.offline = offline;
+ this.forceUpdateDependencies = forceUpdateDependencies;
+ this.updateConfiguration = updateConfiguration;
+ this.rebuild = rebuild;
+
+ setRule(MavenPlugin.getProjectConfigurationManager().getRule());
+ }
+
+ public IStatus runInWorkspace(IProgressMonitor monitor) {
+ IProjectConfigurationManager configurationManager = MavenPlugin.getProjectConfigurationManager();
+ IMavenProjectRegistry projectRegistry = MavenPlugin.getMavenProjectRegistry();
+ boolean autoBuilding = ResourcesPlugin.getWorkspace().isAutoBuilding();
+
+ setProperty(IProgressConstants.ACTION_PROPERTY, new OpenMavenConsoleAction());
+ monitor.beginTask(getName(), projects.length);
+
+ //long l1 = System.currentTimeMillis();
+ //MavenProjectExamplesActivator.log("Update started"); //$NON-NLS-1$
+
+ MultiStatus status = null;
+ //project names to the errors encountered when updating them
+ Map<String, Throwable> updateErrors = new HashMap<String, Throwable>();
+
+ for(IProject project : projects) {
+ if(monitor.isCanceled()) {
+ throw new OperationCanceledException();
+ }
+
+ monitor.subTask(project.getName());
+ SubProgressMonitor submonitor = new SubProgressMonitor(monitor, 1, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL);
+
+ try {
+ MavenUpdateRequest request = new MavenUpdateRequest(project, offline, forceUpdateDependencies);
+ if(updateConfiguration) {
+ configurationManager.updateProjectConfiguration(request, submonitor);
+ } else {
+ projectRegistry.refresh(request, submonitor);
+ }
+ // only rebuild projects that were successfully updated
+ if(rebuild) {
+ project.build(IncrementalProjectBuilder.CLEAN_BUILD, submonitor);
+ if(autoBuilding) {
+ // TODO this is not enough, in most cases we need to re-run the build several times
+ project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, submonitor);
+ }
+ }
+ } catch(CoreException ex) {
+ if(status == null) {
+ status = new MultiStatus(M2EUIPluginActivator.PLUGIN_ID, IStatus.ERROR, //
+ Messages.UpdateSourcesAction_error_cannot_update, null);
+ }
+ status.add(ex.getStatus());
+ updateErrors.put(project.getName(), ex);
+ } catch(IllegalArgumentException e) {
+ status = new MultiStatus(M2EUIPluginActivator.PLUGIN_ID, IStatus.ERROR, //
+ Messages.UpdateSourcesAction_error_cannot_update, null);
+ updateErrors.put(project.getName(), e);
+ }
+ }
+
+ if(updateErrors.size() > 0) {
+ handleErrors(updateErrors);
+ }
+ //long l2 = System.currentTimeMillis();
+ //MavenProjectExamplesActivator.log(NLS.bind("Update completed: {0} sec", ((l2 - l1) / 1000))); //$NON-NLS-1$
+
+ return status != null ? status : Status.OK_STATUS;
+ }
+
+ private void handleErrors(final Map<String, Throwable> updateErrors) {
+ final Display display = Display.getDefault();
+ if(display != null) {
+ display.asyncExec(new Runnable() {
+ public void run() {
+ M2EUIUtils.showErrorsForProjectsDialog(display.getActiveShell(), Messages.UpdateSourcesAction_error_title,
+ Messages.UpdateSourcesAction_error_message, updateErrors);
+ }
+ });
+ }
+ }
+}
Added: trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/internal/markers/ExecuteDependencyCopyMarkerResolution.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/internal/markers/ExecuteDependencyCopyMarkerResolution.java (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/internal/markers/ExecuteDependencyCopyMarkerResolution.java 2012-05-23 10:43:09 UTC (rev 41278)
@@ -0,0 +1,49 @@
+/*************************************************************************************
+ * 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.internal.markers;
+
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.m2e.core.project.IMavenProjectFacade;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.IMarkerResolution;
+import org.eclipse.ui.IMarkerResolution2;
+import org.jboss.tools.maven.jdt.internal.jobs.ExecutePhaseJob;
+
+public class ExecuteDependencyCopyMarkerResolution implements IMarkerResolution,
+ IMarkerResolution2 {
+
+ private final String phase;
+ private final IMavenProjectFacade mavenProjectFacade;
+
+ public ExecuteDependencyCopyMarkerResolution(IMavenProjectFacade mavenProjectFacade, String phaseToExecute) {
+ this.mavenProjectFacade = mavenProjectFacade;
+ this.phase = phaseToExecute;
+ }
+
+ public String getDescription() {
+ return getLabel();
+ }
+
+ public Image getImage() {
+ return null;
+ }
+
+ public String getLabel() {
+ return "Run 'mvn "+ phase +"' to execute dependency:copy";
+ }
+
+ public void run(IMarker marker) {
+ ExecutePhaseJob job = new ExecutePhaseJob("Run 'mvn "+ phase +"'", mavenProjectFacade, phase);
+ job.schedule();
+ }
+
+}
Added: trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/internal/markers/MissingEndorsedLibMarkerResolutionGenerator.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/internal/markers/MissingEndorsedLibMarkerResolutionGenerator.java (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/internal/markers/MissingEndorsedLibMarkerResolutionGenerator.java 2012-05-23 10:43:09 UTC (rev 41278)
@@ -0,0 +1,116 @@
+/*************************************************************************************
+ * 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.internal.markers;
+
+import java.util.Arrays;
+import java.util.LinkedHashSet;
+import java.util.Set;
+
+import org.apache.maven.model.Plugin;
+import org.apache.maven.model.PluginExecution;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.internal.IMavenConstants;
+import org.eclipse.m2e.core.project.IMavenProjectFacade;
+import org.eclipse.ui.IMarkerResolution;
+import org.eclipse.ui.IMarkerResolutionGenerator2;
+import org.jboss.tools.maven.jdt.MavenJdtActivator;
+
+@SuppressWarnings({"nls", "restriction"})
+public class MissingEndorsedLibMarkerResolutionGenerator implements IMarkerResolutionGenerator2 {
+
+ private static Set<String> INTERESTING_PHASES;
+
+ static {
+ INTERESTING_PHASES = new LinkedHashSet<String>(
+ Arrays.asList("validate",
+ "initialize",
+ "generate-sources",
+ "process-sources",
+ "generate-resources",
+ "process-resources",
+ "compile",
+ "process-classes",
+ "generate-test-sources",
+ "process-test-sources",
+ "generate-test-resources",
+ "process-test-resources",
+ "test-compile",
+ "process-test-classes"
+ )
+ );
+
+ }
+
+ public IMarkerResolution[] getResolutions(IMarker marker) {
+ String phase;
+ try {
+ phase = getPhaseToExecute(marker);
+ if (phase != null) {
+ IMavenProjectFacade facade = getMavenProjectFacade(marker);
+ return new IMarkerResolution[]{new ExecuteDependencyCopyMarkerResolution(facade, phase)};
+ }
+ } catch (CoreException e) {
+ MavenJdtActivator.log(e);
+ }
+ return new IMarkerResolution[0];
+ }
+
+ public boolean hasResolutions(IMarker marker) {
+ try {
+ return null != getPhaseToExecute(marker);
+ } catch (CoreException e) {
+ MavenJdtActivator.log(e);
+ }
+ return false;
+ }
+
+ private String getPhaseToExecute(IMavenProjectFacade facade, String absolutePath) {
+ Plugin p = facade.getMavenProject().getPlugin("org.apache.maven.plugins:maven-dependency-plugin");
+ if (p != null) {
+ for (PluginExecution pe : p.getExecutions()) {
+ String phase = pe.getPhase();
+ if (INTERESTING_PHASES.contains(phase) && pe.getGoals().contains("copy")) {
+ return phase;
+ }
+ }
+ }
+ return null;
+ }
+
+
+ private String getPhaseToExecute(IMarker marker) throws CoreException {
+ String phase = null;
+ IMavenProjectFacade facade = getMavenProjectFacade(marker);
+ if (facade != null) {
+ String path = (String) marker.getAttribute("outputDirectory");
+ phase = getPhaseToExecute(facade, path);
+ }
+ return phase;
+ }
+
+ private IMavenProjectFacade getMavenProjectFacade(IMarker marker) {
+ IProject project = (marker.getResource() == null)?null:marker.getResource().getProject();
+ try {
+ if (project != null && project.isAccessible() && project.hasNature(IMavenConstants.NATURE_ID)) {
+ IMavenProjectFacade facade = MavenPlugin.getMavenProjectRegistry().create(project, new NullProgressMonitor());
+ return facade;
+ }
+ } catch (CoreException e) {
+ MavenJdtActivator.log("Can't access the project facade from marker", e);
+ }
+ return null;
+ }
+
+}
Added: trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/utils/ClasspathHelpers.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/utils/ClasspathHelpers.java (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.jdt/src/org/jboss/tools/maven/jdt/utils/ClasspathHelpers.java 2012-05-23 10:43:09 UTC (rev 41278)
@@ -0,0 +1,102 @@
+/*************************************************************************************
+ * 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.utils;
+
+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);
+ }
+ }
+}
Modified: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/META-INF/MANIFEST.MF
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/META-INF/MANIFEST.MF 2012-05-23 10:17:24 UTC (rev 41277)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/META-INF/MANIFEST.MF 2012-05-23 10:43:09 UTC (rev 41278)
@@ -33,7 +33,9 @@
org.eclipse.jpt.jpa.core;bundle-version="3.0.1",
org.eclipse.jpt.common.core,
org.eclipse.jpt.common.utility,
- org.jboss.tools.cdi.core
+ org.jboss.tools.cdi.core,
+ org.jboss.tools.maven.jdt,
+ org.eclipse.ui.ide
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Eclipse-RegisterBuddy: org.apache.log4j
Added: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/endorsed_lib/broken_endorsing/pom.xml
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/endorsed_lib/broken_endorsing/pom.xml (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/endorsed_lib/broken_endorsing/pom.xml 2012-05-23 10:43:09 UTC (rev 41278)
@@ -0,0 +1,21 @@
+<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>
+ <groupId>foo.bar</groupId>
+ <artifactId>broken_endorsing</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.4</version>
+ <configuration>
+ <compilerArgument>-Djava.endorsed.dirs=${basedir}/target/endorsed</compilerArgument>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Added: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/endorsed_lib/broken_endorsing/src/main/java/foo/Bar.java
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/endorsed_lib/broken_endorsing/src/main/java/foo/Bar.java (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/endorsed_lib/broken_endorsing/src/main/java/foo/Bar.java 2012-05-23 10:43:09 UTC (rev 41278)
@@ -0,0 +1,7 @@
+package foo;
+
+import junit.framework.Assert;
+
+public class Bar extends Assert {
+
+}
Added: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/endorsed_lib/endorsing/pom.xml
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/endorsed_lib/endorsing/pom.xml (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/endorsed_lib/endorsing/pom.xml 2012-05-23 10:43:09 UTC (rev 41278)
@@ -0,0 +1,84 @@
+<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>
+ <groupId>foo.bar</groupId>
+ <artifactId>endorsing</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.4</version>
+ <configuration>
+ <compilerArgument>-Djava.endorsed.dirs=${basedir}/target/endorsed</compilerArgument>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>2.1</version>
+ <executions>
+ <execution>
+ <id>copy</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${basedir}/target/endorsed</outputDirectory>
+
+ <artifactItems>
+ <artifactItem>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <type>jar</type>
+ <overWrite>false</overWrite>
+ <destFileName>optional-new-name.jar</destFileName>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ <pluginManagement>
+ <plugins>
+ <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
+ <plugin>
+ <groupId>org.eclipse.m2e</groupId>
+ <artifactId>lifecycle-mapping</artifactId>
+ <version>1.0.0</version>
+ <configuration>
+ <lifecycleMappingMetadata>
+ <pluginExecutions>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>
+ org.apache.maven.plugins
+ </groupId>
+ <artifactId>
+ maven-dependency-plugin
+ </artifactId>
+ <versionRange>
+ [2.1,)
+ </versionRange>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <ignore></ignore>
+ </action>
+ </pluginExecution>
+ </pluginExecutions>
+ </lifecycleMappingMetadata>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+</project>
\ No newline at end of file
Added: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/endorsed_lib/endorsing/src/main/java/foo/Bar.java
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/endorsed_lib/endorsing/src/main/java/foo/Bar.java (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/endorsed_lib/endorsing/src/main/java/foo/Bar.java 2012-05-23 10:43:09 UTC (rev 41278)
@@ -0,0 +1,7 @@
+package foo;
+
+import junit.framework.Assert;
+
+public class Bar extends Assert {
+
+}
Modified: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/src/org/jboss/tools/maven/configurators/tests/AbstractMavenConfiguratorTest.java
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/src/org/jboss/tools/maven/configurators/tests/AbstractMavenConfiguratorTest.java 2012-05-23 10:17:24 UTC (rev 41277)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/src/org/jboss/tools/maven/configurators/tests/AbstractMavenConfiguratorTest.java 2012-05-23 10:43:09 UTC (rev 41278)
@@ -104,4 +104,8 @@
}
fail("Error Message '"+ errorMessage +"' was not found on "+project.getName());
}
+
+ protected String getMessage(IMarker marker) throws CoreException {
+ return (String)marker.getAttribute(IMarker.MESSAGE);
+ }
}
Added: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/src/org/jboss/tools/maven/configurators/tests/EndorsedLibConfiguratorTest.java
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/src/org/jboss/tools/maven/configurators/tests/EndorsedLibConfiguratorTest.java (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/src/org/jboss/tools/maven/configurators/tests/EndorsedLibConfiguratorTest.java 2012-05-23 10:43:09 UTC (rev 41278)
@@ -0,0 +1,99 @@
+/*************************************************************************************
+ * 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.configurators.tests;
+
+import java.util.List;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.ui.IMarkerResolution;
+import org.jboss.tools.maven.jdt.internal.markers.MissingEndorsedLibMarkerResolutionGenerator;
+import org.jboss.tools.maven.jdt.utils.ClasspathHelpers;
+import org.junit.Test;
+
+@SuppressWarnings("restriction")
+public class EndorsedLibConfiguratorTest extends AbstractMavenConfiguratorTest {
+
+ @Test
+ public void testJBIDE11738_endorsed_libraries() throws Exception {
+ String projectLocation = "projects/endorsed_lib/endorsing";
+ IProject endorsing = importProject(projectLocation+"/pom.xml");
+ endorsing.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, monitor);
+ waitForJobsToComplete();
+
+ //When the project is imported, the endorsed dir doesn't exist, so we should see
+ //compilation errors and a marker about that missing Endorsed dir
+ List<IMarker> errors = findErrorMarkers(endorsing);
+ assertEquals(toString(errors), 3, errors.size());
+ IMarker marker = errors.get(2);
+ String error = getMessage(marker);
+ assertTrue("Unexpected error message :"+error, error.startsWith("Endorsed dir"));
+
+ //Since the endorsed dir is missing, no Endorsed Libraries classpath library
+ //is added to the project's classpath
+ IJavaProject javaProject = JavaCore.create(endorsing);
+ IClasspathEntry[] classpath = javaProject.getRawClasspath();
+ assertFalse("Endorsed Lib should not have been added",
+ ClasspathHelpers.isEndorsedDirsClasspathContainer(classpath[0].getPath()));
+
+ //Now let's fix the project
+
+ //Check quick fix is available
+ MissingEndorsedLibMarkerResolutionGenerator generator = new MissingEndorsedLibMarkerResolutionGenerator();
+ assertTrue("project should be fixable", generator.hasResolutions(marker));
+ IMarkerResolution[] resolutions = generator.getResolutions(marker);
+ assertEquals(1, resolutions.length);
+ //Execute quick fix
+ resolutions[0].run(marker);
+ waitForJobsToComplete();
+ endorsing.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, monitor);
+ waitForJobsToComplete();
+
+ //Check it compiles properly now
+ assertNoErrors(endorsing);
+
+ //And Endorsed Libraries is added first on the classpath
+ classpath = javaProject.getRawClasspath();
+ assertTrue("Endorsed Lib should have been added first",
+ ClasspathHelpers.isEndorsedDirsClasspathContainer(classpath[0].getPath()));
+ }
+
+ @Test
+ public void testJBIDE11738_non_fixable_endorsed_libraries() throws Exception {
+ String projectLocation = "projects/endorsed_lib/broken_endorsing";
+ IProject endorsing = importProject(projectLocation+"/pom.xml");
+ endorsing.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, monitor);
+ waitForJobsToComplete();
+
+ //When the project is imported, the endorsed dir doesn't exist, so we should see
+ //compilation errors and a marker about that missing Endorsed dir
+ List<IMarker> errors = findErrorMarkers(endorsing);
+ assertEquals(toString(errors), 3, errors.size());
+ IMarker marker = errors.get(2);
+ String error = getMessage(marker);
+ assertTrue("Unexpected error message :"+error, error.startsWith("Endorsed dir"));
+
+ //Since the endorsed dir is missing, no Endorsed Libraries classpath library
+ //is added to the project's classpath
+ IJavaProject javaProject = JavaCore.create(endorsing);
+ IClasspathEntry[] classpath = javaProject.getRawClasspath();
+ assertFalse("Endorsed Lib should not have been added",
+ ClasspathHelpers.isEndorsedDirsClasspathContainer(classpath[0].getPath()));
+
+ //Check quick fix is not available
+ MissingEndorsedLibMarkerResolutionGenerator generator = new MissingEndorsedLibMarkerResolutionGenerator();
+ assertFalse("Project should not be fixable", generator.hasResolutions(marker));
+ }
+}
Modified: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/src/org/jboss/tools/maven/configurators/tests/JpaConfiguratorTest.java
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/src/org/jboss/tools/maven/configurators/tests/JpaConfiguratorTest.java 2012-05-23 10:17:24 UTC (rev 41277)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/src/org/jboss/tools/maven/configurators/tests/JpaConfiguratorTest.java 2012-05-23 10:43:09 UTC (rev 41278)
@@ -1,12 +1,12 @@
package org.jboss.tools.maven.configurators.tests;
import org.eclipse.core.resources.IProject;
-import org.eclipse.jpt.common.core.internal.resource.ResourceLocatorManager;
import org.eclipse.jpt.jpa.core.JpaFacet;
import org.eclipse.jpt.jpa.core.JpaProject;
import org.eclipse.jpt.jpa.core.JpaProjectManager;
import org.eclipse.jpt.jpa.core.JptJpaCorePlugin;
import org.eclipse.jst.common.project.facet.core.JavaFacet;
+import org.eclipse.m2e.core.project.ResolverConfiguration;
import org.eclipse.wst.common.project.facet.core.IFacetedProject;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
@@ -20,12 +20,6 @@
IProject project = importProject( "projects/jpa/simple-2.0/pom.xml");
waitForJobsToComplete();
- if (ResourceLocatorManager.instance().getResourceLocator(project) == null) {
- //FIXME : JPT randomly decides to not pick up the
- //MavenResourceLocator from our jpa plugin, leading to test failures
- return;
- }
-
assertIsJpaProject(project, JpaFacet.VERSION_2_0);
assertNoErrors(project);
JpaProjectManager manager = JptJpaCorePlugin.getJpaProjectManager();
@@ -49,7 +43,6 @@
assertTrue("Java Facet is missing", facetedProject.hasProjectFacet(JavaFacet.FACET));
}
- /*
@Test
public void testMultiModule() throws Exception {
IProject[] projects = importProjects("projects/jpa/multi",
@@ -65,12 +58,6 @@
IProject ejb = projects[2];
IProject web = projects[3];
- if (ResourceLocatorManager.instance().getResourceLocator(ejb) == null) {
- //FIXME : JPT randomly decides to not pick up the
- //MavenResourceLocator from our jpa plugin, leading to test failures
- return;
- }
-
assertNoErrors(pom);
assertNoErrors(ejb);
assertNoErrors(ear);
@@ -78,5 +65,4 @@
assertIsJpaProject(ejb, JpaFacet.VERSION_2_0);
}
- */
}
Modified: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/src/org/jboss/tools/maven/configurators/tests/SeamConfiguratorTest.java
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/src/org/jboss/tools/maven/configurators/tests/SeamConfiguratorTest.java 2012-05-23 10:17:24 UTC (rev 41277)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/src/org/jboss/tools/maven/configurators/tests/SeamConfiguratorTest.java 2012-05-23 10:43:09 UTC (rev 41278)
@@ -107,6 +107,30 @@
}
+ @Test
+ public void testJBIDE11570_constraintViolations() throws Exception {
+ IProject project = importProject("projects/seam/violation/pom.xml");
+ waitForJobsToComplete();
+ assertNoErrors(project);
+ assertIsJSFProject(project, JSFProjectConfigurator.JSF_FACET_VERSION_1_2);
+
+ updateProject(project, "add-seam.pom");
+ IFacetedProject fp = ProjectFacetsManager.create(project);
+ assertFalse("Seam facet was installed", fp.hasProjectFacet(SEAM_FACET));
+ assertIsJSFProject(project, JSFProjectConfigurator.JSF_FACET_VERSION_1_2);
+ assertHasError(project, "Seam 2.3 can not be installed as it conflicts with JavaServer Faces 1.2");
+ }
+ @Test
+ public void testJBIDE11570_unresolvedSeamDependency() throws Exception {
+ IProject project = importProject("projects/seam/missing-seam/pom.xml");
+ waitForJobsToComplete();
+ IFacetedProject fp = ProjectFacetsManager.create(project);
+ assertFalse("Seam facet was installed", fp.hasProjectFacet(SEAM_FACET));
+ assertFalse("JSF facet was installed", fp.hasProjectFacet(JSFProjectConfigurator.JSF_FACET));
+ assertHasError(project, "Missing artifact org.jboss.seam:jboss-seam:jar:missing");
+ }
+
+
}
12 years, 9 months
JBoss Tools SVN: r41277 - in trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui: document and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2012-05-23 06:17:24 -0400 (Wed, 23 May 2012)
New Revision: 41277
Modified:
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/console/ForgeCommandProcessor.java
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/console/ForgeTextViewer.java
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/document/ForgeDocument.java
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/part/SelectionSynchronizer.java
Log:
JBIDE-11919: Forge Console in JBDS/Tools - Screen "Garbage"
Modified: trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/console/ForgeCommandProcessor.java
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/console/ForgeCommandProcessor.java 2012-05-23 10:09:06 UTC (rev 41276)
+++ trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/console/ForgeCommandProcessor.java 2012-05-23 10:17:24 UTC (rev 41277)
@@ -48,7 +48,7 @@
if (command == null) return;
refreshWorkspace();
final ForgeCommandPostProcessor postProcessor = getPostProcessors().get(command);
- Display.getDefault().asyncExec(new Runnable() {
+ Display.getDefault().syncExec(new Runnable() {
@Override
public void run() {
if (postProcessor != null) {
@@ -85,10 +85,14 @@
private void showForgeConsole() {
IWorkbenchWindow workbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- IWorkbenchPage workbenchPage = workbenchWindow.getActivePage();
- IViewPart forgeView = workbenchPage.findView(ForgeView.ID);
- if (forgeView != null) {
- forgeView.setFocus();
+ if (workbenchWindow != null) {
+ IWorkbenchPage workbenchPage = workbenchWindow.getActivePage();
+ if (workbenchPage != null) {
+ IViewPart forgeView = workbenchPage.findView(ForgeView.ID);
+ if (forgeView != null) {
+ forgeView.setFocus();
+ }
+ }
}
}
Modified: trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/console/ForgeTextViewer.java
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/console/ForgeTextViewer.java 2012-05-23 10:09:06 UTC (rev 41276)
+++ trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/console/ForgeTextViewer.java 2012-05-23 10:17:24 UTC (rev 41277)
@@ -100,11 +100,9 @@
switch (action) {
case ST.LINE_END:
getRuntime().sendInput(END_LINE);
- System.out.println("line end");
break;
case ST.LINE_START:
getRuntime().sendInput(START_LINE);
- System.out.println("line start");
break;
case ST.LINE_UP:
getRuntime().sendInput(PREV_HISTORY);
Modified: trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/document/ForgeDocument.java
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/document/ForgeDocument.java 2012-05-23 10:09:06 UTC (rev 41276)
+++ trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/document/ForgeDocument.java 2012-05-23 10:17:24 UTC (rev 41277)
@@ -26,15 +26,15 @@
void cursorMoved();
}
- private class AsyncForgeCommandFilter extends ForgeCommandFilter {
- public AsyncForgeCommandFilter(ForgeOutputListener listener) {
+ private class SyncForgeCommandFilter extends ForgeCommandFilter {
+ public SyncForgeCommandFilter(ForgeOutputListener listener) {
super(listener);
}
public void outputAvailable(final String output) {
- Display.getDefault().asyncExec(new Runnable() {
+ Display.getDefault().syncExec(new Runnable() {
@Override
public void run() {
- AsyncForgeCommandFilter.super.outputAvailable(output);
+ SyncForgeCommandFilter.super.outputAvailable(output);
}
});
}
@@ -72,7 +72,7 @@
executeAnsiCommand(command);
}
};
- outputListener = new AsyncForgeCommandFilter(facf);
+ outputListener = new SyncForgeCommandFilter(facf);
runtime.addOutputListener(outputListener);
}
Modified: trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/part/SelectionSynchronizer.java
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/part/SelectionSynchronizer.java 2012-05-23 10:09:06 UTC (rev 41276)
+++ trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/part/SelectionSynchronizer.java 2012-05-23 10:17:24 UTC (rev 41277)
@@ -51,8 +51,7 @@
@Override
public void partActivated(IWorkbenchPart part) {
- // TODO Auto-generated method stub
-
+ // Ignore
}
};
12 years, 9 months
JBoss Tools SVN: r41276 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-05-23 06:09:06 -0400 (Wed, 23 May 2012)
New Revision: 41276
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPageModel.java
Log:
[JBIDE-11311] moved "select jbossas-7 cartridge by default" to model
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java 2012-05-23 09:39:16 UTC (rev 41275)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java 2012-05-23 10:09:06 UTC (rev 41276)
@@ -13,6 +13,7 @@
import java.lang.reflect.InvocationTargetException;
import java.net.SocketTimeoutException;
import java.util.Collection;
+import java.util.List;
import org.eclipse.core.databinding.DataBindingContext;
import org.eclipse.core.databinding.UpdateListStrategy;
@@ -111,8 +112,9 @@
private Group newAppEmbeddableCartridgesGroup;
private Button checkAllButton;
private Button uncheckAllButton;
- //private ModifyListener modifyListener;
+ // private ModifyListener modifyListener;
+
public ApplicationConfigurationWizardPage(IWizard wizard, OpenShiftExpressApplicationWizardModel wizardModel) {
super("Setup OpenShift Application",
"Select an existing or create a new OpenShift Application.",
@@ -254,6 +256,8 @@
final Label newAppNameLabel = new Label(newAppConfigurationGroup, SWT.NONE);
newAppNameLabel.setText("Name:");
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).applyTo(newAppNameLabel);
+
+ // application name
this.newAppNameText = new Text(newAppConfigurationGroup, SWT.BORDER);
GridDataFactory.fillDefaults().grab(true, false).span(2, 1).align(SWT.FILL, SWT.FILL).applyTo(newAppNameText);
UIUtils.selectAllOnFocus(newAppNameText);
@@ -262,8 +266,19 @@
final IObservableValue applicationNameModelObservable =
BeanProperties.value(ApplicationConfigurationWizardPageModel.PROPERTY_APPLICATION_NAME).observe(
pageModel);
- ValueBindingBuilder.bind(applicationNameTextObservable).to(applicationNameModelObservable).in(dbc);
+ ValueBindingBuilder
+ .bind(applicationNameTextObservable).
+ to(applicationNameModelObservable)
+ .in(dbc);
+ final ISWTObservableValue useExistingAppBtnSelection = WidgetProperties.selection().observe(useExistingAppBtn);
+ final NewApplicationNameValidator newApplicationNameValidator =
+ new NewApplicationNameValidator(useExistingAppBtnSelection, applicationNameTextObservable);
+ dbc.addValidationStatusProvider(newApplicationNameValidator);
+ ControlDecorationSupport.create(
+ newApplicationNameValidator, SWT.LEFT | SWT.TOP, null, new CustomControlDecorationUpdater());
+
+ // application type
final Label newAppTypeLabel = new Label(newAppConfigurationGroup, SWT.NONE);
newAppTypeLabel.setText("Type:");
GridDataFactory.fillDefaults()
@@ -271,23 +286,23 @@
this.newAppCartridgeCombo = new Combo(newAppConfigurationGroup, SWT.BORDER | SWT.READ_ONLY);
GridDataFactory.fillDefaults()
.align(SWT.FILL, SWT.CENTER).span(2, 1).grab(true, false).applyTo(newAppCartridgeCombo);
- fillCartridgesCombo(dbc, newAppCartridgeCombo);
- final ISWTObservableValue selectedCartridgeComboObservable =
- WidgetProperties.selection().observe(newAppCartridgeCombo);
- final IObservableValue selectedCartridgeModelObservable = BeanProperties.value(
- ApplicationConfigurationWizardPageModel.PROPERTY_SELECTED_CARTRIDGE).observe(pageModel);
- ValueBindingBuilder.bind(selectedCartridgeComboObservable)
- .converting(new StringToCartridgeConverter())
+
+ dbc.bindList(WidgetProperties.items().observe(newAppCartridgeCombo),
+ BeanProperties.list(ApplicationConfigurationWizardPageModel.PROPERTY_CARTRIDGES).observe(pageModel),
+ new UpdateListStrategy(UpdateListStrategy.POLICY_NEVER),
+ new UpdateListStrategy().setConverter(new CartridgeToStringConverter()));
+
+ final ISWTObservableValue selectedCartridgeIndexObservable =
+ WidgetProperties.singleSelectionIndex().observe(newAppCartridgeCombo);
+ final IObservableValue selectedCartridgeModelObservable =
+ BeanProperties.value(
+ ApplicationConfigurationWizardPageModel.PROPERTY_SELECTED_CARTRIDGE).observe(pageModel);
+ ValueBindingBuilder.bind(selectedCartridgeIndexObservable)
+ .converting(new CartridgesIndexToCartridge())
.to(selectedCartridgeModelObservable)
- .converting(new CartridgeToStringConverter())
- .in(dbc);
-
- final ISWTObservableValue useExistingAppBtnSelection = WidgetProperties.selection().observe(useExistingAppBtn);
- final NewApplicationNameValidator newApplicationNameValidator =
- new NewApplicationNameValidator(useExistingAppBtnSelection, applicationNameTextObservable);
- dbc.addValidationStatusProvider(newApplicationNameValidator);
- ControlDecorationSupport.create(
- newApplicationNameValidator, SWT.LEFT | SWT.TOP, null, new CustomControlDecorationUpdater());
+ .converting(new CartridgeToCartridgesIndex()
+ ).in(dbc);
+
// gear profile
final Label gearProfileLabel = new Label(newAppConfigurationGroup, SWT.NONE);
gearProfileLabel.setText("Gear profile:");
@@ -319,7 +334,7 @@
.in(dbc);
final NewApplicationTypeValidator newApplicationTypeValidator =
- new NewApplicationTypeValidator(useExistingAppBtnSelection, selectedCartridgeComboObservable);
+ new NewApplicationTypeValidator(useExistingAppBtnSelection, selectedCartridgeIndexObservable);
dbc.addValidationStatusProvider(newApplicationTypeValidator);
ControlDecorationSupport.create(newApplicationTypeValidator, SWT.LEFT | SWT.TOP, null,
new CustomControlDecorationUpdater());
@@ -411,13 +426,6 @@
}, newAppConfigurationGroup);
}
- private void fillCartridgesCombo(DataBindingContext dbc, Combo cartridgesCombo) {
- dbc.bindList(WidgetProperties.items().observe(cartridgesCombo),
- BeanProperties.list(ApplicationConfigurationWizardPageModel.PROPERTY_CARTRIDGES).observe(pageModel),
- new UpdateListStrategy(UpdateListStrategy.POLICY_NEVER),
- new UpdateListStrategy().setConverter(new CartridgeToStringConverter()));
- }
-
private void fillGearProfilesCombo(DataBindingContext dbc, Combo gearSizesCombo) {
dbc.bindList(WidgetProperties.items().observe(gearSizesCombo),
BeanProperties.list(ApplicationConfigurationWizardPageModel.PROPERTY_GEAR_PROFILES).observe(pageModel),
@@ -432,11 +440,11 @@
TableColumnLayout tableLayout = new TableColumnLayout();
tableContainer.setLayout(tableLayout);
CheckboxTableViewer viewer = new CheckboxTableViewer(table);
- viewer.setSorter(new ViewerSorter(){
+ viewer.setSorter(new ViewerSorter() {
@Override
public int compare(Viewer viewer, Object e1, Object e2) {
- if(e1 instanceof IEmbeddableCartridge && e2 instanceof IEmbeddableCartridge){
- return ((IEmbeddableCartridge)e1).getName().compareTo(((IEmbeddableCartridge)e2).getName());
+ if (e1 instanceof IEmbeddableCartridge && e2 instanceof IEmbeddableCartridge) {
+ return ((IEmbeddableCartridge) e1).getName().compareTo(((IEmbeddableCartridge) e2).getName());
}
return super.compare(viewer, e1, e2);
}
@@ -519,20 +527,45 @@
}
}
- private final class StringToCartridgeConverter extends Converter {
- private StringToCartridgeConverter() {
- super(String.class, ICartridge.class);
+ private final class CartridgesIndexToCartridge extends Converter {
+
+ public CartridgesIndexToCartridge() {
+ super(Integer.class, ICartridge.class);
}
@Override
public Object convert(Object fromObject) {
- if (fromObject instanceof String) {
- return pageModel.getCartridgeByName((String) fromObject);
+ if (!(fromObject instanceof Integer)) {
+ return null;
}
- return null;
+
+ int index = ((Integer) fromObject).intValue();
+ List<ICartridge> cartridges = pageModel.getCartridges();
+ if (index >= cartridges.size()) {
+ return null;
+ }
+ return cartridges.get(index);
}
}
+ private final class CartridgeToCartridgesIndex extends Converter {
+
+ public CartridgeToCartridgesIndex() {
+ super(ICartridge.class, Integer.class);
+ }
+
+ @Override
+ public Object convert(Object fromObject) {
+ if (!(fromObject instanceof ICartridge)) {
+ return null;
+ }
+
+ ICartridge cartridge = ((ICartridge) fromObject);
+ List<ICartridge> cartridges = pageModel.getCartridges();
+ return cartridges.indexOf(cartridge);
+ }
+ }
+
private static final class GearProfileToStringConverter extends Converter {
private GearProfileToStringConverter() {
super(Object.class, String.class);
@@ -626,7 +659,7 @@
@Override
protected void onPageActivated(final DataBindingContext dbc) {
- if(checkForDomainExistance()) {
+ if (checkForDomainExistance()) {
new Thread() {
public void run() {
Display.getDefault().asyncExec(new Runnable() {
@@ -634,8 +667,10 @@
loadOpenshiftResources(dbc);
enableApplicationWidgets(pageModel.isUseExistingApplication());
createExistingAppNameContentAssist();
- // this is needed because of weird issues with UI not
- // reacting to model changes while wizard runnable is
+ // this is needed because of weird issues with UI
+ // not
+ // reacting to model changes while wizard runnable
+ // is
// run. We force another update
dbc.updateModels();
}
@@ -650,12 +685,13 @@
if (direction == Direction.BACKWARDS) {
return;
}
- //event.doit = checkForDomainExistance();
+ // event.doit = checkForDomainExistance();
}
/**
- * Checks that the user has a domain, opens the creation dialog in case he hasn't, closes the wizard if the user
- * does not create a domain (required for any application creation). Otherwise, returns true.
+ * Checks that the user has a domain, opens the creation dialog in case he
+ * hasn't, closes the wizard if the user does not create a domain (required
+ * for any application creation). Otherwise, returns true.
*/
private boolean checkForDomainExistance() {
try {
@@ -871,11 +907,12 @@
@Override
protected IStatus validate() {
final boolean useExistingApp = (Boolean) useExistingAppBtnbservable.getValue();
- final String applicationType = (String) selectedApplicationTypeObservable.getValue();
+ final Integer selectedCartridgeIndex = (Integer) selectedApplicationTypeObservable.getValue();
if (useExistingApp) {
return ValidationStatus.ok();
}
- if (StringUtils.isEmpty(applicationType)) {
+ if (selectedCartridgeIndex == null
+ || selectedCartridgeIndex == -1) {
return ValidationStatus.cancel(getDescription());
}
return ValidationStatus.ok();
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPageModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPageModel.java 2012-05-23 09:39:16 UTC (rev 41275)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPageModel.java 2012-05-23 10:09:06 UTC (rev 41276)
@@ -207,35 +207,15 @@
}
public void setCartridges(List<ICartridge> cartridges) {
- sort(cartridges);
+ Collections.sort(cartridges, new CartridgeNameComparator());
firePropertyChange(PROPERTY_CARTRIDGES, this.cartridges, this.cartridges = cartridges);
+ setSelectedCartridge(ICartridge.JBOSSAS_7);
}
- private void sort(List<ICartridge> cartridges) {
- Collections.sort(cartridges, new CartridgeNameComparator());
- }
-
public List<ICartridge> getCartridges() {
return cartridges;
}
- public ICartridge getCartridgeByName(String name) {
- List<ICartridge> cartridges = getCartridges();
- if (cartridges == null) {
- return null;
- }
-
- ICartridge matchingCartridge = null;
- for (ICartridge cartridge : cartridges) {
- if (name.equals(cartridge.getName())) {
- matchingCartridge = cartridge;
- break;
- }
- }
-
- return matchingCartridge;
- }
-
public ICartridge getSelectedCartridge() {
return wizardModel.getApplicationCartridge();
}
12 years, 9 months
JBoss Tools SVN: r41275 - in trunk/openshift/plugins: org.jboss.tools.openshift.express.ui and 8 other directories.
by jbosstools-commits@lists.jboss.org
Author: xcoulon
Date: 2012-05-23 05:39:16 -0400 (Wed, 23 May 2012)
New Revision: 41275
Added:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/CreateOrEditDomainActionProvider.java
Removed:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/EditDomainActionProvider.java
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.client/openshift-java-client-2.0.0-SNAPSHOT.jar
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressServerUtils.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserDelegate.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserModel.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateOrEditDomainAction.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/DeleteDomainAction.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressDetailsComposite.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/OpenShiftExpressConsoleLabelProvider.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/property/UserPropertySource.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPage.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java
Log:
Fixed - JBIDE-11962
Unchecking 'remember password' has no effect when connecting user from Openshift Explorer
Fixed - JBIDE-11960
Error when expanding user node when password is not saved in secure store
Fixed - JBIDE-11295
Creating/Editing domain in OpenShift Console view when user not connected
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.client/openshift-java-client-2.0.0-SNAPSHOT.jar
===================================================================
(Binary files differ)
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml 2012-05-23 09:36:54 UTC (rev 41274)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/plugin.xml 2012-05-23 09:39:16 UTC (rev 41275)
@@ -364,7 +364,7 @@
</enablement>
</actionProvider>
<actionProvider
- class="org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider.EditDomainActionProvider"
+ class="org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider.CreateOrEditDomainActionProvider"
id="org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider.editDomainActionProvider">
<enablement>
<and>
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressServerUtils.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressServerUtils.java 2012-05-23 09:36:54 UTC (rev 41274)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressServerUtils.java 2012-05-23 09:39:16 UTC (rev 41275)
@@ -404,7 +404,7 @@
IEclipsePreferences node = context.getNode(qualifier);
node.put(ExpressServerUtils.SETTING_APPLICATION_ID, app.getUUID());
node.put(ExpressServerUtils.SETTING_APPLICATION_NAME, app.getName());
- node.put(ExpressServerUtils.SETTING_USERNAME, user.getRhlogin());
+ node.put(ExpressServerUtils.SETTING_USERNAME, user.getUsername());
node.put(ExpressServerUtils.SETTING_DOMAIN, app.getDomain().getId());
node.put(ExpressServerUtils.SETTING_REMOTE_NAME, remoteName);
node.put(ExpressServerUtils.SETTING_DEPLOY_FOLDER_NAME, deployFolder);
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserDelegate.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserDelegate.java 2012-05-23 09:36:54 UTC (rev 41274)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserDelegate.java 2012-05-23 09:39:16 UTC (rev 41275)
@@ -36,15 +36,23 @@
import com.openshift.client.OpenShiftUnknonwSSHKeyTypeException;
public class UserDelegate {
+ private String username;
+ private String password;
private IUser delegate;
private boolean rememberPassword;
private boolean connected;
private boolean alreadyPromptedForPassword;
- public UserDelegate(IUser user, boolean rememberPassword, boolean connected) {
- this.delegate = user;
+ public UserDelegate(String username, String password) {
+ this.username = username;
+ this.password = password;
+ this.rememberPassword = (password != null);
+ this.setConnected(false);
+ }
+
+ public UserDelegate(IUser user, boolean rememberPassword) {
+ setDelegate(user);
this.rememberPassword = rememberPassword;
- this.setConnected(connected);
}
/**
@@ -59,13 +67,16 @@
*/
protected final void setDelegate(IUser delegate) {
this.delegate = delegate;
+ this.username = delegate.getRhlogin();
+ this.password = delegate.getPassword();
+ this.setConnected(true);
}
- public String getRhlogin() {
- return delegate.getRhlogin();
+ public String getUsername() {
+ return username;
}
public String getPassword() {
- return delegate.getPassword();
+ return password;
}
public boolean isRememberPassword() {
@@ -75,7 +86,7 @@
/**
* @param rememberPassword the rememberPassword to set
*/
- protected final void setRememberPassword(boolean rememberPassword) {
+ public final void setRememberPassword(boolean rememberPassword) {
this.rememberPassword = rememberPassword;
}
@@ -88,7 +99,7 @@
* @return true if user entered credentials, false otherwise.
*/
public boolean checkForPassword() {
- if( delegate.getPassword() == null || "".equals(delegate.getPassword())) {
+ if(delegate == null) {
try {
this.alreadyPromptedForPassword = true;
Display.getDefault().syncExec(new Runnable() { public void run() {
@@ -113,7 +124,7 @@
Logger.error("Failed to retrieve User's password", e);
}
}
- return (delegate.getPassword() != null && !"".equals(delegate.getPassword()));
+ return (delegate != null);
}
public IApplication createApplication(final String applicationName, final ICartridge applicationType, final ApplicationScale scale, final IGearProfile gearProfile)
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserModel.java 2012-05-23 09:36:54 UTC (rev 41274)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/console/UserModel.java 2012-05-23 09:39:16 UTC (rev 41275)
@@ -10,7 +10,9 @@
******************************************************************************/
package org.jboss.tools.openshift.express.internal.core.console;
+import java.io.FileNotFoundException;
import java.io.IOException;
+import java.net.SocketTimeoutException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
@@ -32,8 +34,8 @@
import com.openshift.client.configuration.OpenShiftConfiguration;
public class UserModel {
- private static final String USER_ID = OpenShiftUIActivator.PLUGIN_ID + " " +
- OpenShiftUIActivator.getDefault().getBundle().getVersion();
+ private static final String USER_ID = OpenShiftUIActivator.PLUGIN_ID + " "
+ + OpenShiftUIActivator.getDefault().getBundle().getVersion();
private static UserModel model;
public static UserModel getDefault() {
@@ -66,10 +68,15 @@
* @param password
* @return
* @throws OpenShiftException
+ * @throws FileNotFoundException
+ * @throws SocketTimeoutException
* @throws IOException
*/
- public IUser createUser(String username, String password) throws OpenShiftException, IOException {
- return new OpenShiftConnectionFactory().getConnection(USER_ID, username, password).getUser();
+ public IUser createUser(String username, String password) throws OpenShiftException, SocketTimeoutException {
+ IUser user = new OpenShiftConnectionFactory().getConnection(USER_ID, username, password).getUser();
+ // force domain loading so that there is no 'lazy domain loading' cost after that.
+ user.getDefaultDomain();
+ return user;
}
private static final int ADDED = 0;
@@ -77,13 +84,13 @@
private static final int CHANGED = 2;
public void addUser(UserDelegate user) {
- allUsers.put(user.getRhlogin(), user);
+ allUsers.put(user.getUsername(), user);
this.recentUser = user;
fireModelChange(user, ADDED);
}
public void removeUser(UserDelegate user) {
- allUsers.remove(user.getRhlogin());
+ allUsers.remove(user.getUsername());
if (this.recentUser == user)
this.recentUser = null;
fireModelChange(user, REMOVED);
@@ -136,14 +143,13 @@
OpenShiftUIActivator.PLUGIN_ID);
String[] users = pref.get();
for (int i = 0; i < users.length; i++) {
+ String password = getPasswordFromSecureStorage(users[i]);
try {
- String password = getPasswordFromSecureStorage(users[i]);
- UserDelegate u = new UserDelegate(createUser(users[i], password), password != null, password != null);
- addUser(u);
- } catch (OpenShiftException ose) {
- // TODO
- } catch (IOException ioe) {
- // TODO
+ addUser(new UserDelegate(createUser(users[i], password), true));
+ } catch (OpenShiftException e) {
+ addUser(new UserDelegate(users[i], password));
+ } catch (SocketTimeoutException e) {
+ addUser(new UserDelegate(users[i], password));
}
}
}
@@ -163,8 +169,7 @@
for (Entry<String, UserDelegate> entry : allUsers.entrySet()) {
UserDelegate user = entry.getValue();
if (user.isRememberPassword()) {
- setPasswordInSecureStorage(user.getRhlogin(),
- user.getPassword());
+ setPasswordInSecureStorage(user.getUsername(), user.getPassword());
}
}
}
@@ -208,8 +213,7 @@
}
/*
- * Return a password from secure storage, or null if platform not found, or
- * password not stored
+ * Return a password from secure storage, or null if platform not found, or password not stored
*/
public String getPasswordFromSecureStorage(final String rhLogin) {
if (rhLogin == null)
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateOrEditDomainAction.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateOrEditDomainAction.java 2012-05-23 09:36:54 UTC (rev 41274)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateOrEditDomainAction.java 2012-05-23 09:39:16 UTC (rev 41275)
@@ -38,12 +38,18 @@
@Override
public void run() {
final ITreeSelection treeSelection = (ITreeSelection) selection;
- if (selection instanceof ITreeSelection
- && treeSelection.getFirstElement() instanceof UserDelegate) {
+ if (selection instanceof ITreeSelection && treeSelection.getFirstElement() instanceof UserDelegate) {
final UserDelegate user = (UserDelegate) treeSelection.getFirstElement();
- WizardDialog dialog = new WizardDialog(Display.getCurrent().getActiveShell(), createDomainWizard(user));
- dialog.create();
- dialog.open();
+ boolean connected = user.isConnected();
+ if (!connected) {
+ connected = user.checkForPassword();
+ }
+ // do not show the dialog if the user was not connected or did not provide valid credentials.
+ if (connected) {
+ WizardDialog dialog = new WizardDialog(Display.getCurrent().getActiveShell(), createDomainWizard(user));
+ dialog.create();
+ dialog.open();
+ }
}
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/DeleteDomainAction.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/DeleteDomainAction.java 2012-05-23 09:36:54 UTC (rev 41274)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/DeleteDomainAction.java 2012-05-23 09:39:16 UTC (rev 41275)
@@ -46,22 +46,17 @@
if (selection instanceof ITreeSelection
&& ((IStructuredSelection) selection).getFirstElement() instanceof UserDelegate
&& ((ITreeSelection) selection).size() == 1) {
- UserDelegate user = (UserDelegate) ((IStructuredSelection) selection)
- .getFirstElement();
- try {
- IDomain domain = user.getDefaultDomain();
-
- if (domain != null) {
- enable = true;
+ UserDelegate user = (UserDelegate) ((IStructuredSelection) selection).getFirstElement();
+ if (user.isConnected()) {
+ try {
+ if (user.getDefaultDomain() != null) {
+ enable = true;
+ }
+ } catch (OpenShiftException e) {
+ Logger.warn("Failed to retrieve User domain, prompting for creation", e);
+ } catch (SocketTimeoutException e) {
+ Logger.warn("Failed to retrieve User domain, prompting for creation", e);
}
- } catch (OpenShiftException e) {
- Logger.warn(
- "Failed to retrieve User domain, prompting for creation",
- e);
- } catch (SocketTimeoutException e) {
- Logger.warn(
- "Failed to retrieve User domain, prompting for creation",
- e);
}
}
setEnabled(enable);
@@ -75,7 +70,9 @@
UserDelegate user = (UserDelegate) treeSelection.getFirstElement();
try {
final IDomain domain = user.getDefaultDomain();
- if (domain != null) {
+ if (domain == null) {
+ MessageDialog.openInformation(Display.getCurrent().getActiveShell(), "Delete Domain", "User has no domain");
+ } else {
boolean confirm = false;
MessageDialog dialog = new CheckboxMessageDialog(Display.getCurrent()
.getActiveShell(), "Domain deletion", NLS.bind(
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressDetailsComposite.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressDetailsComposite.java 2012-05-23 09:36:54 UTC (rev 41274)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/behaviour/ExpressDetailsComposite.java 2012-05-23 09:39:16 UTC (rev 41275)
@@ -167,7 +167,7 @@
} else {
// we may or may not have a user, clearly no app
this.fuser = tmpUser == null ? UserModel.getDefault().getRecentUser() : tmpUser;
- this.user = fuser == null ? null : fuser.getRhlogin();
+ this.user = fuser == null ? null : fuser.getUsername();
}
this.pass = this.user == null ? null : UserModel.getDefault().getPasswordFromSecureStorage(this.user);
@@ -579,7 +579,7 @@
this.appListNames = appNames == null ? new String[0] : appNames;
this.fapplication = application;
this.fuser = user;
- this.user = fuser.getRhlogin();
+ this.user = fuser.getUsername();
for( int i = 0; i < appList.size(); i++ ) {
projectsPerApp.put(appList.get(i), ExpressServerUtils.findProjectsForApplication(appList.get(i)));
@@ -596,9 +596,9 @@
try {
UserModel.getDefault().addUser(fuser);
if( rememberPassword ) {
- UserModel.getDefault().setPasswordInSecureStorage(fuser.getRhlogin(), fuser.getPassword());
+ UserModel.getDefault().setPasswordInSecureStorage(fuser.getUsername(), fuser.getPassword());
} else {
- UserModel.getDefault().clearPasswordInSecureStorage(fuser.getRhlogin());
+ UserModel.getDefault().clearPasswordInSecureStorage(fuser.getUsername());
}
fillServerWithDetails();
updateProjectSettings();
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/OpenShiftExpressConsoleLabelProvider.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/OpenShiftExpressConsoleLabelProvider.java 2012-05-23 09:36:54 UTC (rev 41274)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/OpenShiftExpressConsoleLabelProvider.java 2012-05-23 09:39:16 UTC (rev 41275)
@@ -84,7 +84,7 @@
@Override
public StyledString getStyledText(Object element) {
if (element instanceof UserDelegate) {
- String message = ((UserDelegate) element).getRhlogin();
+ String message = ((UserDelegate) element).getUsername();
StyledString styledString = new StyledString(message);
styledString.setStyle(0, message.length(), StyledString.DECORATIONS_STYLER);
return new StyledString(message);
Copied: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/CreateOrEditDomainActionProvider.java (from rev 41272, trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/EditDomainActionProvider.java)
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/CreateOrEditDomainActionProvider.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/CreateOrEditDomainActionProvider.java 2012-05-23 09:39:16 UTC (rev 41275)
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider;
+
+import org.jboss.tools.openshift.express.internal.ui.action.CreateOrEditDomainAction;
+
+/**
+ * @author Xavier Coulon
+ */
+public class CreateOrEditDomainActionProvider extends AbstractActionProvider {
+
+ public CreateOrEditDomainActionProvider() {
+ super(new CreateOrEditDomainAction(), "group.edition");
+ }
+
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/CreateOrEditDomainActionProvider.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/EditDomainActionProvider.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/EditDomainActionProvider.java 2012-05-23 09:36:54 UTC (rev 41274)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/actionProvider/EditDomainActionProvider.java 2012-05-23 09:39:16 UTC (rev 41275)
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.openshift.express.internal.ui.viewer.actionProvider;
-
-import org.jboss.tools.openshift.express.internal.ui.action.CreateOrEditDomainAction;
-
-/**
- * @author Xavier Coulon
- */
-public class EditDomainActionProvider extends AbstractActionProvider {
-
- public EditDomainActionProvider() {
- super(new CreateOrEditDomainAction(), "group.edition");
- }
-
-}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/property/UserPropertySource.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/property/UserPropertySource.java 2012-05-23 09:36:54 UTC (rev 41274)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/viewer/property/UserPropertySource.java 2012-05-23 09:39:16 UTC (rev 41275)
@@ -57,7 +57,7 @@
}
if (id.equals(PROPERTY_USERNAME)) {
- return user.getRhlogin();
+ return user.getUsername();
}
if (id.equals(PROPERTY_DOMAIN) && user.hasDomain()) {
return user.getDefaultDomain().getId() + "." + user.getDefaultDomain().getSuffix();
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPage.java 2012-05-23 09:36:54 UTC (rev 41274)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPage.java 2012-05-23 09:39:16 UTC (rev 41275)
@@ -46,7 +46,6 @@
import org.jboss.tools.openshift.express.internal.ui.OpenshiftUIMessages;
import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
import org.jboss.tools.openshift.express.internal.ui.utils.StringUtils;
-import org.jboss.tools.openshift.express.internal.ui.utils.UIUtils;
/**
* @author Andre Dietisheim
@@ -152,6 +151,8 @@
passwordText.setFocus();
}
}
+
+
@Override
protected void onPageWillGetDeactivated(Direction direction, PageChangingEvent event, DataBindingContext dbc) {
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java 2012-05-23 09:36:54 UTC (rev 41274)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java 2012-05-23 09:39:16 UTC (rev 41275)
@@ -19,7 +19,6 @@
import org.jboss.tools.openshift.express.internal.core.console.UserModel;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
import org.jboss.tools.openshift.express.internal.ui.utils.Logger;
-import org.jboss.tools.openshift.express.internal.ui.utils.OpenShiftPasswordStorageKey;
import org.jboss.tools.openshift.express.internal.ui.utils.StringUtils;
import com.openshift.client.NotFoundOpenShiftException;
@@ -74,7 +73,7 @@
user = UserModel.getDefault().getRecentUser();
}
if (user != null) {
- rhLogin = user.getRhlogin();
+ rhLogin = user.getUsername();
} else {
rhLogin = rhLoginPreferenceValue.get();
if (rhLogin == null
@@ -97,7 +96,7 @@
}
private void storePassword(UserDelegate user) {
- UserModel.getDefault().setPasswordInSecureStorage(user.getRhlogin(), password);
+ UserModel.getDefault().setPasswordInSecureStorage(user.getUsername(), password);
}
private void erasePasswordStore() {
@@ -187,16 +186,17 @@
// reuse previous user if it was properly logged in
user = UserModel.getDefault().findUser(rhLogin);
// check user credentials if not logged before or if input password changed
- if(user != null && user.getPassword().equals(password)) {
+ if(user != null && user.isConnected()) {
+ user.setRememberPassword(rememberPassword);
wizardModel.setUser(user);
+ storeUser(user);
} else {
- user = new UserDelegate(UserModel.getDefault().createUser(rhLogin, password), rememberPassword,
- password != null);
+ user = new UserDelegate(UserModel.getDefault().createUser(rhLogin, password), rememberPassword);
if (user.isValid()) {
storeUser(user);
} else {
status = OpenShiftUIActivator.createErrorStatus(NLS.bind(
- "The credentials for user {0} are not valid", user.getRhlogin()));
+ "The credentials for user {0} are not valid", user.getUsername()));
}
}
} catch (NotFoundOpenShiftException e) {
12 years, 9 months