org.eclipse.ltk.core.refactoring.participants.RefactoringArguments Java Examples
The following examples show how to use
org.eclipse.ltk.core.refactoring.participants.RefactoringArguments.
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: XtextMoveResourceParticipant.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
@Override public void addElement(Object element, RefactoringArguments arguments) { if (arguments instanceof MoveArguments) { if (element instanceof IResource) { Object destination = ((MoveArguments) arguments).getDestination(); if (destination instanceof IFolder || destination instanceof IProject) { IFile destinationFile = ((IContainer) destination).getFile(new Path(((IResource) element).getName())); processor.addChangedResource(((IResource) element), ((IResource) element).getFullPath(), destinationFile.getFullPath()); } } } }
Example #2
Source File: XtextCopyResourceParticipant.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
@Override public void addElement(Object element, RefactoringArguments arguments) { if (arguments instanceof CopyArguments) { if (element instanceof IResource) { Object destination = ((CopyArguments) arguments).getDestination(); if (destination instanceof IFolder || destination instanceof IProject) { IFile destinationFile = ((IContainer) destination).getFile(new Path(((IResource) element).getName())); processor.addChangedResource(((IResource) element), ((IResource) element).getFullPath(), destinationFile.getFullPath()); } } } }
Example #3
Source File: XtextRenameResourceParticipant.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
@Override public void addElement(Object element, RefactoringArguments arguments) { if (arguments instanceof RenameArguments) { if (element instanceof IResource) { IPath oldPath = ((IResource) element).getFullPath(); IPath newPath = oldPath.removeLastSegments(1).append(((RenameArguments) arguments).getNewName()); processor.addChangedResource(((IResource) element), oldPath, newPath); } } }
Example #4
Source File: RenameModifications.java From eclipse.jdt.ls with Eclipse Public License 2.0 | 5 votes |
private void add(Object element, RefactoringArguments args, IParticipantDescriptorFilter filter) { Assert.isNotNull(element); Assert.isNotNull(args); fRename.add(element); fRenameArguments.add(args); fParticipantDescriptorFilter.add(filter); }
Example #5
Source File: MoveModifications.java From eclipse.jdt.ls with Eclipse Public License 2.0 | 5 votes |
private void add(Object element, RefactoringArguments args, IParticipantDescriptorFilter filter) { Assert.isNotNull(element); Assert.isNotNull(args); fMoves.add(element); fMoveArguments.add(args); fParticipantDescriptorFilter.add(filter); }
Example #6
Source File: CopyModifications.java From eclipse.jdt.ls with Eclipse Public License 2.0 | 5 votes |
private void add(Object element, RefactoringArguments args, IParticipantDescriptorFilter filter) { Assert.isNotNull(element); Assert.isNotNull(args); fCopies.add(element); fCopyArguments.add(args); fParticipantDescriptorFilter.add(filter); }
Example #7
Source File: TypeScriptRenameRefactoring.java From typescript.java with MIT License | 5 votes |
/** * {@inheritDoc} */ public RefactoringStatus initialize(final RefactoringArguments arguments) { Assert.isNotNull(arguments); final RefactoringProcessor processor= getProcessor(); if (processor instanceof IScriptableRefactoring) { return ((IScriptableRefactoring) processor).initialize(arguments); } return RefactoringStatus.createFatalErrorStatus(Messages.format(RefactoringCoreMessages.ProcessorBasedRefactoring_error_unsupported_initialization, getProcessor().getIdentifier())); }
Example #8
Source File: RenameModifications.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
private void add(Object element, RefactoringArguments args, IParticipantDescriptorFilter filter) { Assert.isNotNull(element); Assert.isNotNull(args); fRename.add(element); fRenameArguments.add(args); fParticipantDescriptorFilter.add(filter); }
Example #9
Source File: MoveModifications.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
private void add(Object element, RefactoringArguments args, IParticipantDescriptorFilter filter) { Assert.isNotNull(element); Assert.isNotNull(args); fMoves.add(element); fMoveArguments.add(args); fParticipantDescriptorFilter.add(filter); }
Example #10
Source File: CopyModifications.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
private void add(Object element, RefactoringArguments args, IParticipantDescriptorFilter filter) { Assert.isNotNull(element); Assert.isNotNull(args); fCopies.add(element); fCopyArguments.add(args); fParticipantDescriptorFilter.add(filter); }
Example #11
Source File: NLSAccessorFieldRenameParticipant.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
/** * {@inheritDoc} */ @Override public boolean initialize(RefactoringProcessor processor, Object element, RefactoringArguments arguments) { fNewName= ((RenameArguments) arguments).getNewName(); return super.initialize(processor, element, arguments); }
Example #12
Source File: GWTRefactoringSupportTest.java From gwt-eclipse-plugin with Eclipse Public License 1.0 | 4 votes |
@Override protected void initialize(RefactoringArguments arguments) { }
Example #13
Source File: RenameModifications.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 4 votes |
public RenameModifications() { fRename= new ArrayList<Object>(); fRenameArguments= new ArrayList<RefactoringArguments>(); fParticipantDescriptorFilter= new ArrayList<IParticipantDescriptorFilter>(); }
Example #14
Source File: MoveModifications.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 4 votes |
public MoveModifications() { fMoves= new ArrayList<Object>(); fMoveArguments= new ArrayList<RefactoringArguments>(); fParticipantDescriptorFilter= new ArrayList<IParticipantDescriptorFilter>(); }
Example #15
Source File: CopyModifications.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 4 votes |
public CopyModifications() { fCopies= new ArrayList<Object>(); fCopyArguments= new ArrayList<RefactoringArguments>(); fParticipantDescriptorFilter= new ArrayList<IParticipantDescriptorFilter>(); }