use of org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant in project che by eclipse.
the class ResourceModifications method getParticipants.
public RefactoringParticipant[] getParticipants(RefactoringStatus status, RefactoringProcessor processor, String[] natures, SharableParticipants shared) {
List result = new ArrayList(5);
if (fDelete != null) {
DeleteArguments arguments = new DeleteArguments();
for (Iterator iter = fDelete.iterator(); iter.hasNext(); ) {
DeleteParticipant[] deletes = ParticipantManager.loadDeleteParticipants(status, processor, iter.next(), arguments, natures, shared);
result.addAll(Arrays.asList(deletes));
}
}
if (fCreate != null) {
CreateArguments arguments = new CreateArguments();
for (Iterator iter = fCreate.iterator(); iter.hasNext(); ) {
CreateParticipant[] creates = ParticipantManager.loadCreateParticipants(status, processor, iter.next(), arguments, natures, shared);
result.addAll(Arrays.asList(creates));
}
}
if (fMove != null) {
for (int i = 0; i < fMove.size(); i++) {
Object element = fMove.get(i);
MoveArguments arguments = (MoveArguments) fMoveArguments.get(i);
MoveParticipant[] moves = ParticipantManager.loadMoveParticipants(status, processor, element, arguments, natures, shared);
result.addAll(Arrays.asList(moves));
}
}
if (fCopy != null) {
for (int i = 0; i < fCopy.size(); i++) {
Object element = fCopy.get(i);
CopyArguments arguments = (CopyArguments) fCopyArguments.get(i);
CopyParticipant[] copies = ParticipantManager.loadCopyParticipants(status, processor, element, arguments, natures, shared);
result.addAll(Arrays.asList(copies));
}
}
if (fRename != null) {
for (int i = 0; i < fRename.size(); i++) {
Object resource = fRename.get(i);
RenameArguments arguments = (RenameArguments) fRenameArguments.get(i);
RenameParticipant[] renames = ParticipantManager.loadRenameParticipants(status, processor, resource, arguments, natures, shared);
result.addAll(Arrays.asList(renames));
}
}
return (RefactoringParticipant[]) result.toArray(new RefactoringParticipant[result.size()]);
}
use of org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant in project webtools.sourceediting by eclipse.
the class RenameResourceProcessor method loadParticipants.
public RefactoringParticipant[] loadParticipants(RefactoringStatus status, SharableParticipants shared) throws CoreException {
Object[] elements = getElements();
String[] natures = getAffectedProjectNatures();
List result = new ArrayList();
RenameArguments arguments = new RenameArguments(getNewElementName(), getUpdateReferences());
for (int i = 0; i < elements.length; i++) {
result.addAll(Arrays.asList(ParticipantManager.loadRenameParticipants(status, this, elements[i], arguments, natures, shared)));
}
return (RefactoringParticipant[]) result.toArray(new RefactoringParticipant[result.size()]);
}
use of org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant in project webtools.sourceediting by eclipse.
the class RenameComponentProcessor method loadParticipants.
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);
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()]);
}
use of org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant in project jbosstools-hibernate by jbosstools.
the class ConsoleConfigurationRenameProcessor method loadParticipants.
/* (non-Javadoc)
* @see org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor#loadParticipants(org.eclipse.ltk.core.refactoring.RefactoringStatus, org.eclipse.ltk.core.refactoring.participants.SharableParticipants)
*/
@Override
public RefactoringParticipant[] loadParticipants(RefactoringStatus status, SharableParticipants sharedParticipants) throws CoreException {
List<RefactoringParticipant> participants = new ArrayList<RefactoringParticipant>();
participants.addAll(Arrays.asList(ParticipantManager.loadRenameParticipants(status, this, config, new RenameArguments(newName, true), new String[0], sharedParticipants)));
return (RefactoringParticipant[]) participants.toArray(new RefactoringParticipant[participants.size()]);
}
Aggregations