Skip to content

Commit

Permalink
V2.0.20210111: Remove FLib JCalendar dependency to support Java > 8
Browse files Browse the repository at this point in the history
  • Loading branch information
kgibm committed Jan 11, 2021
1 parent d536e3a commit c728993
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 47 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ deploy:
provider: releases
api_key:
secure: BJCTquPd7dm8nC35O9F1/NOlcv55+fmRci72+y0bxKQnndAbr1ms+QG1ob+IHIBm8MKJSy1jeaTKI9+DN7dkGtHR5NmwhmuLDA2GgLe6gq4x93tvfNjN6K8/Zc8z1Gf8joDaZoWbdjVrbKFLzzxDPfVjwwC7ZsdxqrXssKm9G4AjcLdLJDFx+y1pdDdVj1dfbWGfkMt9W5Y9NhUmbcEYO42MdTjEdM/ScxIht56k2GMa7cG//X+SzeKAkz3njXdl2ZUugkqFeFB0F+cQeuahmfwJR6xj0kM5+9obIXLgINZZ2Ww0Xqq/bpEibMdRi4XzTa+aRwWmvKLYHYoxutOLyuELhLYC/fAGadJzzirI0M8pQT2OieLsSSafKyuGKwIURiNE0wP7eBL47e7IBzc4DHNr8bMq61BMWQMYEAnb6iRLAvzqyVxMYk4nybSYmPuKVpCkCFvIHR0bazfAbAvNYvSEqUEpVk4nP9WYLvz25XVShiiSLrwrxDp28eNXqpy+gFUbu9xjVVe7uKopQOvSbv5pM6zkgdsFgViIaohqFDacCeYdDuY61UmSlwR8/mDQd5bKgE9qdKGSCXxPPX/YzOUbNNt0rPaWdKXbOWYdmZPYt5K8hsgGTSlpDeWJksCmeU7pML2lPfFQnynSmbjWSXH+lnYD6hKDOyojlYMPsRQ=
file: target/request-metrics-analyzer-next-1.0.20200409-jar-with-dependencies.jar
file: target/request-metrics-analyzer-next-2.0.20210111-jar-with-dependencies.jar
skip_cleanup: true
overwrite: true
name: request-metrics-analyzer-next-1.0.20200409
name: request-metrics-analyzer-next-2.0.20210111
on:
tags: true
15 changes: 6 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,21 @@ A graphical tool for analyzing [request metrics](https://www.ibm.com/support/kno

Download request-metrics-analyzer-next-*-jar-with-dependencies.jar from https://github.com/kgibm/request-metrics-analyzer-next/releases

## Run

`java -jar request-metrics-analyzer-next-*-jar-with-dependencies.jar`

## Development

Run `de.ibm.issw.requestmetrics.Starter`
1. Eclipse } Import } Maven } Existing Maven Projects
1. Run `de.ibm.issw.requestmetrics.Starter`

### Importing the project into eclipse
### Build

1. `mvn eclipse:eclipse`
1. Eclipse > File > Import > Existing Projects into Workspace > Choose this folder
1. `mvn clean install`
1. `java -jar target/request-metrics-analyzer-next-*-jar-with-dependencies.jar`

### Create a new release

1. Update `<version>X.Y.Z</version>` in pom.xml
1. Update the version in `name: request-metrics-analyzer-next-X.Y.Z` in .travis.yml
1. Update the version in `file: target/request-metrics-analyzer-next-X.Y.Z-jar-with-dependencies.jar` in .travis.yml
1. `git commit -am "Commit message"`
1. `git tag -a -m "Release description" vX.Y.Z`
1. `git tag vX.Y.Z`
1. `git push --follow-tags`
26 changes: 13 additions & 13 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>de.ibm.issw.requestmetrics</groupId>
<artifactId>request-metrics-analyzer-next</artifactId>
<version>1.0.20200409</version>
<version>2.0.20210111</version>
<name>Request Metrics Analyzer Next</name>

<properties>
Expand All @@ -15,13 +15,6 @@
<maven.compiler.target>1.8</maven.compiler.target>
</properties>

<repositories>
<repository>
<id>JCalendar_Repo</id>
<url>http://igetdb.sourceforge.net/maven2-repository</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>org.apache.velocity</groupId>
Expand All @@ -33,11 +26,6 @@
<artifactId>jfreechart</artifactId>
<version>1.5.0</version>
</dependency>
<dependency>
<groupId>net.flib</groupId>
<artifactId>jcalendar</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
Expand All @@ -48,6 +36,18 @@
<artifactId>commons-lang3</artifactId>
<version>3.10</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.3.1</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
32 changes: 14 additions & 18 deletions src/main/java/de/ibm/issw/requestmetrics/gui/RootCaseToolBar.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@
import javax.swing.JTable;
import javax.swing.JToolBar;

import org.freixas.jcalendar.DateEvent;
import org.freixas.jcalendar.DateListener;
import org.freixas.jcalendar.JCalendarCombo;

import de.ibm.issw.requestmetrics.engine.filter.RootCaseFilter;
import de.ibm.issw.requestmetrics.gui.comparator.LogTimeStampComparator;
import de.ibm.issw.requestmetrics.model.RmRootCase;
Expand All @@ -36,8 +32,8 @@ public class RootCaseToolBar extends JToolBar{
private JButton clearFiltersButton = new JButton("CLEAR");
private final CheckComboBox comboBox;
private RootCaseFilter rootCaseFilter;
private JCalendarCombo startDatePicker = new JCalendarCombo(JCalendarCombo.DISPLAY_DATE | JCalendarCombo.DISPLAY_TIME, false);
private JCalendarCombo endDatePicker = new JCalendarCombo(JCalendarCombo.DISPLAY_DATE | JCalendarCombo.DISPLAY_TIME, false);
//private JCalendarCombo startDatePicker = new JCalendarCombo(JCalendarCombo.DISPLAY_DATE | JCalendarCombo.DISPLAY_TIME, false);
//private JCalendarCombo endDatePicker = new JCalendarCombo(JCalendarCombo.DISPLAY_DATE | JCalendarCombo.DISPLAY_TIME, false);

public static final SimpleDateFormat sdf = new SimpleDateFormat("y/MM/dd HH:mm:ss");

Expand Down Expand Up @@ -71,7 +67,7 @@ public RootCaseToolBar(RequestMetricsGui gui) {
comboBox.setMaximumSize(comboBox.getPreferredSize());
comboBox.addSelectionChangedListener(checkBoxListener);

startDatePicker.setDateFormat(sdf);
/*startDatePicker.setDateFormat(sdf);
startDatePicker.setDate(null);
startDatePicker.setEditable(false);
startDatePicker.setEnabled(false);
Expand All @@ -94,7 +90,7 @@ public RootCaseToolBar(RequestMetricsGui gui) {
this.add(new JLabel("Timestamp >"));
this.add(startDatePicker);
this.add(new JLabel("Timestamp <"));
this.add(endDatePicker);
this.add(endDatePicker);*/
this.add(new JLabel("Elapsed Time >"));
this.add(elapsedTimeFilterField);
this.add(new JLabel("Types:"));
Expand All @@ -104,7 +100,7 @@ public RootCaseToolBar(RequestMetricsGui gui) {
this.add(clearFiltersButton);
}

private DateListener startDateListener = new DateListener() {
/*private DateListener startDateListener = new DateListener() {
@Override
public void dateChanged(DateEvent evt) {
if(evt.getSelectedDate() != null) rootCaseFilter.filterStartDate(evt.getSelectedDate().getTime());
Expand All @@ -116,7 +112,7 @@ public void dateChanged(DateEvent evt) {
public void dateChanged(DateEvent evt) {
if(evt.getSelectedDate() != null) rootCaseFilter.filterEndDate(evt.getSelectedDate().getTime());
}
};
};*/

private KeyAdapter elapsedTimeFilterFieldListener = new KeyAdapter() {
public void keyReleased(KeyEvent evt) {
Expand Down Expand Up @@ -164,8 +160,8 @@ private void clearFilters() {
comboBox.resetCheckBoxes(types, false);
elapsedTimeFilterField.setValue(null);
detailFilterField.setText("");
startDatePicker.setDate(startLogTimeStamp);
endDatePicker.setDate(endLogTimeStamp);
//startDatePicker.setDate(startLogTimeStamp);
//endDatePicker.setDate(endLogTimeStamp);
}

/**
Expand All @@ -177,8 +173,8 @@ public void enableFilters(JTable rootCaseTable, Set<String> types) {
detailFilterField.setEnabled(true);
comboBox.setEnabled(true);
clearFiltersButton.setEnabled(true);
startDatePicker.setEnabled(true);
endDatePicker.setEnabled(true);
//startDatePicker.setEnabled(true);
//endDatePicker.setEnabled(true);
rootCaseFilter = new RootCaseFilter(rootCaseTable, gui);

// set start- and end-date after rootCaseFilter is initialized
Expand All @@ -202,10 +198,10 @@ public void disableFilters() {
detailFilterField.setEnabled(false);
comboBox.setEnabled(false);
clearFiltersButton.setEnabled(false);
startDatePicker.setEnabled(false);
startDatePicker.setDate(null);
endDatePicker.setEnabled(false);
endDatePicker.setDate(null);
//startDatePicker.setEnabled(false);
//startDatePicker.setDate(null);
//endDatePicker.setEnabled(false);
//endDatePicker.setDate(null);
if (rootCaseFilter != null)
rootCaseFilter.clearFilters();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ private void expandAll(JTree tree, TreePath path, boolean expand, boolean isFirs

if (node.getChildCount() >= 0) {
@SuppressWarnings("unchecked")
Enumeration<AnalyzerTreeNode> children = node.children();
Enumeration<? extends TreeNode> children = node.children();
while (children.hasMoreElements()) {
TreeNode childNode = children.nextElement();
TreePath childPath = path.pathByAddingChild(childNode);
Expand Down Expand Up @@ -183,9 +183,9 @@ public void calculateAndOpenStatisticsDialog(AnalyzerTreeNode treeNode) {
final Map<String, ChildNodeStatisticsEntry> stats = new HashMap<String, ChildNodeStatisticsEntry>();

@SuppressWarnings("unchecked")
Enumeration<AnalyzerTreeNode> childNodes = treeNode.children();
Enumeration<? extends TreeNode> childNodes = treeNode.children();
while (childNodes.hasMoreElements()) {
final TransactionDrilldownPanel.AnalyzerTreeNode node = childNodes.nextElement();
final TransactionDrilldownPanel.AnalyzerTreeNode node = (TransactionDrilldownPanel.AnalyzerTreeNode)childNodes.nextElement();

final String detail = node.getRmNode().rmData.getDetailCmp();
final long elapsedTime = node.getRmNode().rmData.getElapsedTime();
Expand Down Expand Up @@ -227,9 +227,9 @@ public void selectTreeNode (RMNode rmNode) {

@SuppressWarnings("unchecked")
private void searchNode (RMNode rmNode, AnalyzerTreeNode rootNode) {
Enumeration<AnalyzerTreeNode> subtransactions = rootNode.children();
Enumeration<? extends TreeNode> subtransactions = rootNode.children();
while (subtransactions.hasMoreElements()) {
TransactionDrilldownPanel.AnalyzerTreeNode node = subtransactions.nextElement();
TransactionDrilldownPanel.AnalyzerTreeNode node = (TransactionDrilldownPanel.AnalyzerTreeNode)subtransactions.nextElement();

if (rmNode.getData().getCurrentCmp().getReqid() == node.rmnode.getData().getCurrentCmp().getReqid()) {
currentTreePath = new TreePath(node.getPath());
Expand Down

0 comments on commit c728993

Please sign in to comment.