Skip to content
This repository has been archived by the owner on Apr 10, 2021. It is now read-only.

Support Java 7 #81 #94

Merged
merged 2 commits into from
Jan 30, 2016
Merged

Support Java 7 #81 #94

merged 2 commits into from
Jan 30, 2016

Conversation

markiewb
Copy link
Contributor

Hi, have a look at this pull-request to transform the code to Java7. You did not use so much JDK8-specifics, so it was "easy" to transform. Try it out.

Using this you could provide a version for NB8.1/8.0 the plugin portal. #42

<org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.sortMembersInGroups>true</org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.sortMembersInGroups>
<org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.keepGettersAndSettersTogether>true</org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.keepGettersAndSettersTogether>
<de-markiewb-netbeans-plugins-eclipse-formatter.preserveBreakPoints>true</de-markiewb-netbeans-plugins-eclipse-formatter.preserveBreakPoints>
<de-markiewb-netbeans-plugins-eclipse-formatter.eclipseFormatterActiveProfile/>
Copy link
Member

Choose a reason for hiding this comment

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

I don't think that these entries de-markiewb-netbeans-plugins-eclipse-formatter are needed, are they?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Die Zeilen waren bereits vorher drin. Nur irgendwie hat mein NB die Lineendings geaendert. Mein Change kann also raus!

@bennycode
Copy link
Member

This is awesome news! I will review your pull request this weekend and then merge it in. Looks like we are going for our initial 1.0 release. Looking forward to it! Uh yeah! 😎

@markiewb
Copy link
Contributor Author

@bennyn: Schau dir besonders die Changes in FileInfoReader an! Den Code habe ich aus den Lambdas mit Readern nachgebaut. Hoffentlich funktioniert noch alles. Die restlichen Inline-Funktionen konnte mir NetBeans via Hint zurueckkonvertieren.

for (String line = reader.readLine(); line != null; line = reader.readLine()) {
lines.add(line);
}
reader.close();

Choose a reason for hiding this comment

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

Shouldn't this reader be closed in a finally block or placed in a try-with-resources block?

Copy link
Member

Choose a reason for hiding this comment

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

👍

Copy link
Member

Choose a reason for hiding this comment

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

We can check how it's done in Apache Commons' IOUtils.readLines.

@markiewb
Copy link
Contributor Author

@Shredder121: I added try-with-resources. See the additional commit f738fee on the branch.

Now it's also only one point of failure or more positive: a better implementation without the readers could be implemented there.

<de-markiewb-netbeans-plugins-eclipse-formatter.useProjectSettings>true</de-markiewb-netbeans-plugins-eclipse-formatter.useProjectSettings>
</properties>
</project-shared-configuration>
<?xml version="1.0" encoding="UTF-8"?>
Copy link
Member

Choose a reason for hiding this comment

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

It seems that the line ending is changed.

@markiewb
Copy link
Contributor Author

@junichi11 / @bennyn / @Shredder121 : Feel free to checkout the branch and fix the issues for yourself, if they are only minor ones.

@junichi11
Copy link
Member

@markiewb Thanks for your PR. Please don't misunderstand. As Benny wrote the above, it will be reviewed by @bennyn. I just left comments :) So, please wait a while.

@markiewb
Copy link
Contributor Author

@junichi11: I do not mind and I do not misunderstand it. It's fine. I guess you are busy too. g

@bennycode
Copy link
Member

@markiewb Sorry for being so late with reviewing it! But as you said, everyone's busy. I finally reviewed your changes, so you get a big DANKESCHÖN! 😄

I will add the try-with-resources blocks suggested by @junichi11 and @Shredder121 when this PR is merged because I don't have access to your fork.

Next thing will then be plugin certification. Thank you so much @markiewb. 🍻

bennycode added a commit that referenced this pull request Jan 30, 2016
Rewrote Java 8 code to be compatible with Java 7
@bennycode bennycode merged commit d4611d0 into welovecoding:master Jan 30, 2016
@markiewb
Copy link
Contributor Author

@bennyn: Gern geschehen! Only with a public release and the placement at the plugin center your plugin gets the attention of the users. Your invested work should not be wasted, that's why I helped you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants