| 1 | package de.uka.ipd.sdq.reliability.solver.visualisation; |
| 2 | |
| 3 | import org.eclipse.jface.resource.ImageDescriptor; |
| 4 | import org.eclipse.ui.IEditorInput; |
| 5 | import org.eclipse.ui.IPersistableElement; |
| 6 | |
| 7 | /** |
| 8 | * Class that is responsible for displaying Markov transformation results as |
| 9 | * HTML page inside a customized workbench editor of a target instance. |
| 10 | * |
| 11 | * @author Daniel Patejdl |
| 12 | * |
| 13 | */ |
| 14 | public class MarkovResultEditorInput implements IEditorInput { |
| 15 | |
| 16 | /** |
| 17 | * HTML code represented as string. |
| 18 | */ |
| 19 | private String htmlCode; |
| 20 | |
| 21 | /** |
| 22 | * Creates a new MarkovResultEditor, given a list of Markov transformation |
| 23 | * results. |
| 24 | * |
| 25 | * @param markovResults |
| 26 | * the Markov transformation results |
| 27 | * @param configuration |
| 28 | * the configuration properties for the reliability solver |
| 29 | * workflow |
| 30 | */ |
| 31 | public MarkovResultEditorInput(String htmlCode) { |
| 32 | this.htmlCode = htmlCode; |
| 33 | } |
| 34 | |
| 35 | @Override |
| 36 | public boolean exists() { |
| 37 | return false; |
| 38 | } |
| 39 | |
| 40 | @Override |
| 41 | public Object getAdapter(Class adapter) { |
| 42 | // TODO Auto-generated method stub |
| 43 | return null; |
| 44 | } |
| 45 | |
| 46 | /** |
| 47 | * Gets the HTML code as string. |
| 48 | * |
| 49 | * @return the HTML code as string |
| 50 | */ |
| 51 | public String getHtmlCode() { |
| 52 | return htmlCode; |
| 53 | } |
| 54 | |
| 55 | @Override |
| 56 | public ImageDescriptor getImageDescriptor() { |
| 57 | // TODO Auto-generated method stub |
| 58 | return null; |
| 59 | } |
| 60 | |
| 61 | @Override |
| 62 | public String getName() { |
| 63 | return "MarkovResult"; |
| 64 | } |
| 65 | |
| 66 | @Override |
| 67 | public IPersistableElement getPersistable() { |
| 68 | // TODO Auto-generated method stub |
| 69 | return null; |
| 70 | } |
| 71 | |
| 72 | @Override |
| 73 | public String getToolTipText() { |
| 74 | return "Markov Result"; |
| 75 | } |
| 76 | |
| 77 | /** |
| 78 | * Sets the HTML code (string) |
| 79 | * |
| 80 | * @param htmlCode |
| 81 | * the HTML code as string |
| 82 | */ |
| 83 | public void setHtmlCode(String htmlCode) { |
| 84 | this.htmlCode = htmlCode; |
| 85 | } |
| 86 | |
| 87 | } |