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 230385 Details for
Bug 406994
[implementation] ClassCastException in HyperlinkDetectorDescriptor 102, if CustomHyperlinkDetector implements IHyperlinkDetector but does not extend AbstractHyperlinkDetector
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Fix
eclipse.platform.text.patch (text/plain), 5.63 KB, created by
Dani Megert
on 2013-05-02 03:20:41 EDT
(
hide
)
Description:
Fix
Filename:
MIME Type:
Creator:
Dani Megert
Created:
2013-05-02 03:20:41 EDT
Size:
5.63 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.workbench.texteditor >diff --git META-INF/MANIFEST.MF META-INF/MANIFEST.MF >index 4ed5cff..afa1528 100644 >--- META-INF/MANIFEST.MF >+++ META-INF/MANIFEST.MF >@@ -2,7 +2,7 @@ > Bundle-ManifestVersion: 2 > Bundle-Name: %pluginName > Bundle-SymbolicName: org.eclipse.ui.workbench.texteditor; singleton:=true >-Bundle-Version: 3.8.100.qualifier >+Bundle-Version: 3.9.0.qualifier > Bundle-Activator: org.eclipse.ui.internal.texteditor.TextEditorPlugin > Bundle-ActivationPolicy: lazy > Bundle-Vendor: %providerName >diff --git pom.xml pom.xml >index 0f6ba4a..30d9854 100644 >--- pom.xml >+++ pom.xml >@@ -18,6 +18,6 @@ > </parent> > <groupId>org.eclipse.ui</groupId> > <artifactId>org.eclipse.ui.workbench.texteditor</artifactId> >- <version>3.8.100-SNAPSHOT</version> >+ <version>3.9.0-SNAPSHOT</version> > <packaging>eclipse-plugin</packaging> > </project> >diff --git src/org/eclipse/ui/texteditor/HyperlinkDetectorDescriptor.java src/org/eclipse/ui/texteditor/HyperlinkDetectorDescriptor.java >index 70233cd..d2607eb 100644 >--- src/org/eclipse/ui/texteditor/HyperlinkDetectorDescriptor.java >+++ src/org/eclipse/ui/texteditor/HyperlinkDetectorDescriptor.java >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2007, 2008 IBM Corporation and others. >+ * Copyright (c) 2007, 2013 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 >@@ -82,14 +82,26 @@ > } > > /** >- * Creates a new {@link IHyperlinkDetector}. >- * >+ * Creates a new {@link AbstractHyperlinkDetector}. >+ * > * @return the hyperlink detector or <code>null</code> if the plug-in isn't loaded yet > * @throws CoreException if a failure occurred during creation >+ * @deprecated As of 3.9, replaced by {@link #createHyperlinkDetectorImplementation()} > */ > public AbstractHyperlinkDetector createHyperlinkDetector() throws CoreException { >+ return (AbstractHyperlinkDetector)createHyperlinkDetectorImplementation(); >+ } >+ >+ /** >+ * Creates a new {@link IHyperlinkDetector}. >+ * >+ * @return the hyperlink detector or <code>null</code> if the plug-in isn't loaded yet >+ * @throws CoreException if a failure occurred during creation >+ * @since 3.9 >+ */ >+ public IHyperlinkDetector createHyperlinkDetectorImplementation() throws CoreException { > final Throwable[] exception= new Throwable[1]; >- final AbstractHyperlinkDetector[] result= new AbstractHyperlinkDetector[1]; >+ final IHyperlinkDetector[] result= new IHyperlinkDetector[1]; > String message= NLSUtility.format(EditorMessages.Editor_error_HyperlinkDetector_couldNotCreate_message, new String[] { getId(), fElement.getContributor().getName() }); > ISafeRunnable code= new SafeRunnable(message) { > /* >@@ -99,7 +111,7 @@ > String pluginId = fElement.getContributor().getName(); > boolean isPlugInActivated= Platform.getBundle(pluginId).getState() == Bundle.ACTIVE; > if (isPlugInActivated || canActivatePlugIn()) >- result[0]= (AbstractHyperlinkDetector)fElement.createExecutableExtension(CLASS_ATTRIBUTE); >+ result[0]= (IHyperlinkDetector)fElement.createExecutableExtension(CLASS_ATTRIBUTE); > } > /* > * @see org.eclipse.jface.util.SafeRunnable#handleException(java.lang.Throwable) >diff --git src/org/eclipse/ui/texteditor/HyperlinkDetectorRegistry.java src/org/eclipse/ui/texteditor/HyperlinkDetectorRegistry.java >index e2d0b04..970975c 100644 >--- src/org/eclipse/ui/texteditor/HyperlinkDetectorRegistry.java >+++ src/org/eclipse/ui/texteditor/HyperlinkDetectorRegistry.java >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2007, 2008 IBM Corporation and others. >+ * Copyright (c) 2007, 2013 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 >@@ -45,7 +45,7 @@ > private class HyperlinkDetectorDelegate implements IHyperlinkDetector, IHyperlinkDetectorExtension, IHyperlinkDetectorExtension2 { > > private HyperlinkDetectorDescriptor fHyperlinkDescriptor; >- private AbstractHyperlinkDetector fHyperlinkDetector; >+ private IHyperlinkDetector fHyperlinkDetector; > private boolean fFailedDuringCreation= false; > private IAdaptable fContext; > private int fStateMask; >@@ -69,12 +69,12 @@ > > if (!fFailedDuringCreation && fHyperlinkDetector == null) { > try { >- fHyperlinkDetector= fHyperlinkDescriptor.createHyperlinkDetector(); >+ fHyperlinkDetector= fHyperlinkDescriptor.createHyperlinkDetectorImplementation(); > } catch (CoreException ex) { > fFailedDuringCreation= true; > } >- if (fHyperlinkDetector != null && fContext != null) >- fHyperlinkDetector.setContext(fContext); >+ if (fContext != null && fHyperlinkDetector instanceof AbstractHyperlinkDetector) >+ ((AbstractHyperlinkDetector)fHyperlinkDetector).setContext(fContext); > } > if (fHyperlinkDetector != null) > return fHyperlinkDetector.detectHyperlinks(textViewer, region, canShowMultipleHyperlinks); >@@ -94,10 +94,10 @@ > * @see org.eclipse.jface.text.hyperlink.IHyperlinkDetectorExtension#dispose() > */ > public void dispose() { >- if (fHyperlinkDetector != null) { >- fHyperlinkDetector.dispose(); >- fHyperlinkDetector= null; >- } >+ if (fHyperlinkDetector instanceof AbstractHyperlinkDetector) >+ ((AbstractHyperlinkDetector)fHyperlinkDetector).dispose(); >+ >+ fHyperlinkDetector= null; > fHyperlinkDescriptor= null; > fContext= null; > }
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
Actions:
View
|
Diff
Attachments on
bug 406994
:
230361
| 230385