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 Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
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
Partner Zones AWS Cloud
by AWS Developer Relations
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
Partner Zones
AWS Cloud
by AWS Developer Relations
The Latest "Software Integration: The Intersection of APIs, Microservices, and Cloud-Based Systems" Trend Report
Get the report
  1. DZone
  2. Coding
  3. Frameworks
  4. Eclipse 4 and the CSS Spy

Eclipse 4 and the CSS Spy

Wayne Beaton user avatar by
Wayne Beaton
·
Mar. 14, 12 · Interview
Like (0)
Save
Tweet
Share
9.46K Views

Join the DZone community and get the full member experience.

Join For Free

i’ve been learning about styling using css in eclipse 4. i’m capturing some of the steps that i’ve been following with these posts. think of this as more of a journal than any sort of “how to” on the topic.

the css spy is a handy resource for figuring out how to refer the various parts of the user interface and sorting out the kinds of properties that you can apply. it lets you drill into the properties of the various ui elements, but doesn’t yet let you actually modify any values and modify many of them. [correction: css spy lets you change some of the properties]

rather than install the css spy into my eclipse for rcp and rap developers juno m5 instance (available on the “developer downloads” page ), i pulled the code from the e4 incubator project ‘s tools git repository , and have been running it in a debug launch of eclipse. being incubator code, it’s a little rough around the edges, but it’s still a pretty useful bit of software.

the first rough bit that i encountered was the key sequence to open the css spy: alt+ctrl+f4 means something to fedora 14 and, instead of getting the css spy, keying that particular combination switched me to a new terminal. instead, i used the handy “quick access” feature to open the css spy (just type “css spy” into the entry field and click on the corresponding entry in the popup).

the css spy provides a handy hierarchical breakdown of the workbench ui. it shows the part type, its corresponding css class and–if specified–the css id. when you click on an entry in the tree, it outlines the corresponding ui element in the workbench. in the above snapshot, i’ve highlighted the ctabfolder that’s shown highlighted in red. this particular instance of ctabfolder has the “mpartstack” css class and id “topleft”. using this information, i can apply styles as generally or specifically as i’d like.

there are several other parts that share the same css class. i can style them all with an class entry in my css file:

.mpartstack {
font-size: 11;
simple: false;
mru-visible: false;
outer-keyline-color: #b4b4b4;
background-color: #e2e2e2;
}

i can specifically target the “topleft” mpartstack by including the id in my css file:

.mpartstack#topleft {
outer-keyline-color: #000000;
}

with this combination of styles, the “topleft” stack will be outlined in black (#000000), but all other stacks will be oulined in a medium-darkish grey (#b4b4b4). the “topleft” stack will inherit all of the remaining properties from the more general entry.

one of the things i started exploring today is how one might set the background colour of an element to a colour defined by the system. i.e. how do you leverage system properties when stylin’? more–hopefully–on this later.

CSS Eclipse

Published at DZone with permission of Wayne Beaton, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • 19 Most Common OpenSSL Commands for 2023
  • Implementing PEG in Java
  • Distributed Tracing: A Full Guide
  • 5 Steps for Getting Started in Deep Learning

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

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

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: