Removal of old deprecated methods

This commit is contained in:
dragonmacher 2021-10-22 13:14:17 -04:00
parent 37e807ea3b
commit d05a57ae1a
16 changed files with 287 additions and 500 deletions

View file

@ -1,37 +0,0 @@
/* ###
* IP: GHIDRA
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ghidra.app.decompiler.component;
/**
* A poorly designed interface that does not correctly allow for modifying highlights
*/
@Deprecated // this will be removed after 9.2
public interface DecompilerHighlightService {
/**
* Returns the layout model of the Decompiler
* @return the layout model
*/
@Deprecated
public ClangLayoutController getLayoutModel();
/**
* Clears the <b>primary</b> highlights in the Decompiler
*/
@Deprecated
public void clearHighlights();
}

View file

@ -20,7 +20,6 @@ import java.util.*;
import org.jdom.Element;
import ghidra.app.CorePluginPackage;
import ghidra.app.decompiler.component.DecompilerHighlightService;
import ghidra.app.decompiler.component.hover.DecompilerHoverService;
import ghidra.app.events.*;
import ghidra.app.plugin.PluginCategoryNames;
@ -46,14 +45,13 @@ import ghidra.util.task.SwingUpdateManager;
category = PluginCategoryNames.ANALYSIS,
shortDescription = "Decompiler",
description = "Plugin for producing high-level decompilation",
servicesRequired = {
GoToService.class, NavigationHistoryService.class, ClipboardService.class,
servicesRequired = {
GoToService.class, NavigationHistoryService.class, ClipboardService.class,
DataTypeManagerService.class /*, ProgramManager.class */
},
servicesProvided = { DecompilerHighlightService.class },
eventsConsumed = {
ProgramActivatedPluginEvent.class, ProgramOpenedPluginEvent.class,
ProgramLocationPluginEvent.class, ProgramSelectionPluginEvent.class,
},
eventsConsumed = {
ProgramActivatedPluginEvent.class, ProgramOpenedPluginEvent.class,
ProgramLocationPluginEvent.class, ProgramSelectionPluginEvent.class,
ProgramClosedPluginEvent.class
}
)
@ -79,17 +77,10 @@ public class DecompilePlugin extends Plugin {
});
public DecompilePlugin(PluginTool tool) {
super(tool);
disconnectedProviders = new ArrayList<>();
connectedProvider = new PrimaryDecompilerProvider(this);
registerServices();
}
private void registerServices() {
registerServiceProvided(DecompilerHighlightService.class, connectedProvider);
}
@Override

View file

@ -55,8 +55,7 @@ import resources.ResourceManager;
import utility.function.Callback;
public class DecompilerProvider extends NavigatableComponentProviderAdapter
implements DomainObjectListener, OptionsChangeListener, DecompilerCallbackHandler,
DecompilerHighlightService {
implements DomainObjectListener, OptionsChangeListener, DecompilerCallbackHandler {
final static String OPTIONS_TITLE = "Decompiler";
private static Icon REFRESH_ICON = Icons.REFRESH_ICON;
@ -1074,17 +1073,4 @@ public class DecompilerProvider extends NavigatableComponentProviderAdapter
public void programClosed(Program closedProgram) {
controller.programClosed(closedProgram);
}
@Deprecated // to be removed post 9.2; replace with an API to manipulate primary highlights
@Override
public ClangLayoutController getLayoutModel() {
return (ClangLayoutController) getDecompilerPanel().getLayoutModel();
}
@Deprecated // to be removed post 9.2; replace with an API to manipulate primary highlights
@Override
public void clearHighlights() {
getDecompilerPanel().clearPrimaryHighlights();
}
}