eclipse-mat / mat

The Eclipse Memory Analyzer is a fast and feature-rich Java heap dump analyzer that helps you find memory leaks and reduce memory consumption.
https://eclipse.dev/mat/
Eclipse Public License 2.0
59 stars 10 forks source link

Importing MAT source into Eclipse 2022-06 creates various untracked files in git #37

Open eclipsewebmaster opened 4 months ago

eclipsewebmaster commented 4 months ago

| --- | --- | | Bugzilla Link | 580403 | | Status | NEW | | Importance | P3 normal | | Reported | Jul 19, 2022 12:31 EDT | | Modified | Jul 25, 2022 10:54 EDT | | Version | 1.13 | | See also | Gerrit change 194793 | | Reporter | Kevin Grigorenko |

Description

$ git status\ On branch master\ Your branch is up to date with 'origin/master'.

Changes not staged for commit:\ (use "git add ..." to update what will be committed)\ (use "git restore ..." to discard changes in working directory)\ modified: features/org.eclipse.mat.chart.feature/.project\ modified: features/org.eclipse.mat.feature/.project\ modified: features/org.eclipse.mat.ui.rcp.feature/.project\ modified: org.eclipse.mat.product/.project\ modified: org.eclipse.mat.targetdef/.project\ modified: org.eclipse.mat.updatesite/.project\ modified: parent/.project\ modified: plugins/org.eclipse.mat.api/.classpath\ modified: plugins/org.eclipse.mat.api/.project\ modified: plugins/org.eclipse.mat.chart.ui/.classpath\ modified: plugins/org.eclipse.mat.chart.ui/.project\ modified: plugins/org.eclipse.mat.chart.ui/.settings/org.eclipse.jdt.core.prefs\ modified: plugins/org.eclipse.mat.chart/.classpath\ modified: plugins/org.eclipse.mat.chart/.project\ modified: plugins/org.eclipse.mat.chart/.settings/org.eclipse.jdt.core.prefs\ modified: plugins/org.eclipse.mat.dtfj/.classpath\ modified: plugins/org.eclipse.mat.dtfj/.project\ modified: plugins/org.eclipse.mat.dtfj/.settings/org.eclipse.jdt.core.prefs\ modified: plugins/org.eclipse.mat.hprof/.classpath\ modified: plugins/org.eclipse.mat.hprof/.project\ modified: plugins/org.eclipse.mat.hprof/.settings/org.eclipse.jdt.core.prefs\ modified: plugins/org.eclipse.mat.ibmdumps/.classpath\ modified: plugins/org.eclipse.mat.ibmdumps/.project\ modified: plugins/org.eclipse.mat.ibmdumps/.settings/org.eclipse.jdt.core.prefs\ modified: plugins/org.eclipse.mat.jdt/.classpath\ modified: plugins/org.eclipse.mat.jdt/.project\ modified: plugins/org.eclipse.mat.jdt/.settings/org.eclipse.jdt.core.prefs\ modified: plugins/org.eclipse.mat.jruby.resolver/.classpath\ modified: plugins/org.eclipse.mat.jruby.resolver/.project\ modified: plugins/org.eclipse.mat.jruby.resolver/.settings/org.eclipse.jdt.core.prefs\ modified: plugins/org.eclipse.mat.parser/.classpath\ modified: plugins/org.eclipse.mat.parser/.project\ modified: plugins/org.eclipse.mat.parser/.settings/org.eclipse.jdt.core.prefs\ modified: plugins/org.eclipse.mat.report/.classpath\ modified: plugins/org.eclipse.mat.report/.project\ modified: plugins/org.eclipse.mat.report/.settings/org.eclipse.jdt.core.prefs\ modified: plugins/org.eclipse.mat.tests/.classpath\ modified: plugins/org.eclipse.mat.tests/.project\ modified: plugins/org.eclipse.mat.tests/.settings/org.eclipse.jdt.core.prefs\ modified: plugins/org.eclipse.mat.ui.help/.classpath\ modified: plugins/org.eclipse.mat.ui.help/.project\ modified: plugins/org.eclipse.mat.ui.help/.settings/org.eclipse.jdt.core.prefs\ modified: plugins/org.eclipse.mat.ui.rcp.tests/.classpath\ modified: plugins/org.eclipse.mat.ui.rcp.tests/.project\ modified: plugins/org.eclipse.mat.ui.rcp.tests/.settings/org.eclipse.jdt.core.prefs\ modified: plugins/org.eclipse.mat.ui.rcp/.classpath\ modified: plugins/org.eclipse.mat.ui.rcp/.project\ modified: plugins/org.eclipse.mat.ui.rcp/.settings/org.eclipse.jdt.core.prefs\ modified: plugins/org.eclipse.mat.ui/.classpath\ modified: plugins/org.eclipse.mat.ui/.project

Untracked files:\ (use "git add ..." to include in what will be committed)\ features/org.eclipse.mat.chart.feature/.settings/\ features/org.eclipse.mat.feature/.settings/\ features/org.eclipse.mat.ui.rcp.feature/.settings/\ org.eclipse.mat.product/.settings/org.eclipse.m2e.core.prefs\ org.eclipse.mat.targetdef/.settings/\ org.eclipse.mat.updatesite/.settings/\ parent/.settings/\ plugins/org.eclipse.mat.api/.settings/org.eclipse.m2e.core.prefs\ plugins/org.eclipse.mat.chart.ui/.settings/org.eclipse.m2e.core.prefs\ plugins/org.eclipse.mat.chart/.settings/org.eclipse.m2e.core.prefs\ plugins/org.eclipse.mat.dtfj/.settings/org.eclipse.m2e.core.prefs\ plugins/org.eclipse.mat.hprof/.settings/org.eclipse.m2e.core.prefs\ plugins/org.eclipse.mat.ibmdumps/.settings/org.eclipse.m2e.core.prefs\ plugins/org.eclipse.mat.jdt/.settings/org.eclipse.m2e.core.prefs\ plugins/org.eclipse.mat.jruby.resolver/.settings/org.eclipse.m2e.core.prefs\ plugins/org.eclipse.mat.parser/.settings/org.eclipse.m2e.core.prefs\ plugins/org.eclipse.mat.report/.settings/org.eclipse.m2e.core.prefs\ plugins/org.eclipse.mat.tests/.settings/org.eclipse.m2e.core.prefs\ plugins/org.eclipse.mat.ui.help/.settings/org.eclipse.m2e.core.prefs\ plugins/org.eclipse.mat.ui.rcp.tests/.settings/org.eclipse.m2e.core.prefs\ plugins/org.eclipse.mat.ui.rcp/.settings/org.eclipse.m2e.core.prefs\ plugins/org.eclipse.mat.ui/.settings/org.eclipse.m2e.core.prefs

eclipsewebmaster commented 4 months ago

Jul 19, 2022 12:52

New Gerrit change created: https://git.eclipse.org/r/c/mat/org.eclipse.mat/+/194793

eclipsewebmaster commented 4 months ago

By Andrew Johnson on Jul 24, 2022 06:17

Updating for Java 11 makes sense. It may force a minor version change,\ but going to 1.14.0 is fine rather than 1.13.1

A question about .classpath is whether the change from output from /bin to /target/classes affects Eclipse builds or PDE builds. Where do the classes from a normal Eclipse build go after the change? Does exporting a plugin from Eclipse still work properly? Does build.properties need to be changed?

Do the org.eclipse.m2e.core.prefs files do much? Do we need them in the source,\ or do we just git ignore them and let the build recreate them each time.\ Perhaps adding them to the source is easiest.

eclipsewebmaster commented 4 months ago

By Kevin Grigorenko on Jul 25, 2022 10:54

Updating for Java 11 makes sense. It may force a minor version change, but going to 1.14.0 is fine rather than 1.13.1

Should I go ahead and update to 1.14.0 in this bug? This would also resolve bug 580402

A question about .classpath is whether the change from output from /bin to /target/classes affects Eclipse builds or PDE builds.

I'm guessing that when I imported in Eclipse using Import } Maven } Existing Maven Projects rather than Import } General } Existing Projects into Workspace, that Eclipse decided to change from /bin to /target/classes. I'm not sure what the pros and cons are.

I've just tested doing a command line build, then opening Eclipse and then I'm able to successfully launch from within Eclipse, so it seems to work okay.

Where do the classes from a normal Eclipse build go after the change?

I'm not sure if I understand the question, but I just did an Eclipse build, and the classes went into target/classes (instead of bin)

Does exporting a plugin from Eclipse still work properly?

I've never done this before. Is this under Export } Plug-in Development } Deployable plug-ins and fragments?

Does build.properties need to be changed?

Good point. Within Eclipse, it gives a warning in build.properties for the output field.

Should I just do a normal project import instead of a Maven project import, or should we continue down this path and modify build.properties as well?

Do the org.eclipse.m2e.core.prefs files do much? Do we need them in the source, or do we just git ignore them and let the build recreate them each time. Perhaps adding them to the source is easiest.

I'm not sure what the best practice is. A quick search suggests it is valid to add these files to git in case we ever want to customize them: https://www.eclipse.org/lists/m2e-users/msg02756.html

"Profiles activated in m2e are stored under .settings/org.eclipse.m2e.core.prefs so you might want to add that file to your SCM."