aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Wenig2014-03-28 18:03:13 (EDT)
committerLars Vogel2014-03-31 06:03:33 (EDT)
commit8d228ae3f0605c73a7503666d07fba3bb37936f3 (patch)
tree8e66c167c39eb62d6905da9d166ecee88a8d1c15
parenta8d443f68d0a87ac1d5922ce76d86bf8d99165f4 (diff)
downloadeclipse.platform.ui-8d228ae3f0605c73a7503666d07fba3bb37936f3.zip
eclipse.platform.ui-8d228ae3f0605c73a7503666d07fba3bb37936f3.tar.gz
eclipse.platform.ui-8d228ae3f0605c73a7503666d07fba3bb37936f3.tar.bz2
Bug 431542 - org.eclipse.ui.navigator @Override is missingrefs/changes/24/24124/2
Change-Id: I268ba78f226d3e124211f840b46d5b2009200e64 Signed-off-by: Philip Wenig <philip.wenig@gmx.net>
-rwxr-xr-xbundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/ResourceToItemsMapper.java6
-rw-r--r--bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/CopyAction.java6
-rw-r--r--bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/EditActionGroup.java5
-rw-r--r--bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/EditActionProvider.java6
-rwxr-xr-xbundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/GotoActionProvider.java2
-rwxr-xr-xbundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/GotoResourceAction.java1
-rw-r--r--bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/NewActionProvider.java3
-rw-r--r--bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/OpenActionProvider.java3
-rw-r--r--bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/OpenFolderAsProjectAction.java1
-rw-r--r--bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/PasteAction.java9
-rw-r--r--bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/PortingActionProvider.java3
-rw-r--r--bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/PropertiesActionProvider.java10
-rw-r--r--bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/RefactorActionGroup.java4
-rw-r--r--bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/RefactorActionProvider.java6
-rw-r--r--bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/ResourceMgmtActionProvider.java8
-rw-r--r--bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/UndoRedoActionProvider.java6
-rw-r--r--bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/WorkManagementActionProvider.java4
-rw-r--r--bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/WorkingSetActionProvider.java10
-rw-r--r--bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/WorkingSetRootModeActionGroup.java5
-rw-r--r--bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/ResourceExtensionContentProvider.java8
-rw-r--r--bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/ResourceExtensionLabelProvider.java4
-rw-r--r--bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/ResourceExtensionSorter.java3
-rw-r--r--bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/ResourceLinkHelper.java2
-rw-r--r--bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/TabbedPropertySheetAdapterFactory.java6
-rw-r--r--bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/TabbedPropertySheetProjectExplorerContributor.java1
-rw-r--r--bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/TabbedPropertySheetTitleProvider.java2
-rw-r--r--bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/workingsets/WorkingSetSorter.java1
-rw-r--r--bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/workingsets/WorkingSetsContentProvider.java10
-rw-r--r--bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/workingsets/WorkingSetsLabelProvider.java6
-rw-r--r--bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/GoIntoActionProvider.java5
-rw-r--r--bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/ProjectExplorer.java8
-rw-r--r--bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/ResourceDragAdapterAssistant.java2
-rw-r--r--bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/ResourceDropAdapterAssistant.java9
33 files changed, 157 insertions, 8 deletions
diff --git a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/ResourceToItemsMapper.java b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/ResourceToItemsMapper.java
index f7daeda..0779133 100755
--- a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/ResourceToItemsMapper.java
+++ b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/ResourceToItemsMapper.java
@@ -49,6 +49,7 @@ public class ResourceToItemsMapper implements ICommonViewerMapper {
viewer.setMapper(this);
}
+ @Override
public void addToMap(Object element, Item item) {
IResource resource = getCorrespondingResource(element);
if (resource != null) {
@@ -72,6 +73,7 @@ public class ResourceToItemsMapper implements ICommonViewerMapper {
}
}
+ @Override
public void removeFromMap(Object element, Item item) {
IResource resource = getCorrespondingResource(element);
if (resource != null) {
@@ -92,10 +94,12 @@ public class ResourceToItemsMapper implements ICommonViewerMapper {
}
}
+ @Override
public void clearMap() {
_resourceToItem.clear();
}
+ @Override
public boolean isEmpty() {
return _resourceToItem.isEmpty();
}
@@ -113,6 +117,7 @@ public class ResourceToItemsMapper implements ICommonViewerMapper {
}
}
+ @Override
public boolean handlesObject(Object object) {
return object instanceof IResource;
}
@@ -124,6 +129,7 @@ public class ResourceToItemsMapper implements ICommonViewerMapper {
* @param changedResource
* Changed resource
*/
+ @Override
public void objectChanged(Object changedResource) {
Object obj = _resourceToItem.get(changedResource);
if (obj == null) {
diff --git a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/CopyAction.java b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/CopyAction.java
index 894a2cb..9cced43 100644
--- a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/CopyAction.java
+++ b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/CopyAction.java
@@ -97,7 +97,8 @@ import org.eclipse.ui.part.ResourceTransfer;
* on <code>IAction</code> copies the selected resources to the
* clipboard.
*/
- public void run() {
+ @Override
+ public void run() {
List<IResource> selectedResources = getSelectedResources();
IResource[] resources =selectedResources
.toArray(new IResource[selectedResources.size()]);
@@ -176,7 +177,8 @@ import org.eclipse.ui.part.ResourceTransfer;
* <code>SelectionListenerAction</code> method enables this action if
* one or more resources of compatible types are selected.
*/
- protected boolean updateSelection(IStructuredSelection selection) {
+ @Override
+ protected boolean updateSelection(IStructuredSelection selection) {
if (!super.updateSelection(selection)) {
return false;
}
diff --git a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/EditActionGroup.java b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/EditActionGroup.java
index 7216f96..9588f1d 100644
--- a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/EditActionGroup.java
+++ b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/EditActionGroup.java
@@ -56,6 +56,7 @@ public class EditActionGroup extends ActionGroup {
makeActions();
}
+ @Override
public void dispose() {
if (clipboard != null) {
clipboard.dispose();
@@ -64,6 +65,7 @@ public class EditActionGroup extends ActionGroup {
super.dispose();
}
+ @Override
public void fillContextMenu(IMenuManager menu) {
IStructuredSelection selection = (IStructuredSelection) getContext().getSelection();
@@ -83,6 +85,7 @@ public class EditActionGroup extends ActionGroup {
}
}
+ @Override
public void fillActionBars(IActionBars actionBars) {
if (textActionHandler == null) {
@@ -130,6 +133,7 @@ public class EditActionGroup extends ActionGroup {
copyAction.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_COPY);
IShellProvider sp = new IShellProvider() {
+ @Override
public Shell getShell() {
return shell;
}
@@ -141,6 +145,7 @@ public class EditActionGroup extends ActionGroup {
deleteAction.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_DELETE);
}
+ @Override
public void updateActionBars() {
IStructuredSelection selection = (IStructuredSelection) getContext().getSelection();
diff --git a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/EditActionProvider.java b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/EditActionProvider.java
index 8d58dba..69b60cd 100644
--- a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/EditActionProvider.java
+++ b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/EditActionProvider.java
@@ -32,28 +32,34 @@ public class EditActionProvider extends CommonActionProvider {
*
* @see org.eclipse.ui.navigator.CommonActionProvider#init(org.eclipse.ui.navigator.ICommonActionExtensionSite)
*/
+ @Override
public void init(ICommonActionExtensionSite anActionSite) {
site = anActionSite;
editGroup = new EditActionGroup(site.getViewSite().getShell());
}
+ @Override
public void dispose() {
editGroup.dispose();
}
+ @Override
public void fillActionBars(IActionBars actionBars) {
editGroup.fillActionBars(actionBars);
}
+ @Override
public void fillContextMenu(IMenuManager menu) {
editGroup.fillContextMenu(menu);
}
+ @Override
public void setContext(ActionContext context) {
editGroup.setContext(context);
}
+ @Override
public void updateActionBars() {
editGroup.updateActionBars();
}
diff --git a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/GotoActionProvider.java b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/GotoActionProvider.java
index 28c80cc..6adb492 100755
--- a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/GotoActionProvider.java
+++ b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/GotoActionProvider.java
@@ -32,11 +32,13 @@ public class GotoActionProvider extends CommonActionProvider {
*
* @see org.eclipse.ui.navigator.CommonActionProvider#init(org.eclipse.ui.navigator.ICommonActionExtensionSite)
*/
+ @Override
public void init(ICommonActionExtensionSite anActionSite) {
gotoAction = new GotoResourceAction(anActionSite.getViewSite().getShell(), (CommonViewer)anActionSite.getStructuredViewer());
}
+ @Override
public void fillActionBars(IActionBars actionBars) {
actionBars.setGlobalActionHandler(
IWorkbenchActionConstants.GO_TO_RESOURCE, gotoAction);
diff --git a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/GotoResourceAction.java b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/GotoResourceAction.java
index 87fb857..d635f02 100755
--- a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/GotoResourceAction.java
+++ b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/GotoResourceAction.java
@@ -44,6 +44,7 @@ public class GotoResourceAction extends Action {
* Collect all resources in the workbench open a dialog asking the user to
* select a resource and change the selection in the navigator.
*/
+ @Override
public void run() {
GotoResourceDialog dialog = new GotoResourceDialog(shell,
ResourcesPlugin.getWorkspace().getRoot(), IResource.FILE
diff --git a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/NewActionProvider.java b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/NewActionProvider.java
index aa40f4a..5fcd191 100644
--- a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/NewActionProvider.java
+++ b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/NewActionProvider.java
@@ -64,6 +64,7 @@ public class NewActionProvider extends CommonActionProvider {
private boolean contribute = false;
+ @Override
public void init(ICommonActionExtensionSite anExtensionSite) {
if (anExtensionSite.getViewSite() instanceof ICommonViewerWorkbenchSite) {
@@ -92,6 +93,7 @@ public class NewActionProvider extends CommonActionProvider {
* <li>a generic "Other" new wizard shortcut action</li>
* </ul>
*/
+ @Override
public void fillContextMenu(IMenuManager menu) {
IMenuManager submenu = new MenuManager(
WorkbenchNavigatorMessages.NewActionProvider_NewMenu_label,
@@ -138,6 +140,7 @@ public class NewActionProvider extends CommonActionProvider {
/* (non-Javadoc)
* @see org.eclipse.ui.actions.ActionGroup#dispose()
*/
+ @Override
public void dispose() {
if (showDlgAction!=null) {
showDlgAction.dispose();
diff --git a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/OpenActionProvider.java b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/OpenActionProvider.java
index ad83bcf..cdef521 100644
--- a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/OpenActionProvider.java
+++ b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/OpenActionProvider.java
@@ -45,6 +45,7 @@ public class OpenActionProvider extends CommonActionProvider {
private boolean contribute = false;
+ @Override
public void init(ICommonActionExtensionSite aConfig) {
if (aConfig.getViewSite() instanceof ICommonViewerWorkbenchSite) {
viewSite = (ICommonViewerWorkbenchSite) aConfig.getViewSite();
@@ -53,6 +54,7 @@ public class OpenActionProvider extends CommonActionProvider {
}
}
+ @Override
public void fillContextMenu(IMenuManager aMenu) {
if (!contribute || getContext().getSelection().isEmpty()) {
return;
@@ -68,6 +70,7 @@ public class OpenActionProvider extends CommonActionProvider {
addOpenWithMenu(aMenu);
}
+ @Override
public void fillActionBars(IActionBars theActionBars) {
if (!contribute) {
return;
diff --git a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/OpenFolderAsProjectAction.java b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/OpenFolderAsProjectAction.java
index 40e5306..318e31a 100644
--- a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/OpenFolderAsProjectAction.java
+++ b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/OpenFolderAsProjectAction.java
@@ -50,6 +50,7 @@ public class OpenFolderAsProjectAction extends Action {
setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(SharedImages.IMG_OBJ_PROJECT));
}
+ @Override
public void run() {
try {
IProjectDescription desc = new ProjectDescriptionReader().read(folder.getLocation().append(IProjectDescription.DESCRIPTION_FILE_NAME));
diff --git a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/PasteAction.java b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/PasteAction.java
index aef8259..5f31565 100644
--- a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/PasteAction.java
+++ b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/PasteAction.java
@@ -114,7 +114,8 @@ import org.eclipse.ui.internal.navigator.resources.plugin.WorkbenchNavigatorMess
/**
* Implementation of method defined on <code>IAction</code>.
*/
- public void run() {
+ @Override
+ public void run() {
// try a resource transfer
ResourceTransfer resTransfer = ResourceTransfer.getInstance();
IResource[] resourceData = (IResource[]) clipboard
@@ -175,14 +176,16 @@ import org.eclipse.ui.internal.navigator.resources.plugin.WorkbenchNavigatorMess
* -Files and folders may be pasted to a single selected folder in open
* project or multiple selected files in the same folder
*/
- protected boolean updateSelection(IStructuredSelection selection) {
+ @Override
+ protected boolean updateSelection(IStructuredSelection selection) {
if (!super.updateSelection(selection)) {
return false;
}
final IResource[][] clipboardData = new IResource[1][];
shell.getDisplay().syncExec(new Runnable() {
- public void run() {
+ @Override
+ public void run() {
// clipboard must have resources or files
ResourceTransfer resTransfer = ResourceTransfer.getInstance();
clipboardData[0] = (IResource[]) clipboard
diff --git a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/PortingActionProvider.java b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/PortingActionProvider.java
index b6bd89b..e7fe5fe 100644
--- a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/PortingActionProvider.java
+++ b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/PortingActionProvider.java
@@ -70,6 +70,7 @@ public class PortingActionProvider extends CommonActionProvider {
private boolean contribute= false;
+ @Override
public void init(ICommonActionExtensionSite anExtensionSite) {
Assert.isTrue(!disposed);
@@ -93,6 +94,7 @@ public class PortingActionProvider extends CommonActionProvider {
/**
* Extends the superclass implementation to dispose the subgroups.
*/
+ @Override
public void dispose() {
if(!contribute) {
return;
@@ -104,6 +106,7 @@ public class PortingActionProvider extends CommonActionProvider {
disposed = true;
}
+ @Override
public void fillContextMenu(IMenuManager aMenu) {
if(!contribute) {
return;
diff --git a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/PropertiesActionProvider.java b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/PropertiesActionProvider.java
index c0295d6..d132ac7 100644
--- a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/PropertiesActionProvider.java
+++ b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/PropertiesActionProvider.java
@@ -40,10 +40,12 @@ public class PropertiesActionProvider extends CommonActionProvider {
private PropertyDialogAction propertiesAction;
private ISelectionProvider delegateSelectionProvider;
+ @Override
public void init(final ICommonActionExtensionSite aSite) {
delegateSelectionProvider = new DelegateSelectionProvider( aSite.getViewSite().getSelectionProvider());
propertiesAction = new PropertyDialogAction(new IShellProvider() {
+ @Override
public Shell getShell() {
return aSite.getViewSite().getShell();
}
@@ -56,6 +58,7 @@ public class PropertiesActionProvider extends CommonActionProvider {
*
* @see org.eclipse.ui.actions.ActionGroup#fillContextMenu(org.eclipse.jface.action.IMenuManager)
*/
+ @Override
public void fillContextMenu(IMenuManager menu) {
super.fillContextMenu(menu);
@@ -73,6 +76,7 @@ public class PropertiesActionProvider extends CommonActionProvider {
* org.eclipse.ui.actions.ActionGroup#fillActionBars(org.eclipse.ui.IActionBars
* )
*/
+ @Override
public void fillActionBars(IActionBars actionBars) {
super.fillActionBars(actionBars);
@@ -85,6 +89,7 @@ public class PropertiesActionProvider extends CommonActionProvider {
*
* @see org.eclipse.ui.actions.ActionGroup#setContext(org.eclipse.ui.actions.ActionContext)
*/
+ @Override
public void setContext(ActionContext context) {
super.setContext(context);
@@ -106,6 +111,7 @@ public class PropertiesActionProvider extends CommonActionProvider {
*
* @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
*/
+ @Override
public Object getAdapter(Class adapter) {
if (adapter.isInstance(delegate) || delegate == null) {
return delegate;
@@ -127,6 +133,7 @@ public class PropertiesActionProvider extends CommonActionProvider {
*
* @see org.eclipse.jface.viewers.ISelectionProvider#addSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)
*/
+ @Override
public void addSelectionChangedListener(
ISelectionChangedListener listener) {
delegate.addSelectionChangedListener(listener);
@@ -138,6 +145,7 @@ public class PropertiesActionProvider extends CommonActionProvider {
*
* @see org.eclipse.jface.viewers.ISelectionProvider#getSelection()
*/
+ @Override
public ISelection getSelection() {
if (delegate.getSelection() instanceof IStructuredSelection) {
IStructuredSelection sSel = (IStructuredSelection) delegate
@@ -157,6 +165,7 @@ public class PropertiesActionProvider extends CommonActionProvider {
*
* @see org.eclipse.jface.viewers.ISelectionProvider#removeSelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener)
*/
+ @Override
public void removeSelectionChangedListener(
ISelectionChangedListener listener) {
delegate.removeSelectionChangedListener(listener);
@@ -168,6 +177,7 @@ public class PropertiesActionProvider extends CommonActionProvider {
*
* @see org.eclipse.jface.viewers.ISelectionProvider#setSelection(org.eclipse.jface.viewers.ISelection)
*/
+ @Override
public void setSelection(ISelection selection) {
delegate.setSelection(selection);
diff --git a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/RefactorActionGroup.java b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/RefactorActionGroup.java
index c00a61f..c952ca6 100644
--- a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/RefactorActionGroup.java
+++ b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/RefactorActionGroup.java
@@ -55,6 +55,7 @@ public class RefactorActionGroup extends ActionGroup {
makeActions();
}
+ @Override
public void fillContextMenu(IMenuManager menu) {
IStructuredSelection selection = (IStructuredSelection) getContext().getSelection();
@@ -69,6 +70,7 @@ public class RefactorActionGroup extends ActionGroup {
}
}
+ @Override
public void fillActionBars(IActionBars actionBars) {
// renameAction.setTextActionHandler(textActionHandler);
@@ -98,6 +100,7 @@ public class RefactorActionGroup extends ActionGroup {
protected void makeActions() {
IShellProvider sp = new IShellProvider() {
+ @Override
public Shell getShell() {
return shell;
}
@@ -110,6 +113,7 @@ public class RefactorActionGroup extends ActionGroup {
renameAction.setActionDefinitionId(IWorkbenchCommandConstants.FILE_RENAME);
}
+ @Override
public void updateActionBars() {
IStructuredSelection selection = (IStructuredSelection) getContext().getSelection();
diff --git a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/RefactorActionProvider.java b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/RefactorActionProvider.java
index 2662ffe..c49fb76 100644
--- a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/RefactorActionProvider.java
+++ b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/RefactorActionProvider.java
@@ -33,26 +33,32 @@ public class RefactorActionProvider extends CommonActionProvider {
*
* @see org.eclipse.ui.navigator.CommonActionProvider#init(org.eclipse.ui.navigator.ICommonActionExtensionSite)
*/
+ @Override
public void init(ICommonActionExtensionSite anActionSite) {
refactorGroup = new RefactorActionGroup(anActionSite.getViewSite().getShell(), (Tree)anActionSite.getStructuredViewer().getControl());
}
+ @Override
public void dispose() {
refactorGroup.dispose();
}
+ @Override
public void fillActionBars(IActionBars actionBars) {
refactorGroup.fillActionBars(actionBars);
}
+ @Override
public void fillContextMenu(IMenuManager menu) {
refactorGroup.fillContextMenu(menu);
}
+ @Override
public void setContext(ActionContext context) {
refactorGroup.setContext(context);
}
+ @Override
public void updateActionBars() {
refactorGroup.updateActionBars();
}
diff --git a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/ResourceMgmtActionProvider.java b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/ResourceMgmtActionProvider.java
index a71567a..d52a8b4 100644
--- a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/ResourceMgmtActionProvider.java
+++ b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/ResourceMgmtActionProvider.java
@@ -79,12 +79,14 @@ public class ResourceMgmtActionProvider extends CommonActionProvider {
* org.eclipse.ui.navigator.CommonActionProvider#init(org.eclipse.ui.navigator
* .ICommonActionExtensionSite)
*/
+ @Override
public void init(ICommonActionExtensionSite aSite) {
super.init(aSite);
shell = aSite.getViewSite().getShell();
makeActions();
}
+ @Override
public void fillActionBars(IActionBars actionBars) {
actionBars.setGlobalActionHandler(ActionFactory.REFRESH.getId(), refreshAction);
actionBars.setGlobalActionHandler(IDEActionFactory.BUILD_PROJECT.getId(), buildAction);
@@ -114,6 +116,7 @@ public class ResourceMgmtActionProvider extends CommonActionProvider {
* @param menu
* context menu to add actions to
*/
+ @Override
public void fillContextMenu(IMenuManager menu) {
IStructuredSelection selection = (IStructuredSelection) getContext().getSelection();
boolean isProjectSelection = true;
@@ -191,6 +194,7 @@ public class ResourceMgmtActionProvider extends CommonActionProvider {
protected void makeActions() {
IShellProvider sp = new IShellProvider() {
+ @Override
public Shell getShell() {
return shell;
}
@@ -203,17 +207,20 @@ public class ResourceMgmtActionProvider extends CommonActionProvider {
closeUnrelatedProjectsAction = new CloseUnrelatedProjectsAction(sp);
refreshAction = new RefreshAction(sp) {
+ @Override
public void run() {
final IStatus[] errorStatus = new IStatus[1];
errorStatus[0] = Status.OK_STATUS;
final WorkspaceModifyOperation op = (WorkspaceModifyOperation) createOperation(errorStatus);
WorkspaceJob job = new WorkspaceJob("refresh") { //$NON-NLS-1$
+ @Override
public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException {
try {
op.run(monitor);
if (shell != null && !shell.isDisposed()) {
shell.getDisplay().asyncExec(new Runnable() {
+ @Override
public void run() {
StructuredViewer viewer = getActionSite().getStructuredViewer();
if (viewer != null && viewer.getControl() != null && !viewer.getControl().isDisposed()) {
@@ -256,6 +263,7 @@ public class ResourceMgmtActionProvider extends CommonActionProvider {
}
+ @Override
public void updateActionBars() {
IStructuredSelection selection = (IStructuredSelection) getContext().getSelection();
refreshAction.selectionChanged(selection);
diff --git a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/UndoRedoActionProvider.java b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/UndoRedoActionProvider.java
index ea15c80..2d9a6fb 100644
--- a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/UndoRedoActionProvider.java
+++ b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/UndoRedoActionProvider.java
@@ -37,6 +37,7 @@ public class UndoRedoActionProvider extends CommonActionProvider {
*
* @see org.eclipse.ui.navigator.CommonActionProvider#init(org.eclipse.ui.navigator.ICommonActionExtensionSite)
*/
+ @Override
public void init(ICommonActionExtensionSite anActionSite) {
IUndoContext workspaceContext = (IUndoContext) ResourcesPlugin
.getWorkspace().getAdapter(IUndoContext.class);
@@ -44,22 +45,27 @@ public class UndoRedoActionProvider extends CommonActionProvider {
workspaceContext, true);
}
+ @Override
public void dispose() {
undoRedoGroup.dispose();
}
+ @Override
public void fillActionBars(IActionBars actionBars) {
undoRedoGroup.fillActionBars(actionBars);
}
+ @Override
public void fillContextMenu(IMenuManager menu) {
undoRedoGroup.fillContextMenu(menu);
}
+ @Override
public void setContext(ActionContext context) {
undoRedoGroup.setContext(context);
}
+ @Override
public void updateActionBars() {
undoRedoGroup.updateActionBars();
}
diff --git a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/WorkManagementActionProvider.java b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/WorkManagementActionProvider.java
index 5eaa640..7ffdc6d 100644
--- a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/WorkManagementActionProvider.java
+++ b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/WorkManagementActionProvider.java
@@ -34,9 +34,11 @@ public class WorkManagementActionProvider extends CommonActionProvider {
private AddBookmarkAction addBookmarkAction;
+ @Override
public void init(ICommonActionExtensionSite aSite) {
final Shell shell = aSite.getViewSite().getShell();
IShellProvider sp = new IShellProvider() {
+ @Override
public Shell getShell() {
return shell;
}
@@ -52,6 +54,7 @@ public class WorkManagementActionProvider extends CommonActionProvider {
* org.eclipse.ui.actions.ActionGroup#fillActionBars(org.eclipse.ui.IActionBars
* )
*/
+ @Override
public void fillActionBars(IActionBars actionBars) {
super.fillActionBars(actionBars);
actionBars.setGlobalActionHandler(IDEActionFactory.BOOKMARK.getId(), addBookmarkAction);
@@ -65,6 +68,7 @@ public class WorkManagementActionProvider extends CommonActionProvider {
* org.eclipse.ui.actions.ActionGroup#setContext(org.eclipse.ui.actions.
* ActionContext)
*/
+ @Override
public void setContext(ActionContext context) {
super.setContext(context);
if (context != null && context.getSelection() instanceof IStructuredSelection) {
diff --git a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/WorkingSetActionProvider.java b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/WorkingSetActionProvider.java
index 27604b9..f9e7632 100644
--- a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/WorkingSetActionProvider.java
+++ b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/WorkingSetActionProvider.java
@@ -79,6 +79,7 @@ public class WorkingSetActionProvider extends CommonActionProvider {
private boolean listening = false;
+ @Override
public void propertyChange(PropertyChangeEvent event) {
String property = event.getProperty();
Object newValue = event.getNewValue();
@@ -138,6 +139,7 @@ public class WorkingSetActionProvider extends CommonActionProvider {
}
private IPropertyChangeListener filterChangeListener = new IPropertyChangeListener() {
+ @Override
public void propertyChange(PropertyChangeEvent event) {
if (ignoreFilterChangeEvents)
@@ -179,6 +181,7 @@ public class WorkingSetActionProvider extends CommonActionProvider {
private IWorkingSet savedWorkingSet;
+ @Override
public void onExtensionActivation(String aViewerId, String[] theNavigatorExtensionIds, boolean isActive) {
for (int i = 0; i < theNavigatorExtensionIds.length; i++) {
@@ -208,6 +211,7 @@ public class WorkingSetActionProvider extends CommonActionProvider {
};
+ @Override
public void init(ICommonActionExtensionSite aSite) {
viewer = (CommonViewer) aSite.getStructuredViewer();
contentService = aSite.getContentService();
@@ -219,6 +223,7 @@ public class WorkingSetActionProvider extends CommonActionProvider {
workingSetRootModeActionGroup = new WorkingSetRootModeActionGroup(viewer, extensionStateModel);
topLevelModeListener = new IPropertyChangeListener() {
+ @Override
public void propertyChange(PropertyChangeEvent event) {
setWorkingSet(workingSet);
viewer.getFrameList().reset();
@@ -321,11 +326,13 @@ public class WorkingSetActionProvider extends CommonActionProvider {
}
}
+ @Override
public void restoreState(final IMemento aMemento) {
super.restoreState(aMemento);
// Need to run this async to avoid being reentered when processing a selection change
viewer.getControl().getShell().getDisplay().asyncExec(new Runnable() {
+ @Override
public void run() {
boolean showWorkingSets = true;
if (aMemento != null) {
@@ -349,6 +356,7 @@ public class WorkingSetActionProvider extends CommonActionProvider {
});
}
+ @Override
public void saveState(IMemento aMemento) {
super.saveState(aMemento);
@@ -364,6 +372,7 @@ public class WorkingSetActionProvider extends CommonActionProvider {
}
+ @Override
public void fillActionBars(IActionBars actionBars) {
if (!contributedToViewMenu) {
try {
@@ -378,6 +387,7 @@ public class WorkingSetActionProvider extends CommonActionProvider {
}
}
+ @Override
public void dispose() {
super.dispose();
workingSetActionGroup.dispose();
diff --git a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/WorkingSetRootModeActionGroup.java b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/WorkingSetRootModeActionGroup.java
index ef8ec33..4b5d825 100644
--- a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/WorkingSetRootModeActionGroup.java
+++ b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/WorkingSetRootModeActionGroup.java
@@ -76,6 +76,7 @@ public class WorkingSetRootModeActionGroup extends ActionGroup {
/*
* @see org.eclipse.jface.action.IAction#run()
*/
+ @Override
public void run() {
if (stateModel
.getBooleanProperty(WorkingSetsContentProvider.SHOW_TOP_LEVEL_WORKING_SETS) != groupWorkingSets) {
@@ -112,6 +113,7 @@ public class WorkingSetRootModeActionGroup extends ActionGroup {
*
* @see ActionGroup#fillActionBars(IActionBars)
*/
+ @Override
public void fillActionBars(IActionBars actionBars) {
if (hasContributedToViewMenu)
return;
@@ -137,6 +139,7 @@ public class WorkingSetRootModeActionGroup extends ActionGroup {
viewMenu.add(new ContributionItem() {
+ @Override
public void fill(Menu menu, int index) {
int style = SWT.CHECK;
@@ -149,6 +152,7 @@ public class WorkingSetRootModeActionGroup extends ActionGroup {
mi.setSelection(currentSelection == j);
mi.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
if (currentSelection == j) {
items[currentSelection].setSelection(true);
@@ -166,6 +170,7 @@ public class WorkingSetRootModeActionGroup extends ActionGroup {
}
+ @Override
public boolean isDynamic() {
return false;
}
diff --git a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/ResourceExtensionContentProvider.java b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/ResourceExtensionContentProvider.java
index d88251c..fc7c957 100644
--- a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/ResourceExtensionContentProvider.java
+++ b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/ResourceExtensionContentProvider.java
@@ -46,6 +46,7 @@ public class ResourceExtensionContentProvider extends WorkbenchContentProvider {
*
* @see org.eclipse.ui.model.BaseWorkbenchContentProvider#getElements(java.lang.Object)
*/
+ @Override
public Object[] getElements(Object element) {
return super.getChildren(element);
}
@@ -55,6 +56,7 @@ public class ResourceExtensionContentProvider extends WorkbenchContentProvider {
*
* @see org.eclipse.ui.model.BaseWorkbenchContentProvider#getChildren(java.lang.Object)
*/
+ @Override
public Object[] getChildren(Object element) {
if(element instanceof IResource)
return super.getChildren(element);
@@ -64,6 +66,7 @@ public class ResourceExtensionContentProvider extends WorkbenchContentProvider {
/* (non-Javadoc)
* @see org.eclipse.ui.model.BaseWorkbenchContentProvider#hasChildren(java.lang.Object)
*/
+ @Override
public boolean hasChildren(Object element) {
try {
if (element instanceof IContainer) {
@@ -84,6 +87,7 @@ public class ResourceExtensionContentProvider extends WorkbenchContentProvider {
/* (non-Javadoc)
* @see org.eclipse.ui.model.WorkbenchContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
*/
+ @Override
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
super.inputChanged(viewer, oldInput, newInput);
this.viewer = viewer;
@@ -95,6 +99,7 @@ public class ResourceExtensionContentProvider extends WorkbenchContentProvider {
*
* @param delta
*/
+ @Override
protected void processDelta(IResourceDelta delta) {
Control ctrl = viewer.getControl();
@@ -118,6 +123,7 @@ public class ResourceExtensionContentProvider extends WorkbenchContentProvider {
/* (non-Javadoc)
* @see java.lang.Runnable#run()
*/
+ @Override
public void run() {
//Abort if this happens after disposes
Control ctrl = viewer.getControl();
@@ -250,6 +256,7 @@ public class ResourceExtensionContentProvider extends WorkbenchContentProvider {
final boolean hasRename = numMovedFrom > 0 && numMovedTo > 0;
Runnable addAndRemove = new Runnable(){
+ @Override
public void run() {
if (viewer instanceof AbstractTreeViewer) {
AbstractTreeViewer treeViewer = (AbstractTreeViewer) viewer;
@@ -289,6 +296,7 @@ public class ResourceExtensionContentProvider extends WorkbenchContentProvider {
*/
private Runnable getRefreshRunnable(final IResource resource) {
return new Runnable(){
+ @Override
public void run() {
((StructuredViewer) viewer).refresh(resource);
}
diff --git a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/ResourceExtensionLabelProvider.java b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/ResourceExtensionLabelProvider.java
index 860de43..8828d3e 100644
--- a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/ResourceExtensionLabelProvider.java
+++ b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/ResourceExtensionLabelProvider.java
@@ -28,11 +28,13 @@ import org.eclipse.ui.navigator.ICommonLabelProvider;
public class ResourceExtensionLabelProvider extends WorkbenchLabelProvider implements ICommonLabelProvider {
+ @Override
public void init(ICommonContentExtensionSite aConfig) {
//init
}
+ @Override
public String getDescription(Object anElement) {
if (anElement instanceof IResource) {
@@ -41,10 +43,12 @@ public class ResourceExtensionLabelProvider extends WorkbenchLabelProvider imple
return null;
}
+ @Override
public void restoreState(IMemento aMemento) {
}
+ @Override
public void saveState(IMemento aMemento) {
}
}
diff --git a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/ResourceExtensionSorter.java b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/ResourceExtensionSorter.java
index 5db086c..5012fa7 100644
--- a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/ResourceExtensionSorter.java
+++ b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/ResourceExtensionSorter.java
@@ -44,7 +44,8 @@ public class ResourceExtensionSorter extends ResourceSorter {
icuCollator = Collator.getInstance();
}
- protected int compareNames(IResource resource1, IResource resource2) {
+ @Override
+ protected int compareNames(IResource resource1, IResource resource2) {
return icuCollator.compare(resource1.getName(), resource2.getName());
}
diff --git a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/ResourceLinkHelper.java b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/ResourceLinkHelper.java
index a374dbd..b79e309 100644
--- a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/ResourceLinkHelper.java
+++ b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/ResourceLinkHelper.java
@@ -33,6 +33,7 @@ public class ResourceLinkHelper implements ILinkHelper {
/* (non-Javadoc)
* @see org.eclipse.ui.navigator.ILinkHelper#findSelection(org.eclipse.ui.IEditorInput)
*/
+ @Override
public IStructuredSelection findSelection(IEditorInput anInput) {
IFile file = ResourceUtil.getFile(anInput);
if (file != null) {
@@ -44,6 +45,7 @@ public class ResourceLinkHelper implements ILinkHelper {
/* (non-Javadoc)
* @see org.eclipse.ui.navigator.ILinkHelper#activateEditor(org.eclipse.ui.IWorkbenchPage, org.eclipse.jface.viewers.IStructuredSelection)
*/
+ @Override
public void activateEditor(IWorkbenchPage aPage,
IStructuredSelection aSelection) {
if (aSelection == null || aSelection.isEmpty())
diff --git a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/TabbedPropertySheetAdapterFactory.java b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/TabbedPropertySheetAdapterFactory.java
index 4ea9453..b5dfd23 100644
--- a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/TabbedPropertySheetAdapterFactory.java
+++ b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/TabbedPropertySheetAdapterFactory.java
@@ -31,7 +31,8 @@ public class TabbedPropertySheetAdapterFactory
* @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object,
* java.lang.Class)
*/
- public Object getAdapter(Object adaptableObject, Class adapterType) {
+ @Override
+ public Object getAdapter(Object adaptableObject, Class adapterType) {
if (adaptableObject instanceof ProjectExplorer) {
if (IPropertySheetPage.class == adapterType)
return new TabbedPropertySheetPage(
@@ -46,7 +47,8 @@ public class TabbedPropertySheetAdapterFactory
*
* @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList()
*/
- public Class[] getAdapterList() {
+ @Override
+ public Class[] getAdapterList() {
return new Class[] {IPropertySheetPage.class};
}
diff --git a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/TabbedPropertySheetProjectExplorerContributor.java b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/TabbedPropertySheetProjectExplorerContributor.java
index 2eb2b3e..ddbacb1 100644
--- a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/TabbedPropertySheetProjectExplorerContributor.java
+++ b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/TabbedPropertySheetProjectExplorerContributor.java
@@ -31,6 +31,7 @@ public class TabbedPropertySheetProjectExplorerContributor implements
/* (non-Javadoc)
* @see org.eclipse.ui.views.properties.tabbed.ITabbedPropertySheetPageContributor#getContributorId()
*/
+ @Override
public String getContributorId() {
return contributorId;
}
diff --git a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/TabbedPropertySheetTitleProvider.java b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/TabbedPropertySheetTitleProvider.java
index a60be1b..27ac369 100644
--- a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/TabbedPropertySheetTitleProvider.java
+++ b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/workbench/TabbedPropertySheetTitleProvider.java
@@ -60,6 +60,7 @@ public class TabbedPropertySheetTitleProvider extends LabelProvider {
/**
* @see org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object)
*/
+ @Override
public Image getImage(Object object) {
return labelProvider != null ? labelProvider.getImage(object) : null;
}
@@ -67,6 +68,7 @@ public class TabbedPropertySheetTitleProvider extends LabelProvider {
/**
* @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
*/
+ @Override
public String getText(Object object) {
return descriptionProvider != null ? descriptionProvider
.getDescription(object) : null;
diff --git a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/workingsets/WorkingSetSorter.java b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/workingsets/WorkingSetSorter.java
index 8f0417e..1abfc1c 100644
--- a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/workingsets/WorkingSetSorter.java
+++ b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/workingsets/WorkingSetSorter.java
@@ -22,6 +22,7 @@ import org.eclipse.jface.viewers.ViewerSorter;
*/
public class WorkingSetSorter extends ViewerSorter {
+ @Override
public int compare(Viewer viewer, Object e1, Object e2) {
if(viewer instanceof StructuredViewer) {
ILabelProvider labelProvider = (ILabelProvider) ((StructuredViewer)viewer).getLabelProvider();
diff --git a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/workingsets/WorkingSetsContentProvider.java b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/workingsets/WorkingSetsContentProvider.java
index b2c5fec..921ad01 100644
--- a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/workingsets/WorkingSetsContentProvider.java
+++ b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/workingsets/WorkingSetsContentProvider.java
@@ -66,6 +66,7 @@ public class WorkingSetsContentProvider implements ICommonContentProvider {
/* (non-Javadoc)
* @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
*/
+ @Override
public void propertyChange(PropertyChangeEvent event) {
if(SHOW_TOP_LEVEL_WORKING_SETS.equals(event.getProperty())) {
updateRootMode();
@@ -78,6 +79,7 @@ public class WorkingSetsContentProvider implements ICommonContentProvider {
/* (non-Javadoc)
* @see org.eclipse.ui.navigator.ICommonContentProvider#init(org.eclipse.ui.navigator.ICommonContentExtensionSite)
*/
+ @Override
public void init(ICommonContentExtensionSite aConfig) {
NavigatorContentService cs = (NavigatorContentService) aConfig.getService();
viewer = (CommonViewer) cs.getViewer();
@@ -92,6 +94,7 @@ public class WorkingSetsContentProvider implements ICommonContentProvider {
/* (non-Javadoc)
* @see org.eclipse.ui.navigator.IMementoAware#restoreState(org.eclipse.ui.IMemento)
*/
+ @Override
public void restoreState(IMemento aMemento) {
}
@@ -99,10 +102,12 @@ public class WorkingSetsContentProvider implements ICommonContentProvider {
/* (non-Javadoc)
* @see org.eclipse.ui.navigator.IMementoAware#saveState(org.eclipse.ui.IMemento)
*/
+ @Override
public void saveState(IMemento aMemento) {
}
+ @Override
public Object[] getChildren(Object parentElement) {
if (parentElement instanceof IWorkingSet) {
IWorkingSet workingSet = (IWorkingSet) parentElement;
@@ -129,25 +134,30 @@ public class WorkingSetsContentProvider implements ICommonContentProvider {
return children;
}
+ @Override
public Object getParent(Object element) {
if (helper != null)
return helper.getParent(element);
return null;
}
+ @Override
public boolean hasChildren(Object element) {
return true;
}
+ @Override
public Object[] getElements(Object inputElement) {
return getChildren(inputElement);
}
+ @Override
public void dispose() {
helper = null;
extensionStateModel.removePropertyChangeListener(rootModeListener);
}
+ @Override
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
if (newInput instanceof IWorkingSet) {
IWorkingSet rootSet = (IWorkingSet) newInput;
diff --git a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/workingsets/WorkingSetsLabelProvider.java b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/workingsets/WorkingSetsLabelProvider.java
index 6da3a8b..dd98607 100644
--- a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/workingsets/WorkingSetsLabelProvider.java
+++ b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/workingsets/WorkingSetsLabelProvider.java
@@ -24,28 +24,34 @@ public class WorkingSetsLabelProvider implements ILabelProvider {
private WorkbenchLabelProvider labelProvider = new WorkbenchLabelProvider();
+ @Override
public Image getImage(Object element) {
if (element instanceof IWorkingSet)
return labelProvider.getImage(element);
return null;
}
+ @Override
public String getText(Object element) {
if (element instanceof IWorkingSet)
return ((IWorkingSet) element).getLabel();
return null;
}
+ @Override
public void addListener(ILabelProviderListener listener) {
}
+ @Override
public void dispose() {
}
+ @Override
public boolean isLabelProperty(Object element, String property) {
return false;
}
+ @Override
public void removeListener(ILabelProviderListener listener) {
}
diff --git a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/GoIntoActionProvider.java b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/GoIntoActionProvider.java
index 63cb38e..8b2f63c 100644
--- a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/GoIntoActionProvider.java
+++ b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/GoIntoActionProvider.java
@@ -31,24 +31,29 @@ public class GoIntoActionProvider extends CommonActionProvider {
private GoIntoAction goIntoAction;
+ @Override
public void init(ICommonActionExtensionSite anActionSite) {
anActionSite.getViewSite().getShell();
CommonViewer viewer = (CommonViewer) anActionSite.getStructuredViewer();
goIntoAction = new GoIntoAction(viewer.getFrameList());
}
+ @Override
public void dispose() {
goIntoAction.dispose();
}
+ @Override
public void fillActionBars(IActionBars actionBars) {
actionBars.setGlobalActionHandler(IWorkbenchActionConstants.GO_INTO, goIntoAction);
}
+ @Override
public void fillContextMenu(IMenuManager menu) {
menu.appendToGroup("group.new", goIntoAction); //$NON-NLS-1$
}
+ @Override
public void updateActionBars() {
goIntoAction.update();
}
diff --git a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/ProjectExplorer.java b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/ProjectExplorer.java
index 20584d0..afa04b6 100644
--- a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/ProjectExplorer.java
+++ b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/ProjectExplorer.java
@@ -88,6 +88,7 @@ public final class ProjectExplorer extends CommonNavigator {
*/
private String workingSetLabel;
+ @Override
public void createPartControl(Composite aParent) {
super.createPartControl(aParent);
@@ -101,6 +102,7 @@ public final class ProjectExplorer extends CommonNavigator {
*
* @noreference This method is not intended to be referenced by clients.
*/
+ @Override
public void updateTitle() {
super.updateTitle();
Object input = getCommonViewer().getInput();
@@ -140,6 +142,7 @@ public final class ProjectExplorer extends CommonNavigator {
* @return the tooltip
* @noreference This method is not intended to be referenced by clients.
*/
+ @Override
public String getFrameToolTipText(Object element) {
String result;
if (!(element instanceof IResource)) {
@@ -205,6 +208,7 @@ public final class ProjectExplorer extends CommonNavigator {
* @noreference This method is not intended to be referenced by clients.
* @since 3.4
*/
+ @Override
public void setRootMode(int mode) {
rootMode = mode;
}
@@ -214,6 +218,7 @@ public final class ProjectExplorer extends CommonNavigator {
* @noreference This method is not intended to be referenced by clients.
* @since 3.4
*/
+ @Override
public int getRootMode() {
return rootMode;
}
@@ -223,6 +228,7 @@ public final class ProjectExplorer extends CommonNavigator {
* @noreference This method is not intended to be referenced by clients.
* @since 3.4
*/
+ @Override
public void setWorkingSetLabel(String label) {
workingSetLabel = label;
}
@@ -232,6 +238,7 @@ public final class ProjectExplorer extends CommonNavigator {
* @noreference This method is not intended to be referenced by clients.
* @since 3.4
*/
+ @Override
public String getWorkingSetLabel() {
return workingSetLabel;
}
@@ -240,6 +247,7 @@ public final class ProjectExplorer extends CommonNavigator {
* @see org.eclipse.ui.navigator.CommonNavigator#handleDoubleClick(org.eclipse.jface.viewers.DoubleClickEvent)
* @since 4.3
*/
+ @Override
protected void handleDoubleClick(DoubleClickEvent anEvent) {
ICommandService commandService = (ICommandService) getViewSite().getService(ICommandService.class);
Command openProjectCommand = commandService.getCommand(IWorkbenchCommandConstants.PROJECT_OPEN_PROJECT);
diff --git a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/ResourceDragAdapterAssistant.java b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/ResourceDragAdapterAssistant.java
index 4e18100..b59e959 100644
--- a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/ResourceDragAdapterAssistant.java
+++ b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/ResourceDragAdapterAssistant.java
@@ -57,6 +57,7 @@ public class ResourceDragAdapterAssistant extends
*
* @see org.eclipse.ui.navigator.CommonDragAdapterAssistant#getSupportedTransferTypes()
*/
+ @Override
public Transfer[] getSupportedTransferTypes() {
return SUPPORTED_TRANSFERS;
}
@@ -67,6 +68,7 @@ public class ResourceDragAdapterAssistant extends
* @see org.eclipse.ui.navigator.CommonDragAdapterAssistant#setDragData(org.eclipse.swt.dnd.DragSourceEvent,
* org.eclipse.jface.viewers.IStructuredSelection)
*/
+ @Override
public boolean setDragData(DragSourceEvent anEvent,
IStructuredSelection aSelection) {
diff --git a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/ResourceDropAdapterAssistant.java b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/ResourceDropAdapterAssistant.java
index 2c9fc2b..d3eb243 100644
--- a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/ResourceDropAdapterAssistant.java
+++ b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/ResourceDropAdapterAssistant.java
@@ -94,6 +94,7 @@ public class ResourceDropAdapterAssistant extends CommonDropAdapterAssistant {
*
* @see org.eclipse.ui.navigator.CommonDropAdapterAssistant#isSupportedType(org.eclipse.swt.dnd.TransferData)
*/
+ @Override
public boolean isSupportedType(TransferData aTransferType) {
return super.isSupportedType(aTransferType)
|| FileTransfer.getInstance().isSupportedType(aTransferType);
@@ -105,6 +106,7 @@ public class ResourceDropAdapterAssistant extends CommonDropAdapterAssistant {
* @see org.eclipse.ui.navigator.CommonDropAdapterAssistant#validateDrop(java.lang.Object,
* int, org.eclipse.swt.dnd.TransferData)
*/
+ @Override
public IStatus validateDrop(Object target, int aDropOperation,
TransferData transferType) {
@@ -200,6 +202,7 @@ public class ResourceDropAdapterAssistant extends CommonDropAdapterAssistant {
* @see org.eclipse.ui.navigator.CommonDropAdapterAssistant#handleDrop(CommonDropAdapter,
* DropTargetEvent, Object)
*/
+ @Override
public IStatus handleDrop(CommonDropAdapter aDropAdapter,
DropTargetEvent aDropTargetEvent, Object aTarget) {
@@ -260,6 +263,7 @@ public class ResourceDropAdapterAssistant extends CommonDropAdapterAssistant {
* @see org.eclipse.ui.navigator.CommonDropAdapterAssistant#validatePluginTransferDrop(org.eclipse.jface.viewers.IStructuredSelection,
* java.lang.Object)
*/
+ @Override
public IStatus validatePluginTransferDrop(
IStructuredSelection aDragSelection, Object aDropTarget) {
if (!(aDropTarget instanceof IResource)) {
@@ -308,6 +312,7 @@ public class ResourceDropAdapterAssistant extends CommonDropAdapterAssistant {
/* (non-Javadoc)
* @see org.eclipse.ui.navigator.CommonDropAdapterAssistant#handlePluginTransferDrop(org.eclipse.jface.viewers.IStructuredSelection, java.lang.Object)
*/
+ @Override
public IStatus handlePluginTransferDrop(IStructuredSelection aDragSelection, Object aDropTarget) {
IContainer target = getActualTarget((IResource) aDropTarget);
@@ -493,6 +498,7 @@ public class ResourceDropAdapterAssistant extends CommonDropAdapterAssistant {
returnStatus = null;
IRunnableWithProgress checkOp = new IRunnableWithProgress() {
+ @Override
public void run(IProgressMonitor monitor) {
try {
refactoringStatus = refactoring.checkAllConditions(monitor);
@@ -523,6 +529,7 @@ public class ResourceDropAdapterAssistant extends CommonDropAdapterAssistant {
CheckConditionsOperation.ALL_CONDITIONS);
final IWorkspaceRunnable r = new IWorkspaceRunnable() {
+ @Override
public void run(IProgressMonitor monitor) throws CoreException {
op.run(monitor);
}
@@ -530,6 +537,7 @@ public class ResourceDropAdapterAssistant extends CommonDropAdapterAssistant {
returnStatus = null;
IRunnableWithProgress refactorOp = new IRunnableWithProgress() {
+ @Override
public void run(IProgressMonitor monitor) {
try {
ResourcesPlugin.getWorkspace().run(r, ResourcesPlugin.getWorkspace().getRoot(), IWorkspace.AVOID_UPDATE, monitor);
@@ -577,6 +585,7 @@ public class ResourceDropAdapterAssistant extends CommonDropAdapterAssistant {
// Otherwise the drag source (e.g., Windows Explorer) will be blocked
// while the operation executes. Fixes bug 16478.
Display.getCurrent().asyncExec(new Runnable() {
+ @Override
public void run() {
getShell().forceActive();
new CopyFilesAndFoldersOperation(getShell()).copyOrLinkFiles(names, target, currentOperation);