diff options
Diffstat (limited to 'examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem')
24 files changed, 125 insertions, 125 deletions
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 */ |