./CodeAnalyzer/src/de/fzi/cloneanalyzer/annotation/CloneShowResolution.java
/* * Created on 02.12.2003 * */ package de.fzi.cloneanalyzer.annotation; import org.eclipse.core.resources.IMarker; import org.eclipse.ui.IMarkerResolution; import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.PlatformUI; import de.fzi.cloneanalyzer.core.CloneAnalyzerPlugin; import de.fzi.cloneanalyzer.core.CloneInstance; import de.fzi.cloneanalyzer.util.IntTreeMap; /** * @author biehl * not used at the moment since we dont use markers for performance reasons *
* This class is responsible for the execution of a correction. * */ public class CloneShowResolution implements IMarkerResolution { IMarker marker; public CloneShowResolution(IMarker marker) { super(); this.marker = marker; } public String getLabel() { return "Show s" + marker.getId() + " in CloneTreeView"; } public void run(IMarker marker) { IWorkbenchPage activePage = PlatformUI .getWorkbench() .getActiveWorkbenchWindow() .getActivePage(); System.out.println("run"); //Idee: CloneInstance aus einer Hashtable rausholen, anhand von Wert, //der in Marker gepeichert werden kann int key = marker.getAttribute("cloneinstance", 0); IntTreeMap cloneInstanceTable = new IntTreeMap(); CloneInstance ci = (CloneInstance) cloneInstanceTable.get(key); CloneAnalyzerPlugin.getDefault().getTreeViewer().select(ci); } }