Ignore:
Timestamp:
05/19/17 11:31:29 (7 years ago)
Author:
pharms
Message:
  • refactored GUI model so that hierarchical event target structures can also be used and created by plugins not being strictly for GUIs
Location:
trunk/autoquest-plugin-mfc/src/main/java/de/ugoe/cs/autoquest/plugin/mfc
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-plugin-mfc/src/main/java/de/ugoe/cs/autoquest/plugin/mfc/HandlerCreate.java

    r1084 r2146  
    1717import org.xml.sax.SAXException; 
    1818 
     19import de.ugoe.cs.autoquest.eventcore.EventTargetModelException; 
    1920import de.ugoe.cs.autoquest.eventcore.guimodel.GUIElementTree; 
    20 import de.ugoe.cs.autoquest.eventcore.guimodel.GUIModelException; 
    2121import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElementSpec; 
    2222import de.ugoe.cs.autoquest.plugin.mfc.guimodel.MFCGUIElementSpec; 
     
    9898                super.getGUIElementTree().add(hwnd, parentHwnd, spec); 
    9999            } 
    100             catch (GUIModelException e) { 
     100            catch (EventTargetModelException e) { 
    101101                throw new SAXException("could not handle GUI element with handle " + 
    102102                                       hwnd + ": " + e.getMessage(), e); 
  • trunk/autoquest-plugin-mfc/src/main/java/de/ugoe/cs/autoquest/plugin/mfc/guimodel/MFCGUIElement.java

    r1876 r2146  
    1515package de.ugoe.cs.autoquest.plugin.mfc.guimodel; 
    1616 
     17import de.ugoe.cs.autoquest.eventcore.IEventTargetSpec; 
    1718import de.ugoe.cs.autoquest.eventcore.guimodel.AbstractDefaultGUIElement; 
    1819import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElement; 
    19 import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElementSpec; 
    2020import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIView; 
    2121 
     
    125125     */ 
    126126    @Override 
    127     public void updateSpecification(IGUIElementSpec furtherSpec) { 
    128         ((MFCGUIElementSpec) super.getSpecification()).update(furtherSpec); 
     127    public void updateSpecification(IEventTargetSpec furtherSpec) { 
     128        if (furtherSpec instanceof MFCGUIElementSpec) { 
     129            ((MFCGUIElementSpec) super.getSpecification()).update((MFCGUIElementSpec) furtherSpec); 
     130        } 
    129131    } 
    130132 
  • trunk/autoquest-plugin-mfc/src/main/java/de/ugoe/cs/autoquest/plugin/mfc/guimodel/MFCGUIElementSpec.java

    r1184 r2146  
    1818import java.util.List; 
    1919 
     20import de.ugoe.cs.autoquest.eventcore.IEventTargetSpec; 
    2021import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElementSpec; 
    2122import de.ugoe.cs.util.StringTools; 
     
    241242     */ 
    242243    @Override 
    243     public boolean getSimilarity(IGUIElementSpec other) { 
     244    public boolean getSimilarity(IEventTargetSpec other) { 
    244245 
    245246        if (this == other) { 
  • trunk/autoquest-plugin-mfc/src/main/java/de/ugoe/cs/autoquest/plugin/mfc/guimodel/MFCWindowTree.java

    r1055 r2146  
    2222import java.util.Set; 
    2323 
     24import de.ugoe.cs.autoquest.eventcore.EventTargetModelException; 
     25import de.ugoe.cs.autoquest.eventcore.IEventTargetFactory; 
    2426import de.ugoe.cs.autoquest.eventcore.guimodel.GUIElementFactory; 
    2527import de.ugoe.cs.autoquest.eventcore.guimodel.GUIModel; 
    26 import de.ugoe.cs.autoquest.eventcore.guimodel.GUIModelException; 
    27 import de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElementFactory; 
    2828 
    2929/** 
     
    8787     * </p> 
    8888     */ 
    89     private IGUIElementFactory guiElementFactory = GUIElementFactory.getInstance(); 
     89    private IEventTargetFactory guiElementFactory = GUIElementFactory.getInstance(); 
    9090 
    9191    /** 
     
    188188                    (MFCGUIElement) guiModel.integratePath(guiElementPath, guiElementFactory); 
    189189            } 
    190             catch (GUIModelException e) { 
     190            catch (EventTargetModelException e) { 
    191191                throw new RuntimeException("could not instantiate GUI element with id " + hwnd, e); 
    192192            } 
Note: See TracChangeset for help on using the changeset viewer.