Revision 41072
trunk/org.gvsig.desktop/org.gvsig.desktop.framework/org.gvsig.andami/src/main/java/org/gvsig/andami/impl/DefaultPluginsManager.java | ||
---|---|---|
48 | 48 |
private static Logger logger = |
49 | 49 |
LoggerFactory.getLogger(DefaultPluginsManager.class); |
50 | 50 |
|
51 |
private File pluginsFolder = null;
|
|
51 |
private List<File> pluginsFolders = null;
|
|
52 | 52 |
|
53 | 53 |
public ExclusiveUIExtension getExclusiveUIExtension() { |
54 | 54 |
return PluginServices.getExclusiveUIExtension(); |
... | ... | |
144 | 144 |
return org.gvsig.i18n.Messages.translate(msg); |
145 | 145 |
} |
146 | 146 |
|
147 |
public File getApplicationFolder() { |
|
148 |
return Launcher.getApplicationFolder(); |
|
149 |
} |
|
150 |
|
|
151 |
/** |
|
152 |
* @deprecated use {@link #getPluginsFolders()} |
|
153 |
*/ |
|
147 | 154 |
public File getPluginsDirectory() { |
148 | 155 |
return getPluginsFolder(); |
149 | 156 |
} |
150 | 157 |
|
151 |
public File getApplicationFolder() { |
|
152 |
return Launcher.getApplicationFolder(); |
|
158 |
/** |
|
159 |
* @deprecated use {@link #getPluginsFolders()} |
|
160 |
*/ |
|
161 |
public File getPluginsFolder() { |
|
162 |
List<File> l = this.getPluginsFolders(); |
|
163 |
if( l==null || l.size()<1 ) { |
|
164 |
return null; |
|
165 |
} |
|
166 |
return l.get(0); |
|
153 | 167 |
} |
154 | 168 |
|
155 |
public File getPluginsFolder() {
|
|
156 |
if( this.pluginsFolder!=null ) { |
|
157 |
return this.pluginsFolder; |
|
169 |
public List<File> getPluginsFolders() {
|
|
170 |
if( this.pluginsFolders!=null ) {
|
|
171 |
return this.pluginsFolders;
|
|
158 | 172 |
} |
159 | 173 |
String folder = "gvSIG/extensiones"; |
160 | 174 |
if( !(Launcher.getAndamiConfig() == null || Launcher.getAndamiConfig().getPluginsDirectory()==null) ) { |
161 | 175 |
folder = Launcher.getAndamiConfig().getPluginsDirectory(); |
162 | 176 |
} |
163 |
this.pluginsFolder = new File(getApplicationFolder(), folder); |
|
164 |
return this.pluginsFolder; |
|
177 |
this.pluginsFolders = new ArrayList<File>(); |
|
178 |
this.pluginsFolders.add(new File(getApplicationFolder(), folder)); |
|
179 |
return this.pluginsFolders; |
|
165 | 180 |
} |
166 | 181 |
|
167 | 182 |
public File getInstallFolder() { |
Also available in: Unified diff