Examples of IIssue


Examples of org.locationtech.udig.issues.IIssue

    if (element instanceof String) {
      return list;
    }
    if (element instanceof IIssue) {
      if( showGroup ){
        IIssue issue = (IIssue) element;
        String groupId = issue.getGroupId();
        if ( groupId==null ){
          return Messages.IssuesContentProvider_defaultGroup;
        }
        return groupId;
      }else{
View Full Code Here

Examples of org.locationtech.udig.issues.IIssue

        }
        //must be instance
        if (!(object instanceof AbstractFixableIssue)) {
            return false;
        }
        IIssue issue = (IIssue) object;
        //not already resolved
        if (issue.getResolution() == Resolution.RESOLVED) {
            return false;
        }
        String fixable = fixerMemento.getString(KEY_FIXABLE);
        return fixable != null && fixable.equalsIgnoreCase("TRUE"); //$NON-NLS-1$
    }
View Full Code Here

Examples of org.locationtech.udig.issues.IIssue

        String fixable = fixerMemento.getString(KEY_FIXABLE);
        return fixable != null && fixable.equalsIgnoreCase("TRUE"); //$NON-NLS-1$
    }

    public void fix( Object object, IMemento fixerMemento ) {
        IIssue issue = (IIssue) object;
        //set resolution to "in progress" (optional, but a good idea)
        issue.setResolution(Resolution.IN_PROGRESS);
        //at this point, some mystical dialog or workflow process decides to call complete
    }
View Full Code Here

Examples of org.locationtech.udig.issues.IIssue

        list.add(IssuesListTestHelper.createFeatureIssue("test")); //$NON-NLS-1$
       
        list.refresh();
        assertEquals(1, list.size());
       
        IIssue issue = list.get(0);
        issue.setDescription(newDescription);
        ((IRemoteIssuesList)list).save(issue);
        FilterFactory factory = CommonFactoryFinder.getFilterFactory(GeoTools.getDefaultHints());

        Expression expr2 = factory.literal(issue.getId());
    Expression expr1 = factory.property(IssuesListTestHelper.ISSUE_ID_ATTR);
    Filter filter = factory.equals(expr1, expr2);

        SimpleFeature next = store.getFeatureSource(featureType.getName().getLocalPart()).getFeatures(filter).features().next();
        assertEquals(newDescription, next.getAttribute(IssuesListTestHelper.DESCRIPTION_ATTR));
View Full Code Here

Examples of org.locationtech.udig.issues.IIssue

* @since 1.1.0
*/
public class DummyAutoIssueFixer extends DummyIssueFixer {

    public void fix( Object object, IMemento fixerMemento ) {
        IIssue issue = (IIssue) object;
        //resolve it right now
        issue.setResolution(Resolution.RESOLVED);
    }
View Full Code Here

Examples of org.locationtech.udig.issues.IIssue

    public void modify( Object element, String property, Object value ) {
      TreeItem item = (TreeItem) element;
      if ( !(item.getData() instanceof IIssue) ) return ;
     
   
        IIssue issue = (IIssue) item.getData();
        switch( Integer.parseInt(property) ) {
        case IssuesView.RESOLUTION_COLUMN:
            issue.setResolution((Resolution) value);
            view.viewer.refresh(issue, true);

            if (view.resolvedIssuesShown) {
                if (value != Resolution.RESOLVED) {
                    if (view.updateTimerJob.isUser())
                        view.updateTimerJob.setSystem(true);
                    view.updateTimerJob.schedule(2000);
                }
            } else {
                if (value == Resolution.RESOLVED) {
                    if (view.updateTimerJob.isUser())
                        view.updateTimerJob.setSystem(true);
                    view.updateTimerJob.schedule(2000);
                }
            }
            break;
        case IssuesView.PRIORITY_COLUMN:
            issue.setPriority((Priority) value);
            view.viewer.refresh(issue, true);

            break;
        case IssuesView.DESC_COLUMN:
            issue.setDescription((String) value);
            view.viewer.refresh(issue, true);
            break;

        default:
            break;
View Full Code Here

Examples of org.locationtech.udig.issues.IIssue

            public IIssue next() {
                SimpleFeature feature = iter.next();
                String extensionPointID=(String) feature.getAttribute(mapper.getExtensionId());
                try{
                  IIssue issue = IssuesListUtil.createIssue(extensionPointID);
               
                  if( issue==null ){
                    return createPlaceHolder(feature, extensionPointID);
                  }
                 
                    initIssue(feature,issue);
                   
                    return issue;
                } catch (Throwable e) {
                    IssuesActivator.log("", e); //$NON-NLS-1$
                    return createPlaceHolder(feature, extensionPointID);
                }
               
            }

            public void remove() {
                iter.close();
            }

            protected void initIssue( SimpleFeature feature, IIssue issue ) {
                String mementoData=(String) feature.getAttribute(mapper.getMemento());
                String viewData=(String) feature.getAttribute(mapper.getViewMemento());
                String groupId=(String) feature.getAttribute(mapper.getGroupId());
                String id=(String) feature.getAttribute(mapper.getId());
               
                String resolutionInt=(String) feature.getAttribute(mapper.getResolution());
                String priorityInt=(String) feature.getAttribute(mapper.getPriority());
                String description=(String) feature.getAttribute(mapper.getDescription());

                Resolution resolution=Resolution.valueOf(resolutionInt);
                if( resolution==null )
                    resolution=Resolution.UNRESOLVED;
                Priority priority=Priority.valueOf(priorityInt);
                if( priority==null )
                    priority=Priority.WARNING;
               

                issue.setDescription(description);
                issue.setResolution(resolution);
                issue.setPriority(priority);
               
                XMLMemento issueMemento=null;
                if (mementoData != null) {
                    try {
                        issueMemento = XMLMemento.createReadRoot(new StringReader(mementoData));
                    } catch (WorkbenchException e) {
                        issueMemento = null;
                    }
                }
                XMLMemento viewMemento=null;
                if (viewData != null){
                    try {
                        viewMemento = XMLMemento.createReadRoot(new StringReader(viewData));
                    } catch (WorkbenchException e) {
                        viewMemento = null;
                    }
                }
               
                ReferencedEnvelope env = new ReferencedEnvelope(feature.getBounds());

                issue.init(issueMemento, viewMemento, id, groupId, env);
            }
           
            protected IIssue createPlaceHolder( SimpleFeature feature, String extensionId ) {
                PlaceholderIssue issue=new PlaceholderIssue();
                issue.setExtensionID(extensionId);
                initIssue(feature, issue);
                return issue;
            }

        };
View Full Code Here

Examples of org.locationtech.udig.issues.IIssue

        }

        if (!doDelete)
          return;

        IIssue issue = (IIssue) sel.getFirstElement();
          getCurrentInputList().removeIssues(issue.getGroupId());
      };
    };
    if (viewer.getSelection().isEmpty()) {
      action.setEnabled(false);
    } else {
View Full Code Here

Examples of org.locationtech.udig.issues.IIssue

      public void runWithEvent(Event event) {
        IStructuredSelection sel = (IStructuredSelection) viewer
            .getSelection();
        LinkedList<IIssue> issues = new LinkedList<IIssue>();
        for (Iterator<IIssue> iter = sel.iterator(); iter.hasNext();) {
          IIssue issue = iter.next();
          issues.add(issue);
        }
          getCurrentInputList().removeAll(issues);

      }
View Full Code Here

Examples of org.locationtech.udig.issues.IIssue

      List<IIssue> newselection=new LinkedList<IIssue>();
      IStructuredSelection sel=(IStructuredSelection) selection;
      for (Iterator iter = sel.iterator(); iter.hasNext();) {
        Object selected = iter.next();
        if (selected instanceof IIssue) {
          IIssue issue = (IIssue) selected;
          newselection.add(issue);
        }else if ( selected instanceof String ){
            newselection.addAll(getCurrentInputList().getIssues((String)selected));
        }
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.