diff options
author | Lars Vogel | 2020-02-11 08:50:26 +0000 |
---|---|---|
committer | Lars Vogel | 2020-02-11 09:46:08 +0000 |
commit | 68d240884895880c0f5ce396681d86b4af24d241 (patch) | |
tree | 3c042614cc752a88cc73db5beb953ddd3f3873cc | |
parent | c181f42970de9aa40700e579adb83fbe91e9d351 (diff) | |
download | eclipse.platform.team-68d240884895880c0f5ce396681d86b4af24d241.tar.gz eclipse.platform.team-68d240884895880c0f5ce396681d86b4af24d241.tar.xz eclipse.platform.team-68d240884895880c0f5ce396681d86b4af24d241.zip |
Remove unnecessary whitespace from team - Part 1
Change-Id: I2e29e91eb8d81ae20326135a0b66210cf8f9f94a
Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
61 files changed, 263 insertions, 263 deletions
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/RepositoryProvider.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/RepositoryProvider.java index de380d54f..1ee36de2d 100644 --- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/RepositoryProvider.java +++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/RepositoryProvider.java @@ -83,7 +83,7 @@ import org.eclipse.team.internal.core.TeamPlugin; * repository provider with a project by invoking * <code>RepositoryProvider.map()</code>. * </p> - * + * * @see RepositoryProvider#map(IProject, String) * * @since 2.0 diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/IDiffTree.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/IDiffTree.java index 919762520..8890f5ae6 100644 --- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/IDiffTree.java +++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/IDiffTree.java @@ -117,11 +117,11 @@ public interface IDiffTree { * <p> * For example, this will return the number of outgoing changes in the set: * </p> - * + * * <pre> * long outgoing = countFor(IThreeWayDiff.OUTGOING, IThreeWayDiff.DIRECTION_MASK); * </pre> - * + * * @param state the sync state * @param mask the sync state mask * @return the number of matching resources in the set. diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/IDiffVisitor.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/IDiffVisitor.java index d365953d7..1aefb1238 100644 --- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/IDiffVisitor.java +++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/diff/IDiffVisitor.java @@ -18,7 +18,7 @@ package org.eclipse.team.core.diff; * <p> * Usage: * </p> - * + * * <pre> * class Visitor implements IDiffVisitor { * public boolean visit(IDiffNode diff) { @@ -42,7 +42,7 @@ package org.eclipse.team.core.diff; * <p> * Clients may implement this interface. * </p> - * + * * @see IDiffTree#accept(org.eclipse.core.runtime.IPath, IDiffVisitor, int) * * @since 3.2 diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/ResourceDiff.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/ResourceDiff.java index 7fbbf5735..12b81ff3e 100644 --- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/ResourceDiff.java +++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/mapping/provider/ResourceDiff.java @@ -51,7 +51,7 @@ public class ResourceDiff extends TwoWayDiff implements IResourceDiff { * Convenience constructor for creating a simple folder diff that consists of a * resource and a kind only. It is equivalent to * <code>ResourceDiff(resource, kind, 0, null, null)</code> - * + * * @param resource a resource * @param kind the kind of change (ADDED, REMOVED or CHANGED) */ diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/ISubscriberChangeEvent.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/ISubscriberChangeEvent.java index 37db51a58..6b083c07f 100644 --- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/ISubscriberChangeEvent.java +++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/ISubscriberChangeEvent.java @@ -53,13 +53,13 @@ public interface ISubscriberChangeEvent { * Return the flags that describe the type of change. The returned value should * be ANDed with the change type flags to determine whether the change event is * of a particular type. For example, - * + * * <pre> * if (event.getFlags() & ISubscriberChangeEvent.SYNC_CHANGED) { * // the sync info for the resource has changed * } * </pre> - * + * * @return the flags that describe the type of change */ public abstract int getFlags(); diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/SyncInfoTree.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/SyncInfoTree.java index 1d73e387e..37ee0c489 100644 --- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/SyncInfoTree.java +++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/synchronize/SyncInfoTree.java @@ -268,7 +268,7 @@ public class SyncInfoTree extends SyncInfoSet { * <li><code>IResource.DEPTH_INFINITE</code>: the resource and all of it's * descendants. * </ul> - * + * * @param resource the root of the resource subtree * @param depth the depth of the subtree */ diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/AbstractResourceVariantTree.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/AbstractResourceVariantTree.java index 2e22842c3..e1cd255e0 100644 --- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/AbstractResourceVariantTree.java +++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/AbstractResourceVariantTree.java @@ -241,10 +241,10 @@ public abstract class AbstractResourceVariantTree implements IResourceVariantTre IResource localChild = localSet != null ? (IResource) localSet.get(keyChildName) : null; - + IResourceVariant remoteChild = remoteSet != null ? (IResourceVariant) remoteSet.get(keyChildName) : null; - + if (localChild == null) { // there has to be a remote resource available if we got this far Assert.isTrue(remoteChild != null); diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/PersistantResourceVariantByteStore.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/PersistantResourceVariantByteStore.java index a64ed1df7..b250efb3b 100644 --- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/PersistantResourceVariantByteStore.java +++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/PersistantResourceVariantByteStore.java @@ -110,7 +110,7 @@ public class PersistantResourceVariantByteStore extends ResourceVariantByteStore * fetched from the case where the resource variant is known to not exist. In * the later case, this method returns <code>true</code> while * <code>getBytes</code> returns <code>null</code> - * + * * @param resource the local resource * @return whether the resource variant state for this resource is known * @throws TeamException if this operation fails. Reasons include: diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ThreeWayResourceComparator.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ThreeWayResourceComparator.java index 0cb9013cb..0366ed2cd 100644 --- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ThreeWayResourceComparator.java +++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/ThreeWayResourceComparator.java @@ -34,7 +34,7 @@ public class ThreeWayResourceComparator implements IResourceVariantComparator { * Create a three-way resource comparator that uses the * <code>ThreeWaySynchronizer</code> to compare a local resource to a resource * variant. - * + * * @param synchronizer The synchronizer to use. */ public ThreeWayResourceComparator(ThreeWaySynchronizer synchronizer) { diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemPlugin.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemPlugin.java index f3a333330..e45c39034 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemPlugin.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemPlugin.java @@ -25,7 +25,7 @@ import org.osgi.framework.BundleContext; /** * This is the plugin class for the file system examples. It provides the following: - * + * * <ol> * <li>public fields for the plugin and provider IDs as defined in the plugin.xml * <li>initialization on startup of Policy class that provides internationalization of strings @@ -34,24 +34,24 @@ import org.osgi.framework.BundleContext; * </ol> */ public class FileSystemPlugin extends AbstractUIPlugin { - + /** * This is the ID of the plugin as defined in the plugin.xml */ public static final String ID = "org.eclipse.team.examples.filesystem"; //$NON-NLS-1$ - + /** * This is the provider ID of the plugin as defined in the plugin.xml */ public static final String PROVIDER_ID = ID + ".FileSystemProvider"; //$NON-NLS-1$ - + // This static field will hold the singleton instance of the plugin class private static FileSystemPlugin plugin; - + private PessimisticFilesystemProviderPlugin pessPlugin; - + private PluginManifestChangeTracker tracker; - + /** * Override the standard plugin constructor. */ @@ -62,22 +62,22 @@ public class FileSystemPlugin extends AbstractUIPlugin { // Instanctiate pessimistic provider pessPlugin = new PessimisticFilesystemProviderPlugin(); } - + /** * Return the singlton instance of the plugin class to allow other - * classes in the plugin access to plugin instance methods such as + * classes in the plugin access to plugin instance methods such as * those for logging errors, etc. */ public static FileSystemPlugin getPlugin() { return plugin; } - + /** * Helper method to convert a CoreException into a TeamException. * We do this to maintain the core status and code. This type of - * mapping may not be appropriate in more complicated exception + * mapping may not be appropriate in more complicated exception * handling situations. - * + * * @param e the CoreException */ public static TeamException wrapException(CoreException e) { @@ -86,25 +86,25 @@ public class FileSystemPlugin extends AbstractUIPlugin { /** * Helper method to convert an IOException into a TeamException. - * This type of mapping may not be appropriate in more complicated + * This type of mapping may not be appropriate in more complicated * exception handling situations. - * + * * @param e the CoreException */ public static TeamException wrapException(IOException e) { - return new TeamException(new Status(IStatus.ERROR, FileSystemPlugin.ID, + return new TeamException(new Status(IStatus.ERROR, FileSystemPlugin.ID, TeamException.IO_FAILED, e.getMessage(), e)); } - + /** * Helper method to log an exception status. - * + * * @param status the status to be logged */ public static void log(IStatus status) { plugin.getLog().log(status); } - + /** * Returns the standard display to be used. The method first checks, if * the thread calling this method has an associated display. If so, this @@ -115,9 +115,9 @@ public class FileSystemPlugin extends AbstractUIPlugin { if (display == null) { display= Display.getDefault(); } - return display; + return display; } - + public void start(BundleContext context) throws Exception { super.start(context); //Call startup on the Pessimistic Plugin @@ -125,7 +125,7 @@ public class FileSystemPlugin extends AbstractUIPlugin { tracker = new PluginManifestChangeTracker(); tracker.start(); } - + public void stop(BundleContext context) throws Exception { try { if (pessPlugin != null) diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemProvider.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemProvider.java index ea1fe81b7..11bccccab 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemProvider.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemProvider.java @@ -38,7 +38,7 @@ import org.eclipse.team.examples.filesystem.subscriber.FileSystemSubscriber; * to register this provider with the Team extension point <code>org.eclipse.team.core.repository</code>. * The plugin.xml file also contains examples of how to filter menu items using a repository provider's * ID. - * + * * <p> * This example provider illustrates the following: * <ol> @@ -46,7 +46,7 @@ import org.eclipse.team.examples.filesystem.subscriber.FileSystemSubscriber; * <li>storage of a persistent property with the project (which provides the target location for the provider) * <li>access to an instance of <code>SimpleAccessOperations</code> for performing simple file operations * </ol> - * + * * <p> * Additional functionality that will be illustrated in the future include: * <ol> @@ -57,38 +57,38 @@ import org.eclipse.team.examples.filesystem.subscriber.FileSystemSubscriber; * <li>Use of decorators * <li>combining streams and progress monitors to get responsive UI * </ol> - * + * */ public class FileSystemProvider extends RepositoryProvider { - + /* * Create a custom rule factory to allow more optimistic concurrency */ private static final ResourceRuleFactory RESOURCE_RULE_FACTORY = new ResourceRuleFactory() { // Just need a subclass to instantiate }; - + // The location of the folder on file system where the repository is stored. private IPath root; - + // The QualifiedName that is used to persist the location across workspace as a persistent property on a resource private static QualifiedName FILESYSTEM_REPO_LOC = new QualifiedName(FileSystemPlugin.ID, "disk_location"); //$NON-NLS-1$ private static FileSystemHistoryProvider fileHistoryProvider; - + /** * Create a new FileSystemProvider. */ public FileSystemProvider() { super(); } - + /** * This method is invoked when the provider is mapped to a project. - * Although we have access to the project at this point (using + * Although we have access to the project at this point (using * <code>getProject()</code>, we don't know the root location so * there is nothing we can do yet. - * + * * @see org.eclipse.team.core.RepositoryProvider#configureProject() */ @Override @@ -99,7 +99,7 @@ public class FileSystemProvider extends RepositoryProvider { /** * This method is invoked when the provider is unmapped from its * project. - * + * * @see org.eclipse.core.resources.IProjectNature#deconfigure() */ @Override @@ -111,33 +111,33 @@ public class FileSystemProvider extends RepositoryProvider { /** * Return the provider ID as specified in the plugin.xml - * + * * @see RepositoryProvider#getID() */ @Override public String getID() { return FileSystemPlugin.PROVIDER_ID; } - + /** - * Set the file system location for the provider. This mist be invoked after - * the provider is mapped and configured but before the provider is used to + * Set the file system location for the provider. This mist be invoked after + * the provider is mapped and configured but before the provider is used to * perform any operations. - * + * * @param location the path representing the location where the project contents will be stored. * @throws TeamException */ public void setTargetLocation(String location) throws TeamException { - + // set the instance variable to the provided path root = new Path(location); - + // ensure that the location is a folder (if it exists) File file = new File(location); if (file.exists() && !file.isDirectory()) { throw new TeamException(Policy.bind("FileSystemProvider.mustBeFolder", location)); //$NON-NLS-1$ } - + // record the location as a persistant property so it will be remembered across platform invokations try { getProject().setPersistentProperty(FILESYSTEM_REPO_LOC, location); @@ -145,12 +145,12 @@ public class FileSystemProvider extends RepositoryProvider { throw FileSystemPlugin.wrapException(e); } } - + /** * Returns the folder in the file system to which the provider is connected. * Return <code>null</code> if there is no location or there was a problem * determining it. - * + * * @return IPath The path to the root of the repository. */ public IPath getRoot() { @@ -171,13 +171,13 @@ public class FileSystemProvider extends RepositoryProvider { } /** - * Return an object that provides the operations for transfering data + * Return an object that provides the operations for transfering data * to and from the provider's location. */ public FileSystemOperations getOperations() { return new FileSystemOperations(this); } - + @Override public IFileModificationValidator getFileModificationValidator() { return getFileModificationValidator2(); @@ -187,7 +187,7 @@ public class FileSystemProvider extends RepositoryProvider { public FileModificationValidator getFileModificationValidator2() { return new org.eclipse.team.examples.filesystem.FileModificationValidator(this); } - + /** * Return the resource variant for the local resource using the bytes to * identify the variant. @@ -201,7 +201,7 @@ public class FileSystemProvider extends RepositoryProvider { if (file == null) return null; return new FileSystemResourceVariant(file, bytes); } - + /** * Return the resource variant for the local resource. * @param resource the resource @@ -212,7 +212,7 @@ public class FileSystemProvider extends RepositoryProvider { if (file == null || !file.exists()) return null; return new FileSystemResourceVariant(file); } - + /** * Return the <code>java.io.File</code> that the given resource maps to. * Return <code>null</code> if the resource is not a child of this provider's @@ -227,12 +227,12 @@ public class FileSystemProvider extends RepositoryProvider { } return null; } - + @Override public IResourceRuleFactory getRuleFactory() { return RESOURCE_RULE_FACTORY; } - + @Override public IFileHistoryProvider getFileHistoryProvider() { if (FileSystemProvider.fileHistoryProvider == null) { diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemProviderType.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemProviderType.java index 0f518fb6c..6bede669a 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemProviderType.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemProviderType.java @@ -20,7 +20,7 @@ import org.eclipse.team.core.RepositoryProviderType; * The file system repository provider types */ public class FileSystemProviderType extends RepositoryProviderType { - + @Override public ProjectSetCapability getProjectSetCapability() { // Create an empty project set capability to test backwards compatibility diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/Policy.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/Policy.java index 2e66c29ae..e977971f7 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/Policy.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/Policy.java @@ -22,27 +22,27 @@ import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.core.runtime.OperationCanceledException; /** - * This class is a clone of the Policy classes many Eclipse plugin use to + * This class is a clone of the Policy classes many Eclipse plugin use to * provide NLSing of strings and aid in proper progress monitoring. */ public class Policy { - + private static ResourceBundle bundle = null; private static final String bundleName = "org.eclipse.team.examples.filesystem.messages"; //$NON-NLS-1$ /* - * Returns a resource bundle, creating one if it none is available. + * Returns a resource bundle, creating one if it none is available. */ private static ResourceBundle getResourceBundle() { // thread safety ResourceBundle tmpBundle = bundle; if (tmpBundle != null) return tmpBundle; - // always create a new classloader to be passed in + // always create a new classloader to be passed in // in order to prevent ResourceBundle caching return bundle = ResourceBundle.getBundle(bundleName); } - + /** * Lookup the message with the given ID in this catalog and bind its * substitution locations with the given string. @@ -50,7 +50,7 @@ public class Policy { public static String bind(String id, String binding) { return bind(id, new String[] { binding }); } - + /** * Lookup the message with the given ID in this catalog and bind its * substitution locations with the given strings. @@ -58,7 +58,7 @@ public class Policy { public static String bind(String id, String binding1, String binding2) { return bind(id, new String[] { binding1, binding2 }); } - + /** * Gets a string from the resource bundle. We don't want to crash because of a missing String. * Returns the key if not found. @@ -72,9 +72,9 @@ public class Policy { return "!" + key + "!"; //$NON-NLS-1$ //$NON-NLS-2$ } } - + /** - * Gets a string from the resource bundle and binds it with the given arguments. If the key is + * Gets a string from the resource bundle and binds it with the given arguments. If the key is * not found, return the key. */ public static String bind(String key, Object[] args) { @@ -86,7 +86,7 @@ public class Policy { return "!" + key + "!"; //$NON-NLS-1$ //$NON-NLS-2$ } } - + /** * Progress monitor helpers */ @@ -94,10 +94,10 @@ public class Policy { if (monitor.isCanceled()) throw new OperationCanceledException(); } - + public static IProgressMonitor monitorFor(IProgressMonitor monitor) { if (monitor == null) return new NullProgressMonitor(); return monitor; - } + } } diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemMergeContext.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemMergeContext.java index 2e8d003ed..b34651638 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemMergeContext.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemMergeContext.java @@ -61,12 +61,12 @@ public class FileSystemMergeContext extends SubscriberMergeContext { throws CoreException { markAsMerged(diff, false, monitor); } - + @Override public ISchedulingRule getMergeRule(IDiff node) { return ResourceDiffTree.getResourceFor(node).getProject(); } - + @Override public IStatus merge(IDiff diff, boolean ignoreLocalChanges, IProgressMonitor monitor) throws CoreException { // Only attempt the merge for non-conflicts. The reason we do this @@ -83,5 +83,5 @@ public class FileSystemMergeContext extends SubscriberMergeContext { } return super.merge(diff, ignoreLocalChanges, monitor); } - + } diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemRemoteTree.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemRemoteTree.java index a6dd1acce..ec48dda0f 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemRemoteTree.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemRemoteTree.java @@ -26,7 +26,7 @@ import org.eclipse.team.examples.filesystem.FileSystemProvider; * the ability to traverse the file system for the creation of resource variants. */ public class FileSystemRemoteTree extends ThreeWayRemoteTree { - + /** * Create the file system remote resource variant tree * @param subscriber the file system subscriber @@ -34,12 +34,12 @@ public class FileSystemRemoteTree extends ThreeWayRemoteTree { public FileSystemRemoteTree(FileSystemSubscriber subscriber) { super(subscriber); } - + @Override protected IResourceVariant[] fetchMembers(IResourceVariant variant, IProgressMonitor progress) { return ((FileSystemResourceVariant)variant).members(); } - + @Override protected IResourceVariant fetchVariant(IResource resource, int depth, IProgressMonitor monitor) { RepositoryProvider provider = RepositoryProvider.getProvider(resource.getProject(), FileSystemPlugin.PROVIDER_ID); diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemResourceVariant.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemResourceVariant.java index f52203578..768c85c87 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemResourceVariant.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemResourceVariant.java @@ -33,10 +33,10 @@ import org.eclipse.team.examples.filesystem.FileSystemPlugin; * cache the contents of the resource variant. */ public class FileSystemResourceVariant extends CachedResourceVariant { - + private java.io.File ioFile; private byte[] bytes; - + /** * Create a resource variant for the given file. The bytes will * be calculated when they are accessed. @@ -45,7 +45,7 @@ public class FileSystemResourceVariant extends CachedResourceVariant { public FileSystemResourceVariant(java.io.File file) { this.ioFile = file; } - + /** * Create a resource variant for the given file and sync bytes. * @param file the file @@ -55,24 +55,24 @@ public class FileSystemResourceVariant extends CachedResourceVariant { this.ioFile = file; this.bytes = bytes; } - + @Override protected void fetchContents(IProgressMonitor monitor) throws TeamException { setContents(getContents(), monitor); } - + @Override protected String getCachePath() { // append the timestamp to the file path to give each variant a unique path return getFilePath() + " " + ioFile.lastModified(); //$NON-NLS-1$ } - + private String getFilePath() { try { return ioFile.getCanonicalPath(); } catch (IOException e) { // Failed for some reason. Try the absolute path. - FileSystemPlugin.log(new Status(IStatus.ERROR, FileSystemPlugin.ID, 0, + FileSystemPlugin.log(new Status(IStatus.ERROR, FileSystemPlugin.ID, 0, "Failed to obtain canonical path for " + ioFile.getAbsolutePath(), e)); //$NON-NLS-1$ return ioFile.getAbsolutePath(); } @@ -82,30 +82,30 @@ public class FileSystemResourceVariant extends CachedResourceVariant { protected String getCacheId() { return FileSystemPlugin.ID; } - + @Override public String getName() { return ioFile.getName(); } - + @Override public boolean isContainer() { return ioFile.isDirectory(); } - + @Override public String getContentIdentifier() { // Use the modification timestamp as the content identifier return new Date(ioFile.lastModified()).toString(); } - + @Override public byte[] asBytes() { if (bytes == null) { // For simplicity, convert the timestamp to it's string representation. // A more optimal storage format would be the 8 bytes that make up the long. bytes = Long.toString(ioFile.lastModified()).getBytes(); - } + } return bytes; } @@ -138,7 +138,7 @@ public class FileSystemResourceVariant extends CachedResourceVariant { throw new TeamException("Failed to fetch contents for " + getFilePath(), e); //$NON-NLS-1$ } } - + public java.io.File getFile(){ return ioFile; } diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemSyncInfo.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemSyncInfo.java index 6dfe3e7fa..612cc1016 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemSyncInfo.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/subscriber/FileSystemSyncInfo.java @@ -20,7 +20,7 @@ import org.eclipse.team.core.variants.IResourceVariant; import org.eclipse.team.core.variants.IResourceVariantComparator; /** - * Provide a custom sync info that will report files that exist both + * Provide a custom sync info that will report files that exist both * locally and remotely as in-sync and will return a null base if there * is an incoming change. */ @@ -39,7 +39,7 @@ public class FileSystemSyncInfo extends SyncInfo { } return super.calculateKind(); } - + @Override public IResourceVariant getBase() { // If the kind has been set and there is an incoming change diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ConfigurationWizard.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ConfigurationWizard.java index 73826aa8b..02a7f59b3 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ConfigurationWizard.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ConfigurationWizard.java @@ -34,11 +34,11 @@ import org.eclipse.ui.IWorkbench; * in order to obtain a target location on disk. */ public class ConfigurationWizard extends Wizard implements IConfigurationWizard, IAdaptable { - + IProject[] projects; - + FileSystemMainPage mainPage; - + public ConfigurationWizard() { // retrieve the remembered dialog settings IDialogSettings workbenchSettings = FileSystemPlugin.getPlugin().getDialogSettings(); @@ -51,13 +51,13 @@ public class ConfigurationWizard extends Wizard implements IConfigurationWizard, /** * Remember the project so we can map it on finish - * + * * @see org.eclipse.team.ui.IConfigurationWizard#init(IWorkbench, IProject) */ public void init(IWorkbench workbench, IProject project) { setProjects(new IProject[] { project } ); } - + public void addPages() { mainPage = new FileSystemMainPage( "FileSystemMainPage", //$NON-NLS-1$ @@ -66,7 +66,7 @@ public class ConfigurationWizard extends Wizard implements IConfigurationWizard, null); addPage(mainPage); } - + /* * Using the information entered in the main page set the provider for * the given project. diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/DisconnectAction.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/DisconnectAction.java index b945dc303..1a8fd0eb8 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/DisconnectAction.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/DisconnectAction.java @@ -25,7 +25,7 @@ import org.eclipse.team.internal.ui.actions.TeamAction; * Action for getting the contents of the selected resources */ public class DisconnectAction extends TeamAction { - + @Override protected void execute(IAction action) { IProject projects[] = getSelectedProjects(); @@ -35,9 +35,9 @@ public class DisconnectAction extends TeamAction { } } catch (TeamException e) { ErrorDialog.openError(getShell(), Policy.bind("DisconnectAction.errorTitle"), null, e.getStatus()); //$NON-NLS-1$ - } + } } - + @Override public boolean isEnabled() { return true; diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemHistoryPage.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemHistoryPage.java index 3353f807b..56befec75 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemHistoryPage.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemHistoryPage.java @@ -78,7 +78,7 @@ public class FileSystemHistoryPage extends HistoryPage { if (fileHistory != null && !shutdown) { fileHistory.refresh(monitor); - //Internal code used for convenience - you can use + //Internal code used for convenience - you can use //your own here Utils.asyncExec((Runnable) () -> tableViewer.setInput(fileHistory), tableViewer); } diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemPropertiesPage.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemPropertiesPage.java index b837bc758..3af27bd35 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemPropertiesPage.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemPropertiesPage.java @@ -23,16 +23,16 @@ import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Label; import org.eclipse.ui.dialogs.PropertyPage; /* - * A property page which displays the file system specific properties + * A property page which displays the file system specific properties * for the selected resource. */ public class FileSystemPropertiesPage extends PropertyPage { // The resource to show properties for protected IResource resource; - /* + /* * Creates a key-value property pair in the given parent. - * + * * @param parent the parent for the labels * @param left the string for the left label * @param right the string for the right label @@ -40,7 +40,7 @@ public class FileSystemPropertiesPage extends PropertyPage { protected void createPair(Composite parent, String left, String right) { Label label = new Label(parent, SWT.NONE); label.setText(left); - + label = new Label(parent, SWT.NONE); label.setText(right); label.setToolTipText(right); @@ -50,7 +50,7 @@ public class FileSystemPropertiesPage extends PropertyPage { /* * Returns the element selected when the properties was run * @return the selected element - */ + */ protected IResource getSelectedElement() { // get the resource that is the source of this property page IResource resource = null; @@ -65,7 +65,7 @@ public class FileSystemPropertiesPage extends PropertyPage { } return resource; } - + @Override protected Control createContents(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); @@ -74,7 +74,7 @@ public class FileSystemPropertiesPage extends PropertyPage { layout.marginHeight = layout.marginWidth = 0; composite.setLayout(layout); composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - + return composite; } } diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemRevisionEditorInput.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemRevisionEditorInput.java index aa64f1f51..f2170e894 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemRevisionEditorInput.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemRevisionEditorInput.java @@ -105,7 +105,7 @@ public class FileSystemRevisionEditorInput extends PlatformObject implements IWo else if (adapter == IFileState.class){ if (storage != null && storage instanceof IFileState) return adapter.cast(storage); - } + } return super.getAdapter(adapter); } 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 fbb9e5e13..18fe42a7b 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 @@ -136,13 +136,13 @@ public class FileSystemTableProvider { private boolean reversed = false; private int columnNumber; - // column headings: "Type" "Date" + // column headings: "Type" "Date" private int[][] SORT_ORDERS_BY_COLUMN = { {COL_DATE, COL_TYPE} /* date */, {COL_TYPE, COL_DATE} /* type */ }; /** * The constructor. - * @param columnNumber + * @param columnNumber */ public HistorySorter(int columnNumber) { this.columnNumber = columnNumber; @@ -211,7 +211,7 @@ public class FileSystemTableProvider { /** * Sets the sorting order. - * @param newReversed + * @param newReversed */ public void setReversed(boolean newReversed) { reversed = newReversed; diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/GetAction.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/GetAction.java index 29bffdd2d..859e57085 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/GetAction.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/GetAction.java @@ -25,7 +25,7 @@ public class GetAction extends FileSystemAction { protected void execute(IAction action) { try { - GetOperation operation = new GetOperation(getTargetPart(), + GetOperation operation = new GetOperation(getTargetPart(), FileSystemOperation.createScopeManager(Policy.bind("GetAction.working"), getSelectedMappings())); //$NON-NLS-1$ operation.setOverwriteOutgoing(isOverwriteOutgoing()); operation.run(); @@ -35,7 +35,7 @@ public class GetAction extends FileSystemAction { // Ignore } } - + /** * Indicate whether the action should overwrite outgoing changes. * By default, the get action does not override local modifications. diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/GetOperation.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/GetOperation.java index b22573688..6bda30314 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/GetOperation.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/GetOperation.java @@ -65,7 +65,7 @@ public class GetOperation extends FileSystemOperation { } return false; } - + /** * Indicate whether the operation should overwrite outgoing changes. * By default, the get operation does not override local modifications. @@ -82,7 +82,7 @@ public class GetOperation extends FileSystemOperation { public void setOverwriteOutgoing(boolean overwriteOutgoing) { this.overwriteOutgoing = overwriteOutgoing; } - + @Override protected String getTaskName() { return Policy.bind("GetAction.working"); //$NON-NLS-1$ diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/MergeAction.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/MergeAction.java index 28ea4f954..6f3c51e49 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/MergeAction.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/MergeAction.java @@ -22,7 +22,7 @@ import org.eclipse.team.ui.synchronize.ModelMergeOperation; * This merge action is contributed as a a popupmenu objectContribution in * the plugin.xml. You can change the value return from {@link #isUseSyncFramework()} * to try out different dialogs. - * + * * @since 3.2 */ public class MergeAction extends FileSystemAction { diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/NonSyncMergeDialog.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/NonSyncMergeDialog.java index bd1b7e676..d267ad1e3 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/NonSyncMergeDialog.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/NonSyncMergeDialog.java @@ -23,7 +23,7 @@ import org.eclipse.team.ui.ISaveableWorkbenchPart; import org.eclipse.team.ui.SaveablePartDialog; /** - * A dialog that can be used to merge conflicting model elements without + * A dialog that can be used to merge conflicting model elements without * using the Synchronization framework. This is experimental. * See {@link NonSyncModelMergeOperation} * for a description of this work flow and its shortcomings. @@ -36,11 +36,11 @@ public class NonSyncMergeDialog extends SaveablePartDialog { NonSyncMergeDialog dialog = new NonSyncMergeDialog(operation.getShell(), part); dialog.open(); } - + public NonSyncMergeDialog(Shell shell, ISaveableWorkbenchPart input) { super(shell, input); } - + protected void buttonPressed(int buttonId) { if (buttonId == OK) { NonSyncMergePart part = (NonSyncMergePart)getInput(); @@ -55,7 +55,7 @@ public class NonSyncMergeDialog extends SaveablePartDialog { private boolean hasUnmergedChanges(IMergeContext context) { return context.getDiffTree().hasMatchingDiffs( - ResourcesPlugin.getWorkspace().getRoot().getFullPath(), + ResourcesPlugin.getWorkspace().getRoot().getFullPath(), new FastDiffFilter() { public boolean select(IDiff diff) { if (diff instanceof IThreeWayDiff) { 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 98d224c03..2f21a6425 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 @@ -39,7 +39,7 @@ import org.eclipse.team.ui.mapping.ISynchronizationCompareInput; * to show a manual merge. */ public class NonSyncMergePart extends PageSaveablePart { - + private final NonSyncModelMergePage page; protected NonSyncMergePart(Shell shell, CompareConfiguration compareConfiguration, NonSyncModelMergePage page) { @@ -70,7 +70,7 @@ public class NonSyncMergePart extends PageSaveablePart { } return null; } - + protected static ISynchronizationCompareAdapter getCompareAdapter(Object element) { if (element instanceof ResourceMapping) { ResourceMapping mapping = (ResourceMapping) element; diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/NonSyncModelMergeOperation.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/NonSyncModelMergeOperation.java index a2453c77d..2bf8997e3 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/NonSyncModelMergeOperation.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/NonSyncModelMergeOperation.java @@ -64,7 +64,7 @@ public class NonSyncModelMergeOperation extends ModelMergeOperation { // Create the context context = new FileSystemMergeContext(getScopeManager()); // Refresh the context to get the latest remote state - context.refresh(getScope().getTraversals(), + context.refresh(getScope().getTraversals(), RemoteResourceMappingContext.FILE_CONTENTS_REQUIRED, SubMonitor.convert(monitor, 75)); // What for the context to asynchronously update the diff tree try { @@ -76,12 +76,12 @@ public class NonSyncModelMergeOperation extends ModelMergeOperation { monitor.done(); } } - + @Override protected ISynchronizationContext getContext() { return context; } - + /** * Handle the preview request by opening a dialog that allows the user to manually merge * any changes. @@ -93,7 +93,7 @@ public class NonSyncModelMergeOperation extends ModelMergeOperation { // after the dialog closes Display.getDefault().syncExec(() -> NonSyncMergeDialog.openFor(NonSyncModelMergeOperation.this)); } - + @Override public Shell getShell() { // Change method to public diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/PutAction.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/PutAction.java index 3eb0292cf..8d412b2fb 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/PutAction.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/PutAction.java @@ -25,7 +25,7 @@ public class PutAction extends FileSystemAction { protected void execute(IAction action) { try { - PutOperation operation = new PutOperation(getTargetPart(), + PutOperation operation = new PutOperation(getTargetPart(), FileSystemOperation.createScopeManager(Policy.bind("PutAction.working"), getSelectedMappings())); //$NON-NLS-1$ operation.setOverwriteIncoming(isOverrideIncoming()); operation.run(); @@ -35,7 +35,7 @@ public class PutAction extends FileSystemAction { // Ignore } } - + /** * Indicate whether the put should override incoming changes. * @return whether the put should override incoming changes. diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ReplaceAction.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ReplaceAction.java index 5a068bbf4..ff3ae5e1a 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ReplaceAction.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/ReplaceAction.java @@ -18,7 +18,7 @@ package org.eclipse.team.examples.filesystem.ui; * A replace is simply a get that overwrite local changes */ public class ReplaceAction extends GetAction { - + @Override protected boolean isOverwriteOutgoing() { return true; diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/SynchronizeAction.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/SynchronizeAction.java index 12ae429ef..95b9b214d 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/SynchronizeAction.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/SynchronizeAction.java @@ -26,7 +26,7 @@ import org.eclipse.team.ui.synchronize.ISynchronizeParticipant; * in a file-system participant being added to the synchronize view. */ public class SynchronizeAction extends FileSystemAction { - + protected void execute(IAction action) { ResourceMapping[] mappings = getSelectedMappings(); if (mappings.length == 0) diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/SynchronizeWizard.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/SynchronizeWizard.java index fab46cd5a..381844d55 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/SynchronizeWizard.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/SynchronizeWizard.java @@ -7,7 +7,7 @@ * https://www.eclipse.org/legal/epl-2.0/ * * SPDX-License-Identifier: EPL-2.0 - * + * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ @@ -27,7 +27,7 @@ import org.eclipse.team.ui.synchronize.ModelParticipantWizard; */ public class SynchronizeWizard extends ModelParticipantWizard { private IWizard importWizard; - + /* * Default no-arg constructor */ 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 2b041eb7c..33a92331c 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 @@ -36,15 +36,15 @@ import org.eclipse.team.ui.synchronize.SynchronizeModelOperation; import org.eclipse.team.ui.synchronize.SynchronizePageActionGroup; public class LocalHistoryParticipant extends SubscriberParticipant { - + public static final String ID = "org.eclipse.team.synchronize.example"; //$NON-NLS-1$ public static final String CONTEXT_MENU_CONTRIBUTION_GROUP = "context_group_1"; //$NON-NLS-1$ - + private class LocalHistoryActionContribution extends SynchronizePageActionGroup { public void initialize(ISynchronizePageConfiguration configuration) { super.initialize(configuration); appendToGroup( - ISynchronizePageConfiguration.P_CONTEXT_MENU, CONTEXT_MENU_CONTRIBUTION_GROUP, + ISynchronizePageConfiguration.P_CONTEXT_MENU, CONTEXT_MENU_CONTRIBUTION_GROUP, new SynchronizeModelAction("Revert to latest in local history", configuration) { //$NON-NLS-1$ protected SynchronizeModelOperation getSubscriberOperation(ISynchronizePageConfiguration configuration, IDiffElement[] elements) { return new RevertAllOperation(configuration, elements); @@ -52,7 +52,7 @@ public class LocalHistoryParticipant extends SubscriberParticipant { }); } } - + private class LocalHistoryDecorator extends LabelProvider implements ILabelDecorator { public String decorateText(String text, Object element) { if(element instanceof ISynchronizeModelElement) { @@ -67,16 +67,16 @@ public class LocalHistoryParticipant extends SubscriberParticipant { } return text; } - + public Image decorateImage(Image image, Object element) { return null; } } - + public LocalHistoryParticipant() { setSubscriber(new LocalHistorySubscriber()); } - + protected void setSubscriber(Subscriber subscriber) { super.setSubscriber(subscriber); try { @@ -87,23 +87,23 @@ public class LocalHistoryParticipant extends SubscriberParticipant { // ignore } } - + protected void initializeConfiguration(ISynchronizePageConfiguration configuration) { super.initializeConfiguration(configuration); configuration.addMenuGroup( - ISynchronizePageConfiguration.P_CONTEXT_MENU, + ISynchronizePageConfiguration.P_CONTEXT_MENU, CONTEXT_MENU_CONTRIBUTION_GROUP); configuration.addActionContribution(new LocalHistoryActionContribution()); - configuration.addLabelDecorator(new LocalHistoryDecorator()); + configuration.addLabelDecorator(new LocalHistoryDecorator()); } - + protected static SyncInfo getSyncInfo(ISynchronizeModelElement element) { if (element instanceof IAdaptable) { return ((IAdaptable)element).getAdapter(SyncInfo.class); } return null; } - + public void prepareCompareInput(ISynchronizeModelElement element, CompareConfiguration config, IProgressMonitor monitor) throws TeamException { diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistorySyncInfo.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistorySyncInfo.java index 0e8d9d307..a48ffae1c 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistorySyncInfo.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistorySyncInfo.java @@ -20,7 +20,7 @@ import org.eclipse.team.core.variants.IResourceVariant; import org.eclipse.team.core.variants.IResourceVariantComparator; public class LocalHistorySyncInfo extends SyncInfo { - + public LocalHistorySyncInfo(IResource local, IResourceVariant remote, IResourceVariantComparator comparator) { super(local, null, remote, comparator); } diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistorySynchronizeWizard.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistorySynchronizeWizard.java index 5955ef028..8ccd50c17 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistorySynchronizeWizard.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistorySynchronizeWizard.java @@ -31,7 +31,7 @@ import org.eclipse.team.ui.synchronize.ISynchronizeParticipant; public class LocalHistorySynchronizeWizard extends Wizard { - private class MessagePage extends WizardPage { + private class MessagePage extends WizardPage { protected MessagePage(String pageName, String title, ImageDescriptor titleImage) { super(pageName, title, titleImage); } @@ -46,11 +46,11 @@ public class LocalHistorySynchronizeWizard extends Wizard { setControl(top); } } - + public LocalHistorySynchronizeWizard() { super(); } - + public void addPages() { addPage(new MessagePage("Local History", "Create a local history synchronization", TeamImages.getImageDescriptor(ITeamUIImages.IMG_WIZBAN_SHARE))); //$NON-NLS-1$//$NON-NLS-2$ } diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistoryVariant.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistoryVariant.java index c9f9880ab..f0fda34d3 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistoryVariant.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistoryVariant.java @@ -28,7 +28,7 @@ public class LocalHistoryVariant implements IResourceVariant { public LocalHistoryVariant(IFileState state) { this.state = state; } - + public String getName() { return state.getName(); } @@ -48,7 +48,7 @@ public class LocalHistoryVariant implements IResourceVariant { public byte[] asBytes() { return null; } - + public IFileState getFileState() { return state; } diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/RevertAllOperation.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/RevertAllOperation.java index 17a163aac..d7faed24a 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/RevertAllOperation.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/RevertAllOperation.java @@ -27,7 +27,7 @@ public class RevertAllOperation extends SynchronizeModelOperation { protected RevertAllOperation(ISynchronizePageConfiguration configuration, IDiffElement[] elements) { super(configuration, elements); } - + protected boolean canRunAsJob() { return true; } @@ -35,7 +35,7 @@ public class RevertAllOperation extends SynchronizeModelOperation { public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { final SyncInfo infos[] = getSyncInfoSet().getSyncInfos(); if(infos.length == 0) return; - + WorkspaceModifyOperation operation= new WorkspaceModifyOperation() { public void execute(IProgressMonitor pm) throws InvocationTargetException { try { diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelFile.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelFile.java index bc90f164e..b8e444c96 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelFile.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelFile.java @@ -20,7 +20,7 @@ public abstract class ModelFile extends ModelResource { protected ModelFile(IFile file) { super(file); } - + public String getName() { String name = super.getName(); int index = name.lastIndexOf("."); diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelObject.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelObject.java index a6f9101aa..b6d13889d 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelObject.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelObject.java @@ -34,7 +34,7 @@ public abstract class ModelObject extends PlatformObject { } return null; } - + /** * Return the name of the model object. * @return the name of the model object diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelObjectElementFile.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelObjectElementFile.java index c6a54c4b5..fab575f3f 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelObjectElementFile.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelObjectElementFile.java @@ -20,13 +20,13 @@ import org.eclipse.core.runtime.CoreException; public class ModelObjectElementFile extends ModelFile { public static final String MODEL_OBJECT_ELEMENTFILE_EXTENSION = "moe"; - + private final ModelObjectDefinitionFile parent; public static boolean isMoeFile(IResource resource) { return resource instanceof IFile && MODEL_OBJECT_ELEMENTFILE_EXTENSION.equals(resource.getFileExtension()); } - + public ModelObjectElementFile(ModelObjectDefinitionFile parent, IFile file) { super(file); this.parent = parent; @@ -35,11 +35,11 @@ public class ModelObjectElementFile extends ModelFile { public ModelObject[] getChildren() { return new ModelObject[0]; } - + public ModelObject getParent() { return parent; } - + public void delete() throws CoreException { parent.remove(this); super.delete(); diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelResource.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelResource.java index 47f12a6e2..8be1f3e96 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelResource.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelResource.java @@ -33,11 +33,11 @@ import org.eclipse.core.runtime.CoreException; * <li>Model object folders correspond to workspace folders but only show child * folders and MOD files when expanded.</li> * </ol> - * + * */ public abstract class ModelResource extends ModelObject{ private final IResource resource; - + protected ModelResource(IResource resource) { this.resource = resource; } @@ -45,22 +45,22 @@ public abstract class ModelResource extends ModelObject{ public IResource getResource() { return resource; } - + @Override public String getName() { return getResource().getName(); } - + @Override public String getPath() { return getResource().getFullPath().makeRelative().toString(); } - + @Override public ModelObject getParent() { return ModelObject.create(getResource().getParent()); } - + @Override public boolean equals(Object obj) { if (obj instanceof ModelResource) { @@ -69,17 +69,17 @@ public abstract class ModelResource extends ModelObject{ } return super.equals(obj); } - + @Override public int hashCode() { return getResource().hashCode(); } - + @Override public void delete() throws CoreException { getResource().delete(false, null); } - + @Override public ModelProject getProject() { return (ModelProject)ModelObject.create(getResource().getProject()); diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelWorkspace.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelWorkspace.java index 38c74c7de..2af814d62 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelWorkspace.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ModelWorkspace.java @@ -20,11 +20,11 @@ public class ModelWorkspace extends ModelContainer { protected ModelWorkspace() { super(ResourcesPlugin.getWorkspace().getRoot()); } - + public String getName() { return "Model Root"; } - + public ModelObject getParent() { return null; } diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/ModelContainerResourceMapping.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/ModelContainerResourceMapping.java index 29e096830..c0bc16a25 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/ModelContainerResourceMapping.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/ModelContainerResourceMapping.java @@ -31,8 +31,8 @@ public class ModelContainerResourceMapping extends ModelResourceMapping { @Override public ResourceTraversal[] getTraversals(ResourceMappingContext context, IProgressMonitor monitor) { - return new ResourceTraversal[] { - new ResourceTraversal(new IResource[] { + return new ResourceTraversal[] { + new ResourceTraversal(new IResource[] { getResource() }, IResource.DEPTH_INFINITE, IResource.NONE) }; @@ -41,7 +41,7 @@ public class ModelContainerResourceMapping extends ModelResourceMapping { private IResource getResource() { return ((ModelContainer)getModelObject()).getResource(); } - + @Override public boolean contains(ResourceMapping mapping) { if (mapping instanceof ModelResourceMapping) { diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/ModelResourceMapping.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/ModelResourceMapping.java index c5177587b..9de525a3d 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/ModelResourceMapping.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/ModelResourceMapping.java @@ -36,11 +36,11 @@ public abstract class ModelResourceMapping extends ResourceMapping { } return null; } - + protected ModelResourceMapping(ModelObject object) { this.object = object; } - + @Override public Object getModelObject() { return object; diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/MoeResourceMapping.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/MoeResourceMapping.java index 0c515c4a6..41f5b10da 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/MoeResourceMapping.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/mapping/MoeResourceMapping.java @@ -30,8 +30,8 @@ public class MoeResourceMapping extends ModelResourceMapping { @Override public ResourceTraversal[] getTraversals(ResourceMappingContext context, IProgressMonitor monitor) { - return new ResourceTraversal[] { - new ResourceTraversal(new IResource[] { + return new ResourceTraversal[] { + new ResourceTraversal(new IResource[] { getResource() }, IResource.DEPTH_ZERO, IResource.NONE) }; @@ -40,7 +40,7 @@ public class MoeResourceMapping extends ModelResourceMapping { private IResource getResource() { return ((ModelResource)getModelObject()).getResource(); } - + @Override public boolean contains(ResourceMapping mapping) { if (mapping.equals(this)) diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/AdapterFactory.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/AdapterFactory.java index 06a1f7688..8d683d375 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/AdapterFactory.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/AdapterFactory.java @@ -32,7 +32,7 @@ public class AdapterFactory implements IAdapterFactory { private ModelMerger modelMerger; private CompareAdapter compareAdapter; private static Object historyPageSource = new FileSystemHistoryPageSource(); - + public <T> T getAdapter(Object adaptableObject, Class<T> adapterType) { if (adapterType == IWorkbenchAdapter.class && adaptableObject instanceof ModelObject) return adapterType.cast(modelAdapter); @@ -50,11 +50,11 @@ public class AdapterFactory implements IAdapterFactory { } return adapterType.cast(compareAdapter); } - + if (adapterType == IHistoryPageSource.class){ return adapterType.cast(historyPageSource); } - + return null; } diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/ModelNavigatorActionProvider.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/ModelNavigatorActionProvider.java index 2b4b7a191..d255cc2d7 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/ModelNavigatorActionProvider.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/ModelNavigatorActionProvider.java @@ -48,7 +48,7 @@ public class ModelNavigatorActionProvider extends CommonActionProvider { public ModelNavigatorActionProvider() { super(); } - + public void init(ICommonActionExtensionSite aSite) { super.init(aSite); createActions(); @@ -171,7 +171,7 @@ public class ModelNavigatorActionProvider extends CommonActionProvider { } }; } - + protected Shell getShell() { return getActionSite().getViewSite().getShell(); } @@ -202,7 +202,7 @@ public class ModelNavigatorActionProvider extends CommonActionProvider { } return null; } - + ModelObjectDefinitionFile getSelectedModFile() { IStructuredSelection selection = (IStructuredSelection)getContext().getSelection(); if (selection.size() == 1) { diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/ModelSaveable.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/ModelSaveable.java index 17feb69c5..6ed7280b9 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/ModelSaveable.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/ModelSaveable.java @@ -66,7 +66,7 @@ public class ModelSaveable extends Saveable { public boolean isDirty() { return dirty; } - + public void doSave(IProgressMonitor monitor) { dirty = false; modelSaveablesProvider.saved(this); diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/ModelWorkbenchAdapter.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/ModelWorkbenchAdapter.java index 8f4d7587b..81ca6cd20 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/ModelWorkbenchAdapter.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/ModelWorkbenchAdapter.java @@ -35,7 +35,7 @@ public class ModelWorkbenchAdapter implements IWorkbenchAdapter { // image path private static final String ICON_PATH = "$nl$/icons/full/"; //$NON-NLS-1$ - + @Override public Object[] getChildren(Object o) { if (o instanceof ModelObject) { @@ -86,7 +86,7 @@ public class ModelWorkbenchAdapter implements IWorkbenchAdapter { } return null; } - + /** * Creates an image descriptor. */ diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/NewModelProjectWizard.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/NewModelProjectWizard.java index 8fc7b5ac9..808d08435 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/NewModelProjectWizard.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/NewModelProjectWizard.java @@ -32,14 +32,14 @@ import org.eclipse.ui.internal.wizards.newresource.ResourceMessages; public class NewModelProjectWizard extends Wizard implements INewWizard { private WizardNewProjectCreationPage mainPage; - + public NewModelProjectWizard() { super(); } - + public void addPages() { super.addPages(); - + mainPage = new WizardNewProjectCreationPage("basicNewProjectPage");//$NON-NLS-1$ mainPage.setTitle(ResourceMessages.NewProject_title); mainPage.setDescription(ResourceMessages.NewProject_description); @@ -95,14 +95,14 @@ public class NewModelProjectWizard extends Wizard implements INewWizard { /** * Creates a project resource given the project handle and description. - * + * * @param description * the project description to create a project resource for * @param projectHandle * the project handle to create a project resource for * @param monitor * the progress monitor to show visual progress with - * + * * @exception CoreException * if the operation fails * @exception OperationCanceledException @@ -127,7 +127,7 @@ public class NewModelProjectWizard extends Wizard implements INewWizard { monitor.done(); } } - + public void init(IWorkbench workbench, IStructuredSelection selection) { // Nothing to do } diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/ModelSyncActionProvider.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/ModelSyncActionProvider.java index 2ae215a22..1c0d1f56f 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/ModelSyncActionProvider.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/ModelSyncActionProvider.java @@ -20,7 +20,7 @@ import org.eclipse.team.ui.synchronize.ISynchronizePageConfiguration; * The action provider that is used for synchronizations. */ public class ModelSyncActionProvider extends SynchronizationActionProvider { - + public ModelSyncActionProvider() { super(); } diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/ModelSyncLabelProvider.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/ModelSyncLabelProvider.java index 53cf0ecde..a7c32b569 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/ModelSyncLabelProvider.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/mapping/ModelSyncLabelProvider.java @@ -31,7 +31,7 @@ import org.eclipse.ui.navigator.ICommonContentExtensionSite; * overlay hints for isBusy, conflict propagation and markers. */ public class ModelSyncLabelProvider extends SynchronizationLabelProvider { - + private ModelNavigatorLabelProvider delegate; public ModelSyncLabelProvider() { @@ -44,19 +44,19 @@ public class ModelSyncLabelProvider extends SynchronizationLabelProvider { delegate = new ModelNavigatorLabelProvider(); delegate.init(site); } - + @Override public void dispose() { super.dispose(); if (delegate != null) delegate.dispose(); } - + @Override protected ILabelProvider getDelegateLabelProvider() { return delegate; } - + @Override protected IDiff getDiff(Object element) { if (element instanceof ModelResource) { @@ -65,12 +65,12 @@ public class ModelSyncLabelProvider extends SynchronizationLabelProvider { } return super.getDiff(element); } - + @Override protected boolean isIncludeOverlays() { return true; } - + @Override protected boolean isBusy(Object element) { if (element instanceof ModelResource) { @@ -93,7 +93,7 @@ public class ModelSyncLabelProvider extends SynchronizationLabelProvider { } return super.isBusy(element); } - + @Override protected boolean hasDecendantConflicts(Object element) { if (element instanceof ModelResource) { diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/IPessimisticFilesystemConstants.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/IPessimisticFilesystemConstants.java index 1c04de8d2..ce2d9b6c7 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/IPessimisticFilesystemConstants.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/IPessimisticFilesystemConstants.java @@ -16,7 +16,7 @@ package org.eclipse.team.examples.pessimistic; /** * Preference constants for the <code>PessimisticFilesystemProvider</code>. */ -public interface IPessimisticFilesystemConstants { +public interface IPessimisticFilesystemConstants { /** * Preference name's prefix */ @@ -46,7 +46,7 @@ public interface IPessimisticFilesystemConstants { * Preference name for the option to add files to the repository provider. */ String PREF_ADD_TO_CONTROL= PREFIX + "AddToControl"; - + /** * Preference option indicating that the user should be prompted. */ @@ -67,5 +67,5 @@ public interface IPessimisticFilesystemConstants { /** * Status flag indicating that resources need to be reloaded. */ - int STATUS_PROMPT_FOR_RELOAD = 2; + int STATUS_PROMPT_FOR_RELOAD = 2; } diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/IResourceStateListener.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/IResourceStateListener.java index 6eee9aeee..e65900bf1 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/IResourceStateListener.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/IResourceStateListener.java @@ -12,7 +12,7 @@ * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.team.examples.pessimistic; - + import org.eclipse.core.resources.IResource; /** diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/BlankPage.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/BlankPage.java index 14b8d8e03..3b3ab5a61 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/BlankPage.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/BlankPage.java @@ -12,7 +12,7 @@ * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.team.examples.pessimistic.ui; - + import org.eclipse.jface.wizard.WizardPage; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.GridLayout; diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/CheckInAction.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/CheckInAction.java index 0168b9932..e1a92c15a 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/CheckInAction.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/CheckInAction.java @@ -12,21 +12,21 @@ * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.team.examples.pessimistic.ui; - + import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.team.examples.pessimistic.PessimisticFilesystemProvider; /** - * Performs a check in on the selected resources. If a folder is + * Performs a check in on the selected resources. If a folder is * selected all of its children are recursively checked in. */ public class CheckInAction extends SourceManagementAction { /** - * Answers <code>true</code> if and only if the resource is + * Answers <code>true</code> if and only if the resource is * not null, controlled, not ignored, and is checked out. - * + * * @see PessimisticProviderAction#shouldEnableFor(IResource) */ @Override @@ -39,7 +39,7 @@ public class CheckInAction extends SourceManagementAction { if (!provider.isControlled(resource)) return false; if (provider.isIgnored(resource)) - return false; + return false; return provider.isCheckedout(resource); } diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/CheckOutAction.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/CheckOutAction.java index 38ca10a8e..be9666f86 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/CheckOutAction.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/CheckOutAction.java @@ -12,20 +12,20 @@ * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.team.examples.pessimistic.ui; - + import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.team.examples.pessimistic.PessimisticFilesystemProvider; /** - * Performs a check out on the selected resources. If a folder is + * Performs a check out on the selected resources. If a folder is * selected all of its children are recursively checked out. */ public class CheckOutAction extends SourceManagementAction { /** * Answers <code>true</code> if and only if the <code>resource</code> * is not <code>null</code>, controlled, not ignored and not checked out. - * + * * @see PessimisticProviderAction#shouldEnableFor(IResource) */ @Override @@ -41,7 +41,7 @@ public class CheckOutAction extends SourceManagementAction { return false; return !provider.isCheckedout(resource); } - + @Override protected void manageResources(PessimisticFilesystemProvider provider, IResource[] resources, IProgressMonitor monitor) { provider.checkout(resources, monitor); diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/ConfigurationWizard.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/ConfigurationWizard.java index 14c058d13..4a9354ed6 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/ConfigurationWizard.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/ConfigurationWizard.java @@ -12,7 +12,7 @@ * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.team.examples.pessimistic.ui; - + import org.eclipse.core.resources.IProject; import org.eclipse.jface.wizard.Wizard; import org.eclipse.team.core.RepositoryProvider; @@ -30,7 +30,7 @@ public class ConfigurationWizard extends Wizard implements IConfigurationWizard * The project in question. */ private IProject project; - + @Override public void addPages() { // workaround the wizard problem diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/PessimisticPreferencesPage.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/PessimisticPreferencesPage.java index d11067e20..0b11a2f64 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/PessimisticPreferencesPage.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/PessimisticPreferencesPage.java @@ -42,7 +42,7 @@ public class PessimisticPreferencesPage /* * Widget for the files are edited without a context preference */ - private Combo filesAreEditedNoPromptCombo; + private Combo filesAreEditedNoPromptCombo; /* * Widget for the files are saved preference */ @@ -59,47 +59,47 @@ public class PessimisticPreferencesPage * Widget for the fail validate edit preference */ private Button failValidateEdit; - + /* * Option strings for the files are edited preference. */ - private static final String[] EDIT_OPTION_STRINGS= - new String[] { - "Prompt to checkout", - "Checkout", + private static final String[] EDIT_OPTION_STRINGS= + new String[] { + "Prompt to checkout", + "Checkout", "Do nothing", }; /* * Option values for the files are edited preference. */ private static final int[] EDIT_OPTION_KEYS= - new int[] { + new int[] { IPessimisticFilesystemConstants.OPTION_PROMPT, IPessimisticFilesystemConstants.OPTION_AUTOMATIC, IPessimisticFilesystemConstants.OPTION_DO_NOTHING, }; - + /* * Option strings for the files are edited without a context preference. */ - private static final String[] EDIT_NO_PROMPT_OPTION_STRINGS= - new String[] { - "Checkout", - "Do nothing", }; + private static final String[] EDIT_NO_PROMPT_OPTION_STRINGS= + new String[] { + "Checkout", + "Do nothing", }; /* * Option strings for the files are saved preference. */ - private static final String[] SAVE_OPTION_STRINGS= - new String[] { - "Checkout", + private static final String[] SAVE_OPTION_STRINGS= + new String[] { + "Checkout", "Do nothing", }; /* * Option values for the files are saved preference. */ private static final int[] SAVE_OPTION_KEYS= - new int[] { + new int[] { IPessimisticFilesystemConstants.OPTION_AUTOMATIC, IPessimisticFilesystemConstants.OPTION_DO_NOTHING, }; - + /* * Option strings for the add to control preference. */ @@ -112,11 +112,11 @@ public class PessimisticPreferencesPage * Option values for the add to control preference. */ private static final int[] ADD_TO_CONTROL_OPTION_KEYS= - new int[] { + new int[] { IPessimisticFilesystemConstants.OPTION_PROMPT, IPessimisticFilesystemConstants.OPTION_AUTOMATIC, - IPessimisticFilesystemConstants.OPTION_DO_NOTHING, }; - + IPessimisticFilesystemConstants.OPTION_DO_NOTHING, }; + @Override protected IPreferenceStore doGetPreferenceStore() { @@ -161,13 +161,13 @@ public class PessimisticPreferencesPage gridData = new GridData(); gridData.horizontalSpan = 1; gridData.horizontalAlignment = GridData.FILL; - label.setLayoutData(gridData); + label.setLayoutData(gridData); filesAreEditedCombo= new Combo(options, SWT.BORDER | SWT.READ_ONLY); gridData = new GridData(); gridData.horizontalSpan= 1; gridData.horizontalAlignment = GridData.FILL; - filesAreEditedCombo.setLayoutData(gridData); + filesAreEditedCombo.setLayoutData(gridData); filesAreEditedCombo.setItems(EDIT_OPTION_STRINGS); label = new Label(options, SWT.NONE); @@ -175,22 +175,22 @@ public class PessimisticPreferencesPage gridData = new GridData(); gridData.horizontalSpan = 1; gridData.horizontalAlignment = GridData.FILL; - label.setLayoutData(gridData); + label.setLayoutData(gridData); filesAreEditedNoPromptCombo= new Combo(options, SWT.BORDER | SWT.READ_ONLY); gridData = new GridData(); gridData.horizontalSpan= 1; gridData.horizontalAlignment = GridData.FILL; - filesAreEditedNoPromptCombo.setLayoutData(gridData); + filesAreEditedNoPromptCombo.setLayoutData(gridData); filesAreEditedNoPromptCombo.setItems(EDIT_NO_PROMPT_OPTION_STRINGS); - + label = new Label(options, SWT.NONE); label.setText("When checked in files are saved:"); gridData = new GridData(); gridData.horizontalSpan = 1; gridData.horizontalAlignment = GridData.FILL; label.setLayoutData(gridData); - + filesAreSavedCombo= new Combo(options, SWT.BORDER | SWT.READ_ONLY); gridData = new GridData(); gridData.horizontalSpan = 1; @@ -204,7 +204,7 @@ public class PessimisticPreferencesPage gridData.horizontalSpan = 1; gridData.horizontalAlignment = GridData.FILL; label.setLayoutData(gridData); - + addToControlCombo= new Combo(options, SWT.BORDER | SWT.READ_ONLY); gridData = new GridData(); gridData.horizontalSpan = 1; @@ -253,7 +253,7 @@ public class PessimisticPreferencesPage filesAreSavedCombo.select( getSaveOptionIndex(store.getDefaultInt(IPessimisticFilesystemConstants.PREF_CHECKED_IN_FILES_SAVED))); addToControlCombo.select( - getAddToControlOptionIndex(store.getDefaultInt(IPessimisticFilesystemConstants.PREF_ADD_TO_CONTROL))); + getAddToControlOptionIndex(store.getDefaultInt(IPessimisticFilesystemConstants.PREF_ADD_TO_CONTROL))); failValidateEdit.setSelection( store.getDefaultBoolean(IPessimisticFilesystemConstants.PREF_FAIL_VALIDATE_EDIT)); changeFileContents.setSelection( @@ -286,8 +286,8 @@ public class PessimisticPreferencesPage IPessimisticFilesystemConstants.PREF_ADD_TO_CONTROL, ADD_TO_CONTROL_OPTION_KEYS[selectionIndex]); store.setValue( - IPessimisticFilesystemConstants.PREF_FAIL_VALIDATE_EDIT, - failValidateEdit.getSelection()); + IPessimisticFilesystemConstants.PREF_FAIL_VALIDATE_EDIT, + failValidateEdit.getSelection()); store.setValue( IPessimisticFilesystemConstants.PREF_TOUCH_DURING_VALIDATE_EDIT, changeFileContents.getSelection()); @@ -303,7 +303,7 @@ public class PessimisticPreferencesPage filesAreEditedCombo.select( getEditOptionIndex(store.getInt(IPessimisticFilesystemConstants.PREF_CHECKED_IN_FILES_EDITED))); filesAreEditedNoPromptCombo.select( - getEditNoPromptOptionIndex(store.getInt(IPessimisticFilesystemConstants.PREF_CHECKED_IN_FILES_EDITED_NOPROMPT))); + getEditNoPromptOptionIndex(store.getInt(IPessimisticFilesystemConstants.PREF_CHECKED_IN_FILES_EDITED_NOPROMPT))); filesAreSavedCombo.select( getSaveOptionIndex(store.getInt(IPessimisticFilesystemConstants.PREF_CHECKED_IN_FILES_SAVED))); addToControlCombo.select( @@ -313,10 +313,10 @@ public class PessimisticPreferencesPage changeFileContents.setSelection( store.getBoolean(IPessimisticFilesystemConstants.PREF_TOUCH_DURING_VALIDATE_EDIT)); } - + /* * Answers the index of the given key. - */ + */ protected int getEditOptionIndex(int key) { for(int i= 0; i < EDIT_OPTION_KEYS.length; i++) { if (EDIT_OPTION_KEYS[i] == key) @@ -324,10 +324,10 @@ public class PessimisticPreferencesPage } return -1; } - + /* * Answers the index of the given key. - */ + */ protected int getSaveOptionIndex(int key) { for(int i= 0; i < SAVE_OPTION_KEYS.length; i++) { if (SAVE_OPTION_KEYS[i] == key) @@ -335,21 +335,21 @@ public class PessimisticPreferencesPage } return -1; } - + /* * Answers the index of the given key. - */ + */ protected int getEditNoPromptOptionIndex(int key) { for(int i= 0; i < SAVE_OPTION_KEYS.length; i++) { if (SAVE_OPTION_KEYS[i] == key) return i; } return -1; - } - + } + /* * Answers the index of the given key. - */ + */ protected int getAddToControlOptionIndex(int key) { for(int i= 0; i < ADD_TO_CONTROL_OPTION_KEYS.length; i++) { if (ADD_TO_CONTROL_OPTION_KEYS[i] == key) diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/UncheckOutAction.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/UncheckOutAction.java index a06bf4668..721b34381 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/UncheckOutAction.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/UncheckOutAction.java @@ -18,7 +18,7 @@ import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.team.examples.pessimistic.PessimisticFilesystemProvider; /** - * Performs an uncheck out on the selected resources. If a folder is + * Performs an uncheck out on the selected resources. If a folder is * selected all of its children are recursively unchecked out. */ public class UncheckOutAction extends CheckInAction { |