8326964: Remove Eclipse Shared Workspaces

Reviewed-by: erikj, ihse
This commit is contained in:
Julian Waters 2024-03-19 06:27:50 +00:00
parent ac5b6cb2d4
commit 4ef591f71f
5 changed files with 45 additions and 119 deletions

3
.gitignore vendored
View File

@ -18,8 +18,5 @@ NashornProfile.txt
/src/utils/LogCompilation/target/ /src/utils/LogCompilation/target/
/.project/ /.project/
/.settings/ /.settings/
/.project
/.classpath
/.cproject
/compile_commands.json /compile_commands.json
/.cache /.cache

View File

@ -110,10 +110,6 @@ Java and C/C++ natures during development by running:</p>
<pre><code>make eclipse-mixed-env</code></pre> <pre><code>make eclipse-mixed-env</code></pre>
<p>Do note that this generates all features that come with both Java and <p>Do note that this generates all features that come with both Java and
C/C++ natures.</p> C/C++ natures.</p>
<p>By default, the Eclipse Workspace is located in the ide subdirectory
in the build output. To share the JDK's source directory with the
Eclipse Workspace, you can instead run:</p>
<pre><code>make eclipse-shared-&lt;ENV&gt;-env</code></pre>
<p>Eclipse support in the JDK is relatively new, so do keep in mind that <p>Eclipse support in the JDK is relatively new, so do keep in mind that
not everything may work at the moment. As such, the resulting Workspace not everything may work at the moment. As such, the resulting Workspace
also has compilation database parsing support enabled, so you can pass also has compilation database parsing support enabled, so you can pass
@ -160,9 +156,6 @@ to import the newly created Java Workspace.</p>
<p>If doing so results in an error, you can also import the JDK via <p>If doing so results in an error, you can also import the JDK via
<code>File -&gt; Import -&gt; Existing Projects into Workspace</code> as <code>File -&gt; Import -&gt; Existing Projects into Workspace</code> as
a last resort.</p> a last resort.</p>
<p>Alternatively, if you want a Java Workspace inside the JDK's source
directory, you can instead run:</p>
<pre><code>make eclipse-shared-java-env</code></pre>
<p>As mentioned above for Eclipse CDT, you can create a combined Java <p>As mentioned above for Eclipse CDT, you can create a combined Java
and C/C++ Workspace which can conveniently switch between Java and C/C++ and C/C++ Workspace which can conveniently switch between Java and C/C++
natures during development by running:</p> natures during development by running:</p>

View File

@ -100,14 +100,6 @@ make eclipse-mixed-env
Do note that this generates all features that come with both Java and C/C++ Do note that this generates all features that come with both Java and C/C++
natures. natures.
By default, the Eclipse Workspace is located in the ide subdirectory in the
build output. To share the JDK's source directory with the Eclipse Workspace,
you can instead run:
```
make eclipse-shared-<ENV>-env
```
Eclipse support in the JDK is relatively new, so do keep in mind that not Eclipse support in the JDK is relatively new, so do keep in mind that not
everything may work at the moment. As such, the resulting Workspace also everything may work at the moment. As such, the resulting Workspace also
has compilation database parsing support enabled, so you can pass Eclipse has compilation database parsing support enabled, so you can pass Eclipse
@ -176,13 +168,6 @@ If doing so results in an error, you can also import the JDK via
`File -> Import -> Existing Projects into Workspace` `File -> Import -> Existing Projects into Workspace`
as a last resort. as a last resort.
Alternatively, if you want a Java Workspace inside the JDK's source directory,
you can instead run:
```
make eclipse-shared-java-env
```
As mentioned above for Eclipse CDT, you can create a combined Java and C/C++ As mentioned above for Eclipse CDT, you can create a combined Java and C/C++
Workspace which can conveniently switch between Java and C/C++ natures during Workspace which can conveniently switch between Java and C/C++ natures during
development by running: development by running:

View File

@ -268,42 +268,22 @@ $(eval $(call SetupTarget, hotspot-ide-project, \
$(eval $(call SetupTarget, eclipse-java-env, \ $(eval $(call SetupTarget, eclipse-java-env, \
MAKEFILE := ide/eclipse/CreateWorkspace, \ MAKEFILE := ide/eclipse/CreateWorkspace, \
ARGS := --always-make WORKSPACE=java SHARED=false, \ ARGS := --always-make WORKSPACE=java, \
)) ))
$(eval $(call SetupTarget, eclipse-hotspot-env, \ $(eval $(call SetupTarget, eclipse-hotspot-env, \
MAKEFILE := ide/eclipse/CreateWorkspace, \ MAKEFILE := ide/eclipse/CreateWorkspace, \
ARGS := --always-make WORKSPACE=hotspot SHARED=false, \ ARGS := --always-make WORKSPACE=hotspot, \
)) ))
$(eval $(call SetupTarget, eclipse-native-env, \ $(eval $(call SetupTarget, eclipse-native-env, \
MAKEFILE := ide/eclipse/CreateWorkspace, \ MAKEFILE := ide/eclipse/CreateWorkspace, \
ARGS := --always-make WORKSPACE=native SHARED=false, \ ARGS := --always-make WORKSPACE=native, \
)) ))
$(eval $(call SetupTarget, eclipse-mixed-env, \ $(eval $(call SetupTarget, eclipse-mixed-env, \
MAKEFILE := ide/eclipse/CreateWorkspace, \ MAKEFILE := ide/eclipse/CreateWorkspace, \
ARGS := --always-make SHARED=false, \ ARGS := --always-make, \
))
$(eval $(call SetupTarget, eclipse-shared-java-env, \
MAKEFILE := ide/eclipse/CreateWorkspace, \
ARGS := --always-make WORKSPACE=java SHARED=true, \
))
$(eval $(call SetupTarget, eclipse-shared-hotspot-env, \
MAKEFILE := ide/eclipse/CreateWorkspace, \
ARGS := --always-make WORKSPACE=hotspot SHARED=true, \
))
$(eval $(call SetupTarget, eclipse-shared-native-env, \
MAKEFILE := ide/eclipse/CreateWorkspace, \
ARGS := --always-make WORKSPACE=native SHARED=true, \
))
$(eval $(call SetupTarget, eclipse-shared-mixed-env, \
MAKEFILE := ide/eclipse/CreateWorkspace, \
ARGS := --always-make SHARED=true, \
)) ))
ALL_TARGETS += $(HOTSPOT_VARIANT_TARGETS) $(HOTSPOT_VARIANT_GENSRC_TARGETS) \ ALL_TARGETS += $(HOTSPOT_VARIANT_TARGETS) $(HOTSPOT_VARIANT_GENSRC_TARGETS) \

View File

@ -78,8 +78,6 @@ EmitExtractedDefines = \
# Remaining parameter(s) are named arguments: # Remaining parameter(s) are named arguments:
# NATURE - Which Eclipse Workspace nature to generate for the Workspace. Can # NATURE - Which Eclipse Workspace nature to generate for the Workspace. Can
# be one of JAVA, HOTSPOT, NATIVE, or MIXED. # be one of JAVA, HOTSPOT, NATIVE, or MIXED.
# SHARED - Workspace will share the same directory as the JDK if true. Can be
# either true or false. Defaults to false if not specified.
SetupEclipseWorkspace = $(NamedParamsMacroTemplate) SetupEclipseWorkspace = $(NamedParamsMacroTemplate)
define SetupEclipseWorkspaceBody define SetupEclipseWorkspaceBody
@ -95,26 +93,12 @@ define SetupEclipseWorkspaceBody
$$(error Unrecognised nature $$($1_NATURE) specified for Eclipse Workspace) $$(error Unrecognised nature $$($1_NATURE) specified for Eclipse Workspace)
endif endif
ifeq ($$($1_SHARED), )
$$(info Workspace sharing option not given, assuming non-shared Eclipse Workspace)
$1_SHARED := false
else ifeq ($$(findstring $$($1_SHARED), true false), )
$$(error $$($1_NATURE) is not a boolean word)
endif
ifeq ($$($1_SHARED), true)
$1_CLASSPATH_FILE := $(TOPDIR)/.classpath
$1_WORKSPACE_FILE := $(TOPDIR)/.project
$1_NATIVE_FILE := $(TOPDIR)/.cproject
$1_SETTINGS_FILE := $(TOPDIR)/.settings/language.settings.xml
else
$1_IDE_OUTPUTDIR := $(OUTPUTDIR)/ide/eclipse $1_IDE_OUTPUTDIR := $(OUTPUTDIR)/ide/eclipse
$1_CLASSPATH_FILE := $$($1_IDE_OUTPUTDIR)/.classpath $1_CLASSPATH_FILE := $$($1_IDE_OUTPUTDIR)/.classpath
$1_WORKSPACE_FILE := $$($1_IDE_OUTPUTDIR)/.project $1_WORKSPACE_FILE := $$($1_IDE_OUTPUTDIR)/.project
$1_NATIVE_FILE := $$($1_IDE_OUTPUTDIR)/.cproject $1_NATIVE_FILE := $$($1_IDE_OUTPUTDIR)/.cproject
$1_SETTINGS_FILE := $$($1_IDE_OUTPUTDIR)/.settings/language.settings.xml $1_SETTINGS_FILE := $$($1_IDE_OUTPUTDIR)/.settings/language.settings.xml
$$(call MakeDir, $$($1_IDE_OUTPUTDIR)) $$(call MakeDir, $$($1_IDE_OUTPUTDIR))
endif
ifneq ($$(findstring $$($1_NATURE), HOTSPOT NATIVE MIXED), ) ifneq ($$(findstring $$($1_NATURE), HOTSPOT NATIVE MIXED), )
ifeq ($$(call isCompiler, microsoft), true) ifeq ($$(call isCompiler, microsoft), true)
@ -198,14 +182,11 @@ define SetupEclipseWorkspaceBody
$1_MAKE := $$(call FixPath, $(MAKE)) $1_MAKE := $$(call FixPath, $(MAKE))
endif endif
$1_MATCHING_MAKE_TARGETS :=
$1_PLAIN_MAKE_TARGETS := update-build-docs docs gensrc gendata \
copy java launchers libs hotspot jdk product-images all-images test-image clean
# make reconfigure omitted since it is sensitive to which make was used # make reconfigure omitted since it is sensitive to which make was used
ifeq ($$($1_SHARED), true) # make dist-clean omitted since it would delete the Workspace as well
$1_PLAIN_MAKE_TARGETS += dist-clean $1_MATCHING_MAKE_TARGETS :=
endif $1_PLAIN_MAKE_TARGETS := update-build-docs docs gensrc gendata copy java \
launchers libs hotspot jdk product-images product-bundles all-images test-image clean
$1_MATCHING_MAKE_TARGETS += $$(foreach name,$$($1_PLAIN_MAKE_TARGETS), \ $1_MATCHING_MAKE_TARGETS += $$(foreach name,$$($1_PLAIN_MAKE_TARGETS), \
<target name="$$(strip $$(name))" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> \ <target name="$$(strip $$(name))" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder"> \
@ -232,11 +213,7 @@ define SetupEclipseWorkspaceBody
TARGETS += $$($1_CREATE_NATIVE_FILE) TARGETS += $$($1_CREATE_NATIVE_FILE)
ifeq ($$($1_SHARED), true)
$$(call MakeDir, $(TOPDIR)/.settings)
else
$$(call MakeDir, $$($1_IDE_OUTPUTDIR)/.settings) $$(call MakeDir, $$($1_IDE_OUTPUTDIR)/.settings)
endif
$1_CSETTINGS := $1_CSETTINGS :=
$1_CXXSETTINGS := $1_CXXSETTINGS :=
@ -314,7 +291,6 @@ define SetupEclipseWorkspaceBody
endif endif
ifeq ($$($1_SHARED), false)
ifneq ($$(findstring $$($1_NATURE), JAVA MIXED), ) ifneq ($$(findstring $$($1_NATURE), JAVA MIXED), )
$1_LINKED_RESOURCES += $$(foreach src,$(JAVA_DIRS), \ $1_LINKED_RESOURCES += $$(foreach src,$(JAVA_DIRS), \
<link> \ <link> \
@ -348,7 +324,6 @@ define SetupEclipseWorkspaceBody
<location>$$(subst \\,/,$$(call FixPath, $(TOPDIR)/$$(src)))</location> \ <location>$$(subst \\,/,$$(call FixPath, $(TOPDIR)/$$(src)))</location> \
</link>$$(NEWLINE)) </link>$$(NEWLINE))
endif endif
endif
$$(eval $$(call SetupTextFileProcessing, $1_CREATE_WORKSPACE_FILE, \ $$(eval $$(call SetupTextFileProcessing, $1_CREATE_WORKSPACE_FILE, \
SOURCE_FILES := $(TOPDIR)/make/ide/eclipse/workspace.template, \ SOURCE_FILES := $(TOPDIR)/make/ide/eclipse/workspace.template, \
@ -366,22 +341,18 @@ endef
ifeq ($(WORKSPACE), java) ifeq ($(WORKSPACE), java)
$(eval $(call SetupEclipseWorkspace, SETUP_WORKSPACE, \ $(eval $(call SetupEclipseWorkspace, SETUP_WORKSPACE, \
NATURE := JAVA, \ NATURE := JAVA, \
SHARED := $(SHARED), \
)) ))
else ifeq ($(WORKSPACE), hotspot) else ifeq ($(WORKSPACE), hotspot)
$(eval $(call SetupEclipseWorkspace, SETUP_WORKSPACE, \ $(eval $(call SetupEclipseWorkspace, SETUP_WORKSPACE, \
NATURE := HOTSPOT, \ NATURE := HOTSPOT, \
SHARED := $(SHARED), \
)) ))
else ifeq ($(WORKSPACE), native) else ifeq ($(WORKSPACE), native)
$(eval $(call SetupEclipseWorkspace, SETUP_WORKSPACE, \ $(eval $(call SetupEclipseWorkspace, SETUP_WORKSPACE, \
NATURE := NATIVE, \ NATURE := NATIVE, \
SHARED := $(SHARED), \
)) ))
else else
$(eval $(call SetupEclipseWorkspace, SETUP_WORKSPACE, \ $(eval $(call SetupEclipseWorkspace, SETUP_WORKSPACE, \
NATURE := MIXED, \ NATURE := MIXED, \
SHARED := $(SHARED), \
)) ))
endif endif