Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2006-07-06 19:00:37 +0000
committerMichael Valenta2006-07-06 19:00:37 +0000
commitc36022fb4ff09a9fbc9c844a4d80815ca712459a (patch)
tree332267ebb2b666a3abc8bf10e3f1553d93b0657d
parent0469285553f3b53f5743b83de4cfbecdfadd2a85 (diff)
downloadeclipse.platform.team-c36022fb4ff09a9fbc9c844a4d80815ca712459a.tar.gz
eclipse.platform.team-c36022fb4ff09a9fbc9c844a4d80815ca712459a.tar.xz
eclipse.platform.team-c36022fb4ff09a9fbc9c844a4d80815ca712459a.zip
Bug 144367 Pessimistic Filesystem Provider doesn't prompt to add files to control
-rw-r--r--examples/org.eclipse.team.examples.filesystem/plugin.xml2
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/FileSystemPlugin.java19
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/PessimisticFilesystemProviderPlugin.java14
3 files changed, 30 insertions, 5 deletions
diff --git a/examples/org.eclipse.team.examples.filesystem/plugin.xml b/examples/org.eclipse.team.examples.filesystem/plugin.xml
index c2ea9ad54..410ef443c 100644
--- a/examples/org.eclipse.team.examples.filesystem/plugin.xml
+++ b/examples/org.eclipse.team.examples.filesystem/plugin.xml
@@ -6,7 +6,7 @@
<plugin
id="org.eclipse.team.examples.filesystem"
name="%pluginName"
- version="3.1.100.qualifier"
+ version="3.1.101.qualifier"
provider-name="%providerName"
class="org.eclipse.team.examples.filesystem.FileSystemPlugin">
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 829410b12..7e0e3cca7 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
@@ -20,6 +20,7 @@ import org.eclipse.swt.widgets.Display;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.examples.pessimistic.PessimisticFilesystemProviderPlugin;
import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
/**
* This is the plugin class for the file system examples. It provides the following:
@@ -46,6 +47,7 @@ public class FileSystemPlugin extends AbstractUIPlugin {
// This static field will hold the singleton instance of the plugin class
private static FileSystemPlugin plugin;
+ private PessimisticFilesystemProviderPlugin pessPlugin;
/**
* Override the standard plugin constructor.
*
@@ -56,7 +58,7 @@ public class FileSystemPlugin extends AbstractUIPlugin {
// record this instance as the singleton
plugin = this;
// Instanctiate pessimistic provider
- new PessimisticFilesystemProviderPlugin(descriptor);
+ pessPlugin = new PessimisticFilesystemProviderPlugin(descriptor);
}
/**
@@ -113,5 +115,20 @@ public class FileSystemPlugin extends AbstractUIPlugin {
}
return display;
}
+
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ //Call startup on the Pessimistic Plugin
+ pessPlugin.startup();
+ }
+
+ public void stop(BundleContext context) throws Exception {
+ try {
+ if (pessPlugin != null)
+ pessPlugin.shutdown();
+ } finally {
+ super.stop(context);
+ }
+ }
}
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/PessimisticFilesystemProviderPlugin.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/PessimisticFilesystemProviderPlugin.java
index 4e8dddc6e..31404fb27 100644
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/PessimisticFilesystemProviderPlugin.java
+++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/pessimistic/PessimisticFilesystemProviderPlugin.java
@@ -10,10 +10,15 @@
*******************************************************************************/
package org.eclipse.team.examples.pessimistic;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPluginDescriptor;
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.Status;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.ui.plugin.AbstractUIPlugin;
@@ -64,7 +69,9 @@ public class PessimisticFilesystemProviderPlugin extends AbstractUIPlugin {
/**
* Initializes the default preferences for this plugin.
*/
- protected void initializeDefaultPreferences(IPreferenceStore store) {
+ protected void initializeDefaultPreferences() {
+ IPreferenceStore store = getPreferenceStore();
+
store.setDefault(
IPessimisticFilesystemConstants.PREF_CHECKED_IN_FILES_EDITED,
IPessimisticFilesystemConstants.OPTION_PROMPT);
@@ -102,6 +109,7 @@ public class PessimisticFilesystemProviderPlugin extends AbstractUIPlugin {
public void startup() throws CoreException {
fListener= new ResourceChangeListener();
fListener.startup();
+ initializeDefaultPreferences();
super.startup();
}

Back to the top