[jbosstools-commits] JBoss Tools SVN: r43679 - in trunk: as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server and 6 other directories.
jbosstools-commits at lists.jboss.org
jbosstools-commits at lists.jboss.org
Fri Sep 14 02:58:23 EDT 2012
Author: rob.stryker at jboss.com
Date: 2012-09-14 02:58:22 -0400 (Fri, 14 Sep 2012)
New Revision: 43679
Removed:
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/WTP31DependencyListener.java
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/vcf/DefaultReferenceResolver.java
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/vcf/IReferenceResolver.java
trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/PublishUtil.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/UnitedServerListenerManager.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/IJBoss7Deployment.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ExpressionResolverUtil.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerCreationUtils.java
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/META-INF/MANIFEST.MF
Log:
JBIDE-12612 to trunk
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/PublishUtil.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/PublishUtil.java 2012-09-14 05:11:40 UTC (rev 43678)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/PublishUtil.java 2012-09-14 06:58:22 UTC (rev 43679)
@@ -184,7 +184,7 @@
}
- public static ArrayList<String> moduleCoreFactories = new ArrayList<String>();
+ private static ArrayList<String> moduleCoreFactories = new ArrayList<String>();
static {
moduleCoreFactories.add("org.eclipse.jst.j2ee.server"); //$NON-NLS-1$
moduleCoreFactories.add("org.eclipse.jst.jee.server"); //$NON-NLS-1$
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/UnitedServerListenerManager.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/UnitedServerListenerManager.java 2012-09-14 05:11:40 UTC (rev 43678)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/UnitedServerListenerManager.java 2012-09-14 06:58:22 UTC (rev 43679)
@@ -11,10 +11,8 @@
package org.jboss.ide.eclipse.as.core.server;
import java.util.ArrayList;
-import java.util.Iterator;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.wst.server.core.IPublishListener;
import org.eclipse.wst.server.core.IRuntime;
import org.eclipse.wst.server.core.IRuntimeLifecycleListener;
@@ -60,7 +58,6 @@
return (UnitedServerListener[]) list.toArray(new UnitedServerListener[list.size()]);
}
- @Deprecated
public static boolean isJBossServer(IServer server) {
return ServerConverter.getJBossServer(server) != null;
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/IJBoss7Deployment.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/IJBoss7Deployment.java 2012-09-14 05:11:40 UTC (rev 43678)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/IJBoss7Deployment.java 2012-09-14 06:58:22 UTC (rev 43679)
@@ -11,7 +11,11 @@
package org.jboss.ide.eclipse.as.core.server.internal.v7;
/**
- * A marker interface for any app server which supports jb7 style deployment
+ * A marker interface for any app server which supports
+ * jb7 style deployment with marker files.
+ *
+ * To be used on the server delegate.
+ * ex: see JBoss7Server
*
*/
public interface IJBoss7Deployment {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ExpressionResolverUtil.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ExpressionResolverUtil.java 2012-09-14 05:11:40 UTC (rev 43678)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ExpressionResolverUtil.java 2012-09-14 06:58:22 UTC (rev 43679)
@@ -2,11 +2,6 @@
import java.io.File;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
-
/**
* This class coppied from JBoss's DMR project, ExpressionValue.java
*
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerCreationUtils.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerCreationUtils.java 2012-09-14 05:11:40 UTC (rev 43678)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/ServerCreationUtils.java 2012-09-14 06:58:22 UTC (rev 43679)
@@ -23,7 +23,6 @@
import org.eclipse.wst.server.core.ServerCore;
import org.eclipse.wst.server.core.ServerUtil;
import org.eclipse.wst.server.core.internal.RuntimeWorkingCopy;
-import org.eclipse.wst.server.core.internal.Server;
import org.eclipse.wst.server.core.internal.ServerWorkingCopy;
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/WTP31DependencyListener.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/WTP31DependencyListener.java 2012-09-14 05:11:40 UTC (rev 43678)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/WTP31DependencyListener.java 2012-09-14 06:58:22 UTC (rev 43679)
@@ -1,226 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.ide.eclipse.as.wtp.core;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceChangeEvent;
-import org.eclipse.core.resources.IResourceChangeListener;
-import org.eclipse.core.resources.IResourceDelta;
-import org.eclipse.core.resources.IResourceDeltaVisitor;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jst.j2ee.application.internal.operations.IModuleExtensions;
-import org.eclipse.jst.j2ee.internal.common.classpath.J2EEComponentClasspathUpdater;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEPlugin;
-import org.eclipse.jst.j2ee.project.EarUtilities;
-import org.eclipse.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.componentcore.internal.builder.IDependencyGraph;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
-import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
-import org.eclipse.wst.common.componentcore.resources.IVirtualResource;
-
-/**
- * This file is here as a clone to J2EEDependencyListener, but that class
- * has bugs that will only be fixed in WTP 3.1.2 or WTP 3.2.0.
- *
- * This class MUST BE REMOVED at that point
- * @author rob
- *
- */
-
-public class WTP31DependencyListener { //implements IResourceChangeListener, IResourceDeltaVisitor {
- /*
-
-
- public static WTP31DependencyListener INSTANCE = new WTP31DependencyListener();
-
- private WTP31DependencyListener() {
- }
-
- // private List<IProject> cachedEARModuleDependencies = new
- // ArrayList<IProject>();
- //
- // private void cacheModuleDependencies(IProject earProject) {
- // if (EarUtilities.isEARProject(earProject)) {
- // IVirtualReference[] refs =
- // EarUtilities.getComponentReferences(ComponentCore.createComponent(earProject));
- // IVirtualComponent comp = null;
- // for (int j = 0; j < refs.length; j++) {
- // comp = refs[j].getReferencedComponent();
- // if (!comp.isBinary()) {
- // cachedEARModuleDependencies.add(comp.getProject());
- // }
- // }
- // }
- // }
- //
- // private void updateModuleDependencies() {
- // if (!cachedEARModuleDependencies.isEmpty()) {
- // for (Iterator<IProject> iterator =
- // cachedEARModuleDependencies.iterator(); iterator.hasNext();) {
- // IDependencyGraph.INSTANCE.update(iterator.next());
- // }
- // cachedEARModuleDependencies.clear();
- // }
- // }
-
- public void resourceChanged(IResourceChangeEvent event) {
- try {
- IDependencyGraph.INSTANCE.preUpdate();
- switch (event.getType()) {
- case IResourceChangeEvent.PRE_CLOSE:
- case IResourceChangeEvent.PRE_DELETE:
- // IResource resource = event.getResource();
- // if (resource.getType() == IResource.PROJECT) {
- // cacheModuleDependencies((IProject) resource);
- // }
- break;
- case IResourceChangeEvent.POST_CHANGE:
- event.getDelta().accept(this);
- }
- } catch (CoreException e) {
- J2EEPlugin.logError(e);
- } finally {
- IDependencyGraph.INSTANCE.postUpdate();
- }
- }
-
- public boolean visit(IResourceDelta delta) throws CoreException {
- IResource resource = delta.getResource();
- switch (resource.getType()) {
- case IResource.ROOT:
- return true;
- case IResource.PROJECT:
- int kind = delta.getKind();
- // if ((IResourceDelta.ADDED & kind) != 0) {
- // // if an EAR project is added then all dependent modules must be
- // // updated
- // if (EarUtilities.isEARProject((IProject) resource)) {
- // cacheModuleDependencies((IProject) resource);
- // updateModuleDependencies();
- // }
- // return false;
- // } else if ((IResourceDelta.REMOVED & kind) != 0) {
- // updateModuleDependencies();
- // return false;
- // } else
- if ((IResourceDelta.CHANGED & kind) != 0) {
- // int flags = delta.getFlags();
- // if ((IResourceDelta.OPEN & flags) != 0) {
- // boolean isOpen = ((IProject) resource).isOpen();
- // if (isOpen) {
- // // if an EAR project is open all dependent modules must
- // // be updated
- // cacheModuleDependencies((IProject) resource);
- // }
- // // this will also pickup both close and open events
- // // if the EAR project is closed, the cached dependent
- // // modules will already
- // updateModuleDependencies();
- // }
- return true;
- }
- return false;
- case IResource.FOLDER:
- return true;
- case IResource.FILE:
- String name = resource.getName();
- // MANIFEST.MF must be all caps per spec
- // if (name.equals(J2EEConstants.MANIFEST_SHORT_NAME)) {
- // IFile manifestFile =
- // J2EEProjectUtilities.getManifestFile(resource.getProject(),
- // false);
- // if (null == manifestFile || resource.equals(manifestFile)) {
- // IDependencyGraph.INSTANCE.update(resource.getProject(),
- // IDependencyGraph.MODIFIED);
- // }
- // } else if
- // (name.equals(WTPModulesResourceFactory.WTP_MODULES_SHORT_NAME)) {
- // if (EarUtilities.isEARProject(resource.getProject())) {
- // // unfortunately, in this case, the only easy way to update
- // // is to force the update of all projects
- // IProject[] allProjects =
- // ResourcesPlugin.getWorkspace().getRoot().getProjects();
- // for (IProject sourceProject : allProjects) {
- // IDependencyGraph.INSTANCE.update(sourceProject,
- // IDependencyGraph.MODIFIED);
- // }
- // }
- // } else
- if (endsWithIgnoreCase(name, IModuleExtensions.DOT_JAR)
- || endsWithIgnoreCase(name, IModuleExtensions.DOT_WAR)
- || endsWithIgnoreCase(name, IModuleExtensions.DOT_RAR)) {
- if (EarUtilities.isEARProject(resource.getProject())) {
- IVirtualComponent comp = ComponentCore
- .createComponent(resource.getProject());
- // if (isFolder(resource.getParent(), comp.getRootFolder()))
- // {
- if (!isFolder(resource.getParent(), comp.getRootFolder())) {
- if( isInTree((IFile)resource, comp.getRootFolder())) {
- IVirtualReference[] refs = comp.getReferences();
- for (IVirtualReference ref : refs) {
- IDependencyGraph.INSTANCE.update(ref
- .getReferencedComponent().getProject(),
- IDependencyGraph.MODIFIED);
- }
- IDependencyGraph.INSTANCE.update(resource.getProject(),
- IDependencyGraph.MODIFIED);
- }
- }
-
- }
- }
- default:
- return false;
- }
- }
-
- public static boolean isInTree(IFile file, IVirtualFolder folder) {
- // If we are the folder, return true
- if (isFolder(file.getParent(), folder))
- return true;
-
- // if resource is any level under current VF's underlying folders,
- // return true
- IContainer[] underlying = folder.getUnderlyingFolders();
- for (int i = 0; i < underlying.length; i++) {
- if (underlying[i].getFullPath().isPrefixOf(file.getFullPath()))
- return true;
- }
-
- // continue to peruse in case there's some odd mapping, such as
- // /EarConten5 -> /my/secret/location/wherever/it/goes
- boolean found = false;
- try {
- IVirtualResource[] children = folder.members();
- for (int i = 0; i < children.length && !found; i++) {
- if (children[i].getType() == IVirtualResource.FOLDER) {
- found |= isInTree(file, (IVirtualFolder) children[i]);
- }
- }
- } catch (CoreException ce) {
- J2EEPlugin.logError(ce);
- }
- return found;
- }
-
- public static boolean endsWithIgnoreCase(String str, String sfx) {
- return J2EEComponentClasspathUpdater.endsWithIgnoreCase(str, sfx);
-
- }
-
- public static boolean isFolder(IResource resource, IVirtualFolder folder) {
- return J2EEComponentClasspathUpdater.isFolder(resource, folder);
- }
- */
-}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/vcf/DefaultReferenceResolver.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/vcf/DefaultReferenceResolver.java 2012-09-14 05:11:40 UTC (rev 43678)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/vcf/DefaultReferenceResolver.java 2012-09-14 06:58:22 UTC (rev 43679)
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.ide.eclipse.as.wtp.core.vcf;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.componentcore.UnresolveableURIException;
-import org.eclipse.wst.common.componentcore.internal.ComponentcorePackage;
-import org.eclipse.wst.common.componentcore.internal.DependencyType;
-import org.eclipse.wst.common.componentcore.internal.ReferencedComponent;
-import org.eclipse.wst.common.componentcore.internal.StructureEdit;
-import org.eclipse.wst.common.componentcore.internal.impl.ModuleURIUtil;
-import org.eclipse.wst.common.componentcore.internal.resources.VirtualReference;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
-
-public class DefaultReferenceResolver implements IReferenceResolver {
- // Does not need to implement,
- // default is always called as last resort
- public boolean canResolve(IVirtualComponent context,
- ReferencedComponent referencedComponent) {
- return false;
- }
-
- // Does not need to implement,
- // default is always called as last resort
- public boolean canResolve(IVirtualReference reference) {
- return false;
- }
-
- public IVirtualReference resolve(IVirtualComponent context,
- ReferencedComponent referencedComponent) {
- IVirtualComponent targetComponent = null;
- IProject targetProject = null;
- URI uri = referencedComponent.getHandle();
- if (uri == null)
- return null;
- boolean isClassPathURI = ModuleURIUtil.isClassPathURI(uri);
- if( !isClassPathURI ){
- try {
- targetProject = StructureEdit.getContainingProject(uri);
- } catch(UnresolveableURIException uurie) {
- //Ignore
- }
- // if the project cannot be resolved, assume it's local - really it probably deleted
-
- targetComponent = ComponentCore.createComponent(targetProject);
-
-
- }else{
- String archiveType = ""; //$NON-NLS-1$
- String archiveName = ""; //$NON-NLS-1$
- try {
- archiveType = ModuleURIUtil.getArchiveType(uri);
- archiveName = ModuleURIUtil.getArchiveName(uri);
-
- } catch (UnresolveableURIException e) {
- //Ignore
- }
- targetComponent = ComponentCore.createArchiveComponent(context.getProject(), archiveType + IPath.SEPARATOR + archiveName );
- }
- return new VirtualReference(context, targetComponent, referencedComponent.getRuntimePath(), referencedComponent.getDependencyType().getValue());
- }
-
- public ReferencedComponent resolve(IVirtualReference reference) {
- IVirtualComponent referencedComponent = reference.getReferencedComponent();
- ReferencedComponent refComp = ComponentcorePackage.eINSTANCE.getComponentcoreFactory().createReferencedComponent();
- refComp.setRuntimePath(reference.getRuntimePath());
- refComp.setDependencyType(DependencyType.get(reference.getDependencyType()));
- refComp.setArchiveName(reference.getArchiveName());
- if( referencedComponent != null ) {
- if( !referencedComponent.isBinary())
- refComp.setHandle(ModuleURIUtil.fullyQualifyURI(referencedComponent.getProject()));
- else
- refComp.setHandle(ModuleURIUtil.archiveComponentfullyQualifyURI(referencedComponent.getName()));
- }
- return refComp;
- }
-
-
-}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/vcf/IReferenceResolver.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/vcf/IReferenceResolver.java 2012-09-14 05:11:40 UTC (rev 43678)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.wtp.core/src/org/jboss/ide/eclipse/as/wtp/core/vcf/IReferenceResolver.java 2012-09-14 06:58:22 UTC (rev 43679)
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.ide.eclipse.as.wtp.core.vcf;
-
-import org.eclipse.wst.common.componentcore.internal.ReferencedComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
-
-public interface IReferenceResolver {
- public boolean canResolve(IVirtualComponent context, ReferencedComponent referencedComponent);
- public IVirtualReference resolve(IVirtualComponent context, ReferencedComponent referencedComponent);
- public boolean canResolve(IVirtualReference reference);
- public ReferencedComponent resolve(IVirtualReference reference);
-}
Modified: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/META-INF/MANIFEST.MF 2012-09-14 05:11:40 UTC (rev 43678)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/META-INF/MANIFEST.MF 2012-09-14 06:58:22 UTC (rev 43679)
@@ -32,7 +32,6 @@
org.eclipse.jface.text,
org.jboss.ide.eclipse.as.classpath.core,
org.jboss.ide.eclipse.as.ui,
- org.jboss.ide.eclipse.as.wtp.core,
org.jboss.ide.eclipse.as.test
Bundle-ActivationPolicy: lazy
Export-Package: org.jboss.tools.ws.creation.core.test,
More information about the jbosstools-commits
mailing list