Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples')
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemProvider.java8
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemTableProvider.java2
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/localhistory/LocalHistoryParticipant.java8
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/model/ui/NewModelProjectWizard.java144
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/PessimisticPreferencesPage.java2
5 files changed, 82 insertions, 82 deletions
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 a15f0446a..ea1fe81b7 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
@@ -235,10 +235,10 @@ public class FileSystemProvider extends RepositoryProvider {
@Override
public IFileHistoryProvider getFileHistoryProvider() {
- if (FileSystemProvider.fileHistoryProvider == null) {
- FileSystemProvider.fileHistoryProvider = new FileSystemHistoryProvider();
- }
- return FileSystemProvider.fileHistoryProvider;
+ if (FileSystemProvider.fileHistoryProvider == null) {
+ FileSystemProvider.fileHistoryProvider = new FileSystemHistoryProvider();
+ }
+ return FileSystemProvider.fileHistoryProvider;
}
}
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 70c17f75f..fbb9e5e13 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
@@ -154,7 +154,7 @@ public class FileSystemTableProvider {
*/
public int compare(Viewer compareViewer, Object o1, Object o2) {
/*if (o1 instanceof AbstractCVSHistoryCategory || o2 instanceof AbstractCVSHistoryCategory)
- return 0;*/
+ return 0;*/
IFileRevision e1 = adaptToFileRevision(o1);
IFileRevision e2 = adaptToFileRevision(o2);
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 7caa66459..2b041eb7c 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
@@ -98,10 +98,10 @@ public class LocalHistoryParticipant extends SubscriberParticipant {
}
protected static SyncInfo getSyncInfo(ISynchronizeModelElement element) {
- if (element instanceof IAdaptable) {
- return ((IAdaptable)element).getAdapter(SyncInfo.class);
- }
- return null;
+ if (element instanceof IAdaptable) {
+ return ((IAdaptable)element).getAdapter(SyncInfo.class);
+ }
+ return null;
}
public void prepareCompareInput(ISynchronizeModelElement element,
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 9fe53ff31..8fc7b5ac9 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
@@ -31,8 +31,8 @@ import org.eclipse.ui.internal.wizards.newresource.ResourceMessages;
public class NewModelProjectWizard extends Wizard implements INewWizard {
- private WizardNewProjectCreationPage mainPage;
-
+ private WizardNewProjectCreationPage mainPage;
+
public NewModelProjectWizard() {
super();
}
@@ -40,94 +40,94 @@ public class NewModelProjectWizard extends Wizard implements INewWizard {
public void addPages() {
super.addPages();
- mainPage = new WizardNewProjectCreationPage("basicNewProjectPage");//$NON-NLS-1$
- mainPage.setTitle(ResourceMessages.NewProject_title);
- mainPage.setDescription(ResourceMessages.NewProject_description);
- this.addPage(mainPage);
+ mainPage = new WizardNewProjectCreationPage("basicNewProjectPage");//$NON-NLS-1$
+ mainPage.setTitle(ResourceMessages.NewProject_title);
+ mainPage.setDescription(ResourceMessages.NewProject_description);
+ this.addPage(mainPage);
}
public boolean performFinish() {
- // get a project handle
- final IProject newProjectHandle = mainPage.getProjectHandle();
+ // get a project handle
+ final IProject newProjectHandle = mainPage.getProjectHandle();
- // get a project descriptor
- URI location = null;
- if (!mainPage.useDefaults()) {
+ // get a project descriptor
+ URI location = null;
+ if (!mainPage.useDefaults()) {
location = mainPage.getLocationURI();
}
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
- final IProjectDescription description = workspace
- .newProjectDescription(newProjectHandle.getName());
- description.setLocationURI(location);
- description.setNatureIds(new String[] {ModelNature.NATURE_ID});
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ final IProjectDescription description = workspace
+ .newProjectDescription(newProjectHandle.getName());
+ description.setLocationURI(location);
+ description.setNatureIds(new String[] {ModelNature.NATURE_ID});
- // create the new project operation
- WorkspaceModifyOperation op = new WorkspaceModifyOperation() {
- protected void execute(IProgressMonitor monitor)
- throws CoreException {
- createProject(description, newProjectHandle, monitor);
- }
- };
+ // create the new project operation
+ WorkspaceModifyOperation op = new WorkspaceModifyOperation() {
+ protected void execute(IProgressMonitor monitor)
+ throws CoreException {
+ createProject(description, newProjectHandle, monitor);
+ }
+ };
- // run the new project creation operation
- try {
- getContainer().run(true, true, op);
- } catch (InterruptedException e) {
- return false;
- } catch (InvocationTargetException e) {
- // ie.- one of the steps resulted in a core exception
- Throwable t = e.getTargetException();
- if (t instanceof CoreException) {
- ErrorDialog.openError(getShell(), null, null,
- ((CoreException) t).getStatus());
- } else {
- MessageDialog
- .openError(
- getShell(),
- "Error occurred",
- t.getMessage());
- }
- return false;
- }
+ // run the new project creation operation
+ try {
+ getContainer().run(true, true, op);
+ } catch (InterruptedException e) {
+ return false;
+ } catch (InvocationTargetException e) {
+ // ie.- one of the steps resulted in a core exception
+ Throwable t = e.getTargetException();
+ if (t instanceof CoreException) {
+ ErrorDialog.openError(getShell(), null, null,
+ ((CoreException) t).getStatus());
+ } else {
+ MessageDialog
+ .openError(
+ getShell(),
+ "Error occurred",
+ t.getMessage());
+ }
+ return false;
+ }
return true;
}
- /**
- * 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
- * if the operation is canceled
- */
- void createProject(IProjectDescription description, IProject projectHandle,
- IProgressMonitor monitor) throws CoreException,
- OperationCanceledException {
- try {
- monitor.beginTask("", 2000);//$NON-NLS-1$
+ /**
+ * 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
+ * if the operation is canceled
+ */
+ void createProject(IProjectDescription description, IProject projectHandle,
+ IProgressMonitor monitor) throws CoreException,
+ OperationCanceledException {
+ try {
+ monitor.beginTask("", 2000);//$NON-NLS-1$
- projectHandle.create(description, SubMonitor.convert(monitor,
- 1000));
+ projectHandle.create(description, SubMonitor.convert(monitor,
+ 1000));
- if (monitor.isCanceled()) {
+ if (monitor.isCanceled()) {
throw new OperationCanceledException();
}
- projectHandle.open(IResource.BACKGROUND_REFRESH, SubMonitor.convert(monitor, 1000));
+ projectHandle.open(IResource.BACKGROUND_REFRESH, SubMonitor.convert(monitor, 1000));
- } finally {
- monitor.done();
- }
- }
-
+ } finally {
+ 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/pessimistic/ui/PessimisticPreferencesPage.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/ui/PessimisticPreferencesPage.java
index 322a13705..d11067e20 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
@@ -267,7 +267,7 @@ public class PessimisticPreferencesPage
int selectionIndex = filesAreEditedCombo.getSelectionIndex();
if (selectionIndex != -1)
- store.setValue(
+ store.setValue(
IPessimisticFilesystemConstants.PREF_CHECKED_IN_FILES_EDITED,
EDIT_OPTION_KEYS[selectionIndex]);
selectionIndex = filesAreEditedNoPromptCombo.getSelectionIndex();

Back to the top