diff options
author | david_williams | 2006-01-11 03:01:55 +0000 |
---|---|---|
committer | david_williams | 2006-01-11 03:01:55 +0000 |
commit | 1ab25b8917184be1390ec7ece5f6aaaba46389a9 (patch) | |
tree | 32e1811dd1385704da9146d044a700646403c2b6 /bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename | |
parent | ce5190e38b61d9b5abdd386dc00cf532b02fabc3 (diff) | |
download | webtools.sourceediting-1ab25b8917184be1390ec7ece5f6aaaba46389a9.tar.gz webtools.sourceediting-1ab25b8917184be1390ec7ece5f6aaaba46389a9.tar.xz webtools.sourceediting-1ab25b8917184be1390ec7ece5f6aaaba46389a9.zip |
[123366] internal Assert class used
Diffstat (limited to 'bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename')
4 files changed, 172 insertions, 216 deletions
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/RenameComponentProcessor.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/RenameComponentProcessor.java index 8525868fc0..fea182331d 100644 --- a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/RenameComponentProcessor.java +++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/RenameComponentProcessor.java @@ -18,10 +18,11 @@ import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; -import org.eclipse.core.internal.utils.Assert; + import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.Assert; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.NullProgressMonitor; @@ -61,8 +62,7 @@ import org.eclipse.wst.xsd.ui.internal.refactor.util.TextChangeCompatibility; -public class RenameComponentProcessor extends RenameProcessor implements INameUpdating, IReferenceUpdating -{ +public class RenameComponentProcessor extends RenameProcessor implements INameUpdating, IReferenceUpdating { public static final String IDENTIFIER = "org.eclipse.wst.xml.refactor.renameComponentProcessor"; //$NON-NLS-1$ public static String quoteString(String value) { @@ -78,188 +78,182 @@ public class RenameComponentProcessor extends RenameProcessor implements INameUp } return sb.toString(); } + private TextChangeManager changeManager; private String newName; private RefactoringComponent selectedComponent; - + private boolean updateReferences = true; - + private Map references = new HashMap(); - public RenameComponentProcessor(RefactoringComponent selectedComponent) - { + public RenameComponentProcessor(RefactoringComponent selectedComponent) { this.selectedComponent = selectedComponent; } - public RenameComponentProcessor(RefactoringComponent selectedComponent, String newName) - { + public RenameComponentProcessor(RefactoringComponent selectedComponent, String newName) { this.newName = newName; - this.selectedComponent = selectedComponent; + this.selectedComponent = selectedComponent; } - private void addDeclarationUpdate(TextChangeManager manager) throws CoreException - { + private void addDeclarationUpdate(TextChangeManager manager) throws CoreException { String fileStr = selectedComponent.getElement().getModel().getBaseLocation(); IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(fileStr)); addDeclarationUpdate(manager, file); } - - final void addDeclarationUpdate(TextChangeManager manager, IFile file) throws CoreException - { - + + final void addDeclarationUpdate(TextChangeManager manager, IFile file) throws CoreException { + String componentName = selectedComponent.getName(); String componentNamespace = selectedComponent.getNamespaceURI(); QualifiedName elementQName = new QualifiedName(componentNamespace, componentName); QualifiedName typeQName = selectedComponent.getTypeQName(); - - + + SearchScope scope = new WorkspaceSearchScope(); - if(file != null){ + if (file != null) { scope = new SelectionSearchScope(new IResource[]{file}); } - CollectingSearchRequestor requestor= new CollectingSearchRequestor(); + CollectingSearchRequestor requestor = new CollectingSearchRequestor(); SearchPattern pattern = new XMLComponentDeclarationPattern(file, elementQName, typeQName); SearchEngine searchEngine = new SearchEngine(); searchEngine.search(pattern, requestor, scope, new NullProgressMonitor()); List results = requestor.getResults(); for (Iterator iter = results.iterator(); iter.hasNext();) { SearchMatch match = (SearchMatch) iter.next(); - if(match != null){ + if (match != null) { TextChange textChange = manager.get(match.getFile()); String newName = getNewElementName(); newName = quoteString(newName); - - ReplaceEdit replaceEdit = new ReplaceEdit(match.getOffset(), match.getLength(), newName ); + + ReplaceEdit replaceEdit = new ReplaceEdit(match.getOffset(), match.getLength(), newName); String editName = RefactoringMessages.getString("RenameComponentProcessor.Component_Refactoring_update_declatation");; TextChangeCompatibility.addTextEdit(textChange, editName, replaceEdit); } - } + } } - - void addOccurrences(TextChangeManager manager, IProgressMonitor pm, - RefactoringStatus status) throws CoreException{ - String fileStr = selectedComponent.getElement().getModel().getBaseLocation(); - IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(fileStr)); - + void addOccurrences(TextChangeManager manager, IProgressMonitor pm, RefactoringStatus status) throws CoreException { + + String fileStr = selectedComponent.getElement().getModel().getBaseLocation(); + IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(fileStr)); + String componentName = selectedComponent.getName(); String componentNamespace = selectedComponent.getNamespaceURI(); QualifiedName elementQName = new QualifiedName(componentNamespace, componentName); QualifiedName typeQName = selectedComponent.getTypeQName(); - + SearchEngine searchEngine = new SearchEngine(); - SortingSearchRequestor requestor= new SortingSearchRequestor(); + SortingSearchRequestor requestor = new SortingSearchRequestor(); SearchPattern pattern = new XMLComponentReferencePattern(file, elementQName, typeQName); searchEngine.search(pattern, requestor, new WorkspaceSearchScope(), new NullProgressMonitor()); references = requestor.getResults(); -// for (Iterator iter = references.iterator(); iter.hasNext();) { -// SearchMatch match = (SearchMatch) iter.next(); - -// TextChange textChange = manager.get(match.getFile()); -// String newName = getNewElementName(); -// if(match.getObject() instanceof Node){ -// Node node = (Node)match.getObject(); -// if(node instanceof IDOMAttr){ -// IDOMAttr attr = (IDOMAttr)node; -// IDOMElement element = (IDOMElement)attr.getOwnerElement() ; -// newName = getNewQName(element, componentNamespace, newName); -// } -// newName = quoteString(newName); -// } -// -// ReplaceEdit replaceEdit = new ReplaceEdit(match.getOffset(), match.getLength(), newName ); -// String editName = RefactoringMessages.getString("RenameComponentProcessor.Component_Refactoring_update_reference"); -// TextChangeCompatibility.addTextEdit(textChange, editName, replaceEdit); - -// } + // for (Iterator iter = references.iterator(); iter.hasNext();) { + // SearchMatch match = (SearchMatch) iter.next(); + + // TextChange textChange = manager.get(match.getFile()); + // String newName = getNewElementName(); + // if(match.getObject() instanceof Node){ + // Node node = (Node)match.getObject(); + // if(node instanceof IDOMAttr){ + // IDOMAttr attr = (IDOMAttr)node; + // IDOMElement element = (IDOMElement)attr.getOwnerElement() ; + // newName = getNewQName(element, componentNamespace, newName); + // } + // newName = quoteString(newName); + // } + // + // ReplaceEdit replaceEdit = new ReplaceEdit(match.getOffset(), + // match.getLength(), newName ); + // String editName = + // RefactoringMessages.getString("RenameComponentProcessor.Component_Refactoring_update_reference"); + // TextChangeCompatibility.addTextEdit(textChange, editName, + // replaceEdit); + + // } } - + /* * (non-Javadoc) * * @see org.eclipse.jdt.internal.corext.refactoring.tagging.ITextUpdating#canEnableTextUpdating() */ - public boolean canEnableTextUpdating() - { + public boolean canEnableTextUpdating() { return true; } - - public boolean canEnableUpdateReferences() - { + + public boolean canEnableUpdateReferences() { return true; } - + /* * (non-Javadoc) * * @see org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor#checkFinalConditions(org.eclipse.core.runtime.IProgressMonitor, * org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext) */ - public RefactoringStatus checkFinalConditions(IProgressMonitor monitor, - CheckConditionsContext context) throws CoreException, - OperationCanceledException - { + public RefactoringStatus checkFinalConditions(IProgressMonitor monitor, CheckConditionsContext context) throws CoreException, OperationCanceledException { Assert.isNotNull(monitor); Assert.isNotNull(context); - final RefactoringStatus status= new RefactoringStatus(); + final RefactoringStatus status = new RefactoringStatus(); try { monitor.beginTask("", 2); //$NON-NLS-1$ - monitor.setTaskName("RefactoringMessages.RenameComponentRefactoring_checking"); + monitor.setTaskName("RefactoringMessages.RenameComponentRefactoring_checking"); status.merge(checkNewElementName(getNewElementName())); monitor.worked(1); - monitor.setTaskName("RefactoringMessages.RenameComponentRefactoring_searching"); + monitor.setTaskName("RefactoringMessages.RenameComponentRefactoring_searching"); status.merge(createRenameChanges(new SubProgressMonitor(monitor, 1))); - } finally { + } + finally { monitor.done(); } return status; } - - + + /* * (non-Javadoc) * * @see org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor#checkInitialConditions(org.eclipse.core.runtime.IProgressMonitor) */ - public RefactoringStatus checkInitialConditions(IProgressMonitor pm) - throws CoreException, OperationCanceledException - { + public RefactoringStatus checkInitialConditions(IProgressMonitor pm) throws CoreException, OperationCanceledException { // TODO add code to check initial conditions for component rename Assert.isNotNull(pm); try { return new RefactoringStatus(); - } finally { + } + finally { pm.done(); } - + } public final RefactoringStatus checkNewElementName(final String name) { Assert.isNotNull(name); - final RefactoringStatus result= Checks.checkName(name); + final RefactoringStatus result = Checks.checkName(name); result.merge(Checks.checkComponentName(name)); if (Checks.isAlreadyNamed(selectedComponent, name)) - result.addFatalError("RefactoringMessages.RenameComponentRefactoring_another_name"); + result.addFatalError("RefactoringMessages.RenameComponentRefactoring_another_name"); return result; } private Object[] computeDerivedElements() { Object[] elements = getElements(); -// Object[] results = new Object[elements.length]; -// for(int i=0; i< elements.length; i++){ -// RefactoringComponent component = (RefactoringComponent)elements[i]; -// results[i] = component.getAdaptee(); -// -// } + // Object[] results = new Object[elements.length]; + // for(int i=0; i< elements.length; i++){ + // RefactoringComponent component = (RefactoringComponent)elements[i]; + // results[i] = component.getAdaptee(); + // + // } return elements; - + } /* @@ -267,43 +261,40 @@ public class RenameComponentProcessor extends RenameProcessor implements INameUp * * @see org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor#createChange(org.eclipse.core.runtime.IProgressMonitor) */ - public Change createChange(IProgressMonitor pm) throws CoreException, - OperationCanceledException - { - // don't create any change now, all the changes are in changeManger variable and will be combined in postCreateChange method + public Change createChange(IProgressMonitor pm) throws CoreException, OperationCanceledException { + // don't create any change now, all the changes are in changeManger + // variable and will be combined in postCreateChange method return null; } - private TextChangeManager updateChangeManager(IProgressMonitor pm, - RefactoringStatus status) throws CoreException - { + private TextChangeManager updateChangeManager(IProgressMonitor pm, RefactoringStatus status) throws CoreException { TextChangeManager manager = getChangeManager(); - System.out.println("addDeclarationUpate-------------------"); + System.out.println("addDeclarationUpate-------------------"); // only one declaration gets updated addDeclarationUpdate(manager); - if (getUpdateReferences()) - { - System.out.println("addOccurences--------------------------"); + if (getUpdateReferences()) { + System.out.println("addOccurences--------------------------"); addOccurrences(manager, pm, status); - } + } return manager; } private RefactoringStatus createRenameChanges(final IProgressMonitor monitor) throws CoreException { Assert.isNotNull(monitor); - final RefactoringStatus status= new RefactoringStatus(); + final RefactoringStatus status = new RefactoringStatus(); try { - monitor.beginTask("RefactoringMessages.RenameComponentRefactoring_searching", 1); + monitor.beginTask("RefactoringMessages.RenameComponentRefactoring_searching", 1); updateChangeManager(new SubProgressMonitor(monitor, 1), status); - } finally { + } + finally { monitor.done(); } return status; } - public TextChangeManager getChangeManager(){ - - if(changeManager == null){ + public TextChangeManager getChangeManager() { + + if (changeManager == null) { changeManager = new TextChangeManager(false); } return changeManager; @@ -314,8 +305,7 @@ public class RenameComponentProcessor extends RenameProcessor implements INameUp * * @see org.eclipse.wst.xsd.internal.refactoring.rename.XSDRenameProcessor#getAffectedProjectNatures() */ - protected String[] getAffectedProjectNatures() throws CoreException - { + protected String[] getAffectedProjectNatures() throws CoreException { // TODO: find project natures of the files that are going to be // refactored return new String[]{"org.eclipse.jdt.core.javanature"}; @@ -326,24 +316,22 @@ public class RenameComponentProcessor extends RenameProcessor implements INameUp * * @see org.eclipse.jdt.internal.corext.refactoring.tagging.ITextUpdating#getCurrentElementName() */ - public String getCurrentElementName() - { + public String getCurrentElementName() { // return selectedComponent.getName(); } - - + + /* * (non-Javadoc) * * @see org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor#getElements() */ - public Object[] getElements() - { - Object model = selectedComponent.getModelObject(); - if(model != null){ - return new Object[] { model }; + public Object[] getElements() { + Object model = selectedComponent.getModelObject(); + if (model != null) { + return new Object[]{model}; } return new Object[0]; } @@ -353,13 +341,11 @@ public class RenameComponentProcessor extends RenameProcessor implements INameUp * * @see org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor#getIdentifier() */ - public String getIdentifier() - { + public String getIdentifier() { return IDENTIFIER; } - public String getNewElementName() - { + public String getNewElementName() { return newName; } @@ -368,21 +354,14 @@ public class RenameComponentProcessor extends RenameProcessor implements INameUp * * @see org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor#getProcessorName() */ - public String getProcessorName() - { - return RefactoringMessages.getFormattedString( - "RenameComponentRefactoring.name", //$NON-NLS-1$ - new String[] - { - selectedComponent.getNamespaceURI() + ":" - + selectedComponent.getName(), - newName }); + public String getProcessorName() { + return RefactoringMessages.getFormattedString("RenameComponentRefactoring.name", //$NON-NLS-1$ + new String[]{selectedComponent.getNamespaceURI() + ":" + selectedComponent.getName(), newName}); } - public boolean getUpdateReferences() - { + public boolean getUpdateReferences() { return updateReferences; } @@ -391,8 +370,7 @@ public class RenameComponentProcessor extends RenameProcessor implements INameUp * * @see org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor#isApplicable() */ - public boolean isApplicable() throws CoreException - { + public boolean isApplicable() throws CoreException { if (selectedComponent == null) return false; // TODO implement isApplicable logic for the named component, @@ -406,19 +384,16 @@ public class RenameComponentProcessor extends RenameProcessor implements INameUp return true; } - protected void loadDerivedParticipants(RefactoringStatus status, List result, Object[] derivedElements, - ComponentRenameArguments arguments, String[] natures, SharableParticipants shared) throws CoreException { + protected void loadDerivedParticipants(RefactoringStatus status, List result, Object[] derivedElements, ComponentRenameArguments arguments, String[] natures, SharableParticipants shared) throws CoreException { if (derivedElements != null) { - for (int i= 0; i < derivedElements.length; i++) { - RenameParticipant[] participants= ParticipantManager.loadRenameParticipants(status, - this, derivedElements[i], - arguments, natures, shared); + for (int i = 0; i < derivedElements.length; i++) { + RenameParticipant[] participants = ParticipantManager.loadRenameParticipants(status, this, derivedElements[i], arguments, natures, shared); result.addAll(Arrays.asList(participants)); } } - + } - + /* * (non-Javadoc) * @@ -426,106 +401,84 @@ public class RenameComponentProcessor extends RenameProcessor implements INameUp * java.util.List, java.lang.String[], * org.eclipse.ltk.core.refactoring.participants.SharableParticipants) */ - protected void loadDerivedParticipants(RefactoringStatus status, - List result, String[] natures, SharableParticipants shared) - throws CoreException - { - ComponentRenameArguments arguments= new ComponentRenameArguments(getNewElementName(), getUpdateReferences()); + protected void loadDerivedParticipants(RefactoringStatus status, List result, String[] natures, SharableParticipants shared) throws CoreException { + ComponentRenameArguments arguments = new ComponentRenameArguments(getNewElementName(), getUpdateReferences()); arguments.setMatches(references); arguments.setQualifier(selectedComponent.getNamespaceURI()); - // pass in changeManger to the participants so that it can collect all changes/per files + // pass in changeManger to the participants so that it can collect all + // changes/per files arguments.setChangeManager(getChangeManager()); - loadDerivedParticipants(status, result, - computeDerivedElements(), arguments, - natures, shared); + loadDerivedParticipants(status, result, computeDerivedElements(), arguments, natures, shared); } - - protected void loadElementParticipants(RefactoringStatus status, - List result, RenameArguments arguments, String[] natures, - SharableParticipants shared) throws CoreException - { - Object[] elements = new Object[0];//getElements(); - for (int i = 0; i < elements.length; i++) - { - result.addAll(Arrays.asList(ParticipantManager - .loadRenameParticipants(status, this, elements[i], - arguments, natures, shared))); + + protected void loadElementParticipants(RefactoringStatus status, List result, RenameArguments arguments, String[] natures, SharableParticipants shared) throws CoreException { + Object[] elements = new Object[0];// getElements(); + for (int i = 0; i < elements.length; i++) { + result.addAll(Arrays.asList(ParticipantManager.loadRenameParticipants(status, this, elements[i], arguments, natures, shared))); } } - - - public final RefactoringParticipant[] loadParticipants( - RefactoringStatus status, SharableParticipants sharedParticipants) - throws CoreException - { - RenameArguments arguments = new RenameArguments(getNewElementName(), - getUpdateReferences()); + + + public final RefactoringParticipant[] loadParticipants(RefactoringStatus status, SharableParticipants sharedParticipants) throws CoreException { + RenameArguments arguments = new RenameArguments(getNewElementName(), getUpdateReferences()); String[] natures = getAffectedProjectNatures(); List result = new ArrayList(); - loadElementParticipants(status, result, arguments, natures, - sharedParticipants); + loadElementParticipants(status, result, arguments, natures, sharedParticipants); loadDerivedParticipants(status, result, natures, sharedParticipants); - for (Iterator i = result.iterator(); i.hasNext(); ) - { - Object o = i.next(); - if (o instanceof XMLComponentRenameParticipant) - { - XMLComponentRenameParticipant p = (XMLComponentRenameParticipant)o; - //getChangeManager() - p.setChangeManager(getChangeManager()); - } - } - - return (RefactoringParticipant[]) result - .toArray(new RefactoringParticipant[result.size()]); + for (Iterator i = result.iterator(); i.hasNext();) { + Object o = i.next(); + if (o instanceof XMLComponentRenameParticipant) { + XMLComponentRenameParticipant p = (XMLComponentRenameParticipant) o; + // getChangeManager() + p.setChangeManager(getChangeManager()); + } + } + + return (RefactoringParticipant[]) result.toArray(new RefactoringParticipant[result.size()]); } - - public void setNewElementName(String newName) - { + + public void setNewElementName(String newName) { Assert.isNotNull(newName); this.newName = newName; } - - public void setUpdateReferences(boolean update) - { + + public void setUpdateReferences(boolean update) { updateReferences = update; - + } - public Change postCreateChange(Change[] participantChanges, IProgressMonitor pm) throws CoreException, OperationCanceledException - { + public Change postCreateChange(Change[] participantChanges, IProgressMonitor pm) throws CoreException, OperationCanceledException { Assert.isNotNull(pm); - try - { + try { String changeName = RefactoringMessages.getString("RenameComponentProcessor.Component_Refactoring_updates"); - TextChange[] changes = changeManager.getAllChanges(); - //System.out.println("all changes(" + getChangeManager() + ")" + changes.length); - //System.out.println("add cus " + changeManager.getAllCompilationUnits().length); - Comparator c = new Comparator() - { - public int compare(Object o1, Object o2) - { - TextFileChange c1 = (TextFileChange)o1; - TextFileChange c2 = (TextFileChange)o2; - return Collator.getInstance().compare(c1.getFile().getFullPath(), c2.getFile().getFullPath()); - } - }; - if(changes.length > 0){ - //Arrays.sort(changes, c); - CompositeChange compositeChange = new CompositeChange("!" + changeName, changes); - compositeChange.markAsSynthetic(); - return compositeChange; + TextChange[] changes = changeManager.getAllChanges(); + // System.out.println("all changes(" + getChangeManager() + ")" + + // changes.length); + // System.out.println("add cus " + + // changeManager.getAllCompilationUnits().length); + Comparator c = new Comparator() { + public int compare(Object o1, Object o2) { + TextFileChange c1 = (TextFileChange) o1; + TextFileChange c2 = (TextFileChange) o2; + return Collator.getInstance().compare(c1.getFile().getFullPath(), c2.getFile().getFullPath()); + } + }; + if (changes.length > 0) { + // Arrays.sort(changes, c); + CompositeChange compositeChange = new CompositeChange("!" + changeName, changes); + compositeChange.markAsSynthetic(); + return compositeChange; } - else{ + else { return null; } - - } finally - { + + } + finally { pm.done(); } } - + } diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/RenameResourceProcessor.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/RenameResourceProcessor.java index a7ee224de3..f0a326e2fe 100644 --- a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/RenameResourceProcessor.java +++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/RenameResourceProcessor.java @@ -13,10 +13,11 @@ package org.eclipse.wst.xsd.ui.internal.refactor.rename; import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import org.eclipse.core.internal.runtime.Assert; + import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.Assert; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.ltk.core.refactoring.Change; diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/RenameTargetNamespaceProcessor.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/RenameTargetNamespaceProcessor.java index abd0195f63..03fe81e2d3 100644 --- a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/RenameTargetNamespaceProcessor.java +++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/RenameTargetNamespaceProcessor.java @@ -16,10 +16,11 @@ import java.net.URL; import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import org.eclipse.core.internal.utils.Assert; + import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IWorkspaceRoot; import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.Assert; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.OperationCanceledException; diff --git a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/XMLComponentRenameParticipant.java b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/XMLComponentRenameParticipant.java index a4d2baa458..cce160c6f9 100644 --- a/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/XMLComponentRenameParticipant.java +++ b/bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/XMLComponentRenameParticipant.java @@ -2,7 +2,8 @@ package org.eclipse.wst.xsd.ui.internal.refactor.rename; import java.util.Iterator; import java.util.List; -import org.eclipse.core.internal.utils.Assert; + +import org.eclipse.core.runtime.Assert; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.OperationCanceledException; |