use of org.eclipse.ltk.core.refactoring.participants.MoveParticipant in project che by eclipse.
the class ResourceModifications method getParticipants.
public RefactoringParticipant[] getParticipants(RefactoringStatus status, RefactoringProcessor processor, String[] natures, SharableParticipants shared) {
List<RefactoringParticipant> result = new ArrayList<RefactoringParticipant>(5);
if (fDelete != null) {
DeleteArguments arguments = new DeleteArguments();
for (Iterator<IResource> 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<IResource> 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 = 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 = 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 = fRenameArguments.get(i);
RenameParticipant[] renames = ParticipantManager.loadRenameParticipants(status, processor, resource, arguments, natures, shared);
result.addAll(Arrays.asList(renames));
}
}
return result.toArray(new RefactoringParticipant[result.size()]);
}
use of org.eclipse.ltk.core.refactoring.participants.MoveParticipant in project che by eclipse.
the class MoveResourcesProcessor 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)
*/
public RefactoringParticipant[] loadParticipants(RefactoringStatus status, SharableParticipants shared) throws CoreException {
String[] affectedNatures = ResourceProcessors.computeAffectedNatures(fResourcesToMove);
List result = new ArrayList();
for (int i = 0; i < fResourcesToMove.length; i++) {
MoveParticipant[] participants = ParticipantManager.loadMoveParticipants(status, this, fResourcesToMove[i], fMoveArguments, null, affectedNatures, shared);
result.addAll(Arrays.asList(participants));
}
return (RefactoringParticipant[]) result.toArray(new RefactoringParticipant[result.size()]);
}
use of org.eclipse.ltk.core.refactoring.participants.MoveParticipant 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()]);
}
Aggregations