Decorating the JS Editor title icon with an overlay [message #559932] |
Mon, 20 September 2010 12:55 |
Enrico Magen Messages: 15 Registered: September 2010 |
Junior Member |
|
|
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 12:56] Report message to a moderator
|
|
|
Re: Decorating the JS Editor title icon with an overlay [message #559935 is a reply to message #559932] |
Mon, 20 September 2010 13:17 |
|
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
Ian Tewksbury
WTP JavaScript Tools
IBM Rational
-----
“When once you have tasted flight, you will forever walk the earth with your eyes turned skyward, for there you have been, and there you will always long to return.” ~Leonardo da Vinci
|
|
|
|
Powered by
FUDForum. Page generated in 0.03137 seconds