Skip to content

Commit

Permalink
ECONDEC-74: Update dependency versions in pom.xml (#52)
Browse files Browse the repository at this point in the history
* Update versions of jackson, javaparser, unirest, commons-codec, fugue, jira-rest-java-client, tycho

* Update plugin version to 0.0.3

* Change JDK version to 15

* Fix missing jira-rest-api-client dependency through new repos in pom.xml

* Change BeforeClass to Before and AfterClass to After to try to prevent null pointers

* Enable caching in travis.yml and automatic releases

* Add contributers badge to README

* Disable "build pushed branches" in travis settings

* Unignore failing tests
  • Loading branch information
kleebaum authored Feb 7, 2021
1 parent 1c7d36a commit 04c0139
Show file tree
Hide file tree
Showing 30 changed files with 1,304 additions and 1,072 deletions.
11 changes: 8 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
sudo: false
os: osx
language: java
jdk:
- oraclejdk15
cache:
directories:
- "$HOME/.m2"
cache:
directories:
- $HOME/.m2
Expand All @@ -14,10 +20,9 @@ script:
- mvn clean install -P jacoco
deploy:
provider: releases
api_key:
secure: B6srH3vvYCWX4zEbDGfR2T/6SW8/PGtRH6MHYNwkl1KD3a0xEO58LrSHC0mjiZC18rPYOoj8ZaAtGoghxw8zj0SVVevmanXNo9YC9DTapIzeKVO+6Wx/eKulreEgjDkBctBagIU6WfHLQ+JjxgEhGikEln3BJ7hA/JjKaFJBnBI9N5YovSYl6lGAGBWeI2XqSGE/NXb1Qgd/uIxeZPLxBWIxZxK/kpHTCRTfTTIGGuuOPqoq1nLUzA83hKXlzmM6HxVdi2yJuQyCUfmX7DzwKcnKI0Wa/Vv5FpRjxSxqHyZYhMzxdGVf50WdUmJIQ9JoWMLrb2GugcG1ki1WqBrqx5DgyN/GwyrGLoaX7fWSYwDlUMFGkjbuLA9HMJ622FdwiR4UX4529tmAzJFuYVT7VON/4ZBv/oobtrKFVB2U8y1BzhV2lSai5zmQfFlJliUo89LUaRrLcXbxzd2Y8RCd0XuplEVsvQRhdlA+5kVDfee041oONGF72dU/18LJE+8vY8ldk/3vNkTnvuEakDbqkieKu2SdONZ4w7xhUbb/GCWXyJofJS2iR+jj1KsvsW0Py9U/cC0twr2fZNecss7pDWx+5Etw/tKI0jnPhg6KicgDvi3RbBkevLhpqMT9OvUU433V3Xz89qMJHy9llffSHThwONCMT73vYaAF2b4usUU=
file: de.uhd.ifi.se.decision.management.eclipse/target/cures-condec-eclipse.jar
token: "$GITHUB_TOKEN"
skip_cleanup: true
file: $TRAVIS_BUILD_DIR/de.uhd.ifi.se.decision.management.eclipse/target/cures-condec-eclipse.jar
on:
tags: true
repo: cures-hub/cures-condec-eclipse
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# cures-condec-eclipse

[![Build Status](https://travis-ci.org/cures-hub/cures-condec-eclipse.svg?branch=master)](https://travis-ci.org/cures-hub/cures-condec-eclipse)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/8e6c96d73a3c4b4aa30d9a2173795233)](https://www.codacy.com/app/UHD/cures-condec-eclipse?utm_source=github.com&utm_medium=referral&utm_content=cures-hub/cures-condec-eclipse&utm_campaign=Badge_Grade)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/d05c885619e24c5d8fb9113e203d10a4)](https://www.codacy.com/gh/cures-hub/cures-condec-eclipse/dashboard?utm_source=github.com&utm_medium=referral&utm_content=cures-hub/cures-condec-eclipse&utm_campaign=Badge_Grade)
[![Codecoverage](https://codecov.io/gh/cures-hub/cures-condec-eclipse/branch/master/graph/badge.svg)](https://codecov.io/gh/cures-hub/cures-condec-eclipse/branch/master)
[![GitHub contributors](https://img.shields.io/github/contributors/cures-hub/cures-condec-eclipse.svg)](https://github.com/cures-hub/cures-condec-eclipse/graphs/contributors)

The CURES ConDec Eclipse plug-in enables the user to capture and explore decision knowledge in Eclipse. Decision knowledge covers knowledge about decisions, the problems they address, solution proposals, their context, and justifications (rationale). The user can capture decision knowledge in code and commit messages and explore relevant knowledge for code. Relevant knowledge is also extracted from the JIRA project.

## Installation

### Prerequisites
The following prerequisites are necessary to compile the plug-in from source code:
- Java 8 JDK
- Java 15 JDK
- [Maven 3](https://maven.apache.org)

### Compilation via Terminal
Expand All @@ -36,7 +37,7 @@ To evolve the ConDec Eclipse plug-in, it needs to be imported into Eclipse.
- Add Library... / select the *Plug-in Dependencies* (if not already included).

### Installation in Eclipse
- Download or compile the cures-condec-eclipse.jar file.
- [Download](https://github.com/cures-hub/cures-condec-eclipse/releases/latest) or compile the cures-condec-eclipse.jar file.
- [Install Eclipse](https://www.eclipse.org/downloads/packages/).
- Navigate to the Eclipse installation folder and copy the cures-condec-eclipse.jar file into the dropins folder (or a similar folder depending on your operation system).
- Open Eclipse.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>de.uhd.ifi.se.decision</groupId>
<artifactId>parent</artifactId>
<version>0.0.2</version>
<version>0.0.3</version>
</parent>
<artifactId>de.uhd.ifi.se.decision.management.eclipse.tests.report</artifactId>

Expand Down
12 changes: 7 additions & 5 deletions de.uhd.ifi.se.decision.management.eclipse.tests/.classpath
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<classpathentry kind="src" path="src">
<attributes>
<attribute name="module" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
<classpathentry combineaccessrules="false" kind="src" path="/de.uhd.ifi.se.decision.management.eclipse"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-15">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="src/">
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
<attributes>
<attribute name="test" value="true"/>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="/de.uhd.ifi.se.decision.management.eclipse/target/cures-condec-eclipse.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=15
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=15
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=15
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: ConDec Eclipse Tests
Bundle-SymbolicName: de.uhd.ifi.se.decision.management.eclipse.tests
Bundle-Version: 0.0.2
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-Version: 0.0.3
Bundle-RequiredExecutionEnvironment: JavaSE-15
Require-Bundle: org.junit,
org.eclipse.core.runtime,
org.eclipse.jface,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
source.. = src/
bin.includes = META-INF/,\
.

output.. = /de.uhd.ifi.se.decision.management.eclipse/target/classes/
2 changes: 1 addition & 1 deletion de.uhd.ifi.se.decision.management.eclipse.tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>de.uhd.ifi.se.decision</groupId>
<artifactId>parent</artifactId>
<version>0.0.2</version>
<version>0.0.3</version>
</parent>

<artifactId>de.uhd.ifi.se.decision.management.eclipse.tests</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;

Expand All @@ -27,17 +27,18 @@
import de.uhd.ifi.se.decision.management.eclipse.model.impl.DecisionKnowledgeElementImpl;

public class TestJumpToUtils {
private static JiraClient jiraClient;
private static GitClient gitClient;
@BeforeClass
public static void setUp() {

private JiraClient jiraClient;
private GitClient gitClient;

@Before
public void setUp() {
jiraClient = TestJiraClient.initJiraClient();
gitClient = TestGitClient.initGitClient();
}

@Ignore
// there is a invalid thread access exception on Travis CI
@Test
public void testJumpToJiraIssue() {
JiraIssue jiraIssue = JiraIssue.getOrCreate("ECONDEC-1", jiraClient);
Expand All @@ -48,8 +49,9 @@ public void testJumpToJiraIssue() {
fail(e.getMessage());
}
}

@Test
@Ignore
public void testJumpToGitCommit() {
List<GitCommit> commits = gitClient.getCommitsForJiraIssue("ECONDEC-1");
try {
Expand All @@ -59,8 +61,9 @@ public void testJumpToGitCommit() {
fail(e.getMessage());
}
}

@Test
@Ignore
public void testJumpToChangedFile() {
IPath path = new Path("src/de/uhd/ifi/se/decision/management/eclipse/model/TestJumpToCommand.java");
ChangedFile file = new ChangedFileImpl(path);
Expand All @@ -71,8 +74,9 @@ public void testJumpToChangedFile() {
fail(e.getMessage());
}
}

@Test
@Ignore
public void testJumpToMethod() {
IPath path = new Path("GodClass.java");
ChangedFile file = new ChangedFileImpl(path);
Expand All @@ -84,11 +88,10 @@ public void testJumpToMethod() {
fail(e.getMessage());
}
}

@Test
public void testJumpToDecisionKnowledgeElement() {
DecisionKnowledgeElement element = new DecisionKnowledgeElementImpl(KnowledgeType.ISSUE,
"This is a decision!");
DecisionKnowledgeElement element = new DecisionKnowledgeElementImpl(KnowledgeType.ISSUE, "This is a decision!");
element.setType(KnowledgeType.DECISION);
try {
boolean elementOpened = JumpToUtils.jumpTo(element);
Expand All @@ -97,9 +100,9 @@ public void testJumpToDecisionKnowledgeElement() {
fail(e.getMessage());
}
}
@AfterClass
public static void tearDown() {

@After
public void tearDown() {
JiraClient.instances.clear();
GitClient.instances.clear();
JiraIssue.instances.clear();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
import org.gephi.graph.api.Node;
import org.gephi.project.api.ProjectController;
import org.gephi.project.api.Workspace;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.openide.util.Lookup;

Expand All @@ -25,85 +25,82 @@
import de.uhd.ifi.se.decision.management.eclipse.model.impl.KnowledgeGraphImpl;

public class TestNodeUtils {

private static GitClient gitClient;
private static JiraClient jiraClient;

@BeforeClass
public static void setUp() {
gitClient = TestGitClient.initGitClient();
jiraClient = TestJiraClient.initJiraClient();

@Before
public void setUp() {
GitClient gitClient = TestGitClient.initGitClient();
JiraClient jiraClient = TestJiraClient.initJiraClient();
KnowledgeGraphImpl.getInstance(gitClient, jiraClient);
}

@Test
public void testConvertNode() {
ProjectController pc = Lookup.getDefault().lookup(ProjectController.class);
pc.newProject();
Workspace workspace = pc.getCurrentWorkspace();
GraphModel graphModel = Lookup.getDefault().lookup(GraphController.class).getGraphModel(workspace);
Node selectedNode = graphModel.factory().newNode("0");
selectedNode.setLabel("[0] Node");
assertNotNull(NodeUtils.convertNode(selectedNode));
pc.newProject();
Workspace workspace = pc.getCurrentWorkspace();
GraphModel graphModel = Lookup.getDefault().lookup(GraphController.class).getGraphModel(workspace);
Node selectedNode = graphModel.factory().newNode("0");
selectedNode.setLabel("[0] Node");

assertNotNull(NodeUtils.convertNode(selectedNode));
}

@Test
public void testConvertNodeNull() {
ProjectController pc = Lookup.getDefault().lookup(ProjectController.class);
pc.newProject();
Workspace workspace = pc.getCurrentWorkspace();
GraphModel graphModel = Lookup.getDefault().lookup(GraphController.class).getGraphModel(workspace);
Node selectedNode = graphModel.factory().newNode("100000");
selectedNode.setLabel("[100000] Node");
assertNull(NodeUtils.convertNode(selectedNode));
pc.newProject();
Workspace workspace = pc.getCurrentWorkspace();
GraphModel graphModel = Lookup.getDefault().lookup(GraphController.class).getGraphModel(workspace);
Node selectedNode = graphModel.factory().newNode("100000");
selectedNode.setLabel("[100000] Node");

assertNull(NodeUtils.convertNode(selectedNode));
}

@Test
public void testConvertNodeException() {
ProjectController pc = Lookup.getDefault().lookup(ProjectController.class);
pc.newProject();
Workspace workspace = pc.getCurrentWorkspace();
GraphModel graphModel = Lookup.getDefault().lookup(GraphController.class).getGraphModel(workspace);
Node selectedNode = graphModel.factory().newNode("node");
selectedNode.setLabel("Node");
assertNull(NodeUtils.convertNode(selectedNode));
pc.newProject();
Workspace workspace = pc.getCurrentWorkspace();
GraphModel graphModel = Lookup.getDefault().lookup(GraphController.class).getGraphModel(workspace);
Node selectedNode = graphModel.factory().newNode("node");
selectedNode.setLabel("Node");

assertNull(NodeUtils.convertNode(selectedNode));
}

@Test
public void testClickInNodeTrue() {
ProjectController pc = Lookup.getDefault().lookup(ProjectController.class);
pc.newProject();
Workspace workspace = pc.getCurrentWorkspace();
GraphModel graphModel = Lookup.getDefault().lookup(GraphController.class).getGraphModel(workspace);
Node node = graphModel.factory().newNode("node");
node.setLabel("Node");
node.setX(100);
node.setY(-100);
node.setSize(5);
assertTrue(NodeUtils.clickInNode(node, 102, 102));
pc.newProject();
Workspace workspace = pc.getCurrentWorkspace();
GraphModel graphModel = Lookup.getDefault().lookup(GraphController.class).getGraphModel(workspace);
Node node = graphModel.factory().newNode("node");
node.setLabel("Node");
node.setX(100);
node.setY(-100);
node.setSize(5);

assertTrue(NodeUtils.clickInNode(node, 102, 102));
}

@Test
public void testClickInNodeFalse() {
ProjectController pc = Lookup.getDefault().lookup(ProjectController.class);
pc.newProject();
Workspace workspace = pc.getCurrentWorkspace();
GraphModel graphModel = Lookup.getDefault().lookup(GraphController.class).getGraphModel(workspace);
Node node = graphModel.factory().newNode("node");
node.setLabel("Node");
node.setX(100);
node.setY(-100);
node.setSize(5);
assertFalse(NodeUtils.clickInNode(node, 4, 4));
pc.newProject();
Workspace workspace = pc.getCurrentWorkspace();
GraphModel graphModel = Lookup.getDefault().lookup(GraphController.class).getGraphModel(workspace);
Node node = graphModel.factory().newNode("node");
node.setLabel("Node");
node.setX(100);
node.setY(-100);
node.setSize(5);

assertFalse(NodeUtils.clickInNode(node, 4, 4));
}
@AfterClass
public static void tearDown() {

@After
public void tearDown() {
de.uhd.ifi.se.decision.management.eclipse.model.Node.nodes.clear();
GitClient.instances.clear();
GitCommit.instances.clear();
Expand Down
Loading

0 comments on commit 04c0139

Please sign in to comment.