Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
5f6bb14
Add FeatureEntryPoint to SVGTextFigure
3FCO Sep 20, 2023
1074690
And main... For good measure
3FCO Sep 20, 2023
79fda83
Added feature annotations for rectangle
Siole Sep 20, 2023
c371d4e
Update gitignore
Siole Sep 20, 2023
62cb1d0
Add FeatureEntryPoint for EllipseTool
FrejaStrand Sep 20, 2023
8009d0b
added entrypoints
GustavFrandsen Sep 20, 2023
e8d08dc
Revert "added entrypoints"
GustavFrandsen Sep 20, 2023
b2403aa
Merge pull request #17 from 3FCO/emil/add-feature-call
3FCO Sep 20, 2023
cfe9073
Merge branch 'develop' into Sisse
3FCO Sep 20, 2023
8e5fbd7
added entrypoint
GustavFrandsen Sep 20, 2023
4abb872
Merge pull request #18 from 3FCO/Sisse
3FCO Sep 20, 2023
c797b14
Merge pull request #19 from 3FCO/Freja
3FCO Sep 20, 2023
ae632e1
Merge pull request #20 from 3FCO/Gustav
3FCO Sep 20, 2023
3da0330
FeatureEntryPoints
BJLUN21 Sep 21, 2023
7352048
FeatureEntryPoint basic editting tools
Sep 21, 2023
485d5e8
Merge pull request #21 from 3FCO/Bjørn
Siole Sep 22, 2023
e5512b5
Merge pull request #22 from 3FCO/FeatureEntryPoint-added-for-Basic-ed…
Siole Sep 22, 2023
78ad679
Remove comment with no useful information
3FCO Sep 27, 2023
b03726a
Remove un-useful comment
3FCO Sep 27, 2023
93ee530
Change from nested if statement to an early return if cachedHitShape …
FrejaStrand Sep 27, 2023
6e99e4b
Remove un-useful comment
3FCO Sep 27, 2023
d92baf8
Add inline expression
3FCO Sep 27, 2023
5058d48
Explicit type argument Handle is replaced with <>
FrejaStrand Sep 27, 2023
f1daf7f
"static" base class members is now not accessed via derived types.
FrejaStrand Sep 27, 2023
ff8267b
Change diamond head in createHandles
Siole Sep 27, 2023
f91c99e
Fix a lot of code smells
3FCO Sep 27, 2023
1dd7f32
Change from nested if statement to an early return if cachedHitShape …
FrejaStrand Sep 30, 2023
220dbef
Create a helper class to handle the handleCreation method to avoid du…
FrejaStrand Sep 30, 2023
1b7458a
changed to helper method
GustavFrandsen Oct 1, 2023
f53720b
Didn't need to make a new instance of the HandleHelper so this is rem…
FrejaStrand Oct 3, 2023
0710c0b
pom's added for SVG and actions modules
FrejaStrand Oct 4, 2023
f4cd7f1
Merge branch 'create-handle-helper-class' of https://github.com/3FCO/…
FrejaStrand Oct 4, 2023
b06f177
Merge pull request #24 from 3FCO/7-refactoring-of-text-tool-write
FrejaStrand Oct 4, 2023
6cc0ace
merged with helper and fixed some code smells
GustavFrandsen Oct 4, 2023
0ab8e2a
Merge pull request #25 from 3FCO/create-handle-helper-class
GustavFrandsen Oct 4, 2023
d3ea382
Merge branch 'create-handle-helper-class' into 4-refactor-the-ellipse…
FrejaStrand Oct 4, 2023
7abf0f9
Merge branch 'develop' into 12-refactor-the-image-tool-insert-functio…
GustavFrandsen Oct 4, 2023
3d459d6
Delete jhotdraw-actions/jhotdraw-actions.iml
GustavFrandsen Oct 4, 2023
e4fc66a
Delete jhotdraw-api/jhotdraw-api.iml
FrejaStrand Oct 4, 2023
35848ee
Delete jhotdraw.iml
GustavFrandsen Oct 4, 2023
348c24f
Delete jhotdraw-app/jhotdraw-app.iml
FrejaStrand Oct 4, 2023
a5ee2b8
Delete jhotdraw-xml/jhotdraw-xml.iml
GustavFrandsen Oct 4, 2023
3a2e5ad
Delete jhotdraw-core/jhotdraw-core.iml
FrejaStrand Oct 4, 2023
8589790
Delete jhotdraw-datatransfer/jhotdraw-datatransfer.iml
FrejaStrand Oct 4, 2023
ed9d893
Delete jhotdraw-utils/jhotdraw-utils.iml
GustavFrandsen Oct 4, 2023
0ac488e
Delete jhotdraw-gui/jhotdraw-gui.iml
FrejaStrand Oct 4, 2023
fa9d045
Delete jhotdraw-samples/jhotdraw-samples.iml
GustavFrandsen Oct 4, 2023
444b711
Delete jhotdraw-samples/jhotdraw-samples-mini/jhotdraw-samples-mini.iml
FrejaStrand Oct 4, 2023
2e4d9b9
Delete jhotdraw-samples/jhotdraw-samples-misc/jhotdraw-samples-misc.iml
FrejaStrand Oct 4, 2023
a3cf062
Delete jhotdraw-samples/jhotdraw-samples-misc/pom.xml
FrejaStrand Oct 4, 2023
5a0bb0a
Revert "Delete jhotdraw-samples/jhotdraw-samples-misc/pom.xml"
GustavFrandsen Oct 4, 2023
0024d03
Not needed for everybody
FrejaStrand Oct 4, 2023
d912c39
Not needed anymore as the HandleHelper class is created
FrejaStrand Oct 4, 2023
18cc5df
.yml file added for setting up the pipeline
FrejaStrand Oct 4, 2023
6dac063
Add setting.xml to our project to access the maven repository.
FrejaStrand Oct 4, 2023
af3a93e
Delete unnecessary step
FrejaStrand Oct 4, 2023
0d273b0
Not in use anymore since the handlehelper class is created
FrejaStrand Oct 4, 2023
8f608b2
Stopping the drawing window from opening when running the install
FrejaStrand Oct 4, 2023
3358a19
Add comments about how to get the feature tracer to work again
FrejaStrand Oct 4, 2023
8d676e1
Merge pull request #28 from 3FCO/27-add-workflow-for-project
FrejaStrand Oct 4, 2023
985af6b
Merge branch 'develop' into 4-refactor-the-ellipse-tool-draw-function…
3FCO Oct 4, 2023
708b1db
Merge pull request #26 from 3FCO/4-refactor-the-ellipse-tool-draw-fun…
3FCO Oct 4, 2023
6d59391
Removed redundant comments from getter/setter methods
Siole Oct 13, 2023
84a9adc
Encapsulating public attributes
Siole Oct 13, 2023
31409b8
Refactor getHitShape()
Siole Oct 13, 2023
f0c21c0
Fixed static access in SVGAttributeKeys
Siole Oct 16, 2023
67adc45
refactor transform()
Siole Oct 16, 2023
5cdbb5b
Unit testing drawstroke() in SVGRectFigure boundary case
Siole Oct 27, 2023
aed7ead
unit test drawStroke() else statement
Siole Oct 27, 2023
3068dbd
Assertion in createHandles() in SVGRectFigure
Siole Oct 27, 2023
ecec8c6
Jgiven test for best case (possible to transform ellipse corretly), f…
FrejaStrand Nov 8, 2023
eb22ba8
Java assertion included to test for invariants. Secures that the draw…
FrejaStrand Nov 8, 2023
0a5afa7
Jgiven is now used for automating BDD scenarios
FrejaStrand Nov 8, 2023
f35693a
Remove comment with no useful information
3FCO Sep 27, 2023
664959b
Remove un-useful comment
3FCO Sep 27, 2023
0643b57
Remove un-useful comment
3FCO Sep 27, 2023
45d13aa
Add inline expression
3FCO Sep 27, 2023
8161c9b
Fix a lot of code smells
3FCO Sep 27, 2023
3fcc516
.yml file added for setting up the pipeline
FrejaStrand Oct 4, 2023
42eeede
Add setting.xml to our project to access the maven repository.
FrejaStrand Oct 4, 2023
ebf0368
Delete unnecessary step
FrejaStrand Oct 4, 2023
eb45d88
Not in use anymore since the handlehelper class is created
FrejaStrand Oct 4, 2023
a15b916
Add comments about how to get the feature tracer to work again
FrejaStrand Oct 4, 2023
89ca5b1
Jgiven test for best case (possible to transform ellipse corretly), f…
FrejaStrand Nov 8, 2023
7d6edda
Java assertion included to test for invariants. Secures that the draw…
FrejaStrand Nov 8, 2023
f8c77e6
Jgiven is now used for automating BDD scenarios
FrejaStrand Nov 8, 2023
3bb8878
fix for pulling
FrejaStrand Nov 8, 2023
b33f9a3
Added test and assert somewhere in the code
3FCO Nov 8, 2023
e84978d
Optimization for minor fixes
FrejaStrand Nov 8, 2023
ce48cc9
Methods made void to pass checkstyle in the pipeline
FrejaStrand Nov 8, 2023
f361c71
Merge pull request #29 from 3FCO/testImplForEllipseTool
FrejaStrand Nov 8, 2023
1dfa31e
BDD-test rectangle feature
Siole Nov 8, 2023
60b24a7
BDD and normal test
3FCO Nov 8, 2023
a7605fc
Merge branch 'develop' into text-tool-tests
3FCO Nov 8, 2023
ade3c61
Unused imports
3FCO Nov 8, 2023
6cf947b
Merge remote-tracking branch 'origin/text-tool-tests' into text-tool-…
3FCO Nov 8, 2023
a004f0c
Merge pull request #30 from 3FCO/text-tool-tests
3FCO Nov 8, 2023
ad69125
Refactor method name in setArc
Siole Nov 22, 2023
fe331c7
Extracted method drawStroke in SVGRectFigure
Siole Nov 22, 2023
d6db4fa
Update comments in SVGRectFigure
Siole Nov 22, 2023
6fa13f4
update on BDD test
Siole Nov 22, 2023
0c41bc8
Merge branch 'develop' into 2-refactor-the-rectangle-tool-draw-functi…
3FCO Nov 28, 2023
1419fa7
Semantic corrections
Siole Nov 28, 2023
4025cd0
Merge pull request #31 from 3FCO/2-refactor-the-rectangle-tool-draw-f…
Siole Nov 28, 2023
092dc78
final changes
GustavFrandsen Jan 3, 2024
602cdbf
Merge branch 'develop' into 12-refactor-the-image-tool-insert-functio…
GustavFrandsen Jan 3, 2024
5c3ecb4
removed unuses imports
GustavFrandsen Jan 3, 2024
9433344
Merge pull request #32 from 3FCO/12-refactor-the-image-tool-insert-fu…
GustavFrandsen Jan 3, 2024
fea78fc
KennethBasicEditing
Jan 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Java CI with Maven

on:
push:
branches: ["develop"]
pull_request:
branches: ["develop"]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: "11"
distribution: "temurin"
cache: maven
- name: Build with Maven
run: mvn -s settings.xml -B package --file pom.xml
env:
USER_NAME: ${{ secrets.USER_NAME }}
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ nb-configuration.xml
.idea/*
*.ftf
/jhotdraw-samples/jhotdraw-samples-misc/nbproject/
jhotdraw-samples/jhotdraw-samples-misc/pom.xml
6 changes: 6 additions & 0 deletions jhotdraw-actions/jhotdraw-actions.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="SonarLintModuleSettings">
<option name="uniqueId" value="8e696724-8e7a-48a3-b1c3-b940c5807774" />
</component>
</module>
6 changes: 6 additions & 0 deletions jhotdraw-actions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,11 @@
<artifactId>jhotdraw-datatransfer</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>dk.sdu.cbse</groupId>
<artifactId>featuretracerlite</artifactId>
<version>1.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

import dk.sdu.mmmi.featuretracer.lib.FeatureEntryPoint;
import org.jhotdraw.datatransfer.ClipboardUtil;
import org.jhotdraw.util.*;

Expand Down Expand Up @@ -48,6 +50,7 @@ public CopyAction() {
* @param target The target of the action. Specify null for the currently
* focused component.
*/
@FeatureEntryPoint(value="CopyAction")
public CopyAction(JComponent target) {
super(target);
ResourceBundleUtil labels = ResourceBundleUtil.getBundle("org.jhotdraw.action.Labels");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

import dk.sdu.mmmi.featuretracer.lib.FeatureEntryPoint;
import org.jhotdraw.datatransfer.ClipboardUtil;
import org.jhotdraw.util.*;

Expand Down Expand Up @@ -48,6 +50,7 @@ public CutAction() {
* @param target The target of the action. Specify null for the currently
* focused component.
*/
@FeatureEntryPoint(value="CutAction")
public CutAction(JComponent target) {
super(target);
ResourceBundleUtil labels = ResourceBundleUtil.getBundle("org.jhotdraw.action.Labels");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
import java.beans.PropertyChangeListener;
import javax.swing.JComponent;
import javax.swing.text.*;

import dk.sdu.mmmi.featuretracer.lib.FeatureEntryPoint;
import org.jhotdraw.api.gui.EditableComponent;
import org.jhotdraw.beans.WeakPropertyChangeListener;
import org.jhotdraw.util.*;
Expand Down Expand Up @@ -89,6 +91,7 @@ public DeleteAction(JComponent target) {
* @param target The target of the action. Specify null for the currently
* focused component.
*/
@FeatureEntryPoint(value="DeleteAction")
protected DeleteAction(JComponent target, String id) {
super(id);
this.target = target;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

import dk.sdu.mmmi.featuretracer.lib.FeatureEntryPoint;
import org.jhotdraw.api.gui.EditableComponent;
import org.jhotdraw.util.*;

Expand Down Expand Up @@ -63,6 +65,7 @@ public DuplicateAction() {
* @param target The target of the action. Specify null for the currently
* focused component.
*/
@FeatureEntryPoint(value="DuplicateAction")
public DuplicateAction(JComponent target) {
super(target);
ResourceBundleUtil labels = ResourceBundleUtil.getBundle("org.jhotdraw.action.Labels");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
import java.awt.datatransfer.*;
import java.awt.event.*;
import javax.swing.*;

import dk.sdu.mmmi.featuretracer.lib.FeatureEntryPoint;
import org.jhotdraw.datatransfer.ClipboardUtil;
import org.jhotdraw.util.*;

Expand Down Expand Up @@ -49,6 +51,8 @@ public PasteAction() {
* @param target The target of the action. Specify null for the currently
* focused component.
*/
@FeatureEntryPoint(value="PasteAction")

public PasteAction(JComponent target) {
super(target);
ResourceBundleUtil labels = ResourceBundleUtil.getBundle("org.jhotdraw.action.Labels");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import java.awt.event.*;
import java.beans.*;
import javax.swing.*;

import dk.sdu.mmmi.featuretracer.lib.FeatureEntryPoint;
import org.jhotdraw.action.AbstractViewAction;
import org.jhotdraw.api.app.Application;
import org.jhotdraw.api.app.View;
Expand Down Expand Up @@ -52,6 +54,8 @@ public void propertyChange(PropertyChangeEvent evt) {
/**
* Creates a new instance.
*/

@FeatureEntryPoint("RedoAction")
public RedoAction(Application app, View view) {
super(app, view);
labels.configureAction(this, ID);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import java.awt.event.*;
import java.beans.*;
import javax.swing.*;

import dk.sdu.mmmi.featuretracer.lib.FeatureEntryPoint;
import org.jhotdraw.action.AbstractViewAction;
import org.jhotdraw.api.app.Application;
import org.jhotdraw.api.app.View;
Expand Down Expand Up @@ -51,6 +53,8 @@ public void propertyChange(PropertyChangeEvent evt) {
/**
* Creates a new instance.
*/

@FeatureEntryPoint("UndoAction")
public UndoAction(Application app, View view) {
super(app, view);
labels.configureAction(this, ID);
Expand Down
6 changes: 6 additions & 0 deletions jhotdraw-api/jhotdraw-api.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="SonarLintModuleSettings">
<option name="uniqueId" value="93b4fd4c-f88d-48af-ba23-e7032d6c9805" />
</component>
</module>
6 changes: 6 additions & 0 deletions jhotdraw-app/jhotdraw-app.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="SonarLintModuleSettings">
<option name="uniqueId" value="535a2f5f-b9c2-4139-be85-507ebad6dea6" />
</component>
</module>
6 changes: 6 additions & 0 deletions jhotdraw-core/jhotdraw-core.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="SonarLintModuleSettings">
<option name="uniqueId" value="766ee4e4-e3d1-45be-8a93-1d437b01f87c" />
</component>
</module>
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@ public class TextInputFormat implements InputFormat {
* File name extension used for the file filter.
*/
private String fileExtension;
/**
* Image IO image format name.
*/
private String formatName;
/**
* This should be set to true for ImageHolderFigures that can hold multiple
* lines of text.
Expand Down Expand Up @@ -89,7 +85,9 @@ public TextInputFormat(TextHolderFigure prototype) {
public TextInputFormat(TextHolderFigure prototype, String formatName,
String description, String fileExtension, boolean isMultiline) {
this.prototype = prototype;
this.formatName = formatName;
/**
* Image IO image format name.
*/
this.description = description;
this.fileExtension = fileExtension;
this.isMultiline = isMultiline;
Expand Down Expand Up @@ -137,7 +135,7 @@ public void read(InputStream in, Drawing drawing, boolean replace) throws IOExce
drawing.basicAddAll(0, createTextHolderFigures(in));
}

public LinkedList<Figure> createTextHolderFigures(InputStream in) throws IOException {
public List<Figure> createTextHolderFigures(InputStream in) throws IOException {
LinkedList<Figure> list = new LinkedList<>();
BufferedReader r = new BufferedReader(new InputStreamReader(in, "UTF8"));
if (isMultiline) {
Expand Down Expand Up @@ -169,7 +167,7 @@ public LinkedList<Figure> createTextHolderFigures(InputStream in) throws IOExcep
y += s.height;
}
}
if (list.size() == 0) {
if (list.isEmpty()) {
throw new IOException("No text found");
}
return list;
Expand Down
6 changes: 6 additions & 0 deletions jhotdraw-datatransfer/jhotdraw-datatransfer.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="SonarLintModuleSettings">
<option name="uniqueId" value="55a64421-5423-4db6-a4bb-f92af18e6e6c" />
</component>
</module>
6 changes: 6 additions & 0 deletions jhotdraw-gui/jhotdraw-gui.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="SonarLintModuleSettings">
<option name="uniqueId" value="a6a33639-4f36-469e-9bed-04f4af287d91" />
</component>
</module>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="SonarLintModuleSettings">
<option name="uniqueId" value="c439d010-6d6e-4e85-96bd-d1db62a1dcec" />
</component>
</module>
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"className": "org.jhotdraw.samples.svg.DeleteDrawingBDDTest",
"name": "Delete Drawing BDD",
"scenarios": [
{
"className": "org.jhotdraw.samples.svg.DeleteDrawingBDDTest",
"testMethodName": "deleteDrawing",
"description": "Delete drawing",
"tagIds": [],
"explicitParameters": [],
"derivedParameters": [],
"casesAsTable": false,
"scenarioCases": [
{
"caseNr": 1,
"steps": [
{
"name": "empty drawing",
"words": [
{
"value": "Given",
"isIntroWord": true
},
{
"value": "empty drawing"
}
],
"status": "PASSED",
"durationInNanos": 135710200
},
{
"name": "deleting the drawing",
"words": [
{
"value": "When",
"isIntroWord": true
},
{
"value": "deleting the drawing"
}
],
"status": "PASSED",
"durationInNanos": 446600
},
{
"name": "the drawing is deleted",
"words": [
{
"value": "Then",
"isIntroWord": true
},
{
"value": "the drawing is deleted"
}
],
"status": "PASSED",
"durationInNanos": 366700
}
],
"explicitArguments": [],
"derivedArguments": [],
"status": "SUCCESS",
"durationInNanos": 170965400
}
],
"durationInNanos": 170965400,
"executionStatus": "SUCCESS"
}
],
"tagMap": {}
}
Loading