Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemTableProvider.java4
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/NonSyncMergePart.java22
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/OpenFileSystemRevisionAction.java4
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistoryParticipant.java9
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/ExampleModelProvider.java7
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/CompareAdapter.java21
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/ModelSyncContentProvider.java67
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/PessimisticDecorator.java16
8 files changed, 24 insertions, 126 deletions
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemTableProvider.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemTableProvider.java
index 85004fda1..855bab9e4 100644
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemTableProvider.java
+++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemTableProvider.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2006, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -221,7 +221,7 @@ public class FileSystemTableProvider {
if (element instanceof IFileRevision) {
entry = (IFileRevision) element;
} else if (element instanceof IAdaptable) {
- entry = (IFileRevision) ((IAdaptable) element).getAdapter(IFileRevision.class);
+ entry = ((IAdaptable) element).getAdapter(IFileRevision.class);
}
return entry;
}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/NonSyncMergePart.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/NonSyncMergePart.java
index 745ef3141..c347ecc4d 100644
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/NonSyncMergePart.java
+++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/NonSyncMergePart.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2006, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -44,24 +44,15 @@ public class NonSyncMergePart extends PageSaveablePart {
this.page = page;
}
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.PageSaveablePart#createPage(org.eclipse.swt.widgets.Composite, org.eclipse.jface.action.ToolBarManager)
- */
protected Control createPage(Composite parent, ToolBarManager toolBarManager) {
page.createControl(parent);
return page.getControl();
}
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.PageSaveablePart#getSelectionProvider()
- */
protected ISelectionProvider getSelectionProvider() {
return page.getViewer();
}
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.PageSaveablePart#getCompareInput(org.eclipse.jface.viewers.ISelection)
- */
protected ICompareInput getCompareInput(ISelection selection) {
ICompareInput compareInput = super.getCompareInput(selection);
if (compareInput != null)
@@ -89,9 +80,6 @@ public class NonSyncMergePart extends PageSaveablePart {
return null;
}
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.PageSaveablePart#prepareInput(org.eclipse.compare.structuremergeviewer.ICompareInput, org.eclipse.compare.CompareConfiguration, org.eclipse.core.runtime.IProgressMonitor)
- */
protected void prepareInput(ICompareInput input,
CompareConfiguration configuration, IProgressMonitor monitor)
throws InvocationTargetException {
@@ -109,7 +97,7 @@ public class NonSyncMergePart extends PageSaveablePart {
* Convert the compare input to a synchronize compare input.
*/
private ISynchronizationCompareInput asSynchronizationCompareInput(ICompareInput input) {
- return (ISynchronizationCompareInput)Adapters.adapt(input, ISynchronizationCompareInput.class);
+ return Adapters.adapt(input, ISynchronizationCompareInput.class);
}
public void contentChanged(IContentChangeNotifier source) {
@@ -117,16 +105,10 @@ public class NonSyncMergePart extends PageSaveablePart {
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#getTitle()
- */
public String getTitle() {
return "File System Provider Merge";
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPart#getTitleImage()
- */
public Image getTitleImage() {
return null;
}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/OpenFileSystemRevisionAction.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/OpenFileSystemRevisionAction.java
index 2220a4032..270812c29 100644
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/OpenFileSystemRevisionAction.java
+++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/OpenFileSystemRevisionAction.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -149,7 +149,7 @@ public class OpenFileSystemRevisionAction extends BaseSelectionListenerAction {
IEditorPart part = editorRefs[i].getEditor(false);
if (part != null && part.getEditorInput() instanceof FileSystemRevisionEditorInput) {
IFileRevision inputRevision = (IFileRevision) input.getAdapter(IFileRevision.class);
- IFileRevision editorRevision = (IFileRevision) part.getEditorInput().getAdapter(IFileRevision.class);
+ IFileRevision editorRevision = part.getEditorInput().getAdapter(IFileRevision.class);
if (inputRevision.equals(editorRevision)) {
//make the editor that already contains the revision current
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistoryParticipant.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistoryParticipant.java
index 86af167ac..ec4e69533 100644
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistoryParticipant.java
+++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistoryParticipant.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -55,7 +55,7 @@ public class LocalHistoryParticipant extends SubscriberParticipant {
if(element instanceof ISynchronizeModelElement) {
ISynchronizeModelElement node = (ISynchronizeModelElement)element;
if(node instanceof IAdaptable) {
- SyncInfo info = (SyncInfo)((IAdaptable)node).getAdapter(SyncInfo.class);
+ SyncInfo info = ((IAdaptable)node).getAdapter(SyncInfo.class);
if(info != null) {
LocalHistoryVariant state = (LocalHistoryVariant)info.getRemote();
return text+ " ("+ state.getContentIdentifier() + ")";
@@ -74,9 +74,6 @@ public class LocalHistoryParticipant extends SubscriberParticipant {
setSubscriber(new LocalHistorySubscriber());
}
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.subscriber.SubscriberParticipant#setSubscriber(org.eclipse.team.core.subscribers.Subscriber)
- */
protected void setSubscriber(Subscriber subscriber) {
super.setSubscriber(subscriber);
try {
@@ -99,7 +96,7 @@ public class LocalHistoryParticipant extends SubscriberParticipant {
protected static SyncInfo getSyncInfo(ISynchronizeModelElement element) {
if (element instanceof IAdaptable) {
- return (SyncInfo)((IAdaptable)element).getAdapter(SyncInfo.class);
+ return ((IAdaptable)element).getAdapter(SyncInfo.class);
}
return null;
}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/ExampleModelProvider.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/ExampleModelProvider.java
index df597d58b..691a31b62 100644
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/ExampleModelProvider.java
+++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/ExampleModelProvider.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -32,9 +32,6 @@ public class ExampleModelProvider extends
super();
}
- /* (non-Javadoc)
- * @see org.eclipse.core.resources.mapping.ModelProvider#validateChange(org.eclipse.core.resources.IResourceDelta, org.eclipse.core.runtime.IProgressMonitor)
- */
public IStatus validateChange(IResourceDelta delta, IProgressMonitor monitor) {
// Visit the changes in the delta to look for changes we care about
final List problems = new ArrayList();
@@ -84,7 +81,7 @@ public class ExampleModelProvider extends
if (ModelProject.isModProject(resource.getProject())) {
ModelObject object = ModelObject.create(resource);
if (object != null)
- return new ResourceMapping[] { (ResourceMapping)object.getAdapter(ResourceMapping.class) };
+ return new ResourceMapping[] { object.getAdapter(ResourceMapping.class) };
}
return super.getMappings(resource, context, monitor);
}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/CompareAdapter.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/CompareAdapter.java
index 00ce39099..a7019ed39 100644
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/CompareAdapter.java
+++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/CompareAdapter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
+ * Copyright (c) 2006, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -37,9 +37,6 @@ public class CompareAdapter extends SynchronizationCompareAdapter {
this.provider = provider;
}
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.SynchronizationCompareAdapter#getName(org.eclipse.core.resources.mapping.ResourceMapping)
- */
public String getName(ResourceMapping mapping) {
Object o = mapping.getModelObject();
if (o instanceof ModelObject) {
@@ -48,9 +45,6 @@ public class CompareAdapter extends SynchronizationCompareAdapter {
return super.getName(mapping);
}
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.SynchronizationCompareAdapter#getPathString(org.eclipse.core.resources.mapping.ResourceMapping)
- */
public String getPathString(ResourceMapping mapping) {
Object o = mapping.getModelObject();
if (o instanceof ModelObject) {
@@ -59,9 +53,6 @@ public class CompareAdapter extends SynchronizationCompareAdapter {
return super.getPathString(mapping);
}
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.SynchronizationCompareAdapter#asCompareInput(org.eclipse.team.core.mapping.ISynchronizationContext, java.lang.Object)
- */
public ICompareInput asCompareInput(ISynchronizationContext context, Object o) {
if (o instanceof ModelObjectElementFile) {
ModelObjectElementFile moeFile = (ModelObjectElementFile) o;
@@ -71,9 +62,6 @@ public class CompareAdapter extends SynchronizationCompareAdapter {
return super.asCompareInput(context, o);
}
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.ISynchronizationCompareAdapter#restore(org.eclipse.ui.IMemento)
- */
public ResourceMapping[] restore(IMemento memento) {
List result = new ArrayList();
IMemento[] children = memento.getChildren(CTX_MODEL_MAPPINGS);
@@ -86,9 +74,6 @@ public class CompareAdapter extends SynchronizationCompareAdapter {
return (ResourceMapping[]) result.toArray(new ResourceMapping[result.size()]);
}
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.ISynchronizationCompareAdapter#save(org.eclipse.core.resources.mapping.ResourceMapping[], org.eclipse.ui.IMemento)
- */
public void save(ResourceMapping[] mappings, IMemento memento) {
for (int i = 0; i < mappings.length; i++) {
ResourceMapping mapping = mappings[i];
@@ -107,11 +92,11 @@ public class CompareAdapter extends SynchronizationCompareAdapter {
if (parent != null) {
ModelObjectDefinitionFile modFile = (ModelObjectDefinitionFile)ModelObject.create(getResource(parent));
if (modFile != null)
- return (ResourceMapping)new ModelObjectElementFile(modFile, (IFile)getResource(path)).getAdapter(ResourceMapping.class);
+ return new ModelObjectElementFile(modFile, (IFile)getResource(path)).getAdapter(ResourceMapping.class);
} else {
ModelObject object = ModelObject.create(getResource(path));
if (object != null)
- return (ResourceMapping)object.getAdapter(ResourceMapping.class);
+ return object.getAdapter(ResourceMapping.class);
}
return null;
}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/ModelSyncContentProvider.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/ModelSyncContentProvider.java
index 48052377d..19e94c8d5 100644
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/ModelSyncContentProvider.java
+++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/ModelSyncContentProvider.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -45,18 +45,12 @@ public class ModelSyncContentProvider extends SynchronizationContentProvider imp
super();
}
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.SynchronizationContentProvider#init(org.eclipse.ui.navigator.ICommonContentExtensionSite)
- */
public void init(ICommonContentExtensionSite site) {
super.init(site);
delegate = new ModelNavigatorContentProvider(getContext() != null);
delegate.init(site);
}
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.SynchronizationContentProvider#dispose()
- */
public void dispose() {
super.dispose();
if (delegate != null)
@@ -67,28 +61,19 @@ public class ModelSyncContentProvider extends SynchronizationContentProvider imp
return delegate;
}
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.SynchronizationContentProvider#getModelProviderId()
- */
protected String getModelProviderId() {
return ExampleModelProvider.ID;
}
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.SynchronizationContentProvider#getModelRoot()
- */
protected Object getModelRoot() {
return ModelWorkspace.getRoot();
}
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.SynchronizationContentProvider#getTraversals(org.eclipse.team.core.mapping.ISynchronizationContext, java.lang.Object)
- */
protected ResourceTraversal[] getTraversals(
ISynchronizationContext context, Object object) {
if (object instanceof ModelObject) {
ModelObject mo = (ModelObject) object;
- ResourceMapping mapping = (ResourceMapping)mo.getAdapter(ResourceMapping.class);
+ ResourceMapping mapping = mo.getAdapter(ResourceMapping.class);
ResourceMappingContext rmc = new SynchronizationResourceMappingContext(context);
try {
// Technically speaking, this may end up being too long running for this
@@ -101,9 +86,6 @@ public class ModelSyncContentProvider extends SynchronizationContentProvider imp
return new ResourceTraversal[0];
}
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.SynchronizationContentProvider#getChildrenInContext(org.eclipse.team.core.mapping.ISynchronizationContext, java.lang.Object, java.lang.Object[])
- */
protected Object[] getChildrenInContext(ISynchronizationContext context, Object parent, Object[] children) {
Set allChildren = new HashSet();
allChildren.addAll(Arrays.asList(super.getChildrenInContext(context, parent, children)));
@@ -138,16 +120,10 @@ public class ModelSyncContentProvider extends SynchronizationContentProvider imp
return allChildren.toArray(new Object[allChildren.size()]);
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.IPipelinedTreeContentProvider#getPipelinedChildren(java.lang.Object, java.util.Set)
- */
public void getPipelinedChildren(Object aParent, Set theCurrentChildren) {
// Nothing to do
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.IPipelinedTreeContentProvider#getPipelinedElements(java.lang.Object, java.util.Set)
- */
public void getPipelinedElements(Object anInput, Set theCurrentElements) {
// Replace any model projects with a ModelProject if the input
// is a synchronization context
@@ -176,17 +152,11 @@ public class ModelSyncContentProvider extends SynchronizationContentProvider imp
}
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.IPipelinedTreeContentProvider#getPipelinedParent(java.lang.Object, java.lang.Object)
- */
public Object getPipelinedParent(Object anObject, Object aSuggestedParent) {
// We're not changing the parenting of any resources
return aSuggestedParent;
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.IPipelinedTreeContentProvider#interceptAdd(org.eclipse.ui.navigator.PipelinedShapeModification)
- */
public PipelinedShapeModification interceptAdd(PipelinedShapeModification anAddModification) {
if (anAddModification.getParent() instanceof ISynchronizationContext) {
for (Iterator iter = anAddModification.getChildren().iterator(); iter.hasNext();) {
@@ -206,40 +176,24 @@ public class ModelSyncContentProvider extends SynchronizationContentProvider imp
return null;
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.IPipelinedTreeContentProvider#interceptRefresh(org.eclipse.ui.navigator.PipelinedViewerUpdate)
- */
public boolean interceptRefresh(PipelinedViewerUpdate aRefreshSynchronization) {
// No need to intercept the refresh
return false;
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.IPipelinedTreeContentProvider#interceptRemove(org.eclipse.ui.navigator.PipelinedShapeModification)
- */
public PipelinedShapeModification interceptRemove(PipelinedShapeModification aRemoveModification) {
// No need to intercept the remove
return aRemoveModification;
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.navigator.IPipelinedTreeContentProvider#interceptUpdate(org.eclipse.ui.navigator.PipelinedViewerUpdate)
- */
public boolean interceptUpdate(PipelinedViewerUpdate anUpdateSynchronization) {
// No need to intercept the update
return false;
}
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.SynchronizationContentProvider#diffsChanged(org.eclipse.team.core.diff.IDiffChangeEvent, org.eclipse.core.runtime.IProgressMonitor)
- */
public void diffsChanged(final IDiffChangeEvent event, IProgressMonitor monitor) {
// Override in order to perform custom viewer updates when the diff tree changes
- Utils.syncExec(new Runnable() {
- public void run() {
- handleChange(event);
- }
- }, (StructuredViewer)getViewer());
+ Utils.syncExec((Runnable) () -> handleChange(event), (StructuredViewer)getViewer());
}
void handleChange(IDiffChangeEvent event) {
@@ -350,9 +304,6 @@ public class ModelSyncContentProvider extends SynchronizationContentProvider imp
return result;
}
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.mapping.SynchronizationContentProvider#propertyChanged(org.eclipse.team.core.diff.IDiffTree, int, org.eclipse.core.runtime.IPath[])
- */
public void propertyChanged(IDiffTree tree, int property, IPath[] paths) {
// We're overriding this message so that label updates occur for any elements
// whose labels may have changed
@@ -378,13 +329,11 @@ public class ModelSyncContentProvider extends SynchronizationContentProvider imp
if (!updates.isEmpty() || refresh) {
final boolean refreshAll = refresh;
final StructuredViewer viewer = (StructuredViewer)getViewer();
- Utils.syncExec(new Runnable() {
- public void run() {
- if (refreshAll)
- viewer.refresh(true);
- else
- viewer.update(updates.toArray(new Object[updates.size()]), null);
- }
+ Utils.syncExec((Runnable) () -> {
+ if (refreshAll)
+ viewer.refresh(true);
+ else
+ viewer.update(updates.toArray(new Object[updates.size()]), null);
}, viewer);
}
}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/PessimisticDecorator.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/PessimisticDecorator.java
index beb656d5a..daf50cd81 100644
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/PessimisticDecorator.java
+++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/PessimisticDecorator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -32,9 +32,6 @@ public class PessimisticDecorator extends LabelProvider implements ILabelDecorat
PessimisticFilesystemProviderPlugin.getInstance().addProviderListener(this);
}
- /*
- * @see org.eclipse.jface.viewers.ILabelDecorator#decorateText(String, Object)
- */
public String decorateText(String text, Object element) {
IResource resource= getResource(element);
if (resource == null)
@@ -55,9 +52,6 @@ public class PessimisticDecorator extends LabelProvider implements ILabelDecorat
return "(not controlled) " + text;
}
- /*
- * @see org.eclipse.jface.viewers.ILabelDecorator#decorateImage(Image, Object)
- */
public Image decorateImage(Image image, Object element) {
return image;
}
@@ -81,7 +75,7 @@ public class PessimisticDecorator extends LabelProvider implements ILabelDecorat
return (IResource) object;
}
if (object instanceof IAdaptable) {
- return (IResource) ((IAdaptable) object).getAdapter(IResource.class);
+ return ((IAdaptable) object).getAdapter(IResource.class);
}
return null;
}
@@ -101,17 +95,11 @@ public class PessimisticDecorator extends LabelProvider implements ILabelDecorat
}
}
- /*
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose()
- */
public void dispose() {
PessimisticFilesystemProviderPlugin.getInstance().removeProviderListener(this);
super.dispose();
}
- /*
- * @see org.eclipse.team.examples.pessimistic.IResourceStateListener#resourcesChanged(IResource[])
- */
public void stateChanged(IResource[] resources) {
if (resources.length > 0) {
LabelProviderChangedEvent[] events= new LabelProviderChangedEvent[resources.length];

Back to the top