mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-06 05:25:44 +01:00
don't show core plugin updates
This commit is contained in:
@@ -67,6 +67,7 @@ import java.net.URLEncoder;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
@@ -483,9 +484,20 @@ public class DefaultPluginManager implements PluginManager
|
||||
|
||||
if (infoSet != null)
|
||||
{
|
||||
for (PluginInformation available : infoSet)
|
||||
Iterator<PluginInformation> pit = infoSet.iterator();
|
||||
|
||||
while (pit.hasNext())
|
||||
{
|
||||
preparePlugin(available);
|
||||
PluginInformation available = pit.next();
|
||||
|
||||
if (isCorePluging(available))
|
||||
{
|
||||
pit.remove();
|
||||
}
|
||||
else
|
||||
{
|
||||
preparePlugin(available);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -560,6 +572,34 @@ public class DefaultPluginManager implements PluginManager
|
||||
return center;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*
|
||||
* @param available
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private boolean isCorePluging(PluginInformation available)
|
||||
{
|
||||
boolean core = false;
|
||||
|
||||
for (Plugin installedPlugin : installedPlugins.values())
|
||||
{
|
||||
PluginInformation installed = installedPlugin.getInformation();
|
||||
|
||||
if (isSamePlugin(available, installed)
|
||||
&& (installed.getState() == PluginState.CORE))
|
||||
{
|
||||
core = true;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return core;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user