| Summary: | [implementation] AnnotationPainter in jface should not depend on Platform | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | John Huss <johnthuss> | ||||
| Component: | Text | Assignee: | Platform-Text-Inbox <platform-text-inbox> | ||||
| Status: | CLOSED WONTFIX | QA Contact: | |||||
| Severity: | minor | ||||||
| Priority: | P3 | CC: | caniszczyk, daniel_megert, remy.suen, thatnitind | ||||
| Version: | 3.4 | Keywords: | helpwanted | ||||
| Target Milestone: | --- | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | stalebug | ||||||
| Attachments: |
|
||||||
Platform and especially required bundles of org.eclipse.core.runtime are used at various other places in JFace Text for years now. Can you explain how you get 2MB given that core.runtime is 67KB and its required plug-ins also not that big. These are the file sizes I have (on linux gtk): org.eclipse.core.runtime_3.3.100.v20070530 716k org.eclipse.osgi_3.3.0.v20070530 906k Total: about 1.6 meg My whole app is about 4.5 meg right now, so adding these would be a 36% increase in the footprint. If these dependencies were really needed then I wouldn't even bother saying anything, but since these jars will add nothing to the app (with the functionality I'm currently using anyway) it seems like a waste. The dependency surprised me because I was already using other annotations in a vertical ruler and it didn't require these jars. >org.eclipse.core.runtime_3.3.100.v20070530
>716k
Either you looked up the wrong plug-in or you do not use the official build where org.eclipse.core.runtime_3.3.100.v20070530.jar is 72KB and in latest 3.4 it is even smaller (68KB).
But anyway, the osgi plug-in is really big. We should change the DEBUG and the logging code to not use core.runtime and only depend on org.eclipse.equinox.common and org.eclipse.core.jobs.
Will rework logging during 3.5. Low prio for 3.5. Patch would be welcome. Created attachment 110274 [details]
org.eclipse.jface.text.patch
Here is a shot at the patch.
1) created a bundle activator (JFaceTextActivator)
2) acquired the debug options service if available and use it
The only issue I came across was a place where JFace Text was accessing the Platform.log(...), I replaced it with using the osgi log service... not sure if this is what we want to do.
Comment on attachment 110274 [details]
org.eclipse.jface.text.patch
JFace Text is like SWT. It should not have a bundle activator. This is overkill. We could rewrite the code to make the runtime plug-in optional. Also, I want to reduce the package imports to a minimum. So far we only do this for ICU packages.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |
Build ID: 3.4 head In class org.eclipse.jface.text.source.AnnotationPainter there is: import org.eclipse.core.runtime.Platform; ... private static boolean DEBUG= "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.jface.text/debug/AnnotationPainter")); //$NON-NLS-1$//$NON-NLS-2$ This is the only line that depends on Platform. Because of this line I have to add 2 megs of code to my stand-alone swt/jface app (add core.runtime and osgi) if I want to use AnnotationPainter. There has to be a way to remove this dependency. The jface jars shouldn't require the rest of the eclipse platform to run.