Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » Decorating the JS Editor title icon with an overlay(to be able to distinguish between many files with the same name and different purpose.)
Decorating the JS Editor title icon with an overlay [message #559932] Mon, 20 September 2010 08:55 Go to next message
Eclipse UserFriend
Our eclipse plug-in is used to create mobile application using web languages (html and javascript).
When a user creates our application in eclipse she can choose to add custom js files for the various environments she wants to support (e.g. iPhone, Android, Blackberry, etc.)

The directory structure is currently:

app
|-----common
|-----|-----js
|-----|-----images
|-----|-----css
|-----Android
|-----|-----js
|-----|-----images
|-----|-----css
|-----iPhone
|-----|-----js
|-----|-----images
|-----|-----css
..

inside each js directory there are files name "application name".js (e.g. myapp.js)
when you work on 3 files of the same name, you get lost which file belongs to which environment. This is very confusing when you see a few editor tabs all editing the same file name.
What I want to achieve is have the editor tabs' title show a small overlay on each file icon corresponding to the environment.

I managed to do this exact thing in the tree view using a custom adapter and the org.eclipse.ui.decorators extension point.

I've been googling for about 5 hours now trying to figure out how to do this and I've found many people from 3-5 years ago trying to achieve the same thing, but alas no answers.

I tried extending org.eclipse.ui.editors and have my custom class extend org.eclipse.wst.jsdt.internal.ui.javaeditor.CompilationUnitE ditor (jsdt is in my plug-in's dependencies), only to override the getTitleImage but it won't compile:

The type org.eclipse.ui.texteditor.AbstractDecoratedTextEditor cannot be resolved. It is indirectly referenced from required .class files


Please help?
Thank you very much.

[Updated on: Mon, 20 September 2010 08:56] by Moderator

Re: Decorating the JS Editor title icon with an overlay [message #559935 is a reply to message #559932] Mon, 20 September 2010 09:17 Go to previous messageGo to next message
Eclipse UserFriend
Enrico,

Purely based on your compile error I would say you are missing a plugin dependency on whichever plugin contains "org.eclipse.ui.texteditor.AbstractDecoratedTextEditor".

Someone else will have to speak to the best way of achieving your goal though.

Blue Skies,

~Ian
Re: Decorating the JS Editor title icon with an overlay [message #559940 is a reply to message #559935] Mon, 20 September 2010 09:41 Go to previous message
Eclipse UserFriend
Thanks,

I managed to solve the compilation error by adding a bunch of dependencies to the plug-in, but I really feel this is not the best practice to achieve this goal.

(I didn't get it working this way yet though...)

Previous Topic:Where is Java EE Module Dependencies in Helios?
Next Topic:rcp and dot net ?
Goto Forum:
  


Current Time: Wed Jul 23 13:35:32 EDT 2025

Powered by FUDForum. Page generated in 0.04063 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top