public static ReorgTypedSourcePasteStarter create(TypedSource[] typedSources, IJavaElement destination) { Assert.isNotNull(typedSources); Assert.isNotNull(destination); PasteTypedSourcesRefactoring pasteRefactoring= PasteTypedSourcesRefactoring.create(typedSources); if (pasteRefactoring == null) return null; if (! pasteRefactoring.setDestination(destination).isOK()) return null; return new ReorgTypedSourcePasteStarter(pasteRefactoring); }
public static ReorgTypedSourcePasteStarter create(TypedSource[] typedSources, IJavaElement destination) { Assert.isNotNull(typedSources); Assert.isNotNull(destination); PasteTypedSourcesRefactoring pasteRefactoring= PasteTypedSourcesRefactoring.create(typedSources); if (pasteRefactoring == null) return null; if (! pasteRefactoring.setDestination(destination).isOK()) return null; return new ReorgTypedSourcePasteStarter(pasteRefactoring); }
@Override public boolean canPasteOn(IJavaElement[] selectedJavaElements, IResource[] selectedResources, IWorkingSet[] selectedWorkingSets, List<?> selectedElements) throws JavaModelException { if (selectedResources.length != 0 || selectedWorkingSets.length != 0) return false; TypedSource[] typedSources= getClipboardTypedSources(fAvailableTypes); Object destination= getTarget(selectedJavaElements, selectedResources); if (destination instanceof IJavaElement) return ReorgTypedSourcePasteStarter.create(typedSources, (IJavaElement)destination) != null; return false; }
@Override public void paste(IJavaElement[] selectedJavaElements, IResource[] selectedResources, IWorkingSet[] selectedWorkingSets, TransferData[] availableTypes) throws JavaModelException, InterruptedException, InvocationTargetException { TypedSource[] typedSources= getClipboardTypedSources(availableTypes); IJavaElement destination= getTarget(selectedJavaElements, selectedResources); ReorgTypedSourcePasteStarter.create(typedSources, destination).run(getShell()); }
public static ReorgTypedSourcePasteStarter create(TypedSource[] typedSources, IJavaElement destination) { Assert.isNotNull(typedSources); Assert.isNotNull(destination); PasteTypedSourcesRefactoring pasteRefactoring= PasteTypedSourcesRefactoring.create(typedSources); if (pasteRefactoring == null) return null; if (! pasteRefactoring.setDestination(destination).isOK()) return null; return new ReorgTypedSourcePasteStarter(pasteRefactoring); }
@Override public boolean canPasteOn(IJavaElement[] selectedJavaElements, IResource[] selectedResources, IWorkingSet[] selectedWorkingSets, List<?> selectedElements) throws JavaModelException { if (selectedResources.length != 0 || selectedWorkingSets.length != 0) return false; TypedSource[] typedSources= getClipboardTypedSources(fAvailableTypes); Object destination= getTarget(selectedJavaElements, selectedResources); if (destination instanceof IJavaElement) return ReorgTypedSourcePasteStarter.create(typedSources, (IJavaElement)destination) != null; return false; }
public boolean canPasteOn(IJavaElement[] selectedJavaElements, IResource[] selectedResources, IWorkingSet[] selectedWorkingSets) throws JavaModelException { if (selectedResources.length != 0 || selectedWorkingSets.length != 0) return false; TypedSource[] typedSources= getClipboardTypedSources(fAvailableTypes); Object destination= getTarget(selectedJavaElements, selectedResources); if (destination instanceof IJavaElement) return ReorgTypedSourcePasteStarter.create(typedSources, (IJavaElement)destination) != null; return false; }
@Override public void paste(IJavaElement[] selectedJavaElements, IResource[] selectedResources, IWorkingSet[] selectedWorkingSets, TransferData[] availableTypes) throws JavaModelException, InterruptedException, InvocationTargetException { TypedSource[] typedSources= getClipboardTypedSources(availableTypes); IJavaElement destination= getTarget(selectedJavaElements, selectedResources); ReorgTypedSourcePasteStarter.create(typedSources, destination).run(getShell()); }
public void paste(IJavaElement[] selectedJavaElements, IResource[] selectedResources, IWorkingSet[] selectedWorkingSets, TransferData[] availableTypes) throws JavaModelException, InterruptedException, InvocationTargetException { TypedSource[] typedSources= getClipboardTypedSources(availableTypes); IJavaElement destination= getTarget(selectedJavaElements, selectedResources); ReorgTypedSourcePasteStarter.create(typedSources, destination).run(getShell()); }