JBoss Tools SVN: r41223 - in trunk/ws: plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: xcoulon
Date: 2012-05-21 16:09:02 -0400 (Mon, 21 May 2012)
New Revision: 41223
Added:
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementChangedBuildJob.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/MutexJobSchedulingRule.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/ResourceChangedBuildJob.java
Removed:
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JaxrsMetamodelBuildJob.java
Modified:
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementChangedListener.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JaxrsMetamodelBuilder.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/ResourceChangedProcessor.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/ResourceDelta.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsJavaElement.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsMetamodel.java
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/utils/Logger.java
trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementDeltaScannerTestCase.java
Log:
Fixed - JBIDE-11922
Add scheduling rules for JAX-RS jobs to avoid concurrent changes in the metamodel
Added: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementChangedBuildJob.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementChangedBuildJob.java (rev 0)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementChangedBuildJob.java 2012-05-21 20:09:02 UTC (rev 41223)
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * Copyright (c) 2008 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:
+ * Xavier Coulon - Initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.ws.jaxrs.core.internal.metamodel.builder;
+
+import static org.jboss.tools.ws.jaxrs.core.internal.metamodel.builder.JaxrsMetamodelBuilder.SCALE;
+
+import java.util.List;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jdt.core.ElementChangedEvent;
+import org.jboss.tools.ws.jaxrs.core.internal.utils.Logger;
+import org.jboss.tools.ws.jaxrs.core.metamodel.JaxrsMetamodelDelta;
+
+/** @author xcoulon */
+public class JavaElementChangedBuildJob extends Job {
+
+ private final JavaElementChangedProcessor javaElementChangedProcessor = new JavaElementChangedProcessor();
+
+ private final JaxrsMetamodelChangedProcessor jaxrsElementChangedProcessor = new JaxrsMetamodelChangedProcessor();
+
+ private final ElementChangedEvent event;
+
+ public JavaElementChangedBuildJob(final ElementChangedEvent event) {
+ super("Incremental JAX-RS Metamodel build..."); //$NON-NLS-1$
+ this.event = event;
+ Logger.debug("Initiating an incremental JAX-RS Metamodel build after " + event); //$NON-NLS-1$
+ }
+
+ @Override
+ protected IStatus run(final IProgressMonitor progressMonitor) {
+ try {
+ progressMonitor.beginTask("Building JAX-RS Metamodel", 4 * SCALE);
+ progressMonitor.worked(SCALE);
+ Logger.debug("Building JAX-RS Metamodel...");
+ if (progressMonitor.isCanceled()) {
+ return Status.CANCEL_STATUS;
+ }
+ // scan and filter delta, retrieve a list of java changes
+ final List<JavaElementDelta> affectedJavaElements = new JavaElementDeltaScanner().scanAndFilterEvent(event,
+ new SubProgressMonitor(progressMonitor, SCALE));
+ if (progressMonitor.isCanceled()) {
+ return Status.CANCEL_STATUS;
+ }
+ final List<JaxrsMetamodelDelta> affectedMetamodels = javaElementChangedProcessor.processAffectedJavaElements(affectedJavaElements,
+ new SubProgressMonitor(progressMonitor, SCALE));
+ if (progressMonitor.isCanceled()) {
+ return Status.CANCEL_STATUS;
+ }
+ jaxrsElementChangedProcessor.processAffectedMetamodels(affectedMetamodels, new SubProgressMonitor(
+ progressMonitor, SCALE));
+ if (progressMonitor.isCanceled()) {
+ return Status.CANCEL_STATUS;
+ }
+ new JaxrsElementChangedPublisher().publish(affectedMetamodels, new SubProgressMonitor(progressMonitor,
+ SCALE));
+ } catch (Throwable e) {
+ Logger.error("Failed to build or refresh the JAX-RS metamodel", e);
+ } finally {
+ progressMonitor.done();
+ }
+ return Status.OK_STATUS;
+ }
+}
Property changes on: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementChangedBuildJob.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementChangedListener.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementChangedListener.java 2012-05-21 20:06:53 UTC (rev 41222)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementChangedListener.java 2012-05-21 20:09:02 UTC (rev 41223)
@@ -46,7 +46,8 @@
try {
if (isApplicable(event.getDelta())) {
logDelta(event.getDelta(), event.getType());
- Job job = new JaxrsMetamodelBuildJob(event);
+ Job job = new JavaElementChangedBuildJob(event);
+ job.setRule(MutexJobSchedulingRule.getInstance());
job.schedule();
}
} catch (CoreException e) {
Deleted: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JaxrsMetamodelBuildJob.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JaxrsMetamodelBuildJob.java 2012-05-21 20:06:53 UTC (rev 41222)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JaxrsMetamodelBuildJob.java 2012-05-21 20:09:02 UTC (rev 41223)
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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:
- * Xavier Coulon - Initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.ws.jaxrs.core.internal.metamodel.builder;
-
-import static org.jboss.tools.ws.jaxrs.core.internal.metamodel.builder.JaxrsMetamodelBuilder.SCALE;
-
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jdt.core.ElementChangedEvent;
-import org.jboss.tools.ws.jaxrs.core.internal.utils.Logger;
-import org.jboss.tools.ws.jaxrs.core.metamodel.JaxrsMetamodelDelta;
-
-/** @author xcoulon */
-public class JaxrsMetamodelBuildJob extends Job {
-
- private final JavaElementChangedProcessor javaElementChangedProcessor = new JavaElementChangedProcessor();
-
- private final JaxrsMetamodelChangedProcessor jaxrsElementChangedProcessor = new JaxrsMetamodelChangedProcessor();
-
- private final ElementChangedEvent event;
-
- public JaxrsMetamodelBuildJob(final ElementChangedEvent event) {
- super("Incremental JAX-RS Metamodel build..."); //$NON-NLS-1$
- this.event = event;
- Logger.debug("Initiating an incremental JAX-RS Metamodel build after " + event); //$NON-NLS-1$
- }
-
- @Override
- protected IStatus run(final IProgressMonitor progressMonitor) {
- try {
- progressMonitor.beginTask("Building JAX-RS Metamodel", 4 * SCALE);
- progressMonitor.worked(SCALE);
- Logger.debug("Building JAX-RS Metamodel...");
- if (progressMonitor.isCanceled()) {
- return Status.CANCEL_STATUS;
- }
- // scan and filter delta, retrieve a list of java changes
- final List<JavaElementDelta> affectedJavaElements = new JavaElementDeltaScanner().scanAndFilterEvent(event,
- new SubProgressMonitor(progressMonitor, SCALE));
- if (progressMonitor.isCanceled()) {
- return Status.CANCEL_STATUS;
- }
- final List<JaxrsMetamodelDelta> affectedMetamodels = javaElementChangedProcessor.processAffectedJavaElements(affectedJavaElements,
- new SubProgressMonitor(progressMonitor, SCALE));
- if (progressMonitor.isCanceled()) {
- return Status.CANCEL_STATUS;
- }
- jaxrsElementChangedProcessor.processAffectedMetamodels(affectedMetamodels, new SubProgressMonitor(
- progressMonitor, SCALE));
- if (progressMonitor.isCanceled()) {
- return Status.CANCEL_STATUS;
- }
- new JaxrsElementChangedPublisher().publish(affectedMetamodels, new SubProgressMonitor(progressMonitor,
- SCALE));
-
- } catch (Throwable e) {
- Logger.error("Failed to build or refresh the JAX-RS metamodel", e);
- } finally {
- progressMonitor.done();
- }
- return Status.OK_STATUS;
- }
-}
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JaxrsMetamodelBuilder.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JaxrsMetamodelBuilder.java 2012-05-21 20:06:53 UTC (rev 41222)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JaxrsMetamodelBuilder.java 2012-05-21 20:09:02 UTC (rev 41223)
@@ -11,28 +11,20 @@
package org.jboss.tools.ws.jaxrs.core.internal.metamodel.builder;
-import static org.eclipse.jdt.core.IJavaElementDelta.CHANGED;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
import java.util.Map;
+import org.eclipse.core.internal.events.ResourceChangeEvent;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IResourceChangeEvent;
import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.QualifiedName;
-import org.eclipse.core.runtime.SubProgressMonitor;
import org.jboss.tools.ws.jaxrs.core.JBossJaxrsCorePlugin;
import org.jboss.tools.ws.jaxrs.core.configuration.ProjectNatureUtils;
-import org.jboss.tools.ws.jaxrs.core.internal.metamodel.domain.JaxrsMetamodel;
import org.jboss.tools.ws.jaxrs.core.internal.utils.ConstantUtils;
import org.jboss.tools.ws.jaxrs.core.internal.utils.Logger;
-import org.jboss.tools.ws.jaxrs.core.metamodel.JaxrsMetamodelDelta;
-import org.jboss.tools.ws.jaxrs.core.metamodel.JaxrsMetamodelLocator;
/**
* The JAX-RS Metamodel builder. Invoked when a full build or an incremental build is triggered on a project on which
@@ -43,6 +35,7 @@
*
* @author xcoulon
*/
+@SuppressWarnings("restriction")
public class JaxrsMetamodelBuilder extends IncrementalProjectBuilder {
public static final int SCALE = 10;
@@ -57,12 +50,6 @@
public static final QualifiedName JAXRS_ELEMENT_CHANGE_LISTENER_NAME = new QualifiedName(
JBossJaxrsCorePlugin.PLUGIN_ID, "jaxrsPostReconcileListener");
- private final JaxrsElementChangedPublisher metamodelChangedPublisher = new JaxrsElementChangedPublisher();
-
- private final JaxrsMetamodelChangedProcessor metamodelChangedProcessor = new JaxrsMetamodelChangedProcessor();
-
- private final ResourceChangedProcessor resourceChangedProcessor = new ResourceChangedProcessor();
-
// TODO : add support for cancellation
// TODO : report build failed
/** {@inheritDoc} */
@@ -109,54 +96,33 @@
* the progress monitor
*/
private void build(final int buildKind, final IProject project, final IProgressMonitor progressMonitor) {
- long startTime = new Date().getTime();
+ /*
+ * progressMonitor.beginTask("Building JAX-RS Metamodel", 4 * SCALE);
+ * Logger.debug("Building JAX-RS Metamodel for project {}...", project.getName()); // extract the relevant delta
+ * bound to this built (some resources or entire project) final List<ResourceDelta> affectedResources =
+ * extractAffectedResources(project, progressMonitor); progressMonitor.worked(SCALE); // compute changes on the
+ * JAX-RS Application(s), HttpMethods, Resources, etc. final boolean withReset = (buildKind == FULL_BUILD ||
+ * buildKind == CLEAN_BUILD); final JaxrsMetamodelDelta metamodelDelta = resourceChangedProcessor
+ * .processAffectedResources(project, withReset, affectedResources, new SubProgressMonitor(progressMonitor,
+ * SCALE)); progressMonitor.worked(SCALE); new
+ * JaxrsMetamodelChangedProcessor().processAffectedMetamodel(metamodelDelta, new
+ * SubProgressMonitor(progressMonitor, SCALE)); progressMonitor.worked(SCALE); new
+ * JaxrsElementChangedPublisher().publish(metamodelDelta, new SubProgressMonitor(progressMonitor, SCALE));
+ * progressMonitor.worked(SCALE);
+ */
+ ResourceChangedBuildJob job = new ResourceChangedBuildJob(project, getResourceChangeEvent(project, buildKind));
+ job.setRule(MutexJobSchedulingRule.getInstance());
+ job.schedule();
try {
- progressMonitor.beginTask("Building JAX-RS Metamodel", 4 * SCALE);
- Logger.debug("Building JAX-RS Metamodel for project {}...", project.getName());
- // extract the relevant delta bound to this built (some resources or entire project)
- final List<ResourceDelta> affectedResources = extractAffectedResources(project, progressMonitor);
- progressMonitor.worked(SCALE);
- // compute changes on the JAX-RS Application(s), HttpMethods, Resources, etc.
- final boolean withReset = (buildKind == FULL_BUILD || buildKind == CLEAN_BUILD);
- final JaxrsMetamodelDelta metamodelDelta = resourceChangedProcessor
- .processAffectedResources(project, withReset, affectedResources, new SubProgressMonitor(progressMonitor, SCALE));
- progressMonitor.worked(SCALE);
- metamodelChangedProcessor.processAffectedMetamodel(metamodelDelta, new SubProgressMonitor(progressMonitor,
- SCALE));
- progressMonitor.worked(SCALE);
- metamodelChangedPublisher.publish(metamodelDelta, new SubProgressMonitor(progressMonitor, SCALE));
- progressMonitor.worked(SCALE);
- } catch (CoreException e) {
- Logger.error("Error while building the JAX-RS Metamodel for project " + project.getName(), e);
- } finally {
- long endTime = new Date().getTime();
- Logger.debug("JAX-RS Metamodel for project '{}' fully built in {} ms.", project.getName(),
- (endTime - startTime));
- try {
- final JaxrsMetamodel metamodel = JaxrsMetamodelLocator.get(project);
- Logger.debug(
- "JAX-RS Metamodel for project '{}' now has {} HttpMethods, {} Resources and {} Endpoints.",
- project.getName(), metamodel.getAllHttpMethods().size(), metamodel.getAllResources().size(),
- metamodel.getAllEndpoints().size());
- } catch (Throwable e) {
- // debug level since the purpose was to display a debug message
- Logger.debug("Error occurred: {}", e);
- }
- progressMonitor.done();
+ job.join();
+ } catch (InterruptedException e) {
+ Logger.warn("JAX-RS Metamodel build job was interrupted", e);
}
+
}
- private List<ResourceDelta> extractAffectedResources(final IProject project, final IProgressMonitor progressMonitor)
- throws CoreException {
- final IResourceDelta delta = getDelta(project);
- final List<ResourceDelta> events = new ArrayList<ResourceDelta>();
- if (delta != null) {
- events.addAll(new ResourceDeltaScanner().scanAndFilterEvent(delta, new SubProgressMonitor(
- progressMonitor, SCALE)));
- } else {
- events.add(new ResourceDelta(project, CHANGED, 0));
- }
- return events;
+ private ResourceChangeEvent getResourceChangeEvent(final IProject project, final int buildKind) {
+ return new ResourceChangeEvent(project, IResourceChangeEvent.POST_CHANGE, buildKind, getDelta(project));
}
/**
Added: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/MutexJobSchedulingRule.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/MutexJobSchedulingRule.java (rev 0)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/MutexJobSchedulingRule.java 2012-05-21 20:09:02 UTC (rev 41223)
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.ws.jaxrs.core.internal.metamodel.builder;
+
+import org.eclipse.core.runtime.jobs.ISchedulingRule;
+
+/**
+ * @author Xavier Coulon
+ *
+ */
+public class MutexJobSchedulingRule implements ISchedulingRule {
+
+ private final static MutexJobSchedulingRule instance = new MutexJobSchedulingRule();
+
+ /**
+ * Private singleton constructor
+ */
+ private MutexJobSchedulingRule() {
+ super();
+ }
+
+ public static MutexJobSchedulingRule getInstance() {
+ return instance;
+ }
+
+ @Override
+ public boolean contains(ISchedulingRule rule) {
+ return rule == this;
+ }
+
+ @Override
+ public boolean isConflicting(ISchedulingRule rule) {
+ return rule == this;
+ }
+
+}
Property changes on: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/MutexJobSchedulingRule.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Copied: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/ResourceChangedBuildJob.java (from rev 40511, trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JaxrsMetamodelBuildJob.java)
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/ResourceChangedBuildJob.java (rev 0)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/ResourceChangedBuildJob.java 2012-05-21 20:09:02 UTC (rev 41223)
@@ -0,0 +1,115 @@
+/*******************************************************************************
+ * Copyright (c) 2008 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:
+ * Xavier Coulon - Initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.ws.jaxrs.core.internal.metamodel.builder;
+
+import static org.eclipse.jdt.core.IJavaElementDelta.CHANGED;
+import static org.jboss.tools.ws.jaxrs.core.internal.metamodel.builder.JaxrsMetamodelBuilder.SCALE;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.core.runtime.jobs.Job;
+import org.jboss.tools.ws.jaxrs.core.internal.metamodel.domain.JaxrsMetamodel;
+import org.jboss.tools.ws.jaxrs.core.internal.utils.Logger;
+import org.jboss.tools.ws.jaxrs.core.metamodel.JaxrsMetamodelDelta;
+import org.jboss.tools.ws.jaxrs.core.metamodel.JaxrsMetamodelLocator;
+
+/** @author xcoulon */
+public class ResourceChangedBuildJob extends Job {
+
+ private final IResourceChangeEvent event;
+
+ private final IProject project;
+
+ public ResourceChangedBuildJob(final IProject project, final IResourceChangeEvent event) {
+ super("Incremental JAX-RS Metamodel build..."); //$NON-NLS-1$
+ this.event = event;
+ this.project = project;
+ Logger.debug("Initiating an incremental JAX-RS Metamodel build after " + event); //$NON-NLS-1$
+ }
+
+ @Override
+ protected IStatus run(final IProgressMonitor progressMonitor) {
+ long startTime = new Date().getTime();
+ try {
+ progressMonitor.beginTask("Building JAX-RS Metamodel", 4 * SCALE);
+ Logger.debug("Building JAX-RS Metamodel...");
+ if (progressMonitor.isCanceled()) {
+ return Status.CANCEL_STATUS;
+ }
+ // extract the relevant delta bound to this built (some resources or entire project)
+ final List<ResourceDelta> affectedResources = extractAffectedResources(event.getDelta(), progressMonitor);
+ progressMonitor.worked(SCALE);
+ if (progressMonitor.isCanceled()) {
+ return Status.CANCEL_STATUS;
+ }
+
+ // compute changes on the JAX-RS Application(s), HttpMethods, Resources, etc.
+ final boolean withReset = (event.getBuildKind() == IncrementalProjectBuilder.FULL_BUILD || event.getBuildKind() == IncrementalProjectBuilder.CLEAN_BUILD);
+ final JaxrsMetamodelDelta metamodelDelta = new ResourceChangedProcessor().processAffectedResources(project,
+ withReset, affectedResources, new SubProgressMonitor(progressMonitor, SCALE));
+ progressMonitor.worked(SCALE);
+ if (progressMonitor.isCanceled()) {
+ return Status.CANCEL_STATUS;
+ }
+ new JaxrsMetamodelChangedProcessor().processAffectedMetamodel(metamodelDelta, new SubProgressMonitor(
+ progressMonitor, SCALE));
+ progressMonitor.worked(SCALE);
+ if (progressMonitor.isCanceled()) {
+ return Status.CANCEL_STATUS;
+ }
+ new JaxrsElementChangedPublisher().publish(metamodelDelta, new SubProgressMonitor(progressMonitor, SCALE));
+ progressMonitor.worked(SCALE);
+
+ } catch (Throwable e) {
+ Logger.error("Failed to build or refresh the JAX-RS metamodel for projet " + project.getName(), e);
+ } finally {
+ long endTime = new Date().getTime();
+ if (Logger.isDebugEnabled()) {
+ Logger.debug("JAX-RS Metamodel fully built in {} ms.", project.getName(), (endTime - startTime));
+ try {
+ final JaxrsMetamodel metamodel = JaxrsMetamodelLocator.get(project);
+ Logger.debug(
+ "JAX-RS Metamodel for project '{}' now has {} HttpMethods, {} Resources and {} Endpoints.",
+ project.getName(), metamodel.getAllHttpMethods().size(),
+ metamodel.getAllResources().size(), metamodel.getAllEndpoints().size());
+ } catch (Throwable e) {
+ // debug level since the purpose was to display a debug message
+ Logger.debug("Error occurred: {}", e);
+ }
+ }
+ progressMonitor.done();
+ }
+ return Status.OK_STATUS;
+ }
+
+ private List<ResourceDelta> extractAffectedResources(final IResourceDelta delta, final IProgressMonitor progressMonitor)
+ throws CoreException {
+ final List<ResourceDelta> events = new ArrayList<ResourceDelta>();
+ if (delta != null) {
+ events.addAll(new ResourceDeltaScanner().scanAndFilterEvent(delta, new SubProgressMonitor(progressMonitor,
+ SCALE)));
+ } else {
+ events.add(new ResourceDelta(project, CHANGED, 0));
+ }
+ return events;
+ }
+}
Property changes on: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/ResourceChangedBuildJob.java
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/ResourceChangedProcessor.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/ResourceChangedProcessor.java 2012-05-21 20:06:53 UTC (rev 41222)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/ResourceChangedProcessor.java 2012-05-21 20:09:02 UTC (rev 41223)
@@ -31,7 +31,6 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.ITypeHierarchy;
import org.eclipse.jdt.core.JavaCore;
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/ResourceDelta.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/ResourceDelta.java 2012-05-21 20:06:53 UTC (rev 41222)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/ResourceDelta.java 2012-05-21 20:09:02 UTC (rev 41223)
@@ -116,7 +116,7 @@
int result = 1;
result = prime * result + deltaKind;
result = prime * result + ((resource == null) ? 0 : resource.hashCode());
- result = prime * result + flags;
+ //result = prime * result + flags;
return result;
}
@@ -153,9 +153,9 @@
* if (compilationUnitAST == null) if (other.compilationUnitAST != null)
* return false;
*/
- if (flags != other.flags) {
+ /*if (flags != other.flags) {
return false;
- }
+ }*/
return true;
}
}
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsJavaElement.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsJavaElement.java 2012-05-21 20:06:53 UTC (rev 41222)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsJavaElement.java 2012-05-21 20:09:02 UTC (rev 41223)
@@ -41,13 +41,9 @@
import javax.ws.rs.QueryParam;
import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jdt.core.IMember;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.core.dom.CompilationUnit;
import org.jboss.tools.ws.jaxrs.core.internal.utils.CollectionUtils;
import org.jboss.tools.ws.jaxrs.core.jdt.Annotation;
-import org.jboss.tools.ws.jaxrs.core.jdt.JdtUtils;
import org.jboss.tools.ws.jaxrs.core.metamodel.EnumKind;
import org.jboss.tools.ws.jaxrs.core.metamodel.IJaxrsHttpMethod;
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsMetamodel.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsMetamodel.java 2012-05-21 20:06:53 UTC (rev 41222)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsMetamodel.java 2012-05-21 20:09:02 UTC (rev 41223)
@@ -503,7 +503,7 @@
return false;
} else if (javaProject != null && other.javaProject == null) {
return false;
- } else if (!javaProject.getHandleIdentifier().equals(other.javaProject.getHandleIdentifier())) {
+ } else if (javaProject != null && other.javaProject != null && !javaProject.getHandleIdentifier().equals(other.javaProject.getHandleIdentifier())) {
return false;
}
return true;
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/utils/Logger.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/utils/Logger.java 2012-05-21 20:06:53 UTC (rev 41222)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/utils/Logger.java 2012-05-21 20:09:02 UTC (rev 41223)
@@ -184,4 +184,8 @@
return JBossJaxrsCorePlugin.getDefault() != null && JBossJaxrsCorePlugin.getDefault().isDebugging()
&& "true".equalsIgnoreCase(debugOption);
}
+
+ public static boolean isDebugEnabled() {
+ return isOptionEnabled(DEBUG);
+ }
}
Modified: trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementDeltaScannerTestCase.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementDeltaScannerTestCase.java 2012-05-21 20:06:53 UTC (rev 41222)
+++ trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementDeltaScannerTestCase.java 2012-05-21 20:09:02 UTC (rev 41223)
@@ -196,14 +196,14 @@
}
@Test
- public void shouldNotNotifyWhenCompilationUnitChangedInPrimaryCopy() throws CoreException {
+ public void shouldNotifyWhenCompilationUnitChangedInPrimaryCopy() throws CoreException {
// pre-condition
ICompilationUnit compilationUnit = JdtUtils.resolveType(
"org.jboss.tools.ws.jaxrs.sample.services.CustomerResource", javaProject, null).getCompilationUnit();
// operation
WorkbenchUtils.appendCompilationUnitType(compilationUnit, "FooBarHTTPMethodMember.txt", bundle, PRIMARY_COPY);
// verifications
- verifyEventNotification(compilationUnit.getResource(), CHANGED, POST_CHANGE, NO_FLAG, never());
+ verifyEventNotification(compilationUnit.getResource(), CHANGED, POST_CHANGE, NO_FLAG, atLeastOnce());
}
@Test
@@ -212,7 +212,7 @@
ICompilationUnit compilationUnit = WorkbenchUtils.createCompilationUnit(javaProject, "FooResource.txt",
"org.jboss.tools.ws.jaxrs.sample.services", "FooResource.java", bundle);
// verifications: 1 times
- verifyEventNotification(compilationUnit.getResource(), CHANGED, POST_CHANGE, CONTENT, times(1));
+ verifyEventNotification(compilationUnit.getResource(), CHANGED, POST_CHANGE, CONTENT, atLeastOnce());
}
@Test
@@ -278,7 +278,7 @@
IType addedType = WorkbenchUtils.appendCompilationUnitType(compilationUnit, "FooResourceMember.txt", bundle,
PRIMARY_COPY);
// verifications: one call PostReconcile + one call on PostChange
- verifyEventNotification(addedType.getResource(), CHANGED, POST_CHANGE, CONTENT, times(1));
+ verifyEventNotification(addedType.getResource(), CHANGED, POST_CHANGE, CONTENT, atLeastOnce());
}
@Test
@@ -328,7 +328,7 @@
WorkbenchUtils.replaceAllOccurrencesOfCode(compilationUnit, "ExceptionMapper<>",
"ExceptionMapper<FooException>", PRIMARY_COPY);
// verifications
- verifyEventNotification(compilationUnit.getResource(), CHANGED, POST_CHANGE, CONTENT, times(1));
+ verifyEventNotification(compilationUnit.getResource(), CHANGED, POST_CHANGE, CONTENT, atLeastOnce());
}
@Test
@@ -352,7 +352,7 @@
type = WorkbenchUtils.replaceFirstOccurrenceOfCode(type, "implements", "implements Serializable, ",
PRIMARY_COPY);
// verifications
- verifyEventNotification(type.getResource(), CHANGED, POST_CHANGE, CONTENT, times(1));
+ verifyEventNotification(type.getResource(), CHANGED, POST_CHANGE, CONTENT, atLeastOnce());
}
@Test
@@ -376,7 +376,7 @@
type = WorkbenchUtils.replaceFirstOccurrenceOfCode(type, "implements ExceptionMapper<EntityNotFoundException>",
"", PRIMARY_COPY);
// verifications
- verifyEventNotification(type.getResource(), CHANGED, POST_CHANGE, CONTENT, times(1));
+ verifyEventNotification(type.getResource(), CHANGED, POST_CHANGE, CONTENT, atLeastOnce());
}
@Test
@@ -400,7 +400,7 @@
type = WorkbenchUtils.replaceFirstOccurrenceOfCode(type, "implements", "extends Object implements",
PRIMARY_COPY);
// verifications
- verifyEventNotification(type.getResource(), CHANGED, POST_CHANGE, CONTENT, times(1));
+ verifyEventNotification(type.getResource(), CHANGED, POST_CHANGE, CONTENT, atLeastOnce());
}
@Test
@@ -420,7 +420,7 @@
// operation
type = WorkbenchUtils.replaceFirstOccurrenceOfCode(type, "extends Product", "", PRIMARY_COPY);
// verifications
- verifyEventNotification(type.getResource(), CHANGED, POST_CHANGE, CONTENT, times(1));
+ verifyEventNotification(type.getResource(), CHANGED, POST_CHANGE, CONTENT, atLeastOnce());
}
@Test
@@ -448,7 +448,7 @@
WorkbenchUtils.replaceAllOccurrencesOfCode(compilationUnit, "<PersistenceException>", "<FooException>",
PRIMARY_COPY);
// verifications
- verifyEventNotification(compilationUnit.getResource(), CHANGED, POST_CHANGE, CONTENT, times(1));
+ verifyEventNotification(compilationUnit.getResource(), CHANGED, POST_CHANGE, CONTENT, atLeastOnce());
}
@Test
@@ -474,7 +474,7 @@
LOGGER.info("Performing Test Operation(s)...");
WorkbenchUtils.replaceAllOccurrencesOfCode(compilationUnit, "<PersistenceException>", "<>", PRIMARY_COPY);
// verifications
- verifyEventNotification(compilationUnit.getResource(), CHANGED, POST_CHANGE, CONTENT, times(1));
+ verifyEventNotification(compilationUnit.getResource(), CHANGED, POST_CHANGE, CONTENT, atLeastOnce());
}
@Test
@@ -497,7 +497,7 @@
// operation
WorkbenchUtils.addTypeAnnotation(type, "import javax.ws.rs.Consumes;\n@Consumes(\"foo/bar\")", PRIMARY_COPY);
// verifications
- verifyEventNotification(type.getResource(), CHANGED, POST_CHANGE, CONTENT, times(1));
+ verifyEventNotification(type.getResource(), CHANGED, POST_CHANGE, CONTENT, atLeastOnce());
}
@Test
@@ -522,7 +522,7 @@
type = WorkbenchUtils.replaceFirstOccurrenceOfCode(type, "@Path(CustomerResource.URI_BASE)", "@Path(\"/foo\")",
PRIMARY_COPY);
// verifications
- verifyEventNotification(type.getResource(), CHANGED, POST_CHANGE, CONTENT, times(1));
+ verifyEventNotification(type.getResource(), CHANGED, POST_CHANGE, CONTENT, atLeastOnce());
}
@Test
@@ -545,7 +545,7 @@
// operation
WorkbenchUtils.removeFirstOccurrenceOfCode(type, "@Path(CustomerResource.URI_BASE)", PRIMARY_COPY);
// verifications
- verifyEventNotification(type.getResource(), CHANGED, POST_CHANGE, CONTENT, times(1));
+ verifyEventNotification(type.getResource(), CHANGED, POST_CHANGE, CONTENT, atLeastOnce());
}
@Test
@@ -596,7 +596,7 @@
// operation
WorkbenchUtils.createField(type, "private int i", PRIMARY_COPY);
// verifications
- verifyEventNotification(type.getResource(), CHANGED, POST_CHANGE, CONTENT, times(1));
+ verifyEventNotification(type.getResource(), CHANGED, POST_CHANGE, CONTENT, atLeastOnce());
}
@Test
@@ -618,7 +618,7 @@
// operation
IField addedField = WorkbenchUtils.createField(type, "@PathParam() private int i", PRIMARY_COPY);
// verifications
- verifyEventNotification(addedField.getResource(), CHANGED, POST_CHANGE, CONTENT, times(1));
+ verifyEventNotification(addedField.getResource(), CHANGED, POST_CHANGE, CONTENT, atLeastOnce());
}
@Test
@@ -643,7 +643,7 @@
// operation
WorkbenchUtils.replaceAllOccurrencesOfCode(type.getCompilationUnit(), "entityManager", "em", PRIMARY_COPY);
// verifications
- verifyEventNotification(type.getResource(), CHANGED, POST_CHANGE, CONTENT, times(1));
+ verifyEventNotification(type.getResource(), CHANGED, POST_CHANGE, CONTENT, atLeastOnce());
}
@Test
@@ -668,7 +668,7 @@
WorkbenchUtils.replaceAllOccurrencesOfCode(type.getCompilationUnit(), "private EntityManager",
"private HibernateEntityManager", PRIMARY_COPY);
// verifications
- verifyEventNotification(type.getResource(), CHANGED, POST_CHANGE, CONTENT, times(1));
+ verifyEventNotification(type.getResource(), CHANGED, POST_CHANGE, CONTENT, atLeastOnce());
}
@Test
@@ -692,7 +692,7 @@
// operation
WorkbenchUtils.removeField(field, PRIMARY_COPY);
// verifications
- verifyEventNotification(type.getResource(), CHANGED, POST_CHANGE, CONTENT, times(1));
+ verifyEventNotification(type.getResource(), CHANGED, POST_CHANGE, CONTENT, atLeastOnce());
}
@Test
@@ -716,7 +716,7 @@
// operation
WorkbenchUtils.addFieldAnnotation(field, "@PathParam()", PRIMARY_COPY);
// verifications
- verifyEventNotification(type.getResource(), CHANGED, POST_CHANGE, CONTENT, times(1));
+ verifyEventNotification(type.getResource(), CHANGED, POST_CHANGE, CONTENT, atLeastOnce());
}
@Test
@@ -744,7 +744,7 @@
"@PersistenceContext(value=\"foo\")", PRIMARY_COPY);
// verifications
IAnnotation annotation = field.getAnnotation("PersistenceContext");
- verifyEventNotification(annotation.getResource(), CHANGED, POST_CHANGE, CONTENT, times(1));
+ verifyEventNotification(annotation.getResource(), CHANGED, POST_CHANGE, CONTENT, atLeastOnce());
}
@Test
@@ -770,7 +770,7 @@
// operation
WorkbenchUtils.removeFieldAnnotation(field, "@PersistenceContext", PRIMARY_COPY);
// verifications
- verifyEventNotification(annotation.getResource(), CHANGED, POST_CHANGE, CONTENT, times(1));
+ verifyEventNotification(annotation.getResource(), CHANGED, POST_CHANGE, CONTENT, atLeastOnce());
}
@Test
@@ -794,7 +794,7 @@
IMethod addedMethod = WorkbenchUtils.createMethod(type, "public Object fooLocator() { return null; }",
PRIMARY_COPY);
// verifications
- verifyEventNotification(addedMethod.getResource(), CHANGED, POST_CHANGE, CONTENT, times(1));
+ verifyEventNotification(addedMethod.getResource(), CHANGED, POST_CHANGE, CONTENT, atLeastOnce());
}
@Test
@@ -816,7 +816,7 @@
// operation
IMethod method = WorkbenchUtils.removeMethod(type.getCompilationUnit(), "createCustomer", PRIMARY_COPY);
// verifications
- verifyEventNotification(method.getResource(), CHANGED, POST_CHANGE, CONTENT, times(1));
+ verifyEventNotification(method.getResource(), CHANGED, POST_CHANGE, CONTENT, atLeastOnce());
}
@Test
@@ -843,8 +843,8 @@
PRIMARY_COPY);
// verifications
IMethod newMethod = WorkbenchUtils.getMethod(type, "getEM");
- verifyEventNotification(oldMethod.getResource(), CHANGED, POST_CHANGE, CONTENT, times(1));
- verifyEventNotification(newMethod.getResource(), CHANGED, POST_CHANGE, CONTENT, times(1));
+ verifyEventNotification(oldMethod.getResource(), CHANGED, POST_CHANGE, CONTENT, atLeastOnce());
+ verifyEventNotification(newMethod.getResource(), CHANGED, POST_CHANGE, CONTENT, atLeastOnce());
}
@Test
@@ -869,7 +869,7 @@
// operation
WorkbenchUtils.addMethodParameter(oldMethod, "int i", PRIMARY_COPY);
// verifications
- verifyEventNotification(type.getResource(), CHANGED, POST_CHANGE, CONTENT, times(1));
+ verifyEventNotification(type.getResource(), CHANGED, POST_CHANGE, CONTENT, atLeastOnce());
}
@Test
@@ -897,7 +897,7 @@
// verifications
// 1 invocation for both the old method removal and the new method
// addition
- verifyEventNotification(oldMethod.getResource(), CHANGED, POST_CHANGE, CONTENT, times(1));
+ verifyEventNotification(oldMethod.getResource(), CHANGED, POST_CHANGE, CONTENT, atLeastOnce());
}
@Test
@@ -954,7 +954,7 @@
"@PathParam(\"id\") Integer id, @Context UriInfo uriInfo",
"@Context UriInfo uriInfo, @PathParam(\"id\") Integer id", PRIMARY_COPY);
// verifications
- verifyEventNotification(oldMethod.getResource(), CHANGED, POST_CHANGE, CONTENT, times(1));
+ verifyEventNotification(oldMethod.getResource(), CHANGED, POST_CHANGE, CONTENT, atLeastOnce());
}
@Test
@@ -987,7 +987,7 @@
PRIMARY_COPY);
LOGGER.info("Method signature: " + newMethod.getSignature());
// verifications
- verifyEventNotification(oldMethod.getResource(), CHANGED, POST_CHANGE, CONTENT, times(1));
+ verifyEventNotification(oldMethod.getResource(), CHANGED, POST_CHANGE, CONTENT, atLeastOnce());
}
@Test
@@ -1015,7 +1015,7 @@
method = WorkbenchUtils.replaceFirstOccurrenceOfCode(method, "Customer customer",
"@PathParam(\"id\") Customer customer", PRIMARY_COPY);
// verifications
- verifyEventNotification(method.getResource(), CHANGED, POST_CHANGE, CONTENT, times(1));
+ verifyEventNotification(method.getResource(), CHANGED, POST_CHANGE, CONTENT, atLeastOnce());
}
@Test
@@ -1043,7 +1043,7 @@
method = WorkbenchUtils.replaceFirstOccurrenceOfCode(method, "@PathParam(\"id\")", "@PathParam(\"bar\")",
PRIMARY_COPY);
// verifications
- verifyEventNotification(method.getResource(), CHANGED, POST_CHANGE, CONTENT, times(1));
+ verifyEventNotification(method.getResource(), CHANGED, POST_CHANGE, CONTENT, atLeastOnce());
}
@Test
@@ -1071,7 +1071,7 @@
method = WorkbenchUtils.replaceFirstOccurrenceOfCode(method, "@PathParam(\"id\") Integer id", "Integer id",
PRIMARY_COPY);
// verifications
- verifyEventNotification(method.getResource(), CHANGED, POST_CHANGE, CONTENT, times(1));
+ verifyEventNotification(method.getResource(), CHANGED, POST_CHANGE, CONTENT, atLeastOnce());
}
@Test
@@ -1095,7 +1095,7 @@
// operation
WorkbenchUtils.addMethodAnnotation(method, "@Path(\"/foo\")", PRIMARY_COPY);
// verifications
- verifyEventNotification(method.getResource(), CHANGED, POST_CHANGE, CONTENT, times(1));
+ verifyEventNotification(method.getResource(), CHANGED, POST_CHANGE, CONTENT, atLeastOnce());
}
@Test
@@ -1123,7 +1123,7 @@
method = WorkbenchUtils.replaceFirstOccurrenceOfCode(method, "@Path(\"{id}\")", "@Path(\"{foo}\")",
PRIMARY_COPY);
// verifications
- verifyEventNotification(annotation.getResource(), CHANGED, POST_CHANGE, CONTENT, times(1));
+ verifyEventNotification(annotation.getResource(), CHANGED, POST_CHANGE, CONTENT, atLeastOnce());
}
@Test
@@ -1149,7 +1149,7 @@
// operation
WorkbenchUtils.removeMethodAnnotation(method, annotation, PRIMARY_COPY);
// verifications
- verifyEventNotification(method.getResource(), CHANGED, POST_CHANGE, CONTENT, times(1));
+ verifyEventNotification(method.getResource(), CHANGED, POST_CHANGE, CONTENT, atLeastOnce());
}
@Test
12 years, 7 months
JBoss Tools SVN: r41222 - trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core.
by jbosstools-commits@lists.jboss.org
Author: xcoulon
Date: 2012-05-21 16:06:53 -0400 (Mon, 21 May 2012)
New Revision: 41222
Modified:
trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/AbstractCommonTestCase.java
Log:
Fixed - JBIDE-11704
test timeout after 1800 seconds in org.jboss.tools.ws.jaxrs.core.test
Removing explicit need to start the JavaCore plugin, in order to avoid re-indexing (which could be the cause of thread locks)
Modified: trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/AbstractCommonTestCase.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/AbstractCommonTestCase.java 2012-05-21 19:47:16 UTC (rev 41221)
+++ trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/AbstractCommonTestCase.java 2012-05-21 20:06:53 UTC (rev 41222)
@@ -85,7 +85,7 @@
@BeforeClass
public static void setupWorkspace() throws Exception {
- org.eclipse.jdt.core.JavaCore.getPlugin().start(bundle.getBundleContext());
+ //org.eclipse.jdt.core.JavaCore.getPlugin().start(bundle.getBundleContext());
long startTime = new Date().getTime();
try {
IWorkspace workspace = ResourcesPlugin.getWorkspace();
12 years, 7 months
JBoss Tools SVN: r41221 - 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-21 15:47:16 -0400 (Mon, 21 May 2012)
New Revision: 41221
Modified:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/ESBExampleTest.java
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/WebServiceProducer.java
Log:
Added console switch check to examples/ESBExampleTest.java, correct text comparison to examples/WebServiceProducer.java
Modified: trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/ESBExampleTest.java
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/ESBExampleTest.java 2012-05-21 18:41:12 UTC (rev 41220)
+++ trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/ESBExampleTest.java 2012-05-21 19:47:16 UTC (rev 41221)
@@ -150,14 +150,43 @@
protected String executeClientGetServerOutput(String className, String arguments) {
String text = console.getConsoleText();
eclipse.runJavaApplication(getExampleClientProjectName(), className, arguments);
- bot.sleep(Timing.time5S());
- console.switchConsole(configuredState.getServer().name);
- String text2 = console.getConsoleText(TIME_5S, TIME_20S, false);
- if (text.length()>=text2.length()) {
+// console.switchConsole(configuredState.getServer().name);
+// String text2 = console.getConsoleText(TIME_5S, TIME_30S, false);
+// if (text.length()>=text2.length()) {
+// return null;
+// }
+// return text2.substring(text.length());
+
+ // New - the consoles fail to switch....sometimes
+ boolean consoleSwitched = false;
+ int switchLimit = 30;
+ int switchCounter = 0;
+ consoleSwitched = console.switchConsole(configuredState.getServer().name);
+ while (!consoleSwitched) {
+ consoleSwitched = console.switchConsole(configuredState.getServer().name);
+ bot.sleep(Timing.time10S());
+ log.error("Console did not switch - retrying.");
+ if (switchCounter++ > switchLimit) {
+ break;
+ }
+ }
+ //console.switchConsole(configuredState.getServer().name);
+
+ //String text2 = console.getConsoleText(TIME_5S, TIME_20S, false);
+ String text2 = console.getConsoleText(TIME_5S, TIME_30S, false); /* https://issues.jboss.org/browse/JBQA-5838 - ldimaggi */
+ log.info("text2 = " + text2);
+ //console.clearConsole();
+
+ if (text2.length() == 0) {
return null;
}
- return text2.substring(text.length());
+ else {
+ return text2;
+ }
}
+
+
+
protected void fixJREToWorkspaceDefault(String project) {
SWTBotTree tree = projectExplorer.show().bot().tree();
SWTBotTreeItem proj = tree.select(project).getTreeItem(project);
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-21 18:41:12 UTC (rev 41220)
+++ trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/WebServiceProducer.java 2012-05-21 19:47:16 UTC (rev 41221)
@@ -20,16 +20,16 @@
super.executeExample();
String text = executeClientGetServerOutput("org.jboss.soa.esb.samples.quickstart.webserviceproducer.test.SendMessage","jms");
- assertNotNull("Calling Send message failed, nothing appened to server log",text);
- assertTrue("Calling Send message failed, unexpected server output :"+text,text.contains("Goodbye!!"));
+ 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 appened to server log",text);
- assertTrue("Calling Send message failed, unexpected server output :"+text,text.contains("Goodbye!!"));
+ 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 appened to server log",text);
- assertTrue("Calling Send message failed, unexpected server output :"+text,text.contains("Goodbye!!"));
+ 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, 7 months
JBoss Tools SVN: r41220 - in trunk/documentation/whatsnew: forge and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2012-05-21 14:41:12 -0400 (Mon, 21 May 2012)
New Revision: 41220
Added:
trunk/documentation/whatsnew/images/sourcelookuppreferences.png
Modified:
trunk/documentation/whatsnew/forge/forge-news-3.3.0.Beta3.html
trunk/documentation/whatsnew/index.html
trunk/documentation/whatsnew/vpe/vpe-news-3.3.0.Beta3.html
Log:
JBIDE-11169 mention jboss.org and devstudio and possible outofdate content
Modified: trunk/documentation/whatsnew/forge/forge-news-3.3.0.Beta3.html
===================================================================
--- trunk/documentation/whatsnew/forge/forge-news-3.3.0.Beta3.html 2012-05-21 17:23:16 UTC (rev 41219)
+++ trunk/documentation/whatsnew/forge/forge-news-3.3.0.Beta3.html 2012-05-21 18:41:12 UTC (rev 41220)
@@ -24,7 +24,7 @@
<h1>Forge Tools 3.3.0.Beta3 What's New</h1>
<p align="right"><a href="../index.html">< Main Index</a> <a
- href="../maven/maven-news-3.3.0.Beta3.html">Maven Tools ></a></p>
+ href="../central/central-news-1.0.0.Beta3.html">Central ></a></p>
<table border="0" cellpadding="10" cellspacing="0" width="80%">
Added: trunk/documentation/whatsnew/images/sourcelookuppreferences.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/images/sourcelookuppreferences.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/documentation/whatsnew/index.html
===================================================================
--- trunk/documentation/whatsnew/index.html 2012-05-21 17:23:16 UTC (rev 41219)
+++ trunk/documentation/whatsnew/index.html 2012-05-21 18:41:12 UTC (rev 41220)
@@ -23,6 +23,21 @@
<html>
+
+<p>If you are new to JBoss tools and JBoss frameworks <a
+href="http://jboss.org/developer">jboss.org/developer</a> is a
+recommended starting point.</p>
+
+<p>This page is a "log" of the new and noteworthy changes/features in
+JBoss Tools and JBoss Developer Studio. Latest JBoss Tools can be downloaded from <a
+href="http://jboss.org/tools"/>jboss.org/tools</a> and JBoss Developer
+Studio from <a
+href="http://devstudio.jboss.com/earlyaccess"/>devstudio.jboss.com/earlyaccess</a>.</p>
+
+<p>Be aware that the list of actual included features in the GA can differ from what is
+in the older new and noteworthy if the feature has changed or been
+removed or postponed.</p>
+
<table border="0" cellpadding="10" cellspacing="0" width="80%">
<tr>
@@ -39,16 +54,17 @@
<td valign="top">
<p><a href="openshift/openshift-news-2.3.0.Beta3.html">OpenShift
Tools</a></p>
- <p><a href="vpe/vpe-news-3.3.0.Beta3.html">Visual Page Editor/BrowserSim</a></p>
- <p><a href="central/central-news-1.0.0.Beta3.html">JBoss Central</a></p>
<p><a href="maven/maven-news-3.3.0.Beta3.html">Maven</a></p>
+ <p><a href="vpe/vpe-news-3.3.0.Beta3.html">Visual Page Editor/BrowserSim</a></p>
<p><a href="forge/forge-news-3.3.0.Beta3.html">Forge Tools</a></p>
-
+ <p><a href="central/central-news-1.0.0.Beta3.html">JBoss Central</a></p>
+
<!--
<p><a href="modeshape/modeshape-news-3.3.0.Beta3.html">ModeShape
Tools</a></p>
- <p><a href="bpel/bpel-news-1.1.0.Beta3.html">BPEL Tools</a></p>
+ <p><a href="bpel/bpel-news-1.1.0.Beta3.html">BPEL
+ Tools</a></p>
-->
</td>
Modified: trunk/documentation/whatsnew/vpe/vpe-news-3.3.0.Beta3.html
===================================================================
--- trunk/documentation/whatsnew/vpe/vpe-news-3.3.0.Beta3.html 2012-05-21 17:23:16 UTC (rev 41219)
+++ trunk/documentation/whatsnew/vpe/vpe-news-3.3.0.Beta3.html 2012-05-21 18:41:12 UTC (rev 41220)
@@ -25,7 +25,7 @@
<p align="right">
<a href="../index.html">< Main Index</a>
-<a href="../central/central-news-1.0.0.Beta3.html">JBoss Central ></a>
+<a href="../forge/forge-news-3.3.0.Beta3.html">Forge Tools ></a>
</p>
<table border="0" cellpadding="10" cellspacing="0">
12 years, 7 months
JBoss Tools SVN: r41219 - in trunk/maven/plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf: configurators and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2012-05-21 13:23:16 -0400 (Mon, 21 May 2012)
New Revision: 41219
Modified:
trunk/maven/plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/MavenJSFActivator.java
trunk/maven/plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/configurators/JSFProjectConfigurator.java
Log:
JBIDE-11914 Change log message when JSF 2.1 facet is unavailable from ERROR to WARN
Modified: trunk/maven/plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/MavenJSFActivator.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/MavenJSFActivator.java 2012-05-21 17:22:15 UTC (rev 41218)
+++ trunk/maven/plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/MavenJSFActivator.java 2012-05-21 17:23:16 UTC (rev 41219)
@@ -80,6 +80,11 @@
getDefault().getLog().log(status);
}
+ public static void warn(String message) {
+ IStatus status = new Status(IStatus.WARNING, PLUGIN_ID, message);
+ getDefault().getLog().log(status);
+ }
+
public IDataModel createJSFDataModel(IFacetedProject fproj, IProjectFacetVersion facetVersion) {
IDataModel config = (IDataModel) new JSFFacetInstallDataModelProvider().create();
LibraryInstallDelegate libraryDelegate = new LibraryInstallDelegate(fproj, facetVersion);
Modified: trunk/maven/plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/configurators/JSFProjectConfigurator.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/configurators/JSFProjectConfigurator.java 2012-05-21 17:22:15 UTC (rev 41218)
+++ trunk/maven/plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/configurators/JSFProjectConfigurator.java 2012-05-21 17:23:16 UTC (rev 41219)
@@ -12,7 +12,8 @@
import static org.jboss.tools.maven.jsf.configurators.JSFUtils.JSF_VERSION_1_1;
import static org.jboss.tools.maven.jsf.configurators.JSFUtils.JSF_VERSION_1_2;
-import static org.jboss.tools.maven.jsf.configurators.JSFUtils.*;
+import static org.jboss.tools.maven.jsf.configurators.JSFUtils.JSF_VERSION_2_0;
+import static org.jboss.tools.maven.jsf.configurators.JSFUtils.JSF_VERSION_2_1;
import java.util.List;
@@ -85,7 +86,7 @@
try {
jsf21Version = JSF_FACET.getVersion(JSF_VERSION_2_1);
} catch (Exception e) {
- Activator.log("JSF 2.1 Facet is unavailable, fall back to 2.0");
+ MavenJSFActivator.warn("JSF 2.1 Facet is unavailable, fall back to 2.0");
jsf21Version = JSF_FACET_VERSION_2_0;
}
JSF_FACET_VERSION_2_1 = jsf21Version;
12 years, 7 months
JBoss Tools SVN: r41218 - trunk/maven/plugins/org.jboss.tools.maven.sourcelookup.ui/src/org/jboss/tools/maven/sourcelookup/ui/browsers.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2012-05-21 13:22:15 -0400 (Mon, 21 May 2012)
New Revision: 41218
Modified:
trunk/maven/plugins/org.jboss.tools.maven.sourcelookup.ui/src/org/jboss/tools/maven/sourcelookup/ui/browsers/JBossSourceContainerDialog.java
Log:
JBIDE-11911 - source lookup: since the JBoss Source lookup can be used for other things than AS it should not be called JBoss AS Source Container
Modified: trunk/maven/plugins/org.jboss.tools.maven.sourcelookup.ui/src/org/jboss/tools/maven/sourcelookup/ui/browsers/JBossSourceContainerDialog.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.sourcelookup.ui/src/org/jboss/tools/maven/sourcelookup/ui/browsers/JBossSourceContainerDialog.java 2012-05-21 17:10:30 UTC (rev 41217)
+++ trunk/maven/plugins/org.jboss.tools.maven.sourcelookup.ui/src/org/jboss/tools/maven/sourcelookup/ui/browsers/JBossSourceContainerDialog.java 2012-05-21 17:22:15 UTC (rev 41218)
@@ -160,7 +160,7 @@
@Override
public void widgetSelected(SelectionEvent e) {
DirectoryDialog dialog = new DirectoryDialog(getShell());
- dialog.setMessage("Choose JBoss AS Home:");
+ dialog.setMessage("Choose Home:");
String path = dialog.open();
if (path != null) {
setHomePath(path);
12 years, 7 months
JBoss Tools SVN: r41217 - trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model and 6 other directories.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2012-05-21 13:10:30 -0400 (Mon, 21 May 2012)
New Revision: 41217
Added:
workspace/snjeza/quickstarts/quickstart.zip
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/Messages.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/ProjectExamplesActivator.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/messages.properties
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectExampleUtil.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/ProjectExamplesPreferencePage.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/ProjectExamplesPreferencesInitializer.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/Sites.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesMainPage.java
trunk/examples/tests/org.jboss.tools.project.examples.test/src/org/jboss/tools/project/examples/test/SiteTest.java
trunk/maven/plugins/org.jboss.tools.maven.project.examples/META-INF/MANIFEST.MF
trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/ImportMavenProjectExampleDelegate.java
Log:
JBIDE-11727 - explore providing an .project_example.xml file in root of quickstarts distributions for easy loading/detection in jboss tools
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/Messages.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/Messages.java 2012-05-21 17:08:42 UTC (rev 41216)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/Messages.java 2012-05-21 17:10:30 UTC (rev 41217)
@@ -69,6 +69,7 @@
public static String ProjectExamplesPreferencePage_Output_directory;
public static String ProjectExamplesPreferencePage_Remove;
public static String ProjectExamplesPreferencePage_Show_experimental_sites;
+ public static String ProjectExamplesPreferencePage_Show_server_sites;
public static String ProjectExamplesPreferencePage_Show_invalid_sites;
public static String ProjectExamplesPreferencePage_Sites;
public static String ProjectExamplesPreferencePage_Use_default_workspace_location;
@@ -95,6 +96,7 @@
public static String SiteDialog_URL;
public static String Sites_Plugin_provided_sites;
public static String Sites_User_sites;
+ public static String Sites_Server_sites;
public static String InvalideSite;
public static String WTPRuntimeFix_Invalid_WTP_runtime_fix;
static {
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/ProjectExamplesActivator.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/ProjectExamplesActivator.java 2012-05-21 17:08:42 UTC (rev 41216)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/ProjectExamplesActivator.java 2012-05-21 17:10:30 UTC (rev 41217)
@@ -162,8 +162,10 @@
public static final String ALL_RUNTIMES = Messages.ProjectExamplesActivator_All;
public static final String SHOW_EXPERIMENTAL_SITES = "showExperimentalSites"; //$NON-NLS-1$
+ public static final String SHOW_SERVER_SITES = "showServerSites"; //$NON-NLS-1$
public static final String USER_SITES = "userSites"; //$NON-NLS-1$
public static final boolean SHOW_EXPERIMENTAL_SITES_VALUE = false;
+ public static final boolean SHOW_SERVER_SITES_VALUE = false;
public static final String SHOW_INVALID_SITES = "invalidSites"; //$NON-NLS-1$
public static final boolean SHOW_INVALID_SITES_VALUE = true;
public static final String MAVEN_ARCHETYPE = "mavenArchetype"; //$NON-NLS-1$
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/messages.properties
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/messages.properties 2012-05-21 17:08:42 UTC (rev 41216)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/messages.properties 2012-05-21 17:10:30 UTC (rev 41217)
@@ -32,7 +32,7 @@
NewProjectExamplesWizard_New_Project_Example=New Project Example
NewProjectExamplesWizard_OverwriteProject=Overwrite project ''{0}''
NewProjectExamplesWizard_Question=Question
-NewProjectExamplesWizardPage_Cannot_access_the_following_sites=Cannot access the following sites\:\n\n
+NewProjectExamplesWizardPage_Cannot_access_the_following_sites=Cannot read the following sites\:\n\n
NewProjectExamplesWizardPage_Description=Description:
NewProjectExamplesWizardPage_Details=Details...
NewProjectExamplesWizardPage_Import_Project_Example=Import Project Example
@@ -56,6 +56,7 @@
ProjectExamplesPreferencePage_Output_directory=Output directory
ProjectExamplesPreferencePage_Remove=Remove
ProjectExamplesPreferencePage_Show_experimental_sites=Show experimental sites
+ProjectExamplesPreferencePage_Show_server_sites=Show server sites
ProjectExamplesPreferencePage_Show_invalid_sites=Show invalid sites
ProjectExamplesPreferencePage_Sites=Sites
ProjectExamplesPreferencePage_Use_default_workspace_location=Use default location
@@ -83,5 +84,6 @@
SiteDialog_URL=URL:
Sites_Plugin_provided_sites=Plugin provided sites
Sites_User_sites=User sites
+Sites_Server_sites=Server sites
WTPRuntimeFix_Invalid_WTP_runtime_fix=Invalid WTP runtime fix in {0}.
InvalideSite=Invalid site: {0},url={1}
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectExampleUtil.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectExampleUtil.java 2012-05-21 17:08:42 UTC (rev 41216)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectExampleUtil.java 2012-05-21 17:10:30 UTC (rev 41217)
@@ -14,6 +14,7 @@
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
+import java.io.FileFilter;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
@@ -47,9 +48,14 @@
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.osgi.util.NLS;
+import org.eclipse.wst.server.core.IRuntime;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.ServerCore;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
import org.jboss.tools.project.examples.Messages;
import org.jboss.tools.project.examples.ProjectExamplesActivator;
import org.jboss.tools.project.examples.filetransfer.ECFExamplesTransport;
@@ -66,6 +72,8 @@
*/
public class ProjectExampleUtil {
+ private static final String SERVER_PROJECT_EXAMPLE_XML = ".project_example.xml";
+
private static final String URL = "url"; //$NON-NLS-1$
private static final String NAME = "name"; //$NON-NLS-1$
@@ -137,6 +145,66 @@
return pluginSites;
}
+ public static Set<IProjectExampleSite> getServerSites() {
+ Set<IProjectExampleSite> sites = new HashSet<IProjectExampleSite>();
+ IPreferenceStore store = ProjectExamplesActivator.getDefault()
+ .getPreferenceStore();
+ if (!store.getBoolean(ProjectExamplesActivator.SHOW_SERVER_SITES)) {
+ return sites;
+ }
+ IServer[] servers = ServerCore.getServers();
+ for (IServer server:servers) {
+ IRuntime runtime = server.getRuntime();
+ if (runtime == null) {
+ continue;
+ }
+ IJBossServerRuntime jbossRuntime = (IJBossServerRuntime)runtime.loadAdapter(IJBossServerRuntime.class, new NullProgressMonitor());
+ if (jbossRuntime == null) {
+ continue;
+ }
+ IPath jbossLocation = runtime.getLocation();
+ if (jbossRuntime.getRuntime() == null) {
+ continue;
+ }
+ String name = jbossRuntime.getRuntime().getName() + " Project Examples";
+ File serverHome = jbossLocation.toFile();
+ File file = getFile(serverHome, true);
+ if (file != null) {
+ ProjectExampleSite site = new ProjectExampleSite();
+ site.setExperimental(false);
+ site.setName(name);
+ try {
+ site.setUrl(file.toURI().toURL());
+ sites.add(site);
+ } catch (MalformedURLException e) {
+ ProjectExamplesActivator.log(e.getMessage());
+ }
+ }
+ }
+ return sites;
+ }
+ private static File getFile(File serverHome, boolean b) {
+ if (!serverHome.isDirectory()) {
+ return null;
+ }
+ File[] directories = serverHome.listFiles(new FileFilter() {
+
+ @Override
+ public boolean accept(File pathname) {
+ return pathname.isDirectory();
+ }
+ });
+ if (directories != null && directories.length > 0) {
+ for (File directory:directories) {
+ File projectExampleFile = new File(directory, SERVER_PROJECT_EXAMPLE_XML);
+ if (projectExampleFile.isFile()) {
+ return projectExampleFile;
+ }
+ }
+ }
+ return null;
+ }
+
public static Set<IProjectExampleSite> getUserSites() {
Set<IProjectExampleSite> sites = new HashSet<IProjectExampleSite>();
ProjectExampleSite site = getSite(getProjectExamplesXml());
@@ -193,6 +261,7 @@
Set<IProjectExampleSite> sites = new HashSet<IProjectExampleSite>();
sites.addAll(getPluginSites());
sites.addAll(getUserSites());
+ sites.addAll(getServerSites());
return sites;
}
@@ -265,10 +334,17 @@
continue;
}
- DocumentBuilderFactory dbf = DocumentBuilderFactory
- .newInstance();
- DocumentBuilder db = dbf.newDocumentBuilder();
- Document doc = db.parse(file);
+ Document doc;
+ try {
+ DocumentBuilderFactory dbf = DocumentBuilderFactory
+ .newInstance();
+ DocumentBuilder db = dbf.newDocumentBuilder();
+ doc = db.parse(file);
+ } catch (Exception e) {
+ ProjectExamplesActivator.log(e);
+ invalidSites.add(site);
+ continue;
+ }
NodeList projects = doc.getElementsByTagName("project"); //$NON-NLS-1$
int len = projects.getLength();
for (int i = 0; i < len; i++) {
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/ProjectExamplesPreferencePage.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/ProjectExamplesPreferencePage.java 2012-05-21 17:08:42 UTC (rev 41216)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/ProjectExamplesPreferencePage.java 2012-05-21 17:10:30 UTC (rev 41217)
@@ -56,6 +56,7 @@
public static final String ID = "org.jboss.tools.project.examples.preferences.projectExamplesPreferencePage"; //$NON-NLS-1$
private Button showExperimentalSites;
+ private Button showServerSites;
private Sites sites;
private TreeViewer viewer;
private ProjectExampleSite selectedSite;
@@ -145,6 +146,10 @@
showExperimentalSites.setText(Messages.ProjectExamplesPreferencePage_Show_experimental_sites);
showExperimentalSites.setSelection(store.getBoolean(ProjectExamplesActivator.SHOW_EXPERIMENTAL_SITES));
+ showServerSites = new Button(composite,SWT.CHECK);
+ showServerSites.setText(Messages.ProjectExamplesPreferencePage_Show_server_sites);
+ showServerSites.setSelection(store.getBoolean(ProjectExamplesActivator.SHOW_SERVER_SITES));
+
showInvalidSites = new Button(composite,SWT.CHECK);
showInvalidSites.setText(Messages.ProjectExamplesPreferencePage_Show_invalid_sites);
showInvalidSites.setSelection(store.getBoolean(ProjectExamplesActivator.SHOW_INVALID_SITES));
@@ -281,10 +286,12 @@
showQuickFix.setSelection(ProjectExamplesActivator.SHOW_QUICK_FIX_VALUE);
showExperimentalSites.setSelection(ProjectExamplesActivator.SHOW_EXPERIMENTAL_SITES_VALUE);
+ showServerSites.setSelection(ProjectExamplesActivator.SHOW_SERVER_SITES_VALUE);
showInvalidSites.setSelection(ProjectExamplesActivator.SHOW_INVALID_SITES_VALUE);
isWorkspace.setSelection(ProjectExamplesActivator.PROJECT_EXAMPLES_DEFAULT_VALUE);
outputDirectoryText.setText(""); //$NON-NLS-1$
sites.getUserSites().clear();
+ sites.getServerSites().clear();
storePreferences();
super.performDefaults();
}
@@ -302,6 +309,8 @@
store.setValue(ProjectExamplesActivator.SHOW_QUICK_FIX, showQuickFix.getSelection());
store.setValue(ProjectExamplesActivator.SHOW_EXPERIMENTAL_SITES, showExperimentalSites.getSelection());
+ store.setValue(ProjectExamplesActivator.SHOW_SERVER_SITES, showServerSites.getSelection());
+
store.setValue(ProjectExamplesActivator.SHOW_INVALID_SITES, showInvalidSites.getSelection());
store.setValue(ProjectExamplesActivator.PROJECT_EXAMPLES_DEFAULT, isWorkspace.getSelection());
String value = outputDirectoryText.getText();
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/ProjectExamplesPreferencesInitializer.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/ProjectExamplesPreferencesInitializer.java 2012-05-21 17:08:42 UTC (rev 41216)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/ProjectExamplesPreferencesInitializer.java 2012-05-21 17:10:30 UTC (rev 41217)
@@ -47,6 +47,10 @@
node.putBoolean(
ProjectExamplesActivator.SHOW_QUICK_FIX,
ProjectExamplesActivator.SHOW_QUICK_FIX_VALUE);
+
+ node.putBoolean(
+ ProjectExamplesActivator.SHOW_SERVER_SITES,
+ ProjectExamplesActivator.SHOW_SERVER_SITES_VALUE);
}
}
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/Sites.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/Sites.java 2012-05-21 17:08:42 UTC (rev 41216)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/preferences/Sites.java 2012-05-21 17:10:30 UTC (rev 41217)
@@ -27,22 +27,32 @@
public class Sites {
private SiteCategory[] siteCategories;
private SiteCategory userSite;
+ private SiteCategory serverSite;
private Set<IProjectExampleSite> sites;
public SiteCategory[] getSiteCategories() {
if (siteCategories == null) {
- siteCategories = new SiteCategory[2];
+ siteCategories = new SiteCategory[3];
+
userSite = new SiteCategory(Messages.Sites_User_sites);
Set<IProjectExampleSite> userSites = ProjectExampleUtil.getUserSites();
userSite.setSites(userSites);
+
siteCategories[0]=userSite;
SiteCategory pluginSite = new SiteCategory(Messages.Sites_Plugin_provided_sites);
Set<IProjectExampleSite> pluginSites = ProjectExampleUtil.getPluginSites();
pluginSite.setSites(pluginSites);
siteCategories[1]=pluginSite;
+
+ serverSite = new SiteCategory(Messages.Sites_Server_sites);
+ Set<IProjectExampleSite> serverSites = ProjectExampleUtil.getServerSites();
+ serverSite.setSites(serverSites);
+ siteCategories[2]= serverSite;
+
sites = new HashSet<IProjectExampleSite>();
sites.addAll(pluginSites);
sites.addAll(userSites);
+ sites.addAll(serverSites);
}
return siteCategories;
}
@@ -64,4 +74,8 @@
public Set<IProjectExampleSite> getUserSites() {
return userSite.getSites();
}
+
+ public Set<IProjectExampleSite> getServerSites() {
+ return serverSite.getSites();
+ }
}
\ No newline at end of file
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesMainPage.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesMainPage.java 2012-05-21 17:08:42 UTC (rev 41216)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesMainPage.java 2012-05-21 17:10:30 UTC (rev 41217)
@@ -109,6 +109,13 @@
final IPreferenceStore store = ProjectExamplesActivator.getDefault().getPreferenceStore();
button.setSelection(store.getBoolean(ProjectExamplesActivator.SHOW_EXPERIMENTAL_SITES));
+ final Button serverButton = new Button(siteComposite,SWT.CHECK);
+ gd = new GridData(SWT.FILL, SWT.BEGINNING, false, false);
+ gd.horizontalSpan = 2;
+ serverButton.setLayoutData(gd);
+ serverButton.setText(Messages.ProjectExamplesPreferencePage_Show_server_sites);
+ serverButton.setSelection(store.getBoolean(ProjectExamplesActivator.SHOW_SERVER_SITES));
+
new Label(siteComposite,SWT.NONE).setText(Messages.NewProjectExamplesWizardPage_Site);
siteCombo = new Combo(siteComposite,SWT.READ_ONLY);
siteCombo.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
@@ -254,7 +261,30 @@
});
-
+ serverButton.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ IPreferenceStore store = ProjectExamplesActivator.getDefault().getPreferenceStore();
+ store.setValue(ProjectExamplesActivator.SHOW_SERVER_SITES, serverButton.getSelection());
+
+ //Store current combo selections
+ String selectedRuntime = targetRuntimeTypesCombo.getText();
+ String selectedSite = siteCombo.getText();
+
+ //Rebuild the combo lists
+ refresh(viewer, true);
+
+ //Restore the combo selections with initial values if possible
+ restoreCombo(targetRuntimeTypesCombo, selectedRuntime);
+ restoreCombo(siteCombo, selectedSite);
+
+ siteFilter.setSite(siteCombo.getText());
+ viewer.refresh();
+ }
+
+ });
+
targetRuntimeTypesCombo.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
Modified: trunk/examples/tests/org.jboss.tools.project.examples.test/src/org/jboss/tools/project/examples/test/SiteTest.java
===================================================================
--- trunk/examples/tests/org.jboss.tools.project.examples.test/src/org/jboss/tools/project/examples/test/SiteTest.java 2012-05-21 17:08:42 UTC (rev 41216)
+++ trunk/examples/tests/org.jboss.tools.project.examples.test/src/org/jboss/tools/project/examples/test/SiteTest.java 2012-05-21 17:10:30 UTC (rev 41217)
@@ -17,7 +17,6 @@
import org.eclipse.core.runtime.NullProgressMonitor;
import org.jboss.tools.project.examples.model.IProjectExampleSite;
-import org.jboss.tools.project.examples.model.ProjectExampleSite;
import org.jboss.tools.project.examples.model.ProjectExampleUtil;
import org.junit.Test;
@@ -33,6 +32,7 @@
Set<IProjectExampleSite> sites = new HashSet<IProjectExampleSite>();
sites.addAll(ProjectExampleUtil.getPluginSites());
sites.addAll(ProjectExampleUtil.getUserSites());
+ sites.addAll(ProjectExampleUtil.getServerSites());
assertTrue(sites.size() > 0);
}
Modified: trunk/maven/plugins/org.jboss.tools.maven.project.examples/META-INF/MANIFEST.MF
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.project.examples/META-INF/MANIFEST.MF 2012-05-21 17:08:42 UTC (rev 41216)
+++ trunk/maven/plugins/org.jboss.tools.maven.project.examples/META-INF/MANIFEST.MF 2012-05-21 17:10:30 UTC (rev 41217)
@@ -16,7 +16,8 @@
org.eclipse.ui.forms,
org.jboss.ide.eclipse.as.core;bundle-version="2.3.0",
org.eclipse.wst.server.core,
- org.jboss.tools.maven.ui;bundle-version="1.3.0"
+ org.jboss.tools.maven.ui;bundle-version="1.3.0",
+ org.eclipse.core.filesystem;bundle-version="1.3.100"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Vendor: %Bundle-Vendor
Modified: trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/ImportMavenProjectExampleDelegate.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/ImportMavenProjectExampleDelegate.java 2012-05-21 17:08:42 UTC (rev 41216)
+++ trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/ImportMavenProjectExampleDelegate.java 2012-05-21 17:10:30 UTC (rev 41217)
@@ -17,12 +17,17 @@
import java.util.Map;
import org.apache.maven.model.Model;
+import org.eclipse.core.filesystem.EFS;
+import org.eclipse.core.filesystem.IFileStore;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.m2e.core.MavenPlugin;
@@ -34,6 +39,7 @@
import org.eclipse.m2e.core.ui.internal.actions.OpenMavenConsoleAction;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.PlatformUI;
import org.jboss.tools.maven.ui.Activator;
import org.jboss.tools.project.examples.ProjectExamplesActivator;
import org.jboss.tools.project.examples.model.ProjectExample;
@@ -98,7 +104,21 @@
return false;
}
}
- boolean ok = ProjectExamplesActivator.extractZipFile(file, destination, monitor);
+ boolean ok = false;
+ if (file.isFile()) {
+ ok = ProjectExamplesActivator.extractZipFile(file, destination, monitor);
+ }
+ if (file.isDirectory()) {
+ destination.mkdirs();
+ IFileStore descStore = EFS.getLocalFileSystem().fromLocalFile(destination);
+ IFileStore srcStore = EFS.getLocalFileSystem().fromLocalFile(file);
+ try {
+ srcStore.copy(descStore, EFS.OVERWRITE, monitor);
+ ok = true;
+ } catch (Exception e) {
+ MavenProjectExamplesActivator.log(e);
+ }
+ }
monitor.setTaskName("");
if (monitor.isCanceled()) {
return false;
@@ -110,7 +130,7 @@
public void run() {
MessageDialog.openError(getActiveShell(),
"Error",
- "Cannot extract the archive.");
+ "Cannot extract/copy the archive.");
}
});
return false;
@@ -156,7 +176,6 @@
private List<String> importMavenProjects(final File destination,
final ProjectExample projectDescription, IProgressMonitor monitor) {
List<String> projectNames = new ArrayList<String>();
- MavenPlugin plugin = MavenPlugin.getDefault();
try {
AbstractProjectScanner<MavenProjectInfo> projectScanner = getProjectScanner(destination);
projectScanner.run(monitor);
@@ -299,7 +318,7 @@
if (project != null && project.exists()) {
File projectFile = project.getLocation().toFile();
File projectParent = projectFile.getParentFile();
- if (projectParent.equals(destination)) {
+ if (projectParent.equals(destination) || projectFile.equals(destination)) {
existingProjects.add(project);
}
}
Added: workspace/snjeza/quickstarts/quickstart.zip
===================================================================
(Binary files differ)
Property changes on: workspace/snjeza/quickstarts/quickstart.zip
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
12 years, 7 months
JBoss Tools SVN: r41216 - workspace/snjeza.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2012-05-21 13:08:42 -0400 (Mon, 21 May 2012)
New Revision: 41216
Added:
workspace/snjeza/quickstarts/
Log:
JBIDE-11727 - explore providing an .project_example.xml file in root of quickstarts distributions for easy loading/detection in jboss tools
12 years, 7 months
JBoss Tools SVN: r41215 - trunk/common/features/org.jboss.tools.common.mylyn.feature.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2012-05-21 12:50:24 -0400 (Mon, 21 May 2012)
New Revision: 41215
Modified:
trunk/common/features/org.jboss.tools.common.mylyn.feature/feature.xml
Log:
https://issues.jboss.org/browse/JBIDE-11924 JBT is requiring atlassian plugin to be installed
Modified: trunk/common/features/org.jboss.tools.common.mylyn.feature/feature.xml
===================================================================
--- trunk/common/features/org.jboss.tools.common.mylyn.feature/feature.xml 2012-05-21 16:21:26 UTC (rev 41214)
+++ trunk/common/features/org.jboss.tools.common.mylyn.feature/feature.xml 2012-05-21 16:50:24 UTC (rev 41215)
@@ -5,84 +5,5 @@
<copyright>%copyright</copyright>
<license>%license</license>
- <!-- JBDS-2098 add defaults for issues.jboss.org and bugzilla.redhat.com -->
<plugin id="org.jboss.tools.common.mylyn" download-size="0" install-size="0" version="0.0.0" />
-
- <requires>
- <import feature="org.eclipse.mylyn_feature" version="0.0.0" match="greaterOrEqual" />
- <import feature="org.eclipse.mylyn.ide_feature" version="0.0.0" match="greaterOrEqual" />
- <import feature="org.eclipse.mylyn.commons" version="0.0.0" match="greaterOrEqual" />
- <import feature="org.eclipse.mylyn.context_feature" version="0.0.0" match="greaterOrEqual" />
- <import feature="org.eclipse.mylyn.bugzilla_feature" version="0.0.0" match="greaterOrEqual" />
- <import feature="org.eclipse.mylyn.java_feature" version="0.0.0" match="greaterOrEqual" />
- <import feature="org.eclipse.mylyn.pde_feature" version="0.0.0" match="greaterOrEqual" />
- <import feature="org.eclipse.mylyn.team_feature" version="0.0.0" match="greaterOrEqual" />
- <import feature="org.eclipse.mylyn.cvs" version="0.0.0" match="greaterOrEqual" />
- <import feature="org.eclipse.mylyn.versions" version="0.0.0" match="greaterOrEqual" />
- <import feature="org.eclipse.mylyn.wikitext_feature" version="0.0.0" match="greaterOrEqual" />
-
- <plugin id="com.atlassian.connector.eclipse.bamboo.core" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="com.atlassian.connector.eclipse.bamboo.ui" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="com.atlassian.connector.eclipse.crucible.core" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="com.atlassian.connector.eclipse.crucible.ui" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="com.atlassian.connector.eclipse.fisheye.core" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="com.atlassian.connector.eclipse.fisheye.ui" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="com.atlassian.connector.eclipse.subclipse.core" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="com.atlassian.connector.eclipse.subclipse.ui" version="0.0.0" match="greaterOrEqual" unpack="false" />
-
- <plugin id="org.eclipse.mylyn.tasks.ui" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="org.eclipse.mylyn.tasks.core" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="org.eclipse.mylyn.tasks.bugs" version="0.0.0" match="greaterOrEqual" unpack="false" />
-
- <plugin id="com.atlassian.connector.commons" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="com.atlassian.connector.eclipse.branding.ui" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="com.atlassian.connector.eclipse.commons.core" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="com.atlassian.connector.eclipse.commons.ui" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="com.atlassian.connector.eclipse.core" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="com.atlassian.connector.eclipse.cvs.core" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="com.atlassian.connector.eclipse.cvs.ui" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="com.atlassian.connector.eclipse.directclickthrough.ui" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="com.atlassian.connector.eclipse.help" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="com.atlassian.connector.eclipse.jira.core" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="com.atlassian.connector.eclipse.jira.ui" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="com.atlassian.connector.eclipse.monitor.core" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="com.atlassian.connector.eclipse.monitor.ui" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="com.atlassian.connector.eclipse.ui" version="0.0.0" match="greaterOrEqual" unpack="false" />
-
- <!-- JBDS-1682 dependent 3rd party plugins needed to install Atlassian JIRA support -->
- <plugin id="com.thoughtworks.xstream" version="0.0.0" match="greaterOrEqual" unpack="false" />
-
- <plugin id="org.eclipse.ui" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="org.eclipse.core.runtime" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="org.eclipse.core.resources" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="org.eclipse.ui.ide" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="org.eclipse.ui.workbench.texteditor" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="org.eclipse.jface.text" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="org.eclipse.osgi" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="org.eclipse.core.filesystem" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="org.eclipse.ui.forms" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="org.eclipse.ui.editors" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="org.eclipse.team.core" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="org.eclipse.team.ui" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="org.eclipse.jface" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="org.eclipse.compare" version="0.0.0" match="greaterOrEqual" unpack="false" />
-
- <plugin id="org.apache.axis" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="org.apache.commons.logging" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="org.apache.commons.io" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="org.apache.commons.httpclient" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="org.apache.commons.lang" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="org.apache.commons.codec" version="0.0.0" match="greaterOrEqual" unpack="false" />
-
- <plugin id="org.jdom_jaxen" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="org.mortbay.jetty.server" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="org.mortbay.jetty.util" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="org.apache.jasper" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="org.joda.time" version="0.0.0" match="greaterOrEqual" unpack="false" />
-
- <plugin id="javax.servlet" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="javax.servlet.jsp" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="javax.xml.rpc" version="0.0.0" match="greaterOrEqual" unpack="false" />
- <plugin id="javax.el" version="0.0.0" match="greaterOrEqual" unpack="false" />
- </requires>
-</feature>
+</feature>
\ No newline at end of file
12 years, 7 months
JBoss Tools SVN: r41214 - trunk/download.jboss.org/jbosstools/examples.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2012-05-21 12:21:26 -0400 (Mon, 21 May 2012)
New Revision: 41214
Modified:
trunk/download.jboss.org/jbosstools/examples/project-examples-shared-3.3....
trunk/download.jboss.org/jbosstools/examples/project-examples-shared-3.3....
Log:
JBIDE-11908 Update html5 M4 archetype release in JBoss Central
Modified: trunk/download.jboss.org/jbosstools/examples/project-examples-shared-3.3....
===================================================================
--- trunk/download.jboss.org/jbosstools/examples/project-examples-shared-3.3.... 2012-05-21 14:29:39 UTC (rev 41213)
+++ trunk/download.jboss.org/jbosstools/examples/project-examples-shared-3.3.... 2012-05-21 16:21:26 UTC (rev 41214)
@@ -159,9 +159,9 @@
<mavenArchetype>
<archetypeGroupId>org.jboss.aerogear.archetypes</archetypeGroupId>
<archetypeArtifactId>jboss-html5-mobile-archetype</archetypeArtifactId>
- <archetypeVersion>1.0.0.M3-JBT</archetypeVersion>
+ <archetypeVersion>1.0.0.M4</archetypeVersion>
+ <!--
<archetypeRepository>http://anonsvn.jboss.org/repos/jbosstools/workspace/fred/repositories/sna...</archetypeRepository>
- <!--
<archetypeRepository>http://repository.jboss.org/nexus/content/repositories/releases/</archetypeRepository>
-->
<groupId>org.jboss.tools.example</groupId>
Modified: trunk/download.jboss.org/jbosstools/examples/project-examples-shared-3.3....
===================================================================
--- trunk/download.jboss.org/jbosstools/examples/project-examples-shared-3.3.... 2012-05-21 14:29:39 UTC (rev 41213)
+++ trunk/download.jboss.org/jbosstools/examples/project-examples-shared-3.3.... 2012-05-21 16:21:26 UTC (rev 41214)
@@ -159,9 +159,9 @@
<mavenArchetype>
<archetypeGroupId>org.jboss.aerogear.archetypes</archetypeGroupId>
<archetypeArtifactId>jboss-html5-mobile-archetype</archetypeArtifactId>
- <archetypeVersion>1.0.0.M3-JBT</archetypeVersion>
+ <archetypeVersion>1.0.0.M4</archetypeVersion>
+ <!--
<archetypeRepository>http://anonsvn.jboss.org/repos/jbosstools/workspace/fred/repositories/sna...</archetypeRepository>
- <!--
<archetypeRepository>http://repository.jboss.org/nexus/content/repositories/releases/</archetypeRepository>
-->
<groupId>org.jboss.tools.example</groupId>
@@ -213,8 +213,8 @@
<mavenArchetype>
<archetypeGroupId>org.richfaces.archetypes</archetypeGroupId>
<archetypeArtifactId>richfaces-archetype-kitchensink</archetypeArtifactId>
- <archetypeVersion>4.2.2.Final-JBT</archetypeVersion>
- <archetypeRepository>http://anonsvn.jboss.org/repos/jbosstools/workspace/fred/repositories/sna...</archetypeRepository>
+ <archetypeVersion>4.2.2.Final-1</archetypeVersion>
+ <archetypeRepository>https://repository.jboss.org/nexus/content/repositories/jboss_releases_st...</archetypeRepository>
<!--
<archetypeRepository>http://repository.jboss.org/nexus/content/repositories/releases/</archetypeRepository>
<archetypeRepository>http://repository.jboss.org/nexus/content/repositories/snapshots/</archetypeRepository>
@@ -225,7 +225,7 @@
<javaPackage>org.jboss.tools.example.richfaces</javaPackage>
<properties>
<property name="richfaces-enterprise-version" value="4.2.1.Final" /> <!-- RF is broken in WFK / WFK repo not available-->
- <property name="richfaces-version" value="4.2.1.Final" />
+ <property name="richfaces-version" value="4.2.2.Final" />
</properties>
</mavenArchetype>
<!--
@@ -274,15 +274,20 @@
<mavenArchetype>
<archetypeGroupId>org.jboss.spring.archetypes</archetypeGroupId>
<archetypeArtifactId>spring-mvc-webapp</archetypeArtifactId>
- <archetypeVersion>1.0.0.CR4</archetypeVersion>
-
+ <archetypeVersion>1.0.0.CR5</archetypeVersion>
+ <archetypeRepository>https://repository.jboss.org/nexus/content/repositories/jboss_releases_st...</archetypeRepository>
+ <!--
<archetypeRepository>http://repository.jboss.org/nexus/content/repositories/releases/</archetypeRepository>
-
+ -->
<groupId>org.jboss.tools.example</groupId>
<artifactId>springmvc</artifactId>
<version>0.0.1-SNAPSHOT</version>
<javaPackage>org.jboss.tools.example.springmvc</javaPackage>
- </mavenArchetype>
+ <properties>
+ <property name="springBomVersion" value="2.0.0-redhat-5" />
+ </properties>
+
+ </mavenArchetype>
<tags>wizard</tags>
<icon path="icons/spring_wiz.gif" />
</project>
12 years, 7 months