DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Related

  • Deploying Databricks Asset Bundles
  • Simplify NoSQL Database Integration in Java With Eclipse JNoSQL 1.1.3
  • Domain-Driven Design: Manage Data With Jakarta Data and JNoSQL
  • Understanding and Learning NoSQL Databases With Java: Three Key Benefits

Trending

  • AI-Driven Root Cause Analysis in SRE: Enhancing Incident Resolution
  • How To Build Resilient Microservices Using Circuit Breakers and Retries: A Developer’s Guide To Surviving
  • A Simple, Convenience Package for the Azure Cosmos DB Go SDK
  • Detection and Mitigation of Lateral Movement in Cloud Networks
  1. DZone
  2. Coding
  3. Frameworks
  4. Eclipse Global Preferences

Eclipse Global Preferences

By 
Erich Styger user avatar
Erich Styger
·
May. 12, 12 · Interview
Likes (1)
Comment
Save
Tweet
Share
17.9K Views

Join the DZone community and get the full member experience.

Join For Free
rate this

eclipse is good, but like any other tool: it gets better after i have it customized for my special needs. eclipse stores a lot of settings in the workspace, see my article about copy my workspace settings . but is there a way to apply some settings to every workspace? at least to the new ones? because importing/exporting the settings can get really tedious as i have many workspace.  and indeed, there are global settings in eclipse. and i want to have them changed…

warning: changing eclipse global preferences might break an eclipse installation. so better have a backup of the changed files at hand!

i’m using here the eclipse based codewarrior for mcu10.2 , but things are pretty much the same for any eclipse based product (see the documentation in defining your own global preferences ).

question: where are the global preferences stored? the first thing to check is the eclipse\configuration\.settings folder: here some plugins store their global preferences. for example: the recent workspace settings are in org.eclipse.ui.ide.prefs.

#fri apr 06 16:46:14 cest 2012
recent_workspaces_protocol=3
max_recent_workspaces=10
show_workspace_selection_dialog=true
eclipse.preferences.version=1
recent_workspaces=c\:\\tmp\\wsp_test\nc\:\\tmp\\wsp_10.2

but what about all the other settings? looking at the codewarrior installation, inside the eclipse folder, i find the cwide.ini file.

cwide.ini file

cwide.ini file

this file defines the eclipse startup options for launching the ide (cwide.exe for codewarrior). the interesting part is this line:

-declipse.plugincustomization=cwide.properties

this tells eclipse to use the cwide.properties as a default configuration file. if i inspect that file, it has the following content:

org.eclipse.debug.ui/org.eclipse.debug.ui.switch_perspective_on_suspend=always
org.eclipse.debug.ui/org.eclipse.debug.ui.switch_to_perspective=always
org.eclipse.ui.editors/spellingengine=org.eclipse.cdt.internal.ui.text.spelling.cspellingengine

ok, that gives me an idea how settings could look like. but the question is: how to know the settings and syntax? what works (most of the time) is following approach:

  1. launch eclipse with a new workspace
  2. export the settings using file > export > general > preferences to a file
  3. change the setting in window > preferences
  4. export the settings using file > export > general > preferences to a different file
  5. compare/inspect the exported information and find the settings
  6. apply the settings to the cwide.properties file, without the /instance/ part
  7. restart the ide and check if it works with a new workspace

the last check is necessary as not all settings might work that way, see this forum post .

this is maybe best illustrated with an example. i have configured my workspace to use 2 for tab width and to insert spaces for tabs:

changed preferences for tabs

changed preferences for tabs

if i compare the two exported .epf files, this gives me:

diffing eclipse preference files

diffing eclipse preference files

that means the two following lines are configuring what i have changed:

/instance/org.eclipse.ui.editors/tabwidth=2
/instance/org.eclipse.ui.editors/spacesfortabs=true

for the cwide.properties file i need to cut off the /instance/ part, so i have this added to the cwide.properties :

# set tab width to 2
org.eclipse.ui.editors/tabwidth=2
# using spaces for tabs
org.eclipse.ui.editors/spacesfortabs=true

note: preferences are applied in following order: global preferences, then local (workspace) preferences

this does not overwrite an existing setting of my workspace. as i can see from above diff, my initial workspace settings do not have any settings for tabwidth and spacesfortabs. creating a new workspace use and apply my new settings. but once i have the them, they will not be overwritten with new global ones. which makes sense: the local settings are winning.

note: post a comment if you know an elegant way how to enforce/overwrite workspace settings with global ones.

Eclipse Workspace

Published at DZone with permission of Erich Styger, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Deploying Databricks Asset Bundles
  • Simplify NoSQL Database Integration in Java With Eclipse JNoSQL 1.1.3
  • Domain-Driven Design: Manage Data With Jakarta Data and JNoSQL
  • Understanding and Learning NoSQL Databases With Java: Three Key Benefits

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: