Lines 10-24
Link Here
|
10 |
*******************************************************************************/ |
10 |
*******************************************************************************/ |
11 |
package org.eclipse.help.internal; |
11 |
package org.eclipse.help.internal; |
12 |
|
12 |
|
|
|
13 |
import java.io.File; |
13 |
import java.io.InputStream; |
14 |
import java.io.InputStream; |
|
|
15 |
import java.net.URL; |
14 |
|
16 |
|
15 |
import org.eclipse.core.runtime.IStatus; |
17 |
import org.eclipse.core.runtime.IStatus; |
|
|
18 |
import org.eclipse.core.runtime.Platform; |
16 |
import org.eclipse.core.runtime.Plugin; |
19 |
import org.eclipse.core.runtime.Plugin; |
17 |
import org.eclipse.core.runtime.Status; |
20 |
import org.eclipse.core.runtime.Status; |
18 |
import org.eclipse.help.internal.context.ContextManager; |
21 |
import org.eclipse.help.internal.context.ContextManager; |
19 |
import org.eclipse.help.internal.extension.ContentExtensionManager; |
22 |
import org.eclipse.help.internal.extension.ContentExtensionManager; |
20 |
import org.eclipse.help.internal.index.IndexManager; |
23 |
import org.eclipse.help.internal.index.IndexManager; |
21 |
import org.eclipse.help.internal.toc.TocManager; |
24 |
import org.eclipse.help.internal.toc.TocManager; |
|
|
25 |
import org.eclipse.osgi.service.datalocation.Location; |
22 |
import org.osgi.framework.BundleContext; |
26 |
import org.osgi.framework.BundleContext; |
23 |
|
27 |
|
24 |
/** |
28 |
/** |
Lines 40-45
Link Here
|
40 |
private ContentExtensionManager contentExtensionManager; |
44 |
private ContentExtensionManager contentExtensionManager; |
41 |
private IndexManager indexManager; |
45 |
private IndexManager indexManager; |
42 |
private IHelpProvider helpProvider; |
46 |
private IHelpProvider helpProvider; |
|
|
47 |
private File configurationDirectory; |
43 |
|
48 |
|
44 |
public static void logWarning(String message) { |
49 |
public static void logWarning(String message) { |
45 |
Status errorStatus = new Status(IStatus.WARNING, PLUGIN_ID, IStatus.OK, message, null); |
50 |
Status errorStatus = new Status(IStatus.WARNING, PLUGIN_ID, IStatus.OK, message, null); |
Lines 131-136
Link Here
|
131 |
public void start(BundleContext context) throws Exception { |
136 |
public void start(BundleContext context) throws Exception { |
132 |
super.start(context); |
137 |
super.start(context); |
133 |
plugin = this; |
138 |
plugin = this; |
|
|
139 |
|
140 |
// determine configuration location for this plug-in |
141 |
Location location = Platform.getConfigurationLocation(); |
142 |
if (location != null) { |
143 |
URL configURL = location.getURL(); |
144 |
if (configURL != null && configURL.getProtocol().startsWith("file")) { //$NON-NLS-1$ |
145 |
configurationDirectory = new File(configURL.getFile(), PLUGIN_ID); |
146 |
} |
147 |
} |
148 |
if (configurationDirectory == null) { |
149 |
configurationDirectory = getStateLocation().toFile(); |
150 |
} |
151 |
} |
152 |
|
153 |
public static File getConfigurationDirectory() { |
154 |
return getDefault().configurationDirectory; |
134 |
} |
155 |
} |
135 |
|
156 |
|
136 |
/* (non-Javadoc) |
157 |
/* (non-Javadoc) |