Commit f972836f authored by andrei's avatar andrei

Fix for issue 316338: Bytecode Outline fails to open if preference...

Fix for issue 316338: Bytecode Outline fails to open if preference org.eclipse.jdt.quickassist.lightbulb is set to true.
Started 2.4.1 version.
parent 4126655d
......@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Bytecode Outline
Bundle-SymbolicName: de.loskutov.BytecodeOutline;singleton:=true
Bundle-Version: 2.4.0
Bundle-Version: 2.4.1
Bundle-ClassPath: .,
lib/asm-debug-all.jar
Bundle-Activator: de.loskutov.bco.BytecodeOutlinePlugin
......
......@@ -33,10 +33,10 @@
</feature>
<archive path="plugins/de.loskutov.BytecodeOutline_2.3.1.jar" url="http://download.forge.objectweb.org/asm/de.loskutov.BytecodeOutline_2.3.1.jar"/>
<feature url="features/de.loskutov.BytecodeOutline.feature_2.4.0.jar" id="de.loskutov.BytecodeOutline.feature" version="2.4.0">
<feature url="features/de.loskutov.BytecodeOutline.feature_2.4.1.jar" id="de.loskutov.BytecodeOutline.feature" version="2.4.1">
<category name="Bytecode Outline for Eclipse 3.6-3.7"/>
</feature>
<archive path="plugins/de.loskutov.BytecodeOutline_2.4.0.jar" url="http://download.forge.objectweb.org/asm/de.loskutov.BytecodeOutline_2.4.0.jar"/>
<archive path="plugins/de.loskutov.BytecodeOutline_2.4.1.jar" url="http://download.forge.objectweb.org/asm/de.loskutov.BytecodeOutline_2.4.1.jar"/>
<category-def name="Bytecode Outline for Eclipse 3.6-3.7" label="Bytecode Outline for Eclipse 3.6-3.7"/>
</site>
......@@ -65,6 +65,7 @@ import org.eclipse.jface.text.TextEvent;
import org.eclipse.jface.text.TextViewer;
import org.eclipse.jface.text.hyperlink.IHyperlink;
import org.eclipse.jface.text.hyperlink.IHyperlinkDetector;
import org.eclipse.jface.text.quickassist.IQuickAssistAssistant;
import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
......@@ -755,7 +756,6 @@ public class BytecodeOutlineView extends ViewPart {
public IWorkbenchPartSite getSite() {
return javaEditor == null? null : javaEditor.getEditorSite();
}
@Override
public IEditorInput getEditorInput() {
return javaEditor == null? null : javaEditor.getEditorInput();
......@@ -769,7 +769,7 @@ public class BytecodeOutlineView extends ViewPart {
JavaSourceViewerConfiguration configuration = new JavaConfiguration(
JavaPlugin.getDefault().getJavaTextTools().getColorManager(), store, dummyEditorForHyperlinks, IJavaPartitions.JAVA_PARTITIONING);
viewer.configure(configuration);
viewer.configure(configuration);
viewer.setEditable(false);
textViewer = viewer;
......@@ -846,6 +846,10 @@ public class BytecodeOutlineView extends ViewPart {
if (editorListener != null) {
getSite().getWorkbenchWindow().getPartService().removePartListener(
editorListener);
getSite().getWorkbenchWindow()
.getSelectionService().removePostSelectionListener(editorListener);
FileBuffers.getTextFileBufferManager().removeFileBufferListener(
editorListener);
editorListener.dispose();
editorListener = null;
}
......@@ -1934,6 +1938,12 @@ public class BytecodeOutlineView extends ViewPart {
JavadocHover javadocHover = new JavadocHoverExtension();
return javadocHover;
}
@Override
public IQuickAssistAssistant getQuickAssistAssistant(
ISourceViewer sourceViewer) {
return null;
}
}
private final class JavadocHoverExtension extends JavadocHover {
......
......@@ -26,7 +26,7 @@ import org.eclipse.ui.IWorkbenchPartReference;
*/
public class EditorListener implements ISelectionListener, IFileBufferListener,
IPartListener2 {
protected BytecodeOutlineView view;
volatile protected BytecodeOutlineView view;
EditorListener(BytecodeOutlineView view){
this.view = view;
......@@ -63,7 +63,9 @@ public class EditorListener implements ISelectionListener, IFileBufferListener,
display.asyncExec(new Runnable() {
@Override
public void run() {
view.checkOpenEditors(true);
if(view != null) {
view.checkOpenEditors(true);
}
}
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment