diff options
author | vbhadrir | 2005-08-11 14:32:45 +0000 |
---|---|---|
committer | vbhadrir | 2005-08-11 14:32:45 +0000 |
commit | 016d1cc1550b604dd1e7f58d562688cdd4d3e953 (patch) | |
tree | 2508da3c7eac41e579a13113a11e657b046e6c3e | |
parent | 575e3b3efdcc8d72f606bf7ead3c82b4b4284acf (diff) | |
download | webtools.common-016d1cc1550b604dd1e7f58d562688cdd4d3e953.tar.gz webtools.common-016d1cc1550b604dd1e7f58d562688cdd4d3e953.tar.xz webtools.common-016d1cc1550b604dd1e7f58d562688cdd4d3e953.zip |
[102173] depenedency graph builder removed, mgr made on demand: committed for JL
4 files changed, 5 insertions, 72 deletions
diff --git a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/ModuleCoreNature.java b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/ModuleCoreNature.java index d55266187..f5eacf1d2 100644 --- a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/ModuleCoreNature.java +++ b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/ModuleCoreNature.java @@ -152,6 +152,7 @@ public class ModuleCoreNature extends EditModelNature implements IProjectNature, if (aProject.isAccessible()) return (ModuleCoreNature) aProject.getNature(IModuleConstants.MODULE_NATURE_ID); } catch (CoreException e) { + //Ignore } return null; } @@ -178,7 +179,7 @@ public class ModuleCoreNature extends EditModelNature implements IProjectNature, IJobManager manager = Platform.getJobManager(); IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); if (aMonitor != null) - aMonitor.beginTask("Add ModuleCore Nature", 5); + aMonitor.beginTask("Add ModuleCore Nature", 5); //$NON-NLS-1$ manager.beginRule(root, aMonitor); try { IProjectDescription description = aProject.getDescription(); @@ -438,6 +439,7 @@ public class ModuleCoreNature extends EditModelNature implements IProjectNature, * @see org.eclipse.jem.util.emf.workbench.IEMFContextContributor#secondaryContributeToContext(org.eclipse.jem.util.emf.workbench.EMFWorkbenchContextBase) */ public void secondaryContributeToContext(EMFWorkbenchContextBase aNature) { + //Default } /** @@ -451,7 +453,6 @@ public class ModuleCoreNature extends EditModelNature implements IProjectNature, super.configure(); addDeployableProjectBuilder(); addDependencyResolver(); - addDependencyGraphBuilder(); } protected String getPluginID() { @@ -481,29 +482,6 @@ public class ModuleCoreNature extends EditModelNature implements IProjectNature, } } - private void addDependencyGraphBuilder() throws CoreException { - IProjectDescription description = project.getDescription(); - ICommand[] builderCommands = description.getBuildSpec(); - boolean previouslyAdded = false; - - for (int i = 0; i < builderCommands.length; i++) { - if (builderCommands[i].getBuilderName().equals(DEPENDENCY_GRAPH_BUILDER_ID)) - // builder already added no need to add again - previouslyAdded = true; - break; - } - if (!previouslyAdded) { - // builder not found, must be added - ICommand command = description.newCommand(); - command.setBuilderName(DEPENDENCY_GRAPH_BUILDER_ID); - ICommand[] updatedBuilderCommands = new ICommand[builderCommands.length + 1]; - System.arraycopy(builderCommands, 0, updatedBuilderCommands, 0, builderCommands.length); - updatedBuilderCommands[updatedBuilderCommands.length-1] = command; - description.setBuildSpec(updatedBuilderCommands); - project.setDescription(description, null); - } - } - private void addDependencyResolver() throws CoreException { ProjectUtilities.addToBuildSpec(COMPONENT_STRUCTURAL_DEPENDENCY_RESOLVER_ID, getProject()); } @@ -511,8 +489,8 @@ public class ModuleCoreNature extends EditModelNature implements IProjectNature, private String getArtifactEditModelId(URI aModuleURI) { StructureEdit editUtility = null; try { - IProject project = StructureEdit.getContainingProject(aModuleURI); - editUtility = StructureEdit.getStructureEditForRead(project); + IProject aProject = StructureEdit.getContainingProject(aModuleURI); + editUtility = StructureEdit.getStructureEditForRead(aProject); WorkbenchComponent module = editUtility.findComponentByName(ModuleURIUtil.getDeployedName(aModuleURI)); return module.getComponentType().getComponentTypeId(); } catch (UnresolveableURIException uurie) { diff --git a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/builder/DependencyGraphBuilder.java b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/builder/DependencyGraphBuilder.java deleted file mode 100644 index c9195160b..000000000 --- a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/builder/DependencyGraphBuilder.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.eclipse.wst.common.componentcore.internal.builder; - -import java.util.Map; - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IncrementalProjectBuilder; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.wst.common.componentcore.internal.util.IModuleConstants; - -public class DependencyGraphBuilder extends IncrementalProjectBuilder { - - /** - * Builder id of this incremental project builder. - */ - public static final String BUILDER_ID = IModuleConstants.DEPENDENCY_GRAPH_BUILDER_ID; - - public DependencyGraphBuilder() { - super(); - } - - protected IProject[] build(int kind, Map args, IProgressMonitor monitor) throws CoreException { - DependencyGraphManager.getInstance().construct(getProject()); - return null; - } - - - -} diff --git a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/IModuleConstants.java b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/IModuleConstants.java index 5aa648445..5fa60ceef 100644 --- a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/IModuleConstants.java +++ b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/util/IModuleConstants.java @@ -19,8 +19,6 @@ import org.eclipse.core.runtime.Path; */ public interface IModuleConstants { - public static String DEPENDENCY_GRAPH_BUILDER_ID = "org.eclipse.wst.common.modulecore.DependencyGraphBuilder"; //$NON-NLS-1$ - public static String COMPONENT_STRUCTURAL_BUILDER_ID = "org.eclipse.wst.common.modulecore.ComponentStructuralBuilder"; //$NON-NLS-1$ public static String COMPONENT_STRUCTURAL_DEPENDENCY_RESOLVER_ID = "org.eclipse.wst.common.modulecore.ComponentStructuralBuilderDependencyResolver"; //$NON-NLS-1$ diff --git a/plugins/org.eclipse.wst.common.modulecore/plugin.xml b/plugins/org.eclipse.wst.common.modulecore/plugin.xml index db99604e6..035da6767 100644 --- a/plugins/org.eclipse.wst.common.modulecore/plugin.xml +++ b/plugins/org.eclipse.wst.common.modulecore/plugin.xml @@ -34,20 +34,6 @@ </editModel> </extension> - <!--======================================--> - <!-- Dependency Graph Builder contribution--> - <!--======================================--> - <extension - id="DependencyGraphBuilder" - name="Dependency Graph Builder" - point="org.eclipse.core.resources.builders"> - <builder> - <run - class="org.eclipse.wst.common.componentcore.internal.builder.DependencyGraphBuilder"> - </run> - </builder> - </extension> - <!--============================--> <!-- Component Structural Builder Contribution--> <!--============================--> |