You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am writing an Eclipse plugin to run with Theia. The purpose of this plugin is to query the workspace, recognize its content (projects), report the groupId:artifactId:version of Maven projects, provide a fully-qualified-class-name for a given java source file, provide the full path for a given fully-qualified-java-class, etc.
For this purpose, I need Theia (ResourcePlugin, in fact) to recognize the projects in the workspace, so I can use JDT APIs to obtain the information I need.
I noticed that folders containing a '.project' descriptor file are recognized by ResourcePlugin as projects in the workspace.
I assume the addition of the .project/.classpath files is performed by m2e and/or buildship (for Maven and Gradle respectively).
I have a workspace which contains two java projects. Each of these projects has its own pom.xml file.
When I open the workspace in Theia, the project is silently added '.project' and '.classpath' files, and is marked (in .project file) as having a Java nature and a Maven nature.
The second project is marked only with a Maven nature, and silently gets a '.project' file only (no '.classpath' file).
ResourcesPlugin will recognize the first project as a Java+Maven project, and the second project as a Maven project.
I have a workspace which contains two projects. The first project has a 'build.gradle' file. The second project has a pom.xml file.
When I open this workspace in Theia, the gradle project is silently added a '.project' file and is marked as a Gradle project.
The second project is not added a '.project' file at all.
ResourcesPlugin will identify the gradle project only, and the second project will not be listed as a project in the workspace.
Can someone please explain why the behavior described in the two scenarios above occurs?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Background:
I am writing an Eclipse plugin to run with Theia. The purpose of this plugin is to query the workspace, recognize its content (projects), report the groupId:artifactId:version of Maven projects, provide a fully-qualified-class-name for a given java source file, provide the full path for a given fully-qualified-java-class, etc.
For this purpose, I need Theia (ResourcePlugin, in fact) to recognize the projects in the workspace, so I can use JDT APIs to obtain the information I need.
I noticed that folders containing a '.project' descriptor file are recognized by ResourcePlugin as projects in the workspace.
I assume the addition of the .project/.classpath files is performed by m2e and/or buildship (for Maven and Gradle respectively).
Scenario #1:
I have a workspace which contains two java projects. Each of these projects has its own pom.xml file.
When I open the workspace in Theia, the project is silently added '.project' and '.classpath' files, and is marked (in .project file) as having a Java nature and a Maven nature.
The second project is marked only with a Maven nature, and silently gets a '.project' file only (no '.classpath' file).
ResourcesPlugin will recognize the first project as a Java+Maven project, and the second project as a Maven project.
Scenario #2:
I have a workspace which contains two projects. The first project has a 'build.gradle' file. The second project has a pom.xml file.
When I open this workspace in Theia, the gradle project is silently added a '.project' file and is marked as a Gradle project.
The second project is not added a '.project' file at all.
ResourcesPlugin will identify the gradle project only, and the second project will not be listed as a project in the workspace.
Can someone please explain why the behavior described in the two scenarios above occurs?
Beta Was this translation helpful? Give feedback.
All reactions