From 2adab097fdbf748494eed2203c3e4eeeae8a4c8b Mon Sep 17 00:00:00 2001 From: Pascal Bihler Date: Tue, 15 Aug 2017 11:32:48 +0200 Subject: [PATCH] Removed Plugin-Self-Patching leftovers --- .../update/DecompilerUpdatePlugin.java | 37 ------------------- 1 file changed, 37 deletions(-) diff --git a/org.sf.feeling.decompiler.update/src/org/sf/feeling/decompiler/update/DecompilerUpdatePlugin.java b/org.sf.feeling.decompiler.update/src/org/sf/feeling/decompiler/update/DecompilerUpdatePlugin.java index 2389fc25..8781c83b 100644 --- a/org.sf.feeling.decompiler.update/src/org/sf/feeling/decompiler/update/DecompilerUpdatePlugin.java +++ b/org.sf.feeling.decompiler.update/src/org/sf/feeling/decompiler/update/DecompilerUpdatePlugin.java @@ -11,18 +11,12 @@ package org.sf.feeling.decompiler.update; -import java.io.File; - import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.util.IPropertyChangeListener; import org.eclipse.jface.util.PropertyChangeEvent; import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.osgi.framework.Bundle; import org.osgi.framework.BundleContext; -import org.osgi.framework.BundleException; import org.sf.feeling.decompiler.JavaDecompilerPlugin; -import org.sf.feeling.decompiler.util.Logger; -import org.sf.feeling.decompiler.util.ReflectionUtils; /** * The activator class controls the plug-in life cycle @@ -38,7 +32,6 @@ public class DecompilerUpdatePlugin extends AbstractUIPlugin implements IPropert private IPreferenceStore preferenceStore; - private File patchFile; /** * The constructor @@ -81,26 +74,6 @@ public IPreferenceStore getPreferenceStore( ) public void stop( BundleContext context ) throws Exception { getPreferenceStore( ).removePropertyChangeListener( this ); - if ( patchFile != null ) - { - try - { - Bundle bundle = (Bundle) ReflectionUtils.invokeMethod( context, "getBundle", new Class[]{ //$NON-NLS-1$ - String.class - }, new Object[]{ - patchFile.toURI( ).toString( ) - } ); - if ( bundle == null ) - { - return; - } - bundle.uninstall( ); - } - catch ( BundleException e ) - { - Logger.debug( e ); - } - } plugin = null; super.stop( context ); } @@ -120,14 +93,4 @@ public void propertyChange( PropertyChangeEvent event ) { } - - public File getPatchFile( ) - { - return patchFile; - } - - public void setPatchFile( File patchFile ) - { - this.patchFile = patchFile; - } }