mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 00:15: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.Collection;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
import java.util.Iterator;
|
||||||
import java.util.LinkedHashSet;
|
import java.util.LinkedHashSet;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@@ -483,12 +484,23 @@ public class DefaultPluginManager implements PluginManager
|
|||||||
|
|
||||||
if (infoSet != null)
|
if (infoSet != null)
|
||||||
{
|
{
|
||||||
for (PluginInformation available : infoSet)
|
Iterator<PluginInformation> pit = infoSet.iterator();
|
||||||
|
|
||||||
|
while (pit.hasNext())
|
||||||
|
{
|
||||||
|
PluginInformation available = pit.next();
|
||||||
|
|
||||||
|
if (isCorePluging(available))
|
||||||
|
{
|
||||||
|
pit.remove();
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
preparePlugin(available);
|
preparePlugin(available);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//~--- get methods ----------------------------------------------------------
|
//~--- get methods ----------------------------------------------------------
|
||||||
|
|
||||||
@@ -560,6 +572,34 @@ public class DefaultPluginManager implements PluginManager
|
|||||||
return center;
|
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
|
* Method description
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user