-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Export pdf/linked files #3147
Merged
Export pdf/linked files #3147
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
9d38d12
First approach for implementing PDF Exporter
Siedlerchr 00eccc7
First approach for implementing PDF Exporter
Siedlerchr 50e9716
Add to File menu and context menu
Siedlerchr 26a7e1f
Remove separator from tools menu
Siedlerchr ec7c44b
fix fileUtil and localzation from rebase
Siedlerchr 68e1562
Remove empty line
Siedlerchr d1b53eb
Move service to new class
Siedlerchr 7021371
Fix translation
Siedlerchr 6b02e9c
Add idea for list view dialog
Siedlerchr edec73d
Merge remote-tracking branch 'upstream/master' into exportPdf
Siedlerchr 95474ea
Merge remote-tracking branch 'upstream/master' into exportPdf
Siedlerchr bed0a54
Add TableView to show log message
Siedlerchr e347bc9
Add class for table view data
Siedlerchr 090a4cd
Add Green/Red icons for status
Siedlerchr 93f72b2
fix checkstyle and make cancel button close button
Siedlerchr 353e9ad
fix codacy
Siedlerchr f29066c
Merge remote-tracking branch 'upstream/master' into exportPdf
Siedlerchr aa10731
Renamings
Siedlerchr 9e6cffc
Remove setter
Siedlerchr b61082c
Add fxml and move to package
Siedlerchr 713ecec
fix controller
Siedlerchr cfa74e5
Merge remote-tracking branch 'upstream/master' into exportPdf
Siedlerchr 4c01181
add button data
Siedlerchr cc30b98
Add new wrapper class for injection
Siedlerchr a67cd4e
Add todos hinting at empty
Siedlerchr 5d96526
Fix injection of data
Siedlerchr 8011e6e
rebame and fix checkstyle
Siedlerchr bb1a304
Make variables private
Siedlerchr 5e1117a
Merge remote-tracking branch 'upstream/master' into exportPdf
Siedlerchr 8dabe6d
Merge remote-tracking branch 'upstream/master' into exportPdf
Siedlerchr fc7a2a1
fix merge error in lang files
Siedlerchr ba35360
Fix some coday warnings
Siedlerchr 88faa7c
Rename l10n
Siedlerchr 658d97e
Merge remote-tracking branch 'upstream/master' into exportPdf
Siedlerchr 8f14cc7
fix showing of progress bar
Siedlerchr 07ee6ea
Merge branch 'exportPdf' of https://github.com/JabRef/jabref into exp…
Siedlerchr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 3 additions & 9 deletions
12
src/main/java/org/jabref/gui/copyfiles/CopyFilesDialogViewModel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/main/java/org/jabref/gui/copyfiles/CopyFilesResultListDependency.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package org.jabref.gui.copyfiles; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public class CopyFilesResultListDependency { | ||
|
||
private List<CopyFilesResultItemViewModel> results = new ArrayList<>(); | ||
|
||
public CopyFilesResultListDependency() { | ||
//empty | ||
} | ||
|
||
public CopyFilesResultListDependency(List<CopyFilesResultItemViewModel> results) { | ||
this.results = results; | ||
} | ||
|
||
public List<CopyFilesResultItemViewModel> getResults() { | ||
return results; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,12 +8,7 @@ | |
|
||
import javax.swing.AbstractAction; | ||
|
||
import javafx.collections.FXCollections; | ||
import javafx.collections.ObservableList; | ||
import javafx.concurrent.Task; | ||
import javafx.scene.control.ButtonType; | ||
import javafx.scene.control.Dialog; | ||
import javafx.scene.control.ScrollPane; | ||
import javafx.scene.control.TableColumn; | ||
import javafx.scene.control.TableView; | ||
import javafx.scene.paint.Color; | ||
|
@@ -76,7 +71,11 @@ private void startServiceAndshowProgessDialog(Task<List<CopyFilesResultItemViewM | |
} | ||
|
||
private void showDialog(List<CopyFilesResultItemViewModel> data) { | ||
Dialog<ButtonType> dlg = new Dialog<>(); | ||
|
||
CopyFilesDialogView dlg = new CopyFilesDialogView(databaseContext, new CopyFilesResultListDependency(data)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @tobiasdiez Here I am passing the instance of the object, but it doesn't display any data. |
||
dlg.show(); | ||
|
||
/*Dialog<ButtonType> dlg = new Dialog<>(); | ||
dlg.setTitle(Localization.lang("Result")); | ||
ObservableList<CopyFilesResultItemViewModel> tableData = FXCollections.observableArrayList(data); | ||
|
||
|
@@ -93,6 +92,7 @@ private void showDialog(List<CopyFilesResultItemViewModel> data) { | |
dlg.getDialogPane().getButtonTypes().add(ButtonType.CLOSE); | ||
dlg.setResizable(true); | ||
dlg.showAndWait(); | ||
*/ | ||
} | ||
|
||
private static TableView<CopyFilesResultItemViewModel> createTable() { | ||
|
File renamed without changes.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tobiasdiez I have created this wrapper class to inject it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I dont' intilaize the ArrayList with Empty, it will give an NPE in my View Model which leads to the conclusion that this are somehow different objects. I remember having similair problems wit the Sharelatex Integration and ended up making it static. But maybe there is another solution?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh damn...thats ugly. It is not possible to directly inject the list of results?
You also hit this bug here: AdamBien/afterburner.fx#71 this is why you need the no-arg constructor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll have a look at it later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The list can not be directly injected, because List is an interface which of course can not be instantiated...that's where our default injector throws an error
I tried to add handling for list but then generics are a problem...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tobiasdiez I found the issue. The "key" of the Hashmap and the name of the with inject annotated variable differed! That's why the data was not passed correct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With #3334 you should be able to use
@Inject List<whatever> toBeInjected
or other complex types (they do not need to have a no-args constructor anymore). Of course the names of the "key" and the "field" have to coincide to make this work.