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

[WIP] Get JabRef running in eclipse #5264

Merged
merged 2 commits into from
Sep 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "src/main/resources/csl-styles"]
Copy link
Member

Choose a reason for hiding this comment

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

What's the reason for this change?

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm this was not intended

path = src/main/resources/csl-styles
url = https://github.com/citation-style-language/styles.git
[submodule "src/main/resources/csl-locales"]
path = src/main/resources/csl-locales
url = https://github.com/citation-style-language/locales.git
32 changes: 27 additions & 5 deletions eclipse.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,39 @@ eclipseJdt.doLast {
f.append('encoding/<project>=UTF-8')
}
eclipse {
//add libraries to module path: https://github.com/eclipse/buildship/issues/620#issuecomment-390469550
classpath {
project {
natures 'org.eclipse.buildship.core.gradleprojectnature'
}

classpath {
file {
whenMerged {
entries.findAll {
it.kind == 'src' || it.kind == 'lib'
}.each { it.entryAttributes['module'] = 'true' }
entries.findAll { isModule(it) }.each { //(1)
it.entryAttributes['module'] = 'true'
}

entries.findAll { isSource(it) && isTestScope(it) }.each {
it.entryAttributes['test'] = 'true'
}

entries.findAll { isLibrary(it) && isTestScope(it) }.each {
it.entryAttributes['test'] = 'true'
}
}
}

defaultOutputDir = file('build')
downloadSources = true
downloadJavadoc = true
}
}

boolean isLibrary(entry) { return entry.properties.kind.equals('lib') }
boolean isTestScope(entry) { return entry.entryAttributes.get('gradle_used_by_scope').equals('test'); }
boolean isModule(entry) { isLibrary(entry) && !isTestScope(entry); }
boolean isSource(entry) { return entry.properties.kind.equals('src'); }


// add formatter and cleanup settings to Eclipse settings
// see http://stackoverflow.com/a/27461890/873282

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/jabref/JabRefMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public static void main(String[] args) {
public void start(Stage mainStage) throws Exception {
try {
// Fail on unsupported Java versions
ensureCorrectJavaVersion();
Copy link
Member

Choose a reason for hiding this comment

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

Could you please re-enable this? Did it work before in eclipse?

// ensureCorrectJavaVersion();
FallbackExceptionHandler.installExceptionHandler();

// Init preferences
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/csl-styles
Submodule csl-styles deleted from fa125e