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
[cleanup] erefactor/EclipseJdt - Exit loop earlier #97
[cleanup] erefactor/EclipseJdt - Exit loop earlier #97
Conversation
| for(IConsole element : manager.getConsoles()) { | ||
| if(this == element) { | ||
| exists = true; | ||
| break; | ||
| } | ||
| } |
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.
| for(IConsole element : manager.getConsoles()) { | |
| if(this == element) { | |
| exists = true; | |
| break; | |
| } | |
| } | |
| exists = Arrays.asList(ConsolePlugin.getDefault().getConsoleManager().getConsoles()).contains(this); | |
| if(this == element) { |
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.
OK. I just looked at correctness.
Will fix at the weekend.
I wonder why we have Arrays.fill but no Arrays.contains.
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 refuse to do that without an IDE.
So I tried again opening m2e, this time in eclipse jee 2021-03, different error this time but far from anything usable.
2 hours wasted for nothing. Giving up.
Starting with vanilla eclipse jee 2021-03
export JAVA_HOME=/usr/lib/jvm/openjdk-11
PATH=${JAVA_HOME}/bin:${PATH}
git checkout -b BreakLoopEarlyCleanUp-manual origin/erefactor/master-project/1/jdt/jdt-BreakLoopEarlyCleanUp
Following https://www.eclipse.org/m2e/documentation/m2e-development-environment.html
eclipse-2021-03
New workspace: workspace-2021-03-m2e-core
Because it's jee eclipse I expect m2e and git integration to be present.
Trying to install "Logback Classic Module"
Help / Install New Software
Add "Orbit" Repository as I understand the docs:
Orbit, https://download.eclipse.org/tools/orbit/downloads/
Error: No software site found.
Maybe:
Orbit, https://download.eclipse.org/tools/orbit/downloads/2021-03/
Seems to work.
Unmark "Hide items already installed"
Select Logback Classic Module 1.2.3 ...
Next
Your original request has been modified.
"Logback Classic Module" is already present because other installed software requires it. It will be added to the installed software list.
Cancel
git Submodules.
How to check out THIS project with sub modules?
git submodule init
git submodule update
How to make sure versions match?
hopefully empty git status is sufficient.
File / Import / Existing Maven Projects
Next
Selecting checkout dir as root directory
Deselect all
Select m2e-maven-runtime and all 4 sub projects
Finish
No error markers.
File / Import / Existing Maven Projects
Next
Selecting checkout dir as root directory
"Selecting everything under m2e-core"
Guessing that does not mean org.eclipse.m2e.core but the root pom.xml
Let everything being included, exclude m2e-core-tests tree.
Finish.
Eclipse is asking to "Setup Maven plugin connectors"
Leave all marked.
Finish
Install (all)
- m2e connector for modello
- m2e connector for the Maven Dependency Plugin
- Tycho Project Configurators
Next
Review
Next
Accept License
Finish
Eclipse is "Installing Software"
Requestor: "unsigned software to be installed ..."
Install anyway
Restart Eclipse IDE to apply the software update?
Restart Now
Change Buildpath of
"org.eclipse.m2e.tests.common"
How ???
Seems the sub project was NOT imported as a maven project because it was not offered.
Maybe we need newer m2e?
Help / Install New Software
Add M2E Releases, http://download.eclipse.org/technology/m2e/releases
Select 1.15.0.... of m2e and m2e-slf4j
Next
Cannot complete the request. See the error log for details.
"m2e - slf4j over logback logging (Optional)" will be ignored because a newer version is already installed.
"m2e - Maven Integration for Eclipse (includes Incubating components)" will be ignored because a newer version is already installed.
*** OK, let's ignore the buildpath of "org.eclipse.m2e.tests.common".
"Update the maven project configuration for all projects and do a clean build."
Hmm OK, let's hope that means selecting "m2e-core / Maven / Update Project"
and selecting all projects (note that "org.eclipse.m2e.tests.common" is missing from that list)
and leaving all other values default
and clicking OK.
eclipse: "Updating Maven Project"
475 Errors.
Project / Clean
Clean all projects
Clean
"You may need to Update Maven (forcing update of snapshot releases) and do Project/Clean…/Clean_all_projects
to clear all compilation errors."
Hmm how to "Update Maven"?
Guess that means the system installed maven.
mvn --version
Apache Maven 3.6.0
Latest version is 3.6.3, let's try to use that.
(If maven version is so important, why not use mvn wrapper?)
wget https://downloads.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
mkdir ~/cal01/local
tar -C ~/cal01/local/ -zxvf apache-maven-3.6.3-bin.tar.gz
PATH=~/cal01/local/apache-maven-3.6.3/bin:${PATH}
mvn -version
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
How to tell eclipse?
They would tell if anything is needed, yes?
Let's just exit and start eclipse again.
eclipse-2021-03
Project / Clean / Clean all
469 Errors.
Let's call that progress.
Project / Clean / Clean all
469 Errors.
Let's ask google how and if to configure maven in eclipse.
First hit: maven-in-eclipse-step-by-step-installationA
"Despite an honest effort, I have been unable to find a comprehensive tutorial on any Maven plugin. M2E, which seems like the de facto standard,
has nothing but broken (or recursive) links on their site."
A quite old quote from that SO post but I feel it.
"After successful installation do the followings in Eclipse:
Go to Window --> Preferences
Observe, Maven is enlisted at left panel"
Let's take a look:
No maven binary configured at that location.
m2e-core / Maven / Update Project
Project / Clean / Clean all
469 Errors.
Giving up.
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.
Sorry about that.
Can you please post to m2e-dev@eclipse.org to get assistance on that matter? This document is probably out of date and we should discuss its update (or replacement) on the mailing-list.
For this case, assuming your IDE does contain a snapshot version of m2e and your current runtime IDE is used as target platform, you only need to open the project you're willing to modify (org.eclipse.m2e.core.ui), dependencies will be resolved against your current IDE and you shouldn't see so many warnings.
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.
At least I was able to open eclipse with the project containing is file now following the CONTRIBUTING.md.
Thanks for updating that.
Still having 32 errors when trying to open all projects but ignoring those.
3144891
to
5ed9d9f
Compare
|
@cal101 the exit loop cleanup was improved in 4.20, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=572048. You could updated your SDK to the latest I-Build to benefit from this fix. See https://download.eclipse.org/eclipse/downloads/ If you find more issues with the cleanups in the latest I-Build please report to JDT and cc Fabrice Tiercelin. Fabrice is actively enhancing and fixing the cleanups. |
5ed9d9f
to
8a39968
Compare
|
@vogella Thanks for caring. I am in contact with the AutoRefactor-Project for quite some years now and already reported quite some bugs in the past. P.S. Your web site is a great source of information describing how to do a lot of things in a very good way. But for me not having followed eclipse stuff in detail for quite some years I often found myself wondering WHY something should be done and what the deeper goal of something is. |
|
@cal101 What's the state here? Did you rebase on top of recent change from @HannesWell to simplify import of the project? |
8a39968
to
56881be
Compare
|
I rebased Apr 30, but now I did it again. |
f367b28
to
119284f
Compare
Manual cleanup based on EclipseJdt cleanup 'BreakLoopEarly' applied by erefactor. For EclipseJdt see https://www.eclipse.org/eclipse/news/4.19/jdt.php For erefactor see https://github.com/cal101/erefactor Signed-off-by: Carsten Heyl <cal-1@web.de>
119284f
to
f72f6a6
Compare
EclipseJdt cleanup 'BreakLoopEarly' applied by erefactor.
For EclipseJdt see https://www.eclipse.org/eclipse/news/4.19/jdt.php
For erefactor see https://github.com/cal101/erefactor