diff options
Diffstat (limited to 'bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRemoteFilePropertySource.java')
-rw-r--r-- | bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRemoteFilePropertySource.java | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRemoteFilePropertySource.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRemoteFilePropertySource.java index ca730811d..a63d91f58 100644 --- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRemoteFilePropertySource.java +++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/model/CVSRemoteFilePropertySource.java @@ -16,17 +16,11 @@ package org.eclipse.team.internal.ccvs.ui.model; import java.lang.reflect.InvocationTargetException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.team.core.TeamException; import org.eclipse.team.internal.ccvs.core.ICVSRemoteFile; import org.eclipse.team.internal.ccvs.core.ILogEntry; import org.eclipse.team.internal.ccvs.ui.*; -import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin; -import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants; -import org.eclipse.ui.views.properties.IPropertyDescriptor; -import org.eclipse.ui.views.properties.IPropertySource; -import org.eclipse.ui.views.properties.PropertyDescriptor; +import org.eclipse.ui.views.properties.*; public class CVSRemoteFilePropertySource implements IPropertySource { ICVSRemoteFile file; @@ -76,6 +70,7 @@ public class CVSRemoteFilePropertySource implements IPropertySource { /** * Do nothing because properties are read only. */ + @Override public Object getEditableValue() { return this; } @@ -83,6 +78,7 @@ public class CVSRemoteFilePropertySource implements IPropertySource { /** * Return the Property Descriptors for the receiver. */ + @Override public IPropertyDescriptor[] getPropertyDescriptors() { return propertyDescriptors; } @@ -90,6 +86,7 @@ public class CVSRemoteFilePropertySource implements IPropertySource { /* * @see IPropertySource#getPropertyValue(Object) */ + @Override public Object getPropertyValue(Object id) { if (!initialized) { initialize(); @@ -119,6 +116,7 @@ public class CVSRemoteFilePropertySource implements IPropertySource { * Answer true if the value of the specified property * for this object has been changed from the default. */ + @Override public boolean isPropertySet(Object property) { return false; } @@ -128,30 +126,30 @@ public class CVSRemoteFilePropertySource implements IPropertySource { * * @param property The property to reset. */ + @Override public void resetPropertyValue(Object property) { } /** * Do nothing because properties are read only. */ + @Override public void setPropertyValue(Object name, Object value) { } private void initialize() { try { - CVSUIPlugin.runWithProgress(null, true /*cancelable*/, new IRunnableWithProgress() { - public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { - try { - ILogEntry[] entries = file.getLogEntries(monitor); - String revision = file.getRevision(); - for (int i = 0; i < entries.length; i++) { - if (entries[i].getRevision().equals(revision)) { - entry = entries[i]; - return; - } + CVSUIPlugin.runWithProgress(null, true /* cancelable */, monitor -> { + try { + ILogEntry[] entries = file.getLogEntries(monitor); + String revision = file.getRevision(); + for (int i = 0; i < entries.length; i++) { + if (entries[i].getRevision().equals(revision)) { + entry = entries[i]; + return; } - } catch (TeamException e) { - throw new InvocationTargetException(e); } + } catch (TeamException e) { + throw new InvocationTargetException(e); } }); } catch (InterruptedException e) { // ignore cancellation |