Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 110274 Details for
Bug 223543
[implementation] AnnotationPainter in jface should not depend on Platform
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
org.eclipse.jface.text.patch
org.eclipse.jface.text.patch (text/plain), 14.62 KB, created by
Chris Aniszczyk
on 2008-08-18 14:20:30 EDT
(
hide
)
Description:
org.eclipse.jface.text.patch
Filename:
MIME Type:
Creator:
Chris Aniszczyk
Created:
2008-08-18 14:20:30 EDT
Size:
14.62 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jface.text >Index: META-INF/MANIFEST.MF >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.text/META-INF/MANIFEST.MF,v >retrieving revision 1.24 >diff -u -r1.24 MANIFEST.MF >--- META-INF/MANIFEST.MF 21 Jun 2008 10:08:04 -0000 1.24 >+++ META-INF/MANIFEST.MF 18 Aug 2008 18:18:39 -0000 >@@ -2,7 +2,7 @@ > Bundle-ManifestVersion: 2 > Bundle-Name: %pluginName > Bundle-SymbolicName: org.eclipse.jface.text >-Bundle-Version: 3.4.100.qualifier >+Bundle-Version: 3.4.200.qualifier > Bundle-Vendor: %providerName > Bundle-Localization: plugin > Export-Package: >@@ -30,8 +30,16 @@ > org.eclipse.jface.text.templates, > org.eclipse.jface.text.templates.persistence > Require-Bundle: >- org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)", > org.eclipse.text;bundle-version="[3.4.0,4.0.0)";visibility:=reexport, >- org.eclipse.jface;bundle-version="[3.4.0,4.0.0)" >+ org.eclipse.jface;bundle-version="[3.4.0,4.0.0)", >+ org.eclipse.equinox.common;bundle-version="[3.2.0,4.0.0)", >+ org.eclipse.core.jobs;bundle-version="[3.2.0,4.0.0)" > Bundle-RequiredExecutionEnvironment: J2SE-1.4 >-Import-Package: com.ibm.icu.text >+Import-Package: com.ibm.icu.text, >+ org.eclipse.osgi.service.debug;version="1.0.0", >+ org.eclipse.osgi.util;version="1.1.0", >+ org.osgi.framework;version="1.3.0", >+ org.osgi.service.log;version="1.2.0", >+ org.osgi.util.tracker;version="1.4.0" >+Bundle-Activator: org.eclipse.jface.internal.text.JFaceTextActivator >+Bundle-ActivationPolicy: lazy >Index: src/org/eclipse/jface/text/AbstractInformationControlManager.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractInformationControlManager.java,v >retrieving revision 1.48 >diff -u -r1.48 AbstractInformationControlManager.java >--- src/org/eclipse/jface/text/AbstractInformationControlManager.java 13 May 2008 16:50:23 -0000 1.48 >+++ src/org/eclipse/jface/text/AbstractInformationControlManager.java 18 Aug 2008 18:18:41 -0000 >@@ -13,9 +13,6 @@ > package org.eclipse.jface.text; > > >-import org.eclipse.core.runtime.Assert; >-import org.eclipse.core.runtime.Platform; >- > import org.eclipse.swt.SWT; > import org.eclipse.swt.events.DisposeEvent; > import org.eclipse.swt.events.DisposeListener; >@@ -26,12 +23,16 @@ > import org.eclipse.swt.widgets.Display; > import org.eclipse.swt.widgets.Monitor; > >+import org.eclipse.core.runtime.Assert; >+ > import org.eclipse.jface.dialogs.IDialogSettings; > import org.eclipse.jface.internal.text.InformationControlReplacer; > import org.eclipse.jface.internal.text.InternalAccessor; >-import org.eclipse.jface.text.ITextViewerExtension8.EnrichMode; >+import org.eclipse.jface.internal.text.JFaceTextActivator; > import org.eclipse.jface.util.Geometry; > >+import org.eclipse.jface.text.ITextViewerExtension8.EnrichMode; >+ > > /** > * Manages the life cycle, visibility, layout, and contents of an >@@ -217,7 +218,7 @@ > * </p> > * @since 3.4 > */ >- protected static final boolean DEBUG= "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.jface.text/debug/AbstractInformationControlManager")); //$NON-NLS-1$//$NON-NLS-2$ >+ protected static final boolean DEBUG= JFaceTextActivator.getInstance().getBooleanDebugOption("org.eclipse.jface.text/debug/AbstractInformationControlManager", false); //$NON-NLS-1$ > > > /** The subject control of the information control */ >Index: src/org/eclipse/jface/text/TextViewerHoverManager.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.text/src/org/eclipse/jface/text/TextViewerHoverManager.java,v >retrieving revision 1.38 >diff -u -r1.38 TextViewerHoverManager.java >--- src/org/eclipse/jface/text/TextViewerHoverManager.java 22 Mar 2008 08:04:18 -0000 1.38 >+++ src/org/eclipse/jface/text/TextViewerHoverManager.java 18 Aug 2008 18:18:41 -0000 >@@ -11,6 +11,8 @@ > package org.eclipse.jface.text; > > >+import org.osgi.service.log.LogService; >+ > import org.eclipse.swt.custom.StyledText; > import org.eclipse.swt.events.MouseEvent; > import org.eclipse.swt.events.MouseMoveListener; >@@ -18,10 +20,7 @@ > import org.eclipse.swt.graphics.Rectangle; > import org.eclipse.swt.widgets.Display; > >-import org.eclipse.core.runtime.ILog; >-import org.eclipse.core.runtime.IStatus; >-import org.eclipse.core.runtime.Platform; >-import org.eclipse.core.runtime.Status; >+import org.eclipse.jface.internal.text.JFaceTextActivator; > > > /** >@@ -188,9 +187,10 @@ > } > hasFinished= true; > } catch (RuntimeException ex) { >- String PLUGIN_ID= "org.eclipse.jface.text"; //$NON-NLS-1$ >- ILog log= Platform.getLog(Platform.getBundle(PLUGIN_ID)); >- log.log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.OK, "Unexpected runtime error while computing a text hover", ex)); //$NON-NLS-1$ >+ // TODO what should we do here? >+ LogService log = JFaceTextActivator.getInstance().getLogger(); >+ if(log != null) >+ log.log(LogService.LOG_ERROR, "Unexpected runtime error while computing a text hover", ex); //$NON-NLS-1$ > } finally { > synchronized (fMutex) { > if (fTextViewer != null) >Index: src/org/eclipse/jface/text/source/AnnotationPainter.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.text/src/org/eclipse/jface/text/source/AnnotationPainter.java,v >retrieving revision 1.92 >diff -u -r1.92 AnnotationPainter.java >--- src/org/eclipse/jface/text/source/AnnotationPainter.java 16 Jul 2008 12:17:11 -0000 1.92 >+++ src/org/eclipse/jface/text/source/AnnotationPainter.java 18 Aug 2008 18:18:42 -0000 >@@ -36,7 +36,8 @@ > import org.eclipse.swt.widgets.Display; > > import org.eclipse.core.runtime.Assert; >-import org.eclipse.core.runtime.Platform; >+ >+import org.eclipse.jface.internal.text.JFaceTextActivator; > > import org.eclipse.jface.text.BadLocationException; > import org.eclipse.jface.text.IDocument; >@@ -282,7 +283,7 @@ > * Tells whether this class is in debug mode. > * @since 3.0 > */ >- private static boolean DEBUG= "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.jface.text/debug/AnnotationPainter")); //$NON-NLS-1$//$NON-NLS-2$ >+ private static boolean DEBUG= JFaceTextActivator.getInstance().getBooleanDebugOption("org.eclipse.jface.text/debug/AnnotationPainter", false); //$NON-NLS-1$ > /** > * The squiggly painter strategy. > * @since 3.0 >Index: src/org/eclipse/jface/internal/text/revisions/RevisionPainter.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/revisions/RevisionPainter.java,v >retrieving revision 1.43 >diff -u -r1.43 RevisionPainter.java >--- src/org/eclipse/jface/internal/text/revisions/RevisionPainter.java 16 Jul 2008 13:35:43 -0000 1.43 >+++ src/org/eclipse/jface/internal/text/revisions/RevisionPainter.java 18 Aug 2008 18:18:40 -0000 >@@ -42,8 +42,8 @@ > > import org.eclipse.core.runtime.Assert; > import org.eclipse.core.runtime.ListenerList; >-import org.eclipse.core.runtime.Platform; > >+import org.eclipse.jface.internal.text.JFaceTextActivator; > import org.eclipse.jface.internal.text.html.BrowserInformationControl; > import org.eclipse.jface.internal.text.html.HTMLPrinter; > import org.eclipse.jface.resource.JFaceResources; >@@ -93,7 +93,7 @@ > */ > public final class RevisionPainter { > /** Tells whether this class is in debug mode. */ >- private static boolean DEBUG= "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.jface.text.source/debug/RevisionRulerColumn")); //$NON-NLS-1$//$NON-NLS-2$ >+ private static boolean DEBUG= JFaceTextActivator.getInstance().getBooleanDebugOption("org.eclipse.jface.text.source/debug/RevisionRulerColumn", false); //$NON-NLS-1$ > > // RGBs provided by UI Designer > private static final RGB BY_DATE_START_COLOR= new RGB(199, 134, 57); >Index: src/org/eclipse/jface/text/rules/FastPartitioner.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.text/src/org/eclipse/jface/text/rules/FastPartitioner.java,v >retrieving revision 1.9 >diff -u -r1.9 FastPartitioner.java >--- src/org/eclipse/jface/text/rules/FastPartitioner.java 31 Aug 2006 08:52:39 -0000 1.9 >+++ src/org/eclipse/jface/text/rules/FastPartitioner.java 18 Aug 2008 18:18:41 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2006 IBM Corporation and others. >+ * Copyright (c) 2000, 2008 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -15,7 +15,8 @@ > import java.util.List; > > import org.eclipse.core.runtime.Assert; >-import org.eclipse.core.runtime.Platform; >+ >+import org.eclipse.jface.internal.text.JFaceTextActivator; > > import org.eclipse.jface.text.BadLocationException; > import org.eclipse.jface.text.BadPositionCategoryException; >@@ -95,7 +96,7 @@ > */ > private Position[] fCachedPositions= null; > /** Debug option for cache consistency checking. */ >- private static final boolean CHECK_CACHE_CONSISTENCY= "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.jface.text/debug/FastPartitioner/PositionCache")); //$NON-NLS-1$//$NON-NLS-2$; >+ private static final boolean CHECK_CACHE_CONSISTENCY= JFaceTextActivator.getInstance().getBooleanDebugOption("org.eclipse.jface.text/debug/FastPartitioner/PositionCache", false); //$NON-NLS-1$ > > /** > * Creates a new partitioner that uses the given scanner and may return >Index: src/org/eclipse/jface/contentassist/AbstractControlContentAssistSubjectAdapter.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jface.text/src/org/eclipse/jface/contentassist/AbstractControlContentAssistSubjectAdapter.java,v >retrieving revision 1.21 >diff -u -r1.21 AbstractControlContentAssistSubjectAdapter.java >--- src/org/eclipse/jface/contentassist/AbstractControlContentAssistSubjectAdapter.java 5 Feb 2007 15:27:11 -0000 1.21 >+++ src/org/eclipse/jface/contentassist/AbstractControlContentAssistSubjectAdapter.java 18 Aug 2008 18:18:39 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2007 IBM Corporation and others. >+ * Copyright (c) 2000, 2008 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -16,9 +16,6 @@ > import java.util.List; > import java.util.Set; > >-import org.eclipse.core.runtime.Assert; >-import org.eclipse.core.runtime.Platform; >- > import org.eclipse.swt.SWT; > import org.eclipse.swt.custom.VerifyKeyListener; > import org.eclipse.swt.events.DisposeEvent; >@@ -31,13 +28,17 @@ > import org.eclipse.swt.widgets.Event; > import org.eclipse.swt.widgets.Listener; > >+import org.eclipse.core.runtime.Assert; >+ > import org.eclipse.jface.fieldassist.ControlDecoration; >+import org.eclipse.jface.internal.text.JFaceTextActivator; > import org.eclipse.jface.resource.ImageDescriptor; >-import org.eclipse.jface.text.IEventConsumer; > import org.eclipse.jface.viewers.ILabelProvider; > import org.eclipse.jface.viewers.ILabelProviderListener; > import org.eclipse.jface.viewers.LabelProviderChangedEvent; > >+import org.eclipse.jface.text.IEventConsumer; >+ > > /** > * An <code>AbstractControlContentAssistSubjectAdapter</code> delegates assistance requests from a >@@ -51,7 +52,7 @@ > */ > public abstract class AbstractControlContentAssistSubjectAdapter implements IContentAssistSubjectControl { > >- protected static final boolean DEBUG= "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.jface.text/debug/ContentAssistSubjectAdapters")); //$NON-NLS-1$//$NON-NLS-2$ >+ protected static final boolean DEBUG= JFaceTextActivator.getInstance().getBooleanDebugOption("org.eclipse.jface.text/debug/ContentAssistSubjectAdapters", false); //$NON-NLS-1$ > > /** > * VerifyKeyListeners for the control. >Index: src/org/eclipse/jface/internal/text/JFaceTextActivator.java >=================================================================== >RCS file: src/org/eclipse/jface/internal/text/JFaceTextActivator.java >diff -N src/org/eclipse/jface/internal/text/JFaceTextActivator.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/jface/internal/text/JFaceTextActivator.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,78 @@ >+/******************************************************************************* >+ * Copyright (c) 2008 Code 9 Corporation and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * Chris Aniszczyk <zx@code9.com> - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.jface.internal.text; >+ >+import org.osgi.framework.BundleActivator; >+import org.osgi.framework.BundleContext; >+import org.osgi.service.log.LogService; >+import org.osgi.util.tracker.ServiceTracker; >+ >+import org.eclipse.osgi.service.debug.DebugOptions; >+ >+public class JFaceTextActivator implements BundleActivator { >+ >+ private static JFaceTextActivator INSTANCE; >+ >+ /** >+ * The service tracker for debug options >+ */ >+ private ServiceTracker debugTracker = null; >+ >+ private ServiceTracker logTracker = null; >+ >+ public JFaceTextActivator() { >+ // do nothing >+ } >+ >+ public void start(BundleContext context) throws Exception { >+ INSTANCE = this; >+ debugTracker = new ServiceTracker(context, DebugOptions.class.getName(), null); >+ debugTracker.open(); >+ >+ debugTracker = new ServiceTracker(context, LogService.class.getName(), null); >+ debugTracker.open(); >+ } >+ >+ public void stop(BundleContext context) throws Exception { >+ if (debugTracker != null) { >+ debugTracker.close(); >+ debugTracker = null; >+ } >+ if (logTracker != null) { >+ logTracker.close(); >+ logTracker = null; >+ } >+ INSTANCE = null; >+ } >+ >+ public static JFaceTextActivator getInstance() { >+ return INSTANCE; >+ } >+ >+ public boolean getBooleanDebugOption(String option, boolean defaultValue) { >+ if (debugTracker == null) { >+ return defaultValue; >+ } >+ DebugOptions options = (DebugOptions) debugTracker.getService(); >+ if (options != null) { >+ String value = options.getOption(option); >+ if (value != null) >+ return value.equalsIgnoreCase("true"); //$NON-NLS-1$ >+ } >+ return defaultValue; >+ } >+ >+ public LogService getLogger() { >+ LogService log = (LogService) logTracker.getService(); >+ return log; >+ } >+ >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
daniel_megert
:
review-
Actions:
View
|
Diff
Attachments on
bug 223543
:
110274