Package com.subgraph.vega.api.model

Examples of com.subgraph.vega.api.model.IModel


    scopeChangeHandler = createScopeChangeHandler();
    viewer = new TreeViewer(parent);
    viewer.setContentProvider(new WebsiteContentProvider());
    labelProvider = new WebsiteLabelProvider();
    viewer.setLabelProvider(labelProvider);
    final IModel model = Activator.getDefault().getModel();
    if(model != null) {
      final IWorkspace currentWorkspace = model.addWorkspaceListener(new IEventHandler() {

        @Override
        public void handleEvent(IEvent event) {
          if(event instanceof WorkspaceOpenEvent)
            handleWorkspaceOpen((WorkspaceOpenEvent) event);
View Full Code Here


  private List<String> cookieStringList;
  private Set<String> excludedParameterNames;
  private String targetFieldString;

  public NewScanWizard(String target, Collection<IIdentity> identities, List<IScannerModule> modules, Set<String> defaultExcludeParameters) {
    final IModel model = Activator.getDefault().getModel();
    imageCache = new ImageCache(Activator.PLUGIN_ID);
    final ImageDescriptor logo = ImageDescriptor.createFromImage(imageCache.get(VEGA_LOGO));
   
    targetPage = new NewScanTargetPage(model.getCurrentWorkspace(), target);
    targetPage.setImageDescriptor(logo);
   
    modulesPage = new NewScanModulesPage(modules);
    modulesPage.setImageDescriptor(logo);
   
View Full Code Here

  @Override
  public Object execute(ExecutionEvent event) throws ExecutionException {
    final IWorkbenchPart activePart = HandlerUtil.getActivePart(event);
    if (activePart instanceof HttpRequestView) {
      final IModel model = Activator.getDefault().getModel();
      final IWorkspace workspace = model.getCurrentWorkspace();
      if(workspace != null) {
        final String secondaryId = ((HttpRequestView) activePart).getViewSite().getSecondaryId();
        final String conditionSetId;
        if (secondaryId != null) {
          conditionSetId = IHttpConditionManager.CONDITION_SET_FILTER + "." + secondaryId;
View Full Code Here

   
    rootLogger.setLevel(Level.WARNING);
  }

  private boolean setupWorkspace() {
    final IModel model = Activator.getDefault().getModel();
    if(model == null) {
      MessageDialog.openError(null, "Initialization Error", "Failed to obtain model service");
      return false;
    }
    if(!model.openDefaultWorkspace()) {
      MessageDialog.openError(null, "Initialization Error", "Could not open workspace");
      return false;
    }
    return true;
  }
View Full Code Here

       
    getSite().setSelectionProvider(viewer);
    viewer.addSelectionChangedListener(new SelectionTracker(getSite().getPage()));
    createContextMenu(viewer);
   
    final IModel model = Activator.getDefault().getModel();
    if(model == null) {
      logger.warning("Failed to obtain reference to model");
      return;
    }
    scopeTracker = new ScopeTracker(viewer);
View Full Code Here

    });
   
    stackLayout.topControl = dashboard;
    contentPanel.layout();
   
    final IModel model = Activator.getDefault().getModel();
    if(model != null) {
      setCurrentWorkspace(model.addWorkspaceListener(this));
    }
    IStructuredSelection selection = (IStructuredSelection) getSite().getPage().getSelection(ScanAlertView.ID);
    if(selection != null && selection.getFirstElement() instanceof AlertScanNode) {
      AlertScanNode node = (AlertScanNode) selection.getFirstElement();
      displayScanSummary(node.getScanInstance());
View Full Code Here

public class ResetWorkspaceHandler extends AbstractHandler {

  @Override
  public Object execute(ExecutionEvent event) throws ExecutionException {
    final IModel model = Activator.getDefault().getModel();
    if(model != null)
      model.resetCurrentWorkspace();
    return null;
  }
View Full Code Here

    form.setWeights(new int[] {40, 60});
    parent.pack();
   
    final ISelectionService ss = getSite().getWorkbenchWindow().getSelectionService();
    final IModel model = Activator.getDefault().getModel();
    final ISelectionListener listener = new WebEntitySelectionListener(model, getViewSite().getSecondaryId());
    ss.addSelectionListener(listener);
   
    workspaceListener = new IEventHandler() {

      @Override
      public void handleEvent(IEvent event) {
        if(event instanceof WorkspaceCloseEvent || event instanceof WorkspaceResetEvent) {
          handleWorkspaceCloseOrReset();
        }
      }
    };
    model.addWorkspaceListener(workspaceListener);
  }
View Full Code Here

  public void focusOnRecord(long requestId) {
    final Object inputObj = tableViewer.getInput();
    if(!(inputObj instanceof IModel)) {
      return;
    }
    final IModel model = (IModel) inputObj;
    final IWorkspace workspace = model.getCurrentWorkspace();
    if(workspace == null) {
      return;
    }
   
    addRequestIdConditionRule(requestId);
View Full Code Here

  final static String WORKSPACE_UNLOCKED = "unlocked";
 
  private boolean isLocked = false;
 
  public WorkspaceLockStateSourceProvider() {
    final IModel model = Activator.getDefault().getModel();
    model.addWorkspaceListener(new IEventHandler() {
      @Override
      public void handleEvent(IEvent event) {
        if(event instanceof WorkspaceLockStatusEvent)
          handleWorkspaceLockStatus((WorkspaceLockStatusEvent) event);       
      }
View Full Code Here

TOP

Related Classes of com.subgraph.vega.api.model.IModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.