Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OF-2892 Available Plugins page: redesign to make Documentation easier to see #2541

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@
public class AvailablePlugin extends PluginMetadata
{
private static final Logger Log = LoggerFactory.getLogger( AvailablePlugin.class );
private static final DateFormat RELEASE_DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd");
private static final DateFormat RELEASE_DATE_DISPLAY_FORMAT = DateFormat.getDateInstance(DateFormat.MEDIUM);

/**
* URL from where the latest version of the plugin can be downloaded.
Expand Down Expand Up @@ -141,15 +139,7 @@ public static AvailablePlugin getInstance( Element plugin )
minJavaVersion = new JavaSpecVersion( minJavaVersionValue );
}

String releaseDate = null;
final String releaseDateString = plugin.attributeValue("releaseDate");
if( releaseDateString!= null) {
try {
releaseDate = RELEASE_DATE_DISPLAY_FORMAT.format(RELEASE_DATE_FORMAT.parse(releaseDateString));
} catch (final ParseException e) {
Log.warn("Unexpected exception parsing release date: " + releaseDateString, e);
}
}
Comment on lines -144 to -152
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this exists because there are some older plugins out there with non-ISO release dates

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I forgot to comment on this. We don't try to parse the date and just show it in UI. So its format doesn't affect anything.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I anyway will recheck plugins. I remember that for the Pade plugin I already sent a PR

final String releaseDate = plugin.attributeValue("releaseDate");

long fileSize = -1;
String fileSizeValue = plugin.attributeValue("fileSize");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,7 @@ private void saveAvailablePluginsInfo() {
Element component = xml.addElement("plugin");
component.addAttribute("name", plugin.getName());
component.addAttribute("latest", plugin.getVersion() != null ? plugin.getVersion().getVersionString() : null);
component.addAttribute("releaseDate", plugin.getReleaseDate());
component.addAttribute("changelog", plugin.getChangelog() != null ? plugin.getChangelog().toExternalForm() : null );
component.addAttribute("url", plugin.getDownloadURL() != null ? plugin.getDownloadURL().toExternalForm() : null );
component.addAttribute("author", plugin.getAuthor());
Expand Down
Loading