org.eclipse.ltk.core.refactoring.participants.SharableParticipants Java Examples

The following examples show how to use org.eclipse.ltk.core.refactoring.participants.SharableParticipants. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ReorgPolicyFactory.java    From eclipse.jdt.ls with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public final RefactoringParticipant[] loadParticipants(RefactoringStatus status, RefactoringProcessor processor, String[] natures, SharableParticipants shared) throws CoreException {
	RefactoringModifications modifications= getModifications();
	if (modifications != null) {
		return modifications.loadParticipants(status, processor, natures, shared);
	} else {
		return new RefactoringParticipant[0];
	}
}
 
Example #2
Source File: RenameModifications.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public RefactoringParticipant[] loadParticipants(RefactoringStatus status, RefactoringProcessor owner, String[] natures, SharableParticipants shared) {
	List<RefactoringParticipant> result= new ArrayList<RefactoringParticipant>();
	for (int i= 0; i < fRename.size(); i++) {
		result.addAll(Arrays.asList(ParticipantManager.loadRenameParticipants(status,
			owner, fRename.get(i),
			(RenameArguments) fRenameArguments.get(i),
			fParticipantDescriptorFilter.get(i),
			natures, shared)));
	}
	result.addAll(Arrays.asList(getResourceModifications().getParticipants(status, owner, natures, shared)));
	return result.toArray(new RefactoringParticipant[result.size()]);
}
 
Example #3
Source File: DeleteModifications.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public RefactoringParticipant[] loadParticipants(RefactoringStatus status, RefactoringProcessor owner, String[] natures, SharableParticipants shared) {
	List<RefactoringParticipant> result= new ArrayList<RefactoringParticipant>();
	for (Iterator<IJavaElement> iter= fDelete.iterator(); iter.hasNext();) {
		result.addAll(Arrays.asList(ParticipantManager.loadDeleteParticipants(status,
			owner, iter.next(),
			new DeleteArguments(), natures, shared)));
	}
	result.addAll(Arrays.asList(getResourceModifications().getParticipants(status, owner, natures, shared)));
	return result.toArray(new RefactoringParticipant[result.size()]);
}
 
Example #4
Source File: MoveStaticMembersProcessor.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public RefactoringParticipant[] loadParticipants(RefactoringStatus status, SharableParticipants sharedParticipants) throws CoreException {
	List<MoveParticipant> result= new ArrayList<MoveParticipant>();
	MoveArguments args= new MoveArguments(fDestinationType, true);
	String[] natures= JavaProcessors.computeAffectedNaturs(fMembersToMove);
	for (int i= 0; i < fMembersToMove.length; i++) {
		IMember member= fMembersToMove[i];
		result.addAll(Arrays.asList(ParticipantManager.loadMoveParticipants(
			status, this, member, args, natures, sharedParticipants)));
	}
	return result.toArray(new RefactoringParticipant[result.size()]);
}
 
Example #5
Source File: MoveModifications.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public RefactoringParticipant[] loadParticipants(RefactoringStatus status, RefactoringProcessor owner, String[] natures, SharableParticipants shared) {
	List<RefactoringParticipant> result= new ArrayList<RefactoringParticipant>();
	for (int i= 0; i < fMoves.size(); i++) {
		result.addAll(Arrays.asList(ParticipantManager.loadMoveParticipants(status,
			owner, fMoves.get(i),
			(MoveArguments) fMoveArguments.get(i),
			fParticipantDescriptorFilter.get(i),
			natures, shared)));
	}
	result.addAll(Arrays.asList(getResourceModifications().getParticipants(status, owner, natures, shared)));
	return result.toArray(new RefactoringParticipant[result.size()]);
}
 
Example #6
Source File: CopyModifications.java    From eclipse.jdt.ls with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public RefactoringParticipant[] loadParticipants(RefactoringStatus status, RefactoringProcessor owner, String[] natures, SharableParticipants shared) {
	List<RefactoringParticipant> result= new ArrayList<>();
	for (int i= 0; i < fCopies.size(); i++) {
		result.addAll(Arrays.asList(ParticipantManager.loadCopyParticipants(status,
			owner, fCopies.get(i),
			(CopyArguments) fCopyArguments.get(i),
			fParticipantDescriptorFilter.get(i),
			natures, shared)));
	}
	result.addAll(Arrays.asList(getResourceModifications().getParticipants(status, owner, natures, shared)));
	return result.toArray(new RefactoringParticipant[result.size()]);
}
 
Example #7
Source File: ReorgPolicyFactory.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
public final RefactoringParticipant[] loadParticipants(RefactoringStatus status, RefactoringProcessor processor, String[] natures, SharableParticipants shared) throws CoreException {
	RefactoringModifications modifications= getModifications();
	if (modifications != null) {
		return modifications.loadParticipants(status, processor, natures, shared);
	} else {
		return new RefactoringParticipant[0];
	}
}
 
Example #8
Source File: MoveModifications.java    From eclipse.jdt.ls with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public RefactoringParticipant[] loadParticipants(RefactoringStatus status, RefactoringProcessor owner, String[] natures, SharableParticipants shared) {
	List<RefactoringParticipant> result= new ArrayList<>();
	for (int i= 0; i < fMoves.size(); i++) {
		result.addAll(Arrays.asList(ParticipantManager.loadMoveParticipants(status,
			owner, fMoves.get(i),
			(MoveArguments) fMoveArguments.get(i),
			fParticipantDescriptorFilter.get(i),
			natures, shared)));
	}
	result.addAll(Arrays.asList(getResourceModifications().getParticipants(status, owner, natures, shared)));
	return result.toArray(new RefactoringParticipant[result.size()]);
}
 
Example #9
Source File: CopyModifications.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public RefactoringParticipant[] loadParticipants(RefactoringStatus status, RefactoringProcessor owner, String[] natures, SharableParticipants shared) {
	List<RefactoringParticipant> result= new ArrayList<RefactoringParticipant>();
	for (int i= 0; i < fCopies.size(); i++) {
		result.addAll(Arrays.asList(ParticipantManager.loadCopyParticipants(status,
			owner, fCopies.get(i),
			(CopyArguments) fCopyArguments.get(i),
			fParticipantDescriptorFilter.get(i),
			natures, shared)));
	}
	result.addAll(Arrays.asList(getResourceModifications().getParticipants(status, owner, natures, shared)));
	return result.toArray(new RefactoringParticipant[result.size()]);
}
 
Example #10
Source File: RenameModifications.java    From eclipse.jdt.ls with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public RefactoringParticipant[] loadParticipants(RefactoringStatus status, RefactoringProcessor owner, String[] natures, SharableParticipants shared) {
	List<RefactoringParticipant> result= new ArrayList<>();
	for (int i= 0; i < fRename.size(); i++) {
		result.addAll(Arrays.asList(ParticipantManager.loadRenameParticipants(status,
			owner, fRename.get(i),
			(RenameArguments) fRenameArguments.get(i),
			fParticipantDescriptorFilter.get(i),
			natures, shared)));
	}
	result.addAll(Arrays.asList(getResourceModifications().getParticipants(status, owner, natures, shared)));
	return result.toArray(new RefactoringParticipant[result.size()]);
}
 
Example #11
Source File: CompositeRefactoringProcessor.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public RefactoringParticipant[] loadParticipants(final RefactoringStatus status,
		final SharableParticipants sharedParticipants) throws CoreException {
	List<RefactoringParticipant> participants = newArrayList();
	for (RefactoringProcessor processor : processors) {
		for (RefactoringParticipant participant : processor.loadParticipants(status, sharedParticipants)) {
			if (!(participant instanceof JdtRenameParticipant))
				participants.add(participant);
		}
	}
	return toArray(participants, RefactoringParticipant.class);
}
 
Example #12
Source File: CombinedJvmJdtRenameProcessor.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public RefactoringParticipant[] loadParticipants(final RefactoringStatus status,
		final SharableParticipants sharedParticipants) throws CoreException {
	List<RefactoringParticipant> participants = newArrayList(super.loadParticipants(status, sharedParticipants));
	for (JavaRenameProcessor processor : jvmElements2jdtProcessors.values()) {
		for (RefactoringParticipant participant : processor.loadParticipants(status, sharedParticipants)) {
			if(participant instanceof JdtRenameParticipant) {
				((JdtRenameParticipant) participant).disableFor(getElements());
			}
			participants.add(participant);
		}
	}
	return toArray(participants, RefactoringParticipant.class);
}
 
Example #13
Source File: RenameElementProcessor.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public RefactoringParticipant[] loadParticipants(RefactoringStatus status, SharableParticipants sharedParticipants)
		throws CoreException {
	RenameParticipant[] renameParticipants = ParticipantManager.loadRenameParticipants(status, this,
			renameElementContext, new RenameArguments(newName, true),
			new String[] { XtextProjectHelper.NATURE_ID }, sharedParticipants);
	return renameParticipants;
}
 
Example #14
Source File: PyRenameEntryPoint.java    From Pydev with Eclipse Public License 1.0 4 votes vote down vote up
@Override
public RefactoringParticipant[] loadParticipants(RefactoringStatus status, SharableParticipants sharedParticipants)
        throws CoreException {
    return EMPTY_REFACTORING_PARTICIPANTS; // no participants are loaded
}
 
Example #15
Source File: RenameElementProcessor2.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
@Override
public RefactoringParticipant[] loadParticipants(RefactoringStatus status, SharableParticipants sharedParticipants)
		throws CoreException {
	return ParticipantManager.loadRenameParticipants(status, this, renameElementContext, new RenameArguments(newName, true),
			new String[] { XtextProjectHelper.NATURE_ID }, sharedParticipants);
}
 
Example #16
Source File: JavaMoveProcessor.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
@Override
public RefactoringParticipant[] loadParticipants(RefactoringStatus status, SharableParticipants shared) throws CoreException {
	return fMovePolicy.loadParticipants(status, this, getAffectedProjectNatures(), shared);
}
 
Example #17
Source File: JavaCopyProcessor.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
@Override
public RefactoringParticipant[] loadParticipants(RefactoringStatus status, SharableParticipants sharedParticipants) throws CoreException {
	RefactoringParticipant[] result= fCopyPolicy.loadParticipants(status, this, getAffectedProjectNatures(), sharedParticipants);
	fExecutionLog= fCopyPolicy.getReorgExecutionLog();
	return result;
}
 
Example #18
Source File: JavaDeleteProcessor.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
@Override
public RefactoringParticipant[] loadParticipants(RefactoringStatus status, SharableParticipants shared) throws CoreException {
	return fDeleteModifications.loadParticipants(status, this, getAffectedProjectNatures(), shared);
}
 
Example #19
Source File: JavaRenameProcessor.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
@Override
public final RefactoringParticipant[] loadParticipants(RefactoringStatus status, SharableParticipants shared) throws CoreException {
	return fRenameModifications.loadParticipants(status, this, getAffectedProjectNatures(), shared);
}
 
Example #20
Source File: ChangeSignatureProcessor.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
@Override
public RefactoringParticipant[] loadParticipants(RefactoringStatus status, SharableParticipants sharedParticipants) throws CoreException {
	String[] affectedNatures= JavaProcessors.computeAffectedNatures(fMethod);
	return JavaParticipantManager.loadChangeMethodSignatureParticipants(status, this, fMethod, getParticipantArguments(), null, affectedNatures, sharedParticipants);
}
 
Example #21
Source File: ExtractInterfaceProcessor.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
@Override
public final RefactoringParticipant[] loadParticipants(final RefactoringStatus status, final SharableParticipants sharedParticipants) throws CoreException {
	return new RefactoringParticipant[0];
}
 
Example #22
Source File: MoveInstanceMethodProcessor.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
@Override
public final RefactoringParticipant[] loadParticipants(final RefactoringStatus status, final SharableParticipants participants) throws CoreException {
	return new RefactoringParticipant[0];
}
 
Example #23
Source File: UseSuperTypeProcessor.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
@Override
public final RefactoringParticipant[] loadParticipants(final RefactoringStatus status, final SharableParticipants sharedParticipants) throws CoreException {
	return new RefactoringParticipant[0];
}
 
Example #24
Source File: HierarchyProcessor.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
@Override
public RefactoringParticipant[] loadParticipants(final RefactoringStatus status, final SharableParticipants sharedParticipants) throws CoreException {
	return new RefactoringParticipant[0];
}
 
Example #25
Source File: TypeScriptRenameProcessor.java    From typescript.java with MIT License 4 votes vote down vote up
@Override
public RefactoringParticipant[] loadParticipants(RefactoringStatus status, SharableParticipants sharedParticipants)
		throws CoreException {
	return null;
}
 
Example #26
Source File: RenameRefactoringProcessor.java    From xds-ide with Eclipse Public License 1.0 4 votes vote down vote up
@Override
public RefactoringParticipant[] loadParticipants(RefactoringStatus status,
		SharableParticipants sharedParticipants) throws CoreException {
	return new RefactoringParticipant[0];
}
 
Example #27
Source File: JavaMoveProcessor.java    From eclipse.jdt.ls with Eclipse Public License 2.0 4 votes vote down vote up
@Override
public RefactoringParticipant[] loadParticipants(RefactoringStatus status, SharableParticipants shared) throws CoreException {
	return fMovePolicy.loadParticipants(status, this, getAffectedProjectNatures(), shared);
}
 
Example #28
Source File: JavaRenameProcessor.java    From eclipse.jdt.ls with Eclipse Public License 2.0 4 votes vote down vote up
@Override
public final RefactoringParticipant[] loadParticipants(RefactoringStatus status, SharableParticipants shared) throws CoreException {
	return fRenameModifications.loadParticipants(status, this, getAffectedProjectNatures(), shared);
}
 
Example #29
Source File: RefactoringModifications.java    From eclipse.jdt.ls with Eclipse Public License 2.0 votes vote down vote up
public abstract RefactoringParticipant[] loadParticipants(RefactoringStatus status, RefactoringProcessor owner, String[] natures, SharableParticipants shared); 
Example #30
Source File: IReorgPolicy.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 votes vote down vote up
public RefactoringParticipant[] loadParticipants(RefactoringStatus status, RefactoringProcessor processor, String[] natures, SharableParticipants shared) throws CoreException;